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.
 
 
 
 
 

29 lines
731 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. {
  10. /** @inheritdoc */
  11. public function __construct()
  12. {
  13. global $IMG;
  14. parent::__construct();
  15. $imgNS = getNS($IMG);
  16. $authNS = auth_quickaclcheck("$imgNS:*");
  17. if ($authNS < AUTH_UPLOAD) {
  18. throw new \RuntimeException("media manager link only with upload permissions");
  19. }
  20. $this->svg = DOKU_INC . 'lib/images/menu/11-mediamanager_folder-image.svg';
  21. $this->type = 'mediaManager';
  22. $this->params = ['ns' => $imgNS, 'image' => $IMG, 'do' => 'media'];
  23. }
  24. }