cvs: php4 /pear/HTML Menu.php

From: Date: Wed, 19 Dec 2001 20:06:12 +0000
Subject: cvs: php4 /pear/HTML Menu.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-1625@lists.php.net to get a copy of this message
uw Wed Dec 19 15:06:12 2001 EDT Modified files: /php4/pear/HTML Menu.php Log: PHP_SELF & friends went to $_SERVER since 4.1.0 Index: php4/pear/HTML/Menu.php diff -u php4/pear/HTML/Menu.php:1.9 php4/pear/HTML/Menu.php:1.10 --- php4/pear/HTML/Menu.php:1.9 Tue Dec 11 10:31:26 2001 +++ php4/pear/HTML/Menu.php Wed Dec 19 15:06:12 2001 @@ -17,7 +17,7 @@ // | Sebastian Bergmann <sb@sebastian-bergmann.de> | // +----------------------------------------------------------------------+ // -// $Id: Menu.php,v 1.9 2001/12/11 15:31:26 sebastian Exp $ +// $Id: Menu.php,v 1.10 2001/12/19 20:06:12 uw Exp $ // /** @@ -25,17 +25,18 @@ * * Special thanks to the original author: Alex Vorobiev <sasha@mathforum.com>. * -* @version $Id: Menu.php,v 1.9 2001/12/11 15:31:26 sebastian Exp $ +* @version $Id: Menu.php,v 1.10 2001/12/19 20:06:12 uw Exp $ * @author Ulf Wendel <ulf.wendel@phpdoc.de> * @access public * @package HTML */ class HTML_Menu { + /** * URL Environment Variable * - * @var array + * @var string */ var $url_env_var = 'PHP_SELF'; @@ -593,7 +594,15 @@ * @return string */ function getCurrentURL() { - return $GLOBALS[$this->url_env_var]; + + if (isset($_SERVER[$this->url_env_var])) + return $_SERVER[$this->url_env_var]; + else if (isset($GLOBALS[$this->url_env_var])) + return $GLOBALS[$this->url_env_var]; + else + return ''; + } + } ?>

« previous php.pear.cvs (#1625) next »