From 8c51da59a9481debdfd66270530c691b0411cf9c Mon Sep 17 00:00:00 2001
From: Andreas Gohr <andi@splitbrain.org>
Date: Fri, 19 May 2017 20:01:50 +0200
Subject: [PATCH] remove unused $category property

---
 inc/Menu/Item/AbstractItem.php | 1 -
 inc/Menu/Item/Admin.php        | 2 --
 inc/Menu/Item/Index.php        | 1 -
 inc/Menu/Item/Login.php        | 1 -
 inc/Menu/Item/Media.php        | 1 -
 inc/Menu/Item/MediaManager.php | 2 +-
 inc/Menu/Item/Recent.php       | 1 -
 inc/Menu/Item/Register.php     | 2 --
 inc/Menu/Item/Resendpwd.php    | 2 --
 9 files changed, 1 insertion(+), 12 deletions(-)

diff --git a/inc/Menu/Item/AbstractItem.php b/inc/Menu/Item/AbstractItem.php
index 9af475448..1893a3796 100644
--- a/inc/Menu/Item/AbstractItem.php
+++ b/inc/Menu/Item/AbstractItem.php
@@ -33,7 +33,6 @@ abstract class AbstractItem {
     protected $params      = array();
     protected $nofollow    = true;
     protected $replacement = '';
-    protected $category    = 'page';
     protected $svg         = DOKU_INC . 'lib/images/menu/00-default_checkbox-blank-circle-outline.svg';
     protected $label       = '';
     protected $context     = self::CTX_ALL;
diff --git a/inc/Menu/Item/Admin.php b/inc/Menu/Item/Admin.php
index 59d1ad030..a5c4c0c0e 100644
--- a/inc/Menu/Item/Admin.php
+++ b/inc/Menu/Item/Admin.php
@@ -11,8 +11,6 @@ class Admin extends AbstractItem {
         global $INFO;
         parent::__construct();
 
-        $this->category = 'user';
-
         if(!$INFO['ismanager']) {
             throw new \RuntimeException("admin is for managers only");
         }
diff --git a/inc/Menu/Item/Index.php b/inc/Menu/Item/Index.php
index 55244984c..f762c18ae 100644
--- a/inc/Menu/Item/Index.php
+++ b/inc/Menu/Item/Index.php
@@ -10,7 +10,6 @@ class Index extends AbstractItem {
     public function __construct() {
         parent::__construct();
 
-        $this->category = 'site';
         $this->accesskey = 'x';
 
         // allow searchbots to get to the sitemap from the homepage (when dokuwiki isn't providing a sitemap.xml)
diff --git a/inc/Menu/Item/Login.php b/inc/Menu/Item/Login.php
index 710f5accc..758473052 100644
--- a/inc/Menu/Item/Login.php
+++ b/inc/Menu/Item/Login.php
@@ -11,7 +11,6 @@ class Login extends AbstractItem {
         global $INPUT;
         parent::__construct();
 
-        $this->category = 'user';
         $this->params['sectok'] = getSecurityToken();
         if($INPUT->server->has('REMOTE_USER')) {
             if(!actionOK('logout')) {
diff --git a/inc/Menu/Item/Media.php b/inc/Menu/Item/Media.php
index e0cd04d25..b06334807 100644
--- a/inc/Menu/Item/Media.php
+++ b/inc/Menu/Item/Media.php
@@ -11,7 +11,6 @@ class Media extends AbstractItem {
         global $ID;
         parent::__construct();
 
-        $this->category = 'site';
         $params['ns'] = getNS($ID);
     }
 
diff --git a/inc/Menu/Item/MediaManager.php b/inc/Menu/Item/MediaManager.php
index eef9ec581..49abb5426 100644
--- a/inc/Menu/Item/MediaManager.php
+++ b/inc/Menu/Item/MediaManager.php
@@ -8,10 +8,10 @@ class MediaManager extends AbstractItem {
 
     /** @inheritdoc */
     public function __construct() {
+        global $IMG;
         parent::__construct();
 
         // View image in media manager
-        global $IMG;
         $imgNS = getNS($IMG);
         $authNS = auth_quickaclcheck("$imgNS:*");
         if($authNS < AUTH_UPLOAD) {
diff --git a/inc/Menu/Item/Recent.php b/inc/Menu/Item/Recent.php
index 8d924d1ef..e08d63530 100644
--- a/inc/Menu/Item/Recent.php
+++ b/inc/Menu/Item/Recent.php
@@ -8,7 +8,6 @@ class Recent extends AbstractItem {
     public function __construct() {
         parent::__construct();
 
-        $this->category = 'site';
         $this->accesskey = 'r';
         $this->svg = DOKU_INC . 'lib/images/menu/calendar-clock.svg';
     }
diff --git a/inc/Menu/Item/Register.php b/inc/Menu/Item/Register.php
index 7fb76e8d5..6f58c7ba6 100644
--- a/inc/Menu/Item/Register.php
+++ b/inc/Menu/Item/Register.php
@@ -9,8 +9,6 @@ class Register extends AbstractItem {
         global $INPUT;
         parent::__construct();
 
-        $this->category = 'user';
-
         if($INPUT->server->str('REMOTE_USER')) {
             throw new \RuntimeException("no register when already logged in");
         }
diff --git a/inc/Menu/Item/Resendpwd.php b/inc/Menu/Item/Resendpwd.php
index 080052483..6bc0c1016 100644
--- a/inc/Menu/Item/Resendpwd.php
+++ b/inc/Menu/Item/Resendpwd.php
@@ -9,8 +9,6 @@ class Resendpwd extends AbstractItem {
         global $INPUT;
         parent::__construct();
 
-        $this->category = 'user';
-
         if($INPUT->server->str('REMOTE_USER')) {
             throw new \RuntimeException("no resendpwd when already logged in");
         }
-- 
GitLab