Merge branch 'master' of ssh://phpmyadmin.git.sourceforge.net/gitroot/phpmyadmin/phpmyadmin
This commit is contained in:
commit
855dc6e645
@ -174,6 +174,22 @@ class Advisor
|
||||
$this->runResult[$type][] = $rule;
|
||||
}
|
||||
|
||||
private function ruleExprEvaluate_var1($matches)
|
||||
{
|
||||
// '/fired\s*\(\s*(\'|")(.*)\1\s*\)/Uie'
|
||||
return '1'; //isset($this->runResult[\'fired\']
|
||||
}
|
||||
|
||||
private function ruleExprEvaluate_var2($matches)
|
||||
{
|
||||
// '/\b(\w+)\b/e'
|
||||
return isset($this->variables[$matches[1]])
|
||||
? (is_numeric($this->variables[$matches[1]])
|
||||
? $this->variables[$matches[1]]
|
||||
: '"'.$this->variables[$matches[1]].'"')
|
||||
: $matches[1];
|
||||
}
|
||||
|
||||
// Runs a code expression, replacing variable names with their respective values
|
||||
// ignoreUntil: if > 0, it doesn't replace any variables until that string position, but still evaluates the whole expr
|
||||
function ruleExprEvaluate($expr, $ignoreUntil = 0)
|
||||
@ -182,13 +198,14 @@ class Advisor
|
||||
$exprIgnore = substr($expr,0,$ignoreUntil);
|
||||
$expr = substr($expr,$ignoreUntil);
|
||||
}
|
||||
$expr = preg_replace('/fired\s*\(\s*(\'|")(.*)\1\s*\)/Uie','1',$expr); //isset($this->runResult[\'fired\']
|
||||
$expr = preg_replace('/\b(\w+)\b/e','isset($this->variables[\'\1\']) ? (!is_numeric($this->variables[\'\1\']) ? \'"\'.$this->variables[\'\1\'].\'"\' : $this->variables[\'\1\']) : \'\1\'', $expr);
|
||||
$expr = preg_replace_callback('/fired\s*\(\s*(\'|")(.*)\1\s*\)/Ui', array($this, 'ruleExprEvaluate_var1'), $expr);
|
||||
$expr = preg_replace_callback('/\b(\w+)\b/', array($this, 'ruleExprEvaluate_var2'), $expr);
|
||||
if ($ignoreUntil > 0) {
|
||||
$expr = $exprIgnore . $expr;
|
||||
}
|
||||
$value = 0;
|
||||
$err = 0;
|
||||
|
||||
ob_start();
|
||||
eval('$value = '.$expr.';');
|
||||
$err = ob_get_contents();
|
||||
|
||||
@ -111,7 +111,7 @@ rule 'Distribution'
|
||||
|
||||
rule 'MySQL Architecture'
|
||||
system_memory
|
||||
value > 3072*1024 && !preg_match('/64/',version_compile_machine)
|
||||
value > 3072*1024 && !preg_match('/64/',version_compile_machine) && !preg_match('/64/',version_compile_os)
|
||||
MySQL is not compiled as a 64-bit package.
|
||||
Your memory capacity is above 3 GiB (assuming the Server is on localhost), so MySQL might not be able to access all of your memory. You might want to consider installing the 64-bit version of MySQL.
|
||||
Available memory on this host: %s | implode(' ',PMA_formatByteDown(value*1024, 2, 2))
|
||||
|
||||
@ -165,7 +165,7 @@ unset($show_create_table);
|
||||
* Get the list of the fields of the current table
|
||||
*/
|
||||
PMA_DBI_select_db($db);
|
||||
$table_fields = PMA_DBI_get_columns($db, $table);
|
||||
$table_fields = array_values(PMA_DBI_get_columns($db, $table));
|
||||
$rows = array();
|
||||
if (isset($where_clause)) {
|
||||
// when in edit mode load all selected rows from table
|
||||
|
||||
Loading…
Reference in New Issue
Block a user