Ignore:
Timestamp:
Apr 16, 2012, 5:16:27 AM (12 years ago)
Author:
rvelices
Message:

rv_gmaps - small template updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/rv_gmaps/trunk/map.php

    r12719 r14181  
    1515$section = '';
    1616if ( $conf['question_mark_in_urls']==false and
    17     isset($_SERVER["PATH_INFO"]) and !empty($_SERVER["PATH_INFO"]) )
     17                isset($_SERVER["PATH_INFO"]) and !empty($_SERVER["PATH_INFO"]) )
    1818{
    19   $section = $_SERVER["PATH_INFO"];
    20   $section = str_replace('//', '/', $section);
    21   $path_count = count( explode('/', $section) );
    22   $page['root_path'] = PHPWG_ROOT_PATH.str_repeat('../', $path_count-1);
     19        $section = $_SERVER["PATH_INFO"];
     20        $section = str_replace('//', '/', $section);
     21        $path_count = count( explode('/', $section) );
     22        $page['root_path'] = PHPWG_ROOT_PATH.str_repeat('../', $path_count-1);
     23        if ( strncmp($page['root_path'], './', 2) == 0 )
     24        {
     25                $page['root_path'] = substr($page['root_path'], 2);
     26        }
    2327}
    2428else
    2529{
    26   foreach ($_GET as $key=>$value)
    27   {
    28     if (!strlen($value)) $section=$key;
    29     break;
    30   }
     30        foreach ($_GET as $key=>$value)
     31        {
     32                if (!strlen($value)) $section=$key;
     33                break;
     34        }
    3135}
    3236
Note: See TracChangeset for help on using the changeset viewer.