Skip to content

Commit

Permalink
common.lib.php should REALLY REALLY and ALWAYS be the first include
Browse files Browse the repository at this point in the history
  • Loading branch information
CybotTM committed Nov 18, 2005
1 parent 7a56c56 commit fcf387b
Show file tree
Hide file tree
Showing 52 changed files with 46 additions and 57 deletions.
2 changes: 2 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion calendar.php
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
1 change: 0 additions & 1 deletion chk_rel.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
3 changes: 1 addition & 2 deletions db_create.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');


Expand Down
3 changes: 2 additions & 1 deletion db_datadict.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

Expand Down
1 change: 1 addition & 0 deletions db_details.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/* $Id$ */
// vim: expandtab sw=4 ts=4 sts=4:

require_once('./libraries/common.lib.php');

/**
* Runs common work
Expand Down
2 changes: 2 additions & 0 deletions db_details_export.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 .= '&amp;goto=db_details_export.php';
Expand Down
6 changes: 1 addition & 5 deletions db_details_importdocsql.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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'));

Expand Down
1 change: 1 addition & 0 deletions db_details_links.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 0 additions & 2 deletions db_details_qbe.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down
1 change: 1 addition & 0 deletions db_import.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion db_operations.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
/**
Expand Down
4 changes: 1 addition & 3 deletions db_printview.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'));

Expand Down
1 change: 1 addition & 0 deletions db_search.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion export.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down
2 changes: 2 additions & 0 deletions header.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'])) {

/**
Expand Down
3 changes: 1 addition & 2 deletions import.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
1 change: 0 additions & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion pdf_pages.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down
1 change: 0 additions & 1 deletion pdf_schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
/**
* Gets some core scripts
*/
require_once('./libraries/grab_globals.lib.php');
require_once('./libraries/common.lib.php');


Expand Down
1 change: 0 additions & 1 deletion phpinfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
/**
* Gets core libraries and defines some variables
*/
require_once('./libraries/grab_globals.lib.php');
require_once('./libraries/common.lib.php');


Expand Down
3 changes: 1 addition & 2 deletions querywindow.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -16,7 +16,6 @@
/**
* 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'] ) {
Expand Down
1 change: 1 addition & 0 deletions server_binlog.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/* $Id$ */
// vim: expandtab sw=4 ts=4 sts=4:

require_once('./libraries/common.lib.php');

/**
* Does the common work
Expand Down
1 change: 1 addition & 0 deletions server_collations.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/* $Id$ */
// vim: expandtab sw=4 ts=4 sts=4:

require_once('./libraries/common.lib.php');

/**
* Does the common work
Expand Down
1 change: 0 additions & 1 deletion server_common.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
/**
* Gets some core libraries
*/
require_once('./libraries/grab_globals.lib.php');
require_once('./libraries/common.lib.php');

/**
Expand Down
1 change: 1 addition & 0 deletions server_engines.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/* $Id$ */
// vim: expandtab sw=4 ts=4 sts=4:

require_once('./libraries/common.lib.php');

/**
* Does the common work
Expand Down
11 changes: 2 additions & 9 deletions server_export.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions server_import.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/* $Id$ */
// vim: expandtab sw=4 ts=4 sts=4:

require_once('./libraries/common.lib.php');

/**
* Does the common work
Expand Down
2 changes: 2 additions & 0 deletions server_privileges.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
/* $Id$ */
// vim: expandtab sw=4 ts=4 sts=4:

require_once('./libraries/common.lib.php');

/**
* Does the common work
*/
Expand Down
1 change: 1 addition & 0 deletions server_processlist.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/* $Id$ */
// vim: expandtab sw=4 ts=4 sts=4:

require_once('./libraries/common.lib.php');

/**
* Does the common work
Expand Down
2 changes: 2 additions & 0 deletions server_sql.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
2 changes: 2 additions & 0 deletions server_status.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
* + reset status vriales
*/

require_once('./libraries/common.lib.php');

/**
* Does the common work
*/
Expand Down
1 change: 1 addition & 0 deletions server_variables.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/* $Id$ */
// vim: expandtab sw=4 ts=4 sts=4:

require_once('./libraries/common.lib.php');

/**
* Does the common work
Expand Down
3 changes: 2 additions & 1 deletion tbl_addfield.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down
3 changes: 2 additions & 1 deletion tbl_alter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down
3 changes: 2 additions & 1 deletion tbl_change.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions tbl_create.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
1 change: 1 addition & 0 deletions tbl_import.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

0 comments on commit fcf387b

Please sign in to comment.