From: Edward Date: Wed, 19 Feb 2014 08:37:18 +0000 (+0800) Subject: ConvertStyle.php X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=commitdiff_plain;h=b4c981cb84ec3b4ca140985d91d233a2e1485b65 ConvertStyle.php --- diff --git a/ConvertStyle.php b/ConvertStyle.php index b3db910a..4d7eca30 100644 --- a/ConvertStyle.php +++ b/ConvertStyle.php @@ -23,8 +23,7 @@ class Pman_Core_ConvertStyle extends Pman return $url; } $ui = parse_url($base); - // if it starts with '/'... - // we do not handle ports... + if (substr($url,0,2) == '//') { return $ui['scheme'] .':' . $url; } @@ -42,7 +41,7 @@ class Pman_Core_ConvertStyle extends Pman return $ui['scheme'] .'://'.$ui['host']. '/' . $url; } - /// not sure if this will work... + return $ui['scheme'] .'://'.$ui['host']. $ui['path'] . '/../'. $url; }