193b8c351SAndreas Gohr<?php 293b8c351SAndreas Gohr 393b8c351SAndreas Gohrnamespace dokuwiki\Menu\Item; 493b8c351SAndreas Gohr 593b8c351SAndreas Gohrclass MediaManager extends AbstractItem { 693b8c351SAndreas Gohr 7*c2b9771aSAndreas Gohr protected $svg = DOKU_INC . 'lib/images/menu/11-mediamanager_folder-image.svg'; 893b8c351SAndreas Gohr 993b8c351SAndreas Gohr /** @inheritdoc */ 1093b8c351SAndreas Gohr public function __construct() { 1193b8c351SAndreas Gohr parent::__construct(); 1293b8c351SAndreas Gohr 1393b8c351SAndreas Gohr // View image in media manager 1493b8c351SAndreas Gohr global $IMG; 1593b8c351SAndreas Gohr $imgNS = getNS($IMG); 1693b8c351SAndreas Gohr $authNS = auth_quickaclcheck("$imgNS:*"); 1793b8c351SAndreas Gohr if($authNS < AUTH_UPLOAD) { 1893b8c351SAndreas Gohr throw new \RuntimeException("media manager link only with upload permissions"); 1993b8c351SAndreas Gohr } 2093b8c351SAndreas Gohr $this->params = array( 2193b8c351SAndreas Gohr 'ns' => $imgNS, 2293b8c351SAndreas Gohr 'image' => $IMG, 2393b8c351SAndreas Gohr 'do' => 'media' 2493b8c351SAndreas Gohr ); 2593b8c351SAndreas Gohr } 2693b8c351SAndreas Gohr 2793b8c351SAndreas Gohr} 28