diff --git a/inc/Menu/Item/Admin.php b/inc/Menu/Item/Admin.php index 197f2c6daaefbdd195faa5cd07953972fbd141f2..7302f0f34fd42eabc96f886668d8efb691c8a0a1 100644 --- a/inc/Menu/Item/Admin.php +++ b/inc/Menu/Item/Admin.php @@ -9,13 +9,13 @@ namespace dokuwiki\Menu\Item; */ class Admin extends AbstractItem { - protected $svg = DOKU_INC . 'lib/images/menu/settings.svg'; - /** @inheritdoc */ public function __construct() { global $INFO; parent::__construct(); + $this->svg = DOKU_INC . 'lib/images/menu/settings.svg'; + if(!$INFO['ismanager']) { throw new \RuntimeException("admin is for managers only"); } diff --git a/inc/Menu/Item/Backlink.php b/inc/Menu/Item/Backlink.php index 996bcb20badb003c0c9b68392e6298203e731b75..6dc242bdd76a480ea87f7b1c43d7f25c53e3dee8 100644 --- a/inc/Menu/Item/Backlink.php +++ b/inc/Menu/Item/Backlink.php @@ -9,6 +9,10 @@ namespace dokuwiki\Menu\Item; */ class Backlink extends AbstractItem { - protected $svg = DOKU_INC . 'lib/images/menu/08-backlink_link-variant.svg'; + /** @inheritdoc */ + public function __construct() { + parent::__construct(); + $this->svg = DOKU_INC . 'lib/images/menu/08-backlink_link-variant.svg'; + } } diff --git a/inc/Menu/Item/Index.php b/inc/Menu/Item/Index.php index 5ae35b23f208886fcf83ad84d3d0cfb329e42e31..41326738b5ed0909070dca95338d1726873b825d 100644 --- a/inc/Menu/Item/Index.php +++ b/inc/Menu/Item/Index.php @@ -9,8 +9,6 @@ namespace dokuwiki\Menu\Item; */ class Index extends AbstractItem { - protected $svg = DOKU_INC . 'lib/images/menu/file-tree.svg'; - /** @inheritdoc */ public function __construct() { global $conf; @@ -18,6 +16,7 @@ class Index extends AbstractItem { parent::__construct(); $this->accesskey = 'x'; + $this->svg = DOKU_INC . 'lib/images/menu/file-tree.svg'; // allow searchbots to get to the sitemap from the homepage (when dokuwiki isn't providing a sitemap.xml) if($conf['start'] == $ID && !$conf['sitemap']) { diff --git a/inc/Menu/Item/Login.php b/inc/Menu/Item/Login.php index d2b3ccd47fd1efee983191fad7c664bda8805101..671f6a78a3cb4441f13d37f75baf4e9ccaeb3974 100644 --- a/inc/Menu/Item/Login.php +++ b/inc/Menu/Item/Login.php @@ -9,13 +9,12 @@ namespace dokuwiki\Menu\Item; */ class Login extends AbstractItem { - protected $svg = DOKU_INC . 'lib/images/menu/login.svg'; - /** @inheritdoc */ public function __construct() { global $INPUT; parent::__construct(); + $this->svg = DOKU_INC . 'lib/images/menu/login.svg'; $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 b2d7667a34fc333cbff4ceda140c1c4ce3005446..0e5f47bae4bdce00a71f11375bcabb355cac5979 100644 --- a/inc/Menu/Item/Media.php +++ b/inc/Menu/Item/Media.php @@ -9,14 +9,13 @@ namespace dokuwiki\Menu\Item; */ class Media extends AbstractItem { - protected $svg = DOKU_INC . 'lib/images/menu/folder-multiple-image.svg'; - /** @inheritdoc */ public function __construct() { global $ID; parent::__construct(); - $params['ns'] = getNS($ID); + $this->svg = DOKU_INC . 'lib/images/menu/folder-multiple-image.svg'; + $this->params['ns'] = getNS($ID); } } diff --git a/inc/Menu/Item/MediaManager.php b/inc/Menu/Item/MediaManager.php index 146b56f7ca07e8ad8f77082f845adb0aecb06224..b8964435127948b37b4b86de1ed703d7fc69bf41 100644 --- a/inc/Menu/Item/MediaManager.php +++ b/inc/Menu/Item/MediaManager.php @@ -9,8 +9,6 @@ namespace dokuwiki\Menu\Item; */ class MediaManager extends AbstractItem { - protected $svg = DOKU_INC . 'lib/images/menu/11-mediamanager_folder-image.svg'; - /** @inheritdoc */ public function __construct() { global $IMG; @@ -21,6 +19,8 @@ class MediaManager extends AbstractItem { if($authNS < AUTH_UPLOAD) { throw new \RuntimeException("media manager link only with upload permissions"); } + + $this->svg = DOKU_INC . 'lib/images/menu/11-mediamanager_folder-image.svg'; $this->params = array( 'ns' => $imgNS, 'image' => $IMG, diff --git a/inc/Menu/Item/Profile.php b/inc/Menu/Item/Profile.php index 237d10a2e534a0013ffe5443c2911fcc65272b92..2b4ceeb77187223b129d239c12a6b9e2c1651190 100644 --- a/inc/Menu/Item/Profile.php +++ b/inc/Menu/Item/Profile.php @@ -9,8 +9,6 @@ namespace dokuwiki\Menu\Item; */ class Profile extends AbstractItem { - protected $svg = DOKU_INC . 'lib/images/menu/account-card-details.svg'; - /** @inheritdoc */ public function __construct() { global $INPUT; @@ -19,6 +17,8 @@ class Profile extends AbstractItem { if(!$INPUT->server->str('REMOTE_USER')) { throw new \RuntimeException("profile is only for logged in users"); } + + $this->svg = DOKU_INC . 'lib/images/menu/account-card-details.svg'; } } diff --git a/inc/Menu/Item/Revisions.php b/inc/Menu/Item/Revisions.php index 648b4a8a3e6e20e6f73aef95d0755f9c9e4fe909..3009a7924e35c7699379b26666f69c2d1d431e64 100644 --- a/inc/Menu/Item/Revisions.php +++ b/inc/Menu/Item/Revisions.php @@ -13,6 +13,7 @@ class Revisions extends AbstractItem { public function __construct() { parent::__construct(); + $this->accesskey = 'o'; $this->type = 'revs'; $this->svg = DOKU_INC . 'lib/images/menu/07-revisions_history.svg'; } diff --git a/inc/Menu/Item/Subscribe.php b/inc/Menu/Item/Subscribe.php index 617bacca973c9a55ad68458eb093a4c833e9a0d5..1c9d335f8c428c1cd41110effecd45a09ed5430a 100644 --- a/inc/Menu/Item/Subscribe.php +++ b/inc/Menu/Item/Subscribe.php @@ -9,8 +9,6 @@ namespace dokuwiki\Menu\Item; */ class Subscribe extends AbstractItem { - protected $svg = DOKU_INC . 'lib/images/menu/09-subscribe_email-outline.svg'; - /** @inheritdoc */ public function __construct() { global $INPUT; @@ -19,6 +17,8 @@ class Subscribe extends AbstractItem { if(!$INPUT->server->str('REMOTE_USER')) { throw new \RuntimeException("subscribe is only for logged in users"); } + + $this->svg = DOKU_INC . 'lib/images/menu/09-subscribe_email-outline.svg'; } } diff --git a/inc/Menu/Item/Top.php b/inc/Menu/Item/Top.php index 78181d0d59a235009379e5dbc4eb61ca8675307e..a7e4cb24baba098d1a2aee538727aa17c7484921 100644 --- a/inc/Menu/Item/Top.php +++ b/inc/Menu/Item/Top.php @@ -10,10 +10,15 @@ namespace dokuwiki\Menu\Item; */ class Top extends AbstractItem { - protected $svg = DOKU_INC . 'lib/images/menu/10-top_arrow-up.svg'; - protected $accesskey = 't'; - protected $params = array('do' => ''); - protected $id = '#dokuwiki__top'; - protected $context = self::CTX_DESKTOP; + /** @inheritdoc */ + public function __construct() { + parent::__construct(); + + $this->svg = DOKU_INC . 'lib/images/menu/10-top_arrow-up.svg'; + $this->accesskey = 't'; + $this->params = array('do' => ''); + $this->id = '#dokuwiki__top'; + $this->context = self::CTX_DESKTOP; + } }