The branch, master has been updated via ac088aaee0194f28f435b63b978db96426cda642 (commit) from ff56cbf5d901a34bc3884254f5f56ce2d2ee0ab2 (commit)
- Log ----------------------------------------------------------------- commit ac088aaee0194f28f435b63b978db96426cda642 Author: Dieter Adriaenssens ruleant@users.sourceforge.net Date: Fri Sep 23 00:46:58 2011 +0200
use include() instead of require() when including file conditionally
-----------------------------------------------------------------------
Summary of changes: libraries/header.inc.php | 18 ++++++++-------- libraries/mult_submits.inc.php | 28 +++++++++++++------------- libraries/rte/rte_main.inc.php | 10 ++++---- libraries/string.lib.php | 8 +++--- main.php | 12 +++++----- schema_edit.php | 10 ++++---- server_status.php | 8 +++--- sql.php | 42 ++++++++++++++++++++-------------------- tbl_addfield.php | 14 ++++++------ tbl_alter.php | 8 +++--- tbl_change.php | 6 ++-- tbl_chart.php | 14 ++++++------ tbl_create.php | 8 +++--- tbl_operations.php | 8 +++--- tbl_replace.php | 16 +++++++------- tbl_row_action.php | 10 ++++---- tbl_select.php | 10 ++++---- tbl_structure.php | 8 +++--- user_password.php | 8 +++--- 19 files changed, 123 insertions(+), 123 deletions(-)
diff --git a/libraries/header.inc.php b/libraries/header.inc.php index eb17e4c..54c59b2 100644 --- a/libraries/header.inc.php +++ b/libraries/header.inc.php @@ -39,7 +39,7 @@ if (isset($GLOBALS['is_ajax_request']) && !$GLOBALS['is_ajax_request']) { /** * Gets a core script and starts output buffering work */ - require_once './libraries/ob.lib.php'; + include_once './libraries/ob.lib.php'; PMA_outBufferPre();
// if database storage for user preferences is transient, offer to load @@ -54,9 +54,9 @@ if (isset($GLOBALS['is_ajax_request']) && !$GLOBALS['is_ajax_request']) { // to a seperate file. It can now be included by header.inc.php, // querywindow.php.
- require_once './libraries/header_http.inc.php'; - require_once './libraries/header_meta_style.inc.php'; - require_once './libraries/header_scripts.inc.php'; + include_once './libraries/header_http.inc.php'; + include_once './libraries/header_meta_style.inc.php'; + include_once './libraries/header_scripts.inc.php'; ?> <meta name="OBGZip" content="<?php echo ($GLOBALS['cfg']['OBGzip'] ? 'true' : 'false'); ?>" /> <?php /* remove vertical scroll bar bug in ie */ ?> @@ -76,7 +76,7 @@ if (isset($GLOBALS['is_ajax_request']) && !$GLOBALS['is_ajax_request']) {
// Include possible custom headers if (file_exists(CUSTOM_HEADER_FILE)) { - require CUSTOM_HEADER_FILE; + include CUSTOM_HEADER_FILE; }
@@ -89,7 +89,7 @@ if (isset($GLOBALS['is_ajax_request']) && !$GLOBALS['is_ajax_request']) {
// offer to load user preferences from localStorage if ($userprefs_offer_import) { - require_once './libraries/user_preferences.lib.php'; + include_once './libraries/user_preferences.lib.php'; PMA_userprefs_autoload_header(); }
@@ -148,7 +148,7 @@ if (isset($GLOBALS['is_ajax_request']) && !$GLOBALS['is_ajax_request']) { // if the table is being dropped, $_REQUEST['purge'] is set to '1' // so do not display the table name in upper div if (strlen($GLOBALS['table']) && ! (isset($_REQUEST['purge']) && $_REQUEST['purge'] == '1')) { - require_once './libraries/tbl_info.inc.php'; + include_once './libraries/tbl_info.inc.php';
echo $separator; printf($item, @@ -179,7 +179,7 @@ if (isset($GLOBALS['is_ajax_request']) && !$GLOBALS['is_ajax_request']) { /** * Settings for relations stuff */ - require_once './libraries/relation.lib.php'; + include_once './libraries/relation.lib.php'; $cfgRelation = PMA_getRelationsParam();
// Get additional information about tables for tooltip is done @@ -208,7 +208,7 @@ if (isset($GLOBALS['is_ajax_request']) && !$GLOBALS['is_ajax_request']) { } //end if (!$GLOBALS['is_ajax_request']) else { if (empty($GLOBALS['is_header_sent'])) { - require_once './libraries/header_http.inc.php'; + include_once './libraries/header_http.inc.php'; $GLOBALS['is_header_sent'] = true; } } diff --git a/libraries/mult_submits.inc.php b/libraries/mult_submits.inc.php index 6a16541..6a4c242 100644 --- a/libraries/mult_submits.inc.php +++ b/libraries/mult_submits.inc.php @@ -25,7 +25,7 @@ if (! empty($submit_mult) } elseif (isset($selected_tbl) && !empty($selected_tbl)) { // coming from database structure view - do something with selected tables if ($submit_mult == 'print') { - require './tbl_printview.php'; + include './tbl_printview.php'; } else { $selected = $selected_tbl; switch ($submit_mult) { @@ -47,7 +47,7 @@ if (! empty($submit_mult) break; case 'export': unset($submit_mult); - require 'db_export.php'; + include 'db_export.php'; exit; break; } // end switch @@ -102,7 +102,7 @@ if (! empty($submit_mult) $mult_btn = __('Yes'); break; case 'change': - require './tbl_alter.php'; + include './tbl_alter.php'; break; case 'browse': // this should already be handled by tbl_structure.php @@ -121,18 +121,18 @@ if (! empty($submit_mult) if (!empty($submit_mult) && !empty($what)) { unset($message);
- require_once './libraries/header.inc.php'; + include_once './libraries/header.inc.php'; if (strlen($table)) { - require './libraries/tbl_common.php'; + include './libraries/tbl_common.php'; $url_query .= '&goto=tbl_sql.php&back=tbl_sql.php'; - require './libraries/tbl_info.inc.php'; - require_once './libraries/tbl_links.inc.php'; + include './libraries/tbl_info.inc.php'; + include_once './libraries/tbl_links.inc.php'; } elseif (strlen($db)) { - require './libraries/db_common.inc.php'; - require './libraries/db_info.inc.php'; + include './libraries/db_common.inc.php'; + include './libraries/db_info.inc.php'; } else { - require_once './libraries/server_common.inc.php'; - require_once './libraries/server_links.inc.php'; + include_once './libraries/server_common.inc.php'; + include_once './libraries/server_links.inc.php'; }
// Builds the query @@ -288,7 +288,7 @@ if (!empty($submit_mult) && !empty($what)) { </fieldset> <?php } - require './libraries/footer.inc.php'; + include './libraries/footer.inc.php';
} // end if
@@ -299,7 +299,7 @@ if (!empty($submit_mult) && !empty($what)) { elseif ($mult_btn == __('Yes')) {
if ($query_type == 'drop_db' || $query_type == 'drop_tbl' || $query_type == 'drop_fld') { - require_once './libraries/relation_cleanup.lib.php'; + include_once './libraries/relation_cleanup.lib.php'; }
$sql_query = ''; @@ -465,7 +465,7 @@ elseif ($mult_btn == __('Yes')) { }
if ($use_sql) { - require './sql.php'; + include './sql.php'; } elseif (!$run_parts) { PMA_DBI_select_db($db); $result = PMA_DBI_try_query($sql_query); diff --git a/libraries/rte/rte_main.inc.php b/libraries/rte/rte_main.inc.php index 988cf6b..796467e 100644 --- a/libraries/rte/rte_main.inc.php +++ b/libraries/rte/rte_main.inc.php @@ -23,12 +23,12 @@ if ($GLOBALS['is_ajax_request'] != true) { * Displays the header and tabs */ if (! empty($table) && in_array($table, PMA_DBI_get_tables($db))) { - require_once './libraries/tbl_common.php'; - require_once './libraries/tbl_links.inc.php'; + include_once './libraries/tbl_common.php'; + include_once './libraries/tbl_links.inc.php'; } else { $table = ''; - require_once './libraries/db_common.inc.php'; - require_once './libraries/db_info.inc.php'; + include_once './libraries/db_common.inc.php'; + include_once './libraries/db_info.inc.php'; } } else { /** @@ -92,7 +92,7 @@ case 'EVN': * Display the footer, if necessary */ if ($GLOBALS['is_ajax_request'] != true) { - require './libraries/footer.inc.php'; + include './libraries/footer.inc.php'; }
?> diff --git a/libraries/string.lib.php b/libraries/string.lib.php index 0e9f974..9773820 100644 --- a/libraries/string.lib.php +++ b/libraries/string.lib.php @@ -24,18 +24,18 @@ if (! defined('PHPMYADMIN')) { */ if (@function_exists('mb_strlen')) { mb_internal_encoding('utf-8'); - require './libraries/string_mb.lib.php'; + include './libraries/string_mb.lib.php'; } else { - require './libraries/string_native.lib.php'; + include './libraries/string_native.lib.php'; }
/** * Load ctype handler. */ if (@extension_loaded('ctype')) { - require './libraries/string_type_ctype.lib.php'; + include './libraries/string_type_ctype.lib.php'; } else { - require './libraries/string_type_native.lib.php'; + include './libraries/string_type_native.lib.php'; }
/** diff --git a/main.php b/main.php index 0325f08..f85f1c0 100644 --- a/main.php +++ b/main.php @@ -30,9 +30,9 @@ $common_url_query = PMA_generate_common_url('', ''); // when $server > 0, a server has been chosen so we can display // all MySQL-related information if ($server > 0) { - require './libraries/server_common.inc.php'; - require './libraries/StorageEngine.class.php'; - require './libraries/server_links.inc.php'; + include './libraries/server_common.inc.php'; + include './libraries/StorageEngine.class.php'; + include './libraries/server_links.inc.php';
// Use the verbose name of the server instead of the hostname // if a value is set @@ -71,7 +71,7 @@ if ($server > 0 if (! $cfg['LeftDisplayServers'] && (count($cfg['Servers']) > 1 || $server == 0 && count($cfg['Servers']) == 1)) { echo '<li id="li_select_server">'; - require_once './libraries/select_server.lib.php'; + include_once './libraries/select_server.lib.php'; PMA_select_server(true, true); echo '</li>'; } @@ -80,7 +80,7 @@ if ($server > 0 * Displays the mysql server related links */ if ($server > 0 && !PMA_DRIZZLE) { - require_once './libraries/check_user_privileges.lib.php'; + include_once './libraries/check_user_privileges.lib.php';
// Logout for advanced authentication if ($cfg['Server']['auth_type'] != 'config') { @@ -119,7 +119,7 @@ echo ' <ul>'; // Displays language selection combo if (empty($cfg['Lang'])) { echo '<li id="li_select_lang">'; - require_once './libraries/display_select_lang.lib.php'; + include_once './libraries/display_select_lang.lib.php'; PMA_select_language(); echo '</li>'; } diff --git a/schema_edit.php b/schema_edit.php index 3662b0b..85eeccc 100644 --- a/schema_edit.php +++ b/schema_edit.php @@ -37,24 +37,24 @@ $cfgRelation = PMA_getRelationsParam(); if (! $cfgRelation['relwork']) { echo sprintf(__('<b>%s</b> table not found or not set in %s'), 'relation', 'config.inc.php') . '<br />' . "\n" . PMA_showDocu('relation') . "\n"; - require_once './libraries/footer.inc.php'; + include_once './libraries/footer.inc.php'; }
if (! $cfgRelation['displaywork']) { echo sprintf(__('<b>%s</b> table not found or not set in %s'), 'table_info', 'config.inc.php') . '<br />' . "\n" . PMA_showDocu('table_info') . "\n"; - require_once './libraries/footer.inc.php'; + include_once './libraries/footer.inc.php'; }
if (! isset($cfgRelation['table_coords'])) { echo sprintf(__('<b>%s</b> table not found or not set in %s'), 'table_coords', 'config.inc.php') . '<br />' . "\n" . PMA_showDocu('table_coords') . "\n"; - require_once './libraries/footer.inc.php'; + include_once './libraries/footer.inc.php'; } if (! isset($cfgRelation['pdf_pages'])) { echo sprintf(__('<b>%s</b> table not found or not set in %s'), 'pdf_page', 'config.inc.php') . '<br />' . "\n" . PMA_showDocu('pdf_pages') . "\n"; - require_once './libraries/footer.inc.php'; + include_once './libraries/footer.inc.php'; }
if ($cfgRelation['pdfwork']) { @@ -64,7 +64,7 @@ if ($cfgRelation['pdfwork']) { * so, user can interact with it and perform export of relations schema */
- require_once './libraries/schema/User_Schema.class.php'; + include_once './libraries/schema/User_Schema.class.php'; $user_schema = new PMA_User_Schema();
/** diff --git a/server_status.php b/server_status.php index d7da7b3..bbac0c3 100644 --- a/server_status.php +++ b/server_status.php @@ -134,7 +134,7 @@ if (isset($_REQUEST['ajax_request']) && $_REQUEST['ajax_request'] == true) {
case 'cpu': if (!$sysinfo) { - require_once 'libraries/sysinfo.lib.php'; + include_once 'libraries/sysinfo.lib.php'; $sysinfo = getSysInfo(); } if (!$cpuload) { @@ -151,7 +151,7 @@ if (isset($_REQUEST['ajax_request']) && $_REQUEST['ajax_request'] == true) {
case 'memory': if (!$sysinfo) { - require_once 'libraries/sysinfo.lib.php'; + include_once 'libraries/sysinfo.lib.php'; $sysinfo = getSysInfo(); } if (!$memory) { @@ -404,8 +404,8 @@ if (PMA_DRIZZLE) { $server_master_status = false; $server_slave_status = false; } else { - require './libraries/replication.inc.php'; - require_once './libraries/replication_gui.lib.php'; + include './libraries/replication.inc.php'; + include_once './libraries/replication_gui.lib.php'; }
/** diff --git a/sql.php b/sql.php index 41d4504..619893a 100644 --- a/sql.php +++ b/sql.php @@ -71,7 +71,7 @@ if (isset($fields['dbase'])) { * better place either. */ if (isset($_REQUEST['get_relational_values']) && $_REQUEST['get_relational_values'] == true) { - require_once 'libraries/relation.lib.php'; + include_once 'libraries/relation.lib.php';
$column = $_REQUEST['column']; $foreigners = PMA_getForeigners($db, $table, $column); @@ -197,7 +197,7 @@ if (isset($_REQUEST['set_col_prefs']) && $_REQUEST['set_col_prefs'] == true) { // Default to browse if no query set and we have table // (needed for browsing from DefaultTabTable) if (empty($sql_query) && strlen($table) && strlen($db)) { - require_once './libraries/bookmark.lib.php'; + include_once './libraries/bookmark.lib.php'; $book_sql_query = PMA_Bookmark_get($db, ''' . PMA_sqlAddSlashes($table) . ''', 'label', false, true);
@@ -233,7 +233,7 @@ if (!defined('PMA_CHK_DROP') && !$cfg['AllowUserDropDatabase'] && $is_drop_database && !$is_superuser) { - require_once './libraries/header.inc.php'; + include_once './libraries/header.inc.php'; PMA_mysqlDie(__('"DROP DATABASE" statements are disabled.'), '', '', $err_url); } // end if
@@ -286,7 +286,7 @@ if (isset($btnDrop) && $btnDrop == __('No')) { $table = ''; } $active_page = $goto; - require './' . PMA_securePath($goto); + include './' . PMA_securePath($goto); } else { PMA_sendHeaderLocation($cfg['PmaAbsoluteUri'] . str_replace('&', '&', $goto)); } @@ -315,7 +315,7 @@ if (! $cfg['Confirm'] || isset($_REQUEST['is_js_confirmed']) || isset($btnDrop)
if ($do_confirm) { $stripped_sql_query = $sql_query; - require_once './libraries/header.inc.php'; + include_once './libraries/header.inc.php'; if ($is_drop_database) { echo '<h1 class="error">' . __('You are about to DESTROY a complete database!') . '</h1>'; } @@ -346,7 +346,7 @@ if ($do_confirm) { /** * Displays the footer and exit */ - require './libraries/footer.inc.php'; + include './libraries/footer.inc.php'; } // end if $do_confirm
@@ -501,7 +501,7 @@ if (isset($GLOBALS['show_as_php']) || !empty($GLOBALS['validatequery'])) { /** * Go to target path. */ - require './' . PMA_securePath($goto); + include './' . PMA_securePath($goto); } else { $full_err_url = (preg_match('@^(db|tbl)_@', $err_url)) ? $err_url . '&show_query=1&sql_query=' . urlencode($sql_query) @@ -637,7 +637,7 @@ if (isset($GLOBALS['show_as_php']) || !empty($GLOBALS['validatequery'])) { /** * Cleanup relations. */ - require_once './libraries/relation_cleanup.lib.php'; + include_once './libraries/relation_cleanup.lib.php';
if (strlen($table) && strlen($db)) { PMA_relationsCleanupTable($db, $table); @@ -650,7 +650,7 @@ if (isset($GLOBALS['show_as_php']) || !empty($GLOBALS['validatequery'])) {
// If a column gets dropped, do relation magic. if (isset($dropped_column) && strlen($db) && strlen($table) && !empty($dropped_column)) { - require_once './libraries/relation_cleanup.lib.php'; + include_once './libraries/relation_cleanup.lib.php'; PMA_relationsCleanupColumn($db, $table, $dropped_column);
} // end if column was dropped @@ -744,10 +744,10 @@ if (0 == $num_rows || $is_affected) { } // Loads to target script if ($goto != 'main.php') { - require_once './libraries/header.inc.php'; + include_once './libraries/header.inc.php'; } $active_page = $goto; - require './' . $goto; + include './' . $goto; } else { // avoid a redirect loop when last record was deleted if (0 == $num_rows && 'sql.php' == $cfg['DefaultTabTable']) { @@ -802,7 +802,7 @@ else { unset($show_query); } if (isset($printview) && $printview == '1') { - require_once './libraries/header_printview.inc.php'; + include_once './libraries/header_printview.inc.php'; } else {
$GLOBALS['js_include'][] = 'functions.js'; @@ -813,19 +813,19 @@ else {
if (! $GLOBALS['is_ajax_request'] || ! $GLOBALS['cfg']['AjaxEnable']) { if (strlen($table)) { - require './libraries/tbl_common.php'; + include './libraries/tbl_common.php'; $url_query .= '&goto=tbl_sql.php&back=tbl_sql.php'; - require './libraries/tbl_info.inc.php'; - require './libraries/tbl_links.inc.php'; + include './libraries/tbl_info.inc.php'; + include './libraries/tbl_links.inc.php'; } elseif (strlen($db)) { - require './libraries/db_common.inc.php'; - require './libraries/db_info.inc.php'; + include './libraries/db_common.inc.php'; + include './libraries/db_info.inc.php'; } else { - require './libraries/server_common.inc.php'; - require './libraries/server_links.inc.php'; + include './libraries/server_common.inc.php'; + include './libraries/server_links.inc.php'; } } else { - require_once './libraries/header.inc.php'; + include_once './libraries/header.inc.php'; //we don't need to buffer the output in PMA_showMessage here. //set a global variable and check against it in the function $GLOBALS['buffer_message'] = false; @@ -992,6 +992,6 @@ window.onload = function() * Displays the footer */ if (! isset($_REQUEST['table_maintenance'])) { - require './libraries/footer.inc.php'; + include './libraries/footer.inc.php'; } ?> diff --git a/tbl_addfield.php b/tbl_addfield.php index a866fef..50fb422 100644 --- a/tbl_addfield.php +++ b/tbl_addfield.php @@ -163,7 +163,7 @@ if (isset($_REQUEST['do_save_data'])) {
if ($result === true) { // If comments were sent, enable relation stuff - require_once './libraries/transformations.lib.php'; + include_once './libraries/transformations.lib.php';
// Update comment table for mime types [MIME] if (isset($_REQUEST['field_mimetype']) @@ -191,7 +191,7 @@ if (isset($_REQUEST['do_save_data'])) { }
$active_page = 'tbl_structure.php'; - require './tbl_structure.php'; + include './tbl_structure.php'; } else { PMA_mysqlDie('', '', '', $err_url, false); // An error happened while inserting/updating a table definition. @@ -215,21 +215,21 @@ if ($abort == false) { /** * Gets tables informations */ - require_once './libraries/tbl_common.php'; - require_once './libraries/tbl_info.inc.php'; + include_once './libraries/tbl_common.php'; + include_once './libraries/tbl_info.inc.php'; /** * Displays top menu links */ $active_page = 'tbl_structure.php'; - require_once './libraries/tbl_links.inc.php'; + include_once './libraries/tbl_links.inc.php'; /** * Display the form */ $action = 'tbl_addfield.php'; - require_once './libraries/tbl_properties.inc.php'; + include_once './libraries/tbl_properties.inc.php';
// Diplays the footer - require './libraries/footer.inc.php'; + include './libraries/footer.inc.php'; }
?> diff --git a/tbl_alter.php b/tbl_alter.php index a76af59..dcde601 100644 --- a/tbl_alter.php +++ b/tbl_alter.php @@ -103,7 +103,7 @@ if (isset($_REQUEST['do_save_data'])) { /** * If comments were sent, enable relation stuff */ - require_once './libraries/transformations.lib.php'; + include_once './libraries/transformations.lib.php';
// updaet field names in relation if (isset($_REQUEST['field_orig']) && is_array($_REQUEST['field_orig'])) { @@ -136,7 +136,7 @@ if (isset($_REQUEST['do_save_data'])) { }
$active_page = 'tbl_structure.php'; - require './tbl_structure.php'; + include './tbl_structure.php'; } else { PMA_mysqlDie('', '', '', $err_url, false); // An error happened while inserting/updating a table definition. @@ -156,7 +156,7 @@ if (isset($_REQUEST['do_save_data'])) { * $selected comes from multi_submits.inc.php */ if ($abort == false) { - require_once './libraries/tbl_links.inc.php'; + include_once './libraries/tbl_links.inc.php';
if (! isset($selected)) { PMA_checkParameters(array('field')); @@ -195,7 +195,7 @@ if ($abort == false) { /** * Form for changing properties. */ - require './libraries/tbl_properties.inc.php'; + include './libraries/tbl_properties.inc.php'; }
diff --git a/tbl_change.php b/tbl_change.php index 7bc0767..b64da6e 100644 --- a/tbl_change.php +++ b/tbl_change.php @@ -21,9 +21,9 @@ require_once './libraries/db_table_exists.lib.php';
// load additional configuration variables if (PMA_DRIZZLE) { - require_once './libraries/data_drizzle.inc.php'; + include_once './libraries/data_drizzle.inc.php'; } else { - require_once './libraries/data_mysql.inc.php'; + include_once './libraries/data_mysql.inc.php'; }
/** @@ -187,7 +187,7 @@ if (isset($where_clause)) { unset($rows[$key_id], $where_clause_array[$key_id]); PMA_showMessage(__('MySQL returned an empty result set (i.e. zero rows).'), $local_query); echo "\n"; - require './libraries/footer.inc.php'; + include './libraries/footer.inc.php'; } else { // end if (no row returned) $meta = PMA_DBI_get_fields_meta($result[$key_id]); list($unique_condition, $tmp_clause_is_unique) = PMA_getUniqueCondition($result[$key_id], count($meta), $meta, $rows[$key_id], true); diff --git a/tbl_chart.php b/tbl_chart.php index 43de351..e396c53 100644 --- a/tbl_chart.php +++ b/tbl_chart.php @@ -35,19 +35,19 @@ $GLOBALS['js_include'][] = 'canvg/canvg.js'; if (strlen($GLOBALS['table'])) { $url_params['goto'] = $cfg['DefaultTabTable']; $url_params['back'] = 'tbl_sql.php'; - require './libraries/tbl_common.php'; - require './libraries/tbl_info.inc.php'; - require './libraries/tbl_links.inc.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'; - require './libraries/db_common.inc.php'; - require './libraries/db_info.inc.php'; + include './libraries/db_common.inc.php'; + include './libraries/db_info.inc.php'; } else { $url_params['goto'] = $cfg['DefaultTabServer']; $url_params['back'] = 'sql.php'; - require './libraries/server_common.inc.php'; - require './libraries/server_links.inc.php'; + include './libraries/server_common.inc.php'; + include './libraries/server_links.inc.php'; }
/* diff --git a/tbl_create.php b/tbl_create.php index fb9c72f..e60c172 100644 --- a/tbl_create.php +++ b/tbl_create.php @@ -197,7 +197,7 @@ if (isset($_REQUEST['do_save_data'])) { if ($result) {
// If comments were sent, enable relation stuff - require_once './libraries/transformations.lib.php'; + include_once './libraries/transformations.lib.php';
// Update comment table for mime types [MIME] if (isset($_REQUEST['field_mimetype']) @@ -314,13 +314,13 @@ if (isset($_REQUEST['do_save_data'])) { // read table info on this newly created table, in case // the next page is Structure $reread_info = true; - require './libraries/tbl_info.inc.php'; + include './libraries/tbl_info.inc.php';
// do not switch to sql.php - as there is no row to be displayed on a new table if ($cfg['DefaultTabTable'] === 'sql.php') { - require './tbl_structure.php'; + include './tbl_structure.php'; } else { - require './' . $cfg['DefaultTabTable']; + include './' . $cfg['DefaultTabTable']; } exit; } else { diff --git a/tbl_operations.php b/tbl_operations.php index 38ecc50..b2f8ab1 100644 --- a/tbl_operations.php +++ b/tbl_operations.php @@ -72,13 +72,13 @@ $table_alters = array(); */ if (isset($_REQUEST['submit_move']) || isset($_REQUEST['submit_copy'])) { $_message = ''; - require_once './tbl_move_copy.php'; + include_once './tbl_move_copy.php'; } /** * If the table has to be maintained */ if (isset($_REQUEST['table_maintenance'])) { - require_once './sql.php'; + include_once './sql.php'; unset($result); } /** @@ -211,7 +211,7 @@ if ($reread_info) { // a change, clear the cache PMA_Table::$cache = array(); $page_checksum = $checksum = $delay_key_write = 0; - require './libraries/tbl_info.inc.php'; + include './libraries/tbl_info.inc.php'; } unset($reread_info);
@@ -219,7 +219,7 @@ unset($reread_info); * Displays top menu links in non ajax requests */ if (!isset($_REQUEST['ajax_request'])) { - require_once './libraries/tbl_links.inc.php'; + 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 diff --git a/tbl_replace.php b/tbl_replace.php index bc9c27c..987fb0a 100644 --- a/tbl_replace.php +++ b/tbl_replace.php @@ -45,8 +45,8 @@ $GLOBALS['js_include'][] = 'sql.js'; if (isset($_REQUEST['insert_rows']) && is_numeric($_REQUEST['insert_rows']) && $_REQUEST['insert_rows'] != $cfg['InsertRows']) { $cfg['InsertRows'] = $_REQUEST['insert_rows']; $GLOBALS['js_include'][] = 'tbl_change.js'; - require_once './libraries/header.inc.php'; - require './tbl_change.php'; + include_once './libraries/header.inc.php'; + include './tbl_change.php'; exit; }
@@ -227,7 +227,7 @@ foreach ($loop_array as $rownumber => $where_clause) {
// Note: $key is an md5 of the fieldname. The actual fieldname is available in $me_fields_name[$key]
- require './libraries/tbl_replace_fields.inc.php'; + include './libraries/tbl_replace_fields.inc.php';
// for blobstreaming if ($blob_streaming_active) { @@ -344,9 +344,9 @@ if ($is_insert && count($value_sets) > 0) { $message = PMA_Message::success(__('No change')); $active_page = $goto_include; if (! $GLOBALS['is_ajax_request'] == true) { - require_once './libraries/header.inc.php'; + include_once './libraries/header.inc.php'; } - require './' . PMA_securePath($goto_include); + include './' . PMA_securePath($goto_include); exit; } unset($me_fields, $is_insertignore); @@ -442,7 +442,7 @@ if ($GLOBALS['is_ajax_request'] == true) {
if (isset($_REQUEST['rel_fields_list']) && $_REQUEST['rel_fields_list'] != '') { //handle relations work here for updated row. - require_once './libraries/relation.lib.php'; + include_once './libraries/relation.lib.php';
$map = PMA_getForeigners($db, $table, '', 'both');
@@ -509,7 +509,7 @@ if ($GLOBALS['is_ajax_request'] == true) { }
if (isset($_REQUEST['do_transformations']) && $_REQUEST['do_transformations'] == true ) { - require_once './libraries/transformations.lib.php'; + include_once './libraries/transformations.lib.php'; //if some posted fields need to be transformed, generate them here. $mime_map = PMA_getMIME($db, $table);
@@ -538,7 +538,7 @@ if ($GLOBALS['is_ajax_request'] == true) { if (file_exists('./libraries/transformations/' . $include_file)) { $transformfunction_name = str_replace('.inc.php', '', $transformation['transformation']);
- require_once './libraries/transformations/' . $include_file; + include_once './libraries/transformations/' . $include_file;
if (function_exists('PMA_transformation_' . $transformfunction_name)) { $transform_function = 'PMA_transformation_' . $transformfunction_name; diff --git a/tbl_row_action.php b/tbl_row_action.php index 6e9dde1..298fe7a 100644 --- a/tbl_row_action.php +++ b/tbl_row_action.php @@ -27,8 +27,8 @@ if (! PMA_isValid($_REQUEST['rows_to_delete'], 'array') && ! isset($_REQUEST['mult_btn'])) { $disp_message = __('No rows selected'); $disp_query = ''; - require './sql.php'; - require './libraries/footer.inc.php'; + include './sql.php'; + include './libraries/footer.inc.php'; }
if (isset($_REQUEST['submit_mult'])) { @@ -112,7 +112,7 @@ if (!empty($submit_mult)) { $original_url_query = $url_query; } } - require './libraries/mult_submits.inc.php'; + include './libraries/mult_submits.inc.php'; $_url_params = $GLOBALS['url_params']; $_url_params['goto'] = 'tbl_sql.php'; $url_query = PMA_generate_common_url($_url_params); @@ -140,12 +140,12 @@ if (!empty($submit_mult)) { unset($submit_mult, $_REQUEST['mult_btn']);
$active_page = 'sql.php'; - require './sql.php'; + include './sql.php';
/** * Displays the footer */ - require './libraries/footer.inc.php'; + include './libraries/footer.inc.php'; break; } } diff --git a/tbl_select.php b/tbl_select.php index 19ec4e4..8bb3b0e 100644 --- a/tbl_select.php +++ b/tbl_select.php @@ -33,19 +33,19 @@ $geom_types = PMA_getGISDatatypes(); */ if (! isset($param) || $param[0] == '') { // Gets some core libraries - require_once './libraries/tbl_common.php'; + include_once './libraries/tbl_common.php'; //$err_url = 'tbl_select.php' . $err_url; $url_query .= '&goto=tbl_select.php&back=tbl_select.php';
/** * Gets tables informations */ - require_once './libraries/tbl_info.inc.php'; + include_once './libraries/tbl_info.inc.php';
/** * Displays top menu links */ - require_once './libraries/tbl_links.inc.php'; + include_once './libraries/tbl_links.inc.php';
if (! isset($goto)) { $goto = $GLOBALS['cfg']['DefaultTabTable']; @@ -237,7 +237,7 @@ echo PMA_generate_html_tabs(PMA_tbl_getSubTabs(), $url_params, '', 'topmenu2'); </form> <div id="sqlqueryresults"></div> <?php - require './libraries/footer.inc.php'; + include './libraries/footer.inc.php'; ?>
</fieldset> @@ -295,7 +295,7 @@ echo PMA_generate_html_tabs(PMA_tbl_getSubTabs(), $url_params, '', 'topmenu2'); if ($orderField != '--nil--') { $sql_query .= ' ORDER BY ' . PMA_backquote($orderField) . ' ' . $order; } // end if - require './sql.php'; + include './sql.php'; }
?> diff --git a/tbl_structure.php b/tbl_structure.php index a0bec5d..79e6f05 100644 --- a/tbl_structure.php +++ b/tbl_structure.php @@ -62,13 +62,13 @@ if (! empty($submit_mult) && isset($_REQUEST['selected_fld'])) { // what is this htmlspecialchars() for?? //$sql_query .= ' FROM ' . PMA_backquote(htmlspecialchars($table)); $sql_query .= ' FROM ' . PMA_backquote($db) . '.' . PMA_backquote($table); - require './sql.php'; + include './sql.php'; exit; } else { // handle multiple field commands // handle confirmation of deleting multiple fields/columns $action = 'tbl_structure.php'; - require './libraries/mult_submits.inc.php'; + include './libraries/mult_submits.inc.php'; //require_once './libraries/header.inc.php'; //require_once './libraries/tbl_links.inc.php';
@@ -224,7 +224,7 @@ $comments_map = array(); $mime_map = array();
if ($GLOBALS['cfg']['ShowPropertyComments']) { - require_once './libraries/transformations.lib.php'; + include_once './libraries/transformations.lib.php';
//$cfgRelation = PMA_getRelationsParam();
@@ -681,7 +681,7 @@ if (! $tbl_is_view && ! $db_is_information_schema) { * links again */ if (count($fields) > 20) { - require './libraries/tbl_links.inc.php'; + include './libraries/tbl_links.inc.php'; } // end if (count($fields) > 20)
/** diff --git a/user_password.php b/user_password.php index 3ca3442..d5859b8 100644 --- a/user_password.php +++ b/user_password.php @@ -30,9 +30,9 @@ if (!$cfg['ShowChgPassword']) { $cfg['ShowChgPassword'] = PMA_DBI_select_db('mysql'); } if ($cfg['Server']['auth_type'] == 'config' || !$cfg['ShowChgPassword']) { - require_once './libraries/header.inc.php'; + include_once './libraries/header.inc.php'; PMA_Message::error(__('You don't have sufficient privileges to be here right now!'))->display(); - require './libraries/footer.inc.php'; + include './libraries/footer.inc.php'; } // end if
@@ -101,14 +101,14 @@ if (isset($_REQUEST['nopass'])) { }
// Displays the page - require_once './libraries/header.inc.php'; + include_once './libraries/header.inc.php'; echo '<h1>' . __('Change password') . '</h1>' . "\n\n"; PMA_showMessage($message, $sql_query, 'success'); ?> <a href="index.php<?php echo PMA_generate_common_url($_url_params); ?>" target="_parent"> <strong><?php echo __('Back'); ?></strong></a> <?php - require './libraries/footer.inc.php'; + include './libraries/footer.inc.php'; } // end if } // end if
hooks/post-receive