Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
c3e15641a0
@ -140,11 +140,18 @@ class Advisor
|
||||
$rule['name'] = $this->translate($rule['name']);
|
||||
$rule['issue'] = $this->translate($rule['issue']);
|
||||
|
||||
// Replaces {server_variable} with 'server_variable' linking to server_variables.php
|
||||
$rule['recommendation'] = preg_replace(
|
||||
'/\{([a-z_0-9]+)\}/Ui',
|
||||
'<a href="server_variables.php' . PMA_generate_common_url() . '#filter=\1">\1</a>',
|
||||
'<a href="server_variables.php?' . PMA_generate_common_url() . '#filter=\1">\1</a>',
|
||||
$this->translate($rule['recommendation']));
|
||||
|
||||
// Replaces external Links with PMA_linkURL() generated links
|
||||
$rule['recommendation'] = preg_replace(
|
||||
'#href=("|\')(https?://[^\1]+)\1#ie',
|
||||
'\'href="\' . PMA_linkURL("\2") . \'"\'',
|
||||
$rule['recommendation']
|
||||
);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
# phpMyAdmin Advisory rules file
|
||||
# Use only UNIX style newlines
|
||||
# This file is being parsed by advisor.class.php, which should handle syntax errors correctly.
|
||||
# This file is being parsed by Advisor.class.php, which should handle syntax errors correctly.
|
||||
# However, PHP Warnings and the like are being consumed by the phpMyAdmin error handler, so those won't show up
|
||||
# E.g.: Justification line is empty because you used an unescape percent sign, sprintf() returns an empty string and no warning/error is shown
|
||||
#
|
||||
@ -422,7 +422,7 @@ rule 'InnoDB buffer pool size' [system_memory > 0]
|
||||
value < 60
|
||||
Your InnoDB buffer pool is fairly small.
|
||||
The InnoDB buffer pool has a profound impact on performance for InnoDB tables. Assign all your remaining memory to this buffer. For database servers that use solely InnoDB as storage engine and have no other services (e.g. a web server) running, you may set this as high as 80% of your available memory. If that is not the case, you need to carefully assess the memory consumption of your other services and non-InnoDB-Tables and set this variable accordingly. If it is set too high, your system will start swapping, which decreases performance significantly. See also <a href="http://www.mysqlperformanceblog.com/2007/11/03/choosing-innodb_buffer_pool_size/">this article</a>
|
||||
You are currently using %s% of your memory for the InnoDB buffer pool. This rule fires if you are assigning less than 60%, however this might be perfectly adequate for your system if you don't have much InnoDB tables or other services running on the same machine.
|
||||
You are currently using %s% of your memory for the InnoDB buffer pool. This rule fires if you are assigning less than 60%, however this might be perfectly adequate for your system if you don't have much InnoDB tables or other services running on the same machine. | value
|
||||
|
||||
#
|
||||
# other
|
||||
|
||||
@ -5,10 +5,10 @@
|
||||
* by gettext for generating po(t) files.
|
||||
*/
|
||||
|
||||
if (!file_exists('./libraries/advisor.class.php')) {
|
||||
if (!file_exists('./libraries/Advisor.class.php')) {
|
||||
chdir('..');
|
||||
}
|
||||
include './libraries/advisor.class.php';
|
||||
include './libraries/Advisor.class.php';
|
||||
|
||||
$rules = Advisor::parseRulesFile();
|
||||
|
||||
|
||||
@ -357,7 +357,7 @@ if (isset($_REQUEST['ajax_request']) && $_REQUEST['ajax_request'] == true) {
|
||||
}
|
||||
|
||||
if(isset($_REQUEST['advisor'])) {
|
||||
include('libraries/advisor.class.php');
|
||||
include('libraries/Advisor.class.php');
|
||||
$advisor = new Advisor();
|
||||
exit(json_encode($advisor->run()));
|
||||
}
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
/*
|
||||
* Include to test.
|
||||
*/
|
||||
require_once 'libraries/advisor.class.php';
|
||||
require_once 'libraries/Advisor.class.php';
|
||||
|
||||
class Advisor_test extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
@ -29,5 +29,12 @@ class Advisor_test extends PHPUnit_Framework_TestCase
|
||||
array('%s% foo', '%s%% foo'),
|
||||
);
|
||||
}
|
||||
|
||||
public function testParse()
|
||||
{
|
||||
$advisor = new Advisor();
|
||||
$parseResult = $this->parseRulesFile();
|
||||
$this->assertEquals($parseResult['errors'], array());
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user