diff options
author | andi <andi@splitbrain.org> | 2005-01-29 13:32:05 +0100 |
---|---|---|
committer | andi <andi@splitbrain.org> | 2005-01-29 13:32:05 +0100 |
commit | d7afada16872e19336292f6346fcea172318312d (patch) | |
tree | 82fa54ebe0bf019fa2213a56306bbf41d8c5e60f | |
parent | 2534b73288d8682c9a2211062fb7926819745350 (diff) | |
download | rpg-d7afada16872e19336292f6346fcea172318312d.tar.gz rpg-d7afada16872e19336292f6346fcea172318312d.tar.bz2 |
fix for non-cached external images (fixes #95)
darcs-hash:20050129123205-9977f-8c44fa21cba3b1686ee93bcc9e81ebe79416e9f0.gz
-rw-r--r-- | inc/common.php | 5 | ||||
-rw-r--r-- | inc/format.php | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/inc/common.php b/inc/common.php index dff4bba18..94dfd03a0 100644 --- a/inc/common.php +++ b/inc/common.php @@ -41,6 +41,11 @@ //remember original umask $conf['oldumask'] = umask(); + //make absolute mediaweb + if(!preg_match('#^(https?://|/)#i',$conf['mediaweb'])){ + $conf['mediaweb'] = getBaseURL().$conf['mediaweb']; + } + /** * remove magic quotes recursivly * diff --git a/inc/format.php b/inc/format.php index 7b8d140ca..bb40ce61f 100644 --- a/inc/format.php +++ b/inc/format.php @@ -344,7 +344,7 @@ function format_link_media($link){ //prepare name if($isimg){ - $link['name'] = '<img src="'.getBaseURL().$cache.'"'; + $link['name'] = '<img src="'.$cache.'"'; if($w) $link['name'] .= ' width="'.$w.'"'; if($h) $link['name'] .= ' height="'.$h.'"'; if($t) $link['name'] .= ' title="'.$t.'"'; |