Horde_Menu::isSelected PHP Method

isSelected() public static method

Checks to see if the current url matches the given url.
public static isSelected ( $url ) : boolean
return boolean Whether the given URL is the current location.
    public static function isSelected($url)
    {
        $server_url = parse_url($_SERVER['PHP_SELF']);
        $check_url = parse_url($url);
        /* Try to match the item's path against the current script
           filename as well as other possible URLs to this script. */
        return isset($check_url['path']) && ($check_url['path'] == $server_url['path'] || $check_url['path'] . 'index.php' == $server_url['path'] || $check_url['path'] . '/index.php' == $server_url['path']);
    }