MDL-11552 - Look for the name of an admin report inside the plugin's own lang dir...
authortjhunt <tjhunt>
Tue, 2 Oct 2007 13:30:51 +0000 (13:30 +0000)
committertjhunt <tjhunt>
Tue, 2 Oct 2007 13:30:51 +0000 (13:30 +0000)
admin/settings/top.php

index 315b79afb550aa47905e2acca64fa98fda9f5768..a3b6e15e3486ba8911a241f182244638a3c04b49 100644 (file)
@@ -37,6 +37,10 @@ foreach (get_list_of_plugins('admin/report') as $plugin) {
         continue;
     }
 /// End of removable snippet
+    $reportname = get_string($plugin, 'report_' . $plugin);
+    if ($reportname[1] == '[') {
+        $reportname = get_string($plugin, 'admin');
+    }
     $ADMIN->add('reports', new admin_externalpage('report'.$plugin, get_string($plugin, 'admin'), "$CFG->wwwroot/$CFG->admin/report/$plugin/index.php"));
 }