diff --git a/ChangeLog b/ChangeLog index 5bbab72c7f..1fdbbe9608 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,8 @@ 3.5.0.0 (not yet released) +3.4.1.0 (not yet released) + 3.4.0.0 (not yet released) + rfe #2890226 [view] Enable VIEW rename + rfe #838637 [privileges] Export a user's privileges diff --git a/browse_foreigners.php b/browse_foreigners.php index c8867af3f0..16fa48c822 100644 --- a/browse_foreigners.php +++ b/browse_foreigners.php @@ -27,7 +27,7 @@ $foreigners = ($cfgRelation['relwork'] ? PMA_getForeigners($db, $table) : FALSE $override_total = TRUE; -if (!isset($pos)) { +if (! isset($pos)) { $pos = 0; } diff --git a/db_datadict.php b/db_datadict.php index e67c096c3e..e9d18fdf1e 100644 --- a/db_datadict.php +++ b/db_datadict.php @@ -10,7 +10,7 @@ */ require_once './libraries/common.inc.php'; -if (!isset($selected_tbl)) { +if (! isset($selected_tbl)) { require_once './libraries/header.inc.php'; } @@ -220,7 +220,7 @@ while ($row = PMA_DBI_fetch_assoc($rowset)) { if ($zerofill) { $attribute = 'UNSIGNED ZEROFILL'; } - if (!isset($row['Default'])) { + if (! isset($row['Default'])) { if ($row['Null'] != 'NO') { $row['Default'] = 'NULL'; } diff --git a/db_operations.php b/db_operations.php index f48ba27678..2e0244f0ef 100644 --- a/db_operations.php +++ b/db_operations.php @@ -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'); . '' . "\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('', false); $message->addParam('', false); diff --git a/db_printview.php b/db_printview.php index 36f297c994..7e3c709935 100644 --- a/db_printview.php +++ b/db_printview.php @@ -52,7 +52,7 @@ if ($cfg['SkipLockedTables'] == true) { $result = PMA_DBI_query('SHOW TABLES FROM ' . PMA_backquote($db) . ';', null, PMA_DBI_QUERY_STORE); if ($result != false && PMA_DBI_num_rows($result) > 0) { while ($tmp = PMA_DBI_fetch_row($result)) { - if (!isset($sot_cache[$tmp[0]])) { + if (! isset($sot_cache[$tmp[0]])) { $sts_result = PMA_DBI_query('SHOW TABLE STATUS FROM ' . PMA_backquote($db) . ' LIKE \'' . addslashes($tmp[0]) . '\';'); $sts_tmp = PMA_DBI_fetch_assoc($sts_result); $tables[] = $sts_tmp; diff --git a/db_qbe.php b/db_qbe.php index 751317d111..34c85eed3f 100644 --- a/db_qbe.php +++ b/db_qbe.php @@ -339,7 +339,7 @@ for ($x = 0; $x < $col; $x++) { if (isset($criteria[$x])) { $tmp_criteria = $criteria[$x]; } - if ((empty($prev_criteria) || !isset($prev_criteria[$x])) + if ((empty($prev_criteria) || ! isset($prev_criteria[$x])) || $prev_criteria[$x] != htmlspecialchars($tmp_criteria)) { $curCriteria[$z] = $tmp_criteria; } else { @@ -497,7 +497,7 @@ for ($y = 0; $y <= $row; $y++) { echo "\n"; $or = 'Or' . $y; - if (!isset(${$or})) { + if (! isset(${$or})) { ${$or} = ''; } if (!empty(${$or}) && isset(${$or}[$x])) { @@ -667,7 +667,7 @@ foreach ($tbl_names as $key => $val) { 1) { $qry_where = '(' . $qry_where . ')'; } // OR rows ${'cur' . $or}[$x] -if (!isset($curAndOrRow)) { +if (! isset($curAndOrRow)) { $curAndOrRow = array(); } for ($y = 0; $y <= $row; $y++) { @@ -929,7 +929,7 @@ if (!empty($qry_where) && $qry_where != '()') { // 4. ORDER BY $last_orderby = 0; -if (!isset($qry_orderby)) { +if (! isset($qry_orderby)) { $qry_orderby = ''; } for ($x = 0; $x < $col; $x++) { diff --git a/export.php b/export.php index 7da25fc051..22a6324261 100644 --- a/export.php +++ b/export.php @@ -21,7 +21,7 @@ $export_list = PMA_getPlugins('./libraries/export/', array('export_type' => $exp $type = $what; // Check export type -if (!isset($export_list[$type])) { +if (! isset($export_list[$type])) { die('Bad type!'); } @@ -451,7 +451,7 @@ if ($export_type == 'server') { // Walk over databases foreach ($GLOBALS['pma']->databases as $current_db) { if ((isset($tmp_select) && strpos(' ' . $tmp_select, '|' . $current_db . '|')) - || !isset($tmp_select)) { + || ! isset($tmp_select)) { if (!PMA_exportDBHeader($current_db)) { break 2; } diff --git a/import.php b/import.php index 78e5ffdb4a..0b029e5c2f 100644 --- a/import.php +++ b/import.php @@ -332,7 +332,7 @@ if ($import_file != 'none' && !$error) { $error = TRUE; } } elseif (!$error) { - if (!isset($import_text) || empty($import_text)) { + if (! isset($import_text) || empty($import_text)) { $message = PMA_Message::error(__('No data was received to import. Either no file name was submitted, or the file size exceeded the maximum size permitted by your PHP configuration. See [a@./Documentation.html#faq1_16@Documentation]FAQ 1.16[/a].')); $error = TRUE; } diff --git a/js/functions.js b/js/functions.js index 52c3c287f4..572c857501 100644 --- a/js/functions.js +++ b/js/functions.js @@ -1118,7 +1118,7 @@ function changeMIMEType(db, table, reference, mime_type) * Jquery Coding for inline editing SQL_QUERY */ $(document).ready(function(){ - $(".inline_edit").click( function(){ + $(".inline_edit_sql").click( function(){ var db = $(this).prev().find("input[name='db']").val(); var table = $(this).prev().find("input[name='table']").val(); var token = $(this).prev().find("input[name='token']").val(); diff --git a/libraries/Config.class.php b/libraries/Config.class.php index 4c2f281bb0..f71a4e91fa 100644 --- a/libraries/Config.class.php +++ b/libraries/Config.class.php @@ -148,7 +148,7 @@ class PMA_Config { if (PMA_getenv('HTTP_USER_AGENT')) { $HTTP_USER_AGENT = PMA_getenv('HTTP_USER_AGENT'); - } elseif (!isset($HTTP_USER_AGENT)) { + } elseif (! isset($HTTP_USER_AGENT)) { $HTTP_USER_AGENT = ''; } @@ -441,7 +441,7 @@ class PMA_Config if ($server > 0 && !defined('PMA_MINIMUM_COMMON')) { $config_mtime = max($this->default_source_mtime, $this->source_mtime); // cache user preferences, use database only when needed - if (!isset($_SESSION['cache'][$cache_key]['userprefs']) + if (! isset($_SESSION['cache'][$cache_key]['userprefs']) || $_SESSION['cache'][$cache_key]['config_mtime'] < $config_mtime) { // load required libraries require_once './libraries/user_preferences.lib.php'; @@ -451,7 +451,7 @@ class PMA_Config $_SESSION['cache'][$cache_key]['userprefs_type'] = $prefs['type']; $_SESSION['cache'][$cache_key]['config_mtime'] = $config_mtime; } - } else if ($server == 0 || !isset($_SESSION['cache'][$cache_key]['userprefs'])) { + } else if ($server == 0 || ! isset($_SESSION['cache'][$cache_key]['userprefs'])) { $this->set('user_preferences', false); return; } @@ -476,7 +476,7 @@ class PMA_Config // save theme $tmanager = $_SESSION['PMA_Theme_Manager']; if ($tmanager->getThemeCookie() || isset($_REQUEST['set_theme'])) { - if ((!isset($config_data['ThemeDefault']) && $tmanager->theme->getId() != 'original') + if ((! isset($config_data['ThemeDefault']) && $tmanager->theme->getId() != 'original') || isset($config_data['ThemeDefault']) && $config_data['ThemeDefault'] != $tmanager->theme->getId()) { // new theme was set in common.inc.php $this->setUserValue(null, 'ThemeDefault', $tmanager->theme->getId(), 'original'); @@ -491,14 +491,14 @@ class PMA_Config } // save font size - if ((!isset($config_data['fontsize']) && $org_fontsize != '82%') + if ((! isset($config_data['fontsize']) && $org_fontsize != '82%') || isset($config_data['fontsize']) && $org_fontsize != $config_data['fontsize']) { $this->setUserValue(null, 'fontsize', $org_fontsize, '82%'); } // save language if (isset($_COOKIE['pma_lang']) || isset($_POST['lang'])) { - if ((!isset($config_data['lang']) && $GLOBALS['lang'] != 'en') + if ((! isset($config_data['lang']) && $GLOBALS['lang'] != 'en') || isset($config_data['lang']) && $GLOBALS['lang'] != $config_data['lang']) { $this->setUserValue(null, 'lang', $GLOBALS['lang'], 'en'); } @@ -511,7 +511,7 @@ class PMA_Config // save connection collation if (isset($_COOKIE['pma_collation_connection']) || isset($_POST['collation_connection'])) { - if ((!isset($config_data['collation_connection']) && $GLOBALS['collation_connection'] != 'utf8_general_ci') + if ((! isset($config_data['collation_connection']) && $GLOBALS['collation_connection'] != 'utf8_general_ci') || isset($config_data['collation_connection']) && $GLOBALS['collation_connection'] != $config_data['collation_connection']) { $this->setUserValue(null, 'collation_connection', $GLOBALS['collation_connection'], 'utf8_general_ci'); } @@ -678,7 +678,7 @@ class PMA_Config */ function set($setting, $value) { - if (!isset($this->settings[$setting]) || $this->settings[$setting] != $value) { + if (! isset($this->settings[$setting]) || $this->settings[$setting] != $value) { $this->settings[$setting] = $value; $this->set_mtime = time(); } diff --git a/libraries/List_Database.class.php b/libraries/List_Database.class.php index c29cc9dce4..2663673a4f 100644 --- a/libraries/List_Database.class.php +++ b/libraries/List_Database.class.php @@ -498,7 +498,7 @@ require_once './libraries/List.class.php'; if (isset($tmp_mydbs[$tmp_db]) && $tmp_mydbs[$tmp_db] == 1) { $dblist[] = $tmp_db; $tmp_mydbs[$tmp_db] = 0; - } elseif (!isset($dblist[$tmp_db])) { + } elseif (! isset($dblist[$tmp_db])) { foreach ($tmp_mydbs as $tmp_matchpattern => $tmp_value) { // fixed bad regexp // TODO: db names may contain characters diff --git a/libraries/Table.class.php b/libraries/Table.class.php index a29900e7b5..d41eadc8d9 100644 --- a/libraries/Table.class.php +++ b/libraries/Table.class.php @@ -889,7 +889,7 @@ class PMA_Table } else { // we are copying // Create new entries as duplicates from old PMA DBs - if ($what != 'dataonly' && !isset($maintain_relations)) { + if ($what != 'dataonly' && ! isset($maintain_relations)) { if ($GLOBALS['cfgRelation']['commwork']) { // Get all comments and MIME-Types for current table $comments_copy_query = 'SELECT diff --git a/libraries/chart.lib.php b/libraries/chart.lib.php index 3911f2e95b..83791fb425 100644 --- a/libraries/chart.lib.php +++ b/libraries/chart.lib.php @@ -104,7 +104,7 @@ function PMA_chart_results($data, &$chartSettings) // default for muti series $chartSettings['multi'] = false; - if (!isset($data[0])) { + if (! isset($data[0])) { // empty data return __('No data found for the chart.'); } @@ -192,7 +192,7 @@ function PMA_chart_results($data, &$chartSettings) // the value os for this serie $chartData[$yAxisKey][$seriesLabelsValue][$row[$xAxisKey]] = (int)$row[$yAxisKey]; } - else if (!isset($chartData[$yAxisKey][$seriesLabelsValue][$row[$xAxisKey]])) { + else if (! isset($chartData[$yAxisKey][$seriesLabelsValue][$row[$xAxisKey]])) { // if the value for this serie is not set, set it to 0 $chartData[$yAxisKey][$seriesLabelsValue][$row[$xAxisKey]] = 0; } diff --git a/libraries/common.inc.php b/libraries/common.inc.php index 49937c8ed6..ef6f64b6c9 100644 --- a/libraries/common.inc.php +++ b/libraries/common.inc.php @@ -608,7 +608,7 @@ $GLOBALS['server'] = 0; * @todo merge into PMA_Config */ // Do we have some server? -if (!isset($cfg['Servers']) || count($cfg['Servers']) == 0) { +if (! isset($cfg['Servers']) || count($cfg['Servers']) == 0) { // No server => create one with defaults $cfg['Servers'] = array(1 => $default_server); } else { @@ -664,7 +664,7 @@ if (! isset($_SESSION['PMA_Theme_Manager'])) { } // for the theme per server feature -if (isset($_REQUEST['server']) && !isset($_REQUEST['set_theme'])) { +if (isset($_REQUEST['server']) && ! isset($_REQUEST['set_theme'])) { $GLOBALS['server'] = $_REQUEST['server']; $tmp = $_SESSION['PMA_Theme_Manager']->getThemeCookie(); if (empty($tmp)) { diff --git a/libraries/common.lib.php b/libraries/common.lib.php index 56618a180a..e8e6b8a9d0 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -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 = '
' . "\n"
@@ -663,7 +663,7 @@ function PMA_mysqlDie($error_message = '', $the_query = '',
     if ($exit) {
        /**
         * If in an Ajax request
-        * - avoid displaying a Back link 
+        * - avoid displaying a Back link
         * - use PMA_ajaxResponse() to transmit the message and exit
         */
        if($GLOBALS['is_ajax_request'] == true) {
@@ -781,12 +781,12 @@ function PMA_getTableList($db, $tables = null, $limit_offset = 0, $limit_count =
                 $group_name = $parts[$i] . $sep;
                 $group_name_full .= $group_name;
 
-                if (!isset($group[$group_name])) {
+                if (! isset($group[$group_name])) {
                     $group[$group_name] = array();
                     $group[$group_name]['is' . $sep . 'group'] = true;
                     $group[$group_name]['tab' . $sep . 'count'] = 1;
                     $group[$group_name]['tab' . $sep . 'group'] = $group_name_full;
-                } elseif (!isset($group[$group_name]['is' . $sep . 'group'])) {
+                } elseif (! isset($group[$group_name]['is' . $sep . 'group'])) {
                     $table = $group[$group_name];
                     $group[$group_name] = array();
                     $group[$group_name][$group_name] = $table;
@@ -801,7 +801,7 @@ function PMA_getTableList($db, $tables = null, $limit_offset = 0, $limit_count =
                 $i++;
             }
         } else {
-            if (!isset($table_groups[$table_name])) {
+            if (! isset($table_groups[$table_name])) {
                 $table_groups[$table_name] = array();
             }
             $group =& $table_groups;
@@ -963,7 +963,7 @@ function PMA_showMessage($message, $sql_query = null, $type = 'notice', $is_view
      * in a string.  In some special cases on sql.php, buffering has to be disabled
      * and hence we check with $GLOBALS['buffer_message']
      */
-    if( $GLOBALS['is_ajax_request'] == true && !isset($GLOBALS['buffer_message']) ) {
+    if( $GLOBALS['is_ajax_request'] == true && ! isset($GLOBALS['buffer_message']) ) {
         ob_start();
     }
     global $cfg;
@@ -1255,7 +1255,7 @@ function PMA_showMessage($message, $sql_query = null, $type = 'notice', $is_view
 
         // in the tools div, only display the Inline link when not in ajax
         // mode because 1) it currently does not work and 2) we would
-        // have two similar mechanisms on the page for the same goal       
+        // have two similar mechanisms on the page for the same goal
         if ($is_select || $GLOBALS['is_ajax_request'] === false) {
         // see in js/functions.js the jQuery code attached to id inline_edit
         // document.write conflicts with jQuery, hence used $().append()
@@ -1263,7 +1263,7 @@ function PMA_showMessage($message, $sql_query = null, $type = 'notice', $is_view
                 "//" .
+                "\" class=\"inline_edit_sql\">" .
                 PMA_escapeJsString(__('Inline')) .
                 "]');\n" .
                 "//]]>\n" .
@@ -1280,7 +1280,7 @@ function PMA_showMessage($message, $sql_query = null, $type = 'notice', $is_view
     // If we are in an Ajax request, we have most probably been called in
     // PMA_ajaxResponse().  Hence, collect the buffer contents and return it
     // to PMA_ajaxResponse(), which will encode it for JSON.
-    if( $GLOBALS['is_ajax_request'] == true && !isset($GLOBALS['buffer_message']) ) {
+    if( $GLOBALS['is_ajax_request'] == true && ! isset($GLOBALS['buffer_message']) ) {
         $buffer_contents =  ob_get_contents();
         ob_end_clean();
         return $buffer_contents;
@@ -2001,7 +2001,7 @@ function PMA_checkParameters($params, $die = true, $request = true)
 {
     global $checked_special;
 
-    if (!isset($checked_special)) {
+    if (! isset($checked_special)) {
         $checked_special = false;
     }
 
@@ -2014,7 +2014,7 @@ function PMA_checkParameters($params, $die = true, $request = true)
             $checked_special = true;
         }
 
-        if (!isset($GLOBALS[$param])) {
+        if (! isset($GLOBALS[$param])) {
             $error_message .= $reported_script_name
                 . ': Missing parameter: ' . $param
                 . PMA_showDocu('faqmissingparameters')
@@ -2112,7 +2112,7 @@ function PMA_getUniqueCondition($handle, $fields_cnt, $fields_meta, $row, $force
                 . PMA_backquote($meta->orgname) . ' ';
         } // end if... else...
 
-        if (!isset($row[$i]) || is_null($row[$i])) {
+        if (! isset($row[$i]) || is_null($row[$i])) {
             $condition .= 'IS NULL AND';
         } else {
             // timestamp is numeric on some MySQL 4.1
@@ -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'];
diff --git a/libraries/core.lib.php b/libraries/core.lib.php
index 76d2c86126..1d0f3a6090 100644
--- a/libraries/core.lib.php
+++ b/libraries/core.lib.php
@@ -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) {
@@ -603,7 +603,7 @@ function PMA_array_read($path, $array, $default = null)
     $keys = explode('/', $path);
     $value =& $array;
     foreach ($keys as $key) {
-        if (!isset($value[$key])) {
+        if (! isset($value[$key])) {
             return $default;
         }
         $value =& $value[$key];
@@ -624,7 +624,7 @@ function PMA_array_write($path, &$array, $value)
     $last_key = array_pop($keys);
     $a =& $array;
     foreach ($keys as $key) {
-        if (!isset($a[$key])) {
+        if (! isset($a[$key])) {
             $a[$key] = array();
         }
         $a =& $a[$key];
@@ -650,7 +650,7 @@ function PMA_array_remove($path, &$array)
     $found = true;
     // go as deep as required or possible
     foreach ($keys as $key) {
-        if (!isset($path[$depth][$key])) {
+        if (! isset($path[$depth][$key])) {
             $found = false;
             break;
         }
@@ -665,7 +665,7 @@ function PMA_array_remove($path, &$array)
 
     // remove empty nested arrays
     for (; $depth >= 0; $depth--) {
-        if (!isset($path[$depth+1]) || count($path[$depth+1]) == 0) {
+        if (! isset($path[$depth+1]) || count($path[$depth+1]) == 0) {
             unset($path[$depth][$keys[$depth]]);
         } else {
             break;
diff --git a/libraries/database_interface.lib.php b/libraries/database_interface.lib.php
index 22d9671e97..be8d9f5f89 100644
--- a/libraries/database_interface.lib.php
+++ b/libraries/database_interface.lib.php
@@ -196,7 +196,7 @@ function PMA_usort_comparison_callback($a, $b)
         $sorter = 'strcasecmp';
     }
     /* No sorting when key is not present */
-    if (!isset($a[$GLOBALS['callback_sort_by']]) || ! isset($b[$GLOBALS['callback_sort_by']])) {
+    if (! isset($a[$GLOBALS['callback_sort_by']]) || ! isset($b[$GLOBALS['callback_sort_by']])) {
         return 0;
     }
     // produces f.e.:
diff --git a/libraries/db_info.inc.php b/libraries/db_info.inc.php
index d8610f29a5..f8bb5a00a0 100644
--- a/libraries/db_info.inc.php
+++ b/libraries/db_info.inc.php
@@ -152,7 +152,7 @@ if (true === $cfg['SkipLockedTables']) {
                 null, PMA_DBI_QUERY_STORE);
             if ($db_info_result && PMA_DBI_num_rows($db_info_result) > 0) {
                 while ($tmp = PMA_DBI_fetch_row($db_info_result)) {
-                    if (!isset($sot_cache[$tmp[0]])) {
+                    if (! isset($sot_cache[$tmp[0]])) {
                         $sts_result  = PMA_DBI_query(
                             'SHOW TABLE STATUS FROM ' . PMA_backquote($db)
                              . ' LIKE \'' . addslashes($tmp[0]) . '\';');
@@ -160,7 +160,7 @@ if (true === $cfg['SkipLockedTables']) {
                         PMA_DBI_free_result($sts_result);
                         unset($sts_result);
 
-                        if (!isset($sts_tmp['Type']) && isset($sts_tmp['Engine'])) {
+                        if (! isset($sts_tmp['Type']) && isset($sts_tmp['Engine'])) {
                             $sts_tmp['Type'] =& $sts_tmp['Engine'];
                         }
 
diff --git a/libraries/display_export.lib.php b/libraries/display_export.lib.php
index 10e8178d27..88c80af181 100644
--- a/libraries/display_export.lib.php
+++ b/libraries/display_export.lib.php
@@ -65,7 +65,7 @@ echo '' .
 // If the export method was not set, the default is quick
 if(isset($_GET['export_method'])) {
     $cfg['Export']['method'] = $_GET['export_method'];
-} elseif(!isset($cfg['Export']['method'])) {
+} elseif(! isset($cfg['Export']['method'])) {
     $cfg['Export']['method'] = 'quick';
 }
 // The export method (quick, custom or custom-no-form)
diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php
index 78b4bb6850..6fa8e9be5d 100644
--- a/libraries/display_tbl.lib.php
+++ b/libraries/display_tbl.lib.php
@@ -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;
@@ -1272,7 +1272,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
                 $condition_field = false;
             }
 
-            if ($_SESSION['tmp_user_values']['disp_direction'] == 'vertical' && (!isset($GLOBALS['printview']) || ($GLOBALS['printview'] != '1'))) {
+            if ($_SESSION['tmp_user_values']['disp_direction'] == 'vertical' && (! isset($GLOBALS['printview']) || ($GLOBALS['printview'] != '1'))) {
                 // the row number corresponds to a data row, not HTML table row
                 $class .= ' row_' . $row_no;
                 if ($GLOBALS['cfg']['BrowsePointerEnable'] == true) {
@@ -1328,7 +1328,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
                 //       will show both fields NULL even if only one is NULL,
                 //       so use the $pointer
 
-                if (!isset($row[$i]) || is_null($row[$i])) {
+                if (! isset($row[$i]) || is_null($row[$i])) {
                     $vertical_display['data'][$row_no][$i]     =  PMA_buildNullDisplay($class, $condition_field);
                 } elseif ($row[$i] != '') {
 
@@ -1351,7 +1351,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
                 $class = str_replace('inline_edit', '', $class);
 
                 if (stristr($field_flags, 'BINARY')) {
-                    if (!isset($row[$i]) || is_null($row[$i])) {
+                    if (! isset($row[$i]) || is_null($row[$i])) {
                         $vertical_display['data'][$row_no][$i]     =  PMA_buildNullDisplay($class, $condition_field);
                     } else {
                         // for blobstreaming
@@ -1367,7 +1367,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
                     }
                 // not binary:
                 } else {
-                    if (!isset($row[$i]) || is_null($row[$i])) {
+                    if (! isset($row[$i]) || is_null($row[$i])) {
                         $vertical_display['data'][$row_no][$i]     =  PMA_buildNullDisplay($class, $condition_field);
                     } elseif ($row[$i] != '') {
                         // if a transform function for blob is set, none of these replacements will be made
@@ -1395,7 +1395,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
 
             // n o t   n u m e r i c   a n d   n o t   B L O B
             } else {
-                if (!isset($row[$i]) || is_null($row[$i])) {
+                if (! isset($row[$i]) || is_null($row[$i])) {
                     $vertical_display['data'][$row_no][$i]     =  PMA_buildNullDisplay($class, $condition_field);
                 } elseif ($row[$i] != '') {
                     // support blanks in the key
@@ -1477,7 +1477,7 @@ function PMA_displayTableBody(&$dt_result, &$is_display, $map, $analyzed_sql) {
 
         // 4. Gather links of del_urls and edit_urls in an array for later
         //    output
-        if (!isset($vertical_display['edit'][$row_no])) {
+        if (! isset($vertical_display['edit'][$row_no])) {
             $vertical_display['edit'][$row_no]       = '';
             $vertical_display['copy'][$row_no]       = '';
             $vertical_display['delete'][$row_no]     = '';
@@ -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 '' . "\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 '' . "\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 '' . "\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 '' . "\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 '' . "\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 '' . "\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;
@@ -2070,7 +2070,7 @@ function PMA_displayTable(&$dt_result, &$the_disp_mode, $analyzed_sql)
 
         PMA_showMessage($message, $sql_query, 'success');
 
-    } elseif (!isset($GLOBALS['printview']) || $GLOBALS['printview'] != '1') {
+    } elseif (! isset($GLOBALS['printview']) || $GLOBALS['printview'] != '1') {
         PMA_showMessage(__('Your SQL query has been executed successfully'), $sql_query, 'success');
     }
 
@@ -2090,7 +2090,7 @@ function PMA_displayTable(&$dt_result, &$the_disp_mode, $analyzed_sql)
     if ($is_display['nav_bar'] == '1') {
         PMA_displayTableNavigation($pos_next, $pos_prev, $sql_query, 'top_direction_dropdown');
         echo "\n";
-    } elseif (!isset($GLOBALS['printview']) || $GLOBALS['printview'] != '1') {
+    } elseif (! isset($GLOBALS['printview']) || $GLOBALS['printview'] != '1') {
         echo "\n" . '

' . "\n"; } @@ -2212,12 +2212,12 @@ function PMA_displayTable(&$dt_result, &$the_disp_mode, $analyzed_sql) if ($is_display['nav_bar'] == '1') { echo '
' . "\n"; PMA_displayTableNavigation($pos_next, $pos_prev, $sql_query, 'bottom_direction_dropdown'); - } elseif (!isset($GLOBALS['printview']) || $GLOBALS['printview'] != '1') { + } elseif (! isset($GLOBALS['printview']) || $GLOBALS['printview'] != '1') { echo "\n" . '

' . "\n"; } // 6. ----- Displays "Query results operations" - if (!isset($GLOBALS['printview']) || $GLOBALS['printview'] != '1') { + if (! isset($GLOBALS['printview']) || $GLOBALS['printview'] != '1') { PMA_displayResultsOperations($the_disp_mode, $analyzed_sql); } } // end of the 'PMA_displayTable()' function @@ -2298,8 +2298,8 @@ function PMA_displayResultsOperations($the_disp_mode, $analyzed_sql) { // If the parser found a PROCEDURE clause // (most probably PROCEDURE ANALYSE()) it makes no sense to // display the Export link). - if (isset($analyzed_sql[0]) && $analyzed_sql[0]['querytype'] == 'SELECT' && !isset($printview) && ! isset($analyzed_sql[0]['queryflags']['procedure'])) { - if (isset($analyzed_sql[0]['table_ref'][0]['table_true_name']) && !isset($analyzed_sql[0]['table_ref'][1]['table_true_name'])) { + if (isset($analyzed_sql[0]) && $analyzed_sql[0]['querytype'] == 'SELECT' && ! isset($printview) && ! isset($analyzed_sql[0]['queryflags']['procedure'])) { + if (isset($analyzed_sql[0]['table_ref'][0]['table_true_name']) && ! isset($analyzed_sql[0]['table_ref'][1]['table_true_name'])) { $_url_params['single_table'] = 'true'; } if (!$header_shown) { diff --git a/libraries/footer.inc.php b/libraries/footer.inc.php index f5385d5156..5a66351664 100644 --- a/libraries/footer.inc.php +++ b/libraries/footer.inc.php @@ -166,7 +166,7 @@ if (window.parent.frame_content) { } // Link to itself to replicate windows including frameset -if (!isset($GLOBALS['checked_special'])) { +if (! isset($GLOBALS['checked_special'])) { $GLOBALS['checked_special'] = false; } diff --git a/libraries/header.inc.php b/libraries/header.inc.php index 9385b894fb..3b4384326f 100644 --- a/libraries/header.inc.php +++ b/libraries/header.inc.php @@ -45,7 +45,7 @@ if (isset($GLOBALS['is_ajax_request']) && !$GLOBALS['is_ajax_request']) { // if database storage for user preferences is transient, offer to load // exported settings from localStorage (detection will be done in JavaScript) $userprefs_offer_import = $GLOBALS['PMA_Config']->get('user_preferences') == 'session' - && !isset($_SESSION['userprefs_autoload']); + && ! isset($_SESSION['userprefs_autoload']); if ($userprefs_offer_import) { $GLOBALS['js_include'][] = 'config.js'; } @@ -158,7 +158,7 @@ if (isset($GLOBALS['is_ajax_request']) && !$GLOBALS['is_ajax_request']) { * @uses $show_comment from libraries/tbl_info.inc.php * @uses $GLOBALS['avoid_show_comment'] from tbl_relation.php */ - if (!empty($show_comment) && !isset($GLOBALS['avoid_show_comment'])) { + if (!empty($show_comment) && ! isset($GLOBALS['avoid_show_comment'])) { if (strstr($show_comment, '; InnoDB free')) { $show_comment = preg_replace('@; InnoDB free:.*?$@', '', $show_comment); } diff --git a/libraries/import.lib.php b/libraries/import.lib.php index a7d0b5ef93..0c77f5419c 100644 --- a/libraries/import.lib.php +++ b/libraries/import.lib.php @@ -127,7 +127,7 @@ function PMA_importRunQuery($sql = '', $full = '', $controluser = false) } $msg = '# '; if ($result === FALSE) { // execution failed - if (!isset($my_die)) { + if (! isset($my_die)) { $my_die = array(); } $my_die[] = array('sql' => $import_run_buffer['full'], 'error' => PMA_DBI_getError()); @@ -697,7 +697,7 @@ function PMA_detectSize($last_cumulative_size, $last_cumulative_type, $curr_type /** * This is the first row to be analyzed */ - elseif (!isset($last_cumulative_type) || $last_cumulative_type == NONE) { + elseif (! isset($last_cumulative_type) || $last_cumulative_type == NONE) { return $curr_size; } /** diff --git a/libraries/mysql_charsets.lib.php b/libraries/mysql_charsets.lib.php index 45fd55ac9c..51b79ba27d 100644 --- a/libraries/mysql_charsets.lib.php +++ b/libraries/mysql_charsets.lib.php @@ -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']; @@ -46,7 +46,7 @@ if (! PMA_cacheExists('mysql_charsets_count', true)) { if ($row['IS_DEFAULT'] == 'Yes') { $mysql_default_collations[$row['CHARACTER_SET_NAME']] = $row['COLLATION_NAME']; } - //$mysql_collations_available[$row['Collation']] = !isset($row['Compiled']) || $row['Compiled'] == 'Yes'; + //$mysql_collations_available[$row['Collation']] = ! isset($row['Compiled']) || $row['Compiled'] == 'Yes'; $mysql_collations_available[$row['COLLATION_NAME']] = true; $mysql_charsets_available[$row['CHARACTER_SET_NAME']] = !empty($mysql_charsets_available[$row['CHARACTER_SET_NAME']]) diff --git a/libraries/plugin_interface.lib.php b/libraries/plugin_interface.lib.php index 48dc97577e..edfd02a403 100644 --- a/libraries/plugin_interface.lib.php +++ b/libraries/plugin_interface.lib.php @@ -71,7 +71,7 @@ function PMA_getString($name) function PMA_pluginCheckboxCheck($section, $opt) { // If the form is being repopulated using $_GET data, that is priority - if (isset($_GET[$opt]) || !isset($_GET['repopulate']) && ((isset($GLOBALS['timeout_passed']) && $GLOBALS['timeout_passed'] && isset($_REQUEST[$opt])) || + if (isset($_GET[$opt]) || ! isset($_GET['repopulate']) && ((isset($GLOBALS['timeout_passed']) && $GLOBALS['timeout_passed'] && isset($_REQUEST[$opt])) || (isset($GLOBALS['cfg'][$section][$opt]) && $GLOBALS['cfg'][$section][$opt]))) { return ' checked="checked"'; } @@ -160,7 +160,7 @@ function PMA_pluginIsActive($section, $opt, $val) */ function PMA_pluginGetChoice($section, $name, &$list, $cfgname = NULL) { - if (!isset($cfgname)) { + if (! isset($cfgname)) { $cfgname = $name; } $ret = '' . "\n" . ' ' . "\n" - . ' ' . "\n" + . ' ' . "\n" . ' ' . "\n" . '' . "\n" . ' array(), 'notice' => array()); } else { // reset message states @@ -41,7 +41,7 @@ function messages_begin() */ function messages_set($type, $id, $title, $message) { - $fresh = !isset($_SESSION['messages'][$type][$id]); + $fresh = ! isset($_SESSION['messages'][$type][$id]); $_SESSION['messages'][$type][$id] = array( 'fresh' => $fresh, 'active' => true, diff --git a/sql.php b/sql.php index 9b19174a44..d07022b568 100644 --- a/sql.php +++ b/sql.php @@ -33,7 +33,7 @@ if (! empty($goto)) { $is_gotofile = true; } // end if -if (!isset($err_url)) { +if (! isset($err_url)) { $err_url = (!empty($back) ? $back : $goto) . '?' . PMA_generate_common_url($db) . ((strpos(' ' . $goto, 'db_') != 1 && strlen($table)) ? '&table=' . urlencode($table) : ''); @@ -441,7 +441,7 @@ if (isset($GLOBALS['show_as_php']) || !empty($GLOBALS['validatequery'])) { if (!$is_affected) { $num_rows = ($result) ? @PMA_DBI_num_rows($result) : 0; - } elseif (!isset($num_rows)) { + } elseif (! isset($num_rows)) { $num_rows = @PMA_DBI_affected_rows(); } @@ -492,11 +492,11 @@ if (isset($GLOBALS['show_as_php']) || !empty($GLOBALS['validatequery'])) { // due to $find_real_end == true if (!$is_group - && !isset($analyzed_sql[0]['queryflags']['union']) - && !isset($analyzed_sql[0]['table_ref'][1]['table_name']) + && ! isset($analyzed_sql[0]['queryflags']['union']) + && ! isset($analyzed_sql[0]['table_ref'][1]['table_name']) && (empty($analyzed_sql[0]['where_clause']) || $analyzed_sql[0]['where_clause'] == '1 ') - && !isset($find_real_end) + && ! isset($find_real_end) ) { // "j u s t b r o w s i n g" @@ -526,7 +526,7 @@ if (isset($GLOBALS['show_as_php']) || !empty($GLOBALS['validatequery'])) { // long delays. Returned count will be complete anyway. // (but a LIMIT would disrupt results in an UNION) - if (!isset($analyzed_sql[0]['queryflags']['union'])) { + if (! isset($analyzed_sql[0]['queryflags']['union'])) { $count_query .= ' LIMIT 1'; } @@ -969,7 +969,7 @@ window.onload = function() /** * Displays the footer */ -if(!isset($_REQUEST['table_maintenance'])) { +if(! isset($_REQUEST['table_maintenance'])) { require './libraries/footer.inc.php'; } ?> diff --git a/tbl_change.php b/tbl_change.php index 22584db43d..efdbd3fe73 100644 --- a/tbl_change.php +++ b/tbl_change.php @@ -514,7 +514,7 @@ foreach ($rows as $row_id => $vrow) { } else { // (we are inserting) // display default values - if (!isset($field['Default'])) { + if (! isset($field['Default'])) { $field['Default'] = ''; $real_null_value = TRUE; $data = ''; @@ -620,7 +620,7 @@ 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) @@ -1062,7 +1062,7 @@ if (isset($where_clause)) { diff --git a/tbl_printview.php b/tbl_printview.php index 74b6818e4b..f2b80abfc6 100644 --- a/tbl_printview.php +++ b/tbl_printview.php @@ -189,7 +189,7 @@ foreach ($the_tables as $key => $table) { if ($zerofill) { $attribute = 'UNSIGNED ZEROFILL'; } - if (!isset($row['Default'])) { + if (! isset($row['Default'])) { if ($row['Null'] != '' && $row['Null'] != 'NO') { $row['Default'] = 'NULL'; } diff --git a/tbl_relation.php b/tbl_relation.php index 400fc6319e..90bd153db0 100644 --- a/tbl_relation.php +++ b/tbl_relation.php @@ -186,7 +186,7 @@ if (isset($_REQUEST['destination_foreign'])) { if (! empty($foreign_string)) { list($foreign_db, $foreign_table, $foreign_field) = PMA_backquote_split($foreign_string); - if (!isset($existrel_foreign[$master_field])) { + if (! isset($existrel_foreign[$master_field])) { // no key defined for this field // The next few lines are repeated below, so they diff --git a/tbl_replace.php b/tbl_replace.php index 40d0ad48d6..5b722c69c9 100644 --- a/tbl_replace.php +++ b/tbl_replace.php @@ -276,7 +276,7 @@ foreach ($loop_array as $rownumber => $where_clause) { // u p d a t e } elseif (!empty($me_fields_null_prev[$key]) - && !isset($me_fields_null[$key])) { + && ! isset($me_fields_null[$key])) { // field had the null checkbox before the update // field no longer has the null checkbox $query_values[] = PMA_backquote($me_fields_name[$key]) . ' = ' . $cur_value; diff --git a/tbl_select.php b/tbl_select.php index 2cb0086293..681083a696 100644 --- a/tbl_select.php +++ b/tbl_select.php @@ -36,7 +36,7 @@ if ($GLOBALS['cfg']['PropertiesIconic'] == true) { /** * Not selection yet required -> displays the selection form */ -if (!isset($param) || $param[0] == '') { +if (! isset($param) || $param[0] == '') { // Gets some core libraries require_once './libraries/tbl_common.php'; //$err_url = 'tbl_select.php' . $err_url; @@ -52,7 +52,7 @@ if (!isset($param) || $param[0] == '') { */ require_once './libraries/tbl_links.inc.php'; - if (!isset($goto)) { + if (! isset($goto)) { $goto = $GLOBALS['cfg']['DefaultTabTable']; } // Defines the url to return to in case of error in the next sql statement @@ -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]); diff --git a/tbl_structure.php b/tbl_structure.php index 99ec0e90a4..9878b9e263 100644 --- a/tbl_structure.php +++ b/tbl_structure.php @@ -337,7 +337,7 @@ while ($row = PMA_DBI_fetch_assoc($fields_rs)) { } - if (!isset($row['Default'])) { + if (! isset($row['Default'])) { if ($row['Null'] == 'YES') { $row['Default'] = 'NULL'; } diff --git a/transformation_wrapper.php b/transformation_wrapper.php index 3699dd0918..50d7ceba7a 100644 --- a/transformation_wrapper.php +++ b/transformation_wrapper.php @@ -71,7 +71,7 @@ if (isset($cn) && !empty($cn)) { header('Content-Disposition: attachment; filename=' . $cn); } -if (!isset($resize)) { +if (! isset($resize)) { echo $row[$transform_key]; } else { // if image_*__inline.inc.php finds that we can resize,