Revision 2007
Added by darkviper almost 11 years ago
branches/2.8.x/CHANGELOG | ||
---|---|---|
11 | 11 |
! = Update/Change |
12 | 12 |
=============================================================================== |
13 | 13 |
|
14 |
|
|
14 |
23 Nov-2013 Build 2007 Manuela v.d.Decken(DarkViper) |
|
15 |
! modules/wysiwyg made completely independend from hardcoded internal URLs |
|
15 | 16 |
19 Nov-2013 Build 2006 Dietmar Woellbrink (Luisehahne) |
16 | 17 |
!implemented temporary solution for IE11 compatibility |
17 | 18 |
14 Nov-2013 Build 2005 Dietmar Woellbrink (Luisehahne) |
branches/2.8.x/wb/admin/interface/version.php | ||
---|---|---|
51 | 51 |
|
52 | 52 |
// check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled) |
53 | 53 |
if(!defined('VERSION')) define('VERSION', '2.8.3'); |
54 |
if(!defined('REVISION')) define('REVISION', '2006');
|
|
54 |
if(!defined('REVISION')) define('REVISION', '2007');
|
|
55 | 55 |
if(!defined('SP')) define('SP', ''); |
branches/2.8.x/wb/framework/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 |
} |
branches/2.8.x/wb/modules/wysiwyg/view.php | ||
---|---|---|
25 | 25 |
// Get content |
26 | 26 |
$content = ''; |
27 | 27 |
$sql = 'SELECT `content` FROM `'.TABLE_PREFIX.'mod_wysiwyg` WHERE `section_id`='.(int)$section_id; |
28 |
if( ($content = $database->get_one($sql)) ) {
|
|
28 |
if(($content = $database->get_one($sql))) {
|
|
29 | 29 |
$content = str_replace('{SYSVAR:MEDIA_REL}', $sMediaUrl, $content ); |
30 |
$content = str_replace('{SYSVAR:WB_REL}', WB_URL, $content ); |
|
30 | 31 |
} |
31 | 32 |
echo $content; |
branches/2.8.x/wb/modules/wysiwyg/modify.php | ||
---|---|---|
26 | 26 |
$sMediaUrl = WB_URL.MEDIA_DIRECTORY; |
27 | 27 |
// Get page content |
28 | 28 |
$sql = 'SELECT `content` FROM `'.TABLE_PREFIX.'mod_wysiwyg` WHERE `section_id`='.(int)$section_id; |
29 |
if ( ($content = $database->get_one($sql)) !== null ) { |
|
30 |
$content = htmlspecialchars(str_replace('{SYSVAR:MEDIA_REL}', $sMediaUrl, $content)); |
|
29 |
if (($content = $database->get_one($sql)) !== null) { |
|
30 |
$content = str_replace('{SYSVAR:MEDIA_REL}', $sMediaUrl, $content); |
|
31 |
$content = htmlspecialchars(str_replace('{SYSVAR:WB_REL}', WB_URL, $content)); |
|
31 | 32 |
} else { |
32 | 33 |
$content = 'There is an relation error in the database.'; |
33 | 34 |
$sql = 'INSERT INTO `'.TABLE_PREFIX.'mod_wysiwyg` SET ' |
branches/2.8.x/wb/modules/wysiwyg/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
! modules/wysiwyg made completely independend from hardcoded internal URLs