Revision 2083
Added by darkviper almost 11 years ago
- modules/news/upgrade manipulation of {SYSVAR:}-Tags fixed
- modules/wysiwyg/upgrade manipulation of {SYSVAR:}-Tags fixed
- modules/news/add default template fixed
branches/2.8.x/CHANGELOG | ||
---|---|---|
11 | 11 |
! = Update/Change |
12 | 12 |
=============================================================================== |
13 | 13 |
|
14 |
15 Jan-2014 Build 2083 Manuela v.d.Decken(DarkViper) |
|
15 |
# modules/news/upgrade manipulation of {SYSVAR:}-Tags fixed |
|
16 |
# modules/wysiwyg/upgrade manipulation of {SYSVAR:}-Tags fixed |
|
17 |
# modules/news/add default template fixed |
|
14 | 18 |
07 Jan-2014 Build 2082 Manuela v.d.Decken(DarkViper) |
15 | 19 |
! added missing translation in admin/users |
16 | 20 |
! DOC-files updated. |
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.4'); |
54 |
if(!defined('REVISION')) define('REVISION', '2082');
|
|
54 |
if(!defined('REVISION')) define('REVISION', '2083');
|
|
55 | 55 |
if(!defined('SP')) define('SP', ''); |
branches/2.8.x/wb/modules/wysiwyg/upgrade.php | ||
---|---|---|
91 | 91 |
if (($oEntrySet = $oDb->doQuery($sql))) { |
92 | 92 |
$iRecords = 0; |
93 | 93 |
$iReplaced = 0; |
94 |
$aSearch = array( '/\{SYSVAR\:MEDIA_REL\}[\/\\\\]?/sU', |
|
95 |
'/\{SYSVAR\:WB_URL\}[\/\\\\]?/sU', |
|
96 |
'/(\{SYSVAR\:AppUrl\.MediaDir\})[\/\\\\]?/sU', |
|
97 |
'/(\{SYSVAR\:AppUrl\})[\/\\\\]?/sU' |
|
94 |
$aSearch = array( '/\{SYSVAR\:MEDIA_REL\}\/*/s', |
|
95 |
'/\{SYSVAR\:WB_URL\}\/*/s', |
|
96 |
'/'.preg_quote('"'.$oReg->AppUrl.$oReg->MediaDir, '/').'*/s', |
|
97 |
'/'.preg_quote('"'.$oReg->AppUrl, '/').'*/s', |
|
98 |
'/(\{SYSVAR\:AppUrl\.MediaDir\})\/+/s', |
|
99 |
'/(\{SYSVAR\:AppUrl\})\/+/s' |
|
98 | 100 |
); |
99 |
$aReplace = array( '{SYSVAR:AppUrl.MediaDir}', '{SYSVAR:AppUrl}', '\1', '\1' );
|
|
101 |
$aReplace = array( '{SYSVAR:AppUrl.MediaDir}', '{SYSVAR:AppUrl}', '{SYSVAR:AppUrl.MediaDir}', '{SYSVAR:AppUrl}', '\1', '\1');
|
|
100 | 102 |
while (($aEntry = $oEntrySet->fetchRow(MYSQL_ASSOC))) { |
101 | 103 |
$iCount = 0; |
102 |
$aEntry['content'] = preg_replace($aSearch, $aReplace, $aEntry['content'], -1, $iCount); |
|
104 |
$aSubject = array($aEntry['content_long'], $aEntry['content_short']); |
|
105 |
$aNewContents = preg_replace($aSearch, $aReplace, $aSubject, -1, $iCount); |
|
103 | 106 |
if ($iCount > 0) { |
104 | 107 |
$iReplaced += $iCount; |
105 |
$sql = 'UPDATE `'.$oDb->TablePrefix.'mod_wysiwyg` ' |
|
106 |
. 'SET `content`=\''.$oDb->escapeString($aEntry['content']).'\' ' |
|
107 |
. 'WHERE `section_id`='.$aEntry['section_id']; |
|
108 |
$sql = 'UPDATE `'.$oDb->TablePrefix.'mod_news_posts` ' |
|
109 |
. 'SET `content_long`=\''.$oDb->escapeString($aNewContents[0]).'\', ' |
|
110 |
. '`content_short`=\''.$oDb->escapeString($aNewContents[1]).'\' ' |
|
111 |
. 'WHERE `post_id`='.$aEntry['post_id']; |
|
108 | 112 |
$oDb->doQuery($sql); |
109 | 113 |
$iRecords++; |
110 | 114 |
} |
111 | 115 |
} |
112 |
$msg[] = '['.$iRecords.'] records with ['.$iReplaced.'] SYSVAR placeholder(s) repaired'." $OK"; |
|
116 |
$msg[] = '['.$iRecords.'] records with ['.$iReplaced.'] SYSVAR placeholder(s) repaired/inserted'." $OK"; |
|
117 |
// only for $callingScript upgrade-script.php |
|
118 |
if($globalStarted && $bDebug) { |
|
119 |
echo '<strong>'.implode('<br />',$msg).'</strong><br />'; |
|
120 |
} |
|
113 | 121 |
} |
114 |
try { |
|
115 |
$sql = 'UPDATE `'.$sTable.'` '; |
|
116 |
$sql .= 'SET `content` = REPLACE(`content`, \'"'.$oReg->AppPath.$oReg->MediaDir.'\', \'"{SYSVAR:AppPath.MediaDir}\')'; |
|
117 |
$oDb->doQuery($sql); |
|
118 |
$msg[] = 'Change internal absolute Media links into SYSVAR placeholders'." $OK"; |
|
119 |
} catch(WbDatabaseException $e) { |
|
120 |
$msg[] = ''.$oDb->get_error(); |
|
121 |
} |
|
122 |
try { |
|
123 |
$sql = 'UPDATE `'.$sTable.'` '; |
|
124 |
$sql .= 'SET `content` = REPLACE(`content`, \'"'.$oReg->AppPath.'\', \'"{SYSVAR:AppPath}\')'; |
|
125 |
$oDb->doQuery($sql); |
|
126 |
$msg[] = 'Change internal absolute links into SYSVAR placeholders'." $OK"; |
|
127 |
} catch(WbDatabaseException $e) { |
|
128 |
$msg[] = ''.$oDb->get_error(); |
|
129 |
} |
|
130 |
// only for $callingScript upgrade-script.php |
|
131 |
if($globalStarted) { |
|
132 |
if($bDebug) { |
|
133 |
echo '<strong>'.implode('<br />',$msg).'</strong><br />'; |
|
134 |
} |
|
135 |
} |
|
136 |
} |
|
122 |
} |
|
137 | 123 |
$msg[] = 'WYSIWYG upgrade successfull finished'." $OK"; |
138 | 124 |
if($globalStarted) { |
139 | 125 |
echo "<strong>WYSIWYG upgrade successfull finished $OK</strong><br />"; |
branches/2.8.x/wb/modules/news/upgrade.php | ||
---|---|---|
194 | 194 |
if (($oEntrySet = $oDb->doQuery($sql))) { |
195 | 195 |
$iRecords = 0; |
196 | 196 |
$iReplaced = 0; |
197 |
$aSearch = array( '/\{SYSVAR\:MEDIA_REL\}[\/\\\\]?/sU', |
|
198 |
'/\{SYSVAR\:WB_URL\}[\/\\\\]?/sU', |
|
199 |
'/(\{SYSVAR\:AppUrl\.MediaDir\})[\/\\\\]?/sU', |
|
200 |
'/(\{SYSVAR\:AppUrl\})[\/\\\\]?/sU' |
|
197 |
$aSearch = array( '/\{SYSVAR\:MEDIA_REL\}\/*/s', |
|
198 |
'/\{SYSVAR\:WB_URL\}\/*/s', |
|
199 |
'/'.preg_quote('"'.$oReg->AppUrl.$oReg->MediaDir, '/').'*/s', |
|
200 |
'/'.preg_quote('"'.$oReg->AppUrl, '/').'*/s', |
|
201 |
'/(\{SYSVAR\:AppUrl\.MediaDir\})\/+/s', |
|
202 |
'/(\{SYSVAR\:AppUrl\})\/+/s' |
|
201 | 203 |
); |
202 |
$aReplace = array( '{SYSVAR:AppUrl.MediaDir}', '{SYSVAR:AppUrl}', '\1', '\1' );
|
|
204 |
$aReplace = array( '{SYSVAR:AppUrl.MediaDir}', '{SYSVAR:AppUrl}', '{SYSVAR:AppUrl.MediaDir}', '{SYSVAR:AppUrl}', '\1', '\1');
|
|
203 | 205 |
while (($aEntry = $oEntrySet->fetchRow(MYSQL_ASSOC))) { |
204 | 206 |
$iCount = 0; |
205 | 207 |
$aSubject = array($aEntry['content_long'], $aEntry['content_short']); |
... | ... | |
214 | 216 |
$iRecords++; |
215 | 217 |
} |
216 | 218 |
} |
217 |
$msg[] = '['.$iRecords.'] records with ['.$iReplaced.'] SYSVAR placeholder(s) repaired'." $OK"; |
|
219 |
$msg[] = '['.$iRecords.'] records with ['.$iReplaced.'] SYSVAR placeholder(s) repaired/inserted'." $OK";
|
|
218 | 220 |
} |
219 |
try { |
|
220 |
$sql = 'UPDATE `'.$oDb->TablePrefix.'mod_news_posts` '; |
|
221 |
$sql .= 'SET `content` = REPLACE(`content`, \'"'.$oReg->AppPath.$oReg->MediaDir.'\', \'"{SYSVAR:AppPath.MediaDir}\')'; |
|
222 |
$oDb->doQuery($sql); |
|
223 |
$msg[] = 'Change internal absolute Media links into SYSVAR placeholders'." $OK"; |
|
224 |
} catch(WbDatabaseException $e) { |
|
225 |
$msg[] = ''.$oDb->get_error(); |
|
226 |
} |
|
227 |
try { |
|
228 |
$sql = 'UPDATE `'.$oDb->TablePrefix.'mod_news_posts` '; |
|
229 |
$sql .= 'SET `content` = REPLACE(`content`, \'"'.$oReg->AppPath.'\', \'"{SYSVAR:AppPath}\')'; |
|
230 |
$oDb->doQuery($sql); |
|
231 |
$msg[] = 'Change internal absolute links into SYSVAR placeholders'." $OK"; |
|
232 |
} catch(WbDatabaseException $e) { |
|
233 |
$msg[] = ''.$oDb->get_error(); |
|
234 |
} |
|
235 | 221 |
/* --- rebuild all access files ------------------------------------------------------- */ |
236 | 222 |
$aReport = array('FilesDeleted'=>0,'FilesCreated'=>0,); |
237 | 223 |
$oReorg = new m_news_Reorg(ModuleReorgAbstract::LOG_EXTENDED); |
branches/2.8.x/wb/modules/news/add.php | ||
---|---|---|
36 | 36 |
. ' </tr>'; |
37 | 37 |
$footer = ' </tbody>'.PHP_EOL |
38 | 38 |
. '</table>'.PHP_EOL |
39 |
. '<table class="page-header" style="display: [DISPLAY_PREVIOUS_NEXT_LINKS]>'.PHP_EOL |
|
39 |
. '<table class="page-header" style="display: [DISPLAY_PREVIOUS_NEXT_LINKS];">'.PHP_EOL
|
|
40 | 40 |
. ' <tbody>'.PHP_EOL |
41 | 41 |
. ' <tr>'.PHP_EOL |
42 | 42 |
. ' <td class="page-left">[PREVIOUS_PAGE_LINK]</td>'.PHP_EOL |
Also available in: Unified diff