diff options
author | Rouslan Placella <rouslan@placella.com> | 2012-05-01 02:41:07 +0400 |
---|---|---|
committer | Rouslan Placella <rouslan@placella.com> | 2012-05-05 19:44:27 +0400 |
commit | 2c805ade8b3323e518238b38f56d5382759f9e7c (patch) | |
tree | 314745c6f512cb287751b17a967f4e2d1cedc70b | |
parent | ec62d5f4b3dd762b44662ae5c89f164285bb741c (diff) |
Dropped tbl_links.inc.php
-rw-r--r-- | libraries/mult_submits.inc.php | 1 | ||||
-rw-r--r-- | libraries/rte/rte_main.inc.php | 1 | ||||
-rw-r--r-- | libraries/tbl_common.php | 14 | ||||
-rw-r--r-- | libraries/tbl_links.inc.php | 44 | ||||
-rw-r--r-- | sql.php | 1 | ||||
-rw-r--r-- | tbl_addfield.php | 7 | ||||
-rw-r--r-- | tbl_alter.php | 4 | ||||
-rw-r--r-- | tbl_change.php | 6 | ||||
-rw-r--r-- | tbl_chart.php | 1 | ||||
-rw-r--r-- | tbl_export.php | 7 | ||||
-rw-r--r-- | tbl_import.php | 4 | ||||
-rw-r--r-- | tbl_indexes.php | 3 | ||||
-rw-r--r-- | tbl_operations.php | 6 | ||||
-rw-r--r-- | tbl_relation.php | 10 | ||||
-rw-r--r-- | tbl_select.php | 5 | ||||
-rw-r--r-- | tbl_sql.php | 5 | ||||
-rw-r--r-- | tbl_structure.php | 4 | ||||
-rw-r--r-- | tbl_tracking.php | 4 | ||||
-rw-r--r-- | tbl_zoom_select.php | 5 | ||||
-rw-r--r-- | view_operations.php | 5 |
20 files changed, 16 insertions, 121 deletions
diff --git a/libraries/mult_submits.inc.php b/libraries/mult_submits.inc.php index 1a2a2a52aa..8a2043b99d 100644 --- a/libraries/mult_submits.inc.php +++ b/libraries/mult_submits.inc.php @@ -148,7 +148,6 @@ if (!empty($submit_mult) && !empty($what)) { include './libraries/tbl_common.php'; $url_query .= '&goto=tbl_sql.php&back=tbl_sql.php'; include './libraries/tbl_info.inc.php'; - include_once './libraries/tbl_links.inc.php'; } elseif (strlen($db)) { include './libraries/db_common.inc.php'; include './libraries/db_info.inc.php'; diff --git a/libraries/rte/rte_main.inc.php b/libraries/rte/rte_main.inc.php index bdb43b8a20..ce3b1bcdce 100644 --- a/libraries/rte/rte_main.inc.php +++ b/libraries/rte/rte_main.inc.php @@ -24,7 +24,6 @@ if ($GLOBALS['is_ajax_request'] != true) { */ if (! empty($table) && in_array($table, PMA_DBI_get_tables($db))) { include_once './libraries/tbl_common.php'; - include_once './libraries/tbl_links.inc.php'; } else { $table = ''; include_once './libraries/db_common.inc.php'; diff --git a/libraries/tbl_common.php b/libraries/tbl_common.php index 4b8172f5d2..5e3cd5a7e7 100644 --- a/libraries/tbl_common.php +++ b/libraries/tbl_common.php @@ -25,6 +25,10 @@ $db_is_information_schema = PMA_is_system_schema($db); */ $url_query = PMA_generate_common_url($db, $table); +/** + * Set parameters for links + */ +$url_params = array(); $url_params['db'] = $db; $url_params['table'] = $table; @@ -40,4 +44,14 @@ $err_url = $cfg['DefaultTabTable'] . PMA_generate_common_url($url_params); */ require_once './libraries/db_table_exists.lib.php'; +/** + * Displays headers + */ +require_once './libraries/header.inc.php'; + +if (PMA_Tracker::isActive() and PMA_Tracker::isTracked($GLOBALS["db"], $GLOBALS["table"])) { + $msg = PMA_Message::notice('<a href="tbl_tracking.php?'.$url_query.'">'.sprintf(__('Tracking of %s is activated.'), htmlspecialchars($GLOBALS["db"] . '.' . $GLOBALS["table"])).'</a>'); + $msg->display(); +} + ?> diff --git a/libraries/tbl_links.inc.php b/libraries/tbl_links.inc.php deleted file mode 100644 index f647bee63c..0000000000 --- a/libraries/tbl_links.inc.php +++ /dev/null @@ -1,44 +0,0 @@ -<?php -/* vim: set expandtab sw=4 ts=4 sts=4: */ -/** - * - * @package PhpMyAdmin - */ -if (! defined('PHPMYADMIN')) { - exit; -} - -/** - * Check parameters - */ -PMA_checkParameters(array('db', 'table')); - -/** - * Prepares links - */ -require_once './libraries/bookmark.lib.php'; - - -/** - * Set parameters for links - */ -$url_params = array(); -$url_params['db'] = $db; -$url_params['table'] = $table; - -/** - * Defines the urls to return to in case of error in a sql statement - */ -$err_url_0 = $cfg['DefaultTabDatabase'] . PMA_generate_common_url(array('db' => $db,)); -$err_url = $cfg['DefaultTabTable'] . PMA_generate_common_url($url_params); - -/** - * Displays headers - */ -require_once './libraries/header.inc.php'; - -if (PMA_Tracker::isActive() and PMA_Tracker::isTracked($GLOBALS["db"], $GLOBALS["table"])) { - $msg = PMA_Message::notice('<a href="tbl_tracking.php?'.$url_query.'">'.sprintf(__('Tracking of %s is activated.'), htmlspecialchars($GLOBALS["db"] . '.' . $GLOBALS["table"])).'</a>'); - $msg->display(); -} -?> @@ -923,7 +923,6 @@ if ((0 == $num_rows && 0 == $unlim_num_rows) || $is_affected) { include 'libraries/tbl_common.php'; $url_query .= '&goto=tbl_sql.php&back=tbl_sql.php'; include 'libraries/tbl_info.inc.php'; - include 'libraries/tbl_links.inc.php'; } elseif (strlen($db)) { include 'libraries/db_common.inc.php'; include 'libraries/db_info.inc.php'; diff --git a/tbl_addfield.php b/tbl_addfield.php index b6c38caf75..cbf55dca0b 100644 --- a/tbl_addfield.php +++ b/tbl_addfield.php @@ -222,13 +222,8 @@ if ($abort == false) { */ include_once 'libraries/tbl_common.php'; include_once 'libraries/tbl_info.inc.php'; - /** - * Displays top menu links - */ + $active_page = 'tbl_structure.php'; - if ($GLOBALS['is_ajax_request'] != true) { - include_once 'libraries/tbl_links.inc.php'; - } /** * Display the form */ diff --git a/tbl_alter.php b/tbl_alter.php index 7c658b332b..1d6c5265f9 100644 --- a/tbl_alter.php +++ b/tbl_alter.php @@ -279,10 +279,6 @@ if (isset($_REQUEST['do_save_data'])) { * $selected comes from multi_submits.inc.php */ if ($abort == false) { - if (!isset($_REQUEST['ajax_request']) || $_REQUEST['ajax_request'] != true) { - include_once 'libraries/tbl_links.inc.php'; - } - if (! isset($selected)) { PMA_checkParameters(array('field')); $selected[] = $_REQUEST['field']; diff --git a/tbl_change.php b/tbl_change.php index da0a5c98b1..d6b46b51a4 100644 --- a/tbl_change.php +++ b/tbl_change.php @@ -137,12 +137,6 @@ if (! empty($disp_message)) { } /** - * Displays top menu links - */ -require_once 'libraries/tbl_links.inc.php'; - - -/** * Get the analysis of SHOW CREATE TABLE for this table * @todo should be handled by class Table */ diff --git a/tbl_chart.php b/tbl_chart.php index 1bfb33bb3b..48003ab570 100644 --- a/tbl_chart.php +++ b/tbl_chart.php @@ -29,7 +29,6 @@ if (strlen($GLOBALS['table'])) { $url_params['back'] = 'tbl_sql.php'; include 'libraries/tbl_common.php'; include 'libraries/tbl_info.inc.php'; - include 'libraries/tbl_links.inc.php'; } elseif (strlen($GLOBALS['db'])) { $url_params['goto'] = $cfg['DefaultTabDatabase']; $url_params['back'] = 'sql.php'; diff --git a/tbl_export.php b/tbl_export.php index 6dc545f203..1fe4276f17 100644 --- a/tbl_export.php +++ b/tbl_export.php @@ -76,14 +76,9 @@ if (! empty($sql_query)) { // Just crop LIMIT clause $sql_query = $analyzed_sql[0]['section_before_limit'] . $analyzed_sql[0]['section_after_limit']; } - $message = PMA_Message::success(); + PMA_showMessage(PMA_Message::success()); } -/** - * Displays top menu links - */ -require 'libraries/tbl_links.inc.php'; - $export_type = 'table'; require_once 'libraries/display_export.lib.php'; diff --git a/tbl_import.php b/tbl_import.php index 290e2459cf..160764acd4 100644 --- a/tbl_import.php +++ b/tbl_import.php @@ -19,10 +19,6 @@ require_once 'libraries/tbl_common.php'; $url_query .= '&goto=tbl_import.php&back=tbl_import.php'; require_once 'libraries/tbl_info.inc.php'; -/** - * Displays top menu links - */ -require_once 'libraries/tbl_links.inc.php'; $import_type = 'table'; require_once 'libraries/display_import.lib.php'; diff --git a/tbl_indexes.php b/tbl_indexes.php index ef9d3d0703..0e536f7b13 100644 --- a/tbl_indexes.php +++ b/tbl_indexes.php @@ -131,9 +131,6 @@ if (isset($_REQUEST['do_save_data'])) { // Displays headers (if needed) $GLOBALS['js_include'][] = 'indexes.js'; require_once 'libraries/tbl_info.inc.php'; -if ($GLOBALS['is_ajax_request'] != true) { - include_once 'libraries/tbl_links.inc.php'; -} if (isset($_REQUEST['index']) && is_array($_REQUEST['index'])) { // coming already from form diff --git a/tbl_operations.php b/tbl_operations.php index b117e7a76c..be7b192bd2 100644 --- a/tbl_operations.php +++ b/tbl_operations.php @@ -223,12 +223,6 @@ if ($reread_info) { } unset($reread_info); -/** - * Displays top menu links in non ajax requests - */ -if (!isset($_REQUEST['ajax_request'])) { - include_once 'libraries/tbl_links.inc.php'; -} if (isset($result) && empty($message_to_show)) { // set to success by default, because result set could be empty // (for example, a table rename) diff --git a/tbl_relation.php b/tbl_relation.php index 51930f3a81..12871b6cc1 100644 --- a/tbl_relation.php +++ b/tbl_relation.php @@ -44,16 +44,6 @@ foreach ($post_params as $one_post_param) { */ require_once 'libraries/tbl_info.inc.php'; -// Note: in libraries/tbl_links.inc.php we get and display the table comment. -// For InnoDB, this comment contains the REFER information but any update -// has not been done yet (will be done in tbl_relation.php later). -$avoid_show_comment = true; - -/** - * Displays top menu links - */ -require_once 'libraries/tbl_links.inc.php'; - $options_array = array( 'CASCADE' => 'CASCADE', 'SET_NULL' => 'SET NULL', diff --git a/tbl_select.php b/tbl_select.php index 4120c23590..5ac8cd137d 100644 --- a/tbl_select.php +++ b/tbl_select.php @@ -66,11 +66,6 @@ if (! isset($param) || $param[0] == '') { */ include_once 'libraries/tbl_info.inc.php'; - /** - * Displays top menu links - */ - include_once 'libraries/tbl_links.inc.php'; - if (! isset($goto)) { $goto = $GLOBALS['cfg']['DefaultTabTable']; } diff --git a/tbl_sql.php b/tbl_sql.php index 6342ffb9ea..25f03b44b4 100644 --- a/tbl_sql.php +++ b/tbl_sql.php @@ -34,11 +34,6 @@ $back = 'tbl_sql.php'; require_once 'libraries/tbl_info.inc.php'; /** - * Displays top menu links - */ -require_once 'libraries/tbl_links.inc.php'; - -/** * Query box, bookmark, insert data from textfile */ PMA_sqlQueryForm( diff --git a/tbl_structure.php b/tbl_structure.php index 97f0ee84d4..8032abf91a 100644 --- a/tbl_structure.php +++ b/tbl_structure.php @@ -101,10 +101,6 @@ $url_params['back'] = 'tbl_structure.php'; */ require_once 'libraries/tbl_info.inc.php'; -/** - * Displays top menu links - */ -require_once 'libraries/tbl_links.inc.php'; require_once 'libraries/Index.class.php'; // 2. Gets table keys and retains them diff --git a/tbl_tracking.php b/tbl_tracking.php index 711065b3de..51740c162b 100644 --- a/tbl_tracking.php +++ b/tbl_tracking.php @@ -146,10 +146,6 @@ if (isset($_REQUEST['report_export']) && $_REQUEST['export_type'] == 'sqldumpfil * Gets tables informations */ -/** - * Displays top menu links - */ -require_once './libraries/tbl_links.inc.php'; echo '<br />'; /** diff --git a/tbl_zoom_select.php b/tbl_zoom_select.php index 3eacd335d4..957c555eea 100644 --- a/tbl_zoom_select.php +++ b/tbl_zoom_select.php @@ -146,11 +146,6 @@ $url_query .= '&goto=tbl_select.php&back=tbl_select.php'; */ require_once './libraries/tbl_info.inc.php'; -/** - * Displays top menu links - */ -require_once './libraries/tbl_links.inc.php'; - if (! isset($goto)) { $goto = $GLOBALS['cfg']['DefaultTabTable']; } diff --git a/view_operations.php b/view_operations.php index 66599ef30c..3dafd94d05 100644 --- a/view_operations.php +++ b/view_operations.php @@ -47,11 +47,6 @@ if (isset($_REQUEST['submitoptions'])) { } } -/** - * Displays top menu links - */ -require_once './libraries/tbl_links.inc.php'; - if (isset($result)) { // set to success by default, because result set could be empty // (for example, a table rename) |