diff options
author | Sebastian Mendel <cybot_tm@users.sourceforge.net> | 2005-11-18 15:50:49 +0300 |
---|---|---|
committer | Sebastian Mendel <cybot_tm@users.sourceforge.net> | 2005-11-18 15:50:49 +0300 |
commit | fcf387bc70b3c1975ac3df8c878bbb346b4ada43 (patch) | |
tree | 03bc79e005696d79646f3694a01e88e524a4aae2 | |
parent | 7a56c56c4b19fe90df56b60868d286d9e66ad1bf (diff) |
common.lib.php should REALLY REALLY and ALWAYS be the first include
52 files changed, 46 insertions, 57 deletions
@@ -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 <lem9@users.sourceforge.net> * 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 @@ <?php /* $Id$ */ -require_once('./libraries/grab_globals.lib.php'); require_once('./libraries/common.lib.php'); require_once('./libraries/header_http.inc.php'); $page_title = $strCalendar; diff --git a/chk_rel.php b/chk_rel.php index 57707a0e29..691b05a102 100644 --- a/chk_rel.php +++ b/chk_rel.php @@ -6,7 +6,6 @@ /** * Gets some core libraries */ -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'); diff --git a/db_create.php b/db_create.php index c2c25dc00c..af52d0adcf 100644 --- a/db_create.php +++ b/db_create.php @@ -6,10 +6,9 @@ /** * 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'); -require_once('./libraries/common.lib.php'); require_once('./libraries/mysql_charsets.lib.php'); diff --git a/db_datadict.php b/db_datadict.php index 6fef609aef..b929e0cf39 100644 --- a/db_datadict.php +++ b/db_datadict.php @@ -5,8 +5,9 @@ /** * Gets the variables sent or posted to this script, then displays headers */ +require_once('./libraries/common.lib.php'); + if (!isset($selected_tbl)) { - require_once('./libraries/grab_globals.lib.php'); require_once('./header.inc.php'); } diff --git a/db_details.php b/db_details.php index dc4c9ffb15..c25272803b 100644 --- a/db_details.php +++ b/db_details.php @@ -2,6 +2,7 @@ /* $Id$ */ // vim: expandtab sw=4 ts=4 sts=4: +require_once('./libraries/common.lib.php'); /** * Runs common work diff --git a/db_details_export.php b/db_details_export.php index 6c88163a3c..2b567dc739 100644 --- a/db_details_export.php +++ b/db_details_export.php @@ -13,6 +13,8 @@ /** * Gets some core libraries */ +require_once('./libraries/common.lib.php'); + $sub_part = '_export'; require_once('./db_details_common.php'); $url_query .= '&goto=db_details_export.php'; diff --git a/db_details_importdocsql.php b/db_details_importdocsql.php index 3b9ad746fd..2bfe545c21 100644 --- a/db_details_importdocsql.php +++ b/db_details_importdocsql.php @@ -2,6 +2,7 @@ /* $Id$ */ // vim: expandtab sw=4 ts=4 sts=4: +require_once('./libraries/common.lib.php'); /** * This script imports relation infos from docSQL (www.databay.de) @@ -13,13 +14,8 @@ * the headers */ require_once('./libraries/read_dump.lib.php'); -require_once('./libraries/grab_globals.lib.php'); require_once('./header.inc.php'); -//require common added for string importing - Robbat2, 15 January 2003 9.34PM -//all hardcoded strings converted by Robbat2, 15 January 2003 9.34PM -require_once('./libraries/common.lib.php'); - // Check parameters PMA_checkParameters(array('db')); diff --git a/db_details_links.php b/db_details_links.php index 6e13a3b1c4..0cfc531010 100644 --- a/db_details_links.php +++ b/db_details_links.php @@ -2,6 +2,7 @@ /* $Id$ */ // vim: expandtab sw=4 ts=4 sts=4: +require_once('./libraries/common.lib.php'); /** * If coming from a Show MySQL link on the home page, diff --git a/db_details_qbe.php b/db_details_qbe.php index f1e7b0fae9..09fa999b99 100644 --- a/db_details_qbe.php +++ b/db_details_qbe.php @@ -2,12 +2,10 @@ /* $Id$ */ // vim: expandtab sw=4 ts=4 sts=4: - /** * Get the values of the variables posted or sent to this script and display * the headers */ -require_once('./libraries/grab_globals.lib.php'); require_once('./libraries/common.lib.php'); require_once('./libraries/relation.lib.php'); diff --git a/db_import.php b/db_import.php index ebfd86566c..b94b6d86ad 100644 --- a/db_import.php +++ b/db_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/db_operations.php b/db_operations.php index 9dca70a781..cb18a83f00 100644 --- a/db_operations.php +++ b/db_operations.php @@ -2,7 +2,6 @@ /* $Id$ */ // vim: expandtab sw=4 ts=4 sts=4: -require_once('./libraries/grab_globals.lib.php'); require_once('./libraries/common.lib.php'); require_once('./libraries/mysql_charsets.lib.php'); /** diff --git a/db_printview.php b/db_printview.php index 0753c1f51a..9b35fb610d 100644 --- a/db_printview.php +++ b/db_printview.php @@ -2,16 +2,14 @@ /* $Id$ */ // vim: expandtab sw=4 ts=4 sts=4: +require_once('./libraries/common.lib.php'); /** * Gets the variables sent or posted to this script, then displays headers */ -require_once('./libraries/grab_globals.lib.php'); $print_view = TRUE; require_once('./header.inc.php'); -// Check parameters -require_once('./libraries/common.lib.php'); PMA_checkParameters(array('db')); diff --git a/db_search.php b/db_search.php index 613307ebec..fdc99d0c14 100644 --- a/db_search.php +++ b/db_search.php @@ -5,6 +5,7 @@ * Credits for this script goes to Thomas Chaumeny <chaume92 at aol.com> */ +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)) { @@ -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 @@ <?php /* $Id$ */ +require_once('./libraries/common.lib.php'); /** * Gets the variables sent or posted to this script, then displays headers */ $print_view = TRUE; if (!isset($selected_tbl)) { - require_once('./libraries/grab_globals.lib.php'); require_once('./header.inc.php'); } diff --git a/tbl_properties.php b/tbl_properties.php index baa2c03587..1fa3cdb7cf 100644 --- a/tbl_properties.php +++ b/tbl_properties.php @@ -2,6 +2,7 @@ /* $Id$ */ // vim: expandtab sw=4 ts=4 sts=4: +require_once('./libraries/common.lib.php'); /** * Runs common work diff --git a/tbl_properties_export.php b/tbl_properties_export.php index f34f1e2737..c474a5b504 100644 --- a/tbl_properties_export.php +++ b/tbl_properties_export.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_properties_operations.php b/tbl_properties_operations.php index 81f7cf366d..6b3fc9ba1c 100644 --- a/tbl_properties_operations.php +++ b/tbl_properties_operations.php @@ -2,6 +2,8 @@ /* $Id$ */ // vim: expandtab sw=4 ts=4 sts=4: +require_once('./libraries/common.lib.php'); + /** * Runs common work */ diff --git a/tbl_query_box.php b/tbl_query_box.php index 46123f43f8..e9167a1b22 100644 --- a/tbl_query_box.php +++ b/tbl_query_box.php @@ -10,7 +10,6 @@ */ // Check parameters -require_once('./libraries/grab_globals.lib.php'); require_once('./libraries/common.lib.php'); require_once('./libraries/bookmark.lib.php'); require_once './libraries/sql_query_form.lib.php'; diff --git a/tbl_rename.php b/tbl_rename.php index 607dd194dd..ddd22783e7 100644 --- a/tbl_rename.php +++ b/tbl_rename.php @@ -6,10 +6,9 @@ /** * Gets 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'; PMA_checkParameters(array('db','table')); /** diff --git a/tbl_replace.php b/tbl_replace.php index d19b470c4f..72efc2a8fe 100644 --- a/tbl_replace.php +++ b/tbl_replace.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_row_action.php b/tbl_row_action.php index cf8f52d423..2e63b99d03 100644 --- a/tbl_row_action.php +++ b/tbl_row_action.php @@ -1,7 +1,6 @@ <?php /* $Id$ */ // vim: expandtab sw=4 ts=4 sts=4: -require_once('./libraries/grab_globals.lib.php'); require_once('./libraries/common.lib.php'); require_once('./libraries/mysql_charsets.lib.php'); diff --git a/tbl_select.php b/tbl_select.php index a7f24f0d58..9a7b944d0e 100644 --- a/tbl_select.php +++ b/tbl_select.php @@ -6,7 +6,6 @@ /** * Gets some core libraries */ -require_once('./libraries/grab_globals.lib.php'); require_once('./libraries/common.lib.php'); require_once('./libraries/relation.lib.php'); // foreign keys require_once('./libraries/mysql_charsets.lib.php'); diff --git a/themes.php b/themes.php index f58f669699..ea0fcf81a5 100644 --- a/themes.php +++ b/themes.php @@ -1,6 +1,5 @@ <?php /* get some globals */ -require_once('./libraries/grab_globals.lib.php'); require_once('./libraries/common.lib.php'); /* Theme Select */ diff --git a/transformation_wrapper.php b/transformation_wrapper.php index e2a9932198..cb979b0aba 100644 --- a/transformation_wrapper.php +++ b/transformation_wrapper.php @@ -5,11 +5,6 @@ define('IS_TRANSFORMATION_WRAPPER', true); /** - * Get the variables sent or posted to this script and displays the header - */ -require_once('./libraries/grab_globals.lib.php'); - -/** * Gets a core script and starts output buffering work */ require_once('./libraries/common.lib.php'); diff --git a/user_password.php b/user_password.php index f656f3547c..6ef48500ae 100644 --- a/user_password.php +++ b/user_password.php @@ -6,7 +6,6 @@ /** * Gets some core libraries */ -require_once('./libraries/grab_globals.lib.php'); require_once('./libraries/common.lib.php'); /** |