Index: branches/2.8.x/CHANGELOG
===================================================================
--- branches/2.8.x/CHANGELOG	(revision 2082)
+++ branches/2.8.x/CHANGELOG	(revision 2083)
@@ -11,6 +11,10 @@
 ! = Update/Change
 ===============================================================================
 
+15 Jan-2014 Build 2083 Manuela v.d.Decken(DarkViper)
+# modules/news/upgrade manipulation of {SYSVAR:}-Tags fixed
+# modules/wysiwyg/upgrade manipulation of {SYSVAR:}-Tags fixed
+# modules/news/add default template fixed
 07 Jan-2014 Build 2082 Manuela v.d.Decken(DarkViper)
 ! added missing translation in admin/users
 ! DOC-files updated.
Index: branches/2.8.x/wb/admin/interface/version.php
===================================================================
--- branches/2.8.x/wb/admin/interface/version.php	(revision 2082)
+++ branches/2.8.x/wb/admin/interface/version.php	(revision 2083)
@@ -51,5 +51,5 @@
 
 // check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled)
 if(!defined('VERSION')) define('VERSION', '2.8.4');
-if(!defined('REVISION')) define('REVISION', '2082');
+if(!defined('REVISION')) define('REVISION', '2083');
 if(!defined('SP')) define('SP', '');
