bug 634074
This commit is contained in:
@@ -7,6 +7,8 @@ $Source$
|
|||||||
|
|
||||||
2002-11-23 Marc Delisle <lem9@users.sourceforge.net>
|
2002-11-23 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* libraries/display_tbl.lib.php3: clicking on a COUNT() column to sort
|
* libraries/display_tbl.lib.php3: clicking on a COUNT() column to sort
|
||||||
|
* read_dump.php3: bug 634074: we now use is_writeable() on the tmp
|
||||||
|
subdir, instead of looking for a dot in the open_basedir path
|
||||||
|
|
||||||
2002-11-22 Marc Delisle <lem9@users.sourceforge.net>
|
2002-11-22 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* libraries/display_tbl.lib.php3: numeric foreign keys used as alias
|
* libraries/display_tbl.lib.php3: numeric foreign keys used as alias
|
||||||
|
@@ -300,21 +300,17 @@ if ($sql_file != 'none') {
|
|||||||
// directory
|
// directory
|
||||||
|
|
||||||
if (!empty($open_basedir)) {
|
if (!empty($open_basedir)) {
|
||||||
// check if '.' is in open_basedir
|
|
||||||
$split_char = (PMA_IS_WINDOWS ? ';' : ':');
|
|
||||||
$pos = ereg('(^|' . $split_char . ')\\.(' . $split_char . '|$)', $open_basedir);
|
|
||||||
|
|
||||||
// from the PHP annotated manual
|
$tmp_subdir = (PMA_IS_WINDOWS ? '.\\tmp\\' : './tmp/');
|
||||||
if (!$pos) {
|
|
||||||
// if no '.' in openbasedir, do not move the file (open_basedir
|
// function is_writeable() is valid on PHP3 and 4
|
||||||
// may only be a prefix), force the error and let PHP reports
|
if (!is_writeable($tmp_subdir)) {
|
||||||
// it
|
// if we cannot move the file, let PHP report the error
|
||||||
error_reporting(E_ALL);
|
error_reporting(E_ALL);
|
||||||
$sql_query = PMA_readFile($sql_file, $sql_file_compression);
|
$sql_query = PMA_readFile($sql_file, $sql_file_compression);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$sql_file_new = (PMA_IS_WINDOWS ? '.\\tmp\\' : './tmp/')
|
$sql_file_new = $tmp_subdir . basename($sql_file);
|
||||||
. basename($sql_file);
|
|
||||||
if (PMA_PHP_INT_VERSION < 40003) {
|
if (PMA_PHP_INT_VERSION < 40003) {
|
||||||
copy($sql_file, $sql_file_new);
|
copy($sql_file, $sql_file_new);
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user