From: Edward Date: Thu, 20 Feb 2014 11:11:37 +0000 (+0800) Subject: ConvertStyle.php X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=commitdiff_plain;h=4c8117b8ccd56625cb0bedf096ed2a03b5957dc3 ConvertStyle.php --- diff --git a/ConvertStyle.php b/ConvertStyle.php index ef644954..d7738e21 100644 --- a/ConvertStyle.php +++ b/ConvertStyle.php @@ -62,9 +62,9 @@ class Pman_Core_ConvertStyle extends Pman var $styleSheets = array(); - function convertStyle($url, $file, $is_url = true) + function convertStyle($url = '', $file = false, $is_external = true) { - if($is_url && !empty($url)) + if(!empty($url)) { $host = parse_url($url); require_once 'System.php'; @@ -82,7 +82,7 @@ class Pman_Core_ConvertStyle extends Pman } } - if(!$is_url){ + if(!empty($file)){ $data = file_get_contents($file); } @@ -100,7 +100,9 @@ class Pman_Core_ConvertStyle extends Pman $img->setAttribute('src', $this->relPath($url, $href)); continue; } - $this->jerr('Please use the absolutely url for image src!'); + if($is_external){ + $this->jerr('Please use the absolutely url for image src!'); + } } }