diff options
author | matthiasgrimm <matthiasgrimm@users.sourceforge.net> | 2006-06-19 19:10:23 +0200 |
---|---|---|
committer | matthiasgrimm <matthiasgrimm@users.sourceforge.net> | 2006-06-19 19:10:23 +0200 |
commit | a197105e06fa0d32e360375899252a7948bf5e59 (patch) | |
tree | e3cec85cceabc6de1be549d643e57a843bd46481 | |
parent | 3f4c2ce36d183b39e522ac3b17f9d7e8db19fb70 (diff) | |
download | rpg-a197105e06fa0d32e360375899252a7948bf5e59.tar.gz rpg-a197105e06fa0d32e360375899252a7948bf5e59.tar.bz2 |
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
-rw-r--r-- | inc/template.php | 7 |
1 files changed, 6 insertions, 1 deletions
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; } |