193b8c351SAndreas Gohr<?php 293b8c351SAndreas Gohr 393b8c351SAndreas Gohrnamespace dokuwiki\Menu\Item; 493b8c351SAndreas Gohr 5368ce258SAndreas Gohr/** 6368ce258SAndreas Gohr * Class MediaManager 7368ce258SAndreas Gohr * 8368ce258SAndreas Gohr * Opens the current image in the media manager. Used on image detail view. 9368ce258SAndreas Gohr */ 10*33b91513SAndreas Gohrclass MediaManager extends AbstractItem 11*33b91513SAndreas Gohr{ 1293b8c351SAndreas Gohr 1393b8c351SAndreas Gohr /** @inheritdoc */ 14*33b91513SAndreas Gohr public function __construct() 15*33b91513SAndreas Gohr { 168c51da59SAndreas Gohr global $IMG; 1793b8c351SAndreas Gohr parent::__construct(); 1893b8c351SAndreas Gohr 1993b8c351SAndreas Gohr $imgNS = getNS($IMG); 2093b8c351SAndreas Gohr $authNS = auth_quickaclcheck("$imgNS:*"); 2193b8c351SAndreas Gohr if ($authNS < AUTH_UPLOAD) { 2293b8c351SAndreas Gohr throw new \RuntimeException("media manager link only with upload permissions"); 2393b8c351SAndreas Gohr } 244bb2fc4aSAndreas Gohr 254bb2fc4aSAndreas Gohr $this->svg = DOKU_INC . 'lib/images/menu/11-mediamanager_folder-image.svg'; 264887c154SAndreas Gohr $this->type = 'mediaManager'; 27*33b91513SAndreas Gohr $this->params = ['ns' => $imgNS, 'image' => $IMG, 'do' => 'media']; 2893b8c351SAndreas Gohr } 2993b8c351SAndreas Gohr 3093b8c351SAndreas Gohr} 31