From 745fa627a33d2deb937c1783d4edf4a892c029a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Chapeaux?= Date: Wed, 8 Aug 2001 16:58:44 +0000 Subject: [PATCH] Try a fix for bug #446982 (Dump files ignored with Windows server) --- ChangeLog | 4 +++- db_readdump.php3 | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 354977511..6c81ec76e 100755 --- a/ChangeLog +++ b/ChangeLog @@ -8,7 +8,7 @@ $Source$ 2001-08-08 Olivier Müller * new script create-release.sh * moved scripts to a new subdirectory "scripts/" - + 2001-08-08 Loïc Chapeaux * tbl_replace.php3: fixed some coding style inconcistencies and optimized a bit both the '$set$' switch cases. @@ -19,6 +19,8 @@ $Source$ - merged patch #443393. * tbl_select.php3, lang/*: applied patch #443230 (Display order in tbl_select.php3). + * db_readdump.php3, lines 51-53: try a fix for bug #446982 (Dump files + ignored with Windows server). 2001-08-08 Steve Alberty * tbl_replace.php3: remove warning in a new row if a 'set' field is not diff --git a/db_readdump.php3 b/db_readdump.php3 index 21ff35769..7130b5c7b 100755 --- a/db_readdump.php3 +++ b/db_readdump.php3 @@ -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);