[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_3_1-11123-g48e9af4

Michal Čihař nijel at users.sourceforge.net
Thu Jul 21 11:20:50 CEST 2011


The branch, master has been updated
       via  48e9af42e089c6d130c5b4559e2e590b33f22625 (commit)
      from  bc0a10b8319e42fe97c7d2e78409a4247271d43d (commit)


- Log -----------------------------------------------------------------
commit 48e9af42e089c6d130c5b4559e2e590b33f22625
Author: Michal Čihař <mcihar at suse.cz>
Date:   Thu Jul 21 11:21:26 2011 +0200

    Add missing space after foreach calls

-----------------------------------------------------------------------

Summary of changes:
 db_operations.php                                  |    6 ++--
 enum_editor.php                                    |    2 +-
 export.php                                         |    4 +-
 libraries/List_Database.class.php                  |    2 +-
 libraries/auth/cookie.auth.lib.php                 |    4 +-
 libraries/bookmark.lib.php                         |    2 +-
 libraries/cleanup.lib.php                          |    2 +-
 libraries/common.inc.php                           |    4 +-
 libraries/common.lib.php                           |    4 +-
 libraries/database_interface.lib.php               |    6 ++--
 libraries/display_tbl.lib.php                      |    2 +-
 libraries/export/sql.php                           |   12 +++++-----
 libraries/import/sql.php                           |    2 +-
 libraries/import/xml.php                           |    2 +-
 libraries/plugin_interface.lib.php                 |    6 ++--
 libraries/schema/User_Schema.class.php             |    2 +-
 libraries/server_synchronize.lib.php               |    2 +-
 libraries/sysinfo.lib.php                          |    2 +-
 libraries/tcpdf/tcpdf.php                          |   22 ++++++++++----------
 .../application_octetstream__download.inc.php      |    2 +-
 server_privileges.php                              |    4 +-
 server_status.php                                  |    6 ++--
 sql.php                                            |   10 ++++----
 tbl_chart.php                                      |    4 +-
 tbl_operations.php                                 |    2 +-
 tbl_tracking.php                                   |   10 ++++----
 26 files changed, 63 insertions(+), 63 deletions(-)

diff --git a/db_operations.php b/db_operations.php
index 190f9b6..0b4ab5f 100644
--- a/db_operations.php
+++ b/db_operations.php
@@ -77,7 +77,7 @@ if (strlen($db) && (! empty($db_rename) || ! empty($db_copy))) {
         // the db name
         $procedure_names = PMA_DBI_get_procedures_or_functions($db, 'PROCEDURE');
         if ($procedure_names) {
-            foreach($procedure_names as $procedure_name) {
+            foreach ($procedure_names as $procedure_name) {
                 PMA_DBI_select_db($db);
                 $tmp_query = PMA_DBI_get_definition($db, 'PROCEDURE', $procedure_name);
                 // collect for later display
@@ -89,7 +89,7 @@ if (strlen($db) && (! empty($db_rename) || ! empty($db_copy))) {
 
         $function_names = PMA_DBI_get_procedures_or_functions($db, 'FUNCTION');
         if ($function_names) {
-            foreach($function_names as $function_name) {
+            foreach ($function_names as $function_name) {
                 PMA_DBI_select_db($db);
                 $tmp_query = PMA_DBI_get_definition($db, 'FUNCTION', $function_name);
                 // collect for later display
@@ -234,7 +234,7 @@ if (strlen($db) && (! empty($db_rename) || ! empty($db_copy))) {
             // the db name
             $event_names = PMA_DBI_fetch_result('SELECT EVENT_NAME FROM information_schema.EVENTS WHERE EVENT_SCHEMA= \'' . PMA_sqlAddSlashes($db,true) . '\';');
             if ($event_names) {
-                foreach($event_names as $event_name) {
+                foreach ($event_names as $event_name) {
                     PMA_DBI_select_db($db);
                     $tmp_query = PMA_DBI_get_definition($db, 'EVENT', $event_name);
                     // collect for later display
diff --git a/enum_editor.php b/enum_editor.php
index ab86d73..5fe962f 100644
--- a/enum_editor.php
+++ b/enum_editor.php
@@ -32,7 +32,7 @@ require_once './libraries/header_meta_style.inc.php';
                 }
                 // Display the values in text fields, excluding empty strings
                 $field_counter = 0;
-                foreach($values as $value) {
+                foreach ($values as $value) {
                     if(trim($value) != "") {
                         $field_counter++;
                         echo sprintf('<input type="text" size="30" value="%s" name="field' . $field_counter . '" />', htmlspecialchars(str_replace(array("''", '\\\\', "\\'"), array("'", '\\', "'"), substr($value, 1, -1))));
diff --git a/export.php b/export.php
index 6137b96..f5a985a 100644
--- a/export.php
+++ b/export.php
@@ -400,7 +400,7 @@ if (!$save_on_server) {
             $_REQUEST['table_select'] = implode(",", $_REQUEST['table_select']);
         }
 
-        foreach($_REQUEST as $name => $value) {
+        foreach ($_REQUEST as $name => $value) {
             $back_button .= '&' . urlencode($name) . '=' . urlencode($value);
         }
         $back_button .= '&repopulate=1">Back</a> ]</p>';
@@ -492,7 +492,7 @@ if ($export_type == 'server') {
                     }
                 }
             }
-            foreach($views as $view) {
+            foreach ($views as $view) {
                 // no data export for a view
                 if ($GLOBALS[$what . '_structure_or_data'] == 'structure' || $GLOBALS[$what . '_structure_or_data'] == 'structure_and_data') {
                     if (!PMA_exportStructure($current_db, $view, $crlf, $err_url, $do_relation, $do_comments, $do_mime, $do_dates, 'create_view', $export_type)) {
diff --git a/libraries/List_Database.class.php b/libraries/List_Database.class.php
index bf1d468..5e3912c 100644
--- a/libraries/List_Database.class.php
+++ b/libraries/List_Database.class.php
@@ -255,7 +255,7 @@ require_once './libraries/List.class.php';
 
             $pos = false;
 
-            foreach($separators as $separator) {
+            foreach ($separators as $separator) {
                 // use strpos instead of strrpos; it seems more common to
                 // have the db name, the separator, then the rest which
                 // might contain a separator
diff --git a/libraries/auth/cookie.auth.lib.php b/libraries/auth/cookie.auth.lib.php
index ff758b8..2f3323e 100644
--- a/libraries/auth/cookie.auth.lib.php
+++ b/libraries/auth/cookie.auth.lib.php
@@ -332,7 +332,7 @@ function PMA_auth_check()
     // END Swekey Integration
 
     if (defined('PMA_CLEAR_COOKIES')) {
-        foreach($GLOBALS['cfg']['Servers'] as $key => $val) {
+        foreach ($GLOBALS['cfg']['Servers'] as $key => $val) {
             $GLOBALS['PMA_Config']->removeCookie('pmaPass-' . $key);
             $GLOBALS['PMA_Config']->removeCookie('pmaServer-' . $key);
             $GLOBALS['PMA_Config']->removeCookie('pmaUser-' . $key);
@@ -352,7 +352,7 @@ function PMA_auth_check()
         session_destroy();
         // -> delete password cookie(s)
         if ($GLOBALS['cfg']['LoginCookieDeleteAll']) {
-            foreach($GLOBALS['cfg']['Servers'] as $key => $val) {
+            foreach ($GLOBALS['cfg']['Servers'] as $key => $val) {
                 $GLOBALS['PMA_Config']->removeCookie('pmaPass-' . $key);
                 if (isset($_COOKIE['pmaPass-' . $key])) {
                     unset($_COOKIE['pmaPass-' . $key]);
diff --git a/libraries/bookmark.lib.php b/libraries/bookmark.lib.php
index 9ff7d1b..c978730 100644
--- a/libraries/bookmark.lib.php
+++ b/libraries/bookmark.lib.php
@@ -69,7 +69,7 @@ function PMA_Bookmark_getList($db)
             . ' ORDER BY label';
     $global = PMA_DBI_fetch_result($query, 'id', 'label', $controllink, PMA_DBI_QUERY_STORE);
 
-    foreach($global as $key => $val) {
+    foreach ($global as $key => $val) {
         $global[$key] = $val . ' (' . __('shared') . ')';
     }
 
diff --git a/libraries/cleanup.lib.php b/libraries/cleanup.lib.php
index b77fd31..26a559c 100644
--- a/libraries/cleanup.lib.php
+++ b/libraries/cleanup.lib.php
@@ -20,7 +20,7 @@ function PMA_remove_request_vars(&$whitelist)
     // strings
     $keys = array_keys(array_merge((array)$_REQUEST, (array)$_GET, (array)$_POST, (array)$_COOKIE));
 
-    foreach($keys as $key) {
+    foreach ($keys as $key) {
         if (! in_array($key, $whitelist)) {
             unset($_REQUEST[$key], $_GET[$key], $_POST[$key], $GLOBALS[$key]);
         } else {
diff --git a/libraries/common.inc.php b/libraries/common.inc.php
index 1abe885..ed32fab 100644
--- a/libraries/common.inc.php
+++ b/libraries/common.inc.php
@@ -176,7 +176,7 @@ $PMA_PHP_SELF = htmlspecialchars($PMA_PHP_SELF);
 /**
  * just to be sure there was no import (registering) before here
  * we empty the global space (but avoid unsetting $variables_list
- * and $key in the foreach(), we still need them!)
+ * and $key in the foreach (), we still need them!)
  */
 $variables_whitelist = array (
     'GLOBALS',
@@ -313,7 +313,7 @@ if (isset($_COOKIE)
  && (isset($_COOKIE['pmaCookieVer'])
   && $_COOKIE['pmaCookieVer'] < $pma_cookie_version)) {
     // delete all cookies
-    foreach($_COOKIE as $cookie_name => $tmp) {
+    foreach ($_COOKIE as $cookie_name => $tmp) {
         $GLOBALS['PMA_Config']->removeCookie($cookie_name);
     }
     $_COOKIE = array();
diff --git a/libraries/common.lib.php b/libraries/common.lib.php
index e4c7cbd..f0451b6 100644
--- a/libraries/common.lib.php
+++ b/libraries/common.lib.php
@@ -2749,7 +2749,7 @@ function PMA_expandUserString($string, $escape = null, $updates = array()) {
     $vars['phpmyadmin_version'] = 'phpMyAdmin ' . PMA_VERSION;
 
     /* Update forced variables */
-    foreach($updates as $key => $val) {
+    foreach ($updates as $key => $val) {
         $vars[$key] = $val;
     }
 
@@ -2773,7 +2773,7 @@ function PMA_expandUserString($string, $escape = null, $updates = array()) {
 
     /* Optional escaping */
     if (!is_null($escape)) {
-        foreach($replace as $key => $val) {
+        foreach ($replace as $key => $val) {
             $replace[$key] = $escape($val);
         }
     }
diff --git a/libraries/database_interface.lib.php b/libraries/database_interface.lib.php
index a43a4af..e7d08a5 100644
--- a/libraries/database_interface.lib.php
+++ b/libraries/database_interface.lib.php
@@ -364,7 +364,7 @@ function PMA_DBI_get_tables_full($database, $table = false, $tbl_is_group = fals
         unset($sql_where_table, $sql);
         if ($sort_by == 'Name' && $GLOBALS['cfg']['NaturalOrder']) {
             // here, the array's first key is by schema name
-            foreach($tables as $one_database_name => $one_database_tables) {
+            foreach ($tables as $one_database_name => $one_database_tables) {
                 uksort($one_database_tables, 'strnatcasecmp');
 
                 if ($sort_order == 'DESC') {
@@ -494,7 +494,7 @@ function PMA_DBI_get_tables_full($database, $table = false, $tbl_is_group = fals
     // Note 2: Instead of array_merge(), simply use the + operator because
     //  array_merge() renumbers numeric keys starting with 0, therefore
     //  we would lose a db name thats consists only of numbers
-    foreach($tables as $one_database => $its_tables) {
+    foreach ($tables as $one_database => $its_tables) {
         if (isset(PMA_Table::$cache[$one_database])) {
             PMA_Table::$cache[$one_database] = PMA_Table::$cache[$one_database] + $tables[$one_database];
         } else {
@@ -1341,7 +1341,7 @@ function PMA_DBI_get_triggers($db, $table = '', $delimiter = '//')
 
     // Sort results by name
     $name = array();
-    foreach($result as $key => $value) {
+    foreach ($result as $key => $value) {
         $name[] = $value['name'];
     }
     array_multisort($name, SORT_ASC, $result);
diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php
index 09ba682..ace57e1 100644
--- a/libraries/display_tbl.lib.php
+++ b/libraries/display_tbl.lib.php
@@ -2139,7 +2139,7 @@ function PMA_displayTable(&$dt_result, &$the_disp_mode, $analyzed_sql)
         // find the sorted column index in row result
         // (this might be a multi-table query)
         $sorted_column_index = false;
-        foreach($fields_meta as $key => $meta) {
+        foreach ($fields_meta as $key => $meta) {
             if ($meta->table == $sort_table && $meta->name == $sort_column) {
                 $sorted_column_index = $key;
                 break;
diff --git a/libraries/export/sql.php b/libraries/export/sql.php
index efda8d7..c87f926 100644
--- a/libraries/export/sql.php
+++ b/libraries/export/sql.php
@@ -86,7 +86,7 @@ if (isset($plugin_list)) {
         $compats = PMA_DBI_getCompatibilities();
         if (count($compats) > 0) {
             $values = array();
-            foreach($compats as $val) {
+            foreach ($compats as $val) {
                 $values[$val] = $val;
             }
             $plugin_list['sql']['options'][] = array(
@@ -322,7 +322,7 @@ function PMA_exportRoutines($db) {
           . PMA_exportComment(__('Procedures'))
           . PMA_exportComment();
 
-        foreach($procedure_names as $procedure_name) {
+        foreach ($procedure_names as $procedure_name) {
             if (! empty($GLOBALS['sql_drop_table'])) {
                 $text .= 'DROP PROCEDURE IF EXISTS ' . PMA_backquote($procedure_name) . $delimiter . $crlf;
             }
@@ -336,7 +336,7 @@ function PMA_exportRoutines($db) {
           . PMA_exportComment(__('Functions'))
           . PMA_exportComment();
 
-        foreach($function_names as $function_name) {
+        foreach ($function_names as $function_name) {
             if (! empty($GLOBALS['sql_drop_table'])) {
                 $text .= 'DROP FUNCTION IF EXISTS ' . PMA_backquote($function_name) . $delimiter . $crlf;
             }
@@ -469,7 +469,7 @@ function PMA_exportHeader()
         // backslash and n, as explained on the export interface
         $lines = explode('\n', $GLOBALS['sql_header_comment']);
         $head .= PMA_exportComment();
-        foreach($lines as $one_line) {
+        foreach ($lines as $one_line) {
             $head .= PMA_exportComment($one_line);
         }
         $head .= PMA_exportComment();
@@ -609,7 +609,7 @@ function PMA_exportDBFooter($db)
               . PMA_exportComment(__('Events'))
               . PMA_exportComment();
 
-            foreach($event_names as $event_name) {
+            foreach ($event_names as $event_name) {
                 if (! empty($GLOBALS['sql_drop_table'])) {
             $text .= 'DROP EVENT ' . PMA_backquote($event_name) . $delimiter . $crlf;
                 }
@@ -650,7 +650,7 @@ function PMA_getTableDefStandIn($db, $view, $crlf) {
     $create_query .= PMA_backquote($view) . ' (' . $crlf;
     $tmp = array();
     $columns = PMA_DBI_get_columns_full($db, $view);
-    foreach($columns as $column_name => $definition) {
+    foreach ($columns as $column_name => $definition) {
         $tmp[] = PMA_backquote($column_name) . ' ' . $definition['Type'] . $crlf;
     }
     $create_query .= implode(',', $tmp) . ');';
diff --git a/libraries/import/sql.php b/libraries/import/sql.php
index 536df68..7a957d9 100644
--- a/libraries/import/sql.php
+++ b/libraries/import/sql.php
@@ -22,7 +22,7 @@ if (isset($plugin_list)) {
     $compats = PMA_DBI_getCompatibilities();
     if (count($compats) > 0) {
         $values = array();
-        foreach($compats as $val) {
+        foreach ($compats as $val) {
             $values[$val] = $val;
         }
         $plugin_list['sql']['options'] = array(
diff --git a/libraries/import/xml.php b/libraries/import/xml.php
index 17479f5..b51e6d8 100644
--- a/libraries/import/xml.php
+++ b/libraries/import/xml.php
@@ -145,7 +145,7 @@ if (isset($namespaces['pma'])) {
     $create = array();
 
     foreach ($struct as $tier1 => $val1) {
-        foreach($val1 as $tier2 => $val2) {
+        foreach ($val1 as $tier2 => $val2) {
             /* Need to select the correct database for the creation of tables, views, triggers, etc. */
             /**
              * @todo    Generating a USE here blocks importing of a table
diff --git a/libraries/plugin_interface.lib.php b/libraries/plugin_interface.lib.php
index ea6869a..ed2f4f9 100644
--- a/libraries/plugin_interface.lib.php
+++ b/libraries/plugin_interface.lib.php
@@ -89,7 +89,7 @@ function PMA_pluginGetDefault($section, $opt)
         /* Possibly replace localised texts */
         if (preg_match_all('/(str[A-Z][A-Za-z0-9]*)/', $GLOBALS['cfg'][$section][$opt], $matches)) {
             $val = $GLOBALS['cfg'][$section][$opt];
-            foreach($matches[0] as $match) {
+            foreach ($matches[0] as $match) {
                 if (isset($GLOBALS[$match])) {
                     $val = str_replace($match, $GLOBALS[$match], $val);
                 }
@@ -217,7 +217,7 @@ function PMA_pluginGetOneOption($section, $plugin_name, $id, &$opt)
         $ret .= '<select name="' . $plugin_name . '_' . $opt['name'] . '"'
             . ' id="select_' . $plugin_name . '_' . $opt['name'] . '">';
         $default = PMA_pluginGetDefault($section, $plugin_name . '_' . $opt['name']);
-        foreach($opt['values'] as $key => $val) {
+        foreach ($opt['values'] as $key => $val) {
             $ret .= '<option value="' . $key . '"';
             if ($key == $default) {
                 $ret .= ' selected="selected"';
@@ -227,7 +227,7 @@ function PMA_pluginGetOneOption($section, $plugin_name, $id, &$opt)
         $ret .= '</select>';
     } elseif ($opt['type'] == 'radio') {
         $default = PMA_pluginGetDefault($section, $plugin_name . '_' . $opt['name']);
-        foreach($opt['values'] as $key => $val) {
+        foreach ($opt['values'] as $key => $val) {
             $ret .= '<li><input type="radio" name="' . $plugin_name . '_' . $opt['name'] . '" value="' . $key
             . '" id="radio_' . $plugin_name . '_' . $opt['name'] . '_' . $key . '"';
             if($key == $default) {
diff --git a/libraries/schema/User_Schema.class.php b/libraries/schema/User_Schema.class.php
index 641acf4..d610ac0 100644
--- a/libraries/schema/User_Schema.class.php
+++ b/libraries/schema/User_Schema.class.php
@@ -638,7 +638,7 @@ class PMA_User_Schema
              */
             $tables = PMA_DBI_get_tables_full($db);
             $foreignkey_tables = array();
-            foreach($tables as $table_name => $table_properties) {
+            foreach ($tables as $table_name => $table_properties) {
                    if (PMA_foreignkey_supported($table_properties['ENGINE'])) {
                         $foreignkey_tables[] = $table_name;
                     }
diff --git a/libraries/server_synchronize.lib.php b/libraries/server_synchronize.lib.php
index 57aaa02..a2381b7 100644
--- a/libraries/server_synchronize.lib.php
+++ b/libraries/server_synchronize.lib.php
@@ -651,7 +651,7 @@ function PMA_populateTargetTables($src_db, $trg_db, $src_link, $trg_link, $uncom
         while ($one_row = PMA_DBI_fetch_row($unbuffered_result)) {
             $insert_query .= '(';
             $key_of_last_value = count($one_row) - 1;
-            foreach($one_row as $key => $value) {
+            foreach ($one_row as $key => $value) {
                 $insert_query .= "'" . PMA_sqlAddSlashes($value) . "'";
                 if ($key < $key_of_last_value) {
                     $insert_query .= ",";
diff --git a/libraries/sysinfo.lib.php b/libraries/sysinfo.lib.php
index 7a96397..e996db6 100644
--- a/libraries/sysinfo.lib.php
+++ b/libraries/sysinfo.lib.php
@@ -115,7 +115,7 @@ class Linux {
         $mem['MemUsed'] = $mem['MemTotal'] - $mem['MemFree'] - $mem['Cached'] - $mem['Buffers'];
         $mem['SwapUsed'] = $mem['SwapTotal'] - $mem['SwapFree'] - $mem['SwapCached'];
         
-        foreach($mem as $idx=>$value) 
+        foreach ($mem as $idx=>$value) 
             $mem[$idx] = intval($value);
         
         return $mem;
diff --git a/libraries/tcpdf/tcpdf.php b/libraries/tcpdf/tcpdf.php
index ed94d81..81091c9 100644
--- a/libraries/tcpdf/tcpdf.php
+++ b/libraries/tcpdf/tcpdf.php
@@ -8437,7 +8437,7 @@ class TCPDF {
         //Pages root
         $out = $this->_getobj(1)."\n";
         $out .= '<< /Type /Pages /Kids [';
-        foreach($this->page_obj_id as $page_obj) {
+        foreach ($this->page_obj_id as $page_obj) {
             $out .= ' '.$page_obj.' 0 R';
         }
         $out .= ' ] /Count '.$nb.' >>';
@@ -8902,7 +8902,7 @@ class TCPDF {
                                 }
                                 if (isset($pl['opt']['mk']['bc']) AND (is_array($pl['opt']['mk']['bc']))) {
                                     $annots .= ' /BC [';
-                                    foreach($pl['opt']['mk']['bc'] AS $col) {
+                                    foreach ($pl['opt']['mk']['bc'] AS $col) {
                                         $col = intval($col);
                                         $color = $col <= 0 ? 0 : ($col >= 255 ? 1 : $col / 255);
                                         $annots .= sprintf(' %.2F', $color);
@@ -8911,7 +8911,7 @@ class TCPDF {
                                 }
                                 if (isset($pl['opt']['mk']['bg']) AND (is_array($pl['opt']['mk']['bg']))) {
                                     $annots .= ' /BG [';
-                                    foreach($pl['opt']['mk']['bg'] AS $col) {
+                                    foreach ($pl['opt']['mk']['bg'] AS $col) {
                                         $col = intval($col);
                                         $color = $col <= 0 ? 0 : ($col >= 255 ? 1 : $col / 255);
                                         $annots .= sprintf(' %.2F', $color);
@@ -8988,7 +8988,7 @@ class TCPDF {
                                 if (is_array($pl['opt']['ff'])) {
                                     // array of bit settings
                                     $flag = 0;
-                                    foreach($pl['opt']['ff'] as $val) {
+                                    foreach ($pl['opt']['ff'] as $val) {
                                         $flag += 1 << ($val - 1);
                                     }
                                 } else {
@@ -9052,7 +9052,7 @@ class TCPDF {
                             }
                             if (isset($pl['opt']['opt']) AND (is_array($pl['opt']['opt'])) AND !empty($pl['opt']['opt'])) {
                                 $annots .= ' /Opt [';
-                                foreach($pl['opt']['opt'] AS $copt) {
+                                foreach ($pl['opt']['opt'] AS $copt) {
                                     if (is_array($copt)) {
                                         $annots .= ' ['.$this->_textstring($copt[0], $annot_obj_id).' '.$this->_textstring($copt[1], $annot_obj_id).']';
                                     } else {
@@ -9066,7 +9066,7 @@ class TCPDF {
                             }
                             if (isset($pl['opt']['i']) AND (is_array($pl['opt']['i'])) AND !empty($pl['opt']['i'])) {
                                 $annots .= ' /I [';
-                                foreach($pl['opt']['i'] AS $copt) {
+                                foreach ($pl['opt']['i'] AS $copt) {
                                     $annots .= intval($copt).' ';
                                 }
                                 $annots .= ']';
@@ -10595,7 +10595,7 @@ class TCPDF {
                 $objrefs .= $this->sig_obj_id.' 0 R';
             }
             if (!empty($this->form_obj_id)) {
-                foreach($this->form_obj_id as $objid) {
+                foreach ($this->form_obj_id as $objid) {
                     $objrefs .= ' '.$objid.' 0 R';
                 }
             }
@@ -17875,7 +17875,7 @@ class TCPDF {
     protected function getTagStyleFromCSS($dom, $key, $css) {
         $tagstyle = ''; // style to be returned
         // get all styles that apply
-        foreach($css as $selector => $style) {
+        foreach ($css as $selector => $style) {
             // remove specificity
             $selector = substr($selector, strpos($selector, ' '));
             // check if this selector apply to current tag
@@ -23789,7 +23789,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
         $patterns_array = preg_split('/[\s]+/', $data);
         // create new language array of patterns
         $patterns = array();
-        foreach($patterns_array as $val) {
+        foreach ($patterns_array as $val) {
             if (!$this->empty_string($val)) {
                 $val = trim($val);
                 $val = str_replace('\'', '\\\'', $val);
@@ -25077,12 +25077,12 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value:
                     $gradient['coords'][4] /= $w;
                 }
             } elseif ($gradient['mode'] == 'percentage') {
-                foreach($gradient['coords'] as $key => $val) {
+                foreach ($gradient['coords'] as $key => $val) {
                     $gradient['coords'][$key] = (intval($val) / 100);
                 }
             }
             // fix values
-            foreach($gradient['coords'] as $key => $val) {
+            foreach ($gradient['coords'] as $key => $val) {
                 if ($val < 0) {
                     $gradient['coords'][$key] = 0;
                 } elseif ($val > 1) {
diff --git a/libraries/transformations/application_octetstream__download.inc.php b/libraries/transformations/application_octetstream__download.inc.php
index 28b199a..4b9d5d1 100644
--- a/libraries/transformations/application_octetstream__download.inc.php
+++ b/libraries/transformations/application_octetstream__download.inc.php
@@ -20,7 +20,7 @@ function PMA_transformation_application_octetstream__download(&$buffer, $options
         $cn = $options[0]; // filename
     } else {
         if (isset($options[1]) && !empty($options[1])) {
-            foreach($fields_meta as $key => $val) {
+            foreach ($fields_meta as $key => $val) {
                 if ($val->name == $options[1]) {
                     $pos = $key;
                     break;
diff --git a/server_privileges.php b/server_privileges.php
index 0e75d39..f86450f 100644
--- a/server_privileges.php
+++ b/server_privileges.php
@@ -588,7 +588,7 @@ function PMA_displayPrivTable($db = '*', $table = '*', $submit = true)
            . '    <p><small><i>' . __(' Note: MySQL privilege names are expressed in English ') . '</i></small></p>' . "\n";
 
         // Output the Global privilege tables with checkboxes
-        foreach($privTable as $i => $table) {
+        foreach ($privTable as $i => $table) {
             echo '    <fieldset>' . "\n"
                 . '        <legend>' . __($privTable_names[$i]) . '</legend>' . "\n";
             foreach ($table as $priv)
@@ -1452,7 +1452,7 @@ if (isset($_REQUEST['export'])) {
     echo '<h2>' . __('User') . ' \'' . htmlspecialchars($username) . '\'@\'' . htmlspecialchars($hostname) . '\'</h2>';
     echo '<textarea cols="' . $GLOBALS['cfg']['TextareaCols'] . '" rows="' . $GLOBALS['cfg']['TextareaRows'] . '">';
     $grants = PMA_DBI_fetch_result("SHOW GRANTS FOR '" . PMA_sqlAddSlashes($username) . "'@'" . PMA_sqlAddSlashes($hostname) . "'");
-    foreach($grants as $one_grant) {
+    foreach ($grants as $one_grant) {
         echo $one_grant . ";\n\n";
     }
     echo '</textarea>';
diff --git a/server_status.php b/server_status.php
index a16896b..b1dea55 100644
--- a/server_status.php
+++ b/server_status.php
@@ -650,7 +650,7 @@ echo __('Runtime Information');
                     <select id="filterCategory" name="filterCategory">
                         <option value=''><?php echo __('Filter by category...'); ?></option>
                 <?php
-                        foreach($sections as $section_id => $section_name) {
+                        foreach ($sections as $section_id => $section_name) {
                 ?>
                             <option value='<?php echo $section_id; ?>'><?php echo $section_name; ?></option>
                 <?php
@@ -1435,7 +1435,7 @@ function printMonitor() {
     <script type="text/javascript">
         variableNames = [ <?php
             $i=0;
-            foreach($server_status as $name=>$value) {
+            foreach ($server_status as $name=>$value) {
                 if(is_numeric($value)) {
                     if($i++ > 0) echo ", ";
                     echo "'".$name."'";
@@ -1451,7 +1451,7 @@ function refreshList($name,$defaultRate=5, $refreshRates=Array(1, 2, 5, 10, 20,
 ?>
     <select name="<?php echo $name; ?>">
         <?php
-            foreach($refreshRates as $rate) {
+            foreach ($refreshRates as $rate) {
                 $selected = ($rate == $defaultRate)?' selected="selected"':'';
                 
                 if($rate<60)
diff --git a/sql.php b/sql.php
index 6d705fc..c36ea1f 100644
--- a/sql.php
+++ b/sql.php
@@ -118,7 +118,7 @@ if(isset($_REQUEST['get_enum_values']) && $_REQUEST['get_enum_values'] == true)
     $values = explode(',', str_replace($search, '', $field_info_result[0]['Type']));
 
     $dropdown = '<option value=""> </option>';
-    foreach($values as $value) {
+    foreach ($values as $value) {
         $dropdown .= '<option value="' . htmlspecialchars($value) . '"';
         if($value == $_REQUEST['curr_value']) {
             $dropdown .= ' selected="selected"';
@@ -146,7 +146,7 @@ if(isset($_REQUEST['get_set_values']) && $_REQUEST['get_set_values'] == true) {
     $values = explode(',', str_replace($search, '', $field_info_result[0]['Type']));
 
     $select = '';
-    foreach($values as $value) {
+    foreach ($values as $value) {
         $select .= '<option value="' . htmlspecialchars($value) . '"';
         if(in_array($value, $selected_values, true)) {
             $select .= ' selected="selected"';
@@ -712,7 +712,7 @@ if (0 == $num_rows || $is_affected) {
             $rel_fields = array();
             parse_str($_REQUEST['rel_fields_list'], $rel_fields);
 
-            foreach( $rel_fields as $rel_field => $rel_field_value) {
+            foreach ( $rel_fields as $rel_field => $rel_field_value) {
 
                 $where_comparison = "='" . $rel_field_value . "'";
                 $display_field = PMA_getDisplayField($map[$rel_field]['foreign_db'], $map[$rel_field]['foreign_table']);
@@ -779,7 +779,7 @@ if (0 == $num_rows || $is_affected) {
             $edited_values = array();
             parse_str($_REQUEST['transform_fields_list'], $edited_values);
 
-            foreach($mime_map as $transformation) {
+            foreach ($mime_map as $transformation) {
                 $include_file = $transformation['transformation'];
                 $column_name = $transformation['column_name'];
                 $column_data = $edited_values[$column_name];
@@ -944,7 +944,7 @@ $(document).ready(createProfilingChart);
         echo ' </tr>' .  "\n";
 
         $chart_json = Array();
-        foreach($profiling_results as $one_result) {
+        foreach ($profiling_results as $one_result) {
             echo ' <tr>' .  "\n";
             echo '<td>' . ucwords($one_result['Status']) . '</td>' .  "\n";
             echo '<td align="right">' . (PMA_formatNumber($one_result['Duration'],3,1)) . 's</td>' .  "\n";
diff --git a/tbl_chart.php b/tbl_chart.php
index 817a8ea..96befa7 100644
--- a/tbl_chart.php
+++ b/tbl_chart.php
@@ -99,7 +99,7 @@ url_query = '<?php echo $url_query;?>';
             echo __('X-Axis:'); ?> <select name="chartXAxis">
             <?php
             
-            foreach($keys as $idx=>$key) {
+            foreach ($keys as $idx=>$key) {
                 if($yaxis==-1 && ($idx==count($data[0])-1 || preg_match("/(date|time)/i",$key))) {
                     echo '<option value="'.$idx.'" selected>'.$key.'</option>';
                     $yaxis=$idx;
@@ -114,7 +114,7 @@ url_query = '<?php echo $url_query;?>';
         <select name="chartSeries">
             <option value="columns"><?php echo __('The remaining columns'); ?></option>
             <?php
-            foreach($keys as $idx=>$key) {
+            foreach ($keys as $idx=>$key) {
                 echo '<option>'.$key.'</option>';
             }
         ?>
diff --git a/tbl_operations.php b/tbl_operations.php
index 2205a4f..64559ab 100644
--- a/tbl_operations.php
+++ b/tbl_operations.php
@@ -733,7 +733,7 @@ if (! (isset($db_is_information_schema) && $db_is_information_schema)) {
  <legend><?php echo __('Partition maintenance'); ?></legend>
 <?php
         $html_select = '<select name="partition_name">' . "\n";
-        foreach($partition_names as $one_partition) {
+        foreach ($partition_names as $one_partition) {
             $one_partition = htmlspecialchars($one_partition);
             $html_select .= '<option value="' . $one_partition . '">' . $one_partition . '</option>' . "\n";
         }
diff --git a/tbl_tracking.php b/tbl_tracking.php
index b612885..29cf83a 100644
--- a/tbl_tracking.php
+++ b/tbl_tracking.php
@@ -63,7 +63,7 @@ if (isset($_REQUEST['report_export'])) {
     function PMA_filter_tracking($data, $filter_ts_from, $filter_ts_to, $filter_users) {
         $tmp_entries = array();
         $id = 0;
-        foreach( $data as $entry ) {
+        foreach ( $data as $entry ) {
             $timestamp = strtotime($entry['date']);
 
             if ($timestamp >= $filter_ts_from && $timestamp <= $filter_ts_to &&
@@ -108,7 +108,7 @@ if (isset($_REQUEST['report_export']) && $_REQUEST['export_type'] == 'sqldumpfil
 
     $dump = "# " . sprintf(__('Tracking report for table `%s`'), htmlspecialchars($_REQUEST['table'])) . "\n" .
             "# " . date('Y-m-d H:i:s') . "\n";
-    foreach($entries as $entry) {
+    foreach ($entries as $entry) {
         $dump .= $entry['statement'];
     }
     $filename = 'log_' . htmlspecialchars($_REQUEST['table']) . '.sql';
@@ -202,7 +202,7 @@ if (isset($_REQUEST['submit_activate_now'])) {
 
 // Export as SQL execution
 if (isset($_REQUEST['report_export']) && $_REQUEST['export_type'] == 'execution') {
-    foreach($entries as $entry) {
+    foreach ($entries as $entry) {
         $sql_result = PMA_DBI_query( "/*NOTRACK*/\n" . $entry['statement'] );
     }
     $msg = PMA_Message::success(__('SQL statements executed.'));
@@ -218,7 +218,7 @@ if (isset($_REQUEST['report_export']) && $_REQUEST['export_type'] == 'sqldump')
                     "USE pma_temp_db; \n" .
                     "\n";
 
-    foreach($entries as $entry) {
+    foreach ($entries as $entry) {
         $new_query .= $entry['statement'];
     }
     $msg = PMA_Message::success(__('SQL statements exported. Please copy the dump or execute it.'));
@@ -275,7 +275,7 @@ if (isset($_REQUEST['snapshot'])) {
     <tbody>
 <?php
     $style = 'odd';
-    foreach($columns as $field_index => $field) {
+    foreach ($columns as $field_index => $field) {
 ?>
         <tr class="noclick <?php echo $style; ?>">
             <?php


hooks/post-receive
-- 
phpMyAdmin




More information about the Git mailing list