summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inc/common.php5
-rw-r--r--inc/format.php2
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.'"';