summaryrefslogtreecommitdiff
path: root/inc/media.php
diff options
context:
space:
mode:
authorAndreas Gohr <gohr@cosmocode.de>2014-07-30 12:04:07 +0200
committerAndreas Gohr <gohr@cosmocode.de>2014-07-30 12:05:22 +0200
commit22db8df7a2f043e38437a49bb327354b2a296bf0 (patch)
treeb76116fa8fa456d3cdd6c26d6e762390a826a6f1 /inc/media.php
parent893747dafea1c74b4c059b3374c2e509123402b7 (diff)
downloadrpg-22db8df7a2f043e38437a49bb327354b2a296bf0.tar.gz
rpg-22db8df7a2f043e38437a49bb327354b2a296bf0.tar.bz2
recheck auth in media_delete
Sometime the passed AUTH was not correct. This is a quick fix, but the whole media manager handling is one stining pile of crap that needs a major rewrite.
Diffstat (limited to 'inc/media.php')
-rw-r--r--inc/media.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/inc/media.php b/inc/media.php
index 185d0a5ba..fc377c8c7 100644
--- a/inc/media.php
+++ b/inc/media.php
@@ -203,7 +203,7 @@ define('DOKU_MEDIA_EMPTY_NS', 8);
*
* @author Andreas Gohr <andi@splitbrain.org>
* @param string $id media id
- * @param int $auth current auth check result
+ * @param int $auth no longer used
* @return int One of: 0,
* DOKU_MEDIA_DELETED,
* DOKU_MEDIA_DELETED | DOKU_MEDIA_EMPTY_NS,
@@ -212,6 +212,7 @@ define('DOKU_MEDIA_EMPTY_NS', 8);
*/
function media_delete($id,$auth){
global $lang;
+ $auth = auth_quickaclcheck($id);
if($auth < AUTH_DELETE) return DOKU_MEDIA_NOT_AUTH;
if(media_inuse($id)) return DOKU_MEDIA_INUSE;