diff options
author | Andreas Gohr <andi@splitbrain.org> | 2007-06-13 21:15:42 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2007-06-13 21:15:42 +0200 |
commit | 55b2b31ba4b8953e4396fc55a1176293671bc638 (patch) | |
tree | da00215a05d119d05b3313a7d7922f747c8c8609 | |
parent | 9426a41aa622ea7c282f451c3274f167307f428d (diff) | |
download | rpg-55b2b31ba4b8953e4396fc55a1176293671bc638.tar.gz rpg-55b2b31ba4b8953e4396fc55a1176293671bc638.tar.bz2 |
fixed URL in file upload notify mail FS#1160
darcs-hash:20070613191542-7ad00-0e72b3c40f9593838641be5c4e728a8e1a68d550.gz
-rw-r--r-- | inc/common.php | 8 | ||||
-rw-r--r-- | inc/media.php | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/inc/common.php b/inc/common.php index 673afc1a6..b47395333 100644 --- a/inc/common.php +++ b/inc/common.php @@ -368,7 +368,7 @@ function exportlink($id='',$format='raw',$more='',$abs=false,$sep='&'){ * * Will return a link to the detail page if $direct is false */ -function ml($id='',$more='',$direct=true,$sep='&'){ +function ml($id='',$more='',$direct=true,$sep='&',$abs=false){ global $conf; if(is_array($more)){ $more = buildURLparams($more,$sep); @@ -376,7 +376,11 @@ function ml($id='',$more='',$direct=true,$sep='&'){ $more = str_replace(',',$sep,$more); } - $xlink = DOKU_BASE; + if($abs){ + $xlink = DOKU_URL; + }else{ + $xlink = DOKU_BASE; + } // external URLs are always direct without rewriting if(preg_match('#^(https?|ftp)://#i',$id)){ diff --git a/inc/media.php b/inc/media.php index c25c214f4..25dc03ffa 100644 --- a/inc/media.php +++ b/inc/media.php @@ -311,7 +311,7 @@ function media_notify($id,$file,$mime){ $text = str_replace('@DOKUWIKIURL@',DOKU_URL,$text); $text = str_replace('@USER@',$_SERVER['REMOTE_USER'],$text); $text = str_replace('@MIME@',$mime,$text); - $text = str_replace('@MEDIA@',DOKU_URL.ml($id,'',true,'&'),$text); + $text = str_replace('@MEDIA@',ml($id,'',true,'&',true),$text); $text = str_replace('@SIZE@',filesize_h(filesize($file)),$text); $from = $conf['mailfrom']; |