MINOR: Use config system for cms title, rather than eval.

This commit is contained in:
Andrew O'Neil 2012-04-16 11:04:55 +12:00
parent 1334711ba3
commit 3b9f99394b

View File

@ -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;
} }