From 22db8df7a2f043e38437a49bb327354b2a296bf0 Mon Sep 17 00:00:00 2001 From: Andreas Gohr <gohr@cosmocode.de> Date: Wed, 30 Jul 2014 12:04:07 +0200 Subject: [PATCH] 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. --- inc/media.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- GitLab