Project

General

Profile

« Previous | Next » 

Revision 2007

Added by darkviper almost 11 years ago

! modules/wysiwyg made completely independend from hardcoded internal URLs

View differences:

class.wb.php
755 755
		}
756 756
		if(is_string($sContent)) {
757 757
			$sMediaUrl = WB_URL.MEDIA_DIRECTORY;
758
			$searchfor = '@(<[^>]*=\s*")('.preg_quote($sMediaUrl).')([^">]*".*>)@siU';
759
			$sContent = preg_replace($searchfor, '$1{SYSVAR:MEDIA_REL}$3', $sContent );
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');
762
			$sContent = preg_replace($aSearchfor, $aReplacements, $sContent );
760 763
		}
761 764
		return $sContent;
762 765
	}

Also available in: Unified diff