From 5617ff622eb41a3deb848ddc9f868a4d6d16886a Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Thu, 22 Aug 2002 14:22:47 +0000 Subject: [PATCH] Display .sql files only. --- ChangeLog | 1 + Documentation.html | 3 +-- db_details.php3 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 05ad25d29..33aad645d 100755 --- a/ChangeLog +++ b/ChangeLog @@ -15,6 +15,7 @@ $Source$ Backwards compatibility. * lang/malay-*.inc.php3, libraries/select_lang.lib.php3, translators.html: New language, thanks to "Shafique" (sicksand). + * db_details.php3, Documentation.html: Display .sql files only. 2002-08-21 Marc Delisle * db_details.php3, read_dump.php3, libraries/functions.js, lang/*, diff --git a/Documentation.html b/Documentation.html index 70cc45929..ddd15b1d6 100755 --- a/Documentation.html +++ b/Documentation.html @@ -1346,8 +1346,7 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://' Those files are available under a drop-down box when you click the database name, then the SQL tab.

- Avoid using './', because users would see the whole phpMyAdmin - directory, including the configuration file. + Please note that the file names must have the suffix ".sql".

This feature is useful when your file is too big to be uploaded via HTTP, or when file uploads are disabled in PHP. diff --git a/db_details.php3 b/db_details.php3 index 40f4437f9..382973726 100755 --- a/db_details.php3 +++ b/db_details.php3 @@ -111,7 +111,7 @@ echo "\n"; if ($cfg['UploadDir'] != '' && $handle = @opendir($cfg['UploadDir'])) { $is_first = 0; while ($file = @readdir($handle)) { - if (is_file($cfg['UploadDir'] . $file)) { + if (is_file($cfg['UploadDir'] . $file) && substr($file, -4) == '.sql') { if ($is_first == 0) { echo "\n"; echo ' ' . $strOr . ' ' . $strWebServerUploadDirectory . ' :
' . "\n";