Index: branches/unlabeled/unlabeled-1.166.4/core/kernel/application.php =================================================================== diff -u -r7287 -r7368 --- branches/unlabeled/unlabeled-1.166.4/core/kernel/application.php (.../application.php) (revision 7287) +++ branches/unlabeled/unlabeled-1.166.4/core/kernel/application.php (.../application.php) (revision 7368) @@ -2112,11 +2112,12 @@ * OR prefix, that has been found in REQUEST and some how is parent of passed subtable prefix * * @param string $current_prefix + * @param string $real_top if set to true will return real topmost prefix, regardless of its id is passed or not * @return string * @access public * @author Kostja / Alex */ - function GetTopmostPrefix($current_prefix) + function GetTopmostPrefix($current_prefix, $real_top=false) { // 1. get genealogical tree of $current_prefix $prefixes = Array ($current_prefix); @@ -2125,6 +2126,8 @@ array_unshift($prefixes, $current_prefix); } + if ($real_top) return $current_prefix; + // 2. find what if parent is passed $passed = explode(',', $this->GetVar('passed')); foreach ($prefixes as $current_prefix) {