summaryrefslogtreecommitdiff
path: root/lib/exe/detail.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2010-10-02 20:06:23 +0200
committerAndreas Gohr <andi@splitbrain.org>2010-10-02 20:13:16 +0200
commitfb52c6661375e2bc8011b764c06fc9fd67617c55 (patch)
tree8dfefb5f24c600f7344c17164b0a326f6a53f076 /lib/exe/detail.php
parent658296ab9f537037176727350f34a0ec3f2f9bc6 (diff)
downloadrpg-fb52c6661375e2bc8011b764c06fc9fd67617c55.tar.gz
rpg-fb52c6661375e2bc8011b764c06fc9fd67617c55.tar.bz2
coding style cleanup in lib/exe/detail.php
Diffstat (limited to 'lib/exe/detail.php')
-rw-r--r--lib/exe/detail.php74
1 files changed, 33 insertions, 41 deletions
diff --git a/lib/exe/detail.php b/lib/exe/detail.php
index 3a04b7b09..eaa106978 100644
--- a/lib/exe/detail.php
+++ b/lib/exe/detail.php
@@ -1,51 +1,43 @@
<?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!
}
- }else{
+}else{
// no auth
$ERROR = p_locale_xhtml('denied');
- }
-
- /*if(!$ERROR){
- // load EXIF/IPTC/image details
- $INFO = array();
- $INFO['std']['']
- imagesize
- }*/
-
+}
- //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'));