Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Čihař <mcihar@novell.com>2011-06-06 13:55:09 +0400
committerMichal Čihař <mcihar@novell.com>2011-06-06 13:55:09 +0400
commit3cf4830bbb94ce8fe7078f4a3f4fbac1c6253a8c (patch)
tree0584a0070c168ee3c9b44bca92f86dcbd4542091 /import.php
parent8b0fc6073a71097852e1330508cc20e8995ff5ae (diff)
Replace TRUE/FALSE with true/false.
At least this seems to be the coding standard, so make all files compliant.
Diffstat (limited to 'import.php')
-rw-r--r--import.php62
1 files changed, 31 insertions, 31 deletions
diff --git a/import.php b/import.php
index 8837af2fac..cd56bc2c37 100644
--- a/import.php
+++ b/import.php
@@ -130,21 +130,21 @@ if (isset($allow_interrupt)) {
}
// set default values
-$timeout_passed = FALSE;
-$error = FALSE;
+$timeout_passed = false;
+$error = false;
$read_multiply = 1;
-$finished = FALSE;
+$finished = false;
$offset = 0;
$max_sql_len = 0;
$file_to_unlink = '';
$sql_query = '';
-$sql_query_disabled = FALSE;
-$go_sql = FALSE;
+$sql_query_disabled = false;
+$go_sql = false;
$executed_queries = 0;
-$run_query = TRUE;
-$charset_conversion = FALSE;
-$reset_charset = FALSE;
-$bookmark_created = FALSE;
+$run_query = true;
+$charset_conversion = false;
+$reset_charset = false;
+$bookmark_created = false;
// Bookmark Support: get a query back from bookmark if required
if (!empty($id_bookmark)) {
@@ -165,21 +165,21 @@ if (!empty($id_bookmark)) {
break;
case 1: // bookmarked query that have to be displayed
$import_text = PMA_Bookmark_get($db, $id_bookmark);
- $run_query = FALSE;
+ $run_query = false;
break;
case 2: // bookmarked query that have to be deleted
$import_text = PMA_Bookmark_get($db, $id_bookmark);
PMA_Bookmark_delete($db, $id_bookmark);
- $run_query = FALSE;
- $error = TRUE; // this is kind of hack to skip processing the query
+ $run_query = false;
+ $error = true; // this is kind of hack to skip processing the query
break;
}
} // end bookmarks reading
// Do no run query if we show PHP code
if (isset($GLOBALS['show_as_php'])) {
- $run_query = FALSE;
- $go_sql = TRUE;
+ $run_query = false;
+ $go_sql = true;
}
// Store the query as a bookmark before executing it if bookmarklabel was given
@@ -204,7 +204,7 @@ if (!empty($bkm_label) && !empty($import_text)) {
PMA_Bookmark_save($bfields, isset($bkm_all_users));
- $bookmark_created = TRUE;
+ $bookmark_created = true;
} // end store bookmarks
// We can not read all at once, otherwise we can run out of memory
@@ -274,9 +274,9 @@ if ($import_file != 'none' && !$error) {
* @todo duplicate code exists in File.class.php
*/
$compression = PMA_detectCompression($import_file);
- if ($compression === FALSE) {
+ if ($compression === false) {
$message = PMA_Message::error(__('File could not be read'));
- $error = TRUE;
+ $error = true;
} else {
switch ($compression) {
case 'application/bzip2':
@@ -285,7 +285,7 @@ if ($import_file != 'none' && !$error) {
} else {
$message = PMA_Message::error(__('You attempted to load file with unsupported compression (%s). Either support for it is not implemented or disabled by your configuration.'));
$message->addParam($compression);
- $error = TRUE;
+ $error = true;
}
break;
case 'application/gzip':
@@ -294,7 +294,7 @@ if ($import_file != 'none' && !$error) {
} else {
$message = PMA_Message::error(__('You attempted to load file with unsupported compression (%s). Either support for it is not implemented or disabled by your configuration.'));
$message->addParam($compression);
- $error = TRUE;
+ $error = true;
}
break;
case 'application/zip':
@@ -306,14 +306,14 @@ if ($import_file != 'none' && !$error) {
$result = PMA_getZipContents($import_file);
if (! empty($result['error'])) {
$message = PMA_Message::rawError($result['error']);
- $error = TRUE;
+ $error = true;
} else {
$import_text = $result['data'];
}
} else {
$message = PMA_Message::error(__('You attempted to load file with unsupported compression (%s). Either support for it is not implemented or disabled by your configuration.'));
$message->addParam($compression);
- $error = TRUE;
+ $error = true;
}
break;
case 'none':
@@ -322,19 +322,19 @@ if ($import_file != 'none' && !$error) {
default:
$message = PMA_Message::error(__('You attempted to load file with unsupported compression (%s). Either support for it is not implemented or disabled by your configuration.'));
$message->addParam($compression);
- $error = TRUE;
+ $error = true;
break;
}
}
// use isset() because zip compression type does not use a handle
- if (!$error && isset($import_handle) && $import_handle === FALSE) {
+ if (!$error && isset($import_handle) && $import_handle === false) {
$message = PMA_Message::error(__('File could not be read'));
- $error = TRUE;
+ $error = true;
}
} elseif (!$error) {
if (! isset($import_text) || empty($import_text)) {
$message = PMA_Message::error(__('No data was received to import. Either no file name was submitted, or the file size exceeded the maximum size permitted by your PHP configuration. See [a@./Documentation.html#faq1_16@Documentation]FAQ 1.16[/a].'));
- $error = TRUE;
+ $error = true;
}
}
@@ -344,13 +344,13 @@ if ($import_file != 'none' && !$error) {
// Convert the file's charset if necessary
if ($GLOBALS['PMA_recoding_engine'] != PMA_CHARSET_NONE && isset($charset_of_file)) {
if ($charset_of_file != 'utf-8') {
- $charset_conversion = TRUE;
+ $charset_conversion = true;
}
} elseif (isset($charset_of_file) && $charset_of_file != 'utf8') {
PMA_DBI_query('SET NAMES \'' . $charset_of_file . '\'');
// We can not show query in this case, it is in different charset
- $sql_query_disabled = TRUE;
- $reset_charset = TRUE;
+ $sql_query_disabled = true;
+ $reset_charset = true;
}
// Something to skip?
@@ -367,7 +367,7 @@ if (!$error && isset($skip)) {
if (!$error) {
// Check for file existance
if (!file_exists('./libraries/import/' . $format . '.php')) {
- $error = TRUE;
+ $error = true;
$message = PMA_Message::error(__('Could not load import plugins, please check your installation!'));
} else {
// Do the real import
@@ -376,7 +376,7 @@ if (!$error) {
}
}
-if (! $error && FALSE !== $import_handle && NULL !== $import_handle) {
+if (! $error && false !== $import_handle && NULL !== $import_handle) {
fclose($import_handle);
}
@@ -395,7 +395,7 @@ if ($reset_charset) {
if (!empty($id_bookmark) && $action_bookmark == 2) {
$message = PMA_Message::success(__('The bookmark has been deleted.'));
$display_query = $import_text;
- $error = FALSE; // unset error marker, it was used just to skip processing
+ $error = false; // unset error marker, it was used just to skip processing
} elseif (!empty($id_bookmark) && $action_bookmark == 1) {
$message = PMA_Message::notice(__('Showing bookmark'));
} elseif ($bookmark_created) {