From 4c0e52f0d67aab47279ca6347f0cad94055350c4 Mon Sep 17 00:00:00 2001 From: mudrd8mz Date: Mon, 6 Apr 2009 13:06:04 +0000 Subject: [PATCH] MDL-18797 string_manager::instance()->get_registered_plugin_types() does not return "__exceptions" as places_to_search_for_lang_strings() used to do. --- admin/lang.php | 52 +++++++++++++++++++++++--------------------------- 1 file changed, 24 insertions(+), 28 deletions(-) diff --git a/admin/lang.php b/admin/lang.php index eac9c15c14..1a5c68a32b 100644 --- a/admin/lang.php +++ b/admin/lang.php @@ -1188,20 +1188,18 @@ function lang_extra_locations() { $files = array(); $places = string_manager::instance()->get_registered_plugin_types(); foreach ($places as $prefix => $directories) { - if ($prefix != '__exceptions') { - foreach ($directories as $directory) { - foreach (get_list_of_plugins($directory) as $plugin) { - $enlangdirlocation = $CFG->dirroot.'/'.$directory.'/'.$plugin.'/lang/en_utf8'; - foreach (get_directory_list($enlangdirlocation, '', false) as $file) { - if ((substr($file, -4) == ".php") && ($file != "langconfig.php")) { - $fullpath = $enlangdirlocation.'/'.$file; - $files[$fullpath] = array( - 'filename' => $file, - 'location' => $directory, - 'plugin' => $plugin, - 'prefix' => $prefix, - ); - } + foreach ($directories as $directory) { + foreach (get_list_of_plugins($directory) as $plugin) { + $enlangdirlocation = $CFG->dirroot.'/'.$directory.'/'.$plugin.'/lang/en_utf8'; + foreach (get_directory_list($enlangdirlocation, '', false) as $file) { + if ((substr($file, -4) == ".php") && ($file != "langconfig.php")) { + $fullpath = $enlangdirlocation.'/'.$file; + $files[$fullpath] = array( + 'filename' => $file, + 'location' => $directory, + 'plugin' => $plugin, + 'prefix' => $prefix, + ); } } } @@ -1290,20 +1288,18 @@ function lang_help_extra_locations() { $files = array(); $places = string_manager::instance()->get_registered_plugin_types(); foreach ($places as $prefix => $directories) { - if ($prefix != '__exceptions') { - foreach ($directories as $directory) { - foreach (get_list_of_plugins($directory) as $plugin) { - $enlangdirlocation = $CFG->dirroot.'/'.$directory.'/'.$plugin.'/lang/en_utf8/help'; - foreach (get_directory_list($enlangdirlocation, 'CVS') as $file) { - if ((substr($file, -5) == '.html') || (substr($file, -4) == '.txt' )) { - $fullpath = $enlangdirlocation.'/'.$file; - $files[$fullpath] = array( - 'filename' => $file, - 'location' => $directory, - 'plugin' => $plugin, - 'prefix' => $prefix, - ); - } + foreach ($directories as $directory) { + foreach (get_list_of_plugins($directory) as $plugin) { + $enlangdirlocation = $CFG->dirroot.'/'.$directory.'/'.$plugin.'/lang/en_utf8/help'; + foreach (get_directory_list($enlangdirlocation, 'CVS') as $file) { + if ((substr($file, -5) == '.html') || (substr($file, -4) == '.txt' )) { + $fullpath = $enlangdirlocation.'/'.$file; + $files[$fullpath] = array( + 'filename' => $file, + 'location' => $directory, + 'plugin' => $plugin, + 'prefix' => $prefix, + ); } } } -- 2.39.5