Conditions | 2 |
Paths | 2 |
Total Lines | 18 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
13 | public function __construct() { |
||
14 | global $IMG; |
||
15 | parent::__construct(); |
||
16 | |||
17 | $imgNS = getNS($IMG); |
||
18 | $authNS = auth_quickaclcheck("$imgNS:*"); |
||
19 | if($authNS < AUTH_UPLOAD) { |
||
20 | throw new \RuntimeException("media manager link only with upload permissions"); |
||
21 | } |
||
22 | |||
23 | $this->svg = DOKU_INC . 'lib/images/menu/11-mediamanager_folder-image.svg'; |
||
24 | $this->type = 'mediaManager'; |
||
25 | $this->params = array( |
||
26 | 'ns' => $imgNS, |
||
27 | 'image' => $IMG, |
||
28 | 'do' => 'media' |
||
29 | ); |
||
30 | } |
||
31 | |||
33 |