Permalink
Browse files

Use lower case for true, false and null

  • Loading branch information...
1 parent 9bcb83a commit 13adb5adf7e2b429819a85131edd998b34726ad7 @madhuracj madhuracj committed Sep 23, 2011
View
@@ -12,7 +12,7 @@
/*
* @var string contains media type of BLOB reference
*/
- $mediaType = isset($_REQUEST['media_type']) ? $_REQUEST['media_type'] : NULL;
+ $mediaType = isset($_REQUEST['media_type']) ? $_REQUEST['media_type'] : null;
/*
* @var string indicates whether media type is of custom type
@@ -22,7 +22,7 @@
/*
* @var string contains BLOB reference
*/
- $bsReference = isset($_REQUEST['bs_reference']) ? $_REQUEST['bs_reference'] : NULL;
+ $bsReference = isset($_REQUEST['bs_reference']) ? $_REQUEST['bs_reference'] : null;
// if media type and BS reference are specified
if (isset($mediaType) && isset($bsReference)) {
View
@@ -69,16 +69,16 @@
/**
* String containing the SQL Query formatted in pretty HTML
* @global array $GLOBALS['extra_data']
- * @name $extra_data
+ * @name $extra_data
*/
- $extra_data['sql_query'] = PMA_showMessage(NULL, $sql_query, 'success');
+ $extra_data['sql_query'] = PMA_showMessage(null, $sql_query, 'success');
//Construct the html for the new database, so that it can be appended to the list of databases on server_databases.php
/**
* Build the array to be passed to {@link PMA_generate_common_url} to generate the links
* @global array $GLOBALS['db_url_params']
- * @name $db_url_params
+ * @name $db_url_params
*/
$db_url_params['db'] = $new_db;
View
@@ -304,7 +304,7 @@
*/
if ( $GLOBALS['is_ajax_request'] == true) {
$extra_data['newname'] = $newname;
- $extra_data['sql_query'] = PMA_showMessage(NULL, $sql_query);
+ $extra_data['sql_query'] = PMA_showMessage(null, $sql_query);
PMA_ajaxResponse($message, $message->isSuccess(), $extra_data);
};
}
@@ -442,7 +442,7 @@
'reload' => '1',
'purge' => '1',
'message_to_show' => sprintf(__('Database %s has been dropped.'), htmlspecialchars(PMA_backquote($db))),
- 'db' => NULL,
+ 'db' => null,
);
?>
<li><a href="sql.php<?php echo PMA_generate_common_url($this_url_params); ?>" <?php echo ($GLOBALS['cfg']['AjaxEnable'] ? 'id="drop_db_anchor"' : ''); ?>>
View
@@ -395,7 +395,7 @@
}
}
-if (! $error && false !== $import_handle && NULL !== $import_handle) {
+if (! $error && false !== $import_handle && null !== $import_handle) {
fclose($import_handle);
}
@@ -99,17 +99,17 @@ function PMA_DBI_connect($user, $password, $is_controluser = false, $server = nu
}
if (!$server) {
- $link = PMA_DBI_real_connect($cfg['Server']['host'] . $server_port . $server_socket, $user, $password, empty($client_flags) ? NULL : $client_flags);
+ $link = PMA_DBI_real_connect($cfg['Server']['host'] . $server_port . $server_socket, $user, $password, empty($client_flags) ? null : $client_flags);
// Retry with empty password if we're allowed to
if (empty($link) && $cfg['Server']['nopassword'] && !$is_controluser) {
- $link = PMA_DBI_real_connect($cfg['Server']['host'] . $server_port . $server_socket, $user, '', empty($client_flags) ? NULL : $client_flags);
+ $link = PMA_DBI_real_connect($cfg['Server']['host'] . $server_port . $server_socket, $user, '', empty($client_flags) ? null : $client_flags);
}
} else {
if (!isset($server['host'])) {
- $link = PMA_DBI_real_connect($server_socket, $user, $password, NULL);
+ $link = PMA_DBI_real_connect($server_socket, $user, $password, null);
} else {
- $link = PMA_DBI_real_connect($server['host'] . $server_port . $server_socket, $user, $password, NULL);
+ $link = PMA_DBI_real_connect($server['host'] . $server_port . $server_socket, $user, $password, null);
}
}
if (empty($link)) {
@@ -209,7 +209,7 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) {
$buffer .= ' \\hline \\endhead \\hline \\endfoot \\hline ' . $crlf;
if (isset($GLOBALS['latex_caption'])) {
$buffer .= ' \\caption{' . PMA_expandUserString($GLOBALS['latex_data_caption'], 'PMA_texEscape', array('table' => $table, 'database' => $db))
- . '} \\label{' . PMA_expandUserString($GLOBALS['latex_data_label'], NULL, array('table' => $table, 'database' => $db)) . '} \\\\';
+ . '} \\label{' . PMA_expandUserString($GLOBALS['latex_data_label'], null, array('table' => $table, 'database' => $db)) . '} \\\\';
}
if (!PMA_exportOutputHandler($buffer)) {
return false;
@@ -372,7 +372,7 @@ function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = fals
// Table caption for first page and label
if (isset($GLOBALS['latex_caption'])) {
$buffer .= ' \\caption{'. PMA_expandUserString($GLOBALS['latex_structure_caption'], 'PMA_texEscape', array('table' => $table, 'database' => $db))
- . '} \\label{' . PMA_expandUserString($GLOBALS['latex_structure_label'], NULL, array('table' => $table, 'database' => $db))
+ . '} \\label{' . PMA_expandUserString($GLOBALS['latex_structure_label'], null, array('table' => $table, 'database' => $db))
. '} \\\\' . $crlf;
}
$buffer .= $header . ' \\\\ \\hline \\hline' . $crlf . '\\endfirsthead' . $crlf;
View
@@ -75,7 +75,7 @@ function get_tab_info()
PMA_DBI_select_db($GLOBALS['db']);
$tab_column = array();
for ($i = 0, $cnt = count($GLOBALS['PMD']["TABLE_NAME"]); $i < $cnt; $i++) {
- $fields_rs = PMA_DBI_query(PMA_DBI_get_columns_sql($GLOBALS['db'], $GLOBALS['PMD']["TABLE_NAME_SMALL"][$i], null, true), NULL, PMA_DBI_QUERY_STORE);
+ $fields_rs = PMA_DBI_query(PMA_DBI_get_columns_sql($GLOBALS['db'], $GLOBALS['PMD']["TABLE_NAME_SMALL"][$i], null, true), null, PMA_DBI_QUERY_STORE);
$j = 0;
while ($row = PMA_DBI_fetch_assoc($fields_rs)) {
$tab_column[$GLOBALS['PMD']['TABLE_NAME'][$i]]['COLUMN_ID'][$j] = $j;
@@ -98,7 +98,7 @@ function get_script_contr()
PMA_DBI_select_db($GLOBALS['db']);
$con["C_NAME"] = array();
$i = 0;
- $alltab_rs = PMA_DBI_query('SHOW TABLES FROM ' . PMA_backquote($GLOBALS['db']), NULL, PMA_DBI_QUERY_STORE);
+ $alltab_rs = PMA_DBI_query('SHOW TABLES FROM ' . PMA_backquote($GLOBALS['db']), null, PMA_DBI_QUERY_STORE);
while ($val = @PMA_DBI_fetch_row($alltab_rs)) {
$row = PMA_getForeigners($GLOBALS['db'], $val[0], '', 'internal');
//echo "<br> internal ".$GLOBALS['db']." - ".$val[0]." - ";
View
@@ -1486,7 +1486,7 @@ function printVariablesTable()
}
if ('%' === substr($name, -1, 1)) {
echo htmlspecialchars(PMA_formatNumber($value, 0, 2)) . ' %';
- } elseif (strpos($name, 'Uptime')!==FALSE) {
+ } elseif (strpos($name, 'Uptime') !== false) {
echo htmlspecialchars(PMA_timespanFormat($value));
} elseif (is_numeric($value) && $value == (int) $value && $value > 1000) {
echo htmlspecialchars(PMA_formatNumber($value, 3, 1));
View
10 sql.php
@@ -104,7 +104,7 @@
}
$extra_data['dropdown'] = $dropdown;
- PMA_ajaxResponse(NULL, true, $extra_data);
+ PMA_ajaxResponse(null, true, $extra_data);
}
/**
@@ -133,7 +133,7 @@
$dropdown = '<select>' . $dropdown . '</select>';
$extra_data['dropdown'] = $dropdown;
- PMA_ajaxResponse(NULL, true, $extra_data);
+ PMA_ajaxResponse(null, true, $extra_data);
}
/**
@@ -162,7 +162,7 @@
$select = '<select multiple="multiple" size="' . $select_size . '">' . $select . '</select>';
$extra_data['select'] = $select;
- PMA_ajaxResponse(NULL, true, $extra_data);
+ PMA_ajaxResponse(null, true, $extra_data);
}
/**
@@ -191,7 +191,7 @@
}
}
- PMA_ajaxResponse(NULL, ($retval == true));
+ PMA_ajaxResponse(null, ($retval == true));
}
// Default to browse if no query set and we have table
@@ -766,7 +766,7 @@
$row = PMA_DBI_fetch_row($result);
$extra_data = array();
$extra_data['value'] = $row[0];
- PMA_ajaxResponse(NULL, true, $extra_data);
+ PMA_ajaxResponse(null, true, $extra_data);
}
if (isset($_REQUEST['ajax_request']) && isset($_REQUEST['table_maintenance'])) {
View
@@ -186,7 +186,7 @@
$message->addParam($table);
if( $GLOBALS['is_ajax_request'] == true) {
- $extra_data['sql_query'] = PMA_showMessage(NULL, $sql_query);
+ $extra_data['sql_query'] = PMA_showMessage(null, $sql_query);
PMA_ajaxResponse($message, $message->isSuccess(), $extra_data);
}
View
@@ -131,7 +131,7 @@
}
if ( $_REQUEST['ajax_request'] == true) {
- $extra_data['sql_query'] = PMA_showMessage(NULL, $sql_query);
+ $extra_data['sql_query'] = PMA_showMessage(null, $sql_query);
PMA_ajaxResponse($message, $message->isSuccess(), $extra_data);
}
View
@@ -100,7 +100,7 @@
if ( $GLOBALS['is_ajax_request'] == true) {
$extra_data['index_table'] = PMA_Index::getView($table, $db);
- $extra_data['sql_query'] = PMA_showMessage(NULL, $sql_query);
+ $extra_data['sql_query'] = PMA_showMessage(null, $sql_query);
PMA_ajaxResponse($message, $message->isSuccess(), $extra_data);
}
View
@@ -65,13 +65,13 @@
$db = $_REQUEST['target_db'];
$table = $_REQUEST['new_name'];
}
-
+
if ( $_REQUEST['ajax_request'] == true) {
- $extra_data['sql_query'] = PMA_showMessage(NULL, $sql_query);
+ $extra_data['sql_query'] = PMA_showMessage(null, $sql_query);
$extra_data['db'] = $GLOBALS['db'];
PMA_ajaxResponse($message, $message->isSuccess(), $extra_data);
}
-
+
$reload = 1;
}
} else {
View
@@ -230,7 +230,7 @@
// $result should exist, regardless of $_message
$_type = $result ? 'success' : 'error';
if ( $_REQUEST['ajax_request'] == true) {
- $extra_data['sql_query'] = PMA_showMessage(NULL, $sql_query);
+ $extra_data['sql_query'] = PMA_showMessage(null, $sql_query);
PMA_ajaxResponse($_message, $_message->isSuccess(), $extra_data);
}
}
View
@@ -231,8 +231,8 @@
// for blobstreaming
if ($blob_streaming_active) {
- $remove_blob_repo = isset($_REQUEST['remove_blob_repo_' . $key]) ? $_REQUEST['remove_blob_repo_' . $key] : NULL;
- $upload_blob_repo = isset($_REQUEST['upload_blob_repo_' . $key]) ? $_REQUEST['upload_blob_repo_' . $key] : NULL;
+ $remove_blob_repo = isset($_REQUEST['remove_blob_repo_' . $key]) ? $_REQUEST['remove_blob_repo_' . $key] : null;
+ $upload_blob_repo = isset($_REQUEST['upload_blob_repo_' . $key]) ? $_REQUEST['upload_blob_repo_' . $key] : null;
// checks if an existing blob repository reference should be removed
if (isset($remove_blob_repo) && ! isset($upload_blob_repo)) {
@@ -19,7 +19,7 @@ class PMA_ConfigTest extends PHPUnit_Framework_TestCase
/**
* Turn off backup globals
*/
- protected $backupGlobals = FALSE;
+ protected $backupGlobals = false;
/**
* @var PMA_Config
@@ -94,7 +94,7 @@ function testPMA_array_write()
PMA_array_write('sarr/not_existing/1', $arr, 'some_val');
$this->assertEquals($arr['sarr']['not_existing'][1], 'some_val');
- PMA_array_write('sarr/0/2', $arr, NULL);
+ PMA_array_write('sarr/0/2', $arr, null);
$this->assertNull($arr['sarr'][0][2]);
}
@@ -104,19 +104,19 @@ public function setUp()
if (defined('PMA_IS_IIS')) {
$this->oldIISvalue = PMA_IS_IIS;
- runkit_constant_redefine('PMA_IS_IIS', NULL);
+ runkit_constant_redefine('PMA_IS_IIS', null);
} else {
- runkit_constant_add('PMA_IS_IIS', NULL);
+ runkit_constant_add('PMA_IS_IIS', null);
}
$this->oldSIDvalue = 'non-defined';
if (defined('SID')) {
$this->oldSIDvalue = SID;
- runkit_constant_redefine('SID', NULL);
+ runkit_constant_redefine('SID', null);
} else {
- runkit_constant_add('SID', NULL);
+ runkit_constant_add('SID', null);
}
}
@@ -10,9 +10,9 @@
require_once 'PmaSeleniumTestCase.php';
-class PmaSeleniumLoginTest extends PmaSeleniumTestCase
+class PmaSeleniumLoginTest extends PmaSeleniumTestCase
{
- protected $captureScreenshotOnFailure = TRUE;
+ protected $captureScreenshotOnFailure = true;
protected $screenshotPath = '/var/www/screenshots';
protected $screenshotUrl = 'http://localhost/screenshots';
@@ -21,7 +21,7 @@ class PmaSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase
protected $selenium;
protected $cfg;
- protected $captureScreenshotOnFailure = TRUE;
+ protected $captureScreenshotOnFailure = true;
protected $screenshotPath = '/var/www/screenshots';
protected $screenshotUrl = 'http://localhost/screenshots';

0 comments on commit 13adb5a

Please sign in to comment.