Date: 04/02/00
- Next message: Kristian Koehntopp: "Re: [PHPLIB-DEV] create_auth_md5.mysql"
- Previous message: ssilk: "[PHPLIB-DEV] cvs commit"
- Next in thread: mbravo: "[PHPLIB-DEV] cvs commit"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: ssilk
Date: Mon Apr 3 03:11:20 2000
Modified files:
php-lib/php/menu.inc
Log message:
Sorry... the first version of this only seems to be working.
Index: php-lib/php/menu.inc
diff -u php-lib/php/menu.inc:1.10 php-lib/php/menu.inc:1.11
--- php-lib/php/menu.inc:1.10 Mon Apr 3 02:35:54 2000
+++ php-lib/php/menu.inc Mon Apr 3 03:11:18 2000
@@ -5,7 +5,7 @@
* Copyright (c) 1999 NetUSE GmbH
* Kristian Koehntopp
*
- * $Id: menu.inc,v 1.10 2000/04/03 00:35:54 ssilk Exp $
+ * $Id: menu.inc,v 1.11 2000/04/03 01:11:18 ssilk Exp $
*
*/
class Menu {
@@ -53,10 +53,7 @@
global $PHP_SELF;
# Determine normalized current position in tree
- if (!$this->map = $this->normalize_pos($PHP_SELF)) {
- $this->map = $this->normalize_pos(basename($PHP_SELF));
- }
-
+ $this->map = $this->normalize_pos($PHP_SELF);
# Determine menu levels up from current position
$r = $this->split_path($this->map);
@@ -145,13 +142,14 @@
/* private: normalize current menu position
*/
function normalize_pos($pos) {
+ if ( $m = $this->urlmap[basename($pos)] )
+ return($m);
$m = $pos;
while(substr($m, 0, 1)) {
if ($this->urlmap[$m])
break;
$m = dirname($m);
}
-
return $this->urlmap[$m];
}
-
PHPLIB Developers Mailing List. Send messages to <phplib-dev <email protected>>.
To unsubscribe, send "unsubscribe" to <phplib-dev-request <email protected>> in
the body, not the subject, of your message.
- Next message: Kristian Koehntopp: "Re: [PHPLIB-DEV] create_auth_md5.mysql"
- Previous message: ssilk: "[PHPLIB-DEV] cvs commit"
- Next in thread: mbravo: "[PHPLIB-DEV] cvs commit"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

