summaryrefslogtreecommitdiff
path: root/lib/exe
diff options
context:
space:
mode:
authorMichael Hamann <michael@content-space.de>2010-10-10 14:26:22 +0200
committerMichael Hamann <michael@content-space.de>2010-10-10 14:26:22 +0200
commit762b4c44c691f69d521413d7016314e7f547c102 (patch)
tree95ab294b1df2f8c7a5efb56762a0f284bec3754e /lib/exe
parenteae17177de8f3f3580af5ea66d126aee0f23227f (diff)
parent4ea48b361401e136dbfd3339af368ceeb5b27480 (diff)
downloadrpg-762b4c44c691f69d521413d7016314e7f547c102.tar.gz
rpg-762b4c44c691f69d521413d7016314e7f547c102.tar.bz2
Merge remote branch 'origin/master' into sitemap
Diffstat (limited to 'lib/exe')
-rw-r--r--lib/exe/detail.php79
1 files changed, 38 insertions, 41 deletions
diff --git a/lib/exe/detail.php b/lib/exe/detail.php
index 3a04b7b09..35186f5dd 100644
--- a/lib/exe/detail.php
+++ b/lib/exe/detail.php
@@ -1,51 +1,48 @@
<?php
- if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/../../');
- define('DOKU_MEDIADETAIL',1);
- require_once(DOKU_INC.'inc/init.php');
- //close session
- session_write_close();
-
- $IMG = getID('media');
- $ID = cleanID($_REQUEST['id']);
-
- if($conf['allowdebug'] && $_REQUEST['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){
+if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/../../');
+define('DOKU_MEDIADETAIL',1);
+require_once(DOKU_INC.'inc/init.php');
+//close session
+session_write_close();
+
+$IMG = getID('media');
+$ID = cleanID($_REQUEST['id']);
+
+if($conf['allowdebug'] && $_REQUEST['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);
if(!@file_exists($SRC)){
- //doesn't exist!
-
+ //doesn't exist!
+ header("HTTP/1.0 404 File not Found");
+ $ERROR = 'File not found';
}
- }else{
+}else{
// no auth
$ERROR = p_locale_xhtml('denied');
- }
-
- /*if(!$ERROR){
- // load EXIF/IPTC/image details
- $INFO = array();
- $INFO['std']['']
- imagesize
- }*/
+}
+// this makes some general infos available as well as the info about the
+// "parent" page
+$INFO = pageinfo();
- //start output and load template
- header('Content-Type: text/html; charset=utf-8');
- include(template('detail.php'));
+//start output and load template
+header('Content-Type: text/html; charset=utf-8');
+include(template('detail.php'));