Skip to content

Commit

Permalink
No need to explicitely include relation.lib its anyway included in co…
Browse files Browse the repository at this point in the history
…mmon.inc
  • Loading branch information
nijel committed Jul 26, 2010
1 parent bcc372b commit ee767e2
Show file tree
Hide file tree
Showing 42 changed files with 4 additions and 74 deletions.
1 change: 0 additions & 1 deletion browse_foreigners.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
* Displays the frame
*/
$per_page = 200;
require_once './libraries/relation.lib.php'; // foreign keys
require_once './libraries/transformations.lib.php'; // Transformations
$cfgRelation = PMA_getRelationsParam();
$foreigners = ($cfgRelation['relwork'] ? PMA_getForeigners($db, $table) : FALSE);
Expand Down
1 change: 0 additions & 1 deletion chk_rel.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
*/
require_once './libraries/common.inc.php';
require_once './libraries/header.inc.php';
require_once './libraries/relation.lib.php';


/**
Expand Down
4 changes: 2 additions & 2 deletions db_datadict.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
/**
* Gets the relations settings
*/
require_once './libraries/relation.lib.php';
$cfgRelation = PMA_getRelationsParam();

require_once './libraries/transformations.lib.php';

$cfgRelation = PMA_getRelationsParam();

/**
* Check parameters
Expand Down
1 change: 0 additions & 1 deletion db_operations.php
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,6 @@
* Settings for relations stuff
*/

require_once './libraries/relation.lib.php';
$cfgRelation = PMA_getRelationsParam();

/**
Expand Down
1 change: 0 additions & 1 deletion db_printview.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
/**
* Settings for relations stuff
*/
require_once './libraries/relation.lib.php';
$cfgRelation = PMA_getRelationsParam();

/**
Expand Down
1 change: 0 additions & 1 deletion db_qbe.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
*/
require_once './libraries/common.inc.php';
require_once './libraries/Table.class.php';
require_once './libraries/relation.lib.php';


/**
Expand Down
3 changes: 0 additions & 3 deletions db_tracking.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
$sub_part = '_structure';
require './libraries/db_info.inc.php';

// Get relation settings
require_once './libraries/relation.lib.php';

// Work to do?
// (here, do not use $_REQUEST['db] as it can be crafted)
if (isset($_REQUEST['delete_tracking']) && isset($_REQUEST['table'])) {
Expand Down
1 change: 0 additions & 1 deletion export.php
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,6 @@ function PMA_exportOutputHandler($line)
$do_comments = isset($GLOBALS[$what . '_comments']);
$do_mime = isset($GLOBALS[$what . '_mime']);
if ($do_relation || $do_comments || $do_mime) {
require_once './libraries/relation.lib.php';
$cfgRelation = PMA_getRelationsParam();
}
if ($do_mime) {
Expand Down
5 changes: 0 additions & 5 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@
*/
require_once './libraries/common.inc.php';

/**
* Includes the ThemeManager if it hasn't been included yet
*/
require_once './libraries/relation.lib.php';

// free the session file, for the other frames to be loaded
session_write_close();

Expand Down
2 changes: 0 additions & 2 deletions libraries/Table.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,6 @@ static public function moveCopy($source_db, $source_table, $target_db, $target_t
$GLOBALS['sql_query'] .= "\n\n" . $sql_insert_data . ';';
}

require_once './libraries/relation.lib.php';
$GLOBALS['cfgRelation'] = PMA_getRelationsParam();

