mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
MINOR: Use config system for cms title, rather than eval.
This commit is contained in:
parent
1334711ba3
commit
3b9f99394b
@ -397,7 +397,7 @@ class LeftAndMain extends Controller implements PermissionProvider {
|
|||||||
* Menu title is *not* internationalised.
|
* Menu title is *not* internationalised.
|
||||||
*/
|
*/
|
||||||
static function menu_title_for_class($class) {
|
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);
|
if(!$title) $title = preg_replace('/Admin$/', '', $class);
|
||||||
return $title;
|
return $title;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user