diff options
author | Gerrit Uitslag <klapinklapin@gmail.com> | 2014-05-21 11:16:33 +0200 |
---|---|---|
committer | Gerrit Uitslag <klapinklapin@gmail.com> | 2014-05-21 11:16:33 +0200 |
commit | 15851b98227ebf9671f8f7facd11426a72da6ea6 (patch) | |
tree | b7d669a0464d524599d6306f8c60206c06711d57 /inc/pageutils.php | |
parent | 4f1e2cb398542551e71f50494ed57c567a732980 (diff) | |
download | rpg-15851b98227ebf9671f8f7facd11426a72da6ea6.tar.gz rpg-15851b98227ebf9671f8f7facd11426a72da6ea6.tar.bz2 |
getNS returns empty string instead of false
Diffstat (limited to 'inc/pageutils.php')
-rw-r--r-- | inc/pageutils.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/inc/pageutils.php b/inc/pageutils.php index 8474c5697..b678aa7c3 100644 --- a/inc/pageutils.php +++ b/inc/pageutils.php @@ -146,19 +146,25 @@ function cleanID($raw_id,$ascii=false){ * Return namespacepart of a wiki ID * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $id + * @return string */ function getNS($id){ $pos = strrpos((string)$id,':'); if($pos!==false){ return substr((string)$id,0,$pos); } - return false; + return ''; } /** * Returns the ID without the namespace * * @author Andreas Gohr <andi@splitbrain.org> + * + * @param string $id + * @return string */ function noNS($id) { $pos = strrpos($id, ':'); |