Try a fix for bug #446982 (Dump files ignored with Windows server)

This commit is contained in:
Loïc Chapeaux
2001-08-08 16:58:44 +00:00
parent 3f9a9e7b12
commit 745fa627a3
2 changed files with 6 additions and 2 deletions

View File

@@ -48,7 +48,9 @@ if (!empty($id_bookmark)) {
*/
// Gets the query from a file if required
if ($sql_file != 'none') {
if (ereg('^php[0-9A-Za-z_.-]+$', basename($sql_file))) {
// loic1: php < 4.05 for windows seems not to list the regexp test
// if (ereg('^php[0-9A-Za-z_.-]+$', basename($sql_file))) {
if (file_exists($sql_file)) {
$sql_query = fread(fopen($sql_file, 'r'), filesize($sql_file));
if (get_magic_quotes_runtime() == 1) {
$sql_query = stripslashes($sql_query);