DataObjects/Core_watch.php
[Pman.Core] / ConvertStyle.php
index d06c1ab..3807868 100644 (file)
@@ -18,15 +18,18 @@ class Pman_Core_ConvertStyle extends Pman
     }
     
     function relPath($base, $url)
-    {   
-        print_r($base);
-        print_r($url);exit;
+    {  
+        
         if (preg_match('/^(http|https|mailto):/',$url)) {
             return $url;
         }
         
         $ui = parse_url($base);
         
+        if($ui['host'] == 'localhost'){
+            return $ui['scheme'] .'://'.$ui['host']. $ui['path'] . '/'. $url;
+        }
+        
         if (substr($url,0,2) == '//') {
             return $ui['scheme'] .':' .  $url;
         }