coding standards
This commit is contained in:
@@ -10,6 +10,7 @@ $Source$
|
|||||||
* tbl_change.php3:
|
* tbl_change.php3:
|
||||||
- beautify javascript code;
|
- beautify javascript code;
|
||||||
- line 363: fixed a js bug.
|
- line 363: fixed a js bug.
|
||||||
|
* read_dump.php3: coding standards (ident. = 4 space characters).
|
||||||
|
|
||||||
2002-01-18 Marc Delisle <lem9@users.sourceforge.net>
|
2002-01-18 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* Documentation.html, new download location for the RedHat PHP package,
|
* Documentation.html, new download location for the RedHat PHP package,
|
||||||
|
@@ -223,16 +223,17 @@ if (!empty($id_bookmark)) {
|
|||||||
if ($sql_file != 'none') {
|
if ($sql_file != 'none') {
|
||||||
if (file_exists($sql_file) && is_uploaded_file($sql_file)) {
|
if (file_exists($sql_file) && is_uploaded_file($sql_file)) {
|
||||||
|
|
||||||
|
$open_basedir = '';
|
||||||
if (PMA_PHP_INT_VERSION >= 40000 ) {
|
if (PMA_PHP_INT_VERSION >= 40000 ) {
|
||||||
$open_basedir = @ini_get('open_basedir');
|
$open_basedir = @ini_get('open_basedir');
|
||||||
}
|
}
|
||||||
if (PMA_PHP_INT_VERSION < 40000 ) {
|
if (empty($open_basedir)) {
|
||||||
$open_basedir = @get_cfg_var('open_basedir');
|
$open_basedir = @get_cfg_var('open_basedir');
|
||||||
}
|
}
|
||||||
|
|
||||||
// if we are on a server with open_basedir, we must move
|
// If we are on a server with open_basedir, we must move the file
|
||||||
// the file before opening it. The doc explains how
|
// before opening it. The doc explains how to create the "./tmp"
|
||||||
// to create the ./tmp directory
|
// directory
|
||||||
|
|
||||||
if (!empty($open_basedir)) {
|
if (!empty($open_basedir)) {
|
||||||
// check if '.' is in open_basedir
|
// check if '.' is in open_basedir
|
||||||
@@ -241,8 +242,8 @@ if ($sql_file != 'none') {
|
|||||||
// from the PHP annotated manual
|
// from the PHP annotated manual
|
||||||
if ( (PMA_PHP_INT_VERSION < 40000 && is_integer($pos) && !$pos)
|
if ( (PMA_PHP_INT_VERSION < 40000 && is_integer($pos) && !$pos)
|
||||||
|| (PMA_PHP_INT_VERSION >= 40000 && $pos === false) ) {
|
|| (PMA_PHP_INT_VERSION >= 40000 && $pos === false) ) {
|
||||||
// if no '.' in openbasedir, do not move the file,
|
// if no '.' in openbasedir, do not move the file, force the
|
||||||
// force the error and let PHP report it
|
// error and let PHP report it
|
||||||
error_reporting(E_ALL);
|
error_reporting(E_ALL);
|
||||||
$sql_query = fread(fopen($sql_file, 'r'), filesize($sql_file));
|
$sql_query = fread(fopen($sql_file, 'r'), filesize($sql_file));
|
||||||
}
|
}
|
||||||
@@ -250,14 +251,12 @@ if ($sql_file != 'none') {
|
|||||||
$sql_file_new = './tmp/' . basename($sql_file);
|
$sql_file_new = './tmp/' . 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 {
|
|
||||||
move_uploaded_file($sql_file, $sql_file_new);
|
move_uploaded_file($sql_file, $sql_file_new);
|
||||||
}
|
}
|
||||||
$sql_query = fread(fopen($sql_file_new, 'r'), filesize($sql_file_new));
|
$sql_query = fread(fopen($sql_file_new, 'r'), filesize($sql_file_new));
|
||||||
unlink($sql_file_new);
|
unlink($sql_file_new);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// read from the normal upload dir
|
// read from the normal upload dir
|
||||||
|
Reference in New Issue
Block a user