MINOR ajshort: Updated CMSMenu to use Object::get_static() to get configuration information.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@79361 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2009-06-16 10:40:39 +00:00
parent fb6b248501
commit 02d9dd60e7

View File

@ -32,12 +32,11 @@ class CMSMenu extends Object implements Iterator, i18nEntityProvider
* when the item is removed. Functionality needed in {@link Director}.
*/
public static function add_controller($controllerClass) {
// Get static bits
$urlBase = eval("return $controllerClass::\$url_base;");
$urlSegment = eval("return $controllerClass::\$url_segment;");
$urlRule = eval("return $controllerClass::\$url_rule;");
$urlPriority = eval("return $controllerClass::\$url_priority;");
$menuPriority = eval("return $controllerClass::\$menu_priority;");
$urlBase = Object::get_static($controllerClass, 'url_base');
$urlSegment = Object::get_static($controllerClass, 'url_segment');
$urlRule = Object::get_static($controllerClass, 'url_rule');
$urlPriority = Object::get_static($controllerClass, 'url_priority');
$menuPriority = Object::get_static($controllerClass, 'menu_priority');
// Don't add menu items defined the old way
if($urlSegment === null) return;