lang editing: MDL-18776 fix regression from MDL-18669.
This commit is contained in:
+2
-2
@@ -1186,7 +1186,7 @@ function lang_standard_locations() {
|
||||
function lang_extra_locations() {
|
||||
global $CFG;
|
||||
$files = array();
|
||||
$places = places_to_search_for_lang_strings();
|
||||
$places = string_manager::instance()->get_registered_plugin_types();
|
||||
foreach ($places as $prefix => $directories) {
|
||||
if ($prefix != '__exceptions') {
|
||||
foreach ($directories as $directory) {
|
||||
@@ -1288,7 +1288,7 @@ function lang_help_standard_locations() {
|
||||
function lang_help_extra_locations() {
|
||||
global $CFG;
|
||||
$files = array();
|
||||
$places = places_to_search_for_lang_strings();
|
||||
$places = string_manager::instance()->get_registered_plugin_types();
|
||||
foreach ($places as $prefix => $directories) {
|
||||
if ($prefix != '__exceptions') {
|
||||
foreach ($directories as $directory) {
|
||||
|
||||
+13
-2
@@ -5319,6 +5319,17 @@ class string_manager {
|
||||
$SESSION->extralangsearchlocations[$plugintype] = $path;
|
||||
}
|
||||
|
||||
/**
|
||||
* This returns an array of all the types of plugin that may have language
|
||||
* strings.
|
||||
* The array keys are the lang file prefix, like qtype_, and the value is
|
||||
* an array of paths relative to $CFG->dirroot.
|
||||
* @return array as described above.
|
||||
*/
|
||||
public function get_registered_plugin_types() {
|
||||
return fullclone($this->searchplacesbyplugintype);
|
||||
}
|
||||
|
||||
protected function fix_deprecated_module_name($module) {
|
||||
debugging('The module name you passed to get_string is the deprecated format ' .
|
||||
'like mod/mymod or block/myblock. The correct form looks like mymod, or block_myblock.' , DEBUG_DEVELOPER);
|
||||
@@ -5382,8 +5393,8 @@ class string_manager {
|
||||
|
||||
protected function add_extra_locations($locations, $extralocations) {
|
||||
// This is an old, deprecated mechanism that predates the
|
||||
// places_to_search_for_lang_strings mechanism that comes later in
|
||||
// this function. So tell people who use it to change.
|
||||
// current mechanism that lets plugins include their lang strings in the
|
||||
// plugin folder. So tell people who use it to change.
|
||||
debugging('The fourth, $extralocations parameter to get_string is deprecated. ' .
|
||||
'See http://docs.moodle.org/en/Development:Places_to_search_for_lang_strings ' .
|
||||
'for a better way to package language strings with your plugin.', DEBUG_DEVELOPER);
|
||||
|
||||
Reference in New Issue
Block a user