[ Index ] |
PHP Cross Reference of DokuWiki |
[Summary view] [Print] [Text view]
1 <?php 2 3 use dokuwiki\Extension\Event; 4 5 if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/../../'); 6 define('DOKU_MEDIADETAIL',1); 7 require_once (DOKU_INC.'inc/init.php'); 8 9 $IMG = getID('media'); 10 $ID = cleanID($INPUT->str('id')); 11 $REV = $INPUT->int('rev'); 12 13 // this makes some general info available as well as the info about the 14 // "parent" page 15 $INFO = array_merge(pageinfo(),mediainfo()); 16 17 $tmp = array(); 18 Event::createAndTrigger('DETAIL_STARTED', $tmp); 19 20 //close session 21 session_write_close(); 22 23 $ERROR = false; 24 // check image permissions 25 $AUTH = auth_quickaclcheck($IMG); 26 if($AUTH >= AUTH_READ){ 27 // check if image exists 28 $SRC = mediaFN($IMG,$REV); 29 if(!file_exists($SRC)){ 30 //doesn't exist! 31 http_status(404); 32 $ERROR = 'File not found'; 33 } 34 }else{ 35 // no auth 36 $ERROR = p_locale_xhtml('denied'); 37 } 38 39 //start output and load template 40 header('Content-Type: text/html; charset=utf-8'); 41 include(template('detail.php')); 42
title
Description
Body
title
Description
Body
title
Description
Body
title
Body