mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 09:05:53 +00:00
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:
parent
fb6b248501
commit
02d9dd60e7
@ -32,17 +32,16 @@ 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;
|
||||
|
||||
$link = Controller::join_links($urlBase,$urlSegment) . '/';
|
||||
$link = Controller::join_links($urlBase, $urlSegment) . '/';
|
||||
|
||||
// Make director rule
|
||||
if($urlRule[0] == '/') $urlRule = substr($urlRule,1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user