Index: branches/2.8.x/wb/modules/wysiwyg/upgrade.php
===================================================================
--- branches/2.8.x/wb/modules/wysiwyg/upgrade.php	(revision 2082)
+++ branches/2.8.x/wb/modules/wysiwyg/upgrade.php	(revision 2083)
@@ -91,49 +91,35 @@
             if (($oEntrySet = $oDb->doQuery($sql))) {
                 $iRecords = 0;
                 $iReplaced = 0;
-                $aSearch = array( '/\{SYSVAR\:MEDIA_REL\}[\/\\\\]?/sU',
-                                  '/\{SYSVAR\:WB_URL\}[\/\\\\]?/sU',
-                                  '/(\{SYSVAR\:AppUrl\.MediaDir\})[\/\\\\]?/sU',
-                                  '/(\{SYSVAR\:AppUrl\})[\/\\\\]?/sU'
+                $aSearch = array( '/\{SYSVAR\:MEDIA_REL\}\/*/s',
+                                  '/\{SYSVAR\:WB_URL\}\/*/s',
+                                  '/'.preg_quote('"'.$oReg->AppUrl.$oReg->MediaDir, '/').'*/s',
+                                  '/'.preg_quote('"'.$oReg->AppUrl, '/').'*/s',
+                                  '/(\{SYSVAR\:AppUrl\.MediaDir\})\/+/s',
+                                  '/(\{SYSVAR\:AppUrl\})\/+/s'
                                 );
-                $aReplace = array( '{SYSVAR:AppUrl.MediaDir}', '{SYSVAR:AppUrl}', '\1', '\1' );
+                $aReplace = array( '{SYSVAR:AppUrl.MediaDir}', '{SYSVAR:AppUrl}', '{SYSVAR:AppUrl.MediaDir}', '{SYSVAR:AppUrl}', '\1', '\1');
                 while (($aEntry = $oEntrySet->fetchRow(MYSQL_ASSOC))) {
                     $iCount = 0;
-                    $aEntry['content'] = preg_replace($aSearch, $aReplace, $aEntry['content'], -1, $iCount);
+                    $aSubject = array($aEntry['content_long'], $aEntry['content_short']);
+                    $aNewContents = preg_replace($aSearch, $aReplace, $aSubject, -1, $iCount);
                     if ($iCount > 0) {
                         $iReplaced += $iCount;
-                        $sql = 'UPDATE `'.$oDb->TablePrefix.'mod_wysiwyg` '
-                             . 'SET `content`=\''.$oDb->escapeString($aEntry['content']).'\' '
-                             . 'WHERE `section_id`='.$aEntry['section_id'];
+                        $sql = 'UPDATE `'.$oDb->TablePrefix.'mod_news_posts` '
+                             . 'SET `content_long`=\''.$oDb->escapeString($aNewContents[0]).'\', '
+                             .     '`content_short`=\''.$oDb->escapeString($aNewContents[1]).'\' '
+                             . 'WHERE `post_id`='.$aEntry['post_id'];
                         $oDb->doQuery($sql);
                         $iRecords++;
                     }
                 }
-                $msg[] = '['.$iRecords.'] records with ['.$iReplaced.'] SYSVAR placeholder(s) repaired'." $OK";
+                $msg[] = '['.$iRecords.'] records with ['.$iReplaced.'] SYSVAR placeholder(s) repaired/inserted'." $OK";
+// only for $callingScript upgrade-script.php
+                if($globalStarted && $bDebug) {
+                    echo '<strong>'.implode('<br />',$msg).'</strong><br />';
+                }
             }
-            try {
-                $sql  = 'UPDATE `'.$sTable.'` ';
-                $sql .= 'SET `content` = REPLACE(`content`, \'"'.$oReg->AppPath.$oReg->MediaDir.'\', \'"{SYSVAR:AppPath.MediaDir}\')';
-                $oDb->doQuery($sql);
-				$msg[] = 'Change internal absolute Media links into SYSVAR placeholders'." $OK";
-            } catch(WbDatabaseException $e) {
-				$msg[] = ''.$oDb->get_error();
-            }
-            try {
-                $sql  = 'UPDATE `'.$sTable.'` ';
-                $sql .= 'SET `content` = REPLACE(`content`, \'"'.$oReg->AppPath.'\', \'"{SYSVAR:AppPath}\')';
-                $oDb->doQuery($sql);
-				$msg[] = 'Change internal absolute links into SYSVAR placeholders'." $OK";
-            } catch(WbDatabaseException $e) {
-				$msg[] = ''.$oDb->get_error();
-            }
-// only for $callingScript upgrade-script.php
-			if($globalStarted) {
-				if($bDebug) {
-					echo '<strong>'.implode('<br />',$msg).'</strong><br />';
-				}
-			}
-		}
+        }
 		$msg[] = 'WYSIWYG upgrade successfull finished'." $OK";
 		if($globalStarted) {
 			echo "<strong>WYSIWYG upgrade successfull finished $OK</strong><br />";
Index: branches/2.8.x/wb/modules/news/upgrade.php
===================================================================
--- branches/2.8.x/wb/modules/news/upgrade.php	(revision 2082)
+++ branches/2.8.x/wb/modules/news/upgrade.php	(revision 2083)
@@ -194,12 +194,14 @@
         if (($oEntrySet = $oDb->doQuery($sql))) {
             $iRecords = 0;
             $iReplaced = 0;
-            $aSearch = array( '/\{SYSVAR\:MEDIA_REL\}[\/\\\\]?/sU',
-                              '/\{SYSVAR\:WB_URL\}[\/\\\\]?/sU',
-                              '/(\{SYSVAR\:AppUrl\.MediaDir\})[\/\\\\]?/sU',
-                              '/(\{SYSVAR\:AppUrl\})[\/\\\\]?/sU'
+            $aSearch = array( '/\{SYSVAR\:MEDIA_REL\}\/*/s',
+                              '/\{SYSVAR\:WB_URL\}\/*/s',
+                              '/'.preg_quote('"'.$oReg->AppUrl.$oReg->MediaDir, '/').'*/s',
+                              '/'.preg_quote('"'.$oReg->AppUrl, '/').'*/s',
+                              '/(\{SYSVAR\:AppUrl\.MediaDir\})\/+/s',
+                              '/(\{SYSVAR\:AppUrl\})\/+/s'
                             );
-            $aReplace = array( '{SYSVAR:AppUrl.MediaDir}', '{SYSVAR:AppUrl}', '\1', '\1' );
+            $aReplace = array( '{SYSVAR:AppUrl.MediaDir}', '{SYSVAR:AppUrl}', '{SYSVAR:AppUrl.MediaDir}', '{SYSVAR:AppUrl}', '\1', '\1');
             while (($aEntry = $oEntrySet->fetchRow(MYSQL_ASSOC))) {
                 $iCount = 0;
                 $aSubject = array($aEntry['content_long'], $aEntry['content_short']);
@@ -214,24 +216,8 @@
                     $iRecords++;
                 }
             }
-            $msg[] = '['.$iRecords.'] records with ['.$iReplaced.'] SYSVAR placeholder(s) repaired'." $OK";
+            $msg[] = '['.$iRecords.'] records with ['.$iReplaced.'] SYSVAR placeholder(s) repaired/inserted'." $OK";
         }
-        try {
-            $sql  = 'UPDATE `'.$oDb->TablePrefix.'mod_news_posts` ';
-            $sql .= 'SET `content` = REPLACE(`content`, \'"'.$oReg->AppPath.$oReg->MediaDir.'\', \'"{SYSVAR:AppPath.MediaDir}\')';
-            $oDb->doQuery($sql);
-            $msg[] = 'Change internal absolute Media links into SYSVAR placeholders'." $OK";
-        } catch(WbDatabaseException $e) {
-            $msg[] = ''.$oDb->get_error();
-        }
-        try {
-            $sql  = 'UPDATE `'.$oDb->TablePrefix.'mod_news_posts` ';
-            $sql .= 'SET `content` = REPLACE(`content`, \'"'.$oReg->AppPath.'\', \'"{SYSVAR:AppPath}\')';
-            $oDb->doQuery($sql);
-            $msg[] = 'Change internal absolute links into SYSVAR placeholders'." $OK";
-        } catch(WbDatabaseException $e) {
-            $msg[] = ''.$oDb->get_error();
-        }
 /* --- rebuild all access files ------------------------------------------------------- */
 		$aReport = array('FilesDeleted'=>0,'FilesCreated'=>0,);
 		$oReorg = new m_news_Reorg(ModuleReorgAbstract::LOG_EXTENDED);
Index: branches/2.8.x/wb/modules/news/add.php
===================================================================
--- branches/2.8.x/wb/modules/news/add.php	(revision 2082)
+++ branches/2.8.x/wb/modules/news/add.php	(revision 2083)
@@ -36,7 +36,7 @@
 	             . '    </tr>';
 	$footer      = '  </tbody>'.PHP_EOL
 	             . '</table>'.PHP_EOL
-	             . '<table class="page-header" style="display: [DISPLAY_PREVIOUS_NEXT_LINKS]>'.PHP_EOL
+	             . '<table class="page-header" style="display: [DISPLAY_PREVIOUS_NEXT_LINKS];">'.PHP_EOL
 	             . '  <tbody>'.PHP_EOL
 	             . '    <tr>'.PHP_EOL
 	             . '      <td class="page-left">[PREVIOUS_PAGE_LINK]</td>'.PHP_EOL
