From 4c8117b8ccd56625cb0bedf096ed2a03b5957dc3 Mon Sep 17 00:00:00 2001 From: Edward Date: Thu, 20 Feb 2014 19:11:37 +0800 Subject: [PATCH] ConvertStyle.php --- ConvertStyle.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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!'); + } } } -- 2.39.2