Spaces around assignments

Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
This commit is contained in:
Madhura Jayaratne 2015-04-27 18:06:36 +05:30
parent 7c82094f60
commit 3d85296d79
13 changed files with 30 additions and 30 deletions

View File

@ -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

View File

@ -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'])
) {

View File

@ -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'] == ''
) {

View File

@ -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 .= '<td' . ' data-type="' . $type . '"' . ' data-decimals="'
. $no_decimals . '">' . "\n";

View File

@ -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)
) . '</b></p>';
$tableName = $table;
$i=1;
$i = 1;
foreach ($partialDependencies as $key=>$dependents) {
$html .= '<p><input type="text" name="' . htmlspecialchars($key)
. '" value="' . htmlspecialchars($tableName) . '"/>'
@ -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();

View File

@ -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;

View File

@ -199,7 +199,7 @@ class TableProperty
*/
function isPK()
{
return $this->key=="PRI";
return $this->key == "PRI";
}
/**

View File

@ -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'
) {

View File

@ -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 .= " <th colspan='2'>" . __('Options') . "</th>\n";
$retval .= " <th class='routine_param_remove hide'>&nbsp;</th>\n";
$retval .= " </tr>";
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 .= " </table>";
@ -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 .= "</tr>\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']),

View File

@ -40,7 +40,7 @@ function PMA_getHtmlForMonitor($ServerStatusData)
$retval .= '<script type="text/javascript">';
$retval .= 'variableNames = [ ';
$i=0;
$i = 0;
foreach ($ServerStatusData->status as $name=>$value) {
if (is_numeric($value)) {
if ($i++ > 0) {

View File

@ -98,7 +98,7 @@ function PMA_getHtmlForLinkSuggestions($ServerStatusData)
$retval .= '<p class="notice">' . __('Related links:');
foreach ($ServerStatusData->links as $section_name => $section_links) {
$retval .= '<span class="status_' . $section_name . '"> ';
$i=0;
$i = 0;
foreach ($section_links as $link_name => $link_url) {
if ($i > 0) {
$retval .= ', ';

View File

@ -1505,10 +1505,10 @@ function PMA_SQP_analyze($arr)
&& ($seen_end_of_table_ref || $i == $size-1)
&& $subresult != $subresult_empty
) {
for ($tr=0; $tr <= $current_table_ref; $tr++) {
for ($tr = 0; $tr <= $current_table_ref; $tr++) {
$alias = $subresult['table_ref'][$tr]['table_alias'];
$truename = $subresult['table_ref'][$tr]['table_true_name'];
for ($se=0; $se <= $current_select_expr; $se++) {
for ($se = 0; $se <= $current_select_expr; $se++) {
if (isset($alias)
&& /*overload*/mb_strlen($alias)
&& $subresult['select_expr'][$se]['table_true_name'] == $alias
@ -1591,7 +1591,7 @@ function PMA_SQP_analyze($arr)
//DEBUG
/*
if (isset($current_select_expr)) {
for ($trace=0; $trace<=$current_select_expr; $trace++) {
for ($trace = 0; $trace <= $current_select_expr; $trace++) {
echo "<br />";
reset ($subresult['select_expr'][$trace]);
while (list ($key, $val) = each ($subresult['select_expr'][$trace]))
@ -1601,7 +1601,7 @@ function PMA_SQP_analyze($arr)
if (isset($current_table_ref)) {
echo "current_table_ref = " . $current_table_ref . "<br>";
for ($trace=0; $trace<=$current_table_ref; $trace++) {
for ($trace = 0; $trace <= $current_table_ref; $trace++) {
echo "<br />";
reset ($subresult['table_ref'][$trace]);
@ -2457,7 +2457,7 @@ function PMA_SQP_format(
$typearr[4] = '';
}
for ($j=0; $j<4; $j++) {
for ($j = 0; $j<4; $j++) {
$typearr[$j] = $typearr[$j + 1];
}

View File

@ -35,7 +35,7 @@ function PMA_getColumnMap($sql_query, $view_columns)
$nbFields = count($real_source_fields_meta);
if ($nbFields > 0) {
for ($i=0; $i < $nbFields; $i++) {
for ($i = 0; $i < $nbFields; $i++) {
$map = array();
$map['table_name'] = $real_source_fields_meta[$i]->table;