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