MDL-50066 strings: unable to deprecate string from moodle.php

This commit is contained in:
Marina Glancy
2015-04-30 16:15:24 +08:00
parent 9fb9aa7215
commit ed402015bb
2 changed files with 6 additions and 3 deletions
+2 -1
View File
@@ -101,7 +101,8 @@ class core_string_manager_standard_testcase extends advanced_testcase {
$this->fail('String "'.$string.'" appearing in one of the lang/en/deprecated.txt files does not have correct syntax');
}
list($pluginttype, $pluginname) = core_component::normalize_component($matches[2]);
if ($matches[2] !== $pluginttype . '_' . $pluginname) {
$normcomponent = $pluginname ? ($pluginttype . '_' . $pluginname) : $pluginttype;
if ($matches[2] !== $normcomponent) {
$this->fail('String "'.$string.'" appearing in one of the lang/en/deprecated.txt files does not have normalised component name');
}
if (!$stringman->string_exists($matches[1], $matches[2])) {