From 3d85296d79135107c77d66ebb361311a95f35fc2 Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Mon, 27 Apr 2015 18:06:36 +0530 Subject: [PATCH] Spaces around assignments Signed-off-by: Madhura Jayaratne --- db_central_columns.php | 2 +- libraries/DisplayResults.class.php | 2 +- libraries/error_report.lib.php | 2 +- libraries/insert_edit.lib.php | 4 ++-- libraries/normalization.lib.php | 8 ++++---- .../plugins/export/PMA_ExportPdf.class.php | 2 +- .../plugins/export/TableProperty.class.php | 2 +- libraries/rte/rte_list.lib.php | 2 +- libraries/rte/rte_routines.lib.php | 20 +++++++++---------- libraries/server_status_monitor.lib.php | 2 +- libraries/server_status_variables.lib.php | 2 +- libraries/sqlparser.lib.php | 10 +++++----- libraries/tbl_views.lib.php | 2 +- 13 files changed, 30 insertions(+), 30 deletions(-) diff --git a/db_central_columns.php b/db_central_columns.php index 0d9bdc8b95..d6a70f6b08 100644 --- a/db_central_columns.php +++ b/db_central_columns.php @@ -131,7 +131,7 @@ $tableheader = PMA_getCentralColumnsTableHeader( $response->addHTML($tableheader); $result = PMA_getColumnsList($db, $pos, $max_rows); $odd_row = true; -$row_num=0; +$row_num = 0; foreach ($result as $row) { $tableHtmlRow = PMA_getHTMLforCentralColumnsTableRow( $row, $odd_row, $row_num, $db diff --git a/libraries/DisplayResults.class.php b/libraries/DisplayResults.class.php index b6ab402c0e..59000a6abc 100644 --- a/libraries/DisplayResults.class.php +++ b/libraries/DisplayResults.class.php @@ -4211,7 +4211,7 @@ class PMA_DisplayResults $map = array(); // find tables - $target=array(); + $target = array(); if (isset($analyzed_sql[0]['table_ref']) && is_array($analyzed_sql[0]['table_ref']) ) { diff --git a/libraries/error_report.lib.php b/libraries/error_report.lib.php index 9a9768a410..fbef2101c8 100644 --- a/libraries/error_report.lib.php +++ b/libraries/error_report.lib.php @@ -95,7 +95,7 @@ function PMA_getReportData($exception_type = 'js') } elseif ($exception_type == 'php') { $errors = array(); // create php error report - $i=0; + $i = 0; if (!isset($_SESSION['prev_errors']) || $_SESSION['prev_errors'] == '' ) { diff --git a/libraries/insert_edit.lib.php b/libraries/insert_edit.lib.php index 227fb7c5af..61594ff596 100644 --- a/libraries/insert_edit.lib.php +++ b/libraries/insert_edit.lib.php @@ -2786,11 +2786,11 @@ function PMA_getHtmlForInsertEditFormColumn($table_columns, $i, $column, // HTML attribute //add data attributes "no of decimals" and "data type" - $no_decimals=0; + $no_decimals = 0; $type = current(explode("(", $column['pma_type'])); if (preg_match('/\(([^()]+)\)/', $column['pma_type'], $match)) { $match[0] = trim($match[0], '()'); - $no_decimals=$match[0]; + $no_decimals = $match[0]; } $html_output .= '' . "\n"; diff --git a/libraries/normalization.lib.php b/libraries/normalization.lib.php index f06a80d52d..f0611c2d1a 100644 --- a/libraries/normalization.lib.php +++ b/libraries/normalization.lib.php @@ -336,7 +336,7 @@ function PMA_getHtmlFor2NFstep1($db, $table) . 'whose values combined together are sufficient' . ' to determine the value of the column.' ); - $cnt=0; + $cnt = 0; foreach ($columns as $column) { if (!in_array($column, $pk)) { $cnt++; @@ -383,7 +383,7 @@ function PMA_getHtmlForNewTables2NF($partialDependencies,$table) ), htmlspecialchars($table) ) . '

'; $tableName = $table; - $i=1; + $i = 1; foreach ($partialDependencies as $key=>$dependents) { $html .= '

' @@ -483,7 +483,7 @@ function PMA_createNewTablesFor2NF($partialDependencies, $tablesName, $table, $d function PMA_getHtmlForNewTables3NF($dependencies, $tables, $db) { $html = ""; - $i=1; + $i = 1; $newTables = array(); foreach ($tables as $table=>$arrDependson) { if (count(array_unique($arrDependson)) == 1) { @@ -699,7 +699,7 @@ function PMA_getHtmlFor3NFstep1($db, $tables) . 'Note: A column may have no transitive dependency, ' . 'in that case you don\'t have to select any.' ); - $cnt=0; + $cnt = 0; foreach ($tables as $key=>$table) { $primary = PMA_Index::getPrimary($table, $db); $primarycols = $primary->getColumns(); diff --git a/libraries/plugins/export/PMA_ExportPdf.class.php b/libraries/plugins/export/PMA_ExportPdf.class.php index cf48dba751..dc69531286 100644 --- a/libraries/plugins/export/PMA_ExportPdf.class.php +++ b/libraries/plugins/export/PMA_ExportPdf.class.php @@ -282,7 +282,7 @@ class PMA_ExportPdf extends PMA_PDF */ public function getTriggers($db, $table) { - $i=0; + $i = 0; $triggers = $GLOBALS['dbi']->getTriggers($db, $table); foreach ($triggers as $trigger) { $i++; break; diff --git a/libraries/plugins/export/TableProperty.class.php b/libraries/plugins/export/TableProperty.class.php index 16d4c5b578..81b7ea478e 100644 --- a/libraries/plugins/export/TableProperty.class.php +++ b/libraries/plugins/export/TableProperty.class.php @@ -199,7 +199,7 @@ class TableProperty */ function isPK() { - return $this->key=="PRI"; + return $this->key == "PRI"; } /** diff --git a/libraries/rte/rte_list.lib.php b/libraries/rte/rte_list.lib.php index 7b7ab3d4e5..79eb07576d 100644 --- a/libraries/rte/rte_list.lib.php +++ b/libraries/rte/rte_list.lib.php @@ -184,7 +184,7 @@ function PMA_RTN_getRowForList($routine, $rowclass = '') if ($routine !== false) { if (PMA_Util::currentUserHasPrivilege('EXECUTE', $db)) { $execute_action = 'execute_routine'; - for ($i=0; $i<$routine_details['item_num_params']; $i++) { + for ($i = 0; $i<$routine_details['item_num_params']; $i++) { if ($routine_details['item_type'] == 'PROCEDURE' && $routine_details['item_param_dir'][$i] == 'OUT' ) { diff --git a/libraries/rte/rte_routines.lib.php b/libraries/rte/rte_routines.lib.php index 6b26f5dd30..36b582fa04 100644 --- a/libraries/rte/rte_routines.lib.php +++ b/libraries/rte/rte_routines.lib.php @@ -123,7 +123,7 @@ function PMA_RTN_parseOneParameter($value) $depth = 0; $param_length = ''; $param_opts = array(); - for ($i=$pos; $i<$parsed_param['len']; $i++) { + for ($i = $pos; $i<$parsed_param['len']; $i++) { if (($parsed_param[$i]['type'] == 'alpha_columnType' || $parsed_param[$i]['type'] == 'alpha_functionName') && $depth == 0 ) { @@ -183,7 +183,7 @@ function PMA_RTN_parseAllParameters($parsed_query, $routine_type) $params = array(); $fetching = false; $depth = 0; - for ($i=0; $i<$parsed_query['len']; $i++) { + for ($i = 0; $i<$parsed_query['len']; $i++) { if ($parsed_query[$i]['type'] == 'alpha_reservedWord' && $parsed_query[$i]['data'] == $routine_type ) { @@ -249,7 +249,7 @@ function PMA_RTN_parseRoutineDefiner($parsed_query) { $retval = ''; $fetching = false; - for ($i=0; $i<$parsed_query['len']; $i++) { + for ($i = 0; $i<$parsed_query['len']; $i++) { if ($parsed_query[$i]['type'] == 'alpha_reservedWord' && $parsed_query[$i]['data'] == 'DEFINER' ) { @@ -684,7 +684,7 @@ function PMA_RTN_getDataFromName($name, $type, $all = true) // information about the return variable. $dtd = ''; $fetching = false; - for ($i=0; $i<$parsed_query['len']; $i++) { + for ($i = 0; $i<$parsed_query['len']; $i++) { if ($parsed_query[$i]['type'] == 'alpha_reservedWord' && /*overload*/mb_strtoupper($parsed_query[$i]['data']) == 'RETURNS' ) { @@ -877,7 +877,7 @@ function PMA_RTN_getEditorForm($mode, $operation, $routine) foreach ($need_escape as $key => $index) { $routine[$index] = htmlentities($routine[$index], ENT_QUOTES, 'UTF-8'); } - for ($i=0; $i<$routine['item_num_params']; $i++) { + for ($i = 0; $i<$routine['item_num_params']; $i++) { $routine['item_param_name'][$i] = htmlentities( $routine['item_param_name'][$i], ENT_QUOTES @@ -992,7 +992,7 @@ function PMA_RTN_getEditorForm($mode, $operation, $routine) $retval .= " " . __('Options') . "\n"; $retval .= "  \n"; $retval .= " "; - for ($i=0; $i<$routine['item_num_params']; $i++) { // each parameter + for ($i = 0; $i<$routine['item_num_params']; $i++) { // each parameter $retval .= PMA_RTN_getParameterRow($routine, $i, $isprocedure_class); } $retval .= " "; @@ -1350,7 +1350,7 @@ function PMA_RTN_handleExecute() $end_query = array(); $args = array(); $all_functions = $GLOBALS['PMA_Types']->getAllFunctions(); - for ($i=0; $i<$routine['item_num_params']; $i++) { + for ($i = 0; $i<$routine['item_num_params']; $i++) { if (isset($_REQUEST['params'][$routine['item_param_name'][$i]])) { $value = $_REQUEST['params'][$routine['item_param_name'][$i]]; if (is_array($value)) { // is SET type @@ -1593,7 +1593,7 @@ function PMA_RTN_getExecuteForm($routine) // Escape special characters $routine['item_name'] = htmlentities($routine['item_name'], ENT_QUOTES); - for ($i=0; $i<$routine['item_num_params']; $i++) { + for ($i = 0; $i<$routine['item_num_params']; $i++) { $routine['item_param_name'][$i] = htmlentities( $routine['item_param_name'][$i], ENT_QUOTES @@ -1631,7 +1631,7 @@ function PMA_RTN_getExecuteForm($routine) $retval .= "\n"; // Get a list of data types that are not yet supported. $no_support_types = PMA_Util::unsupportedDatatypes(); - for ($i=0; $i<$routine['item_num_params']; $i++) { // Each parameter + for ($i = 0; $i<$routine['item_num_params']; $i++) { // Each parameter if ($routine['item_type'] == 'PROCEDURE' && $routine['item_param_dir'][$i] == 'OUT' ) { @@ -1687,7 +1687,7 @@ function PMA_RTN_getExecuteForm($routine) } else { $input_type = 'checkbox'; } - for ($j=0; $j<$tokens['len']; $j++) { + for ($j = 0; $j<$tokens['len']; $j++) { if ($tokens[$j]['type'] != 'punct_listsep') { $tokens[$j]['data'] = htmlentities( PMA_Util::unquote($tokens[$j]['data']), diff --git a/libraries/server_status_monitor.lib.php b/libraries/server_status_monitor.lib.php index 1f3466b17e..fb9ddfee8e 100644 --- a/libraries/server_status_monitor.lib.php +++ b/libraries/server_status_monitor.lib.php @@ -40,7 +40,7 @@ function PMA_getHtmlForMonitor($ServerStatusData) $retval .= '