Plugin Directory

Changeset 152506


Ignore:
Timestamp:
09/06/2009 02:53:25 PM (17 years ago)
Author:
dschuesae
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • xml-google-maps/trunk/xmlgooglemaps_helper.php

    r148666 r152506  
    6565
    6666    function tryGetLocalPath($url) {
    67         $root_path = ABSPATH;
    68         $root_url = get_option('siteurl')."/";
    69 
    70         $ret = str_replace($root_url,$root_path,$url);
    71 
    72         return $ret;
     67        if (defined('ABSPATH')) {
     68            $root_path = ABSPATH;
     69            $root_url = get_option('siteurl')."/";
     70   
     71            $ret = str_replace($root_url,$root_path,$url);
     72            return $ret;
     73        } else {
     74            return $url;
     75        }       
    7376    }
    7477
Note: See TracChangeset for help on using the changeset viewer.