From ee767e2d3d10fff9f8bf1b9cc3bf448690dbcfa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 26 Jul 2010 16:17:59 +0200 Subject: [PATCH] No need to explicitely include relation.lib its anyway included in common.inc --- browse_foreigners.php | 1 - chk_rel.php | 1 - db_datadict.php | 4 ++-- db_operations.php | 1 - db_printview.php | 1 - db_qbe.php | 1 - db_tracking.php | 3 --- export.php | 1 - index.php | 5 ----- libraries/Table.class.php | 2 -- libraries/Tracker.class.php | 5 ----- libraries/bookmark.lib.php | 5 ----- libraries/db_links.inc.php | 1 - libraries/display_export.lib.php | 1 - libraries/footer.inc.php | 2 -- libraries/header.inc.php | 1 - libraries/import/docsql.php | 1 - libraries/relation_cleanup.lib.php | 5 ----- libraries/tbl_properties.inc.php | 1 - main.php | 1 - navigation.php | 3 +-- pdf_pages.php | 1 - pdf_schema.php | 1 - pmd_common.php | 1 - pmd_display_field.php | 1 - pmd_pdf.php | 2 -- pmd_relation_new.php | 1 - pmd_relation_upd.php | 1 - pmd_save_pos.php | 1 - querywindow.php | 3 +-- sql.php | 1 - tbl_addfield.php | 1 - tbl_alter.php | 1 - tbl_change.php | 5 ----- tbl_create.php | 1 - tbl_operations.php | 1 - tbl_printview.php | 1 - tbl_relation.php | 2 -- tbl_select.php | 1 - tbl_structure.php | 2 -- tbl_tracking.php | 3 --- transformation_wrapper.php | 1 - 42 files changed, 4 insertions(+), 74 deletions(-) diff --git a/browse_foreigners.php b/browse_foreigners.php index 0f39cb4fe..4cfa543e8 100644 --- a/browse_foreigners.php +++ b/browse_foreigners.php @@ -22,7 +22,6 @@ require_once './libraries/header_http.inc.php'; * 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); diff --git a/chk_rel.php b/chk_rel.php index 323befda7..0f965ac59 100644 --- a/chk_rel.php +++ b/chk_rel.php @@ -10,7 +10,6 @@ */ require_once './libraries/common.inc.php'; require_once './libraries/header.inc.php'; -require_once './libraries/relation.lib.php'; /** diff --git a/db_datadict.php b/db_datadict.php index 6a9c04c5e..b20011387 100644 --- a/db_datadict.php +++ b/db_datadict.php @@ -18,10 +18,10 @@ if (!isset($selected_tbl)) { /** * Gets the relations settings */ -require_once './libraries/relation.lib.php'; +$cfgRelation = PMA_getRelationsParam(); + require_once './libraries/transformations.lib.php'; -$cfgRelation = PMA_getRelationsParam(); /** * Check parameters diff --git a/db_operations.php b/db_operations.php index 773213173..f235de983 100644 --- a/db_operations.php +++ b/db_operations.php @@ -262,7 +262,6 @@ if (strlen($db) && (! empty($db_rename) || ! empty($db_copy))) { * Settings for relations stuff */ -require_once './libraries/relation.lib.php'; $cfgRelation = PMA_getRelationsParam(); /** diff --git a/db_printview.php b/db_printview.php index 15801a904..97f8a77fd 100644 --- a/db_printview.php +++ b/db_printview.php @@ -26,7 +26,6 @@ $err_url = 'db_sql.php?' . PMA_generate_common_url($db); /** * Settings for relations stuff */ -require_once './libraries/relation.lib.php'; $cfgRelation = PMA_getRelationsParam(); /** diff --git a/db_qbe.php b/db_qbe.php index 7a08f07bc..2156683a5 100644 --- a/db_qbe.php +++ b/db_qbe.php @@ -11,7 +11,6 @@ */ require_once './libraries/common.inc.php'; require_once './libraries/Table.class.php'; -require_once './libraries/relation.lib.php'; /** diff --git a/db_tracking.php b/db_tracking.php index f18b9b821..aa0d9e457 100644 --- a/db_tracking.php +++ b/db_tracking.php @@ -17,9 +17,6 @@ $url_query .= '&goto=tbl_tracking.php&back=db_tracking.php'; $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'])) { diff --git a/export.php b/export.php index 64ae7d303..b1208bf77 100644 --- a/export.php +++ b/export.php @@ -383,7 +383,6 @@ $do_relation = isset($GLOBALS[$what . '_relation']); $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) { diff --git a/index.php b/index.php index 3b16ec7d2..16e13d028 100644 --- a/index.php +++ b/index.php @@ -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(); diff --git a/libraries/Table.class.php b/libraries/Table.class.php index 7839107e8..a29900e7b 100644 --- a/libraries/Table.class.php +++ b/libraries/Table.class.php @@ -781,7 +781,6 @@ class PMA_Table $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 @@ -1057,7 +1056,6 @@ class PMA_Table * @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 = ' diff --git a/libraries/Tracker.class.php b/libraries/Tracker.class.php index 82deb43fe..4f5c52f6c 100644 --- a/libraries/Tracker.class.php +++ b/libraries/Tracker.class.php @@ -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 diff --git a/libraries/bookmark.lib.php b/libraries/bookmark.lib.php index fa6b4bfcd..dba279d9c 100644 --- a/libraries/bookmark.lib.php +++ b/libraries/bookmark.lib.php @@ -6,11 +6,6 @@ * @package phpMyAdmin */ -/** - * - */ -require_once './libraries/relation.lib.php'; - /** * Defines the bookmark parameters for the current user * diff --git a/libraries/db_links.inc.php b/libraries/db_links.inc.php index a86bcf559..860d3d805 100644 --- a/libraries/db_links.inc.php +++ b/libraries/db_links.inc.php @@ -13,7 +13,6 @@ if (! defined('PHPMYADMIN')) { */ require_once './libraries/common.inc.php'; -require_once './libraries/relation.lib.php'; /** * Gets the relation settings */ diff --git a/libraries/display_export.lib.php b/libraries/display_export.lib.php index afa6435d6..5f52d1869 100644 --- a/libraries/display_export.lib.php +++ b/libraries/display_export.lib.php @@ -14,7 +14,6 @@ if (! defined('PHPMYADMIN')) { require_once './libraries/Table.class.php'; // Get relations & co. status -require_once './libraries/relation.lib.php'; $cfgRelation = PMA_getRelationsParam(); diff --git a/libraries/footer.inc.php b/libraries/footer.inc.php index b018549bc..ee76e917a 100644 --- a/libraries/footer.inc.php +++ b/libraries/footer.inc.php @@ -49,8 +49,6 @@ if (! defined('PHPMYADMIN')) { /** * 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'], ''), diff --git a/libraries/header.inc.php b/libraries/header.inc.php index 9182f1539..56385836b 100644 --- a/libraries/header.inc.php +++ b/libraries/header.inc.php @@ -143,7 +143,6 @@ if (empty($GLOBALS['is_header_sent'])) { /** * Settings for relations stuff */ - require_once './libraries/relation.lib.php'; $cfgRelation = PMA_getRelationsParam(); // Get additional information about tables for tooltip is done diff --git a/libraries/import/docsql.php b/libraries/import/docsql.php index 7f93f9b78..7a5e1db1c 100644 --- a/libraries/import/docsql.php +++ b/libraries/import/docsql.php @@ -12,7 +12,6 @@ if (! defined('PHPMYADMIN')) { /** * Load relations. */ -require_once './libraries/relation.lib.php'; $cfgRelation = PMA_getRelationsParam(); /** diff --git a/libraries/relation_cleanup.lib.php b/libraries/relation_cleanup.lib.php index 313e0b22e..476d46c68 100644 --- a/libraries/relation_cleanup.lib.php +++ b/libraries/relation_cleanup.lib.php @@ -9,11 +9,6 @@ if (! defined('PHPMYADMIN')) { exit; } -/** - * - */ -require_once './libraries/relation.lib.php'; - /** * Cleanu column related relation stuff * diff --git a/libraries/tbl_properties.inc.php b/libraries/tbl_properties.inc.php index 4b10f513d..cc34157cd 100644 --- a/libraries/tbl_properties.inc.php +++ b/libraries/tbl_properties.inc.php @@ -117,7 +117,6 @@ if (!$is_backup) { $header_cells[] = '' . ($display_type == 'horizontal' ? 'A_I' : 'AUTO_INCREMENT') . ''; -require_once './libraries/relation.lib.php'; require_once './libraries/transformations.lib.php'; $cfgRelation = PMA_getRelationsParam(); diff --git a/main.php b/main.php index ba6faa151..c09fd623b 100644 --- a/main.php +++ b/main.php @@ -309,7 +309,6 @@ if (file_exists('./config')) { * 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.')); diff --git a/navigation.php b/navigation.php index 17cb58709..cd9ca7d31 100644 --- a/navigation.php +++ b/navigation.php @@ -110,9 +110,8 @@ if ($GLOBALS['server'] && ! strlen($GLOBALS['db'])) { $db_start = $GLOBALS['db']; /** - * the relation library + * the relation settings */ -require_once './libraries/relation.lib.php'; $cfgRelation = PMA_getRelationsParam(); /** diff --git a/pdf_pages.php b/pdf_pages.php index a26420f04..f026ca651 100644 --- a/pdf_pages.php +++ b/pdf_pages.php @@ -20,7 +20,6 @@ require_once './libraries/db_info.inc.php'; /** * 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 diff --git a/pdf_schema.php b/pdf_schema.php index 097979209..0142512b4 100644 --- a/pdf_schema.php +++ b/pdf_schema.php @@ -13,7 +13,6 @@ require_once './libraries/common.inc.php'; /** * Settings for relation stuff */ -require_once './libraries/relation.lib.php'; require_once './libraries/transformations.lib.php'; require_once './libraries/Index.class.php'; diff --git a/pmd_common.php b/pmd_common.php index bf2351493..2cb2213ce 100644 --- a/pmd_common.php +++ b/pmd_common.php @@ -13,7 +13,6 @@ require_once './libraries/header_http.inc.php'; $GLOBALS['PMD']['STYLE'] = 'default'; -require_once './libraries/relation.lib.php'; $cfgRelation = PMA_getRelationsParam(); $GLOBALS['script_display_field'] = diff --git a/pmd_display_field.php b/pmd_display_field.php index acfa162c8..21ef7f26c 100644 --- a/pmd_display_field.php +++ b/pmd_display_field.php @@ -8,7 +8,6 @@ * */ include_once 'pmd_common.php'; -require_once './libraries/relation.lib.php'; $table = $T; diff --git a/pmd_pdf.php b/pmd_pdf.php index 069f6f1a9..beec1e022 100644 --- a/pmd_pdf.php +++ b/pmd_pdf.php @@ -15,8 +15,6 @@ if (! isset($scale)) { include_once 'pmd_save_pos.php'; } -require_once './libraries/relation.lib.php'; - if (isset($scale) && ! isset($createpage)) { if (empty($pdf_page_number)) { die(""); diff --git a/pmd_relation_new.php b/pmd_relation_new.php index 307304a21..32d42efc1 100644 --- a/pmd_relation_new.php +++ b/pmd_relation_new.php @@ -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); diff --git a/pmd_relation_upd.php b/pmd_relation_upd.php index a4ee7f938..f05ffbd92 100644 --- a/pmd_relation_upd.php +++ b/pmd_relation_upd.php @@ -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; diff --git a/pmd_save_pos.php b/pmd_save_pos.php index 7f6179ae6..cea100165 100644 --- a/pmd_save_pos.php +++ b/pmd_save_pos.php @@ -9,7 +9,6 @@ * */ include_once 'pmd_common.php'; -require_once './libraries/relation.lib.php'; $cfgRelation = PMA_getRelationsParam(); diff --git a/querywindow.php b/querywindow.php index 84b0e8238..86af6c01b 100644 --- a/querywindow.php +++ b/querywindow.php @@ -50,9 +50,8 @@ require_once './libraries/ob.lib.php'; PMA_outBufferPre(); /** - * load relations + * load relation params */ -require_once './libraries/relation.lib.php'; $cfgRelation = PMA_getRelationsParam(); /** diff --git a/sql.php b/sql.php index 917553213..703cc291e 100644 --- a/sql.php +++ b/sql.php @@ -585,7 +585,6 @@ else { } if (strlen($db)) { - require_once './libraries/relation.lib.php'; $cfgRelation = PMA_getRelationsParam(); } diff --git a/tbl_addfield.php b/tbl_addfield.php index 6d6c14ab4..40b9ab2d8 100644 --- a/tbl_addfield.php +++ b/tbl_addfield.php @@ -164,7 +164,6 @@ if (isset($_REQUEST['do_save_data'])) { 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] diff --git a/tbl_alter.php b/tbl_alter.php index 423156e05..e4a12b53a 100644 --- a/tbl_alter.php +++ b/tbl_alter.php @@ -105,7 +105,6 @@ if (isset($_REQUEST['do_save_data'])) { /** * If comments were sent, enable relation stuff */ - require_once './libraries/relation.lib.php'; require_once './libraries/transformations.lib.php'; // updaet field names in relation diff --git a/tbl_change.php b/tbl_change.php index 704cdc13a..150e73bc4 100644 --- a/tbl_change.php +++ b/tbl_change.php @@ -44,11 +44,6 @@ if (isset($_REQUEST['ShowFieldTypesInDataEditView'])) { $cfg['ShowFieldTypesInDataEditView'] = $_REQUEST['ShowFieldTypesInDataEditView']; } -/** - * load relation data, foreign keys - */ -require_once './libraries/relation.lib.php'; - /** * file listing */ diff --git a/tbl_create.php b/tbl_create.php index fc1119bb0..fc3fe655c 100644 --- a/tbl_create.php +++ b/tbl_create.php @@ -223,7 +223,6 @@ if (isset($_REQUEST['do_save_data'])) { 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] diff --git a/tbl_operations.php b/tbl_operations.php index fa89491ee..5e0e66b4a 100644 --- a/tbl_operations.php +++ b/tbl_operations.php @@ -23,7 +23,6 @@ $url_params['goto'] = $url_params['back'] = 'tbl_operations.php'; /** * Gets relation settings */ -require_once './libraries/relation.lib.php'; $cfgRelation = PMA_getRelationsParam(); /** diff --git a/tbl_printview.php b/tbl_printview.php index 1b625f99e..4fd966d4c 100644 --- a/tbl_printview.php +++ b/tbl_printview.php @@ -29,7 +29,6 @@ if (! isset($the_tables) || ! is_array($the_tables)) { /** * Gets the relations settings */ -require_once './libraries/relation.lib.php'; require_once './libraries/transformations.lib.php'; require_once './libraries/Index.class.php'; diff --git a/tbl_relation.php b/tbl_relation.php index ab5851177..c05787614 100644 --- a/tbl_relation.php +++ b/tbl_relation.php @@ -38,8 +38,6 @@ $avoid_show_comment = TRUE; */ require_once './libraries/tbl_links.inc.php'; -require_once './libraries/relation.lib.php'; - $options_array = array( 'CASCADE' => 'CASCADE', 'SET_NULL' => 'SET NULL', diff --git a/tbl_select.php b/tbl_select.php index d9e8a4662..31c25cb68 100644 --- a/tbl_select.php +++ b/tbl_select.php @@ -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'; diff --git a/tbl_structure.php b/tbl_structure.php index b0263a39c..82893ac87 100644 --- a/tbl_structure.php +++ b/tbl_structure.php @@ -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'; @@ -199,7 +198,6 @@ $comments_map = array(); $mime_map = array(); if ($GLOBALS['cfg']['ShowPropertyComments']) { - require_once './libraries/relation.lib.php'; require_once './libraries/transformations.lib.php'; //$cfgRelation = PMA_getRelationsParam(); diff --git a/tbl_tracking.php b/tbl_tracking.php index 6312262c0..f7765b1c8 100644 --- a/tbl_tracking.php +++ b/tbl_tracking.php @@ -15,9 +15,6 @@ $url_query .= '&goto=tbl_tracking.php&back=tbl_tracking.php'; $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']); diff --git a/transformation_wrapper.php b/transformation_wrapper.php index 3dd9c3123..3699dd091 100644 --- a/transformation_wrapper.php +++ b/transformation_wrapper.php @@ -14,7 +14,6 @@ define('IS_TRANSFORMATION_WRAPPER', true); * 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();