projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
21c16d0
)
ConvertStyle.php
author
Edward
<edward@roojs.com>
Wed, 19 Feb 2014 10:01:58 +0000
(18:01 +0800)
committer
Edward
<edward@roojs.com>
Wed, 19 Feb 2014 10:01:58 +0000
(18:01 +0800)
ConvertStyle.php
patch
|
blob
|
history
diff --git
a/ConvertStyle.php
b/ConvertStyle.php
index
02bd2e8
..
4d8b248
100644
(file)
--- 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($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!');
}
$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);
}
}
$this->styleSheets[$href] = $this->replaceImageUrl(file_get_contents($href),$href);
}
}