mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #322 from ajoneil/cmstitle-config-system
MINOR: Use config system for cms title, rather than eval.
This commit is contained in:
commit
38320691e4
@ -397,7 +397,7 @@ class LeftAndMain extends Controller implements PermissionProvider {
|
||||
* Menu title is *not* internationalised.
|
||||
*/
|
||||
static function menu_title_for_class($class) {
|
||||
$title = eval("return $class::\$menu_title;");
|
||||
$title = Config::inst()->get($class, 'menu_title', Config::FIRST_SET);
|
||||
if(!$title) $title = preg_replace('/Admin$/', '', $class);
|
||||
return $title;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user