Other replacements for easier reading

This commit is contained in:
Marc Delisle 2011-05-09 12:57:28 -04:00
parent 13b31956ae
commit e6211f0c2f
18 changed files with 42 additions and 42 deletions

View File

@ -37,7 +37,7 @@ if (strlen($db) && (! empty($db_rename) || ! empty($db_copy))) {
$move = false;
}
if (! isset($newname) || !strlen($newname)) {
if (! isset($newname) || ! strlen($newname)) {
$message = PMA_Message::error(__('The database name is empty!'));
} else {
$sql_query = ''; // in case target db exists
@ -561,7 +561,7 @@ echo __('Remove database');
. '</form></div>' . "\n";
if ($num_tables > 0
&& !$cfgRelation['allworks'] && $cfg['PmaNoRelation_DisableWarning'] == false) {
&& ! $cfgRelation['allworks'] && $cfg['PmaNoRelation_DisableWarning'] == false) {
$message = PMA_Message::notice(__('The phpMyAdmin configuration storage has been deactivated. To find out why click %shere%s.'));
$message->addParam('<a href="' . $cfg['PmaAbsoluteUri'] . 'chk_rel.php?' . $url_query . '">', false);
$message->addParam('</a>', false);

View File

@ -301,7 +301,7 @@ function PMA_formatSql($parsed_sql, $unparsed_sql = '')
return htmlspecialchars($parsed_sql['raw']);
}
// then check for an array
if (!is_array($parsed_sql)) {
if (! is_array($parsed_sql)) {
// We don't so just return the input directly
// This is intended to be used for when the SQL Parser is turned off
$formatted_sql = '<pre>' . "\n"
@ -2434,8 +2434,8 @@ function PMA_userDir($dir)
*/
function PMA_getDbLink($database = null)
{
if (!strlen($database)) {
if (!strlen($GLOBALS['db'])) {
if (! strlen($database)) {
if (! strlen($GLOBALS['db'])) {
return '';
}
$database = $GLOBALS['db'];

View File

@ -386,7 +386,7 @@ function PMA_array_merge_recursive()
break;
case 2 :
$args = func_get_args();
if (!is_array($args[0]) || !is_array($args[1])) {
if (! is_array($args[0]) || ! is_array($args[1])) {
return $args[1];
}
foreach ($args[1] as $key2 => $value2) {

View File

@ -1091,7 +1091,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
}
}
if (!is_array($map)) {
if (! is_array($map)) {
$map = array();
}
$row_no = 0;
@ -1563,7 +1563,7 @@ function PMA_displayVerticalTable()
// Displays "edit" link at top if required
if ($GLOBALS['cfg']['ModifyDeleteAtLeft'] && is_array($vertical_display['edit']) && (count($vertical_display['edit']) > 0 || !empty($vertical_display['textbtn']))) {
echo '<tr>' . "\n";
if (!is_array($vertical_display['row_delete'])) {
if (! is_array($vertical_display['row_delete'])) {
echo $vertical_display['textbtn'];
}
$foo_counter = 0;
@ -1581,7 +1581,7 @@ function PMA_displayVerticalTable()
// Displays "copy" link at top if required
if ($GLOBALS['cfg']['ModifyDeleteAtLeft'] && is_array($vertical_display['copy']) && (count($vertical_display['copy']) > 0 || !empty($vertical_display['textbtn']))) {
echo '<tr>' . "\n";
if (!is_array($vertical_display['row_delete'])) {
if (! is_array($vertical_display['row_delete'])) {
echo $vertical_display['textbtn'];
}
$foo_counter = 0;
@ -1599,7 +1599,7 @@ function PMA_displayVerticalTable()
// Displays "delete" link at top if required
if ($GLOBALS['cfg']['ModifyDeleteAtLeft'] && is_array($vertical_display['delete']) && (count($vertical_display['delete']) > 0 || !empty($vertical_display['textbtn']))) {
echo '<tr>' . "\n";
if (!is_array($vertical_display['edit']) && !is_array($vertical_display['row_delete'])) {
if (! is_array($vertical_display['edit']) && ! is_array($vertical_display['row_delete'])) {
echo $vertical_display['textbtn'];
}
$foo_counter = 0;
@ -1652,7 +1652,7 @@ function PMA_displayVerticalTable()
// Displays "edit" link at bottom if required
if ($GLOBALS['cfg']['ModifyDeleteAtRight'] && is_array($vertical_display['edit']) && (count($vertical_display['edit']) > 0 || !empty($vertical_display['textbtn']))) {
echo '<tr>' . "\n";
if (!is_array($vertical_display['row_delete'])) {
if (! is_array($vertical_display['row_delete'])) {
echo $vertical_display['textbtn'];
}
$foo_counter = 0;
@ -1670,7 +1670,7 @@ function PMA_displayVerticalTable()
// Displays "copy" link at bottom if required
if ($GLOBALS['cfg']['ModifyDeleteAtRight'] && is_array($vertical_display['copy']) && (count($vertical_display['copy']) > 0 || !empty($vertical_display['textbtn']))) {
echo '<tr>' . "\n";
if (!is_array($vertical_display['row_delete'])) {
if (! is_array($vertical_display['row_delete'])) {
echo $vertical_display['textbtn'];
}
$foo_counter = 0;
@ -1688,7 +1688,7 @@ function PMA_displayVerticalTable()
// Displays "delete" link at bottom if required
if ($GLOBALS['cfg']['ModifyDeleteAtRight'] && is_array($vertical_display['delete']) && (count($vertical_display['delete']) > 0 || !empty($vertical_display['textbtn']))) {
echo '<tr>' . "\n";
if (!is_array($vertical_display['edit']) && !is_array($vertical_display['row_delete'])) {
if (! is_array($vertical_display['edit']) && ! is_array($vertical_display['row_delete'])) {
echo $vertical_display['textbtn'];
}
$foo_counter = 0;

View File

@ -37,7 +37,7 @@ if (! PMA_cacheExists('mysql_charsets_count', true)) {
: 'SELECT * FROM information_schema.COLLATIONS';
$res = PMA_DBI_query($sql);
while ($row = PMA_DBI_fetch_assoc($res)) {
if (!is_array($mysql_collations[$row['CHARACTER_SET_NAME']])) {
if (! is_array($mysql_collations[$row['CHARACTER_SET_NAME']])) {
$mysql_collations[$row['CHARACTER_SET_NAME']] = array($row['COLLATION_NAME']);
} else {
$mysql_collations[$row['CHARACTER_SET_NAME']][] = $row['COLLATION_NAME'];

View File

@ -680,7 +680,7 @@ class PMA_Dia_Relation_Schema extends PMA_Export_Relation_Schema
$dia->startDiaDoc($this->paper,$this->_topMargin,$this->_bottomMargin,$this->_leftMargin,$this->_rightMargin,$this->orientation);
$alltables = $this->getAllTables($db,$this->pageNumber);
foreach ($alltables as $table) {
if (!isset($this->tables[$table])) {
if (! isset($this->tables[$table])) {
$this->tables[$table] = new Table_Stats($table, $this->pageNumber, $this->showKeys);
}
}
@ -725,10 +725,10 @@ class PMA_Dia_Relation_Schema extends PMA_Export_Relation_Schema
*/
private function _addRelation($masterTable, $masterField, $foreignTable, $foreignField, $showKeys)
{
if (!isset($this->tables[$masterTable])) {
if (! isset($this->tables[$masterTable])) {
$this->tables[$masterTable] = new Table_Stats($masterTable, $this->pageNumber, $showKeys);
}
if (!isset($this->tables[$foreignTable])) {
if (! isset($this->tables[$foreignTable])) {
$this->tables[$foreignTable] = new Table_Stats($foreignTable, $this->pageNumber, $showKeys);
}
$this->_relations[] = new Relation_Stats($this->tables[$masterTable], $masterField, $this->tables[$foreignTable], $foreignField);

View File

@ -759,7 +759,7 @@ class PMA_Eps_Relation_Schema extends PMA_Export_Relation_Schema
$alltables = $this->getAllTables($db,$this->pageNumber);
foreach ($alltables AS $table) {
if (!isset($this->tables[$table])) {
if (! isset($this->tables[$table])) {
$this->tables[$table] = new Table_Stats($table,$eps->getFont(),$eps->getFontSize(), $this->pageNumber, $this->_tablewidth, $this->showKeys, $this->tableDimension);
}
@ -809,10 +809,10 @@ class PMA_Eps_Relation_Schema extends PMA_Export_Relation_Schema
*/
private function _addRelation($masterTable,$font,$fontSize, $masterField, $foreignTable, $foreignField, $showInfo)
{
if (!isset($this->tables[$masterTable])) {
if (! isset($this->tables[$masterTable])) {
$this->tables[$masterTable] = new Table_Stats($masterTable, $font, $fontSize, $this->pageNumber, $this->_tablewidth, false, $showInfo);
}
if (!isset($this->tables[$foreignTable])) {
if (! isset($this->tables[$foreignTable])) {
$this->tables[$foreignTable] = new Table_Stats($foreignTable,$font,$fontSize,$this->pageNumber, $this->_tablewidth, false, $showInfo);
}
$this->_relations[] = new Relation_Stats($this->tables[$masterTable], $masterField, $this->tables[$foreignTable], $foreignField);

View File

@ -882,7 +882,7 @@ class PMA_Pdf_Relation_Schema extends PMA_Export_Relation_Schema
/* snip */
foreach ($alltables as $table) {
if (!isset($this->tables[$table])) {
if (! isset($this->tables[$table])) {
$this->tables[$table] = new Table_Stats($table, $this->_ff, $this->pageNumber, $this->_tablewidth, $this->showKeys, $this->tableDimension);
}
if ($this->sameWide) {
@ -962,11 +962,11 @@ class PMA_Pdf_Relation_Schema extends PMA_Export_Relation_Schema
*/
private function _addRelation($masterTable, $masterField, $foreignTable, $foreignField, $showInfo)
{
if (!isset($this->tables[$masterTable])) {
if (! isset($this->tables[$masterTable])) {
$this->tables[$masterTable] = new Table_Stats($masterTable, $this->_ff, $this->pageNumber, $this->_tablewidth, false, $showInfo);
$this->_setMinMax($this->tables[$masterTable]);
}
if (!isset($this->tables[$foreignTable])) {
if (! isset($this->tables[$foreignTable])) {
$this->tables[$foreignTable] = new Table_Stats($foreignTable, $this->_ff, $this->pageNumber, $this->_tablewidth, false, $showInfo);
$this->_setMinMax($this->tables[$foreignTable]);
}
@ -1305,7 +1305,7 @@ class PMA_Pdf_Relation_Schema extends PMA_Export_Relation_Schema
if ($zerofill) {
$attribute = 'UNSIGNED ZEROFILL';
}
if (!isset($row['Default'])) {
if (! isset($row['Default'])) {
if ($row['Null'] != '' && $row['Null'] != 'NO') {
$row['Default'] = 'NULL';
}

View File

@ -742,7 +742,7 @@ class PMA_Svg_Relation_Schema extends PMA_Export_Relation_Schema
$alltables = $this->getAllTables($db,$this->pageNumber);
foreach ($alltables AS $table) {
if (!isset($this->tables[$table])) {
if (! isset($this->tables[$table])) {
$this->tables[$table] = new Table_Stats($table,$svg->getFont(),$svg->getFontSize(), $this->pageNumber, $this->_tablewidth, $this->showKeys, $this->tableDimension);
}
@ -805,11 +805,11 @@ class PMA_Svg_Relation_Schema extends PMA_Export_Relation_Schema
*/
private function _addRelation($masterTable,$font,$fontSize, $masterField, $foreignTable, $foreignField, $showInfo)
{
if (!isset($this->tables[$masterTable])) {
if (! isset($this->tables[$masterTable])) {
$this->tables[$masterTable] = new Table_Stats($masterTable, $font, $fontSize, $this->pageNumber, $this->_tablewidth, false, $showInfo);
$this->_setMinMax($this->tables[$masterTable]);
}
if (!isset($this->tables[$foreignTable])) {
if (! isset($this->tables[$foreignTable])) {
$this->tables[$foreignTable] = new Table_Stats($foreignTable,$font,$fontSize,$this->pageNumber, $this->_tablewidth, false, $showInfo);
$this->_setMinMax($this->tables[$foreignTable]);
}

View File

@ -222,7 +222,7 @@ class PMA_User_Schema
* Display WYSIWYG parts
*/
if (!isset($_POST['with_field_names']) && !isset($_POST['showwysiwyg'])) {
if (! isset($_POST['with_field_names']) && ! isset($_POST['showwysiwyg'])) {
$with_field_names = TRUE;
}
$this->_displayScratchboardTables($array_sh_page);
@ -783,10 +783,10 @@ class PMA_User_Schema
$arrvalue = 'c_table_' . $i;
global $$arrvalue;
$arrvalue = $$arrvalue;
if (!isset($arrvalue['x']) || $arrvalue['x'] == '') {
if (! isset($arrvalue['x']) || $arrvalue['x'] == '') {
$arrvalue['x'] = 0;
}
if (!isset($arrvalue['y']) || $arrvalue['y'] == '') {
if (! isset($arrvalue['y']) || $arrvalue['y'] == '') {
$arrvalue['y'] = 0;
}
if (isset($arrvalue['name']) && $arrvalue['name'] != '--') {

View File

@ -505,7 +505,7 @@ class PMA_Visio_Relation_Schema extends PMA_Export_Relation_Schema
$alltables = $this->getAllTables($db,$this->pageNumber);
foreach ($alltables as $table) {
if (!isset($this->tables[$table])) {
if (! isset($this->tables[$table])) {
$this->tables[$table] = new Table_Stats($table, $this->pageNumber, $this->showKeys);
}
}
@ -550,10 +550,10 @@ class PMA_Visio_Relation_Schema extends PMA_Export_Relation_Schema
*/
private function _addRelation($masterTable, $masterField, $foreignTable, $foreignField, $showKeys)
{
if (!isset($this->tables[$masterTable])) {
if (! isset($this->tables[$masterTable])) {
$this->tables[$masterTable] = new Table_Stats($masterTable, $this->pageNumber, $showKeys);
}
if (!isset($this->tables[$foreignTable])) {
if (! isset($this->tables[$foreignTable])) {
$this->tables[$foreignTable] = new Table_Stats($foreignTable, $this->pageNumber, $showKeys);
}
$this->_relations[] = new Relation_Stats($this->tables[$masterTable], $masterField, $this->tables[$foreignTable], $foreignField);

View File

@ -2090,7 +2090,7 @@ if (! defined('PMA_MINIMUM_COMMON')) {
{
//DEBUG echo 'in Format<pre>'; print_r($arr); echo '</pre>';
// then check for an array
if (!is_array($arr)) {
if (! is_array($arr)) {
return htmlspecialchars($arr);
}
// first check for the SQL parser having hit an error

View File

@ -64,7 +64,7 @@ $msg->display();
// warn about using session storage for settings
$cfgRelation = PMA_getRelationsParam();
if (!$cfgRelation['userconfigwork']) {
if (! $cfgRelation['userconfigwork']) {
$msg = __('Your preferences will be saved for current session only. Storing them permanently requires %sphpMyAdmin configuration storage%s.');
$msg = PMA_sanitize(sprintf($msg, '[a@./Documentation.html#linked-tables@_blank]', '[/a]'));
PMA_Message::notice($msg)->display();

View File

@ -49,7 +49,7 @@ function PMA_userprefs_pageinit()
function PMA_load_userprefs()
{
$cfgRelation = PMA_getRelationsParam();
if (!$cfgRelation['userconfigwork']) {
if (! $cfgRelation['userconfigwork']) {
// no pmadb table, use session storage
if (! isset($_SESSION['userconfig'])) {
$_SESSION['userconfig'] = array(
@ -104,7 +104,7 @@ function PMA_save_userprefs(array $config_array)
? $GLOBALS['server']
: $GLOBALS['cfg']['ServerDefault'];
$cache_key = 'server_' . $server;
if (!$cfgRelation['userconfigwork']) {
if (! $cfgRelation['userconfigwork']) {
// no pmadb table, use session storage
$_SESSION['userconfig'] = array(
'db' => $config_array,

View File

@ -292,7 +292,7 @@ if (file_exists('./config')) {
*/
if ($server > 0) {
$cfgRelation = PMA_getRelationsParam();
if(!$cfgRelation['allworks'] && $cfg['PmaNoRelation_DisableWarning'] == false) {
if(! $cfgRelation['allworks'] && $cfg['PmaNoRelation_DisableWarning'] == false) {
$message = PMA_Message::notice(__('The phpMyAdmin configuration storage is not completely configured, some extended features have been deactivated. To find out why click %shere%s.'));
$message->addParam('<a href="' . $cfg['PmaAbsoluteUri'] . 'chk_rel.php?' . $common_url_query . '">', false);
$message->addParam('</a>', false);

View File

@ -76,7 +76,7 @@ if (isset($_POST['submit_export']) && filter_input(INPUT_POST, 'export_type') ==
$config = json_decode($json, true);
$return_url = filter_input(INPUT_POST, 'return_url');
if (!is_array($config)) {
if (! is_array($config)) {
$error = __('Could not import configuration');
} else {
// sanitize input values: treat them as though they came from HTTP POST request

View File

@ -41,13 +41,13 @@ $query_default_option = PMA_DBI_QUERY_STORE;
* correctly, so it is a good place to see which tables we can and
* complain ;-)
*/
if (!$cfgRelation['relwork']) {
if (! $cfgRelation['relwork']) {
echo sprintf(__('<b>%s</b> table not found or not set in %s'), 'relation', 'config.inc.php') . '<br />' . "\n"
. PMA_showDocu('relation') . "\n";
require_once './libraries/footer.inc.php';
}
if (!$cfgRelation['displaywork']) {
if (! $cfgRelation['displaywork']) {
echo sprintf(__('<b>%s</b> table not found or not set in %s'), 'table_info', 'config.inc.php') . '<br />' . "\n"
. PMA_showDocu('table_info') . "\n";
require_once './libraries/footer.inc.php';

View File

@ -336,7 +336,7 @@ else {
} elseif (strncasecmp($types[$i], 'enum', 4) == 0) {
if (!empty($fields[$i])) {
if (!is_array($fields[$i])) {
if (! is_array($fields[$i])) {
$fields[$i] = explode(',', $fields[$i]);
}
$enum_selected_count = count($fields[$i]);