[PHPLIB-DEV] cvs commit From: ssilk (phplib-dev <email protected>)
Date: 04/02/00

From: ssilk
Date: Mon Apr 3 02:36:25 2000
Modified files:
      php-lib/php/menu.inc

Log message:
A simple but VERY useful change to menu-class. Now only needs the
filenames in $urlmap, if it doesn't find $PHP_SELF it takes
basename($PHP_SELF).

Perhaps someone is able to add this patch into menu2.inc also?

Index: php-lib/php/menu.inc
diff -u php-lib/php/menu.inc:1.9 php-lib/php/menu.inc:1.10
--- php-lib/php/menu.inc:1.9 Tue Mar 7 00:48:39 2000
+++ php-lib/php/menu.inc Mon Apr 3 02:35:54 2000
@@ -5,7 +5,7 @@
  * Copyright (c) 1999 NetUSE GmbH
  * Kristian Koehntopp
  *
- * $Id: menu.inc,v 1.9 2000/03/06 23:48:39 ssilk Exp $
+ * $Id: menu.inc,v 1.10 2000/04/03 00:35:54 ssilk Exp $
  *
  */
 class Menu {
@@ -53,7 +53,10 @@
     global $PHP_SELF;
     
     # Determine normalized current position in tree
- $this->map = $this->normalize_pos($PHP_SELF);
+ if (!$this->map = $this->normalize_pos($PHP_SELF)) {
+ $this->map = $this->normalize_pos(basename($PHP_SELF));
+ }
+
 
     # Determine menu levels up from current position
     $r = $this->split_path($this->map);

-
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.