Project

General

Profile

« Previous | Next » 

Revision 2058

Added by darkviper almost 11 years ago

! change wysiwyg module from filterMediaRel to filterReplaceSysvar
! change wb::ReplaceAbsoluteMediaUrl from filterMediaRel to filterReplaceSysvar

View differences:

class.wb.php
647 647
		// $message = preg_replace('/[\r\n]/', '<br \>', $message);
648 648

  
649 649
		// create PHPMailer object and define default settings
650
		$myMail = new wbmailer();
650
		$myMail = new WbMailer();
651 651
		// set user defined from address
652 652
		if ($fromaddress!='') {
653 653
			if($fromname!='') $myMail->FromName = $fromname;  // FROM-NAME
......
750 750
 *              independend placeholder
751 751
 */
752 752
	public function ReplaceAbsoluteMediaUrl($sContent){
753
        $oReg = WbAdaptor::getInstance();
753 754
		if(ini_get('magic_quotes_gpc')==true){
754 755
			$sContent = $this->strip_slashes($sContent);
755 756
		}
756 757
		if(is_string($sContent)) {
757
			$sMediaUrl = WB_URL.MEDIA_DIRECTORY;
758
			$aSearchfor = array('@(<[^>]*=\s*")('.preg_quote($sMediaUrl).')([^">]*".*>)@siU',
759
			                    '@(<[^>]*=\s*")('.preg_quote(WB_URL).')([^">]*".*>)@siU');
760
			$aReplacements = array('$1{SYSVAR:MEDIA_REL}$3',
761
			                       '$1{SYSVAR:WB_REL}$3');
758
			$aSearchfor = array('@(<[^>]*=\s*")('.preg_quote($oReg->AppUrl.$oReg->MediaDir).')([^">]*".*>)@siU',
759
			                    '@(<[^>]*=\s*")('.preg_quote($oReg->AppUrl).')([^">]*".*>)@siU');
760
			$aReplacements = array('$1{SYSVAR:AppUrl.MediaDir}$3',
761
			                       '$1{SYSVAR:AppUrl}$3');
762 762
			$sContent = preg_replace($aSearchfor, $aReplacements, $sContent );
763 763
		}
764 764
		return $sContent;

Also available in: Unified diff