From 5fe9f0f2596ec9da849e8cdf47fc2d76fac5f50c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 24 Nov 2005 08:42:20 +0000 Subject: [PATCH] Move db_details_{common,db_info,links}.php to libraries folder as it does not require direct access. --- ChangeLog | 11 ++--------- chk_rel.php | 2 +- db_details.php | 4 ++-- db_details_export.php | 10 +++++----- db_details_qbe.php | 4 ++-- db_details_structure.php | 4 ++-- db_import.php | 4 ++-- db_operations.php | 4 ++-- db_search.php | 4 ++-- header.inc.php | 2 +- .../db_details_common.inc.php | 0 .../db_details_db_info.inc.php | 2 +- .../db_details_links.inc.php | 0 libraries/mult_submits.inc.php | 4 ++-- pdf_pages.php | 2 +- server_privileges.php | 2 +- sql.php | 4 ++-- 17 files changed, 28 insertions(+), 35 deletions(-) rename db_details_common.php => libraries/db_details_common.inc.php (100%) rename db_details_db_info.php => libraries/db_details_db_info.inc.php (99%) rename db_details_links.php => libraries/db_details_links.inc.php (100%) diff --git a/ChangeLog b/ChangeLog index 04eb2cd07..16461c99f 100755 --- a/ChangeLog +++ b/ChangeLog @@ -8,15 +8,8 @@ $Source$ 2005-11-24 Michal Čihař * libraries/header_http.inc.php, libraries/header_meta_style.inc.php: Fix XSS on some libraries (CVE-2005-3665). - * db_details_structure.php, mult_submits.inc.php (deleted), - server_databases.php, - tbl_properties_structure.phptbl_properties_structure.php, - tbl_row_action.php, libraries/mult_submits.inc.php: Move - mult_submits.inc.php to libraries folder as it does not require direct - access. - * server_*, sql.php, libraries/server_common.inc.php, - libraries/server_links.inc.php: Move server_{links,common}.inc.php to - libraries folder as it does not require direct access. + * *.php, libraries/*.php: Move scritps that don't need direct access to + libraries folder. 2005-11-24 Sebastian Mendel * themes/original/*, css/phpmyadmin.css.php: diff --git a/chk_rel.php b/chk_rel.php index 691b05a10..2fde84e22 100644 --- a/chk_rel.php +++ b/chk_rel.php @@ -7,7 +7,7 @@ * Gets some core libraries */ require_once('./libraries/common.lib.php'); -require_once('./db_details_common.php'); +require_once('./libraries/db_details_common.inc.php'); require_once('./libraries/relation.lib.php'); diff --git a/db_details.php b/db_details.php index c25272803..ad83a9656 100644 --- a/db_details.php +++ b/db_details.php @@ -7,14 +7,14 @@ require_once('./libraries/common.lib.php'); /** * Runs common work */ -require('./db_details_common.php'); +require('./libraries/db_details_common.inc.php'); require_once './libraries/sql_query_form.lib.php'; /** * Gets informations about the database and, if it is empty, move to the * "db_details_structure.php" script where table can be created */ -require('./db_details_db_info.php'); +require('./libraries/db_details_db_info.inc.php'); if ( $num_tables == 0 && empty( $db_query_force ) ) { $sub_part = ''; $is_info = TRUE; diff --git a/db_details_export.php b/db_details_export.php index 2b567dc73..14ab1d531 100644 --- a/db_details_export.php +++ b/db_details_export.php @@ -4,10 +4,10 @@ /** * dumps a database * - * @uses db_details_common.php - * @uses db_details_db_info.php + * @uses libraries/db_details_common.inc.php + * @uses libraries/db_details_db_info.inc.php * @uses libraries/display_export.lib.php - * @uses $tables from db_details_db_info.php + * @uses $tables from libraries/db_details_db_info.inc.php */ /** @@ -16,9 +16,9 @@ require_once('./libraries/common.lib.php'); $sub_part = '_export'; -require_once('./db_details_common.php'); +require_once('./libraries/db_details_common.inc.php'); $url_query .= '&goto=db_details_export.php'; -require_once('./db_details_db_info.php'); +require_once('./libraries/db_details_db_info.inc.php'); /** * Displays the form diff --git a/db_details_qbe.php b/db_details_qbe.php index 5c100e2cf..a53880c97 100644 --- a/db_details_qbe.php +++ b/db_details_qbe.php @@ -27,9 +27,9 @@ if (isset($submit_sql) && preg_match('@^SELECT@i', $encoded_sql_query)) { exit(); } else { $sub_part = '_qbe'; - require('./db_details_common.php'); + require('./libraries/db_details_common.inc.php'); $url_query .= '&goto=db_details_qbe.php'; - require('./db_details_db_info.php'); + require('./libraries/db_details_db_info.inc.php'); } if (isset($submit_sql) && !preg_match('@^SELECT@i', $encoded_sql_query)) { diff --git a/db_details_structure.php b/db_details_structure.php index 1142f6150..7383797e5 100644 --- a/db_details_structure.php +++ b/db_details_structure.php @@ -17,12 +17,12 @@ if ( empty( $is_info ) ) { require('./libraries/mult_submits.inc.php'); $message = $strSuccess; } - require('./db_details_common.php'); + require('./libraries/db_details_common.inc.php'); $url_query .= '&goto=db_details_structure.php'; // Gets the database structure $sub_part = '_structure'; - require('./db_details_db_info.php'); + require('./libraries/db_details_db_info.inc.php'); } // 1. No tables diff --git a/db_import.php b/db_import.php index b94b6d86a..64707085e 100644 --- a/db_import.php +++ b/db_import.php @@ -7,8 +7,8 @@ require_once('./libraries/common.lib.php'); /** * Gets tables informations and displays top links */ -require('./db_details_common.php'); -require('./db_details_db_info.php'); +require('./libraries/db_details_common.inc.php'); +require('./libraries/db_details_db_info.inc.php'); $import_type = 'database'; require('./libraries/display_import.lib.php'); diff --git a/db_operations.php b/db_operations.php index cb18a83f0..2aa40a614 100644 --- a/db_operations.php +++ b/db_operations.php @@ -119,12 +119,12 @@ if ($cfgRelation['commwork'] && isset($db_comment) && $db_comment == 'true') { * because there is no table in the database ($is_info is TRUE) */ if (empty($is_info)) { - require('./db_details_common.php'); + require('./libraries/db_details_common.inc.php'); $url_query .= '&goto=db_operations.php'; // Gets the database structure $sub_part = '_structure'; - require('./db_details_db_info.php'); + require('./libraries/db_details_db_info.inc.php'); echo "\n"; } diff --git a/db_search.php b/db_search.php index fdc99d0c1..88829ab89 100644 --- a/db_search.php +++ b/db_search.php @@ -10,7 +10,7 @@ require_once('./libraries/common.lib.php'); /** * Gets some core libraries and send headers */ -require('./db_details_common.php'); +require('./libraries/db_details_common.inc.php'); // If config variable $cfg['Usedbsearch'] is on FALSE : exit. if (!$cfg['UseDbSearch']) { PMA_mysqlDie($strAccessDenied, '', FALSE, $err_url); @@ -29,7 +29,7 @@ $num_tables = count($tables); * Displays top links */ $sub_part = ''; -require('./db_details_links.php'); +require('./libraries/db_details_links.inc.php'); /** diff --git a/header.inc.php b/header.inc.php index d33497380..4fc404887 100644 --- a/header.inc.php +++ b/header.inc.php @@ -207,7 +207,7 @@ if (empty($GLOBALS['is_header_sent'])) { $cfgRelation = PMA_getRelationsParam(); // Get additional information about tables for tooltip is done - // in db_details_db_info.php only once + // in libraries/db_details_db_info.inc.php only once if ($cfgRelation['commwork']) { $comment = PMA_getComments( $GLOBALS['db'] ); diff --git a/db_details_common.php b/libraries/db_details_common.inc.php similarity index 100% rename from db_details_common.php rename to libraries/db_details_common.inc.php diff --git a/db_details_db_info.php b/libraries/db_details_db_info.inc.php similarity index 99% rename from db_details_db_info.php rename to libraries/db_details_db_info.inc.php index aab024e03..cc78d3491 100644 --- a/db_details_db_info.php +++ b/libraries/db_details_db_info.inc.php @@ -134,5 +134,5 @@ $num_tables = count( $tables ); /** * Displays top menu links */ -require('./db_details_links.php'); +require('./libraries/db_details_links.inc.php'); ?> diff --git a/db_details_links.php b/libraries/db_details_links.inc.php similarity index 100% rename from db_details_links.php rename to libraries/db_details_links.inc.php diff --git a/libraries/mult_submits.inc.php b/libraries/mult_submits.inc.php index bc1f0bf36..30fb3f158 100644 --- a/libraries/mult_submits.inc.php +++ b/libraries/mult_submits.inc.php @@ -132,8 +132,8 @@ if ( !empty($submit_mult) && !empty($what)) { require('./tbl_properties_table_info.php'); } elseif (!empty($db)) { - require('./db_details_common.php'); - require('./db_details_db_info.php'); + require('./libraries/db_details_common.inc.php'); + require('./libraries/db_details_db_info.inc.php'); } // Builds the query $full_query = ''; diff --git a/pdf_pages.php b/pdf_pages.php index baa4c1f52..3f725d6c3 100644 --- a/pdf_pages.php +++ b/pdf_pages.php @@ -6,7 +6,7 @@ * Gets some core libraries */ require_once('./libraries/common.lib.php'); -require_once('./db_details_common.php'); +require_once('./libraries/db_details_common.inc.php'); /** diff --git a/server_privileges.php b/server_privileges.php index 97c18ec58..80cd6b0c3 100644 --- a/server_privileges.php +++ b/server_privileges.php @@ -1200,7 +1200,7 @@ if (isset($viewing_mode) && $viewing_mode == 'db') { // Gets the database structure $sub_part = '_structure'; - require('./db_details_db_info.php'); + require('./libraries/db_details_db_info.inc.php'); echo "\n"; } else { require('./libraries/server_links.inc.php'); diff --git a/sql.php b/sql.php index 57d347134..46470e329 100644 --- a/sql.php +++ b/sql.php @@ -695,8 +695,8 @@ else { require('./tbl_properties_links.php'); } elseif (!empty($db)) { - require('./db_details_common.php'); - require('./db_details_db_info.php'); + require('./libraries/db_details_common.inc.php'); + require('./libraries/db_details_db_info.inc.php'); } else { require('./libraries/server_common.inc.php');