diff options
author | Andreas Gohr <andi@splitbrain.org> | 2011-11-28 20:29:39 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2011-11-28 20:29:39 +0100 |
commit | 3543c6de939c52517f590300b6d4289dc3a785ff (patch) | |
tree | 7b4e9432a6b5b1b460c5d602aab861831c93092b /inc/pageutils.php | |
parent | 4feb08e1dd7fd1c0a09310ca29a7cbac2559edb9 (diff) | |
download | rpg-3543c6de939c52517f590300b6d4289dc3a785ff.tar.gz rpg-3543c6de939c52517f590300b6d4289dc3a785ff.tar.bz2 |
deprecated 3rd parameter of cleanID() FS#2377
For some reason trailing/leading underscores were allowed when uploading
files. But the rest of the code (eg. listing or downloading files) never
supported this. This patch removes this special case for uploading files
to streamline ID cleaning of pages and media files.
Diffstat (limited to 'inc/pageutils.php')
-rw-r--r-- | inc/pageutils.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/pageutils.php b/inc/pageutils.php index 31b5f9ff9..151fa5987 100644 --- a/inc/pageutils.php +++ b/inc/pageutils.php @@ -92,7 +92,7 @@ function getID($param='id',$clean=true){ * @author Andreas Gohr <andi@splitbrain.org> * @param string $raw_id The pageid to clean * @param boolean $ascii Force ASCII - * @param boolean $media Allow leading or trailing _ for media files + * @param boolean $media DEPRECATED */ function cleanID($raw_id,$ascii=false,$media=false){ global $conf; @@ -132,7 +132,7 @@ function cleanID($raw_id,$ascii=false,$media=false){ //clean up $id = preg_replace($sepcharpat,$sepchar,$id); $id = preg_replace('#:+#',':',$id); - $id = ($media ? trim($id,':.-') : trim($id,':._-')); + $id = trim($id,':._-'); $id = preg_replace('#:[:\._\-]+#',':',$id); $id = preg_replace('#[:\._\-]+:#',':',$id); |