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;