diff --git a/ChangeLog b/ChangeLog index 9178d5d67..3e677dc26 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,17 +5,34 @@ phpMyAdmin - Changelog $Id$ $Source$ +2003-11-26 Alexander M. Turek + * Almost every file: + - Replaced all include / require commands by require_once where possible; + - Further php 4.1+ optimizations; + - footer.inc.php now automatically stops the script execution; + - Coding standards. + * config.inc.php: Don't include select_lang.lib.php here. + * libraries/common.lib.php, libraries/defines.lib.php, + libraries/defines_php.lib.php, libraries/defines_mysql.lib.php, + scripts/create-release.sh: + defines.lib.php was included twice. For optimization reasons I moved all + the code that is independent from the MySQL connection out of defines.lib + into defines_php.lib. + To point out the (new) meanings of the files I renamed defines.lib.php to + defines_mysql.lib.php while defines_php.lib.php is now known as + defines.lib.php. + 2003-11-26 Michal Cihar * lang/check_lang.sh: Cleanup. * lang/sort_lang.sh: Cleanup. * lang/czech: Better translated some strings. - + 2003-11-26 Marc Delisle * lang/arabic: update, thanks to Ossama Khayat (okhayat) * lang/hindi: update, thanks to Girish Nair (girish_nair) * lang/slovak: Updated, thanks to Lubos Klokner (erkac). * lang/spanish: Updated, thanks to Daniel Hinostroza (hinostroza). - + 2003-11-25 Alexander M. Turek * translators.html: Changed email of Hindi translator, again. * badwords.txt: File is obsolete. diff --git a/browse_foreigners.php b/browse_foreigners.php index b702384c4..677266c37 100644 --- a/browse_foreigners.php +++ b/browse_foreigners.php @@ -5,25 +5,23 @@ /** * Get the variables sent or posted to this script and displays the header */ -require('./libraries/grab_globals.lib.php'); +require_once('./libraries/grab_globals.lib.php'); /** * Gets a core script and starts output buffering work */ -if (!defined('PMA_COMMON_LIB_INCLUDED')) { - include('./libraries/common.lib.php'); -} +require_once('./libraries/common.lib.php'); PMA_checkParameters(array('db', 'table', 'field')); -require('./libraries/ob.lib.php'); +require_once('./libraries/ob.lib.php'); if ($cfg['OBGzip']) { $ob_mode = PMA_outBufferModeGet(); if ($ob_mode) { PMA_outBufferPre($ob_mode); } } -include('./libraries/header_http.inc.php'); +require_once('./libraries/header_http.inc.php'); $field = urldecode($field); /** @@ -58,8 +56,8 @@ PMA_setFontSizes();
diff --git a/chk_rel.php b/chk_rel.php index 206af9d7f..57707a0e2 100644 --- a/chk_rel.php +++ b/chk_rel.php @@ -6,10 +6,10 @@ /** * Gets some core libraries */ -require('./libraries/grab_globals.lib.php'); -require('./libraries/common.lib.php'); -require('./db_details_common.php'); -require('./libraries/relation.lib.php'); +require_once('./libraries/grab_globals.lib.php'); +require_once('./libraries/common.lib.php'); +require_once('./db_details_common.php'); +require_once('./libraries/relation.lib.php'); /** @@ -21,6 +21,5 @@ $cfgRelation = PMA_getRelationsParam(TRUE); /** * Displays the footer */ -echo "\n"; -require('./footer.inc.php'); -?> \ No newline at end of file +require_once('./footer.inc.php'); +?> diff --git a/config.inc.php b/config.inc.php index 4ffcb63a0..4a1afe491 100644 --- a/config.inc.php +++ b/config.inc.php @@ -434,10 +434,6 @@ $cfg['AvailableCharsets'] = array( 'SHIFT_JIS' ); -// Loads language file -require('./libraries/select_lang.lib.php'); - - /** * Customization & design */ diff --git a/css/phpmyadmin.css.php b/css/phpmyadmin.css.php index cd3ff61bf..a58c3cf5b 100644 --- a/css/phpmyadmin.css.php +++ b/css/phpmyadmin.css.php @@ -4,8 +4,8 @@ chdir('..'); $is_minimum_common = TRUE; -require('./libraries/grab_globals.lib.php'); -require('./libraries/common.lib.php'); +require_once('./libraries/grab_globals.lib.php'); +require_once('./libraries/common.lib.php'); // Gets the default font sizes // garvin: TODO: Should be optimized to not include the whole common.lib.php bunch @@ -13,7 +13,7 @@ require('./libraries/common.lib.php'); PMA_setFontSizes(); $ctype = 'css'; -require('./libraries/header_http.inc.php'); +require_once('./libraries/header_http.inc.php'); if (!isset($js_frame)) { $js_frame = 'left'; diff --git a/db_create.php b/db_create.php index a15ca13d9..65ba9c121 100644 --- a/db_create.php +++ b/db_create.php @@ -6,13 +6,11 @@ /** * Gets some core libraries */ -require('./libraries/grab_globals.lib.php'); +require_once('./libraries/grab_globals.lib.php'); $js_to_run = 'functions.js'; -require('./header.inc.php'); +require_once('./header.inc.php'); +require_once('./libraries/common.lib.php'); -if (!defined('PMA_COMMON_LIB_INCLUDED')) { - include('./libraries/common.lib.php'); -} PMA_checkParameters(array('db')); @@ -32,6 +30,6 @@ $result = PMA_mysql_query('CREATE DATABASE ' . PMA_backquote($db)) or PMA_m * Displays the result and calls default page */ $message = $strDatabase . ' ' . htmlspecialchars($db) . ' ' . $strHasBeenCreated; -require('./' . $cfg['DefaultTabDatabase']); +require_once('./' . $cfg['DefaultTabDatabase']); -?> \ No newline at end of file +?> diff --git a/db_datadict.php b/db_datadict.php index 8e1024df2..7df1f896f 100644 --- a/db_datadict.php +++ b/db_datadict.php @@ -6,16 +6,16 @@ * Gets the variables sent or posted to this script, then displays headers */ if (!isset($selected_tbl)) { - include('./libraries/grab_globals.lib.php'); - include('./header.inc.php'); + require_once('./libraries/grab_globals.lib.php'); + require_once('./header.inc.php'); } /** * Gets the relations settings */ -require('./libraries/relation.lib.php'); -require('./libraries/transformations.lib.php'); +require_once('./libraries/relation.lib.php'); +require_once('./libraries/transformations.lib.php'); $cfgRelation = PMA_getRelationsParam(); @@ -317,5 +317,5 @@ function printPage()
 ' . "\n"; -require('./footer.inc.php'); -?> \ No newline at end of file +require_once('./footer.inc.php'); +?> diff --git a/db_details.php b/db_details.php index 532ae93da..95ae830ee 100644 --- a/db_details.php +++ b/db_details.php @@ -35,7 +35,7 @@ $sub_part = ''; require('./db_details_db_info.php'); if ($num_tables == 0 && empty($db_query_force)) { $is_info = TRUE; - include('./db_details_structure.php'); + require('./db_details_structure.php'); exit(); } @@ -62,7 +62,7 @@ $auto_sel = ($cfg['TextareaAutoSelect']  :