Hide frontend box edit icon for menu boxes
authorMatthias Schmidt <gravatronics@live.com>
Sun, 28 Apr 2019 11:59:10 +0000 (13:59 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Sun, 28 Apr 2019 11:59:10 +0000 (13:59 +0200)
Menu boxes cannot be edited

See #2575

wcfsetup/install/files/lib/data/box/Box.class.php

index e0c397d0ec849321d1ff4342aa1fcbc40d9b5921..f2e45865f4199665ef738992a0ea532e930f20cf 100644 (file)
@@ -524,7 +524,11 @@ class Box extends DatabaseObject {
         * @since       5.2
         */
        public function showEditButton() {
-               if (WCF::getSession()->getPermission('admin.content.cms.canManageBox') && in_array($this->position, $this->editButtonPositions)) {
+               if (
+                       WCF::getSession()->getPermission('admin.content.cms.canManageBox')
+                       && $this->boxType !== 'menu'
+                       && in_array($this->position, $this->editButtonPositions)
+               ) {
                        return true;
                }