From b2fd866d87abe49b7003393004dcec8805125362 Mon Sep 17 00:00:00 2001 From: Jo Michael Date: Fri, 16 Mar 2012 23:11:57 +0100 Subject: Leading ./ paths for includes can be omitted, part 2 --- browse_foreigners.php | 10 ++++----- changelog.php | 2 +- chk_rel.php | 6 ++--- db_create.php | 16 +++++++------- db_datadict.php | 10 ++++----- db_events.php | 8 +++---- db_export.php | 12 +++++----- db_import.php | 10 ++++----- db_operations.php | 16 +++++++------- db_printview.php | 6 ++--- db_qbe.php | 12 +++++----- db_routines.php | 14 ++++++------ db_search.php | 8 +++---- db_sql.php | 12 +++++----- db_structure.php | 24 ++++++++++---------- db_tracking.php | 14 ++++++------ db_triggers.php | 8 +++---- enum_editor.php | 6 ++--- export.php | 52 +++++++++++++++++++++---------------------- file_echo.php | 2 +- gis_data_editor.php | 12 +++++----- import.php | 28 ++++++++++++------------ import_status.php | 4 ++-- index.php | 4 ++-- license.php | 2 +- main.php | 30 ++++++++++++------------- navigation.php | 20 ++++++++--------- phpinfo.php | 2 +- phpmyadmin.css.php | 4 ++-- pmd_display_field.php | 2 +- pmd_general.php | 8 +++---- pmd_pdf.php | 4 ++-- pmd_relation_new.php | 2 +- pmd_relation_upd.php | 2 +- pmd_save_pos.php | 2 +- prefs_forms.php | 22 +++++++++---------- prefs_manage.php | 32 +++++++++++++-------------- querywindow.php | 20 ++++++++--------- schema_edit.php | 24 ++++++++++---------- schema_export.php | 12 +++++----- server_binlog.php | 8 +++---- server_collations.php | 10 ++++----- server_databases.php | 16 +++++++------- server_engines.php | 10 ++++----- server_export.php | 8 +++---- server_import.php | 10 ++++----- server_plugins.php | 8 +++---- server_privileges.php | 18 +++++++-------- server_replication.php | 20 ++++++++--------- server_sql.php | 10 ++++----- server_status.php | 12 +++++----- server_synchronize.php | 10 ++++----- server_variables.php | 10 ++++----- show_config_errors.php | 2 +- sql.php | 56 +++++++++++++++++++++++------------------------ tbl_addfield.php | 18 +++++++-------- tbl_alter.php | 18 +++++++-------- tbl_change.php | 22 +++++++++---------- tbl_chart.php | 18 +++++++-------- tbl_create.php | 16 +++++++------- tbl_export.php | 12 +++++----- tbl_get_field.php | 4 ++-- tbl_gis_visualization.php | 10 ++++----- tbl_import.php | 12 +++++----- tbl_indexes.php | 14 ++++++------ tbl_move_copy.php | 2 +- tbl_operations.php | 22 +++++++++---------- tbl_printview.php | 14 ++++++------ tbl_relation.php | 10 ++++----- tbl_replace.php | 24 ++++++++++---------- tbl_row_action.php | 18 +++++++-------- tbl_select.php | 16 +++++++------- tbl_sql.php | 12 +++++----- tbl_structure.php | 26 +++++++++++----------- 74 files changed, 490 insertions(+), 490 deletions(-) diff --git a/browse_foreigners.php b/browse_foreigners.php index 54b0ab702c..d8016857b7 100644 --- a/browse_foreigners.php +++ b/browse_foreigners.php @@ -9,19 +9,19 @@ /** * Gets a core script and starts output buffering work */ -require_once './libraries/common.inc.php'; +require_once 'libraries/common.inc.php'; PMA_checkParameters(array('db', 'table', 'field')); -require_once './libraries/ob.lib.php'; +require_once 'libraries/ob.lib.php'; PMA_outBufferPre(); -require_once './libraries/header_http.inc.php'; +require_once 'libraries/header_http.inc.php'; /** * Displays the frame */ -require_once './libraries/transformations.lib.php'; // Transformations +require_once 'libraries/transformations.lib.php'; // Transformations $cfgRelation = PMA_getRelationsParam(); $foreigners = ($cfgRelation['relwork'] ? PMA_getForeigners($db, $table) : false); @@ -85,7 +85,7 @@ if (is_array($foreignData['disp_row'])) { href="phpmyadmin.css.php?&js_frame=right&nocache=getThemeUniqueValue(); ?>" /> diff --git a/file_echo.php b/file_echo.php index d3391fcbc0..d3f7f4a6e2 100644 --- a/file_echo.php +++ b/file_echo.php @@ -7,7 +7,7 @@ * @package PhpMyAdmin */ -require_once './libraries/common.inc.php'; +require_once 'libraries/common.inc.php'; /* For chart exporting */ if (isset($_REQUEST['filename']) && isset($_REQUEST['image'])) { diff --git a/gis_data_editor.php b/gis_data_editor.php index 6fb2436bb6..18cb6e0dca 100644 --- a/gis_data_editor.php +++ b/gis_data_editor.php @@ -1,11 +1,11 @@ diff --git a/import.php b/import.php index 95561557a1..7179fd093b 100644 --- a/import.php +++ b/import.php @@ -9,8 +9,8 @@ /** * Get the variables sent or posted to this script and a core script */ -require_once './libraries/common.inc.php'; -//require_once './libraries/display_import_functions.lib.php'; +require_once 'libraries/common.inc.php'; +//require_once 'libraries/display_import_functions.lib.php'; if (isset($_REQUEST['show_as_php'])) { $GLOBALS['show_as_php'] = $_REQUEST['show_as_php']; @@ -82,7 +82,7 @@ if (!empty($sql_query)) { // upload limit has been reached, let's assume the second possibility. ; if ($_POST == array() && $_GET == array()) { - include_once './libraries/header.inc.php'; + include_once 'libraries/header.inc.php'; $message = PMA_Message::error(__('You probably tried to upload too large file. Please refer to %sdocumentation%s for ways to workaround this limit.')); $message->addParam('[a@./Documentation.html#faq1_16@_blank]'); $message->addParam('[/a]'); @@ -92,7 +92,7 @@ if ($_POST == array() && $_GET == array()) { $_SESSION['Import_message']['go_back_url'] = $goto; $message->display(); - include './libraries/footer.inc.php'; + include 'libraries/footer.inc.php'; } /** @@ -119,7 +119,7 @@ PMA_checkParameters(array('import_type', 'format')); $format = PMA_securePath($format); // Import functions -require_once './libraries/import.lib.php'; +require_once 'libraries/import.lib.php'; // Create error and goto url if ($import_type == 'table') { @@ -194,7 +194,7 @@ $bookmark_created = false; // Bookmark Support: get a query back from bookmark if required if (!empty($id_bookmark)) { $id_bookmark = (int)$id_bookmark; - include_once './libraries/bookmark.lib.php'; + include_once 'libraries/bookmark.lib.php'; switch ($action_bookmark) { case 0: // bookmarked query that have to be run $import_text = PMA_Bookmark_get($db, $id_bookmark, 'id', isset($action_bookmark_all)); @@ -243,7 +243,7 @@ if (isset($GLOBALS['show_as_php'])) { // Store the query as a bookmark before executing it if bookmarklabel was given if (!empty($bkm_label) && !empty($import_text)) { - include_once './libraries/bookmark.lib.php'; + include_once 'libraries/bookmark.lib.php'; $bfields = array( 'dbase' => $db, 'user' => $cfg['Bookmark']['user'], @@ -316,7 +316,7 @@ if ($import_file != 'none' && !$error) { if (!empty($open_basedir)) { - $tmp_subdir = (PMA_IS_WINDOWS ? '.\\tmp\\' : './tmp/'); + $tmp_subdir = (PMA_IS_WINDOWS ? '.\\tmp\\' : 'tmp/'); if (is_writable($tmp_subdir)) { @@ -364,7 +364,7 @@ if ($import_file != 'none' && !$error) { /** * Load interface for zip extension. */ - include_once './libraries/zip_extension.lib.php'; + include_once 'libraries/zip_extension.lib.php'; $result = PMA_getZipContents($import_file); if (! empty($result['error'])) { $message = PMA_Message::rawError($result['error']); @@ -434,13 +434,13 @@ if (!$error && isset($skip)) { if (!$error) { // Check for file existance - if (!file_exists('./libraries/import/' . $format . '.php')) { + if (!file_exists('libraries/import/' . $format . '.php')) { $error = true; $message = PMA_Message::error(__('Could not load import plugins, please check your installation!')); } else { // Do the real import $plugin_param = $import_type; - include './libraries/import/' . $format . '.php'; + include 'libraries/import/' . $format . '.php'; } } @@ -504,7 +504,7 @@ if (isset($message)) { // (but if the query is too large, in case of an imported file, the parser // can choke on it so avoid parsing) if (strlen($sql_query) <= $GLOBALS['cfg']['MaxCharactersInDisplayedSQL']) { - include_once './libraries/parse_analyze.lib.php'; + include_once 'libraries/parse_analyze.lib.php'; } // There was an error? @@ -524,10 +524,10 @@ if (! empty($last_query_with_results)) { } if ($go_sql) { - include './sql.php'; + include 'sql.php'; } else { $active_page = $goto; - include './' . $goto; + include '' . $goto; } exit(); ?> diff --git a/import_status.php b/import_status.php index 1f0e0015a7..e1db636ca6 100644 --- a/import_status.php +++ b/import_status.php @@ -5,8 +5,8 @@ * @package PhpMyAdmin */ -require_once './libraries/common.inc.php'; -require_once './libraries/display_import_ajax.lib.php'; +require_once 'libraries/common.inc.php'; +require_once 'libraries/display_import_ajax.lib.php'; /** * Sets globals from $_GET diff --git a/index.php b/index.php index 62169b763f..9b6ab8a3af 100644 --- a/index.php +++ b/index.php @@ -10,7 +10,7 @@ /** * Gets core libraries and defines some variables */ -require_once './libraries/common.inc.php'; +require_once 'libraries/common.inc.php'; // free the session file, for the other frames to be loaded session_write_close(); @@ -69,7 +69,7 @@ $lang_iso_code = $GLOBALS['available_languages'][$GLOBALS['lang']][1]; // start output -require './libraries/header_http.inc.php'; +require 'libraries/header_http.inc.php'; ?> diff --git a/license.php b/license.php index b9a9ec8fbf..d076cae49f 100644 --- a/license.php +++ b/license.php @@ -12,7 +12,7 @@ /** * Gets core libraries and defines some variables */ -require './libraries/common.inc.php'; +require 'libraries/common.inc.php'; /** * diff --git a/main.php b/main.php index e918482085..a77d8d997e 100644 --- a/main.php +++ b/main.php @@ -8,7 +8,7 @@ /** * Gets some core libraries and displays a top message if required */ -require_once './libraries/common.inc.php'; +require_once 'libraries/common.inc.php'; $GLOBALS['js_include'][] = 'jquery/jquery-ui-1.8.16.custom.js'; $GLOBALS['js_include'][] = 'jquery/jquery.sprintf.js'; @@ -17,7 +17,7 @@ $GLOBALS['js_include'][] = 'jquery/jquery.sprintf.js'; $GLOBALS['db'] = ''; $GLOBALS['table'] = ''; $show_query = '1'; -require_once './libraries/header.inc.php'; +require_once 'libraries/header.inc.php'; // Any message to display? if (! empty($message)) { @@ -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) { - include './libraries/server_common.inc.php'; - include './libraries/StorageEngine.class.php'; - include './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 '
  • '; - include_once './libraries/select_server.lib.php'; + include_once 'libraries/select_server.lib.php'; PMA_select_server(true, true); echo '
  • '; } @@ -80,7 +80,7 @@ if ($server > 0 * Displays the mysql server related links */ if ($server > 0 && !PMA_DRIZZLE) { - include_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') { @@ -93,7 +93,7 @@ if ($server > 0 PMA_printListItem( __('Change password'), 'li_change_password', - './user_password.php?' . $common_url_query, + 'user_password.php?' . $common_url_query, null, null, 'change_password_anchor', @@ -127,7 +127,7 @@ echo ' '; } @@ -218,7 +218,7 @@ if ($GLOBALS['cfg']['ShowServerInfo'] || $GLOBALS['cfg']['ShowPhpInfo']) { } if ($cfg['ShowPhpInfo']) { - PMA_printListItem(__('Show PHP information'), 'li_phpinfo', './phpinfo.php?' . $common_url_query); + PMA_printListItem(__('Show PHP information'), 'li_phpinfo', 'phpinfo.php?' . $common_url_query); } echo ' '; echo ' '; @@ -312,7 +312,7 @@ if (!empty($_SESSION['auto_blowfish_secret']) && * Check for existence of config directory which should not exist in * production environment. */ -if (file_exists('./config')) { +if (file_exists('config')) { trigger_error(__('Directory [code]config[/code], which is used by the setup script, still exists in your phpMyAdmin directory. You should remove it once phpMyAdmin has been configured.'), E_USER_WARNING); } @@ -398,8 +398,8 @@ if (!function_exists('mcrypt_encrypt') && !$GLOBALS['cfg']['McryptDisableWarning * * The data file is created while creating release by ./scripts/remove-incomplete-mo */ -if (file_exists('./libraries/language_stats.inc.php')) { - include './libraries/language_stats.inc.php'; +if (file_exists('libraries/language_stats.inc.php')) { + include 'libraries/language_stats.inc.php'; /* * This message is intentionally not translated, because we're * handling incomplete translations here and focus on english @@ -457,5 +457,5 @@ function PMA_printListItem($name, $id = null, $url = null, $mysql_help_page = nu /** * Displays the footer */ -require './libraries/footer.inc.php'; +require 'libraries/footer.inc.php'; ?> diff --git a/navigation.php b/navigation.php index 34b279f20d..9b809db697 100644 --- a/navigation.php +++ b/navigation.php @@ -9,7 +9,7 @@ /** * Gets a core script and starts output buffering work */ -require_once './libraries/common.inc.php'; +require_once 'libraries/common.inc.php'; /** * finish and cleanup navigation.php script execution, only to be used in navigation.php @@ -22,8 +22,8 @@ function PMA_exitNavigationFrame() exit; } -require_once './libraries/common.lib.php'; -require_once './libraries/RecentTable.class.php'; +require_once 'libraries/common.lib.php'; +require_once 'libraries/RecentTable.class.php'; /** * Check if it is an ajax request to reload the recent tables list. @@ -58,7 +58,7 @@ if (empty($_SESSION['debug'])) { /** * the output compression library */ -require_once './libraries/ob.lib.php'; +require_once 'libraries/ob.lib.php'; PMA_outBufferPre(); @@ -80,7 +80,7 @@ $cfgRelation = PMA_getRelationsParam(); * For re-usability, moved http-headers to a seperate file. * It can now be included by libraries/header.inc.php, querywindow.php. */ -require_once './libraries/header_http.inc.php'; +require_once 'libraries/header_http.inc.php'; /* * Displays the frame @@ -158,7 +158,7 @@ require_once './libraries/header_http.inc.php'; 0) { @@ -405,8 +405,8 @@ function PMA_displayDbList($ext_dblist, $offset, $count) title="" onclick=" if (! toggle('', true)) - window.parent.goTo('./navigation.php?'); - window.parent.goTo('./'); + window.parent.goTo('', 'main'); return false;"> ', true)) - window.parent.goTo('./navigation.php?'); - window.parent.goTo('./'); + window.parent.goTo('', 'main'); return false;"> $GLOBALS['lang']); if (isset($GLOBALS['db'])) { $params['db'] = $GLOBALS['db']; } -require_once './libraries/header_scripts.inc.php'; +require_once 'libraries/header_scripts.inc.php'; ?>