// Drops old table if the user has requested to move it
Expand Down Expand Up @@ -1057,7 +1056,6 @@ function rename($new_name, $new_db = null, $is_view = false)
* @todo move into extra function PMA_Relation::renameTable($new_name, $old_name, $new_db, $old_db)
*/
// Move old entries from comments to new table
require_once './libraries/relation.lib.php';
$GLOBALS['cfgRelation'] = PMA_getRelationsParam();
if ($GLOBALS['cfgRelation']['commwork']) {
$remove_query = '
Expand Down
5 changes: 0 additions & 5 deletions libraries/Tracker.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
* @package phpMyAdmin
*/

/**
* Gets relation settings
*/
require_once './libraries/relation.lib.php';

/**
* This class tracks changes on databases, tables and views.
* For more information please see phpMyAdmin/Documentation.html
Expand Down
5 changes: 0 additions & 5 deletions libraries/bookmark.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@
* @package phpMyAdmin
*/

/**
*
*/
require_once './libraries/relation.lib.php';

/**
* Defines the bookmark parameters for the current user
*
Expand Down
1 change: 0 additions & 1 deletion libraries/db_links.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
*/
require_once './libraries/common.inc.php';

require_once './libraries/relation.lib.php';
/**
* Gets the relation settings
*/
Expand Down
1 change: 0 additions & 1 deletion libraries/display_export.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
require_once './libraries/Table.class.php';

// Get relations & co. status
require_once './libraries/relation.lib.php';
$cfgRelation = PMA_getRelationsParam();


Expand Down
2 changes: 0 additions & 2 deletions libraries/footer.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@
/**
* for PMA_setHistory()
*/
require_once './libraries/relation.lib.php';

if (! PMA_isValid($_REQUEST['no_history']) && empty($GLOBALS['error_message'])
&& ! empty($GLOBALS['sql_query'])) {
PMA_setHistory(PMA_ifSetOr($GLOBALS['db'], ''),
Expand Down
1 change: 0 additions & 1 deletion libraries/header.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@
/**
* Settings for relations stuff
*/
require_once './libraries/relation.lib.php';
$cfgRelation = PMA_getRelationsParam();

// Get additional information about tables for tooltip is done
Expand Down
1 change: 0 additions & 1 deletion libraries/import/docsql.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
/**
* Load relations.
*/
require_once './libraries/relation.lib.php';
$cfgRelation = PMA_getRelationsParam();

/**
Expand Down
5 changes: 0 additions & 5 deletions libraries/relation_cleanup.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@
exit;
}

/**
*
*/
require_once './libraries/relation.lib.php';

/**
* Cleanu column related relation stuff
*
Expand Down
1 change: 0 additions & 1 deletion libraries/tbl_properties.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@

$header_cells[] = '<abbr title="AUTO_INCREMENT">' . ($display_type == 'horizontal' ? 'A_I' : 'AUTO_INCREMENT') . '</abbr>';

require_once './libraries/relation.lib.php';
require_once './libraries/transformations.lib.php';
$cfgRelation = PMA_getRelationsParam();

Expand Down
1 change: 0 additions & 1 deletion main.php
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,6 @@
* Check whether relations are supported.
*/
if ($server > 0) {
require_once './libraries/relation.lib.php';
$cfgRelation = PMA_getRelationsParam();
if(!$cfgRelation['allworks'] && $cfg['PmaNoRelation_DisableWarning'] == false) {
$message = PMA_Message::notice(__('The additional features for working with linked tables have been deactivated. To find out why click %shere%s.'));
Expand Down
3 changes: 1 addition & 2 deletions navigation.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,8 @@ function PMA_exitNavigationFrame()
$db_start = $GLOBALS['db'];

/**
* the relation library
* the relation settings
*/
require_once './libraries/relation.lib.php';
$cfgRelation = PMA_getRelationsParam();

/**
Expand Down
1 change: 0 additions & 1 deletion pdf_pages.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
/**
* Settings for relation stuff
*/
require_once './libraries/relation.lib.php';
$cfgRelation = PMA_getRelationsParam();

// This is to avoid "Command out of sync" errors. Before switching this to
Expand Down
1 change: 0 additions & 1 deletion pdf_schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
/**
* Settings for relation stuff
*/
require_once './libraries/relation.lib.php';
require_once './libraries/transformations.lib.php';
require_once './libraries/Index.class.php';

Expand Down
1 change: 0 additions & 1 deletion pmd_common.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

$GLOBALS['PMD']['STYLE'] = 'default';

require_once './libraries/relation.lib.php';
$cfgRelation = PMA_getRelationsParam();

$GLOBALS['script_display_field'] =
Expand Down
1 change: 0 additions & 1 deletion pmd_display_field.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
*
*/
include_once 'pmd_common.php';
require_once './libraries/relation.lib.php';


$table = $T;
Expand Down
2 changes: 0 additions & 2 deletions pmd_pdf.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
include_once 'pmd_save_pos.php';
}

require_once './libraries/relation.lib.php';

if (isset($scale) && ! isset($createpage)) {
if (empty($pdf_page_number)) {
die("<script>alert('Pages not found!');history.go(-2);</script>");
Expand Down
1 change: 0 additions & 1 deletion pmd_relation_new.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
include_once 'pmd_common.php';
$die_save_pos = 0;
include_once 'pmd_save_pos.php';
require_once './libraries/relation.lib.php';
extract($_POST, EXTR_SKIP);

$tables = PMA_DBI_get_tables_full($db, $T1);
Expand Down
1 change: 0 additions & 1 deletion pmd_relation_upd.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
*
*/
include_once 'pmd_common.php';
require_once './libraries/relation.lib.php';
extract($_POST, EXTR_SKIP);
extract($_GET, EXTR_SKIP);
$die_save_pos = 0;
Expand Down
1 change: 0 additions & 1 deletion pmd_save_pos.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
*
*/
include_once 'pmd_common.php';
require_once './libraries/relation.lib.php';

$cfgRelation = PMA_getRelationsParam();

Expand Down
3 changes: 1 addition & 2 deletions querywindow.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@
PMA_outBufferPre();

/**
* load relations
* load relation params
*/
require_once './libraries/relation.lib.php';
$cfgRelation = PMA_getRelationsParam();

/**
Expand Down
1 change: 0 additions & 1 deletion sql.php
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,6 @@
}

if (strlen($db)) {
require_once './libraries/relation.lib.php';
$cfgRelation = PMA_getRelationsParam();
}

Expand Down
1 change: 0 additions & 1 deletion tbl_addfield.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@

if ($result === true) {
// If comments were sent, enable relation stuff
require_once './libraries/relation.lib.php';
require_once './libraries/transformations.lib.php';

// Update comment table for mime types [MIME]
Expand Down
1 change: 0 additions & 1 deletion tbl_alter.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@
/**
* If comments were sent, enable relation stuff
*/
require_once './libraries/relation.lib.php';
require_once './libraries/transformations.lib.php';

// updaet field names in relation
Expand Down
5 changes: 0 additions & 5 deletions tbl_change.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@
$cfg['ShowFieldTypesInDataEditView'] = $_REQUEST['ShowFieldTypesInDataEditView'];
}

/**
* load relation data, foreign keys
*/
require_once './libraries/relation.lib.php';

/**
* file listing
*/
Expand Down
1 change: 0 additions & 1 deletion tbl_create.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,6 @@
if ($result) {

// If comments were sent, enable relation stuff
require_once './libraries/relation.lib.php';
require_once './libraries/transformations.lib.php';

// Update comment table for mime types [MIME]
Expand Down
1 change: 0 additions & 1 deletion tbl_operations.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
/**
* Gets relation settings
*/
require_once './libraries/relation.lib.php';
$cfgRelation = PMA_getRelationsParam();

/**
Expand Down
1 change: 0 additions & 1 deletion tbl_printview.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
/**
* Gets the relations settings
*/
require_once './libraries/relation.lib.php';
require_once './libraries/transformations.lib.php';
require_once './libraries/Index.class.php';

Expand Down
2 changes: 0 additions & 2 deletions tbl_relation.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@
*/
require_once './libraries/tbl_links.inc.php';

require_once './libraries/relation.lib.php';

$options_array = array(
'CASCADE' => 'CASCADE',
'SET_NULL' => 'SET NULL',
Expand Down
1 change: 0 additions & 1 deletion tbl_select.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* Gets some core libraries
*/
require_once './libraries/common.inc.php';
require_once './libraries/relation.lib.php'; // foreign keys
require_once './libraries/mysql_charsets.lib.php';

$GLOBALS['js_include'][] = 'tbl_change.js';
Expand Down
2 changes: 0 additions & 2 deletions tbl_structure.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
*/
require_once './libraries/common.inc.php';
require_once './libraries/mysql_charsets.lib.php';
require_once './libraries/relation.lib.php';

$GLOBALS['js_include'][] = 'jquery/jquery-ui-1.8.custom.js';

Expand Down Expand Up @@ -199,7 +198,6 @@
$mime_map = array();

if ($GLOBALS['cfg']['ShowPropertyComments']) {
require_once './libraries/relation.lib.php';
require_once './libraries/transformations.lib.php';

//$cfgRelation = PMA_getRelationsParam();
Expand Down
3 changes: 0 additions & 3 deletions tbl_tracking.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
$url_params['goto'] = 'tbl_tracking.php';;
$url_params['back'] = 'tbl_tracking.php';

// Get relation settings
require_once './libraries/relation.lib.php';

// Init vars for tracking report
if (isset($_REQUEST['report']) || isset($_REQUEST['report_export'])) {
$data = PMA_Tracker::getTrackedData($_REQUEST['db'], $_REQUEST['table'], $_REQUEST['version']);
Expand Down
1 change: 0 additions & 1 deletion transformation_wrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* Gets a core script and starts output buffering work
*/
require_once './libraries/common.inc.php';
require_once './libraries/relation.lib.php'; // foreign keys
require_once './libraries/transformations.lib.php'; // Transformations
$cfgRelation = PMA_getRelationsParam();

Expand Down

0 comments on commit ee767e2

Please sign in to comment.