Merge pull request #322 from ajoneil/cmstitle-config-system

MINOR: Use config system for cms title, rather than eval.
This commit is contained in:
Sean Harvey 2012-04-15 16:14:29 -07:00
commit 38320691e4

View File

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