You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

33 lines
786 B

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