Project

General

Profile

« Previous | Next » 

Revision 2007

Added by darkviper about 11 years ago

! modules/wysiwyg made completely independend from hardcoded internal URLs

View differences:

upgrade.php
84 84
			} else {
85 85
				$msg[] = 'Field ( `content` ) description has been changed successfully'." $OK";
86 86
			}
87
// change internal absolute links into relative links
87
// change internal absolute Media links into relative links
88 88
			$sTable = $database->TablePrefix.'mod_wysiwyg';
89 89
			$sql  = 'UPDATE `'.$sTable.'` ';
90 90
			$sql .= 'SET `content` = REPLACE(`content`, \'"'.WB_URL.MEDIA_DIRECTORY.'\', \'"{SYSVAR:MEDIA_REL}\')';
91 91
			if (!$database->query($sql)) {
92 92
				$msg[] = ''.$database->get_error();
93 93
			} else {
94
				$msg[] = 'Change internal absolute Media links into relative links'." $OK";
95
			}
96
// change all other internal absolute links into relative links
97
			$sTable = $database->TablePrefix.'mod_wysiwyg';
98
			$sql  = 'UPDATE `'.$sTable.'` ';
99
			$sql .= 'SET `content` = REPLACE(`content`, \'"'.WB_URL.'\', \'"{SYSVAR:WB_REL}\')';
100
			if (!$database->query($sql)) {
101
				$msg[] = ''.$database->get_error();
102
			} else {
94 103
				$msg[] = 'Change internal absolute links into relative links'." $OK";
95 104
			}
96 105
// only for $callingScript upgrade-script.php

Also available in: Unified diff