X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=ConvertStyle.php;fp=ConvertStyle.php;h=ef6449542023303ca77cb48430be65464b43ff11;hb=24cf61a38b8d558d4eebe91413728346f69545e1;hp=d7738e2182214837fb5afa771ba2fb601d81b2e1;hpb=4c8117b8ccd56625cb0bedf096ed2a03b5957dc3;p=Pman.Core diff --git a/ConvertStyle.php b/ConvertStyle.php index d7738e21..ef644954 100644 --- a/ConvertStyle.php +++ b/ConvertStyle.php @@ -62,9 +62,9 @@ class Pman_Core_ConvertStyle extends Pman var $styleSheets = array(); - function convertStyle($url = '', $file = false, $is_external = true) + function convertStyle($url, $file, $is_url = true) { - if(!empty($url)) + if($is_url && !empty($url)) { $host = parse_url($url); require_once 'System.php'; @@ -82,7 +82,7 @@ class Pman_Core_ConvertStyle extends Pman } } - if(!empty($file)){ + if(!$is_url){ $data = file_get_contents($file); } @@ -100,9 +100,7 @@ class Pman_Core_ConvertStyle extends Pman $img->setAttribute('src', $this->relPath($url, $href)); continue; } - if($is_external){ - $this->jerr('Please use the absolutely url for image src!'); - } + $this->jerr('Please use the absolutely url for image src!'); } }