Merge pull request #283 from UndefinedOffset/3.0

ENHANCEMENT: Hide SilverStripeNavigator_CMSLink when in a LeftAndMain extension not just CMSMain extensions
This commit is contained in:
Ingo Schommer 2013-02-02 03:34:38 -08:00
commit 4269f94126

View File

@ -196,12 +196,12 @@ class SilverStripeNavigatorItem_CMSLink extends SilverStripeNavigatorItem {
}
public function isActive() {
return (Controller::curr() instanceof CMSMain);
return (Controller::curr() instanceof LeftAndMain);
}
public function canView($member = null) {
// Don't show in CMS
return !(Controller::curr() instanceof CMSMain);
return !(Controller::curr() instanceof LeftAndMain);
}
}