Merge remote-tracking branch 'origin/QA_4_1' into QA_4_1

This commit is contained in:
Weblate 2014-04-02 09:15:23 +02:00
commit ff9cd22a0a
3 changed files with 22 additions and 3 deletions

View File

@ -6,6 +6,7 @@ phpMyAdmin - ChangeLog
- bug #4336 List server css style wrong
- bug #4345 Privileges editor shows databases with underscore backslash-escaped
- bug Missing value on the Status > Server page
- bug #4347 Fixed PHP Parse error in Advisor
4.1.12.0 (2014-03-27)
- bug #4334 Add event : datepicker won't open

View File

@ -176,9 +176,11 @@ class Advisor
{
$string = _gettext(Advisor::escapePercent($str));
if ( ! is_null($param)) {
$param = $this->ruleExprEvaluate($param);
$params = $this->ruleExprEvaluate('array('. $param . ')');
} else {
$params = array();
}
return sprintf($string, $param);
return vsprintf($string, $params);
}
/**

View File

@ -210,6 +210,22 @@ class Advisor_Test extends PHPUnit_Framework_TestCase
),
null,
),
array(
array(
'justification' => '%s% %d foo | value, value',
'name' => 'Double',
'issue' => 'issue',
'recommendation' => 'Recommend'
),
array(
'justification' => '0% 0 foo',
'id' => 'Double',
'name' => 'Double',
'issue' => 'issue',
'recommendation' => 'Recommend'
),
null,
),
array(
array(
'justification' => '"\'foo',
@ -236,7 +252,7 @@ class Advisor_Test extends PHPUnit_Framework_TestCase
array(),
'Failed formatting string for rule \'Failure\'. PHP threw ' .
'following error: Use of undefined constant fsafdsa - ' .
'assumed \'fsafdsa\'<br />Executed code: $value = fsafdsa;',
'assumed \'fsafdsa\'<br />Executed code: $value = array(fsafdsa);',
),
array(
array(