From 5c2eed9a193e9341fbfee63d4a973898acdc5ee5 Mon Sep 17 00:00:00 2001 From: lisps Date: Thu, 21 Nov 2013 15:50:52 +0100 Subject: add parameter at($DATE_AT) and mind revisions --- lib/exe/detail.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/exe/detail.php') 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); -- cgit v1.2.3