aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/lib/exe/detail.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/exe/detail.php')
-rw-r--r--lib/exe/detail.php21
1 files changed, 5 insertions, 16 deletions
diff --git a/lib/exe/detail.php b/lib/exe/detail.php
index ec1a9b874..a6cffa770 100644
--- a/lib/exe/detail.php
+++ b/lib/exe/detail.php
@@ -1,4 +1,7 @@
<?php
+
+use dokuwiki\Extension\Event;
+
if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/../../');
define('DOKU_MEDIADETAIL',1);
require_once(DOKU_INC.'inc/init.php');
@@ -12,31 +15,17 @@ $REV = $INPUT->int('rev');
$INFO = array_merge(pageinfo(),mediainfo());
$tmp = array();
-trigger_event('DETAIL_STARTED', $tmp);
+Event::createAndTrigger('DETAIL_STARTED', $tmp);
//close session
session_write_close();
-if($conf['allowdebug'] && $INPUT->has('debug')){
- print '<pre>';
- foreach(explode(' ','basedir userewrite baseurl useslash') as $x){
- print '$'."conf['$x'] = '".$conf[$x]."';\n";
- }
- foreach(explode(' ','DOCUMENT_ROOT HTTP_HOST SCRIPT_FILENAME PHP_SELF '.
- 'REQUEST_URI SCRIPT_NAME PATH_INFO PATH_TRANSLATED') as $x){
- print '$'."_SERVER['$x'] = '".$_SERVER[$x]."';\n";
- }
- print "getID('media'): ".getID('media')."\n";
- print "getID('media',false): ".getID('media',false)."\n";
- print '</pre>';
-}
-
$ERROR = false;
// check image permissions
$AUTH = auth_quickaclcheck($IMG);
if($AUTH >= AUTH_READ){
// check if image exists
- $SRC = mediaFN($IMG,$REV);
+ $SRC = mediaFN($IMG,$REV);
if(!file_exists($SRC)){
//doesn't exist!
http_status(404);