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