summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorandi <andi@splitbrain.org>2005-04-13 22:04:38 +0200
committerandi <andi@splitbrain.org>2005-04-13 22:04:38 +0200
commit63ba0b075ea9777ce1a62d1a2c50952cde94859b (patch)
tree73aed51b1d9a6d5dd24b3595ca6c41fc0eb7659e /inc
parentee30ffda01e0188f6353b8f08ac11bc97e8e3330 (diff)
downloadrpg-63ba0b075ea9777ce1a62d1a2c50952cde94859b.tar.gz
rpg-63ba0b075ea9777ce1a62d1a2c50952cde94859b.tar.bz2
new file to add ACL checks on media files #204 (incomplete yet)
darcs-hash:20050413200438-9977f-7b75da8fcdd239f3ef9658e8c487e998e619e9d2.gz
Diffstat (limited to 'inc')
-rw-r--r--inc/common.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/inc/common.php b/inc/common.php
index 9b91caca8..268072cbf 100644
--- a/inc/common.php
+++ b/inc/common.php
@@ -416,6 +416,21 @@ function wikiFN($id,$rev=''){
}
/**
+ * returns the full path to the mediafile specified by ID
+ *
+ * The filename is URL encoded to protect Unicode chars
+ *
+ * @author Andreas Gohr <andi@splitbrain.org>
+ */
+function mediaFN($id){
+ global $conf;
+ $id = cleanID($id);
+ $id = str_replace(':','/',$id);
+ $fn = $conf['datadir'].'/'.utf8_encodeFN($id);
+ return $fn;
+}
+
+/**
* Returns the full filepath to a localized textfile if local
* version isn't found the english one is returned
*