From a197105e06fa0d32e360375899252a7948bf5e59 Mon Sep 17 00:00:00 2001 From: matthiasgrimm <matthiasgrimm@users.sourceforge.net> Date: Mon, 19 Jun 2006 19:10:23 +0200 Subject: [PATCH] back button tear down walls The 'back' currently works only inside a namespace and hide the button, if the namespace startpage has been reached. This patch tear down the namespace wall. Now the 'back' button of the namespace startpage addresses the start page of the parent namespace instead of being hidden. With this patch the 'back' button works as before the 'startpage' patch series. darcs-hash:20060619171023-7ef76-baac3ad5367d6c6397125401aa7d8beab5122faa.gz --- inc/template.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/inc/template.php b/inc/template.php index 78dc45e37..277c06d8d 100644 --- a/inc/template.php +++ b/inc/template.php @@ -259,7 +259,12 @@ function tpl_getparent($id){ global $conf; $parent = getNS($id).':'; resolve_pageid('',$parent,$exists); - if($parent == $id) return false; + if($parent == $id) { + $pos = strrpos (getNS($id),':'); + $parent = substr($parent,0,$pos).':'; + resolve_pageid('',$parent,$exists); + if($parent == $id) return false; + } return $parent; } -- GitLab