1*93b8c351SAndreas Gohr<?php 2*93b8c351SAndreas Gohr 3*93b8c351SAndreas Gohrnamespace dokuwiki\Menu\Item; 4*93b8c351SAndreas Gohr 5*93b8c351SAndreas Gohrclass MediaManager extends AbstractItem { 6*93b8c351SAndreas Gohr 7*93b8c351SAndreas Gohr protected $svg = DOKU_BASE . 'lib/images/menu/11-mediamanager_folder-image.svg'; 8*93b8c351SAndreas Gohr 9*93b8c351SAndreas Gohr /** @inheritdoc */ 10*93b8c351SAndreas Gohr public function __construct() { 11*93b8c351SAndreas Gohr parent::__construct(); 12*93b8c351SAndreas Gohr 13*93b8c351SAndreas Gohr // View image in media manager 14*93b8c351SAndreas Gohr global $IMG; 15*93b8c351SAndreas Gohr $imgNS = getNS($IMG); 16*93b8c351SAndreas Gohr $authNS = auth_quickaclcheck("$imgNS:*"); 17*93b8c351SAndreas Gohr if($authNS < AUTH_UPLOAD) { 18*93b8c351SAndreas Gohr throw new \RuntimeException("media manager link only with upload permissions"); 19*93b8c351SAndreas Gohr } 20*93b8c351SAndreas Gohr $this->params = array( 21*93b8c351SAndreas Gohr 'ns' => $imgNS, 22*93b8c351SAndreas Gohr 'image' => $IMG, 23*93b8c351SAndreas Gohr 'do' => 'media' 24*93b8c351SAndreas Gohr ); 25*93b8c351SAndreas Gohr } 26*93b8c351SAndreas Gohr 27*93b8c351SAndreas Gohr} 28