summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorlisps <stummp@loewen.de>2013-11-21 15:50:52 +0100
committerlisps <stummp@loewen.de>2013-11-21 15:50:52 +0100
commit5c2eed9a193e9341fbfee63d4a973898acdc5ee5 (patch)
treed4c1a321973ed74700c53e32282e459afb2e3986 /lib
parentee33e0c5628d9cab52676a5aa2f55356c563c209 (diff)
downloadrpg-5c2eed9a193e9341fbfee63d4a973898acdc5ee5.tar.gz
rpg-5c2eed9a193e9341fbfee63d4a973898acdc5ee5.tar.bz2
add parameter at($DATE_AT) and mind revisions
Diffstat (limited to 'lib')
-rw-r--r--lib/exe/detail.php5
-rw-r--r--lib/tpl/dokuwiki/detail.php2
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/exe/detail.php b/lib/exe/detail.php
index cd3f362ad..daa55f405 100644
--- a/lib/exe/detail.php
+++ b/lib/exe/detail.php
@@ -5,6 +5,9 @@ require_once(DOKU_INC.'inc/init.php');
$IMG = getID('media');
$ID = cleanID($INPUT->str('id'));
+$REV = & $INPUT->ref('rev');
+//sanitize revision
+$REV = preg_replace('/[^0-9]/', '', $REV);
// this makes some general info available as well as the info about the
// "parent" page
@@ -35,7 +38,7 @@ $ERROR = false;
$AUTH = auth_quickaclcheck($IMG);
if($AUTH >= AUTH_READ){
// check if image exists
- $SRC = mediaFN($IMG);
+ $SRC = mediaFN($IMG,$REV);
if(!@file_exists($SRC)){
//doesn't exist!
http_status(404);
diff --git a/lib/tpl/dokuwiki/detail.php b/lib/tpl/dokuwiki/detail.php
index ec846f6fd..49249612b 100644
--- a/lib/tpl/dokuwiki/detail.php
+++ b/lib/tpl/dokuwiki/detail.php
@@ -49,7 +49,7 @@ header('X-UA-Compatible: IE=edge,chrome=1');
if($ERROR):
echo '<h1>'.$ERROR.'</h1>';
else: ?>
-
+ <?php if($REV) echo p_locale_xhtml('showrev');?>
<h1><?php echo nl2br(hsc(tpl_img_getTag('simple.title'))); ?></h1>
<?php tpl_img(900,700); /* parameters: maximum width, maximum height (and more) */ ?>