diff options
-rw-r--r-- | inc/io.php | 2 | ||||
-rw-r--r-- | inc/pageutils.php | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/inc/io.php b/inc/io.php index dce676bbb..27a34b045 100644 --- a/inc/io.php +++ b/inc/io.php @@ -31,7 +31,7 @@ function io_sweepNS($id,$basedir='datadir'){ $delone = false; //scan all namespaces - while(($id = getNS($id)) !== ''){ + while(($id = getNS($id)) !== false){ $dir = $conf[$basedir].'/'.utf8_encodeFN(str_replace(':','/',$id)); //try to delete dir else return diff --git a/inc/pageutils.php b/inc/pageutils.php index 79b703ddc..5f62926e4 100644 --- a/inc/pageutils.php +++ b/inc/pageutils.php @@ -152,14 +152,14 @@ function cleanID($raw_id,$ascii=false){ * @author Andreas Gohr <andi@splitbrain.org> * * @param string $id - * @return string + * @return string|bool the namespace part or false if the given ID has no namespace (root) */ function getNS($id){ $pos = strrpos((string)$id,':'); if($pos!==false){ return substr((string)$id,0,$pos); } - return ''; + return false; } /** |