summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2014-05-25 11:36:55 +0200
committerAndreas Gohr <andi@splitbrain.org>2014-05-25 11:36:55 +0200
commitef11fcfcd6213789fb126766301a6ffaf8f83055 (patch)
treed1bcc9c08f5e55c830b8d47aa1efad4b53845571
parent6c0879f6b25dd03183827bdda461ceb599eb939a (diff)
downloadrpg-ef11fcfcd6213789fb126766301a6ffaf8f83055.tar.gz
rpg-ef11fcfcd6213789fb126766301a6ffaf8f83055.tar.bz2
revert return of getNS to false again
-rw-r--r--inc/io.php2
-rw-r--r--inc/pageutils.php4
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;
}
/**