diff --git a/ChangeLog b/ChangeLog index 6807f7524e..45120108d5 100755 --- a/ChangeLog +++ b/ChangeLog @@ -17,6 +17,8 @@ $Source$ * lang/english-*: small improvements * tbl_properties_structure.php - do not truncate rowcount and next autoindex + * /* + - common.lib.php should REALLY REALLY and ALWAYS be the first include 2005-11-17 Marc Delisle * Documentation.html: patch #1353283, thanks to Isaac Bennetch diff --git a/calendar.php b/calendar.php index b7eea5fcd8..d8d46f2447 100644 --- a/calendar.php +++ b/calendar.php @@ -1,7 +1,6 @@ */ +require_once('./libraries/common.lib.php'); /** * Gets some core libraries and send headers diff --git a/export.php b/export.php index f66a2df83f..ba42a172f3 100644 --- a/export.php +++ b/export.php @@ -5,7 +5,6 @@ /** * Get the variables sent or posted to this script and a core script */ -require_once('./libraries/grab_globals.lib.php'); require_once('./libraries/common.lib.php'); require_once('./libraries/zip.lib.php'); diff --git a/header.inc.php b/header.inc.php index d41c099450..208809997a 100644 --- a/header.inc.php +++ b/header.inc.php @@ -2,6 +2,8 @@ /* $Id$ */ // vim: expandtab sw=4 ts=4 sts=4: +require_once('./libraries/common.lib.php'); + if (empty($GLOBALS['is_header_sent'])) { /** diff --git a/import.php b/import.php index 59b1bde082..a173adb1e3 100644 --- a/import.php +++ b/import.php @@ -7,9 +7,8 @@ /** * Get the variables sent or posted to this script and a core script */ -require_once('./libraries/grab_globals.lib.php'); -$js_to_run = 'functions.js'; require_once('./libraries/common.lib.php'); +$js_to_run = 'functions.js'; // Are we just executing plain query or sql file? (eg. non import, but query box/window run) if (!empty($sql_query)) { diff --git a/index.php b/index.php index 528f36dd2c..73d7da3459 100644 --- a/index.php +++ b/index.php @@ -38,7 +38,6 @@ /** * Gets core libraries and defines some variables */ -require_once('./libraries/grab_globals.lib.php'); require_once('./libraries/common.lib.php'); /** * Includes the ThemeManager if it hasn't been included yet diff --git a/pdf_pages.php b/pdf_pages.php index c0430e7136..2a3e94564b 100644 --- a/pdf_pages.php +++ b/pdf_pages.php @@ -5,7 +5,6 @@ /** * Gets some core libraries */ -require_once('./libraries/grab_globals.lib.php'); require_once('./libraries/common.lib.php'); require_once('./db_details_common.php'); diff --git a/pdf_schema.php b/pdf_schema.php index fd749b5e8b..09e78c21a0 100644 --- a/pdf_schema.php +++ b/pdf_schema.php @@ -10,7 +10,6 @@ /** * Gets some core scripts */ -require_once('./libraries/grab_globals.lib.php'); require_once('./libraries/common.lib.php'); diff --git a/phpinfo.php b/phpinfo.php index ee485a85f4..1b7d7044f7 100644 --- a/phpinfo.php +++ b/phpinfo.php @@ -6,7 +6,6 @@ /** * Gets core libraries and defines some variables */ -require_once('./libraries/grab_globals.lib.php'); require_once('./libraries/common.lib.php'); diff --git a/querywindow.php b/querywindow.php index 6411cb653f..49c6248b73 100644 --- a/querywindow.php +++ b/querywindow.php @@ -2,12 +2,12 @@ /* $Id$ */ // vim: expandtab sw=4 ts=4 sts=4: +require_once('./libraries/common.lib.php'); /** * Gets the variables sent to this script, retains the db name that may have * been defined as startup option and include a core library */ -require_once('./libraries/grab_globals.lib.php'); if (!empty($db)) { $db_start = $db; } @@ -16,7 +16,6 @@ if (!empty($db)) { /** * Gets a core script and starts output buffering work */ -require_once('./libraries/common.lib.php'); require_once './libraries/sql_query_form.lib.php'; require_once('./libraries/ob.lib.php'); if ( $GLOBALS['cfg']['OBGzip'] ) { diff --git a/server_binlog.php b/server_binlog.php index 2bd6a5c712..b86475aa73 100644 --- a/server_binlog.php +++ b/server_binlog.php @@ -2,6 +2,7 @@ /* $Id$ */ // vim: expandtab sw=4 ts=4 sts=4: +require_once('./libraries/common.lib.php'); /** * Does the common work diff --git a/server_collations.php b/server_collations.php index bee67d4453..18f2ebf924 100644 --- a/server_collations.php +++ b/server_collations.php @@ -2,6 +2,7 @@ /* $Id$ */ // vim: expandtab sw=4 ts=4 sts=4: +require_once('./libraries/common.lib.php'); /** * Does the common work diff --git a/server_common.inc.php b/server_common.inc.php index b6f9fd7003..de4290d374 100644 --- a/server_common.inc.php +++ b/server_common.inc.php @@ -5,7 +5,6 @@ /** * Gets some core libraries */ -require_once('./libraries/grab_globals.lib.php'); require_once('./libraries/common.lib.php'); /** diff --git a/server_engines.php b/server_engines.php index 4f41ec6e4c..2aa7a49cef 100644 --- a/server_engines.php +++ b/server_engines.php @@ -2,6 +2,7 @@ /* $Id$ */ // vim: expandtab sw=4 ts=4 sts=4: +require_once('./libraries/common.lib.php'); /** * Does the common work diff --git a/server_export.php b/server_export.php index 61197a3991..f3b9c49a93 100644 --- a/server_export.php +++ b/server_export.php @@ -2,19 +2,12 @@ /* $Id$ */ // vim: expandtab sw=4 ts=4 sts=4: - -/** - * Checks if the left frame has to be reloaded - */ -require_once('./libraries/grab_globals.lib.php'); - - /** * Does the common work */ -$js_to_run = 'functions.js'; -require('./server_common.inc.php'); +require_once('./libraries/common.lib.php'); +$js_to_run = 'functions.js'; /** * Displays the links diff --git a/server_import.php b/server_import.php index 82f4d56535..c4ca3a7cfa 100644 --- a/server_import.php +++ b/server_import.php @@ -2,6 +2,7 @@ /* $Id$ */ // vim: expandtab sw=4 ts=4 sts=4: +require_once('./libraries/common.lib.php'); /** * Does the common work diff --git a/server_privileges.php b/server_privileges.php index 5fa952dbe6..711a76b2d4 100644 --- a/server_privileges.php +++ b/server_privileges.php @@ -2,6 +2,8 @@ /* $Id$ */ // vim: expandtab sw=4 ts=4 sts=4: +require_once('./libraries/common.lib.php'); + /** * Does the common work */ diff --git a/server_processlist.php b/server_processlist.php index 22f63de485..8b5615fd8c 100644 --- a/server_processlist.php +++ b/server_processlist.php @@ -2,6 +2,7 @@ /* $Id$ */ // vim: expandtab sw=4 ts=4 sts=4: +require_once('./libraries/common.lib.php'); /** * Does the common work diff --git a/server_sql.php b/server_sql.php index 7b7ab60830..3e7d83e557 100644 --- a/server_sql.php +++ b/server_sql.php @@ -2,10 +2,12 @@ /* $Id$ */ // vim: expandtab sw=4 ts=4 sts=4: +require_once('./libraries/common.lib.php'); /** * Does the common work */ +$js_to_run = 'functions.js'; require_once './server_common.inc.php'; require_once './libraries/sql_query_form.lib.php'; diff --git a/server_status.php b/server_status.php index ce0667ce43..dc1a7f933f 100644 --- a/server_status.php +++ b/server_status.php @@ -6,6 +6,8 @@ * + reset status vriales */ +require_once('./libraries/common.lib.php'); + /** * Does the common work */ diff --git a/server_variables.php b/server_variables.php index b5c2c96b63..7bb273a6b0 100644 --- a/server_variables.php +++ b/server_variables.php @@ -2,6 +2,7 @@ /* $Id$ */ // vim: expandtab sw=4 ts=4 sts=4: +require_once('./libraries/common.lib.php'); /** * Does the common work diff --git a/tbl_addfield.php b/tbl_addfield.php index a2015a0cc8..2feea092c1 100644 --- a/tbl_addfield.php +++ b/tbl_addfield.php @@ -5,7 +5,8 @@ /** * Get some core libraries */ -require_once('./libraries/grab_globals.lib.php'); +require_once('./libraries/common.lib.php'); + $js_to_run = 'functions.js'; require_once('./header.inc.php'); diff --git a/tbl_alter.php b/tbl_alter.php index e33b9979b2..9237f84860 100644 --- a/tbl_alter.php +++ b/tbl_alter.php @@ -5,7 +5,8 @@ /** * Gets some core libraries */ -require_once('./libraries/grab_globals.lib.php'); +require_once('./libraries/common.lib.php'); + $js_to_run = 'functions.js'; require_once('./header.inc.php'); diff --git a/tbl_change.php b/tbl_change.php index 07b2b710de..596ba6dc2e 100644 --- a/tbl_change.php +++ b/tbl_change.php @@ -5,7 +5,8 @@ /** * Get the variables sent or posted to this script and displays the header */ -require_once('./libraries/grab_globals.lib.php'); +require_once('./libraries/common.lib.php'); + $js_to_run = 'tbl_change.js'; require_once('./header.inc.php'); require_once('./libraries/relation.lib.php'); // foreign keys diff --git a/tbl_create.php b/tbl_create.php index 116cace532..e54faa4343 100644 --- a/tbl_create.php +++ b/tbl_create.php @@ -5,11 +5,10 @@ /** * Get some core libraries */ -require_once('./libraries/grab_globals.lib.php'); -$js_to_run = 'functions.js'; - require_once('./libraries/common.lib.php'); +$js_to_run = 'functions.js'; + if (isset($table)) { $table = PMA_sanitize($table); } diff --git a/tbl_import.php b/tbl_import.php index d2c230919d..799c0cf389 100644 --- a/tbl_import.php +++ b/tbl_import.php @@ -2,6 +2,7 @@ /* $Id$ */ // vim: expandtab sw=4 ts=4 sts=4: +require_once('./libraries/common.lib.php'); /** * Gets tables informations and displays top links diff --git a/tbl_indexes.php b/tbl_indexes.php index a6b790a97c..8714c09c92 100644 --- a/tbl_indexes.php +++ b/tbl_indexes.php @@ -5,7 +5,6 @@ /** * Gets some core libraries */ -require_once('./libraries/grab_globals.lib.php'); require_once('./libraries/common.lib.php'); require_once('./libraries/tbl_indexes.lib.php'); diff --git a/tbl_move_copy.php b/tbl_move_copy.php index cc60ff107f..6892d76a63 100644 --- a/tbl_move_copy.php +++ b/tbl_move_copy.php @@ -5,7 +5,6 @@ /** * Gets some core libraries */ -require_once('./libraries/grab_globals.lib.php'); require_once('./libraries/common.lib.php'); // Check parameters diff --git a/tbl_printview.php b/tbl_printview.php index 8da5501abc..a566220594 100644 --- a/tbl_printview.php +++ b/tbl_printview.php @@ -1,13 +1,13 @@