[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_2RC1-3152-g3cf4830
Michal Čihař
nijel at users.sourceforge.net
Mon Jun 6 11:55:48 CEST 2011
The branch, master has been updated
via 3cf4830bbb94ce8fe7078f4a3f4fbac1c6253a8c (commit)
from 8b0fc6073a71097852e1330508cc20e8995ff5ae (commit)
- Log -----------------------------------------------------------------
commit 3cf4830bbb94ce8fe7078f4a3f4fbac1c6253a8c
Author: Michal Čihař <mcihar at novell.com>
Date: Mon Jun 6 11:55:09 2011 +0200
Replace TRUE/FALSE with true/false.
At least this seems to be the coding standard, so make all files
compliant.
-----------------------------------------------------------------------
Summary of changes:
browse_foreigners.php | 6 +-
bs_disp_as_mime_type.php | 4 +-
chk_rel.php | 2 +-
db_create.php | 2 +-
db_datadict.php | 6 +-
db_sql.php | 2 +-
db_structure.php | 2 +-
import.php | 62 ++--
libraries/File.class.php | 12 +-
libraries/StorageEngine.class.php | 2 +-
libraries/Theme_Manager.class.php | 2 +-
libraries/Tracker.class.php | 4 +-
libraries/auth/config.auth.lib.php | 12 +-
libraries/auth/swekey/swekey.php | 2 +-
libraries/blobstreaming.lib.php | 116 ++++----
libraries/bookmark.lib.php | 4 +-
libraries/chart/pma_pchart_chart.php | 6 +-
libraries/chart/pma_pchart_multi_line.php | 2 +-
libraries/chart/pma_pchart_multi_radar.php | 4 +-
libraries/chart/pma_pchart_pie.php | 4 +-
libraries/chart/pma_pchart_single_line.php | 2 +-
libraries/chart/pma_pchart_single_radar.php | 4 +-
libraries/common.inc.php | 2 +-
libraries/common.lib.php | 4 +-
libraries/config.default.php | 2 +-
libraries/core.lib.php | 2 +-
libraries/database_interface.lib.php | 8 +-
libraries/dbi/mysql.dbi.lib.php | 2 +-
libraries/dbi/mysqli.dbi.lib.php | 2 +-
libraries/display_create_database.lib.php | 2 +-
libraries/display_import.lib.php | 2 +-
libraries/display_select_lang.lib.php | 2 +-
libraries/display_tbl.lib.php | 14 +-
libraries/export/codegen.php | 12 +-
libraries/export/csv.php | 18 +-
libraries/export/htmlword.php | 32 +-
libraries/export/json.php | 2 +-
libraries/export/latex.php | 34 ++--
libraries/export/mediawiki.php | 12 +-
libraries/export/ods.php | 16 +-
libraries/export/odt.php | 24 +-
libraries/export/pdf.php | 16 +-
libraries/export/php_array.php | 2 +-
libraries/export/sql.php | 40 ++--
libraries/export/texytext.php | 26 +-
libraries/export/xls.php | 16 +-
libraries/export/xlsx.php | 16 +-
libraries/export/xml.php | 12 +-
libraries/export/yaml.php | 2 +-
libraries/file_listing.php | 10 +-
libraries/header_printview.inc.php | 2 +-
libraries/iconv_wrapper.lib.php | 4 +-
libraries/import.lib.php | 38 ++--
libraries/import/README | 4 +-
libraries/import/csv.php | 58 ++--
libraries/import/docsql.php | 6 +-
libraries/import/ldi.php | 10 +-
libraries/import/ods.php | 8 +-
libraries/import/sql.php | 26 +-
libraries/import/xml.php | 6 +-
libraries/kanji-encoding.lib.php | 4 +-
libraries/mult_submits.inc.php | 18 +-
libraries/mysql_charsets.lib.php | 6 +-
libraries/navigation_header.inc.php | 2 +-
libraries/relation.lib.php | 16 +-
libraries/schema/Dia_Relation_Schema.class.php | 4 +-
libraries/schema/Eps_Relation_Schema.class.php | 2 +-
libraries/schema/Pdf_Relation_Schema.class.php | 2 +-
libraries/schema/Svg_Relation_Schema.class.php | 4 +-
libraries/schema/User_Schema.class.php | 28 +-
libraries/schema/Visio_Relation_Schema.class.php | 4 +-
libraries/select_lang.lib.php | 6 +-
libraries/server_links.inc.php | 2 +-
libraries/sql_query_form.lib.php | 6 +-
libraries/sqlparser.lib.php | 320 +++++++++++-----------
libraries/sqlvalidator.class.php | 6 +-
libraries/sqlvalidator.lib.php | 4 +-
libraries/zip_extension.lib.php | 2 +-
pmd_pdf.php | 4 +-
pmd_relation_upd.php | 2 +-
server_privileges.php | 42 ++--
setup/lib/common.inc.php | 4 +-
sql.php | 4 +-
tbl_change.php | 24 +-
tbl_relation.php | 16 +-
tbl_row_action.php | 2 +-
86 files changed, 645 insertions(+), 645 deletions(-)
diff --git a/browse_foreigners.php b/browse_foreigners.php
index 16fa48c..0b10484 100644
--- a/browse_foreigners.php
+++ b/browse_foreigners.php
@@ -23,9 +23,9 @@ require_once './libraries/header_http.inc.php';
*/
require_once './libraries/transformations.lib.php'; // Transformations
$cfgRelation = PMA_getRelationsParam();
-$foreigners = ($cfgRelation['relwork'] ? PMA_getForeigners($db, $table) : FALSE);
+$foreigners = ($cfgRelation['relwork'] ? PMA_getForeigners($db, $table) : false);
-$override_total = TRUE;
+$override_total = true;
if (! isset($pos)) {
$pos = 0;
@@ -180,7 +180,7 @@ if (is_array($foreignData['disp_row'])) {
$values = array();
$keys = array();
foreach ($foreignData['disp_row'] as $relrow) {
- if ($foreignData['foreign_display'] != FALSE) {
+ if ($foreignData['foreign_display'] != false) {
$values[] = $relrow[$foreignData['foreign_display']];
} else {
$values[] = '';
diff --git a/bs_disp_as_mime_type.php b/bs_disp_as_mime_type.php
index 085d888..03a8c8b 100644
--- a/bs_disp_as_mime_type.php
+++ b/bs_disp_as_mime_type.php
@@ -31,13 +31,13 @@ if (empty($filename)) {
$hdrs = get_headers($filename, 1);
-if ($hdrs === FALSE) {
+if ($hdrs === false) {
die(__('Failed to fetch headers'));
}
$fHnd = fopen($filename, "rb");
-if ($fHnd === FALSE) {
+if ($fHnd === false) {
die(__('Failed to open remote URL'));
}
diff --git a/chk_rel.php b/chk_rel.php
index 8955350..d13f075 100644
--- a/chk_rel.php
+++ b/chk_rel.php
@@ -15,7 +15,7 @@ require_once './libraries/header.inc.php';
/**
* Gets the relation settings
*/
-$cfgRelation = PMA_getRelationsParam(TRUE);
+$cfgRelation = PMA_getRelationsParam(true);
/**
diff --git a/db_create.php b/db_create.php
index 3609bf6..502ac7f 100644
--- a/db_create.php
+++ b/db_create.php
@@ -49,7 +49,7 @@ if (! $result) {
* If in an Ajax request, just display the message with {@link PMA_ajaxResponse}
*/
if($GLOBALS['is_ajax_request'] == true) {
- PMA_ajaxResponse($message, FALSE);
+ PMA_ajaxResponse($message, false);
}
require_once './libraries/header.inc.php';
diff --git a/db_datadict.php b/db_datadict.php
index 9941ef4..102724d 100644
--- a/db_datadict.php
+++ b/db_datadict.php
@@ -142,12 +142,12 @@ while ($row = PMA_DBI_fetch_assoc($rowset)) {
$res_rel = PMA_getForeigners($db, $table);
if (count($res_rel) > 0) {
- $have_rel = TRUE;
+ $have_rel = true;
} else {
- $have_rel = FALSE;
+ $have_rel = false;
}
} else {
- $have_rel = FALSE;
+ $have_rel = false;
} // end if
diff --git a/db_sql.php b/db_sql.php
index 2020dea..08eb5ca 100644
--- a/db_sql.php
+++ b/db_sql.php
@@ -31,7 +31,7 @@ $back = 'db_sql.php';
require './libraries/db_info.inc.php';
if ($num_tables == 0 && empty($db_query_force)) {
$sub_part = '';
- $is_info = TRUE;
+ $is_info = true;
require './db_structure.php';
exit();
}
diff --git a/db_structure.php b/db_structure.php
index 6d301d5..864a668 100644
--- a/db_structure.php
+++ b/db_structure.php
@@ -28,7 +28,7 @@ if (empty($is_info)) {
// db_structure.php -> libraries/mult_submits.inc.php -> sql.php
// -> db_structure.php and if we got an error on the multi submit,
// we must display it here and not call again mult_submits.inc.php
- if (! isset($error) || FALSE === $error) {
+ if (! isset($error) || false === $error) {
require './libraries/mult_submits.inc.php';
}
if (empty($message)) {
diff --git a/import.php b/import.php
index 8837af2..cd56bc2 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 at ./Documentation.html#faq1_16 at 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) {
diff --git a/libraries/File.class.php b/libraries/File.class.php
index 109c188..2a33bf3 100644
--- a/libraries/File.class.php
+++ b/libraries/File.class.php
@@ -271,11 +271,11 @@ class PMA_File
$file = PMA_File::fetchUploadedFromTblChangeRequestMultiple($_FILES['fields_upload'], $rownumber, $key);
// for blobstreaming
- $is_bs_upload = FALSE;
+ $is_bs_upload = false;
// check if this field requires a repository upload
if (isset($_REQUEST['upload_blob_repo']['multi_edit'][$rownumber][$key])) {
- $is_bs_upload = ($_REQUEST['upload_blob_repo']['multi_edit'][$rownumber][$key] == "on") ? TRUE : FALSE;
+ $is_bs_upload = ($_REQUEST['upload_blob_repo']['multi_edit'][$rownumber][$key] == "on") ? true : false;
}
// if request is an upload to the BLOB repository
if ($is_bs_upload) {
@@ -290,7 +290,7 @@ class PMA_File
if (! $bs_db || ! $bs_table) {
$this->_error_message = $GLOBALS['strUploadErrorUnknown'];
- return FALSE;
+ return false;
}
$blob_url = PMA_BS_UpLoadFile($bs_db, $bs_table, $tmp_file_type, $tmp_filename);
PMA_File::setRecentBLOBReference($blob_url);
@@ -388,11 +388,11 @@ class PMA_File
&& is_string($_REQUEST['fields_uploadlocal']['multi_edit'][$rownumber][$key])) {
// ... whether with multiple rows ...
// for blobstreaming
- $is_bs_upload = FALSE;
+ $is_bs_upload = false;
// check if this field requires a repository upload
if (isset($_REQUEST['upload_blob_repo']['multi_edit'][$rownumber][$key])) {
- $is_bs_upload = ($_REQUEST['upload_blob_repo']['multi_edit'][$rownumber][$key] == "on") ? TRUE : FALSE;
+ $is_bs_upload = ($_REQUEST['upload_blob_repo']['multi_edit'][$rownumber][$key] == "on") ? true : false;
}
// is a request to upload file to BLOB repository using uploadDir mechanism
@@ -423,7 +423,7 @@ class PMA_File
if (! $bs_db || !$bs_table) {
$this->_error_message = $GLOBALS['strUploadErrorUnknown'];
- return FALSE;
+ return false;
}
$blob_url = PMA_BS_UpLoadFile($bs_db, $bs_table, $tmp_file_type, $tmp_filename);
PMA_File::setRecentBLOBReference($blob_url);
diff --git a/libraries/StorageEngine.class.php b/libraries/StorageEngine.class.php
index 71b3636..7504895 100644
--- a/libraries/StorageEngine.class.php
+++ b/libraries/StorageEngine.class.php
@@ -140,7 +140,7 @@ class PMA_StorageEngine
static public function isValid($engine)
{
if ($engine == "PBMS") {
- return TRUE;
+ return true;
}
$storage_engines = PMA_StorageEngine::getStorageEngines();
return isset($storage_engines[$engine]);
diff --git a/libraries/Theme_Manager.class.php b/libraries/Theme_Manager.class.php
index 4ca8517..cb5454b 100644
--- a/libraries/Theme_Manager.class.php
+++ b/libraries/Theme_Manager.class.php
@@ -283,7 +283,7 @@ class PMA_Theme_Manager
$select_box .= PMA_generate_common_hidden_inputs();
}
- $theme_selected = FALSE;
+ $theme_selected = false;
$theme_preview_path= './themes.php';
$theme_preview_href = '<a href="' . $theme_preview_path . '" target="themes" onclick="'
. "window.open('" . $theme_preview_path . "','themes','left=10,top=20,width=510,height=350,scrollbars=yes,status=yes,resizable=yes');"
diff --git a/libraries/Tracker.class.php b/libraries/Tracker.class.php
index 7592c2c..35ab7f4 100644
--- a/libraries/Tracker.class.php
+++ b/libraries/Tracker.class.php
@@ -752,7 +752,7 @@ class PMA_Tracker
$prefix = explode('DROP VIEW ', $query);
$str = strstr($prefix[1], 'IF EXISTS');
- if ($str == FALSE ) {
+ if ($str == false ) {
$str = $prefix[1];
}
$result['tablename'] = self::getTableName($str);
@@ -810,7 +810,7 @@ class PMA_Tracker
$prefix = explode('DROP TABLE ', $query);
$str = strstr($prefix[1], 'IF EXISTS');
- if ($str == FALSE ) {
+ if ($str == false ) {
$str = $prefix[1];
}
$result['tablename'] = self::getTableName($str);
diff --git a/libraries/auth/config.auth.lib.php b/libraries/auth/config.auth.lib.php
index dfa2f2c..5c98d25 100644
--- a/libraries/auth/config.auth.lib.php
+++ b/libraries/auth/config.auth.lib.php
@@ -16,7 +16,7 @@
*/
function PMA_auth()
{
- return TRUE;
+ return true;
} // end of the 'PMA_auth()' function
@@ -29,7 +29,7 @@ function PMA_auth()
*/
function PMA_auth_check()
{
- return TRUE;
+ return true;
} // end of the 'PMA_auth_check()' function
@@ -42,7 +42,7 @@ function PMA_auth_check()
*/
function PMA_auth_set_user()
{
- return TRUE;
+ return true;
} // end of the 'PMA_auth_set_user()' function
@@ -96,7 +96,7 @@ function PMA_auth_fails()
<td>
<?php
- $GLOBALS['is_header_sent'] = TRUE;
+ $GLOBALS['is_header_sent'] = true;
if (isset($GLOBALS['allowDeny_forbidden']) && $GLOBALS['allowDeny_forbidden']) {
trigger_error(__('Access denied'), E_USER_NOTICE);
@@ -126,13 +126,13 @@ function PMA_auth_fails()
require_once './libraries/select_server.lib.php';
echo '<tr>' . "\n";
echo ' <td>' . "\n";
- PMA_select_server(TRUE, TRUE);
+ PMA_select_server(true, true);
echo ' </td>' . "\n";
echo '</tr>' . "\n";
}
echo '</table>' . "\n";
require './libraries/footer.inc.php';
- return TRUE;
+ return true;
} // end of the 'PMA_auth_fails()' function
?>
diff --git a/libraries/auth/swekey/swekey.php b/libraries/auth/swekey/swekey.php
index 3e91e23..b456061 100644
--- a/libraries/auth/swekey/swekey.php
+++ b/libraries/auth/swekey/swekey.php
@@ -393,7 +393,7 @@ function Swekey_GetFastHalfRndToken()
// we unlink the file so no possible tempfile race attack
unlink($cachefile);
$file = fopen($cachefile , "x");
- if ($file != FALSE)
+ if ($file != false)
{
@fwrite($file, $res);
@fclose($file);
diff --git a/libraries/blobstreaming.lib.php b/libraries/blobstreaming.lib.php
index 4efaf34..ce1711c 100644
--- a/libraries/blobstreaming.lib.php
+++ b/libraries/blobstreaming.lib.php
@@ -18,7 +18,7 @@ function initPBMSDatabase()
$target = "";
foreach ($db_array as $current_db) {
if ($current_db == 'pbms') {
- return TRUE;
+ return true;
}
if ($target == "") {
if (($current_db != 'pbxt') && ($current_db != 'mysql') && ($current_db != 'information_schema')) {
@@ -34,9 +34,9 @@ function initPBMSDatabase()
$result = PMA_DBI_query($query );
if (! $result) {
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
/**
@@ -58,7 +58,7 @@ function checkBLOBStreamingPlugins()
// return if unable to load PMA configuration
if (empty($PMA_Config)) {
- return FALSE;
+ return false;
}
// If we don't know that we can skip blobstreaming, we continue
@@ -77,7 +77,7 @@ function checkBLOBStreamingPlugins()
// return if unable to retrieve current server configuration
if (! $serverCfg) {
- return FALSE;
+ return false;
}
// if PHP extension in use is 'mysql', specify element 'PersistentConnections'
@@ -115,26 +115,26 @@ function checkBLOBStreamingPlugins()
// if no BS variables exist, set plugin existence to false and return
if (count($bs_variables) <= 0) {
- $PMA_Config->set('BLOBSTREAMING_PLUGINS_EXIST', FALSE);
+ $PMA_Config->set('BLOBSTREAMING_PLUGINS_EXIST', false);
PMA_cacheSet('skip_blobstreaming', true, true);
- return FALSE;
+ return false;
} // end if (count($bs_variables) <= 0)
// Check that the required pbms functions exist:
- if ((function_exists("pbms_connect") == FALSE) ||
- (function_exists("pbms_error") == FALSE) ||
- (function_exists("pbms_close") == FALSE) ||
- (function_exists("pbms_is_blob_reference") == FALSE) ||
- (function_exists("pbms_get_info") == FALSE) ||
- (function_exists("pbms_get_metadata_value") == FALSE) ||
- (function_exists("pbms_add_metadata") == FALSE) ||
- (function_exists("pbms_read_stream") == FALSE)) {
+ if ((function_exists("pbms_connect") == false) ||
+ (function_exists("pbms_error") == false) ||
+ (function_exists("pbms_close") == false) ||
+ (function_exists("pbms_is_blob_reference") == false) ||
+ (function_exists("pbms_get_info") == false) ||
+ (function_exists("pbms_get_metadata_value") == false) ||
+ (function_exists("pbms_add_metadata") == false) ||
+ (function_exists("pbms_read_stream") == false)) {
// We should probably notify the user that they need to install
// the pbms client lib and PHP extension to make use of blob streaming.
- $PMA_Config->set('BLOBSTREAMING_PLUGINS_EXIST', FALSE);
+ $PMA_Config->set('BLOBSTREAMING_PLUGINS_EXIST', false);
PMA_cacheSet('skip_blobstreaming', true, true);
- return FALSE;
+ return false;
}
if (function_exists("pbms_connection_pool_size")) {
@@ -154,31 +154,31 @@ function checkBLOBStreamingPlugins()
// if no BS server port or 'pbms' database exists, set plugin existance to false and return
if ((! $BS_PORT) || (! initPBMSDatabase())) {
- $PMA_Config->set('BLOBSTREAMING_PLUGINS_EXIST', FALSE);
+ $PMA_Config->set('BLOBSTREAMING_PLUGINS_EXIST', false);
PMA_cacheSet('skip_blobstreaming', true, true);
- return FALSE;
+ return false;
} // end if (!$BS_PORT)
// Ping PBMS: the database doesn't need to exist for this to work.
- if (pbms_connect($serverCfg['host'], $BS_PORT, "anydb") == FALSE) {
- $PMA_Config->set('BLOBSTREAMING_PLUGINS_EXIST', FALSE);
+ if (pbms_connect($serverCfg['host'], $BS_PORT, "anydb") == false) {
+ $PMA_Config->set('BLOBSTREAMING_PLUGINS_EXIST', false);
PMA_cacheSet('skip_blobstreaming', true, true);
- return FALSE;
+ return false;
}
pbms_close();
if (function_exists("pbms_pconnect")) {
- $PMA_Config->set('PBMS_PCONNECT_EXISTS', TRUE);
+ $PMA_Config->set('PBMS_PCONNECT_EXISTS', true);
} else {
- $PMA_Config->set('PBMS_PCONNECT_EXISTS', FALSE);
+ $PMA_Config->set('PBMS_PCONNECT_EXISTS', false);
}
// add selected BS, CURL and fileinfo library variables to PMA configuration
$PMA_Config->set('BLOBSTREAMING_PORT', $BS_PORT);
$PMA_Config->set('BLOBSTREAMING_HOST', $serverCfg['host']);
$PMA_Config->set('BLOBSTREAMING_SERVER', $serverCfg['host'] . ':' . $BS_PORT);
- $PMA_Config->set('PHP_PBMS_EXISTS', FALSE);
- $PMA_Config->set('FILEINFO_EXISTS', FALSE);
+ $PMA_Config->set('PHP_PBMS_EXISTS', false);
+ $PMA_Config->set('FILEINFO_EXISTS', false);
// check if PECL's fileinfo library exist
$finfo = NULL;
@@ -189,16 +189,16 @@ function checkBLOBStreamingPlugins()
// fileinfo library exists, set necessary variable and close resource
if (! empty($finfo)) {
- $PMA_Config->set('FILEINFO_EXISTS', TRUE);
+ $PMA_Config->set('FILEINFO_EXISTS', true);
finfo_close($finfo);
} // end if (!empty($finfo))
} else {
PMA_cacheSet('skip_blobstreaming', true, true);
- return FALSE;
+ return false;
} // end if ($has_blobstreaming)
- return TRUE;
+ return true;
}
/**
@@ -248,7 +248,7 @@ function PMA_do_connect($db_name, $quiet)
// return if unable to load PMA configuration
if (empty($PMA_Config)) {
- return FALSE;
+ return false;
}
// generate bs reference link
@@ -262,13 +262,13 @@ function PMA_do_connect($db_name, $quiet)
$ok = pbms_connect($pbms_host, $pbms_port, $db_name);
}
- if ($ok == FALSE) {
- if ($quiet == FALSE) {
+ if ($ok == false) {
+ if ($quiet == false) {
PMA_BS_ReportPBMSError(__('PBMS connection failed:') . " pbms_connect($pbms_host, $pbms_port, $db_name)");
}
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
//------------
@@ -285,7 +285,7 @@ function PMA_do_disconnect()
function PMA_BS_IsPBMSReference($bs_reference, $db_name)
{
if (PMA_cacheGet('skip_blobstreaming', true)) {
- return FALSE;
+ return false;
}
// You do not really need a connection to the PBMS Daemon
@@ -293,8 +293,8 @@ function PMA_BS_IsPBMSReference($bs_reference, $db_name)
// requires one at this point so until the API is updated
// we need to epen one here. If you use pool connections this
// will not be a performance problem.
- if (PMA_do_connect($db_name, FALSE) == FALSE) {
- return FALSE;
+ if (PMA_do_connect($db_name, false) == false) {
+ return false;
}
$ok = pbms_is_blob_reference($bs_reference);
@@ -304,18 +304,18 @@ function PMA_BS_IsPBMSReference($bs_reference, $db_name)
//------------
function PMA_BS_CreateReferenceLink($bs_reference, $db_name)
{
- if (PMA_do_connect($db_name, FALSE) == FALSE) {
+ if (PMA_do_connect($db_name, false) == false) {
return __('Error');
}
- if (pbms_get_info(trim($bs_reference)) == FALSE) {
+ if (pbms_get_info(trim($bs_reference)) == false) {
PMA_BS_ReportPBMSError(__('PBMS get BLOB info failed:') . " pbms_get_info($bs_reference)");
PMA_do_disconnect();
return __('Error');
}
$content_type = pbms_get_metadata_value("Content-Type");
- if ($content_type == FALSE) {
+ if ($content_type == false) {
$br = trim($bs_reference);
PMA_BS_ReportPBMSError("PMA_BS_CreateReferenceLink('$br', '$db_name'): " . __('get BLOB Content-Type failed'));
}
@@ -371,11 +371,11 @@ function PMA_BS_CreateReferenceLink($bs_reference, $db_name)
function PMA_BS_IsTablePBMSEnabled($db_name, $tbl_name, $tbl_type)
{
if (PMA_cacheGet('skip_blobstreaming', true)) {
- return FALSE;
+ return false;
}
- if ((isset($tbl_type) == FALSE) || (strlen($tbl_type) == 0)) {
- return FALSE;
+ if ((isset($tbl_type) == false) || (strlen($tbl_type) == 0)) {
+ return false;
}
// load PMA configuration
@@ -383,11 +383,11 @@ function PMA_BS_IsTablePBMSEnabled($db_name, $tbl_name, $tbl_type)
// return if unable to load PMA configuration
if (empty($PMA_Config)) {
- return FALSE;
+ return false;
}
if (! $PMA_Config->get('BLOBSTREAMING_PLUGINS_EXIST')) {
- return FALSE;
+ return false;
}
// This information should be cached rather than selecting it each time.
@@ -397,10 +397,10 @@ function PMA_BS_IsTablePBMSEnabled($db_name, $tbl_name, $tbl_type)
$data = PMA_DBI_fetch_row($result);
if ($data[0] == 1) {
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
//------------
@@ -408,18 +408,18 @@ function PMA_BS_UpLoadFile($db_name, $tbl_name, $file_type, $file_name)
{
if (PMA_cacheGet('skip_blobstreaming', true)) {
- return FALSE;
+ return false;
}
- if (PMA_do_connect($db_name, FALSE) == FALSE) {
- return FALSE;
+ if (PMA_do_connect($db_name, false) == false) {
+ return false;
}
$fh = fopen($file_name, 'r');
if (! $fh) {
PMA_do_disconnect();
PMA_showMessage(sprintf(__('Could not open file: %s'), $file_name));
- return FALSE;
+ return false;
}
pbms_add_metadata("Content-Type", $file_type);
@@ -438,7 +438,7 @@ function PMA_BS_UpLoadFile($db_name, $tbl_name, $file_type, $file_name)
function PMA_BS_SetContentType($db_name, $bsTable, $blobReference, $contentType)
{
if (PMA_cacheGet('skip_blobstreaming', true)) {
- return FALSE;
+ return false;
}
// This is a really ugly way to do this but currently there is nothing better.
@@ -463,9 +463,9 @@ function PMA_BS_SetContentType($db_name, $bsTable, $blobReference, $contentType)
//error_log("$query\n", 3, "/tmp/mylog");
PMA_DBI_query($query);
} else {
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
//------------
@@ -473,9 +473,9 @@ function PMA_BS_IsHiddenTable($table)
{
if ($table === 'pbms_repository' || $table === 'pbms_reference' || $table === 'pbms_metadata'
|| $table === 'pbms_metadata_header' || $table === 'pbms_dump') {
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
//------------
@@ -484,13 +484,13 @@ function PMA_BS_getURL($reference)
// load PMA configuration
$PMA_Config = $GLOBALS['PMA_Config'];
if (empty($PMA_Config)) {
- return FALSE;
+ return false;
}
// retrieve BS server variables from PMA configuration
$bs_server = $PMA_Config->get('BLOBSTREAMING_SERVER');
if (empty($bs_server)) {
- return FALSE;
+ return false;
}
$bs_url = PMA_linkURL('http://' . $bs_server . '/' . rtrim($reference));
diff --git a/libraries/bookmark.lib.php b/libraries/bookmark.lib.php
index 62d7e1b..dfc1946 100644
--- a/libraries/bookmark.lib.php
+++ b/libraries/bookmark.lib.php
@@ -103,14 +103,14 @@ function PMA_Bookmark_getList($db)
* @param string the current database name
* @param mixed the id of the bookmark to get
* @param string which field to look up the $id
- * @param boolean TRUE: get all bookmarks regardless of the owning user
+ * @param boolean true: get all bookmarks regardless of the owning user
* @param boolean whether to ignore bookmarks with no user
*
* @return string the sql query
*
* @access public
*/
-function PMA_Bookmark_get($db, $id, $id_field = 'id', $action_bookmark_all = FALSE, $exact_user_match = FALSE)
+function PMA_Bookmark_get($db, $id, $id_field = 'id', $action_bookmark_all = false, $exact_user_match = false)
{
global $controllink;
diff --git a/libraries/chart/pma_pchart_chart.php b/libraries/chart/pma_pchart_chart.php
index c4277d8..e68a9b3 100644
--- a/libraries/chart/pma_pchart_chart.php
+++ b/libraries/chart/pma_pchart_chart.php
@@ -190,7 +190,7 @@ abstract class PMA_pChart_chart extends PMA_chart
$this->getGraphAreaColor(RED),
$this->getGraphAreaColor(GREEN),
$this->getGraphAreaColor(BLUE),
- FALSE
+ false
);
$this->chart->drawScale(
$this->dataSet->GetData(),
@@ -199,7 +199,7 @@ abstract class PMA_pChart_chart extends PMA_chart
$this->getScaleColor(RED),
$this->getScaleColor(GREEN),
$this->getScaleColor(BLUE),
- TRUE,0,2,TRUE
+ true,0,2,true
);
if($this->settings['gradientIntensity']>0)
@@ -218,7 +218,7 @@ abstract class PMA_pChart_chart extends PMA_chart
$this->chart->drawGrid(
4,
- TRUE,
+ true,
$this->getGridColor(RED),
$this->getGridColor(GREEN),
$this->getGridColor(BLUE),
diff --git a/libraries/chart/pma_pchart_multi_line.php b/libraries/chart/pma_pchart_multi_line.php
index bd7b6ea..502f386 100644
--- a/libraries/chart/pma_pchart_multi_line.php
+++ b/libraries/chart/pma_pchart_multi_line.php
@@ -31,7 +31,7 @@ class PMA_pChart_multi_line extends PMA_pChart_multi
// Draw the bar chart
$this->chart->drawLineGraph($this->dataSet->GetData(), $this->dataSet->GetDataDescription());
- $this->chart->drawPlotGraph($this->dataSet->GetData(), $this->dataSet->GetDataDescription(), 3, 1, -1, -1, -1, TRUE);
+ $this->chart->drawPlotGraph($this->dataSet->GetData(), $this->dataSet->GetDataDescription(), 3, 1, -1, -1, -1, true);
}
}
diff --git a/libraries/chart/pma_pchart_multi_radar.php b/libraries/chart/pma_pchart_multi_radar.php
index c96fb3c..8c32cb3 100644
--- a/libraries/chart/pma_pchart_multi_radar.php
+++ b/libraries/chart/pma_pchart_multi_radar.php
@@ -55,7 +55,7 @@ class PMA_pChart_multi_radar extends PMA_pChart_multi
$this->getGraphAreaColor(RED),
$this->getGraphAreaColor(GREEN),
$this->getGraphAreaColor(BLUE),
- FALSE
+ false
);
if($this->settings['gradientIntensity']>0)
@@ -98,7 +98,7 @@ class PMA_pChart_multi_radar extends PMA_pChart_multi
$borderOffset += 40;
// Draw the radar chart
- $this->chart->drawRadarAxis($this->dataSet->GetData(), $this->dataSet->GetDataDescription(), TRUE, $borderOffset,
+ $this->chart->drawRadarAxis($this->dataSet->GetData(), $this->dataSet->GetDataDescription(), true, $borderOffset,
120, 120, 120, 230, 230, 230, -1, 2);
$this->chart->drawFilledRadar($this->dataSet->GetData(), $this->dataSet->GetDataDescription(), 50, $borderOffset);
}
diff --git a/libraries/chart/pma_pchart_pie.php b/libraries/chart/pma_pchart_pie.php
index 0366ba4..56148e0 100644
--- a/libraries/chart/pma_pchart_pie.php
+++ b/libraries/chart/pma_pchart_pie.php
@@ -45,7 +45,7 @@ class PMA_pChart_Pie extends PMA_pChart_multi
$this->getGraphAreaColor(RED),
$this->getGraphAreaColor(GREEN),
$this->getGraphAreaColor(BLUE),
- FALSE
+ false
);
if($this->settings['gradientIntensity']>0)
@@ -83,7 +83,7 @@ class PMA_pChart_Pie extends PMA_pChart_multi
// lower part. This is why we set an offset to the
// Y middle coordiantes.
$middleY - 15,
- 120, PIE_PERCENTAGE, FALSE, 60, 30, 10, 1);
+ 120, PIE_PERCENTAGE, false, 60, 30, 10, 1);
}
/**
diff --git a/libraries/chart/pma_pchart_single_line.php b/libraries/chart/pma_pchart_single_line.php
index 799a48b..3003581 100644
--- a/libraries/chart/pma_pchart_single_line.php
+++ b/libraries/chart/pma_pchart_single_line.php
@@ -27,7 +27,7 @@ class PMA_pChart_single_line extends PMA_pChart_single
{
// Draw the line chart
$this->chart->drawLineGraph($this->dataSet->GetData(), $this->dataSet->GetDataDescription());
- $this->chart->drawPlotGraph($this->dataSet->GetData(), $this->dataSet->GetDataDescription(), 3, 1, -1, -1, -1, TRUE);
+ $this->chart->drawPlotGraph($this->dataSet->GetData(), $this->dataSet->GetDataDescription(), 3, 1, -1, -1, -1, true);
}
}
diff --git a/libraries/chart/pma_pchart_single_radar.php b/libraries/chart/pma_pchart_single_radar.php
index 6590582..0c5d9ec 100644
--- a/libraries/chart/pma_pchart_single_radar.php
+++ b/libraries/chart/pma_pchart_single_radar.php
@@ -46,7 +46,7 @@ class PMA_pChart_single_radar extends PMA_pChart_single
$this->getGraphAreaColor(RED),
$this->getGraphAreaColor(GREEN),
$this->getGraphAreaColor(BLUE),
- FALSE
+ false
);
if($this->settings['gradientIntensity']>0)
@@ -88,7 +88,7 @@ class PMA_pChart_single_radar extends PMA_pChart_single
$borderOffset += 40;
$this->chart->drawRadarAxis($this->dataSet->GetData(), $this->dataSet->GetDataDescription(),
- TRUE, $borderOffset, 120, 120, 120, 230, 230, 230, -1, 2);
+ true, $borderOffset, 120, 120, 120, 230, 230, 230, -1, 2);
$this->chart->drawFilledRadar($this->dataSet->GetData(), $this->dataSet->GetDataDescription(), 50, $borderOffset);
}
}
diff --git a/libraries/common.inc.php b/libraries/common.inc.php
index 70b70fe..5be5c76 100644
--- a/libraries/common.inc.php
+++ b/libraries/common.inc.php
@@ -55,7 +55,7 @@ require './libraries/Error_Handler.class.php';
* initialize the error handler
*/
$GLOBALS['error_handler'] = new PMA_Error_Handler();
-$cfg['Error_Handler']['display'] = TRUE;
+$cfg['Error_Handler']['display'] = true;
/*
* This setting was removed in PHP 5.3. But at this point PMA_PHP_INT_VERSION
diff --git a/libraries/common.lib.php b/libraries/common.lib.php
index 807376f..b09570c 100644
--- a/libraries/common.lib.php
+++ b/libraries/common.lib.php
@@ -2850,7 +2850,7 @@ function PMA_expandUserString($string, $escape = null, $updates = array()) {
}
/* Fetch fields list if required */
- if (strpos($string, '@FIELDS@') !== FALSE) {
+ if (strpos($string, '@FIELDS@') !== false) {
$fields_list = PMA_DBI_fetch_result(
'SHOW COLUMNS FROM ' . PMA_backquote($GLOBALS['db'])
. '.' . PMA_backquote($GLOBALS['table']));
@@ -2953,7 +2953,7 @@ function PMA_selectUploadFile($import_list, $uploaddir) {
$matcher = '@\.(' . $extensions . ')(\.(' . PMA_supportedDecompressions() . '))?$@';
$files = PMA_getFileSelectOptions(PMA_userDir($uploaddir), $matcher, (isset($timeout_passed) && $timeout_passed && isset($local_import_file)) ? $local_import_file : '');
- if ($files === FALSE) {
+ if ($files === false) {
PMA_Message::error(__('The directory you set for upload work cannot be reached'))->display();
} elseif (!empty($files)) {
echo "\n";
diff --git a/libraries/config.default.php b/libraries/config.default.php
index ad1d9ac..d6e47c2 100644
--- a/libraries/config.default.php
+++ b/libraries/config.default.php
@@ -1309,7 +1309,7 @@ $cfg['Export']['texytext_structure_or_data'] = 'structure_and_data';
*
* @global boolean $cfg['Export']['texytext_columns']
*/
-$cfg['Export']['texytext_columns'] = FALSE;
+$cfg['Export']['texytext_columns'] = false;
/**
*
diff --git a/libraries/core.lib.php b/libraries/core.lib.php
index 51315d7..6494d49 100644
--- a/libraries/core.lib.php
+++ b/libraries/core.lib.php
@@ -698,7 +698,7 @@ function PMA_linkURL($url) {
* @return string HTML code for javascript inclusion.
*/
function PMA_includeJS($url) {
- if (strpos($url, '?') === FALSE) {
+ if (strpos($url, '?') === false) {
return '<script src="./js/' . $url . '?ts=' . filemtime('./js/' . $url) . '" type="text/javascript"></script>' . "\n";
} else {
return '<script src="./js/' . $url . '" type="text/javascript"></script>' . "\n";
diff --git a/libraries/database_interface.lib.php b/libraries/database_interface.lib.php
index 91a2283..57c8568 100644
--- a/libraries/database_interface.lib.php
+++ b/libraries/database_interface.lib.php
@@ -1412,22 +1412,22 @@ function PMA_DBI_get_triggers($db, $table, $delimiter = '//')
}
/**
- * Returns TRUE if $db.$view_name is a view, FALSE if not
+ * Returns true if $db.$view_name is a view, false if not
*
* @uses PMA_DBI_fetch_result()
* @param string $db database name
* @param string $view_name view/table name
*
- * @return bool TRUE if $db.$view_name is a view, FALSE if not
+ * @return bool true if $db.$view_name is a view, false if not
*/
function PMA_isView($db, $view_name)
{
$result = PMA_DBI_fetch_result("SELECT TABLE_NAME FROM information_schema.VIEWS WHERE TABLE_SCHEMA = '".$db."' and TABLE_NAME = '".$view_name."';");
if ($result) {
- return TRUE;
+ return true;
} else {
- return FALSE;
+ return false;
}
}
?>
diff --git a/libraries/dbi/mysql.dbi.lib.php b/libraries/dbi/mysql.dbi.lib.php
index c4f22fb..e96e167 100644
--- a/libraries/dbi/mysql.dbi.lib.php
+++ b/libraries/dbi/mysql.dbi.lib.php
@@ -208,7 +208,7 @@ function PMA_DBI_try_query($query, $link = null, $options = 0, $cache_affected_r
}
$_SESSION['debug']['queries'][$hash]['trace'][] = $trace;
}
- if ($r != FALSE && PMA_Tracker::isActive() == TRUE ) {
+ if ($r != false && PMA_Tracker::isActive() == true ) {
PMA_Tracker::handleQuery($query);
}
diff --git a/libraries/dbi/mysqli.dbi.lib.php b/libraries/dbi/mysqli.dbi.lib.php
index a6eff91..a40e32d 100644
--- a/libraries/dbi/mysqli.dbi.lib.php
+++ b/libraries/dbi/mysqli.dbi.lib.php
@@ -232,7 +232,7 @@ function PMA_DBI_try_query($query, $link = null, $options = 0, $cache_affected_r
$_SESSION['debug']['queries'][$hash]['trace'][] = $trace;
}
- if ($r != FALSE && PMA_Tracker::isActive() == TRUE ) {
+ if ($r != false && PMA_Tracker::isActive() == true ) {
PMA_Tracker::handleQuery($query);
}
diff --git a/libraries/display_create_database.lib.php b/libraries/display_create_database.lib.php
index 02c05df..e0031a4 100644
--- a/libraries/display_create_database.lib.php
+++ b/libraries/display_create_database.lib.php
@@ -24,7 +24,7 @@ if ($is_create_db_priv) {
<input type="text" name="new_db" value="<?php echo $db_to_create; ?>" maxlength="64" class="textfield" id="text_create_db"/>
<?php
require_once './libraries/mysql_charsets.lib.php';
- echo PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION, 'db_collation', null, null, TRUE, 5);
+ echo PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_COLLATION, 'db_collation', null, null, true, 5);
if (! empty($dbstats)) {
echo '<input type="hidden" name="dbstats" value="1" />';
diff --git a/libraries/display_import.lib.php b/libraries/display_import.lib.php
index 756de10..05df2d0 100644
--- a/libraries/display_import.lib.php
+++ b/libraries/display_import.lib.php
@@ -199,7 +199,7 @@ if ($_SESSION[$SESSION_KEY]["handler"]!="noplugin") {
echo ' </select><br />';
} else {
echo '<label for="charset_of_file">' . __('Character set of the file:') . '</label>' . "\n";
- echo PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_CHARSET, 'charset_of_file', 'charset_of_file', 'utf8', FALSE);
+ echo PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_CHARSET, 'charset_of_file', 'charset_of_file', 'utf8', false);
} // end if (recoding)
?>
</div>
diff --git a/libraries/display_select_lang.lib.php b/libraries/display_select_lang.lib.php
index 5ce0599..4f846bf 100644
--- a/libraries/display_select_lang.lib.php
+++ b/libraries/display_select_lang.lib.php
@@ -26,7 +26,7 @@ function PMA_language_cmp(&$a, &$b) {
*
* @access public
*/
-function PMA_select_language($use_fieldset = FALSE, $show_doc = TRUE) {
+function PMA_select_language($use_fieldset = false, $show_doc = true) {
global $cfg, $lang;
?>
diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php
index 08b3ea1..a16fc23 100644
--- a/libraries/display_tbl.lib.php
+++ b/libraries/display_tbl.lib.php
@@ -2291,7 +2291,7 @@ function default_function($buffer) {
function PMA_displayResultsOperations($the_disp_mode, $analyzed_sql) {
global $db, $table, $sql_query, $unlim_num_rows;
- $header_shown = FALSE;
+ $header_shown = false;
$header = '<fieldset><legend>' . __('Query results operations') . '</legend>';
if ($the_disp_mode[6] == '1' || $the_disp_mode[9] == '1') {
@@ -2300,7 +2300,7 @@ function PMA_displayResultsOperations($the_disp_mode, $analyzed_sql) {
if (!$header_shown) {
echo $header;
- $header_shown = TRUE;
+ $header_shown = true;
}
$_url_params = array(
@@ -2340,7 +2340,7 @@ function PMA_displayResultsOperations($the_disp_mode, $analyzed_sql) {
}
if (!$header_shown) {
echo $header;
- $header_shown = TRUE;
+ $header_shown = true;
}
$_url_params['unlim_num_rows'] = $unlim_num_rows;
@@ -2378,7 +2378,7 @@ function PMA_displayResultsOperations($the_disp_mode, $analyzed_sql) {
*/
if (!$header_shown) {
echo $header;
- $header_shown = TRUE;
+ $header_shown = true;
}
if (! isset($analyzed_sql[0]['queryflags']['procedure'])) {
echo PMA_linkOrButton(
@@ -2598,7 +2598,7 @@ function PMA_generateEditLink($edit_url, $class, $edit_str, $where_clause, $wher
$ret = '';
if (! empty($edit_url)) {
$ret .= '<td class="' . $class . '" align="center" ' . ' ><span class="nowrap">'
- . PMA_linkOrButton($edit_url, $edit_str, array(), FALSE);
+ . PMA_linkOrButton($edit_url, $edit_str, array(), false);
/*
* Where clause for selecting this row uniquely is provided as
* a hidden input. Used by jQuery scripts for handling inline editing
@@ -2629,7 +2629,7 @@ function PMA_generateCopyLink($copy_url, $copy_str, $where_clause, $where_clause
$ret .= 'class="' . $class . '" ';
}
$ret .= 'align="center" ' . ' ><span class="nowrap">'
- . PMA_linkOrButton($copy_url, $copy_str, array(), FALSE);
+ . PMA_linkOrButton($copy_url, $copy_str, array(), false);
/*
* Where clause for selecting this row uniquely is provided as
* a hidden input. Used by jQuery scripts for handling inline editing
@@ -2660,7 +2660,7 @@ function PMA_generateDeleteLink($del_url, $del_str, $js_conf, $class) {
$ret .= 'class="' . $class . '" ';
}
$ret .= 'align="center" ' . ' >'
- . PMA_linkOrButton($del_url, $del_str, $js_conf, FALSE)
+ . PMA_linkOrButton($del_url, $del_str, $js_conf, false)
. '</td>';
}
return $ret;
diff --git a/libraries/export/codegen.php b/libraries/export/codegen.php
index 8e36f40..56c9d08 100644
--- a/libraries/export/codegen.php
+++ b/libraries/export/codegen.php
@@ -54,7 +54,7 @@ if (isset($plugin_list)) {
*/
function PMA_exportComment($text)
{
- return TRUE;
+ return true;
}
/**
@@ -66,7 +66,7 @@ function PMA_exportComment($text)
*/
function PMA_exportFooter()
{
- return TRUE;
+ return true;
}
/**
@@ -78,7 +78,7 @@ function PMA_exportFooter()
*/
function PMA_exportHeader()
{
- return TRUE;
+ return true;
}
/**
@@ -92,7 +92,7 @@ function PMA_exportHeader()
*/
function PMA_exportDBHeader($db)
{
- return TRUE;
+ return true;
}
/**
@@ -106,7 +106,7 @@ function PMA_exportDBHeader($db)
*/
function PMA_exportDBFooter($db)
{
- return TRUE;
+ return true;
}
/**
@@ -120,7 +120,7 @@ function PMA_exportDBFooter($db)
*/
function PMA_exportDBCreate($db)
{
- return TRUE;
+ return true;
}
/**
diff --git a/libraries/export/csv.php b/libraries/export/csv.php
index 6d6242e..41c3cf3 100644
--- a/libraries/export/csv.php
+++ b/libraries/export/csv.php
@@ -40,7 +40,7 @@ if (isset($plugin_list)) {
* @return bool Whether it suceeded
*/
function PMA_exportComment($text) {
- return TRUE;
+ return true;
}
/**
@@ -51,7 +51,7 @@ function PMA_exportComment($text) {
* @access public
*/
function PMA_exportFooter() {
- return TRUE;
+ return true;
}
/**
@@ -98,7 +98,7 @@ function PMA_exportHeader() {
} // end if
$csv_separator = str_replace('\\t', "\011", $csv_separator);
}
- return TRUE;
+ return true;
}
/**
@@ -111,7 +111,7 @@ function PMA_exportHeader() {
* @access public
*/
function PMA_exportDBHeader($db) {
- return TRUE;
+ return true;
}
/**
@@ -124,7 +124,7 @@ function PMA_exportDBHeader($db) {
* @access public
*/
function PMA_exportDBFooter($db) {
- return TRUE;
+ return true;
}
/**
@@ -137,7 +137,7 @@ function PMA_exportDBFooter($db) {
* @access public
*/
function PMA_exportDBCreate($db) {
- return TRUE;
+ return true;
}
/**
@@ -179,7 +179,7 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) {
} // end for
$schema_insert =trim(substr($schema_insert, 0, -1));
if (!PMA_exportOutputHandler($schema_insert . $csv_terminated)) {
- return FALSE;
+ return false;
}
} // end if
@@ -223,12 +223,12 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) {
} // end for
if (!PMA_exportOutputHandler($schema_insert . $csv_terminated)) {
- return FALSE;
+ return false;
}
} // end while
PMA_DBI_free_result($result);
- return TRUE;
+ return true;
} // end of the 'PMA_getTableCsv()' function
}
diff --git a/libraries/export/htmlword.php b/libraries/export/htmlword.php
index b88cb8f..7b54476 100644
--- a/libraries/export/htmlword.php
+++ b/libraries/export/htmlword.php
@@ -41,7 +41,7 @@ if (isset($plugin_list)) {
* @return bool Whether it suceeded
*/
function PMA_exportComment($text) {
- return TRUE;
+ return true;
}
/**
@@ -99,7 +99,7 @@ function PMA_exportDBHeader($db) {
* @access public
*/
function PMA_exportDBFooter($db) {
- return TRUE;
+ return true;
}
/**
@@ -112,7 +112,7 @@ function PMA_exportDBFooter($db) {
* @access public
*/
function PMA_exportDBCreate($db) {
- return TRUE;
+ return true;
}
/**
@@ -133,10 +133,10 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query)
global $what;
if (! PMA_exportOutputHandler('<h2>' . __('Dumping data for table') . ' ' . $table . '</h2>')) {
- return FALSE;
+ return false;
}
if (! PMA_exportOutputHandler('<table class="width100" cellspacing="1">')) {
- return FALSE;
+ return false;
}
// Gets the data from the database
@@ -151,7 +151,7 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query)
} // end for
$schema_insert .= '</tr>';
if (! PMA_exportOutputHandler($schema_insert)) {
- return FALSE;
+ return false;
}
} // end if
@@ -170,15 +170,15 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query)
} // end for
$schema_insert .= '</tr>';
if (! PMA_exportOutputHandler($schema_insert)) {
- return FALSE;
+ return false;
}
} // end while
PMA_DBI_free_result($result);
if (! PMA_exportOutputHandler('</table>')) {
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = false, $do_comments = false, $do_mime = false, $dates = false, $dummy)
@@ -186,7 +186,7 @@ function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = fals
global $cfgRelation;
if (! PMA_exportOutputHandler('<h2>' . __('Table structure for table') . ' ' .$table . '</h2>')) {
- return FALSE;
+ return false;
}
/**
@@ -217,19 +217,19 @@ function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = fals
$res_rel = PMA_getForeigners($db, $table);
if ($res_rel && count($res_rel) > 0) {
- $have_rel = TRUE;
+ $have_rel = true;
} else {
- $have_rel = FALSE;
+ $have_rel = false;
}
} else {
- $have_rel = FALSE;
+ $have_rel = false;
} // end if
/**
* Displays the table structure
*/
if (! PMA_exportOutputHandler('<table class="width100" cellspacing="1">')) {
- return FALSE;
+ return false;
}
$columns_cnt = 4;
@@ -262,7 +262,7 @@ function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = fals
$schema_insert .= '</tr>';
if (! PMA_exportOutputHandler($schema_insert)) {
- return FALSE;
+ return false;
}
while ($row = PMA_DBI_fetch_assoc($result)) {
@@ -340,7 +340,7 @@ function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = fals
$schema_insert .= '</tr>';
if (! PMA_exportOutputHandler($schema_insert)) {
- return FALSE;
+ return false;
}
} // end while
PMA_DBI_free_result($result);
diff --git a/libraries/export/json.php b/libraries/export/json.php
index 40f4a4d..6f70dd4 100644
--- a/libraries/export/json.php
+++ b/libraries/export/json.php
@@ -174,7 +174,7 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query)
$buffer .= ']';
if (! PMA_exportOutputHandler($buffer)) {
- return FALSE;
+ return false;
}
PMA_DBI_free_result($result);
diff --git a/libraries/export/latex.php b/libraries/export/latex.php
index 2a434ae..9709dc4 100644
--- a/libraries/export/latex.php
+++ b/libraries/export/latex.php
@@ -118,7 +118,7 @@ function PMA_exportComment($text) {
* @access public
*/
function PMA_exportFooter() {
- return TRUE;
+ return true;
}
/**
@@ -174,7 +174,7 @@ function PMA_exportDBHeader($db) {
* @access public
*/
function PMA_exportDBFooter($db) {
- return TRUE;
+ return true;
}
/**
@@ -187,7 +187,7 @@ function PMA_exportDBFooter($db) {
* @access public
*/
function PMA_exportDBCreate($db) {
- return TRUE;
+ return true;
}
/**
@@ -226,7 +226,7 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) {
. '} \\label{' . PMA_expandUserString($GLOBALS['latex_data_label'], NULL, array('table' => $table, 'database' => $db)) . '} \\\\';
}
if (!PMA_exportOutputHandler($buffer)) {
- return FALSE;
+ return false;
}
// show column names
@@ -238,17 +238,17 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) {
$buffer = substr($buffer, 0, -2) . '\\\\ \\hline \hline ';
if (!PMA_exportOutputHandler($buffer . ' \\endfirsthead ' . $crlf)) {
- return FALSE;
+ return false;
}
if (isset($GLOBALS['latex_caption'])) {
- if (!PMA_exportOutputHandler('\\caption{' . PMA_expandUserString($GLOBALS['latex_data_continued_caption'], 'PMA_texEscape', array('table' => $table, 'database' => $db)) . '} \\\\ ')) return FALSE;
+ if (!PMA_exportOutputHandler('\\caption{' . PMA_expandUserString($GLOBALS['latex_data_continued_caption'], 'PMA_texEscape', array('table' => $table, 'database' => $db)) . '} \\\\ ')) return false;
}
if (!PMA_exportOutputHandler($buffer . '\\endhead \\endfoot' . $crlf)) {
- return FALSE;
+ return false;
}
} else {
if (!PMA_exportOutputHandler('\\\\ \hline')) {
- return FALSE;
+ return false;
}
}
@@ -274,17 +274,17 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) {
}
$buffer .= ' \\\\ \\hline ' . $crlf;
if (!PMA_exportOutputHandler($buffer)) {
- return FALSE;
+ return false;
}
}
$buffer = ' \\end{longtable}' . $crlf;
if (!PMA_exportOutputHandler($buffer)) {
- return FALSE;
+ return false;
}
PMA_DBI_free_result($result);
- return TRUE;
+ return true;
} // end getTableLaTeX
@@ -337,12 +337,12 @@ function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = fals
$res_rel = PMA_getForeigners($db, $table);
if ($res_rel && count($res_rel) > 0) {
- $have_rel = TRUE;
+ $have_rel = true;
} else {
- $have_rel = FALSE;
+ $have_rel = false;
}
} else {
- $have_rel = FALSE;
+ $have_rel = false;
} // end if
/**
@@ -351,7 +351,7 @@ function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = fals
$buffer = $crlf . '%' . $crlf . '% ' . __('Structure') . ': ' . $table . $crlf . '%' . $crlf
. ' \\begin{longtable}{';
if (!PMA_exportOutputHandler($buffer)) {
- return FALSE;
+ return false;
}
$columns_cnt = 4;
@@ -401,7 +401,7 @@ function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = fals
$buffer .= $header . ' \\\\ \\hline \\hline \\endhead \\endfoot ' . $crlf;
if (!PMA_exportOutputHandler($buffer)) {
- return FALSE;
+ return false;
}
while ($row = PMA_DBI_fetch_assoc($result)) {
@@ -475,7 +475,7 @@ function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = fals
$buffer .= ' \\\\ \\hline ' . $crlf;
if (!PMA_exportOutputHandler($buffer)) {
- return FALSE;
+ return false;
}
} // end while
PMA_DBI_free_result($result);
diff --git a/libraries/export/mediawiki.php b/libraries/export/mediawiki.php
index 9fa1b48..386b63e 100644
--- a/libraries/export/mediawiki.php
+++ b/libraries/export/mediawiki.php
@@ -32,7 +32,7 @@ if (isset($plugin_list)) {
* @return bool Whether it suceeded
*/
function PMA_exportComment($text) {
- return TRUE;
+ return true;
}
/**
@@ -43,7 +43,7 @@ function PMA_exportComment($text) {
* @access public
*/
function PMA_exportFooter() {
- return TRUE;
+ return true;
}
/**
@@ -54,7 +54,7 @@ function PMA_exportFooter() {
* @access public
*/
function PMA_exportHeader() {
- return TRUE;
+ return true;
}
/**
@@ -67,7 +67,7 @@ function PMA_exportHeader() {
* @access public
*/
function PMA_exportDBHeader($db) {
- return TRUE;
+ return true;
}
/**
@@ -80,7 +80,7 @@ function PMA_exportDBHeader($db) {
* @access public
*/
function PMA_exportDBFooter($db) {
- return TRUE;
+ return true;
}
/**
@@ -93,7 +93,7 @@ function PMA_exportDBFooter($db) {
* @access public
*/
function PMA_exportDBCreate($db) {
- return TRUE;
+ return true;
}
/**
diff --git a/libraries/export/ods.php b/libraries/export/ods.php
index 0533741..0237627 100644
--- a/libraries/export/ods.php
+++ b/libraries/export/ods.php
@@ -40,7 +40,7 @@ require_once './libraries/opendocument.lib.php';
* @return bool Whether it suceeded
*/
function PMA_exportComment($text) {
- return TRUE;
+ return true;
}
/**
@@ -55,9 +55,9 @@ function PMA_exportFooter() {
. '</office:body>'
. '</office:document-content>';
if (!PMA_exportOutputHandler(PMA_createOpenDocument('application/vnd.oasis.opendocument.spreadsheet', $GLOBALS['ods_buffer']))) {
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
/**
@@ -106,7 +106,7 @@ function PMA_exportHeader() {
. '</office:automatic-styles>'
. '<office:body>'
. '<office:spreadsheet>';
- return TRUE;
+ return true;
}
/**
@@ -119,7 +119,7 @@ function PMA_exportHeader() {
* @access public
*/
function PMA_exportDBHeader($db) {
- return TRUE;
+ return true;
}
/**
@@ -132,7 +132,7 @@ function PMA_exportDBHeader($db) {
* @access public
*/
function PMA_exportDBFooter($db) {
- return TRUE;
+ return true;
}
/**
@@ -145,7 +145,7 @@ function PMA_exportDBFooter($db) {
* @access public
*/
function PMA_exportDBCreate($db) {
- return TRUE;
+ return true;
}
/**
@@ -228,7 +228,7 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) {
$GLOBALS['ods_buffer'] .= '</table:table>';
- return TRUE;
+ return true;
}
}
diff --git a/libraries/export/odt.php b/libraries/export/odt.php
index 7af6013..2210a12 100644
--- a/libraries/export/odt.php
+++ b/libraries/export/odt.php
@@ -72,7 +72,7 @@ require_once './libraries/opendocument.lib.php';
* @return bool Whether it suceeded
*/
function PMA_exportComment($text) {
- return TRUE;
+ return true;
}
/**
@@ -87,9 +87,9 @@ function PMA_exportFooter() {
. '</office:body>'
. '</office:document-content>';
if (!PMA_exportOutputHandler(PMA_createOpenDocument('application/vnd.oasis.opendocument.text', $GLOBALS['odt_buffer']))) {
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
/**
@@ -104,7 +104,7 @@ function PMA_exportHeader() {
. '<office:document-content '. $GLOBALS['OpenDocumentNS'] . 'office:version="1.0">'
. '<office:body>'
. '<office:text>';
- return TRUE;
+ return true;
}
/**
@@ -118,7 +118,7 @@ function PMA_exportHeader() {
*/
function PMA_exportDBHeader($db) {
$GLOBALS['odt_buffer'] .= '<text:h text:outline-level="1" text:style-name="Heading_1" text:is-list-header="true">' . htmlspecialchars(__('Database') . ' ' . $db) . '</text:h>';
- return TRUE;
+ return true;
}
/**
@@ -131,7 +131,7 @@ function PMA_exportDBHeader($db) {
* @access public
*/
function PMA_exportDBFooter($db) {
- return TRUE;
+ return true;
}
/**
@@ -144,7 +144,7 @@ function PMA_exportDBFooter($db) {
* @access public
*/
function PMA_exportDBCreate($db) {
- return TRUE;
+ return true;
}
/**
@@ -217,7 +217,7 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) {
$GLOBALS['odt_buffer'] .= '</table:table>';
- return TRUE;
+ return true;
}
/**
@@ -272,12 +272,12 @@ function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = fals
$res_rel = PMA_getForeigners($db, $table);
if ($res_rel && count($res_rel) > 0) {
- $have_rel = TRUE;
+ $have_rel = true;
} else {
- $have_rel = FALSE;
+ $have_rel = false;
}
} else {
- $have_rel = FALSE;
+ $have_rel = false;
} // end if
/**
@@ -412,7 +412,7 @@ function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = fals
PMA_DBI_free_result($result);
$GLOBALS['odt_buffer'] .= '</table:table>';
- return TRUE;
+ return true;
} // end of the 'PMA_exportStructure' function
} // end else
diff --git a/libraries/export/pdf.php b/libraries/export/pdf.php
index 431df0d..fe9b46c 100644
--- a/libraries/export/pdf.php
+++ b/libraries/export/pdf.php
@@ -365,7 +365,7 @@ $pdf = new PMA_PDF('L', 'pt', 'A3');
*/
function PMA_exportComment($text)
{
- return TRUE;
+ return true;
}
/**
@@ -381,10 +381,10 @@ function PMA_exportFooter()
// instead of $pdf->Output():
if (!PMA_exportOutputHandler($pdf->getPDFData())) {
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
/**
@@ -412,7 +412,7 @@ function PMA_exportHeader()
$pdf->setAttributes($attr);
$pdf->setTopMargin(45);
- return TRUE;
+ return true;
}
/**
@@ -426,7 +426,7 @@ function PMA_exportHeader()
*/
function PMA_exportDBHeader($db)
{
- return TRUE;
+ return true;
}
/**
@@ -440,7 +440,7 @@ function PMA_exportDBHeader($db)
*/
function PMA_exportDBFooter($db)
{
- return TRUE;
+ return true;
}
/**
@@ -454,7 +454,7 @@ function PMA_exportDBFooter($db)
*/
function PMA_exportDBCreate($db)
{
- return TRUE;
+ return true;
}
/**
@@ -479,7 +479,7 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query)
$pdf->setAttributes($attr);
$pdf->mysql_report($sql_query);
- return TRUE;
+ return true;
} // end of the 'PMA_exportData()' function
}
?>
diff --git a/libraries/export/php_array.php b/libraries/export/php_array.php
index 983673c..2c3b4e6 100644
--- a/libraries/export/php_array.php
+++ b/libraries/export/php_array.php
@@ -167,7 +167,7 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query)
$buffer .= $crlf . ');' . $crlf;
if (! PMA_exportOutputHandler($buffer)) {
- return FALSE;
+ return false;
}
PMA_DBI_free_result($result);
diff --git a/libraries/export/sql.php b/libraries/export/sql.php
index 1530c53..55d330e 100644
--- a/libraries/export/sql.php
+++ b/libraries/export/sql.php
@@ -526,7 +526,7 @@ function PMA_exportDBCreate($db)
global $crlf;
if (isset($GLOBALS['sql_drop_database'])) {
if (!PMA_exportOutputHandler('DROP DATABASE ' . (isset($GLOBALS['sql_backquotes']) ? PMA_backquote($db) : $db) . ';' . $crlf)) {
- return FALSE;
+ return false;
}
}
$create_query = 'CREATE DATABASE ' . (isset($GLOBALS['sql_backquotes']) ? PMA_backquote($db) : $db);
@@ -538,7 +538,7 @@ function PMA_exportDBCreate($db)
}
$create_query .= ';' . $crlf;
if (!PMA_exportOutputHandler($create_query)) {
- return FALSE;
+ return false;
}
if (isset($GLOBALS['sql_backquotes']) && isset($GLOBALS['sql_compatibility']) && $GLOBALS['sql_compatibility'] == 'NONE') {
$result = PMA_exportOutputHandler('USE ' . PMA_backquote($db) . ';' . $crlf);
@@ -579,7 +579,7 @@ function PMA_exportDBFooter($db)
{
global $crlf;
- $result = TRUE;
+ $result = true;
if (isset($GLOBALS['sql_constraints'])) {
$result = PMA_exportOutputHandler($GLOBALS['sql_constraints']);
unset($GLOBALS['sql_constraints']);
@@ -688,7 +688,7 @@ function PMA_getTableDef($db, $table, $crlf, $error_url, $show_dates = false, $a
// need to use PMA_DBI_QUERY_STORE with PMA_DBI_num_rows() in mysqli
$result = PMA_DBI_query('SHOW TABLE STATUS FROM ' . PMA_backquote($db) . ' LIKE \'' . PMA_sqlAddslashes($table) . '\'', null, PMA_DBI_QUERY_STORE);
- if ($result != FALSE) {
+ if ($result != false) {
if (PMA_DBI_num_rows($result) > 0) {
$tmpres = PMA_DBI_fetch_assoc($result);
// Here we optionally add the AUTO_INCREMENT next value,
@@ -747,7 +747,7 @@ function PMA_getTableDef($db, $table, $crlf, $error_url, $show_dates = false, $a
return PMA_exportComment(__('in use') . '(' . $tmp_error . ')');
}
- if ($result != FALSE && ($row = PMA_DBI_fetch_row($result))) {
+ if ($result != false && ($row = PMA_DBI_fetch_row($result))) {
$create_query = $row[1];
unset($row);
@@ -821,13 +821,13 @@ function PMA_getTableDef($db, $table, $crlf, $error_url, $show_dates = false, $a
$sql_constraints .= 'ALTER TABLE ' . PMA_backquote($table) . $crlf;
$sql_drop_foreign_keys .= 'ALTER TABLE ' . PMA_backquote($db) . '.' . PMA_backquote($table) . $crlf;
- $first = TRUE;
+ $first = true;
for ($j = $i; $j < $sql_count; $j++) {
if (preg_match('@CONSTRAINT|FOREIGN[\s]+KEY@', $sql_lines[$j])) {
if (!$first) {
$sql_constraints .= $crlf;
}
- if (strpos($sql_lines[$j], 'CONSTRAINT') === FALSE) {
+ if (strpos($sql_lines[$j], 'CONSTRAINT') === false) {
$tmp_str = preg_replace('/(FOREIGN[\s]+KEY)/', 'ADD \1', $sql_lines[$j]);
$sql_constraints_query .= $tmp_str;
$sql_constraints .= $tmp_str;
@@ -841,7 +841,7 @@ function PMA_getTableDef($db, $table, $crlf, $error_url, $show_dates = false, $a
}
$sql_drop_foreign_keys .= 'DROP FOREIGN KEY ' . $matches[3];
}
- $first = FALSE;
+ $first = false;
} else {
break;
}
@@ -895,12 +895,12 @@ function PMA_getTableComments($db, $table, $crlf, $do_relation = false, $do_mim
$res_rel = PMA_getForeigners($db, $table);
if ($res_rel && count($res_rel) > 0) {
- $have_rel = TRUE;
+ $have_rel = true;
} else {
- $have_rel = FALSE;
+ $have_rel = false;
}
} else {
- $have_rel = FALSE;
+ $have_rel = false;
} // end if
if ($do_mime && $cfgRelation['mimework']) {
@@ -958,7 +958,7 @@ function PMA_getTableComments($db, $table, $crlf, $do_relation = false, $do_mim
*
* @access public
*/
-function PMA_exportStructure($db, $table, $crlf, $error_url, $relation = FALSE, $comments = FALSE, $mime = FALSE, $dates = FALSE, $export_mode, $export_type)
+function PMA_exportStructure($db, $table, $crlf, $error_url, $relation = false, $comments = false, $mime = false, $dates = false, $export_mode, $export_type)
{
$formatted_table_name = (isset($GLOBALS['sql_backquotes']))
? PMA_backquote($table)
@@ -1058,7 +1058,7 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query)
. PMA_possibleCRLF();
if (! PMA_exportOutputHandler($head)) {
- return FALSE;
+ return false;
}
return true;
}
@@ -1078,7 +1078,7 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query)
return PMA_exportOutputHandler(PMA_exportComment(__('in use') . ' (' . $tmp_error . ')'));
}
- if ($result != FALSE) {
+ if ($result != false) {
$fields_cnt = PMA_DBI_num_fields($result);
// Get field information
@@ -1155,7 +1155,7 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query)
. PMA_exportComment()
. $crlf;
if (! PMA_exportOutputHandler($head)) {
- return FALSE;
+ return false;
}
}
$current_row++;
@@ -1221,7 +1221,7 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query)
$insert_line = '(' . implode(', ', $values) . ')';
if (isset($GLOBALS['sql_max_query_size']) && $GLOBALS['sql_max_query_size'] > 0 && $query_size + strlen($insert_line) > $GLOBALS['sql_max_query_size']) {
if (!PMA_exportOutputHandler(';' . $crlf)) {
- return FALSE;
+ return false;
}
$query_size = 0;
$current_row = 1;
@@ -1238,19 +1238,19 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query)
unset($values);
if (!PMA_exportOutputHandler(($current_row == 1 ? '' : $separator . $crlf) . $insert_line)) {
- return FALSE;
+ return false;
}
} // end while
if ($current_row > 0) {
if (!PMA_exportOutputHandler(';' . $crlf)) {
- return FALSE;
+ return false;
}
}
- } // end if ($result != FALSE)
+ } // end if ($result != false)
PMA_DBI_free_result($result);
- return TRUE;
+ return true;
} // end of the 'PMA_exportData()' function
}
?>
diff --git a/libraries/export/texytext.php b/libraries/export/texytext.php
index 1895bcf..d15b43e 100644
--- a/libraries/export/texytext.php
+++ b/libraries/export/texytext.php
@@ -39,7 +39,7 @@ if (isset($plugin_list)) {
* @return bool Whether it suceeded
*/
function PMA_exportComment($text) {
- return TRUE;
+ return true;
}
/**
@@ -87,7 +87,7 @@ function PMA_exportDBHeader($db) {
* @access public
*/
function PMA_exportDBFooter($db) {
- return TRUE;
+ return true;
}
/**
@@ -100,7 +100,7 @@ function PMA_exportDBFooter($db) {
* @access public
*/
function PMA_exportDBCreate($db) {
- return TRUE;
+ return true;
}
/**
@@ -121,7 +121,7 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query)
global $what;
if (! PMA_exportOutputHandler('== ' . __('Dumping data for table') . ' ' . $table . "\n\n")) {
- return FALSE;
+ return false;
}
// Gets the data from the database
@@ -136,7 +136,7 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query)
} // end for
$text_output .= "\n|------\n";
if (! PMA_exportOutputHandler($text_output)) {
- return FALSE;
+ return false;
}
} // end if
@@ -155,12 +155,12 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query)
} // end for
$text_output .= "\n";
if (! PMA_exportOutputHandler($text_output)) {
- return FALSE;
+ return false;
}
} // end while
PMA_DBI_free_result($result);
- return TRUE;
+ return true;
}
function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = false, $do_comments = false, $do_mime = false, $dates = false, $dummy)
@@ -168,7 +168,7 @@ function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = fals
global $cfgRelation;
if (! PMA_exportOutputHandler('== ' . __('Table structure for table') . ' ' .$table . "\n\n")) {
- return FALSE;
+ return false;
}
/**
@@ -199,12 +199,12 @@ function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = fals
$res_rel = PMA_getForeigners($db, $table);
if ($res_rel && count($res_rel) > 0) {
- $have_rel = TRUE;
+ $have_rel = true;
} else {
- $have_rel = FALSE;
+ $have_rel = false;
}
} else {
- $have_rel = FALSE;
+ $have_rel = false;
} // end if
/**
@@ -241,7 +241,7 @@ function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = fals
$text_output .= "\n|------\n";
if (! PMA_exportOutputHandler($text_output)) {
- return FALSE;
+ return false;
}
while ($row = PMA_DBI_fetch_assoc($result)) {
@@ -319,7 +319,7 @@ function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = fals
$text_output .= "\n";
if (! PMA_exportOutputHandler($text_output)) {
- return FALSE;
+ return false;
}
} // end while
PMA_DBI_free_result($result);
diff --git a/libraries/export/xls.php b/libraries/export/xls.php
index 599025d..01e2ae4 100644
--- a/libraries/export/xls.php
+++ b/libraries/export/xls.php
@@ -43,7 +43,7 @@ require_once './libraries/PHPExcel/PHPExcel/Writer/Excel5.php';
* @return bool Whether it suceeded
*/
function PMA_exportComment($text) {
- return TRUE;
+ return true;
}
/**
@@ -64,7 +64,7 @@ function PMA_exportFooter() {
$workbookWriter->save($tmp_filename);
if (!PMA_exportOutputHandler(file_get_contents($tmp_filename))) {
- return FALSE;
+ return false;
}
unlink($tmp_filename);
@@ -72,7 +72,7 @@ function PMA_exportFooter() {
unset($GLOBALS['workbook']);
unset($GLOBALS['sheet_index']);
- return TRUE;
+ return true;
}
/**
@@ -95,7 +95,7 @@ function PMA_exportHeader() {
$workbook->getProperties()->setTitle($db);
$workbook->getProperties()->setSubject('phpMyAdmin ' . PMA_VERSION . ' XLS Dump');
- return TRUE;
+ return true;
}
/**
@@ -110,7 +110,7 @@ function PMA_exportHeader() {
function PMA_exportDBHeader($db) {
- return TRUE;
+ return true;
}
/**
@@ -123,7 +123,7 @@ function PMA_exportDBHeader($db) {
* @access public
*/
function PMA_exportDBFooter($db) {
- return TRUE;
+ return true;
}
/**
@@ -136,7 +136,7 @@ function PMA_exportDBFooter($db) {
* @access public
*/
function PMA_exportDBCreate($db) {
- return TRUE;
+ return true;
}
/**
@@ -200,7 +200,7 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) {
$sheet_index++;
}
- return TRUE;
+ return true;
}
}
diff --git a/libraries/export/xlsx.php b/libraries/export/xlsx.php
index 89c5288..190cd2f 100644
--- a/libraries/export/xlsx.php
+++ b/libraries/export/xlsx.php
@@ -43,7 +43,7 @@ require_once './libraries/PHPExcel/PHPExcel/Writer/Excel2007.php';
* @return bool Whether it suceeded
*/
function PMA_exportComment($text) {
- return TRUE;
+ return true;
}
/**
@@ -63,7 +63,7 @@ function PMA_exportFooter() {
$workbookWriter->save($tmp_filename);
if (!PMA_exportOutputHandler(file_get_contents($tmp_filename))) {
- return FALSE;
+ return false;
}
unlink($tmp_filename);
@@ -71,7 +71,7 @@ function PMA_exportFooter() {
unset($GLOBALS['workbook']);
unset($GLOBALS['sheet_index']);
- return TRUE;
+ return true;
}
/**
@@ -94,7 +94,7 @@ function PMA_exportHeader() {
$workbook->getProperties()->setTitle($db);
$workbook->getProperties()->setSubject('phpMyAdmin ' . PMA_VERSION . ' XLSX Dump');
- return TRUE;
+ return true;
}
/**
@@ -109,7 +109,7 @@ function PMA_exportHeader() {
function PMA_exportDBHeader($db) {
- return TRUE;
+ return true;
}
/**
@@ -122,7 +122,7 @@ function PMA_exportDBHeader($db) {
* @access public
*/
function PMA_exportDBFooter($db) {
- return TRUE;
+ return true;
}
/**
@@ -135,7 +135,7 @@ function PMA_exportDBFooter($d ) { ' . PMA_VERSION . ' XLSX Dump'); on = fals , $do_mime = false, $dates = false, $dummy) BALS['sql_max_query_size']) { ; '} \\\\ ')) return false; n.html#faq1_16 at Documentation]FAQ 1.16[/a].')); PÊÿÿ Éÿÿ ë]
g/+ 6 è è! è! ÐÔÿÿ @Õÿÿ xô¡h/+ PËÿÿ "A
g/+ ^
g/+ ÐÔÿÿ ð@
g/+ Õÿÿ Àïi/+ óH
g/+ ài/+ Øäi/+ ¨éi/+ ÈÄg/+ xô¡h/+ PËÿÿ Êÿÿ ë]
g/+ à! à! ÐÔÿÿ @Õÿÿ Ƚh/+ 0Ìÿÿ "A
g/+ ^
g/+ ÐÔÿÿ ð@
g/+ Õÿÿ Õÿÿ øÔÿÿ [¦g/+ p @Õÿÿ óH
g/+ ÈÄg/+ 0Ìÿÿ Ëÿÿ ë]
g/+ G H I J K M N O P ÐÔÿÿ @Õÿÿ HuXh/+ ÐÍÿÿ "A
g/+ ^
g/+ ÐÔÿÿ 0ïi/+ óH
g/+ ¢h/+ ©5h/+ ài/+ Øäi/+ ¨éi/+ ÈÄg/+ HuXh/+ ÐÍÿÿ Ìÿÿ ë]
g/+ 8uXh/+ ÐÍÿÿ @Ìÿÿ ë]
g/+ (uXh/+ ÐÍÿÿ pÌÿÿ ë]
g/+ uXh/+ ÐÍÿÿ Ìÿÿ ë]
g/+ ¨îi/+ óH
g/+ ¨éi/+ Çÿÿ ø5h/+ æG
g/+ Øäi/+ @Íÿÿ yø5h/+ æG
g/+ ài/+ pÍÿÿ Zø5h/+ æG
g/+ ؤ5h/+ ¢h/+ ©5h/+ ài/+ Ø¢h/+ Øäi/+ ¨éi/+ ÈÄg/+ àí3h/+ ðÎÿÿ ÀÍÿÿ ë]
g/+ # % ' ) * - . 0 3 5 6 7 8 : < = ÐÔÿÿ @Õÿÿ p+ h/+ Ðÿÿ "A
g/+ 8¢h/+ óH
g/+ Ø¢h/+ ¢h/+ ÈÄg/+ c f mÌg/+ @Õÿÿ p+ h/+ Ðÿÿ àÎÿÿ ë]
g/+ Ó%°æ§ìwqÒ-øÒ êÓïs¨Ó,~9×u]ÞÓ 4Q ÷U^Qʧ ¶uª¹ñìò*Äv´Òg/+ Öÿÿ Fii/+ Fii/+ ?UÏg/+ @Öÿÿ Íÿÿ `Ñÿÿ mÌg/+ æG
g/+ èT¦g/+ À×ÿÿ Bii/+ Öÿÿ Õÿÿ õì¦g/+ @Õÿÿ ÿÿÿÿÿÿÿÿBii/+ HÕÿÿ ë]
g b) {
* @access public
*/
function PMA_exportDBCreate($db) {
- return TRUE;
+ return true;
}
/**
@@ -199,7 +199,7 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) {
$sheet_index++;
}
- return TRUE;
+ return true;
}
}
diff --git a/libraries/export/xml.php b/libraries/export/xml.php
index 55b272d..e27bd2f 100644
--- a/libraries/export/xml.php
+++ b/libraries/export/xml.php
@@ -263,7 +263,7 @@ function PMA_exportDBHeader($db) {
}
else
{
- return TRUE;
+ return true;
}
}
@@ -285,7 +285,7 @@ function PMA_exportDBFooter($db) {
}
else
{
- return TRUE;
+ return true;
}
}
@@ -299,7 +299,7 @@ function PMA_exportDBFooter($db) {
* @access public
*/
function PMA_exportDBCreate($db) {
- return TRUE;
+ return true;
}
@@ -330,7 +330,7 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) {
$buffer = ' <!-- ' . __('Table') . ' ' . $table . ' -->' . $crlf;
if (!PMA_exportOutputHandler($buffer)) {
- return FALSE;
+ return false;
}
while ($record = PMA_DBI_fetch_row($result)) {
@@ -346,13 +346,13 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) {
$buffer .= ' </table>' . $crlf;
if (!PMA_exportOutputHandler($buffer)) {
- return FALSE;
+ return false;
}
}
PMA_DBI_free_result($result);
}
- return TRUE;
+ return true;
} // end of the 'PMA_getTableXML()' function
}
}
diff --git a/libraries/export/yaml.php b/libraries/export/yaml.php
index 550eb1d..9d9f7e5 100644
--- a/libraries/export/yaml.php
+++ b/libraries/export/yaml.php
@@ -173,7 +173,7 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query)
}
if (! PMA_exportOutputHandler($buffer)) {
- return FALSE;
+ return false;
}
}
PMA_DBI_free_result($result);
diff --git a/libraries/file_listing.php b/libraries/file_listing.php
index 1ca9711..ff1cf9d 100644
--- a/libraries/file_listing.php
+++ b/libraries/file_listing.php
@@ -12,7 +12,7 @@
*
* @param string directory to list
* @param string regular expression to match files
- * @returns array sorted file list on success, FALSE on failure
+ * @returns array sorted file list on success, false on failure
*/
function PMA_getDirContent($dir, $expression = '')
{
@@ -32,7 +32,7 @@ function PMA_getDirContent($dir, $expression = '')
asort($result);
return $result;
} else {
- return FALSE;
+ return false;
}
}
@@ -42,13 +42,13 @@ function PMA_getDirContent($dir, $expression = '')
* @param string directory to list
* @param string regullar expression to match files
* @param string currently active choice
- * @returns array sorted file list on success, FALSE on failure
+ * @returns array sorted file list on success, false on failure
*/
function PMA_getFileSelectOptions($dir, $extensions = '', $active = '')
{
$list = PMA_getDirContent($dir, $extensions);
- if ($list === FALSE) {
- return FALSE;
+ if ($list === false) {
+ return false;
}
$result = '';
foreach ($list as $key => $val) {
diff --git a/libraries/header_printview.inc.php b/libraries/header_printview.inc.php
index a96fb74..bef4658 100644
--- a/libraries/header_printview.inc.php
+++ b/libraries/header_printview.inc.php
@@ -69,5 +69,5 @@ if ($text_dir == 'ltr') {
/**
* Sets a variable to remember headers have been sent
*/
-$is_header_sent = TRUE;
+$is_header_sent = true;
?>
diff --git a/libraries/iconv_wrapper.lib.php b/libraries/iconv_wrapper.lib.php
index 2efd615..1f00c13 100644
--- a/libraries/iconv_wrapper.lib.php
+++ b/libraries/iconv_wrapper.lib.php
@@ -44,7 +44,7 @@ $gnu_iconv_to_aix_iconv_codepage_map = array (
* @param string output character set
* @param string the string to convert
*
- * @return mixed converted string or FALSE on failure
+ * @return mixed converted string or false on failure
*
* @access public
*
@@ -55,7 +55,7 @@ function PMA_aix_iconv_wrapper($in_charset, $out_charset, $str) {
// Check for transliteration argument at the end of output character set name
$translit_search = strpos(strtolower($out_charset), '//translit');
- $using_translit = (!($translit_search === FALSE));
+ $using_translit = (!($translit_search === false));
// Extract "plain" output character set name (without any transliteration argument)
$out_charset_plain = ($using_translit ? substr($out_charset, 0, $translit_search) : $out_charset);
diff --git a/libraries/import.lib.php b/libraries/import.lib.php
index 54858a6..11ae523 100644
--- a/libraries/import.lib.php
+++ b/libraries/import.lib.php
@@ -29,15 +29,15 @@ function PMA_checkTimeout()
{
global $timestamp, $maximum_time, $timeout_passed;
if ($maximum_time == 0) {
- return FALSE;
+ return false;
} elseif ($timeout_passed) {
- return TRUE;
+ return true;
/* 5 in next row might be too much */
} elseif ((time() - $timestamp) > ($maximum_time - 5)) {
- $timeout_passed = TRUE;
- return TRUE;
+ $timeout_passed = true;
+ return true;
} else {
- return FALSE;
+ return false;
}
}
@@ -52,7 +52,7 @@ function PMA_detectCompression($filepath)
{
$file = @fopen($filepath, 'rb');
if (!$file) {
- return FALSE;
+ return false;
}
$test = fread($file, 4);
$len = strlen($test);
@@ -101,14 +101,14 @@ function PMA_importRunQuery($sql = '', $full = '', $controluser = false)
&& !$is_superuser
&& preg_match('@^[[:space:]]*DROP[[:space:]]+(IF EXISTS[[:space:]]+)?DATABASE @i', $import_run_buffer['sql'])) {
$GLOBALS['message'] = PMA_Message::error(__('"DROP DATABASE" statements are disabled.'));
- $error = TRUE;
+ $error = true;
} else {
$executed_queries++;
if ($run_query && $GLOBALS['finished'] && empty($sql) && !$error && (
(!empty($import_run_buffer['sql']) && preg_match('/^[\s]*(SELECT|SHOW|HANDLER)/i', $import_run_buffer['sql'])) ||
($executed_queries == 1)
)) {
- $go_sql = TRUE;
+ $go_sql = true;
if (!$sql_query_disabled) {
$complete_query = $sql_query;
$display_query = $sql_query;
@@ -126,7 +126,7 @@ function PMA_importRunQuery($sql = '', $full = '', $controluser = false)
$result = PMA_DBI_try_query($import_run_buffer['sql']);
}
$msg = '# ';
- if ($result === FALSE) { // execution failed
+ if ($result === false) { // execution failed
if (! isset($my_die)) {
$my_die = array();
}
@@ -137,7 +137,7 @@ function PMA_importRunQuery($sql = '', $full = '', $controluser = false)
}
if (!$cfg['IgnoreMultiSubmitErrors']) {
- $error = TRUE;
+ $error = true;
return;
}
} elseif ($cfg['VerboseMultiSubmit']) {
@@ -158,12 +158,12 @@ function PMA_importRunQuery($sql = '', $full = '', $controluser = false)
}
// If a 'USE <db>' SQL-clause was found and the query succeeded, set our current $db to the new one
- if ($result != FALSE) {
+ if ($result != false) {
list($db, $reload) = PMA_lookForUse($import_run_buffer['sql'], $db, $reload);
}
- if ($result != FALSE && preg_match('@^[\s]*(DROP|CREATE)[\s]+(IF EXISTS[[:space:]]+)?(TABLE|DATABASE)[[:space:]]+(.+)@im', $import_run_buffer['sql'])) {
- $reload = TRUE;
+ if ($result != false && preg_match('@^[\s]*(DROP|CREATE)[\s]+(IF EXISTS[[:space:]]+)?(TABLE|DATABASE)[[:space:]]+(.+)@im', $import_run_buffer['sql'])) {
+ $reload = true;
}
} // end run query
} // end if not DROP DATABASE
@@ -185,12 +185,12 @@ function PMA_importRunQuery($sql = '', $full = '', $controluser = false)
if ($cfg['VerboseMultiSubmit'] && ! empty($sql_query)) {
if (strlen($sql_query) > 50000 || $executed_queries > 50 || $max_sql_len > 1000) {
$sql_query = '';
- $sql_query_disabled = TRUE;
+ $sql_query_disabled = true;
}
} else {
if (strlen($sql_query) > 10000 || $executed_queries > 10 || $max_sql_len > 500) {
$sql_query = '';
- $sql_query_disabled = TRUE;
+ $sql_query_disabled = true;
}
}
}
@@ -219,7 +219,7 @@ function PMA_lookForUse($buffer, $db, $reload)
if (preg_match('@^[\s]*USE[[:space:]]*([\S]+)@i', $buffer, $match)) {
$db = trim($match[1]);
$db = trim($db,';'); // for example, USE abc;
- $reload = TRUE;
+ $reload = true;
}
return(array($db, $reload));
}
@@ -257,16 +257,16 @@ function PMA_importGetNextChunk($size = 32768)
}
if (PMA_checkTimeout()) {
- return FALSE;
+ return false;
}
if ($GLOBALS['finished']) {
- return TRUE;
+ return true;
}
if ($GLOBALS['import_file'] == 'none') {
// Well this is not yet supported and tested, but should return content of textarea
if (strlen($GLOBALS['import_text']) < $size) {
- $GLOBALS['finished'] = TRUE;
+ $GLOBALS['finished'] = true;
return $GLOBALS['import_text'];
} else {
$r = substr($GLOBALS['import_text'], 0, $size);
diff --git a/libraries/import/README b/libraries/import/README
index 6cb7d10..0f0d3d3 100644
--- a/libraries/import/README
+++ b/libraries/import/README
@@ -22,11 +22,11 @@ if (isset($plugin_list)) {
$buffer = '';
while (!($finished && $i >= $len) && !$error && !$timeout_passed) {
$data = PMA_importGetNextChunk();
- if ($data === FALSE) {
+ if ($data === false) {
// subtract data we didn't handle yet and stop processing
$offset -= strlen($buffer);
break;
- } elseif ($data === TRUE) {
+ } elseif ($data === true) {
// Handle rest of buffer
} else {
// Append new data to buffer
diff --git a/libraries/import/csv.php b/libraries/import/csv.php
index 757e3b4..6386333 100644
--- a/libraries/import/csv.php
+++ b/libraries/import/csv.php
@@ -56,12 +56,12 @@ $csv_enclosed = strtr($csv_enclosed, $replacements);
$csv_escaped = strtr($csv_escaped, $replacements);
$csv_new_line = strtr($csv_new_line, $replacements);
-$param_error = FALSE;
+$param_error = false;
if (strlen($csv_terminated) != 1) {
$message = PMA_Message::error(__('Invalid parameter for CSV import: %s'));
$message->addParam(__('Columns terminated by'), false);
- $error = TRUE;
- $param_error = TRUE;
+ $error = true;
+ $param_error = true;
// The default dialog of MS Excel when generating a CSV produces a
// semi-colon-separated file with no chance of specifying the
// enclosing character. Thus, users who want to import this file
@@ -73,18 +73,18 @@ if (strlen($csv_terminated) != 1) {
} elseif (strlen($csv_enclosed) > 1) {
$message = PMA_Message::error(__('Invalid parameter for CSV import: %s'));
$message->addParam(__('Columns enclosed by'), false);
- $error = TRUE;
- $param_error = TRUE;
+ $error = true;
+ $param_error = true;
} elseif (strlen($csv_escaped) != 1) {
$message = PMA_Message::error(__('Invalid parameter for CSV import: %s'));
$message->addParam(__('Columns escaped by'), false);
- $error = TRUE;
- $param_error = TRUE;
+ $error = true;
+ $param_error = true;
} elseif (strlen($csv_new_line) != 1 && $csv_new_line != 'auto') {
$message = PMA_Message::error(__('Invalid parameter for CSV import: %s'));
$message->addParam(__('Lines terminated by'), false);
- $error = TRUE;
- $param_error = TRUE;
+ $error = true;
+ $param_error = true;
}
// If there is an error in the parameters entered, indicate that immediately.
@@ -120,17 +120,17 @@ if (!$analyze) {
}
/* Trim also `, if user already included backquoted fields */
$val = trim($val, " \t\r\n\0\x0B`");
- $found = FALSE;
+ $found = false;
foreach ($tmp_fields as $id => $field) {
if ($field['Field'] == $val) {
- $found = TRUE;
+ $found = true;
break;
}
}
if (!$found) {
$message = PMA_Message::error(__('Invalid column (%s) specified! Ensure that columns names are spelled correctly, separated by commas, and not enclosed in quotes.' ));
$message->addParam($val);
- $error = TRUE;
+ $error = true;
break;
}
$fields[] = $field;
@@ -150,7 +150,7 @@ $len = 0;
$line = 1;
$lasti = -1;
$values = array();
-$csv_finish = FALSE;
+$csv_finish = false;
$tempRow = array();
$rows = array();
@@ -162,19 +162,19 @@ $max_cols = 0;
while (!($finished && $i >= $len) && !$error && !$timeout_passed) {
$data = PMA_importGetNextChunk();
- if ($data === FALSE) {
+ if ($data === false) {
// subtract data we didn't handle yet and stop processing
$offset -= strlen($buffer);
break;
- } elseif ($data === TRUE) {
+ } elseif ($data === true) {
// Handle rest of buffer
} else {
// Append new data to buffer
$buffer .= $data;
unset($data);
// Do not parse string when we're not at the end and don't have new line inside
- if (($csv_new_line == 'auto' && strpos($buffer, "\r") === FALSE && strpos($buffer, "\n") === FALSE)
- || ($csv_new_line != 'auto' && strpos($buffer, $csv_new_line) === FALSE)) {
+ if (($csv_new_line == 'auto' && strpos($buffer, "\r") === false && strpos($buffer, "\n") === false)
+ || ($csv_new_line != 'auto' && strpos($buffer, $csv_new_line) === false)) {
continue;
}
}
@@ -188,7 +188,7 @@ while (!($finished && $i >= $len) && !$error && !$timeout_passed) {
if ($lasti == $i && $lastlen == $len) {
$message = PMA_Message::error(__('Invalid format of CSV input on line %d.'));
$message->addParam($line);
- $error = TRUE;
+ $error = true;
break;
}
$lasti = $i;
@@ -213,13 +213,13 @@ while (!($finished && $i >= $len) && !$error && !$timeout_passed) {
if ($i == $len - 1) {
break;
}
- $need_end = TRUE;
+ $need_end = true;
$i++;
$ch = $buffer[$i];
} else {
- $need_end = FALSE;
+ $need_end = false;
}
- $fail = FALSE;
+ $fail = false;
$value = '';
while (($need_end && $ch != $csv_enclosed)
|| (!$need_end && !($ch == $csv_terminated
@@ -227,7 +227,7 @@ while (!($finished && $i >= $len) && !$error && !$timeout_passed) {
&& ($ch == "\r" || $ch == "\n"))))) {
if ($ch == $csv_escaped) {
if ($i == $len - 1) {
- $fail = TRUE;
+ $fail = true;
break;
}
$i++;
@@ -236,7 +236,7 @@ while (!($finished && $i >= $len) && !$error && !$timeout_passed) {
$value .= $ch;
if ($i == $len - 1) {
if (!$finished) {
- $fail = TRUE;
+ $fail = true;
}
break;
}
@@ -269,7 +269,7 @@ while (!($finished && $i >= $len) && !$error && !$timeout_passed) {
}
// Are we at the end?
if ($ch == $csv_new_line || ($csv_new_line == 'auto' && ($ch == "\r" || $ch == "\n")) || ($finished && $i == $len - 1)) {
- $csv_finish = TRUE;
+ $csv_finish = true;
}
// Go to next char
if ($ch == $csv_terminated) {
@@ -323,12 +323,12 @@ while (!($finished && $i >= $len) && !$error && !$timeout_passed) {
} else {
$message = PMA_Message::error(__('Invalid column count in CSV input on line %d.'));
$message->addParam($line);
- $error = TRUE;
+ $error = true;
break;
}
}
- $first = TRUE;
+ $first = true;
$sql = $sql_template;
foreach ($values as $key => $val) {
if (!$first) {
@@ -340,7 +340,7 @@ while (!($finished && $i >= $len) && !$error && !$timeout_passed) {
$sql .= '\'' . addslashes($val) . '\'';
}
- $first = FALSE;
+ $first = false;
}
$sql .= ')';
@@ -351,7 +351,7 @@ while (!($finished && $i >= $len) && !$error && !$timeout_passed) {
}
$line++;
- $csv_finish = FALSE;
+ $csv_finish = false;
$values = array();
$buffer = substr($buffer, $i + 1);
$len = strlen($buffer);
@@ -435,6 +435,6 @@ PMA_importRunQuery();
if (count($values) != 0 && !$error) {
$message = PMA_Message::error(__('Invalid format of CSV input on line %d.'));
$message->addParam($line);
- $error = TRUE;
+ $error = true;
}
?>
diff --git a/libraries/import/docsql.php b/libraries/import/docsql.php
index a64a094..f032e95 100644
--- a/libraries/import/docsql.php
+++ b/libraries/import/docsql.php
@@ -42,10 +42,10 @@ $buffer = '';
/* Read whole buffer, we except it is small enough */
while (!$finished && !$error && !$timeout_passed) {
$data = PMA_importGetNextChunk();
- if ($data === FALSE) {
+ if ($data === false) {
// subtract data we didn't handle yet and stop processing
break;
- } elseif ($data === TRUE) {
+ } elseif ($data === true) {
// nothing to read
break;
} else {
@@ -54,7 +54,7 @@ while (!$finished && !$error && !$timeout_passed) {
}
} // End of import loop
/* Process the data */
-if ($data === TRUE && !$error && !$timeout_passed) {
+if ($data === true && !$error && !$timeout_passed) {
$buffer = str_replace("\r\n", "\n", $buffer);
$buffer = str_replace("\r", "\n", $buffer);
$lines = explode("\n", $buffer);
diff --git a/libraries/import/ldi.php b/libraries/import/ldi.php
index e6eb56d..979013d 100644
--- a/libraries/import/ldi.php
+++ b/libraries/import/ldi.php
@@ -18,13 +18,13 @@ if ($plugin_param !== 'table') {
if (isset($plugin_list)) {
if ($GLOBALS['cfg']['Import']['ldi_local_option'] == 'auto') {
- $GLOBALS['cfg']['Import']['ldi_local_option'] = FALSE;
+ $GLOBALS['cfg']['Import']['ldi_local_option'] = false;
$result = PMA_DBI_try_query('SHOW VARIABLES LIKE \'local\\_infile\';');
- if ($result != FALSE && PMA_DBI_num_rows($result) > 0) {
+ if ($result != false && PMA_DBI_num_rows($result) > 0) {
$tmp = PMA_DBI_fetch_row($result);
if ($tmp[1] == 'ON') {
- $GLOBALS['cfg']['Import']['ldi_local_option'] = TRUE;
+ $GLOBALS['cfg']['Import']['ldi_local_option'] = true;
}
}
PMA_DBI_free_result($result);
@@ -54,7 +54,7 @@ if (isset($plugin_list)) {
if ($import_file == 'none' || $compression != 'none' || $charset_conversion) {
// We handle only some kind of data!
$message = PMA_Message::error(__('This plugin does not support compressed imports!'));
- $error = TRUE;
+ $error = true;
return;
}
@@ -105,5 +105,5 @@ if (strlen($ldi_columns) > 0) {
PMA_importRunQuery($sql, $sql);
PMA_importRunQuery();
-$finished = TRUE;
+$finished = true;
?>
diff --git a/libraries/import/ods.php b/libraries/import/ods.php
index 4bf5200..9d41bb4 100644
--- a/libraries/import/ods.php
+++ b/libraries/import/ods.php
@@ -48,11 +48,11 @@ $buffer = "";
*/
while (! ($finished && $i >= $len) && ! $error && ! $timeout_passed) {
$data = PMA_importGetNextChunk();
- if ($data === FALSE) {
+ if ($data === false) {
/* subtract data we didn't handle yet and stop processing */
$offset -= strlen($buffer);
break;
- } elseif ($data === TRUE) {
+ } elseif ($data === true) {
/* Handle rest of buffer */
} else {
/* Append new data to buffer */
@@ -74,11 +74,11 @@ $xml = simplexml_load_string($buffer, "SimpleXMLElement", LIBXML_COMPACT);
unset($buffer);
-if ($xml === FALSE) {
+if ($xml === false) {
$sheets = array();
/* TODO: this message should be improved later, used existing because of string freeze */
$message = PMA_Message::error(__('Error in Processing Request'));
- $error = TRUE;
+ $error = true;
} else {
$sheets = $xml->children('office', true)->{'body'}->{'spreadsheet'}->children('table', true);
}
diff --git a/libraries/import/sql.php b/libraries/import/sql.php
index 0e61080..4bb65d6 100644
--- a/libraries/import/sql.php
+++ b/libraries/import/sql.php
@@ -93,11 +93,11 @@ $GLOBALS['finished'] = false;
while (!($GLOBALS['finished'] && $i >= $len) && !$error && !$timeout_passed) {
$data = PMA_importGetNextChunk();
- if ($data === FALSE) {
+ if ($data === false) {
// subtract data we didn't handle yet and stop processing
$offset -= strlen($buffer);
break;
- } elseif ($data === TRUE) {
+ } elseif ($data === true) {
// Handle rest of buffer
} else {
// Append new data to buffer
@@ -105,7 +105,7 @@ while (!($GLOBALS['finished'] && $i >= $len) && !$error && !$timeout_passed) {
// free memory
unset($data);
// Do not parse string when we're not at the end and don't have ; inside
- if ((strpos($buffer, $sql_delimiter, $i) === FALSE) && !$GLOBALS['finished']) {
+ if ((strpos($buffer, $sql_delimiter, $i) === false) && !$GLOBALS['finished']) {
continue;
}
}
@@ -132,7 +132,7 @@ while (!($GLOBALS['finished'] && $i >= $len) && !$error && !$timeout_passed) {
*/
// the cost of doing this one with preg_match() would be too high
$first_sql_delimiter = strpos($buffer, $sql_delimiter, $i);
- if ($first_sql_delimiter === FALSE) {
+ if ($first_sql_delimiter === false) {
$first_sql_delimiter = $big_value;
} else {
$found_delimiter = true;
@@ -162,9 +162,9 @@ while (!($GLOBALS['finished'] && $i >= $len) && !$error && !$timeout_passed) {
$ch = $buffer[$i];
// Quotes
- if (strpos('\'"`', $ch) !== FALSE) {
+ if (strpos('\'"`', $ch) !== false) {
$quote = $ch;
- $endq = FALSE;
+ $endq = false;
while (!$endq) {
// Find next quote
$pos = strpos($buffer, $quote, $i + 1);
@@ -178,13 +178,13 @@ while (!($GLOBALS['finished'] && $i >= $len) && !$error && !$timeout_passed) {
*
* SELECT * FROM `table`
*/
- if ($pos === FALSE && $quote == '`' && $found_delimiter) {
+ if ($pos === false && $quote == '`' && $found_delimiter) {
$pos = $first_sql_delimiter - 1;
// No quote? Too short string
- } elseif ($pos === FALSE) {
+ } elseif ($pos === false) {
// We hit end of string => unclosed quote, but we handle it as end of query
if ($GLOBALS['finished']) {
- $endq = TRUE;
+ $endq = true;
$i = $len - 1;
}
$found_delimiter = false;
@@ -238,7 +238,7 @@ while (!($GLOBALS['finished'] && $i >= $len) && !$error && !$timeout_passed) {
// file might have been produced on a different system
$i = strpos($buffer, $ch == '/' ? '*/' : "\n", $i);
// didn't we hit end of string?
- if ($i === FALSE) {
+ if ($i === false) {
if ($GLOBALS['finished']) {
$i = $len - 1;
} else {
@@ -270,7 +270,7 @@ while (!($GLOBALS['finished'] && $i >= $len) && !$error && !$timeout_passed) {
// (see previous comment about PHP_EOL)
$new_line_pos = strpos($buffer, "\n", $i + $length_of_delimiter_keyword);
// it might happen that there is no EOL
- if (FALSE === $new_line_pos) {
+ if (false === $new_line_pos) {
$new_line_pos = $len;
}
$sql_delimiter = substr($buffer, $i + $length_of_delimiter_keyword, $new_line_pos - $i - $length_of_delimiter_keyword);
@@ -303,8 +303,8 @@ while (!($GLOBALS['finished'] && $i >= $len) && !$error && !$timeout_passed) {
$i = 0;
$start_pos = 0;
// Any chance we will get a complete query?
- //if ((strpos($buffer, ';') === FALSE) && !$GLOBALS['finished']) {
- if ((strpos($buffer, $sql_delimiter) === FALSE) && !$GLOBALS['finished']) {
+ //if ((strpos($buffer, ';') === false) && !$GLOBALS['finished']) {
+ if ((strpos($buffer, $sql_delimiter) === false) && !$GLOBALS['finished']) {
break;
}
} else {
diff --git a/libraries/import/xml.php b/libraries/import/xml.php
index 640aac8..d3d17b2 100644
--- a/libraries/import/xml.php
+++ b/libraries/import/xml.php
@@ -41,11 +41,11 @@ $buffer = "";
*/
while (! ($finished && $i >= $len) && ! $error && ! $timeout_passed) {
$data = PMA_importGetNextChunk();
- if ($data === FALSE) {
+ if ($data === false) {
/* subtract data we didn't handle yet and stop processing */
$offset -= strlen($buffer);
break;
- } elseif ($data === TRUE) {
+ } elseif ($data === true) {
/* Handle rest of buffer */
} else {
/* Append new data to buffer */
@@ -70,7 +70,7 @@ unset($buffer);
/**
* The XML was malformed
*/
-if ($xml === FALSE) {
+if ($xml === false) {
PMA_Message::error(__('The XML file specified was either malformed or incomplete. Please correct the issue and try again.'))->display();
unset($xml);
$GLOBALS['finished'] = false;
diff --git a/libraries/kanji-encoding.lib.php b/libraries/kanji-encoding.lib.php
index 67c8b1c..552bd13 100644
--- a/libraries/kanji-encoding.lib.php
+++ b/libraries/kanji-encoding.lib.php
@@ -35,7 +35,7 @@ function PMA_internal_enc_check() {
$enc_list = 'ASCII,SJIS,EUC-JP,JIS';
}
- return TRUE;
+ return true;
} // end of the 'PMA_internal_enc_check' function
@@ -57,7 +57,7 @@ function PMA_change_enc_order() {
$enc_list = 'ASCII,EUC-JP,SJIS,JIS';
}
- return TRUE;
+ return true;
} // end of the 'PMA_change_enc_order' function
diff --git a/libraries/mult_submits.inc.php b/libraries/mult_submits.inc.php
index 7c8f27c..8038705 100644
--- a/libraries/mult_submits.inc.php
+++ b/libraries/mult_submits.inc.php
@@ -302,8 +302,8 @@ elseif ($mult_btn == __('Yes')) {
$sql_query_views = '';
}
$selected_cnt = count($selected);
- $run_parts = FALSE; // whether to run query after each pass
- $use_sql = FALSE; // whether to include sql.php at the end (to display results)
+ $run_parts = false; // whether to run query after each pass
+ $use_sql = false; // whether to include sql.php at the end (to display results)
if ($query_type == 'primary_fld') {
// Gets table primary key
@@ -325,7 +325,7 @@ elseif ($mult_btn == __('Yes')) {
switch ($query_type) {
case 'row_delete':
$a_query = $selected[$i];
- $run_parts = TRUE;
+ $run_parts = true;
break;
case 'drop_db':
@@ -333,7 +333,7 @@ elseif ($mult_btn == __('Yes')) {
$a_query = 'DROP DATABASE '
. PMA_backquote($selected[$i]);
$reload = 1;
- $run_parts = TRUE;
+ $run_parts = true;
$rebuild_database_list = true;
break;
@@ -353,31 +353,31 @@ elseif ($mult_btn == __('Yes')) {
case 'check_tbl':
$sql_query .= (empty($sql_query) ? 'CHECK TABLE ' : ', ')
. PMA_backquote($selected[$i]);
- $use_sql = TRUE;
+ $use_sql = true;
break;
case 'optimize_tbl':
$sql_query .= (empty($sql_query) ? 'OPTIMIZE TABLE ' : ', ')
. PMA_backquote($selected[$i]);
- $use_sql = TRUE;
+ $use_sql = true;
break;
case 'analyze_tbl':
$sql_query .= (empty($sql_query) ? 'ANALYZE TABLE ' : ', ')
. PMA_backquote($selected[$i]);
- $use_sql = TRUE;
+ $use_sql = true;
break;
case 'repair_tbl':
$sql_query .= (empty($sql_query) ? 'REPAIR TABLE ' : ', ')
. PMA_backquote($selected[$i]);
- $use_sql = TRUE;
+ $use_sql = true;
break;
case 'empty_tbl':
$a_query = 'TRUNCATE ';
$a_query .= PMA_backquote($selected[$i]);
- $run_parts = TRUE;
+ $run_parts = true;
break;
case 'drop_fld':
diff --git a/libraries/mysql_charsets.lib.php b/libraries/mysql_charsets.lib.php
index 8d1eb83..c77aee0 100644
--- a/libraries/mysql_charsets.lib.php
+++ b/libraries/mysql_charsets.lib.php
@@ -87,8 +87,8 @@ define('PMA_CSDROPDOWN_COLLATION', 0);
define('PMA_CSDROPDOWN_CHARSET', 1);
function PMA_generateCharsetDropdownBox($type = PMA_CSDROPDOWN_COLLATION,
- $name = null, $id = null, $default = null, $label = TRUE, $indent = 0,
- $submitOnChange = FALSE, $displayUnavailable = FALSE)
+ $name = null, $id = null, $default = null, $label = true, $indent = 0,
+ $submitOnChange = false, $displayUnavailable = false)
{
global $mysql_charsets, $mysql_charsets_descriptions,
$mysql_charsets_available, $mysql_collations, $mysql_collations_available;
@@ -312,7 +312,7 @@ function PMA_getCollationDescr($collation) {
$descr = __('Unicode') . ' (' . __('multilingual') . ')';
break;
case 'bin':
- $is_bin = TRUE;
+ $is_bin = true;
case 'general':
switch ($parts[0]) {
// Unicode charsets
diff --git a/libraries/navigation_header.inc.php b/libraries/navigation_header.inc.php
index fa5255a..e8db6a2 100644
--- a/libraries/navigation_header.inc.php
+++ b/libraries/navigation_header.inc.php
@@ -99,7 +99,7 @@ if ($GLOBALS['cfg']['LeftDisplayLogo']) {
.' alt="' . __('phpMyAdmin documentation') . '" />';
}
echo '</a>';
- echo ' ' . PMA_showMySQLDocu('', '', TRUE) . "\n";
+ echo ' ' . PMA_showMySQLDocu('', '', true) . "\n";
$params = array('uniqid' => uniqid());
if (!empty($GLOBALS['db'])) {
diff --git a/libraries/relation.lib.php b/libraries/relation.lib.php
index 20ddf97..7075cc8 100644
--- a/libraries/relation.lib.php
+++ b/libraries/relation.lib.php
@@ -1034,18 +1034,18 @@ function PMA_getForeignData($foreigners, $field, $override_total, $foreign_filte
$the_total = PMA_Table::countRecords($foreign_db, $foreign_table);
if ($override_total == true || $the_total < $GLOBALS['cfg']['ForeignKeyMaxLimit']) {
- // foreign_display can be FALSE if no display field defined:
+ // foreign_display can be false if no display field defined:
$foreign_display = PMA_getDisplayField($foreign_db, $foreign_table);
$f_query_main = 'SELECT ' . PMA_backquote($foreign_field)
- . (($foreign_display == FALSE) ? '' : ', ' . PMA_backquote($foreign_display));
+ . (($foreign_display == false) ? '' : ', ' . PMA_backquote($foreign_display));
$f_query_from = ' FROM ' . PMA_backquote($foreign_db) . '.' . PMA_backquote($foreign_table);
$f_query_filter = empty($foreign_filter) ? '' : ' WHERE ' . PMA_backquote($foreign_field)
- . ' LIKE "%' . PMA_sqlAddslashes($foreign_filter, TRUE) . '%"'
- . (($foreign_display == FALSE) ? '' : ' OR ' . PMA_backquote($foreign_display)
- . ' LIKE "%' . PMA_sqlAddslashes($foreign_filter, TRUE) . '%"'
+ . ' LIKE "%' . PMA_sqlAddslashes($foreign_filter, true) . '%"'
+ . (($foreign_display == false) ? '' : ' OR ' . PMA_backquote($foreign_display)
+ . ' LIKE "%' . PMA_sqlAddslashes($foreign_filter, true) . '%"'
);
- $f_query_order = ($foreign_display == FALSE) ? '' :' ORDER BY ' . PMA_backquote($foreign_table) . '.' . PMA_backquote($foreign_display);
+ $f_query_order = ($foreign_display == false) ? '' :' ORDER BY ' . PMA_backquote($foreign_table) . '.' . PMA_backquote($foreign_display);
$f_query_limit = isset($foreign_limit) ? $foreign_limit : '';
if (!empty($foreign_filter)) {
@@ -1091,7 +1091,7 @@ function PMA_getForeignData($foreigners, $field, $override_total, $foreign_filte
* @uses $GLOBALS['cfgRelation']
* @uses $GLOBALS['db']
* @param string whether to go from master to foreign or vice versa
- * @return boolean always TRUE
+ * @return boolean always true
* @global array $tab_left the list of tables that we still couldn't connect
* @global array $tab_know the list of allready connected tables
* @global string $fromclause
@@ -1202,7 +1202,7 @@ function PMA_REL_create_page($newpage, $cfgRelation, $db, $query_default_option)
$ins_query = 'INSERT INTO ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['pdf_pages'])
. ' (db_name, page_descr)'
. ' VALUES (\'' . PMA_sqlAddslashes($db) . '\', \'' . PMA_sqlAddslashes($newpage) . '\')';
- PMA_query_as_controluser($ins_query, FALSE, $query_default_option);
+ PMA_query_as_controluser($ins_query, false, $query_default_option);
return PMA_DBI_insert_id(isset($GLOBALS['controllink']) ? $GLOBALS['controllink'] : '');
}
?>
diff --git a/libraries/schema/Dia_Relation_Schema.class.php b/libraries/schema/Dia_Relation_Schema.class.php
index a781307..6cf77e3 100644
--- a/libraries/schema/Dia_Relation_Schema.class.php
+++ b/libraries/schema/Dia_Relation_Schema.class.php
@@ -41,7 +41,7 @@ class PMA_DIA extends XMLWriter
* so output is formatted
*/
- $this->setIndent(TRUE);
+ $this->setIndent(true);
$this->setIndentString(' ');
/*
* Create the XML document
@@ -694,7 +694,7 @@ class PMA_Dia_Relation_Schema extends PMA_Export_Relation_Schema
/* put the foreign table on the schema only if selected
* by the user
* (do not use array_search() because we would have to
- * to do a === FALSE and this is not PHP3 compatible)
+ * to do a === false and this is not PHP3 compatible)
*/
if (in_array($rel['foreign_table'], $alltables)) {
$this->_addRelation($one_table, $master_field, $rel['foreign_table'], $rel['foreign_field'],$this->showKeys);
diff --git a/libraries/schema/Eps_Relation_Schema.class.php b/libraries/schema/Eps_Relation_Schema.class.php
index edea703..4f2f8cb 100644
--- a/libraries/schema/Eps_Relation_Schema.class.php
+++ b/libraries/schema/Eps_Relation_Schema.class.php
@@ -777,7 +777,7 @@ class PMA_Eps_Relation_Schema extends PMA_Export_Relation_Schema
/* put the foreign table on the schema only if selected
* by the user
* (do not use array_search() because we would have to
- * to do a === FALSE and this is not PHP3 compatible)
+ * to do a === false and this is not PHP3 compatible)
*/
if (in_array($rel['foreign_table'], $alltables)) {
$this->_addRelation($one_table,$eps->getFont(),$eps->getFontSize(), $master_field, $rel['foreign_table'], $rel['foreign_field'], $this->tableDimension);
diff --git a/libraries/schema/Pdf_Relation_Schema.class.php b/libraries/schema/Pdf_Relation_Schema.class.php
index 39fa62b..41ebf57 100644
--- a/libraries/schema/Pdf_Relation_Schema.class.php
+++ b/libraries/schema/Pdf_Relation_Schema.class.php
@@ -919,7 +919,7 @@ class PMA_Pdf_Relation_Schema extends PMA_Export_Relation_Schema
// put the foreign table on the schema only if selected
// by the user
// (do not use array_search() because we would have to
- // to do a === FALSE and this is not PHP3 compatible)
+ // to do a === false and this is not PHP3 compatible)
if (in_array($rel['foreign_table'], $alltables)) {
$this->_addRelation($one_table, $master_field, $rel['foreign_table'], $rel['foreign_field'], $this->tableDimension);
}
diff --git a/libraries/schema/Svg_Relation_Schema.class.php b/libraries/schema/Svg_Relation_Schema.class.php
index 0f6b55b..c1ff0f1 100644
--- a/libraries/schema/Svg_Relation_Schema.class.php
+++ b/libraries/schema/Svg_Relation_Schema.class.php
@@ -41,7 +41,7 @@ class PMA_SVG extends XMLWriter
* so output is formatted
*/
- $this->setIndent(TRUE);
+ $this->setIndent(true);
$this->setIndentString(' ');
/*
* Create the XML document
@@ -760,7 +760,7 @@ class PMA_Svg_Relation_Schema extends PMA_Export_Relation_Schema
/* put the foreign table on the schema only if selected
* by the user
* (do not use array_search() because we would have to
- * to do a === FALSE and this is not PHP3 compatible)
+ * to do a === false and this is not PHP3 compatible)
*/
if (in_array($rel['foreign_table'], $alltables)) {
$this->_addRelation($one_table,$svg->getFont(),$svg->getFontSize(), $master_field, $rel['foreign_table'], $rel['foreign_field'], $this->tableDimension);
diff --git a/libraries/schema/User_Schema.class.php b/libraries/schema/User_Schema.class.php
index 7e8dbfb..20af01e 100644
--- a/libraries/schema/User_Schema.class.php
+++ b/libraries/schema/User_Schema.class.php
@@ -139,7 +139,7 @@ class PMA_User_Schema
global $db,$table,$query_default_option,$cfgRelation;
$page_query = 'SELECT * FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['pdf_pages'])
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\'';
- $page_rs = PMA_query_as_controluser($page_query, FALSE, $query_default_option);
+ $page_rs = PMA_query_as_controluser($page_query, false, $query_default_option);
if ($page_rs && PMA_DBI_num_rows($page_rs) > 0) {
?>
<form method="get" action="schema_edit.php" name="frm_select_page">
@@ -213,7 +213,7 @@ class PMA_User_Schema
$page_query = 'SELECT * FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['table_coords'])
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
. ' AND pdf_page_number = \'' . PMA_sqlAddslashes($this->chosenPage) . '\'';
- $page_rs = PMA_query_as_controluser($page_query, FALSE, $query_default_option);
+ $page_rs = PMA_query_as_controluser($page_query, false, $query_default_option);
$array_sh_page = array();
while ($temp_sh_page = @PMA_DBI_fetch_assoc($page_rs)) {
$array_sh_page[] = $temp_sh_page;
@@ -223,7 +223,7 @@ class PMA_User_Schema
*/
if (! isset($_POST['with_field_names']) && ! isset($_POST['showwysiwyg'])) {
- $with_field_names = TRUE;
+ $with_field_names = true;
}
$this->_displayScratchboardTables($array_sh_page);
?>
@@ -248,7 +248,7 @@ class PMA_User_Schema
$odd_row = true;
foreach ($array_sh_page as $dummy_sh_page => $sh_page) {
$_mtab = $sh_page['table_name'];
- $tabExist[$_mtab] = FALSE;
+ $tabExist[$_mtab] = false;
echo "\n" . ' <tr class="noclick ';
if ($odd_row) {
echo 'odd';
@@ -263,7 +263,7 @@ class PMA_User_Schema
echo "\n" . ' <option value="' . htmlspecialchars($value) . '"';
if ($value == $sh_page['table_name']) {
echo ' selected="selected"';
- $tabExist[$_mtab] = TRUE;
+ $tabExist[$_mtab] = true;
}
echo '>' . htmlspecialchars($value) . '</option>';
}
@@ -427,13 +427,13 @@ class PMA_User_Schema
{
$_strtrans = '';
$_strname = '';
- $shoot = FALSE;
+ $shoot = false;
if (!empty($tabExist) && is_array($tabExist)) {
foreach ($tabExist as $key => $value) {
if (!$value) {
$_strtrans .= '<input type="hidden" name="delrow[]" value="' . htmlspecialchars($key) . '" />' . "\n";
$_strname .= '<li>' . htmlspecialchars($key) . '</li>' . "\n";
- $shoot = TRUE;
+ $shoot = true;
}
}
if ($shoot) {
@@ -548,7 +548,7 @@ class PMA_User_Schema
. ' AND table_name = \'' . PMA_sqlAddslashes($current_row) . '\'' . "\n"
. ' AND pdf_page_number = \'' . PMA_sqlAddslashes($chpage) . '\'';
echo $del_query;
- PMA_query_as_controluser($del_query, FALSE, $query_default_option);
+ PMA_query_as_controluser($del_query, false, $query_default_option);
}
}
@@ -591,7 +591,7 @@ class PMA_User_Schema
$query = 'DELETE FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['table_coords'])
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
. ' AND pdf_page_number = \'' . PMA_sqlAddslashes($choosePage) . '\'';
- PMA_query_as_controluser($query, FALSE, $query_default_option);
+ PMA_query_as_controluser($query, false, $query_default_option);
}
/**
@@ -608,7 +608,7 @@ class PMA_User_Schema
$query = 'DELETE FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['pdf_pages'])
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
. ' AND page_nr = \'' . PMA_sqlAddslashes($choosePage) . '\'';
- PMA_query_as_controluser($query, FALSE, $query_default_option);
+ PMA_query_as_controluser($query, false, $query_default_option);
}
/**
@@ -667,7 +667,7 @@ class PMA_User_Schema
. ' WHERE master_db = \'' . $db . '\''
. ' GROUP BY master_table'
. ' ORDER BY ' . PMA_backquote('COUNT(master_table)') . ' DESC ';
- $master_tables_rs = PMA_query_as_controluser($master_tables, FALSE, $query_default_option);
+ $master_tables_rs = PMA_query_as_controluser($master_tables, false, $query_default_option);
if ($master_tables_rs && PMA_DBI_num_rows($master_tables_rs) > 0) {
/* first put all the master tables at beginning
* of the list, so they are near the center of
@@ -739,7 +739,7 @@ class PMA_User_Schema
$insert_query = 'INSERT INTO ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['table_coords']) . ' '
. '(db_name, table_name, pdf_page_number, x, y) '
. 'VALUES (\'' . PMA_sqlAddslashes($db) . '\', \'' . PMA_sqlAddslashes($current_table) . '\',' . $pageNumber . ',' . $pos_x . ',' . $pos_y . ')';
- PMA_query_as_controluser($insert_query, FALSE, $query_default_option);
+ PMA_query_as_controluser($insert_query, false, $query_default_option);
/*
* compute for the next table
@@ -794,7 +794,7 @@ class PMA_User_Schema
. ' WHERE db_name = \'' . PMA_sqlAddslashes($db) . '\''
. ' AND table_name = \'' . PMA_sqlAddslashes($arrvalue['name']) . '\''
. ' AND pdf_page_number = \'' . PMA_sqlAddslashes($this->chosenPage) . '\'';
- $test_rs = PMA_query_as_controluser($test_query, FALSE, $query_default_option);
+ $test_rs = PMA_query_as_controluser($test_query, false, $query_default_option);
//echo $test_query;
if ($test_rs && PMA_DBI_num_rows($test_rs) > 0) {
if (isset($arrvalue['delete']) && $arrvalue['delete'] == 'y') {
@@ -815,7 +815,7 @@ class PMA_User_Schema
. 'VALUES (\'' . PMA_sqlAddslashes($db) . '\', \'' . PMA_sqlAddslashes($arrvalue['name']) . '\', \'' . PMA_sqlAddslashes($this->chosenPage) . '\',' . $arrvalue['x'] . ',' . $arrvalue['y'] . ')';
}
//echo $ch_query;
- PMA_query_as_controluser($ch_query, FALSE, $query_default_option);
+ PMA_query_as_controluser($ch_query, false, $query_default_option);
} // end if
} // end for
}
diff --git a/libraries/schema/Visio_Relation_Schema.class.php b/libraries/schema/Visio_Relation_Schema.class.php
index a9be622..fb43401 100644
--- a/libraries/schema/Visio_Relation_Schema.class.php
+++ b/libraries/schema/Visio_Relation_Schema.class.php
@@ -41,7 +41,7 @@ class PMA_VISIO extends XMLWriter
* so output is formatted
*/
- $this->setIndent(TRUE);
+ $this->setIndent(true);
$this->setIndentString(' ');
/*
* Create the XML document
@@ -519,7 +519,7 @@ class PMA_Visio_Relation_Schema extends PMA_Export_Relation_Schema
/* put the foreign table on the schema only if selected
* by the user
* (do not use array_search() because we would have to
- * to do a === FALSE and this is not PHP3 compatible)
+ * to do a === false and this is not PHP3 compatible)
*/
if (in_array($rel['foreign_table'], $alltables)) {
$this->_addRelation($one_table, $master_field, $rel['foreign_table'], $rel['foreign_field'],$this->showKeys);
diff --git a/libraries/select_lang.lib.php b/libraries/select_lang.lib.php
index 15945be..aa3f81d 100644
--- a/libraries/select_lang.lib.php
+++ b/libraries/select_lang.lib.php
@@ -157,7 +157,7 @@ function PMA_langDetect($str, $envType)
// $envType = 1 for the 'HTTP_ACCEPT_LANGUAGE' environment variable,
// 2 for the 'HTTP_USER_AGENT' one
$expr = $value[0];
- if (strpos($expr, '[-_]') === FALSE) {
+ if (strpos($expr, '[-_]') === false) {
$expr = str_replace('|', '([-_][[:alpha:]]{2,3})?|', $expr);
}
if (($envType == 1 && preg_match('/^(' . addcslashes($expr,'/') . ')(;q=[0-9]\\.[0-9])?$/i', $str))
@@ -347,12 +347,12 @@ function PMA_langList()
/* Open the directory */
$handle = @opendir($GLOBALS['lang_path']);
/* This can happen if the kit is English-only */
- if ($handle === FALSE) {
+ if ($handle === false) {
return $result;
}
/* Process all files */
- while (FALSE !== ($file = readdir($handle))) {
+ while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != ".." && file_exists($GLOBALS['lang_path'] . '/' . $file . '/LC_MESSAGES/phpmyadmin.mo')) {
$result[$file] = PMA_langDetails($file);
}
diff --git a/libraries/server_links.inc.php b/libraries/server_links.inc.php
index 41ec8a8..2c1ac6a 100644
--- a/libraries/server_links.inc.php
+++ b/libraries/server_links.inc.php
@@ -14,7 +14,7 @@ if (! defined('PHPMYADMIN')) {
require_once './libraries/common.inc.php';
require_once './libraries/server_common.inc.php';
-PMA_checkParameters(array('is_superuser', 'url_query'), TRUE, FALSE);
+PMA_checkParameters(array('is_superuser', 'url_query'), true, false);
// Don't print all these links if in an Ajax request
if (!$GLOBALS['is_ajax_request']) {
diff --git a/libraries/sql_query_form.lib.php b/libraries/sql_query_form.lib.php
index 80ee79e..5dd48d2 100644
--- a/libraries/sql_query_form.lib.php
+++ b/libraries/sql_query_form.lib.php
@@ -58,7 +58,7 @@ require_once './libraries/bookmark.lib.php'; // used for file listing
* @uses function_exists()
* @param boolean|string $query query to display in the textarea
* or true to display last executed
- * @param boolean|string $display_tab sql|files|history|full|FALSE
+ * @param boolean|string $display_tab sql|files|history|full|false
* what part to display
* false if not inside querywindow
* @param string $delimiter
@@ -495,7 +495,7 @@ function PMA_sqlQueryFormUpload(){
echo PMA_generateHiddenMaxFileSize($GLOBALS['max_upload_size']) . "\n";
echo '</div>';
- if ($files === FALSE) {
+ if ($files === false) {
$errors[] = PMA_Message::error( __('The directory you set for upload work cannot be reached'));
} elseif (!empty($files)) {
echo '<div class="formelement">';
@@ -514,7 +514,7 @@ function PMA_sqlQueryFormUpload(){
echo '<fieldset id="" class="tblFooters">';
echo __('Character set of the file:') . "\n";
echo PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_CHARSET,
- 'charset_of_file', null, 'utf8', FALSE);
+ 'charset_of_file', null, 'utf8', false);
echo '<input type="submit" name="SQL" value="' . __('Go')
.'" />' . "\n";
echo '<div class="clearfloat"></div>' . "\n";
diff --git a/libraries/sqlparser.lib.php b/libraries/sqlparser.lib.php
index 171a4a3..e05d011 100644
--- a/libraries/sqlparser.lib.php
+++ b/libraries/sqlparser.lib.php
@@ -328,14 +328,14 @@ if (! defined('PMA_MINIMUM_COMMON')) {
$startquotepos = $count2;
$quotetype = $c;
$count2++;
- $escaped = FALSE;
- $escaped_escaped = FALSE;
+ $escaped = false;
+ $escaped_escaped = false;
$pos = $count2;
$oldpos = 0;
do {
$oldpos = $pos;
$pos = $GLOBALS['PMA_strpos'](' ' . $sql, $quotetype, $oldpos + 1) - 1;
- // ($pos === FALSE)
+ // ($pos === false)
if ($pos < 0) {
if ($c == '`') {
/*
@@ -477,7 +477,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
$is_digit = !$is_identifier && !$is_sql_variable && $GLOBALS['PMA_STR_isDigit']($c);
$is_hex_digit = $is_digit && $c == '0' && $count2 < $len && $GLOBALS['PMA_substr']($sql, $count2, 1) == 'x';
$is_float_digit = $c == '.';
- $is_float_digit_exponent = FALSE;
+ $is_float_digit_exponent = false;
/* DEBUG
echo '<pre>2';
@@ -513,7 +513,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
if ($is_digit && (!$is_hex_digit) && ($c2 == '.')) {
$count2++;
if (!$is_float_digit) {
- $is_float_digit = TRUE;
+ $is_float_digit = true;
continue;
} else {
$debugstr = __('Invalid Identifer') . ' @ ' . ($count1+1) . "\n"
@@ -524,21 +524,21 @@ if (! defined('PMA_MINIMUM_COMMON')) {
}
if ($is_digit && (!$is_hex_digit) && (($c2 == 'e') || ($c2 == 'E'))) {
if (!$is_float_digit_exponent) {
- $is_float_digit_exponent = TRUE;
- $is_float_digit = TRUE;
+ $is_float_digit_exponent = true;
+ $is_float_digit = true;
$count2++;
continue;
} else {
- $is_digit = FALSE;
- $is_float_digit = FALSE;
+ $is_digit = false;
+ $is_float_digit = false;
}
}
if (($is_hex_digit && PMA_STR_isHexDigit($c2)) || ($is_digit && $GLOBALS['PMA_STR_isDigit']($c2))) {
$count2++;
continue;
} else {
- $is_digit = FALSE;
- $is_hex_digit = FALSE;
+ $is_digit = false;
+ $is_hex_digit = false;
}
$count2++;
@@ -559,7 +559,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
}
} elseif ($is_user) {
$type = 'punct_user';
- } elseif ($is_sql_variable != FALSE) {
+ } elseif ($is_sql_variable != false) {
$type = 'alpha_variable';
} else {
$type = 'alpha';
@@ -776,9 +776,9 @@ if (! defined('PMA_MINIMUM_COMMON')) {
}
// check if present in the list of forbidden words
if ($t_suffix == '_reservedWord' && PMA_STR_binarySearchInArr($d_cur_upper, $PMA_SQPdata_forbidden_word, $PMA_SQPdata_forbidden_word_cnt)) {
- $sql_array[$i]['forbidden'] = TRUE;
+ $sql_array[$i]['forbidden'] = true;
} else {
- $sql_array[$i]['forbidden'] = FALSE;
+ $sql_array[$i]['forbidden'] = false;
}
$sql_array[$i]['type'] .= $t_suffix;
}
@@ -807,12 +807,12 @@ if (! defined('PMA_MINIMUM_COMMON')) {
{
$typeSeperator = '_';
if (strcmp($whatWeWant, $toCheck) == 0) {
- return TRUE;
+ return true;
} else {
- if (strpos($whatWeWant, $typeSeperator) === FALSE) {
+ if (strpos($whatWeWant, $typeSeperator) === false) {
return strncmp($whatWeWant, $toCheck, strpos($toCheck, $typeSeperator)) == 0;
} else {
- return FALSE;
+ return false;
}
}
}
@@ -853,8 +853,8 @@ if (! defined('PMA_MINIMUM_COMMON')) {
'create_table_fields' => array()
);
$subresult_empty = $subresult;
- $seek_queryend = FALSE;
- $seen_end_of_table_ref = FALSE;
+ $seek_queryend = false;
+ $seen_end_of_table_ref = false;
$number_of_brackets_in_extract = 0;
$number_of_brackets_in_group_concat = 0;
@@ -866,10 +866,10 @@ if (! defined('PMA_MINIMUM_COMMON')) {
// for SELECT EXTRACT(YEAR_MONTH FROM CURDATE())
// we must not use CURDATE as a table_ref
// so we track whether we are in the EXTRACT()
- $in_extract = FALSE;
+ $in_extract = false;
// for GROUP_CONCAT(...)
- $in_group_concat = FALSE;
+ $in_group_concat = false;
/* Description of analyzer results
*
@@ -1038,9 +1038,9 @@ if (! defined('PMA_MINIMUM_COMMON')) {
//DEBUG echo "Loop1 <strong>" . $arr[$i]['data'] . "</strong> (" . $arr[$i]['type'] . ")<br />";
// High speed seek for locating the end of the current query
- if ($seek_queryend == TRUE) {
+ if ($seek_queryend == true) {
if ($arr[$i]['type'] == 'punct_queryend') {
- $seek_queryend = FALSE;
+ $seek_queryend = false;
} else {
continue;
} // end if (type == punct_queryend)
@@ -1075,13 +1075,13 @@ if (! defined('PMA_MINIMUM_COMMON')) {
if ($in_extract) {
$number_of_brackets_in_extract--;
if ($number_of_brackets_in_extract == 0) {
- $in_extract = FALSE;
+ $in_extract = false;
}
}
if ($in_group_concat) {
$number_of_brackets_in_group_concat--;
if ($number_of_brackets_in_group_concat == 0) {
- $in_group_concat = FALSE;
+ $in_group_concat = false;
}
}
}
@@ -1101,18 +1101,18 @@ if (! defined('PMA_MINIMUM_COMMON')) {
if ($arr[$i]['type'] == 'alpha_functionName') {
$upper_data = strtoupper($arr[$i]['data']);
if ($upper_data =='EXTRACT') {
- $in_extract = TRUE;
+ $in_extract = true;
$number_of_brackets_in_extract = 0;
}
if ($upper_data =='GROUP_CONCAT') {
- $in_group_concat = TRUE;
+ $in_group_concat = true;
$number_of_brackets_in_group_concat = 0;
}
}
// ==============================================================
if ($arr[$i]['type'] == 'alpha_reservedWord'
-// && $arr[$i]['forbidden'] == FALSE) {
+// && $arr[$i]['forbidden'] == false) {
) {
// We don't know what type of query yet, so run this
if ($subresult['querytype'] == '') {
@@ -1122,7 +1122,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
// Check if we support this type of query
if (!PMA_STR_binarySearchInArr($subresult['querytype'], $supported_query_types, $supported_query_types_cnt)) {
// Skip ahead to the next one if we don't
- $seek_queryend = TRUE;
+ $seek_queryend = true;
continue;
} // end if (query not supported)
@@ -1139,17 +1139,17 @@ if (! defined('PMA_MINIMUM_COMMON')) {
// this is a subquery so do not analyze inside it
continue;
}
- $seen_from = FALSE;
- $previous_was_identifier = FALSE;
+ $seen_from = false;
+ $previous_was_identifier = false;
$current_select_expr = -1;
- $seen_end_of_table_ref = FALSE;
+ $seen_end_of_table_ref = false;
} // end if (data == SELECT)
if ($upper_data =='FROM' && !$in_extract) {
$current_table_ref = -1;
- $seen_from = TRUE;
- $previous_was_identifier = FALSE;
- $save_table_ref = TRUE;
+ $seen_from = true;
+ $previous_was_identifier = false;
+ $save_table_ref = true;
} // end if (data == FROM)
// here, do not 'continue' the loop, as we have more work for
@@ -1162,7 +1162,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
|| $arr[$i]['type'] == 'quote_single'
|| $arr[$i]['type'] == 'alpha_identifier'
|| ($arr[$i]['type'] == 'alpha_reservedWord'
- && $arr[$i]['forbidden'] == FALSE)) {
+ && $arr[$i]['forbidden'] == false)) {
switch ($arr[$i]['type']) {
case 'alpha_identifier':
@@ -1197,7 +1197,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
$alias_for_select_expr = $identifier;
} else {
$chain[] = $identifier;
- $previous_was_identifier = TRUE;
+ $previous_was_identifier = true;
} // end if !$previous_was_identifier
} else {
@@ -1209,7 +1209,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
$alias_for_table_ref = $identifier;
} else {
$chain[] = $identifier;
- $previous_was_identifier = TRUE;
+ $previous_was_identifier = true;
} // end if ($previous_was_identifier)
} // end if ($save_table_ref &&!$seen_end_of_table_ref)
@@ -1220,7 +1220,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
// ===================================
if ($arr[$i]['type'] == 'punct_qualifier') {
// to be able to detect an identifier following another
- $previous_was_identifier = FALSE;
+ $previous_was_identifier = false;
continue;
} // end if (punct_qualifier)
@@ -1285,7 +1285,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
*/
if (($arr[$i]['type'] == 'alpha_reservedWord')
&& ($upper_data != 'FROM')) {
- $previous_was_identifier = TRUE;
+ $previous_was_identifier = true;
}
} // end if (save a select expr)
@@ -1340,7 +1340,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
.= ' ' . $subresult['table_ref'][$current_table_ref]['table_alias'];
unset($chain);
- $previous_was_identifier = TRUE;
+ $previous_was_identifier = true;
//continue;
} // end if (save a table ref)
@@ -1367,29 +1367,29 @@ if (! defined('PMA_MINIMUM_COMMON')) {
// e n d i n g l o o p #1
- // set the $previous_was_identifier to FALSE if the current
+ // set the $previous_was_identifier to false if the current
// token is not an identifier
if (($arr[$i]['type'] != 'alpha_identifier')
&& ($arr[$i]['type'] != 'quote_double')
&& ($arr[$i]['type'] != 'quote_single')
&& ($arr[$i]['type'] != 'quote_backtick')) {
- $previous_was_identifier = FALSE;
+ $previous_was_identifier = false;
} // end if
// however, if we are on AS, we must keep the $previous_was_identifier
if (($arr[$i]['type'] == 'alpha_reservedWord')
&& ($upper_data == 'AS')) {
- $previous_was_identifier = TRUE;
+ $previous_was_identifier = true;
}
if (($arr[$i]['type'] == 'alpha_reservedWord')
&& ($upper_data =='ON' || $upper_data =='USING')) {
- $save_table_ref = FALSE;
+ $save_table_ref = false;
} // end if (data == ON)
if (($arr[$i]['type'] == 'alpha_reservedWord')
&& ($upper_data =='JOIN' || $upper_data =='FROM')) {
- $save_table_ref = TRUE;
+ $save_table_ref = true;
} // end if (data == JOIN)
/**
@@ -1411,19 +1411,19 @@ if (! defined('PMA_MINIMUM_COMMON')) {
|| ($arr[$i]['type'] == 'alpha_reservedWord'
&& !$in_group_concat
&& PMA_STR_binarySearchInArr($upper_data, $words_ending_table_ref, $words_ending_table_ref_cnt))) {
- $seen_end_of_table_ref = TRUE;
+ $seen_end_of_table_ref = true;
// to be able to save the last table ref, but do not
// set it true if we found a word like "ON" that has
// already set it to false
- if (isset($save_table_ref) && $save_table_ref != FALSE) {
- $save_table_ref = TRUE;
+ if (isset($save_table_ref) && $save_table_ref != false) {
+ $save_table_ref = true;
} //end if
} // end if (check for end of table ref)
} //end if (!$seen_end_of_table_ref)
if ($seen_end_of_table_ref) {
- $save_table_ref = FALSE;
+ $save_table_ref = false;
} // end if
} // end for $i (loop #1)
@@ -1465,20 +1465,20 @@ if (! defined('PMA_MINIMUM_COMMON')) {
$section_before_limit = '';
$section_after_limit = ''; // truly the section after the limit clause
- $seen_reserved_word = FALSE;
- $seen_group = FALSE;
- $seen_order = FALSE;
- $seen_order_by = FALSE;
- $in_group_by = FALSE; // true when we are inside the GROUP BY clause
- $in_order_by = FALSE; // true when we are inside the ORDER BY clause
- $in_having = FALSE; // true when we are inside the HAVING clause
- $in_select_expr = FALSE; // true when we are inside the select expr clause
- $in_where = FALSE; // true when we are inside the WHERE clause
- $seen_limit = FALSE; // true if we have seen a LIMIT clause
- $in_limit = FALSE; // true when we are inside the LIMIT clause
- $after_limit = FALSE; // true when we are after the LIMIT clause
- $in_from = FALSE; // true when we are in the FROM clause
- $in_group_concat = FALSE;
+ $seen_reserved_word = false;
+ $seen_group = false;
+ $seen_order = false;
+ $seen_order_by = false;
+ $in_group_by = false; // true when we are inside the GROUP BY clause
+ $in_order_by = false; // true when we are inside the ORDER BY clause
+ $in_having = false; // true when we are inside the HAVING clause
+ $in_select_expr = false; // true when we are inside the select expr clause
+ $in_where = false; // true when we are inside the WHERE clause
+ $seen_limit = false; // true if we have seen a LIMIT clause
+ $in_limit = false; // true when we are inside the LIMIT clause
+ $after_limit = false; // true when we are after the LIMIT clause
+ $in_from = false; // true when we are in the FROM clause
+ $in_group_concat = false;
$first_reserved_word = '';
$current_identifier = '';
$unsorted_query = $arr['raw']; // in case there is no ORDER BY
@@ -1521,7 +1521,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
if (!$seen_reserved_word) {
$first_reserved_word = $upper_data;
$subresult['querytype'] = $upper_data;
- $seen_reserved_word = TRUE;
+ $seen_reserved_word = true;
// if the first reserved word is DROP or DELETE,
// we know this is a query that needs to be confirmed
@@ -1543,22 +1543,22 @@ if (! defined('PMA_MINIMUM_COMMON')) {
if ($upper_data == 'LIMIT' && ! $in_subquery) {
$section_before_limit = substr($arr['raw'], 0, $arr[$i]['pos'] - 5);
- $in_limit = TRUE;
- $seen_limit = TRUE;
+ $in_limit = true;
+ $seen_limit = true;
$limit_clause = '';
- $in_order_by = FALSE; // @todo maybe others to set FALSE
+ $in_order_by = false; // @todo maybe others to set false
}
if ($upper_data == 'PROCEDURE') {
$subresult['queryflags']['procedure'] = 1;
- $in_limit = FALSE;
- $after_limit = TRUE;
+ $in_limit = false;
+ $after_limit = true;
}
/**
- * @todo set also to FALSE if we find FOR UPDATE or LOCK IN SHARE MODE
+ * @todo set also to false if we find FOR UPDATE or LOCK IN SHARE MODE
*/
if ($upper_data == 'SELECT') {
- $in_select_expr = TRUE;
+ $in_select_expr = true;
$select_expr_clause = '';
}
if ($upper_data == 'DISTINCT' && !$in_group_concat) {
@@ -1579,75 +1579,75 @@ if (! defined('PMA_MINIMUM_COMMON')) {
// if this is a real SELECT...FROM
if ($upper_data == 'FROM' && isset($subresult['queryflags']['select_from']) && $subresult['queryflags']['select_from'] == 1) {
- $in_from = TRUE;
+ $in_from = true;
$from_clause = '';
- $in_select_expr = FALSE;
+ $in_select_expr = false;
}
- // (we could have less resetting of variables to FALSE
+ // (we could have less resetting of variables to false
// if we trust that the query respects the standard
// MySQL order for clauses)
// we use $seen_group and $seen_order because we are looking
// for the BY
if ($upper_data == 'GROUP') {
- $seen_group = TRUE;
- $seen_order = FALSE;
- $in_having = FALSE;
- $in_order_by = FALSE;
- $in_where = FALSE;
- $in_select_expr = FALSE;
- $in_from = FALSE;
+ $seen_group = true;
+ $seen_order = false;
+ $in_having = false;
+ $in_order_by = false;
+ $in_where = false;
+ $in_select_expr = false;
+ $in_from = false;
}
if ($upper_data == 'ORDER' && !$in_group_concat) {
- $seen_order = TRUE;
- $seen_group = FALSE;
- $in_having = FALSE;
- $in_group_by = FALSE;
- $in_where = FALSE;
- $in_select_expr = FALSE;
- $in_from = FALSE;
+ $seen_order = true;
+ $seen_group = false;
+ $in_having = false;
+ $in_group_by = false;
+ $in_where = false;
+ $in_select_expr = false;
+ $in_from = false;
}
if ($upper_data == 'HAVING') {
- $in_having = TRUE;
+ $in_having = true;
$having_clause = '';
- $seen_group = FALSE;
- $seen_order = FALSE;
- $in_group_by = FALSE;
- $in_order_by = FALSE;
- $in_where = FALSE;
- $in_select_expr = FALSE;
- $in_from = FALSE;
+ $seen_group = false;
+ $seen_order = false;
+ $in_group_by = false;
+ $in_order_by = false;
+ $in_where = false;
+ $in_select_expr = false;
+ $in_from = false;
}
if ($upper_data == 'WHERE') {
- $in_where = TRUE;
+ $in_where = true;
$where_clause = '';
$where_clause_identifiers = array();
- $seen_group = FALSE;
- $seen_order = FALSE;
- $in_group_by = FALSE;
- $in_order_by = FALSE;
- $in_having = FALSE;
- $in_select_expr = FALSE;
- $in_from = FALSE;
+ $seen_group = false;
+ $seen_order = false;
+ $in_group_by = false;
+ $in_order_by = false;
+ $in_having = false;
+ $in_select_expr = false;
+ $in_from = false;
}
if ($upper_data == 'BY') {
if ($seen_group) {
- $in_group_by = TRUE;
+ $in_group_by = true;
$group_by_clause = '';
}
if ($seen_order) {
- $seen_order_by = TRUE;
+ $seen_order_by = true;
// Here we assume that the ORDER BY keywords took
// exactly 8 characters.
// We use PMA_substr() to be charset-safe; otherwise
// if the table name contains accents, the unsorted
// query would be missing some characters.
$unsorted_query = PMA_substr($arr['raw'], 0, $arr[$i]['pos'] - 8);
- $in_order_by = TRUE;
+ $in_order_by = true;
$order_by_clause = '';
}
}
@@ -1655,12 +1655,12 @@ if (! defined('PMA_MINIMUM_COMMON')) {
// if we find one of the words that could end the clause
if (PMA_STR_binarySearchInArr($upper_data, $words_ending_clauses, $words_ending_clauses_cnt)) {
- $in_group_by = FALSE;
- $in_order_by = FALSE;
- $in_having = FALSE;
- $in_where = FALSE;
- $in_select_expr = FALSE;
- $in_from = FALSE;
+ $in_group_by = false;
+ $in_order_by = false;
+ $in_having = false;
+ $in_where = false;
+ $in_select_expr = false;
+ $in_from = false;
}
} // endif (reservedWord)
@@ -1676,7 +1676,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
$sep='';
$upper_data = strtoupper($arr[$i]['data']);
if ($upper_data =='GROUP_CONCAT') {
- $in_group_concat = TRUE;
+ $in_group_concat = true;
$number_of_brackets_in_group_concat = 0;
}
}
@@ -1690,7 +1690,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
if ($in_group_concat) {
$number_of_brackets_in_group_concat--;
if ($number_of_brackets_in_group_concat == 0) {
- $in_group_concat = FALSE;
+ $in_group_concat = false;
}
}
}
@@ -1781,17 +1781,17 @@ if (! defined('PMA_MINIMUM_COMMON')) {
// not a timestamp, it will be useful when logic has been
// added for complete field attributes analysis.
- $seen_foreign = FALSE;
- $seen_references = FALSE;
- $seen_constraint = FALSE;
+ $seen_foreign = false;
+ $seen_references = false;
+ $seen_constraint = false;
$foreign_key_number = -1;
- $seen_create_table = FALSE;
- $seen_create = FALSE;
- $seen_alter = FALSE;
- $in_create_table_fields = FALSE;
+ $seen_create_table = false;
+ $seen_create = false;
+ $seen_alter = false;
+ $in_create_table_fields = false;
$brackets_level = 0;
- $in_timestamp_options = FALSE;
- $seen_default = FALSE;
+ $in_timestamp_options = false;
+ $seen_default = false;
for ($i = 0; $i < $size; $i++) {
// DEBUG echo "Loop 3 <strong>" . $arr[$i]['data'] . "</strong> " . $arr[$i]['type'] . "<br />";
@@ -1800,46 +1800,46 @@ if (! defined('PMA_MINIMUM_COMMON')) {
$upper_data = strtoupper($arr[$i]['data']);
if ($upper_data == 'NOT' && $in_timestamp_options) {
- $create_table_fields[$current_identifier]['timestamp_not_null'] = TRUE;
+ $create_table_fields[$current_identifier]['timestamp_not_null'] = true;
}
if ($upper_data == 'CREATE') {
- $seen_create = TRUE;
+ $seen_create = true;
}
if ($upper_data == 'ALTER') {
- $seen_alter = TRUE;
+ $seen_alter = true;
}
if ($upper_data == 'TABLE' && $seen_create) {
- $seen_create_table = TRUE;
+ $seen_create_table = true;
$create_table_fields = array();
}
if ($upper_data == 'CURRENT_TIMESTAMP') {
if ($in_timestamp_options) {
if ($seen_default) {
- $create_table_fields[$current_identifier]['default_current_timestamp'] = TRUE;
+ $create_table_fields[$current_identifier]['default_current_timestamp'] = true;
}
}
}
if ($upper_data == 'CONSTRAINT') {
$foreign_key_number++;
- $seen_foreign = FALSE;
- $seen_references = FALSE;
- $seen_constraint = TRUE;
+ $seen_foreign = false;
+ $seen_references = false;
+ $seen_constraint = true;
}
if ($upper_data == 'FOREIGN') {
- $seen_foreign = TRUE;
- $seen_references = FALSE;
- $seen_constraint = FALSE;
+ $seen_foreign = true;
+ $seen_references = false;
+ $seen_constraint = false;
}
if ($upper_data == 'REFERENCES') {
- $seen_foreign = FALSE;
- $seen_references = TRUE;
- $seen_constraint = FALSE;
+ $seen_foreign = false;
+ $seen_references = true;
+ $seen_constraint = false;
}
@@ -1884,8 +1884,8 @@ if (! defined('PMA_MINIMUM_COMMON')) {
} elseif ($third_upper_data == 'CURRENT_TIMESTAMP') {
if ($clause == 'on_update'
&& $in_timestamp_options) {
- $create_table_fields[$current_identifier]['on_update_current_timestamp'] = TRUE;
- $seen_default = FALSE;
+ $create_table_fields[$current_identifier]['on_update_current_timestamp'] = true;
+ $seen_default = false;
}
} else {
@@ -1905,7 +1905,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
if ($arr[$i]['type'] == 'punct_bracket_open_round') {
$brackets_level++;
if ($seen_create_table && $brackets_level == 1) {
- $in_create_table_fields = TRUE;
+ $in_create_table_fields = true;
}
}
@@ -1913,10 +1913,10 @@ if (! defined('PMA_MINIMUM_COMMON')) {
if ($arr[$i]['type'] == 'punct_bracket_close_round') {
$brackets_level--;
if ($seen_references) {
- $seen_references = FALSE;
+ $seen_references = false;
}
if ($seen_create_table && $brackets_level == 0) {
- $in_create_table_fields = FALSE;
+ $in_create_table_fields = false;
}
}
@@ -1924,7 +1924,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
$upper_data = strtoupper($arr[$i]['data']);
if ($seen_create_table && $in_create_table_fields) {
if ($upper_data == 'DEFAULT') {
- $seen_default = TRUE;
+ $seen_default = true;
$create_table_fields[$current_identifier]['default_value'] = $arr[$i + 1]['data'];
}
}
@@ -1939,9 +1939,9 @@ if (! defined('PMA_MINIMUM_COMMON')) {
$create_table_fields[$current_identifier]['type'] = $upper_data;
if ($upper_data == 'TIMESTAMP') {
$arr[$i]['type'] = 'alpha_columnType';
- $in_timestamp_options = TRUE;
+ $in_timestamp_options = true;
} else {
- $in_timestamp_options = FALSE;
+ $in_timestamp_options = false;
if ($upper_data == 'CHAR') {
$arr[$i]['type'] = 'alpha_columnType';
}
@@ -1962,7 +1962,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
if ($seen_create_table && $in_create_table_fields) {
$current_identifier = $identifier;
// we set this one even for non TIMESTAMP type
- $create_table_fields[$current_identifier]['timestamp_not_null'] = FALSE;
+ $create_table_fields[$current_identifier]['timestamp_not_null'] = false;
}
if ($seen_constraint) {
@@ -2103,17 +2103,17 @@ if (! defined('PMA_MINIMUM_COMMON')) {
case 'color':
$str = '<span class="syntax">';
$html_line_break = '<br />';
- $docu = TRUE;
+ $docu = true;
break;
case 'query_only':
$str = '';
$html_line_break = "\n";
- $docu = FALSE;
+ $docu = false;
break;
case 'text':
$str = '';
$html_line_break = '<br />';
- $docu = TRUE;
+ $docu = true;
break;
} // end switch
// inner_sql is a span that exists for all cases, except query_only
@@ -2126,7 +2126,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
$indent = 0;
$bracketlevel = 0;
$functionlevel = 0;
- $infunction = FALSE;
+ $infunction = false;
$space_punct_listsep = ' ';
$space_punct_listsep_function_name = ' ';
// $space_alpha_reserved_word = '<br />'."\n";
@@ -2193,7 +2193,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
$typearr[3] = $arr[$start_token]['type'];
}
- $in_priv_list = FALSE;
+ $in_priv_list = false;
for ($i = $start_token; $i < $arraysize; $i++) {
// DEBUG echo "Loop format <strong>" . $arr[$i]['data'] . "</strong> " . $arr[$i]['type'] . "<br />";
$before = '';
@@ -2227,7 +2227,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
break;
case 'punct_bracket_open_round':
$bracketlevel++;
- $infunction = FALSE;
+ $infunction = false;
// Make sure this array is sorted!
if (($typearr[1] == 'alpha_functionName') || ($typearr[1] == 'alpha_columnType') || ($typearr[1] == 'punct')
|| ($typearr[3] == 'digit_integer') || ($typearr[3] == 'digit_hex') || ($typearr[3] == 'digit_float')
@@ -2237,7 +2237,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
&& PMA_STR_binarySearchInArr(strtoupper($arr[$i - 1]['data']), $keywords_with_brackets_1before, $keywords_with_brackets_1before_cnt))
) {
$functionlevel++;
- $infunction = TRUE;
+ $infunction = true;
$after .= ' ';
} else {
$indent++;
@@ -2263,7 +2263,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
$after = '';
break;
case 'punct_listsep':
- if ($infunction == TRUE) {
+ if ($infunction == true) {
$after .= $space_punct_listsep_function_name;
} else {
$after .= $space_punct_listsep;
@@ -2277,7 +2277,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
$space_punct_listsep = ' ';
$space_punct_listsep_function_name = ' ';
$space_alpha_reserved_word = ' ';
- $in_priv_list = FALSE;
+ $in_priv_list = false;
break;
case 'comment_mysql':
case 'comment_ansi':
@@ -2300,7 +2300,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
// only close bracket level when it was opened before
if ($bracketlevel > 0) {
$bracketlevel--;
- if ($infunction == TRUE) {
+ if ($infunction == true) {
$functionlevel--;
$after .= ' ';
$before .= ' ';
@@ -2308,7 +2308,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
$indent--;
$before .= ($mode != 'query_only' ? '</div>' : ' ');
}
- $infunction = ($functionlevel > 0) ? TRUE : FALSE;
+ $infunction = ($functionlevel > 0) ? true : false;
}
break;
case 'alpha_columnType':
@@ -2430,7 +2430,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
// on first keyword, check if it introduces a
// privilege list
if (PMA_STR_binarySearchInArr($arr[$i]['data'], $keywords_priv_list, $keywords_priv_list_cnt)) {
- $in_priv_list = TRUE;
+ $in_priv_list = true;
}
}
} else {
diff --git a/libraries/sqlvalidator.class.php b/libraries/sqlvalidator.class.php
index 8d1aac6..f7b836a 100644
--- a/libraries/sqlvalidator.class.php
+++ b/libraries/sqlvalidator.class.php
@@ -34,7 +34,7 @@ if (class_exists('SOAPClient')) {
$GLOBALS['sqlvalidator_error'] = false;
} else {
$GLOBALS['sqlvalidator_soap'] = 'NONE';
- $GLOBALS['sqlvalidator_error'] = TRUE;
+ $GLOBALS['sqlvalidator_error'] = true;
PMA_warnMissingExtension('soap');
}
}
@@ -84,7 +84,7 @@ if (!$GLOBALS['sqlvalidator_error']) {
if ($GLOBALS['sqlvalidator_soap'] == 'PHP') {
$obj = new SOAPClient($url);
} else {
- $obj = new SOAP_Client($url, TRUE);
+ $obj = new SOAP_Client($url, true);
}
return $obj;
} // end of the "openService()" function
@@ -431,7 +431,7 @@ if (!$GLOBALS['sqlvalidator_error']) {
//add an extra check to ensure that the class was defined without errors
if (!class_exists('PMA_SQLValidator')) {
- $GLOBALS['sqlvalidator_error'] = TRUE;
+ $GLOBALS['sqlvalidator_error'] = true;
}
} // end else
diff --git a/libraries/sqlvalidator.lib.php b/libraries/sqlvalidator.lib.php
index aaa79c0..a559ccf 100644
--- a/libraries/sqlvalidator.lib.php
+++ b/libraries/sqlvalidator.lib.php
@@ -38,9 +38,9 @@ if (! defined('PHPMYADMIN')) {
* I'm not sure if PEAR was available before this point
* For now we actually use a configuration flag
*/
-if ($cfg['SQLValidator']['use'] == TRUE) {
+if ($cfg['SQLValidator']['use'] == true) {
require_once './libraries/sqlvalidator.class.php';
-} // if ($cfg['SQLValidator']['use'] == TRUE)
+} // if ($cfg['SQLValidator']['use'] == true)
/**
diff --git a/libraries/zip_extension.lib.php b/libraries/zip_extension.lib.php
index 435d319..0527911 100644
--- a/libraries/zip_extension.lib.php
+++ b/libraries/zip_extension.lib.php
@@ -44,7 +44,7 @@ function PMA_getZipContents($file)
* haven't found 'content.xml' or there was a parsing
* error that we must display
*/
- if ($entry === FALSE) {
+ if ($entry === false) {
$error_message = __('Error in ZIP archive:') . ' Could not find "content.xml"';
} else {
$error_message = __('Error in ZIP archive:') . ' ' . PMA_getZipError($zip_handle);
diff --git a/pmd_pdf.php b/pmd_pdf.php
index 89f6b5e..4972ae2 100644
--- a/pmd_pdf.php
+++ b/pmd_pdf.php
@@ -43,7 +43,7 @@ if (isset($mode)) {
if ('export' == $mode) {
$sql = "REPLACE INTO " . $pma_table . " (db_name, table_name, pdf_page_number, x, y) SELECT db_name, table_name, " . $pdf_page_number_q . ", ROUND(x/" . $scale_q . ") , ROUND(y/" . $scale_q . ") y FROM " . $pmd_table . " WHERE db_name = '" . PMA_sqlAddslashes($db) . "'";
- PMA_query_as_controluser($sql,TRUE,PMA_DBI_QUERY_STORE);
+ PMA_query_as_controluser($sql,true,PMA_DBI_QUERY_STORE);
}
if ('import' == $mode) {
@@ -57,7 +57,7 @@ if (isset($mode)) {
' . $pmd_table . '.`table_name` = ' . $pma_table . '.`table_name`
AND
' . $pmd_table . '.`db_name`=\''. PMA_sqlAddslashes($db) .'\'
- AND pdf_page_number = ' . $pdf_page_number_q . ';', TRUE, PMA_DBI_QUERY_STORE);
+ AND pdf_page_number = ' . $pdf_page_number_q . ';', true, PMA_DBI_QUERY_STORE);
}
}
diff --git a/pmd_relation_upd.php b/pmd_relation_upd.php
index 564395b..6b4b92b 100644
--- a/pmd_relation_upd.php
+++ b/pmd_relation_upd.php
@@ -50,7 +50,7 @@ if ($try_to_delete_internal_relation) {
. ' AND foreign_db = \'' . PMA_sqlAddslashes($DB1) . '\''
. ' AND foreign_table = \'' . PMA_sqlAddslashes($T1) . '\''
. ' AND foreign_field = \'' . PMA_sqlAddslashes($F1) . '\''
- , FALSE, PMA_DBI_QUERY_STORE);
+ , false, PMA_DBI_QUERY_STORE);
}
PMD_return_upd(1, __('Relation deleted'));
diff --git a/server_privileges.php b/server_privileges.php
index 13ee074..0842432 100644
--- a/server_privileges.php
+++ b/server_privileges.php
@@ -184,7 +184,7 @@ function PMA_RangeOfUsers($initial = '')
*
* @return array
*/
-function PMA_extractPrivInfo($row = '', $enableHTML = FALSE)
+function PMA_extractPrivInfo($row = '', $enableHTML = false)
{
$grants = array(
array('Select_priv', 'SELECT', __('Allows reading data.')),
@@ -235,7 +235,7 @@ function PMA_extractPrivInfo($row = '', $enableHTML = FALSE)
unset($users_grants);
}
$privs = array();
- $allPrivileges = TRUE;
+ $allPrivileges = true;
foreach ($grants as $current_grant) {
if ((!empty($row) && isset($row[$current_grant[0]]))
|| (empty($row) && isset($GLOBALS[$current_grant[0]]))) {
@@ -261,7 +261,7 @@ function PMA_extractPrivInfo($row = '', $enableHTML = FALSE)
}
$privs[] = $priv_string . ' (`' . join('`, `', $GLOBALS[$current_grant[0]]) . '`)';
} else {
- $allPrivileges = FALSE;
+ $allPrivileges = false;
}
}
}
@@ -326,7 +326,7 @@ function PMA_display_column_privs($columns, $row, $name_for_select,
*
* @return void
*/
-function PMA_displayPrivTable($db = '*', $table = '*', $submit = TRUE)
+function PMA_displayPrivTable($db = '*', $table = '*', $submit = true)
{
global $random_n;
@@ -404,10 +404,10 @@ function PMA_displayPrivTable($db = '*', $table = '*', $submit = TRUE)
if ($res) {
while ($row1 = PMA_DBI_fetch_row($res)) {
$columns[$row1[0]] = array(
- 'Select' => FALSE,
- 'Insert' => FALSE,
- 'Update' => FALSE,
- 'References' => FALSE
+ 'Select' => false,
+ 'Insert' => false,
+ 'Update' => false,
+ 'References' => false
);
}
PMA_DBI_free_result($res);
@@ -431,7 +431,7 @@ function PMA_displayPrivTable($db = '*', $table = '*', $submit = TRUE)
while ($row1 = PMA_DBI_fetch_row($res)) {
$row1[1] = explode(',', $row1[1]);
foreach ($row1[1] as $current) {
- $columns[$row1[0]][$current] = TRUE;
+ $columns[$row1[0]][$current] = true;
}
}
PMA_DBI_free_result($res);
@@ -963,7 +963,7 @@ if (isset($_REQUEST['adduser_submit']) || isset($_REQUEST['change_copy'])) {
if($GLOBALS['is_ajax_request'] != true) {
// this is needed in case tracking is on:
$GLOBALS['db'] = $username;
- $GLOBALS['reload'] = TRUE;
+ $GLOBALS['reload'] = true;
PMA_reloadNavigation();
}
@@ -1232,7 +1232,7 @@ if (isset($_REQUEST['change_pw'])) {
$sql_query = 'SET PASSWORD FOR \'' . PMA_sqlAddslashes($username) . '\'@\'' . PMA_sqlAddslashes($hostname) . '\' = ' . (($pma_pw == '') ? '\'\'' : $hashing_function . '(\'' . preg_replace('@. at s', '*', $pma_pw) . '\')');
$local_query = 'SET PASSWORD FOR \'' . PMA_sqlAddslashes($username) . '\'@\'' . PMA_sqlAddslashes($hostname) . '\' = ' . (($pma_pw == '') ? '\'\'' : $hashing_function . '(\'' . PMA_sqlAddslashes($pma_pw) . '\')');
PMA_DBI_try_query($local_query)
- or PMA_mysqlDie(PMA_DBI_getError(), $sql_query, FALSE, $err_url);
+ or PMA_mysqlDie(PMA_DBI_getError(), $sql_query, false, $err_url);
$message = PMA_Message::success(__('The password for %s was changed successfully.'));
$message->addParam('\'' . htmlspecialchars($username) . '\'@\'' . htmlspecialchars($hostname) . '\'');
}
@@ -1258,7 +1258,7 @@ if (isset($_REQUEST['delete']) || (isset($_REQUEST['change_copy']) && $_REQUEST[
if (isset($_REQUEST['drop_users_db'])) {
$queries[] = 'DROP DATABASE IF EXISTS ' . PMA_backquote($this_user) . ';';
- $GLOBALS['reload'] = TRUE;
+ $GLOBALS['reload'] = true;
if($GLOBALS['is_ajax_request'] != true) {
PMA_reloadNavigation();
@@ -1554,16 +1554,16 @@ if (empty($_REQUEST['adduser']) && (! isset($checkprivs) || ! strlen($checkprivs
if( $GLOBALS['is_ajax_request'] != true && PMA_DBI_num_rows($res) > 20 ) {
- // initialize to FALSE the letters A-Z
+ // initialize to false the letters A-Z
for ($letter_counter = 1; $letter_counter < 27; $letter_counter++) {
if (! isset($array_initials[chr($letter_counter + 64)])) {
- $array_initials[chr($letter_counter + 64)] = FALSE;
+ $array_initials[chr($letter_counter + 64)] = false;
}
}
$initials = PMA_DBI_try_query('SELECT DISTINCT UPPER(LEFT(`User`,1)) FROM `user` ORDER BY `User` ASC', null, PMA_DBI_QUERY_STORE);
while (list($tmp_initial) = PMA_DBI_fetch_row($initials)) {
- $array_initials[$tmp_initial] = TRUE;
+ $array_initials[$tmp_initial] = true;
}
// Display the initials, which can be any characters, not
@@ -1964,7 +1964,7 @@ if (empty($_REQUEST['adduser']) && (! isset($checkprivs) || ! strlen($checkprivs
echo '<tr class="' . ($odd_row ? 'odd' : 'even') . '">' . "\n"
. ' <td>' . htmlspecialchars((! isset($dbname)) ? $row['Db'] : $row['Table_name']) . '</td>' . "\n"
. ' <td><tt>' . "\n"
- . ' ' . join(',' . "\n" . ' ', PMA_extractPrivInfo($row, TRUE)) . "\n"
+ . ' ' . join(',' . "\n" . ' ', PMA_extractPrivInfo($row, true)) . "\n"
. ' </tt></td>' . "\n"
. ' <td>' . ((((! isset($dbname)) && $row['Grant_priv'] == 'Y') || (isset($dbname) && in_array('Grant', explode(',', $row['Table_priv'])))) ? __('Yes') : __('No')) . '</td>' . "\n"
. ' <td>';
@@ -2133,7 +2133,7 @@ if (empty($_REQUEST['adduser']) && (! isset($checkprivs) || ! strlen($checkprivs
unset($default_choice);
echo '</fieldset>' . "\n";
- PMA_displayPrivTable('*', '*', FALSE);
+ PMA_displayPrivTable('*', '*', false);
echo ' <fieldset id="fieldset_add_user_footer" class="tblFooters">' . "\n"
. ' <input type="submit" name="adduser_submit" value="' . __('Go') . '" />' . "\n"
. ' </fieldset>' . "\n"
@@ -2155,7 +2155,7 @@ if (empty($_REQUEST['adduser']) && (! isset($checkprivs) || ! strlen($checkprivs
. ' </tr>' . "\n"
. '</thead>' . "\n"
. '<tbody>' . "\n";
- $odd_row = TRUE;
+ $odd_row = true;
unset($row, $row1, $row2);
// now, we build the table...
@@ -2222,11 +2222,11 @@ if (empty($_REQUEST['adduser']) && (! isset($checkprivs) || ! strlen($checkprivs
$res = PMA_DBI_query($sql_query);
$row = PMA_DBI_fetch_assoc($res);
if ($row) {
- $found = TRUE;
+ $found = true;
}
if ($found) {
- while (TRUE) {
+ while (true) {
// prepare the current user
$current_privileges = array();
$current_user = $row['User'];
@@ -2261,7 +2261,7 @@ if (empty($_REQUEST['adduser']) && (! isset($checkprivs) || ! strlen($checkprivs
. ' </td>' . "\n"
. ' <td>' . "\n"
. ' <tt>' . "\n"
- . ' ' . join(',' . "\n" . ' ', PMA_extractPrivInfo($current, TRUE)) . "\n"
+ . ' ' . join(',' . "\n" . ' ', PMA_extractPrivInfo($current, true)) . "\n"
. ' </tt>' . "\n"
. ' </td>' . "\n"
. ' <td>' . "\n"
diff --git a/setup/lib/common.inc.php b/setup/lib/common.inc.php
index 8b43caf..2965dec 100644
--- a/setup/lib/common.inc.php
+++ b/s tup/lib/common.inc.php c.php b/setup/lib/common.inc.php ', PMA_extractPrivInfo($current, true)) . "\n" nt', explode(',', $row['Table_priv'])))) ? __('Yes') : __('No')) . '</td>' . "\n" $pma_pw) . '\')'); \')'); b_name = '" . PMA_sqlAddslashes($db) . "'"; ÿÿ ë]
g/+ 6 è è! è! ÐÔÿÿ @Õÿÿ xô¡h/+ PËÿÿ "A
g/+ ^
g/+ ÐÔÿÿ ð@
g/+ Õÿÿ Àïi/+ óH
g/+ ài/+ Øäi/+ ¨éi/+ ÈÄg/+ xô¡h/+ PËÿÿ Êÿÿ ë]
g/+ à! à! ÐÔÿÿ @Õÿÿ Ƚh/+ 0Ìÿÿ "A
g/+ ^
g/+ ÐÔÿÿ ð@
g/+ Õÿÿ Õÿÿ øÔÿÿ [¦g/+ p @Õÿÿ óH
g/+ ÈÄg/+ 0Ìÿÿ Ëÿÿ ë]
g/+ G H I J K M N O P ÐÔÿÿ @Õÿÿ HuXh/+ ÐÍÿÿ "A
g/+ ^
g/+ ÐÔÿÿ 0ïi/+ óH
g/+ ¢h/+ ©5h/+ ài/+ Øäi/+ ¨éi/+ ÈÄg/+ HuXh/+ ÐÍÿÿ Ìÿÿ ë]
g/+ 8uXh/+ ÐÍÿÿ @Ìÿÿ ë]
g/+ (uXh/+ ÐÍÿÿ pÌÿÿ ë]
g/+ uXh/+ ÐÍÿÿ Ìÿÿ ë]
g/+ ¨îi/+ óH
g/+ ¨éi/+ Çÿÿ ø5h/+ æG
g/+ Øäi/+ @Íÿÿ yø5h/+ æG
g/+ ài/+ pÍÿÿ Zø5h/+ æG
g/+ ؤ5h/+ ¢h/+ ©5h/+ ài/+ Ø¢h/+ Øäi/+ ¨éi/+ ÈÄg/+ àí3h/+ ðÎÿÿ ÀÍÿÿ ë]
g/+ # % ' ) * - . 0 3 5 6 7 8 : < = ÐÔÿÿ @Õÿÿ p+ h/+ Ðÿÿ "A
g/+ 8¢h/+ óH
g/+ Ø¢h/+ ¢h/+ ÈÄg/+ c f mÌg/+ @Õÿÿ p+ h/+ Ðÿÿ àÎÿÿ ë]
g/+ Ó%°æ§ìwqÒ-øÒ êÓïs¨Ó,~9×u]ÞÓ 4Q ÷U^Qʧ ¶uª¹ñìò*Äv´Òg/+ Öÿÿ Fii/+ Fii/+ ?UÏg/+ @Öÿÿ Íÿÿ `Ñÿÿ mÌg/+ æG
g/+ èT¦g/+ À×ÿÿ Bii/+ Öÿÿ Õÿÿ õì¦g/+ @Õÿÿ ÿÿÿÿÿÿÿÿBii/+ HÕÿÿ ë]
g etup/lib/common.inc.php
@@ -10,8 +10,8 @@
* Do not include full common.
* @ignore
*/
-define('PMA_MINIMUM_COMMON', TRUE);
-define('PMA_SETUP', TRUE);
+define('PMA_MINIMUM_COMMON', true);
+define('PMA_SETUP', true);
chdir('..');
if (!file_exists('./libraries/common.inc.php')) {
diff --git a/sql.php b/sql.php
index 1053a9d..61a4668 100644
--- a/sql.php
+++ b/sql.php
@@ -157,7 +157,7 @@ if(isset($_REQUEST['get_set_values']) && $_REQUEST['get_set_values'] == true) {
if (empty($sql_query) && strlen($table) && strlen($db)) {
require_once './libraries/bookmark.lib.php';
$book_sql_query = PMA_Bookmark_get($db, '\'' . PMA_sqlAddslashes($table) . '\'',
- 'label', FALSE, TRUE);
+ 'label', false, true);
if (! empty($book_sql_query)) {
$GLOBALS['using_bookmark_message'] = PMA_message::notice(__('Using bookmark "%s" as default browse query.'));
@@ -736,7 +736,7 @@ if (0 == $num_rows || $is_affected) {
//if some posted fields need to be transformed, generate them here.
$mime_map = PMA_getMIME($db, $table);
- if ($mime_map === FALSE) {
+ if ($mime_map === false) {
$mime_map = array();
}
diff --git a/tbl_change.php b/tbl_change.php
index efdbd3f..4adaf40 100644
--- a/tbl_change.php
+++ b/tbl_change.php
@@ -469,12 +469,12 @@ foreach ($rows as $row_id => $vrow) {
<?php } //End if
// Prepares the field value
- $real_null_value = FALSE;
+ $real_null_value = false;
$special_chars_encoded = '';
if (isset($vrow)) {
// (we are editing)
if (is_null($vrow[$field['Field']])) {
- $real_null_value = TRUE;
+ $real_null_value = true;
$vrow[$field['Field']] = '';
$special_chars = '';
$data = $vrow[$field['Field']];
@@ -500,7 +500,7 @@ foreach ($rows as $row_id => $vrow) {
//when copying row, it is useful to empty auto-increment column to prevent duplicate key error
if (isset($default_action) && $default_action === 'insert') {
- if ($field['Key'] === 'PRI' && strpos($field['Extra'], 'auto_increment') !== FALSE) {
+ if ($field['Key'] === 'PRI' && strpos($field['Extra'], 'auto_increment') !== false) {
$data = $special_chars_encoded = $special_chars = NULL;
}
}
@@ -516,7 +516,7 @@ foreach ($rows as $row_id => $vrow) {
// display default values
if (! isset($field['Default'])) {
$field['Default'] = '';
- $real_null_value = TRUE;
+ $real_null_value = true;
$data = '';
} else {
$data = $field['Default'];
@@ -574,7 +574,7 @@ foreach ($rows as $row_id => $vrow) {
}
$dropdown_built = array();
- $op_spacing_needed = FALSE;
+ $op_spacing_needed = false;
// what function defined as default?
// for the first timestamp we don't set the default function
@@ -611,8 +611,8 @@ foreach ($rows as $row_id => $vrow) {
echo ' selected="selected"';
}
echo '>' . $each_dropdown . '</option>' . "\n";
- $dropdown_built[$each_dropdown] = 'TRUE';
- $op_spacing_needed = TRUE;
+ $dropdown_built[$each_dropdown] = 'true';
+ $op_spacing_needed = true;
}
// For compatibility's sake, do not let out all other functions. Instead
@@ -620,16 +620,16 @@ foreach ($rows as $row_id => $vrow) {
// yet.
$cnt_functions = count($cfg['Functions']);
for ($j = 0; $j < $cnt_functions; $j++) {
- if (! isset($dropdown_built[$cfg['Functions'][$j]]) || $dropdown_built[$cfg['Functions'][$j]] != 'TRUE') {
+ if (! isset($dropdown_built[$cfg['Functions'][$j]]) || $dropdown_built[$cfg['Functions'][$j]] != 'true') {
// Is current function defined as default?
$selected = ($field['first_timestamp'] && $cfg['Functions'][$j] == $cfg['DefaultFunctions']['first_timestamp'])
|| (!$field['first_timestamp'] && $cfg['Functions'][$j] == $default_function)
? ' selected="selected"'
: '';
- if ($op_spacing_needed == TRUE) {
+ if ($op_spacing_needed == true) {
echo ' ';
echo '<option value="">--------</option>' . "\n";
- $op_spacing_needed = FALSE;
+ $op_spacing_needed = false;
}
echo ' ';
@@ -957,7 +957,7 @@ foreach ($rows as $row_id => $vrow) {
if (!empty($cfg['UploadDir'])) {
$files = PMA_getFileSelectOptions(PMA_userDir($cfg['UploadDir']));
- if ($files === FALSE) {
+ if ($files === false) {
echo ' <font color="red">' . __('Error') . '</font><br />' . "\n";
echo ' ' . __('The directory you set for upload work cannot be reached') . "\n";
} elseif (!empty($files)) {
@@ -978,7 +978,7 @@ foreach ($rows as $row_id => $vrow) {
// field size should be at least 4 and max 40
$fieldsize = min(max($field['len'], 4), 40);
echo $backup_field . "\n";
- if ($field['is_char'] && ($cfg['CharEditing'] == 'textarea' || strpos($data, "\n") !== FALSE)) {
+ if ($field['is_char'] && ($cfg['CharEditing'] == 'textarea' || strpos($data, "\n") !== false)) {
echo "\n";
?>
<textarea name="fields<?php echo $field_name_appendix; ?>"
diff --git a/tbl_relation.php b/tbl_relation.php
index 90bd153..6d82cc3 100644
--- a/tbl_relation.php
+++ b/tbl_relation.php
@@ -31,7 +31,7 @@ require_once './libraries/tbl_info.inc.php';
// Note: in libraries/tbl_links.inc.php we get and display the table comment.
// For InnoDB, this comment contains the REFER information but any update
// has not been done yet (will be done in tbl_relation.php later).
-$avoid_show_comment = TRUE;
+$avoid_show_comment = true;
/**
* Displays top menu links
@@ -269,7 +269,7 @@ if (isset($_REQUEST['destination_foreign'])) {
}
if (substr($tmp_error, 1, 4) == '1216'
|| substr($tmp_error, 1, 4) == '1452') {
- PMA_mysqlDie($tmp_error, $sql_query, FALSE, '', FALSE);
+ PMA_mysqlDie($tmp_error, $sql_query, false, '', false);
echo PMA_showMySQLDocu('manual_Table_types', 'InnoDB_foreign_key_constraints') . "\n";
}
if (substr($tmp_error, 1, 4) == '1005') {
@@ -436,15 +436,15 @@ if ($col_rs && PMA_DBI_num_rows($col_rs) > 0) {
. $existrel[$myfield]['foreign_table'] . '.'
. $existrel[$myfield]['foreign_field'];
} else {
- $foreign_field = FALSE;
+ $foreign_field = false;
}
- $seen_key = FALSE;
+ $seen_key = false;
foreach ($selectboxall as $value) {
echo ' '
. '<option value="' . htmlspecialchars($value) . '"';
if ($foreign_field && $value == $foreign_field) {
echo ' selected="selected"';
- $seen_key = TRUE;
+ $seen_key = true;
}
echo '>' . htmlspecialchars($value) . '</option>'. "\n";
} // end while
@@ -478,16 +478,16 @@ if ($col_rs && PMA_DBI_num_rows($col_rs) > 0) {
. PMA_backquote($existrel_foreign[$myfield]['foreign_table']) . '.'
. PMA_backquote($existrel_foreign[$myfield]['foreign_field']);
} else {
- $foreign_field = FALSE;
+ $foreign_field = false;
}
- $found_foreign_field = FALSE;
+ $found_foreign_field = false;
foreach ($selectboxall_foreign as $value) {
echo ' '
. '<option value="' . htmlspecialchars($value) . '"';
if ($foreign_field && $value == $foreign_field) {
echo ' selected="selected"';
- $found_foreign_field = TRUE;
+ $found_foreign_field = true;
}
echo '>' . htmlspecialchars($value) . '</option>'. "\n";
} // end while
diff --git a/tbl_row_action.php b/tbl_row_action.php
index b2f28fa..6e9dde1 100644
--- a/tbl_row_action.php
+++ b/tbl_row_action.php
@@ -87,7 +87,7 @@ if (!empty($submit_mult)) {
case 'row_export':
// Needed to allow SQL export
- $single_table = TRUE;
+ $single_table = true;
// As we got the rows to be exported from the
// 'rows_to_delete' checkbox, we use the index of it as the
hooks/post-receive
--
phpMyAdmin
More information about the Git
mailing list