From 3a034bd5398d9f756a4c75a8d0a929cb8b368b71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 11 Aug 2011 14:31:35 +0200 Subject: [PATCH] Whitespace cleanup --- libraries/advisor.class.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/libraries/advisor.class.php b/libraries/advisor.class.php index d817593062..74208d4e15 100644 --- a/libraries/advisor.class.php +++ b/libraries/advisor.class.php @@ -1,7 +1,7 @@ variables = array_merge( - PMA_DBI_fetch_result('SHOW GLOBAL STATUS', 0, 1), + PMA_DBI_fetch_result('SHOW GLOBAL STATUS', 0, 1), PMA_DBI_fetch_result('SHOW GLOBAL VARIABLES', 0, 1) ); // Add total memory to variables as well @@ -26,7 +26,7 @@ class Advisor $sysinfo = getSysInfo(); $memory = $sysinfo->memory(); $this->variables['system_memory'] = $memory['MemTotal']; - + // Step 2: Read and parse the list of rules $this->parseResult = $this->parseRulesFile(); // Step 3: Feed the variables to the rules and let them fire. Sets $runResult @@ -36,7 +36,7 @@ class Advisor } function runRules() { - $this->runResult = array( + $this->runResult = array( 'fired' => array(), 'notfired' => array(), 'unchecked'=> array(), @@ -119,12 +119,12 @@ class Advisor } $rule['name'] = _gettext($rule['name']); $rule['issue'] = _gettext($rule['issue']); - + $rule['recommendation'] = preg_replace( '/\{([a-z_0-9]+)\}/Ui', '\1', _gettext($rule['recommendation'])); - + break; } @@ -152,7 +152,7 @@ class Advisor if($err) throw new Exception(strip_tags($err) . '
Executed code: $value = '.$expr.';'); return $value; } - + // Reads the rule file into an array, throwing errors messages on syntax errors function parseRulesFile() { $file = file('libraries/advisory_rules.txt'); @@ -170,9 +170,9 @@ class Advisor // Reading new rule if(substr($line, 0, 4) == 'rule') { - if($ruleLine > 0) { - $errors[] = 'Invalid rule declaration on line '.($i+1). ', expected line '.$ruleSyntax[$ruleLine++].' of previous rule' ; - continue; + if($ruleLine > 0) { + $errors[] = 'Invalid rule declaration on line '.($i+1). ', expected line '.$ruleSyntax[$ruleLine++].' of previous rule' ; + continue; } if(preg_match("/rule\s'(.*)'( \[(.*)\])?$/",$line,$match)) { $ruleLine = 1;