summaryrefslogtreecommitdiff
path: root/lib/exe
diff options
context:
space:
mode:
authorKlap-in <klapinklapin@gmail.com>2013-07-21 23:10:32 +0200
committerKlap-in <klapinklapin@gmail.com>2013-07-21 23:10:32 +0200
commitb1ffadaa6963bbf83e61917c31e04c04c421ce9e (patch)
treef9a1391d2ee6536473b1672e249c1b11a67a5b0e /lib/exe
parentfa3ed26bfbafa4d05ec77a799259d4a46baadd9a (diff)
parentfbd8067eeeb9f424981aad8b283e17f734c738c3 (diff)
downloadrpg-b1ffadaa6963bbf83e61917c31e04c04c421ce9e.tar.gz
rpg-b1ffadaa6963bbf83e61917c31e04c04c421ce9e.tar.bz2
Merge remote-tracking branch 'origin/master' into fetchimagetokexternal
Diffstat (limited to 'lib/exe')
-rw-r--r--lib/exe/detail.php15
-rw-r--r--lib/exe/mediamanager.php16
2 files changed, 17 insertions, 14 deletions
diff --git a/lib/exe/detail.php b/lib/exe/detail.php
index db635c016..7008b126f 100644
--- a/lib/exe/detail.php
+++ b/lib/exe/detail.php
@@ -2,13 +2,18 @@
if(!defined('DOKU_INC')) define('DOKU_INC',dirname(__FILE__).'/../../');
define('DOKU_MEDIADETAIL',1);
require_once(DOKU_INC.'inc/init.php');
-trigger_event('DETAIL_STARTED', $tmp=array());
-//close session
-session_write_close();
$IMG = getID('media');
$ID = cleanID($INPUT->str('id'));
+// this makes some general infos available as well as the info about the
+// "parent" page
+$INFO = array_merge(pageinfo(),mediainfo());
+trigger_event('DETAIL_STARTED', $tmp=array());
+
+//close session
+session_write_close();
+
if($conf['allowdebug'] && $INPUT->has('debug')){
print '<pre>';
foreach(explode(' ','basedir userewrite baseurl useslash') as $x){
@@ -39,10 +44,6 @@ if($AUTH >= AUTH_READ){
$ERROR = p_locale_xhtml('denied');
}
-// 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'));
diff --git a/lib/exe/mediamanager.php b/lib/exe/mediamanager.php
index 53d438321..66e5ddc82 100644
--- a/lib/exe/mediamanager.php
+++ b/lib/exe/mediamanager.php
@@ -7,15 +7,12 @@
require_once(DOKU_INC.'inc/init.php');
- trigger_event('MEDIAMANAGER_STARTED',$tmp=array());
- session_write_close(); //close session
-
global $INPUT;
// handle passed message
if($INPUT->str('msg1')) msg(hsc($INPUT->str('msg1')),1);
if($INPUT->str('err')) msg(hsc($INPUT->str('err')),-1);
-
+ global $DEL;
// get namespace to display (either direct or from deletion order)
if($INPUT->str('delete')){
$DEL = cleanID($INPUT->str('delete'));
@@ -29,10 +26,15 @@
$NS = getNS($IMG);
}else{
$NS = cleanID($INPUT->str('ns'));
+ $IMG = null;
}
- // check auth
- $AUTH = auth_quickaclcheck("$NS:*");
+ global $INFO;
+ $INFO = !empty($INFO) ? array_merge($INFO, mediainfo()) : mediainfo();
+ $AUTH = $INFO['perm']; // shortcut for historical reasons
+
+ trigger_event('MEDIAMANAGER_STARTED',$tmp=array());
+ session_write_close(); //close session
// do not display the manager if user does not have read access
if($AUTH < AUTH_READ && !$fullscreen) {
@@ -52,7 +54,7 @@
exit;
}
- // give info on PHP catched upload errors
+ // give info on PHP caught upload errors
if($_FILES['upload']['error']){
switch($_FILES['upload']['error']){
case 1: