Use more require_once to avoid acquiring table info several times.
This commit is contained in:
@@ -53,6 +53,8 @@ $Source$
|
|||||||
phpMyAdmin one defined (bug #1312758).
|
phpMyAdmin one defined (bug #1312758).
|
||||||
* tbl_properties_structure.php: Removed query box as discussed on mailing
|
* tbl_properties_structure.php: Removed query box as discussed on mailing
|
||||||
list.
|
list.
|
||||||
|
* tbl_*: Use more require_once to avoid acquiring table info several
|
||||||
|
times.
|
||||||
|
|
||||||
2005-10-07 Marc Delisle <lem9@users.sourceforge.net>
|
2005-10-07 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* libraries/check_user_privileges.lib.php: bug #1313821, dbname containing a
|
* libraries/check_user_privileges.lib.php: bug #1313821, dbname containing a
|
||||||
|
@@ -210,18 +210,18 @@ if ($abort == FALSE) {
|
|||||||
/**
|
/**
|
||||||
* Gets tables informations
|
* Gets tables informations
|
||||||
*/
|
*/
|
||||||
require('./tbl_properties_common.php');
|
require_once('./tbl_properties_common.php');
|
||||||
require('./tbl_properties_table_info.php');
|
require_once('./tbl_properties_table_info.php');
|
||||||
/**
|
/**
|
||||||
* Displays top menu links
|
* Displays top menu links
|
||||||
*/
|
*/
|
||||||
$active_page = 'tbl_properties_structure.php';
|
$active_page = 'tbl_properties_structure.php';
|
||||||
require('./tbl_properties_links.php');
|
require_once('./tbl_properties_links.php');
|
||||||
/**
|
/**
|
||||||
* Display the form
|
* Display the form
|
||||||
*/
|
*/
|
||||||
$action = 'tbl_addfield.php';
|
$action = 'tbl_addfield.php';
|
||||||
require('./tbl_properties.inc.php');
|
require_once('./tbl_properties.inc.php');
|
||||||
|
|
||||||
// Diplays the footer
|
// Diplays the footer
|
||||||
echo "\n";
|
echo "\n";
|
||||||
|
@@ -15,8 +15,8 @@ PMA_checkParameters(array('db', 'table'));
|
|||||||
/**
|
/**
|
||||||
* Gets tables informations
|
* Gets tables informations
|
||||||
*/
|
*/
|
||||||
require('./tbl_properties_common.php');
|
require_once('./tbl_properties_common.php');
|
||||||
require('./tbl_properties_table_info.php');
|
require_once('./tbl_properties_table_info.php');
|
||||||
/**
|
/**
|
||||||
* Displays top menu links
|
* Displays top menu links
|
||||||
*/
|
*/
|
||||||
|
@@ -62,7 +62,7 @@ if (!preg_match('@^(db_details|tbl_properties|tbl_select)@', $goto)) {
|
|||||||
/**
|
/**
|
||||||
* Ensures db and table are valid, else moves to the "parent" script
|
* Ensures db and table are valid, else moves to the "parent" script
|
||||||
*/
|
*/
|
||||||
require('./libraries/db_table_exists.lib.php');
|
require_once('./libraries/db_table_exists.lib.php');
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -71,7 +71,7 @@ require('./libraries/db_table_exists.lib.php');
|
|||||||
$url_query = PMA_generate_common_url($db, $table)
|
$url_query = PMA_generate_common_url($db, $table)
|
||||||
. '&goto=tbl_properties.php';
|
. '&goto=tbl_properties.php';
|
||||||
|
|
||||||
require('./tbl_properties_table_info.php');
|
require_once('./tbl_properties_table_info.php');
|
||||||
|
|
||||||
/* Get comments */
|
/* Get comments */
|
||||||
|
|
||||||
@@ -91,7 +91,7 @@ if ($GLOBALS['cfg']['ShowPropertyComments']) {
|
|||||||
/**
|
/**
|
||||||
* Displays top menu links
|
* Displays top menu links
|
||||||
*/
|
*/
|
||||||
require('./tbl_properties_links.php');
|
require_once('./tbl_properties_links.php');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the list of the fields of the current table
|
* Get the list of the fields of the current table
|
||||||
|
@@ -6,19 +6,19 @@
|
|||||||
/**
|
/**
|
||||||
* Gets tables informations and displays top links
|
* Gets tables informations and displays top links
|
||||||
*/
|
*/
|
||||||
require('./tbl_properties_common.php');
|
require_once('./tbl_properties_common.php');
|
||||||
require('./tbl_properties_table_info.php');
|
require_once('./tbl_properties_table_info.php');
|
||||||
/**
|
/**
|
||||||
* Displays top menu links
|
* Displays top menu links
|
||||||
*/
|
*/
|
||||||
require('./tbl_properties_links.php');
|
require_once('./tbl_properties_links.php');
|
||||||
|
|
||||||
$import_type = 'table';
|
$import_type = 'table';
|
||||||
require('./libraries/display_import.lib.php');
|
require_once('./libraries/display_import.lib.php');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Displays the footer
|
* Displays the footer
|
||||||
*/
|
*/
|
||||||
require('./footer.inc.php');
|
require_once('./footer.inc.php');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
@@ -6,8 +6,8 @@
|
|||||||
/**
|
/**
|
||||||
* Runs common work
|
* Runs common work
|
||||||
*/
|
*/
|
||||||
require './tbl_properties_common.php';
|
require('./tbl_properties_common.php');
|
||||||
require_once './libraries/sql_query_form.lib.php';
|
require_once('./libraries/sql_query_form.lib.php');
|
||||||
|
|
||||||
$err_url = 'tbl_properties.php' . $err_url;
|
$err_url = 'tbl_properties.php' . $err_url;
|
||||||
$goto = 'tbl_properties.php';
|
$goto = 'tbl_properties.php';
|
||||||
@@ -16,12 +16,12 @@ $back = 'tbl_properties.php';
|
|||||||
/**
|
/**
|
||||||
* Get table information
|
* Get table information
|
||||||
*/
|
*/
|
||||||
require './tbl_properties_table_info.php';
|
require_once('./tbl_properties_table_info.php');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Displays top menu links
|
* Displays top menu links
|
||||||
*/
|
*/
|
||||||
require './tbl_properties_links.php';
|
require_once('./tbl_properties_links.php');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Query box, bookmark, insert data from textfile
|
* Query box, bookmark, insert data from textfile
|
||||||
@@ -31,5 +31,5 @@ PMA_sqlQueryForm();
|
|||||||
/**
|
/**
|
||||||
* Displays the footer
|
* Displays the footer
|
||||||
*/
|
*/
|
||||||
require_once './footer.inc.php';
|
require_once('./footer.inc.php');
|
||||||
?>
|
?>
|
||||||
|
@@ -6,9 +6,9 @@
|
|||||||
/**
|
/**
|
||||||
* Gets tables informations and displays top links
|
* Gets tables informations and displays top links
|
||||||
*/
|
*/
|
||||||
require('./tbl_properties_common.php');
|
require_once('./tbl_properties_common.php');
|
||||||
$url_query .= '&goto=tbl_properties_export.php&back=tbl_properties_export.php';
|
$url_query .= '&goto=tbl_properties_export.php&back=tbl_properties_export.php';
|
||||||
require('./tbl_properties_table_info.php');
|
require_once('./tbl_properties_table_info.php');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<!-- Dump of a table -->
|
<!-- Dump of a table -->
|
||||||
|
@@ -77,12 +77,12 @@ if (isset($submitorderby) && !empty($order_field)) {
|
|||||||
/**
|
/**
|
||||||
* Gets tables informations
|
* Gets tables informations
|
||||||
*/
|
*/
|
||||||
require('./tbl_properties_table_info.php');
|
require_once('./tbl_properties_table_info.php');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Displays top menu links
|
* Displays top menu links
|
||||||
*/
|
*/
|
||||||
require('./tbl_properties_links.php');
|
require_once('./tbl_properties_links.php');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get columns names
|
* Get columns names
|
||||||
|
@@ -35,7 +35,7 @@ if ((!empty($submit_mult) && isset($selected_fld))
|
|||||||
/**
|
/**
|
||||||
* Runs common work
|
* Runs common work
|
||||||
*/
|
*/
|
||||||
require('./tbl_properties_common.php');
|
require_once('./tbl_properties_common.php');
|
||||||
$url_query .= '&goto=tbl_properties_structure.php&back=tbl_properties_structure.php';
|
$url_query .= '&goto=tbl_properties_structure.php&back=tbl_properties_structure.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -45,7 +45,7 @@ $url_query .= '&goto=tbl_properties_structure.php&back=tbl_properties_st
|
|||||||
/**
|
/**
|
||||||
* Gets tables informations
|
* Gets tables informations
|
||||||
*/
|
*/
|
||||||
require('./tbl_properties_table_info.php');
|
require_once('./tbl_properties_table_info.php');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show result of multi submit operation
|
* Show result of multi submit operation
|
||||||
@@ -58,7 +58,7 @@ if ((!empty($submit_mult) && isset($selected_fld))
|
|||||||
/**
|
/**
|
||||||
* Displays top menu links
|
* Displays top menu links
|
||||||
*/
|
*/
|
||||||
require('./tbl_properties_links.php');
|
require_once('./tbl_properties_links.php');
|
||||||
|
|
||||||
// 2. Gets table keys and retains them
|
// 2. Gets table keys and retains them
|
||||||
$result = PMA_DBI_query('SHOW INDEX FROM ' . PMA_backquote($table) . ';');
|
$result = PMA_DBI_query('SHOW INDEX FROM ' . PMA_backquote($table) . ';');
|
||||||
|
@@ -14,7 +14,7 @@ $url_query .= '&goto=tbl_properties.php';
|
|||||||
/**
|
/**
|
||||||
* Gets tables informations
|
* Gets tables informations
|
||||||
*/
|
*/
|
||||||
require('./tbl_properties_table_info.php');
|
require_once('./tbl_properties_table_info.php');
|
||||||
|
|
||||||
// Note: in tbl_properties_links.php we get and display the table comment.
|
// Note: in tbl_properties_links.php we get and display the table comment.
|
||||||
// For InnoDB, this comment contains the REFER information but any update
|
// For InnoDB, this comment contains the REFER information but any update
|
||||||
@@ -24,7 +24,7 @@ $avoid_show_comment = TRUE;
|
|||||||
/**
|
/**
|
||||||
* Displays top menu links
|
* Displays top menu links
|
||||||
*/
|
*/
|
||||||
require('./tbl_properties_links.php');
|
require_once('./tbl_properties_links.php');
|
||||||
|
|
||||||
require_once('./libraries/relation.lib.php');
|
require_once('./libraries/relation.lib.php');
|
||||||
|
|
||||||
|
@@ -35,19 +35,19 @@ if ($cfg['PropertiesIconic'] == true) {
|
|||||||
*/
|
*/
|
||||||
if (!isset($param) || $param[0] == '') {
|
if (!isset($param) || $param[0] == '') {
|
||||||
// Gets some core libraries
|
// Gets some core libraries
|
||||||
require('./tbl_properties_common.php');
|
require_once('./tbl_properties_common.php');
|
||||||
//$err_url = 'tbl_select.php' . $err_url;
|
//$err_url = 'tbl_select.php' . $err_url;
|
||||||
$url_query .= '&goto=tbl_select.php&back=tbl_select.php';
|
$url_query .= '&goto=tbl_select.php&back=tbl_select.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets tables informations
|
* Gets tables informations
|
||||||
*/
|
*/
|
||||||
require('./tbl_properties_table_info.php');
|
require_once('./tbl_properties_table_info.php');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Displays top menu links
|
* Displays top menu links
|
||||||
*/
|
*/
|
||||||
require('./tbl_properties_links.php');
|
require_once('./tbl_properties_links.php');
|
||||||
|
|
||||||
if (!isset($goto)) {
|
if (!isset($goto)) {
|
||||||
$goto = $cfg['DefaultTabTable'];
|
$goto = $cfg['DefaultTabTable'];
|
||||||
|
Reference in New Issue
Block a user