From c786a1b6200b051466db67a1791f46bbd375bb3b Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Sun, 18 Nov 2012 12:02:20 +0000 Subject: fixed wrong sidebar showing in namespaces when sidebar is disabled --- inc/pageutils.php | 1 + 1 file changed, 1 insertion(+) (limited to 'inc/pageutils.php') diff --git a/inc/pageutils.php b/inc/pageutils.php index 3bb10883f..ef82eebcd 100644 --- a/inc/pageutils.php +++ b/inc/pageutils.php @@ -645,6 +645,7 @@ function utf8_decodeFN($file){ * @return string|false the full page id of the found page, false if any */ function page_findnearest($page){ + if (!$page) return false; global $ID; $ns = $ID; -- cgit v1.2.3 From 3755fc25fd2934f8d887f713a48b342ef252cfee Mon Sep 17 00:00:00 2001 From: Tom N Harris Date: Mon, 14 Mar 2011 20:39:30 -0400 Subject: Combine subsequent calls to strtr into a single transformation --- inc/pageutils.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'inc/pageutils.php') diff --git a/inc/pageutils.php b/inc/pageutils.php index ef82eebcd..ca4936a82 100644 --- a/inc/pageutils.php +++ b/inc/pageutils.php @@ -115,11 +115,10 @@ function cleanID($raw_id,$ascii=false,$media=false){ $id = utf8_strtolower($id); //alternative namespace seperator - $id = strtr($id,';',':'); if($conf['useslash']){ - $id = strtr($id,'/',':'); + $id = strtr($id,';/','::'); }else{ - $id = strtr($id,'/',$sepchar); + $id = strtr($id,';/',':'.$sepchar); } if($conf['deaccent'] == 2 || $ascii) $id = utf8_romanize($id); -- cgit v1.2.3