Skip to content

Commit

Permalink
MINOR: Use config system for cms title, rather than eval.
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewandante committed Apr 15, 2012
1 parent 1334711 commit 3b9f993
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion admin/code/LeftAndMain.php
Expand Up @@ -397,7 +397,7 @@ public function Link($action = null) {
* 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;
}
Expand Down

0 comments on commit 3b9f993

Please sign in to comment.