From d5a775324e9b622d1d72f394e0284f67cd9f9f78 Mon Sep 17 00:00:00 2001 From: Edward Date: Wed, 19 Feb 2014 18:01:58 +0800 Subject: [PATCH] ConvertStyle.php --- ConvertStyle.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ConvertStyle.php b/ConvertStyle.php index 02bd2e8a..4d8b2481 100644 --- a/ConvertStyle.php +++ b/ConvertStyle.php @@ -120,14 +120,13 @@ class Pman_Core_ConvertStyle extends Pman if($l->getAttribute('rel') == 'stylesheet'){ $href = $l->getAttribute('href'); - if (empty($url) && !preg_match("/^http(.*)$/", $href, $matches)) { - // import from file , must use absolutely url + if(!preg_match("/^http(.*)$/", $href, $matches)){ + if(!empty($url)){ + $href = $this->relPath($url, $href); + } $this->jerr('Please use the absolutely url for link href!'); } - if (!empty($url) && !preg_match("/^http(.*)$/", $href, $matches)) { - // import from URL - $href = $this->relPath($url, $href); - } + $this->styleSheets[$href] = $this->replaceImageUrl(file_get_contents($href),$href); } } -- 2.39.2