Index: branches/2.8.x/CHANGELOG
===================================================================
--- branches/2.8.x/CHANGELOG	(revision 2056)
+++ branches/2.8.x/CHANGELOG	(revision 2057)
@@ -11,6 +11,10 @@
 ! = Update/Change
 ===============================================================================
 
+01 Jan-2014 Build 2057 Manuela v.d.Decken(DarkViper)
+! replace filterMediaRel by filterReplaceSysvar in module/output_filter
++ add OutputFilterApi in module/outputfilter
+! update index.php in module/output_filter
 01 Jan-2014 Build 2056 Manuela v.d.Decken(DarkViper)
 + add missing EN translation for PHPMailer
 01 Jan-2014 Build 2055 Dietmar Woellbrink (Luisehahne)
Index: branches/2.8.x/wb/admin/interface/version.php
===================================================================
--- branches/2.8.x/wb/admin/interface/version.php	(revision 2056)
+++ branches/2.8.x/wb/admin/interface/version.php	(revision 2057)
@@ -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', '2056');
+if(!defined('REVISION')) define('REVISION', '2057');
 if(!defined('SP')) define('SP', '');
Index: branches/2.8.x/wb/modules/output_filter/OutputFilterApi.php
===================================================================
--- branches/2.8.x/wb/modules/output_filter/OutputFilterApi.php	(nonexistent)
+++ branches/2.8.x/wb/modules/output_filter/OutputFilterApi.php	(revision 2057)
@@ -0,0 +1,39 @@
+<?php
+
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/**
+ * OutputFilterApi.php
+ *
+ * @category     Core
+ * @package      Core_package
+ * @subpackage   Name of the subpackage if needed
+ * @copyright    Manuela v.d.Decken <manuela@isteam.de>
+ * @author       Manuela v.d.Decken <manuela@isteam.de>
+ * @license      http://www.gnu.org/licenses/gpl.html   GPL License
+ * @version      0.0.1
+ * @revision     $Revision: $
+ * @link         $HeadURL: $
+ * @lastmodified $Date: $
+ * @since        File available since 25.12.2013
+ * @deprecated   This file is deprecated since the  ...
+ * @description xyz
+ */
+function OutputFilterApi($sFilterName, $sContent)
+{
+    $oReg = WbAdaptor::getInstance();
+    $sFilterDir = __DIR__.'/filters/filter';
+    if (!preg_match('/^[a-z][a-z0-9\-]*$/si', $sContent)) {
+        return $sContent;
+    }
+    if (is_readable($sFilterDir.$sFilterName.$oReg->PageExtension)) {
+        require_once($sFilterDir.$sFilterName.$oReg->PageExtension);
+        $sFilterFunc = 'doFilter'.$sFilterName;
+        $sContent = $sFilterFunc($sContent);
+    }
+    return $sContent;
+}
+
Index: branches/2.8.x/wb/modules/output_filter/filters/filterMediaRel.php
===================================================================
--- branches/2.8.x/wb/modules/output_filter/filters/filterMediaRel.php	(revision 2056)
+++ branches/2.8.x/wb/modules/output_filter/filters/filterMediaRel.php	(nonexistent)
@@ -1,10 +0,0 @@
-<?php
-/**
- * doFilterMediaRel
- * @param string to modify
- * @return string
- * Convert the Placeholder {SYSVAR:MEDIA_REL} into the real, full qualified URL
- */
-	function doFilterMediaRel($sContent) {
-		return str_replace('{SYSVAR:MEDIA_REL}', WB_URL.MEDIA_DIRECTORY, $sContent);
-	}
\ No newline at end of file

Property changes on: branches/2.8.x/wb/modules/output_filter/filters/filterMediaRel.php
___________________________________________________________________
Deleted: svn:eol-style
## -1 +0,0 ##
-native
\ No newline at end of property
Deleted: svn:keywords
## -1 +0,0 ##
-Date Author Id Revision HeadURL
\ No newline at end of property
Index: branches/2.8.x/wb/modules/output_filter/filters/filterReplaceSysvar.php
===================================================================
--- branches/2.8.x/wb/modules/output_filter/filters/filterReplaceSysvar.php	(nonexistent)
+++ branches/2.8.x/wb/modules/output_filter/filters/filterReplaceSysvar.php	(revision 2057)
@@ -0,0 +1,33 @@
+<?php
+/**
+ * doFilterReplaceSysvar
+ * @param string to modify
+ * @return string
+ * Convert the {SYSVAR:xxxx} Placeholders into their real value
+ */
+	function doFilterReplaceSysvar($sContent) {
+        $oReg = WbAdaptor::getInstance();
+        $aSearches = array();
+        $aReplacements = array();
+        // search for all SYSVARs
+        if (preg_match_all('/\{SYSVAR\:([^\}]+)\}/sU', $sContent, $aMatches)) {
+            $aMatches = array_unique($aMatches[1], SORT_STRING);
+            foreach ($aMatches as $sMatch) {
+                $sTmp = '';
+                $aTmp = preg_split('/\./', $sMatch);
+                foreach ($aTmp as $sSysvar) {
+                    if (!isset($oReg->{$sSysvar})) {
+                        $sTmp = '';
+                        break;
+                    }
+                    $sTmp .= $oReg->{$sSysvar};
+                }
+                if ($sTmp) {
+                    $aSearches[] = '{SYSVAR:'.$sMatch.'}';
+                    $aReplacements[] = $sTmp;
+                }
+            }
+            $sContent = str_replace($aSearches, $aReplacements, $sContent);
+        }
+		return $sContent;
+	}
Index: branches/2.8.x/wb/modules/output_filter/index.php
===================================================================
--- branches/2.8.x/wb/modules/output_filter/index.php	(revision 2056)
+++ branches/2.8.x/wb/modules/output_filter/index.php	(revision 2057)
@@ -36,10 +36,10 @@
 		define('OUTPUT_FILTER_AT_REPLACEMENT', $filter_settings['at_replacement']);
 		define('OUTPUT_FILTER_DOT_REPLACEMENT', $filter_settings['dot_replacement']);
 
-/* ### filter type: replace MediaRel placeholder ############################ */
-		if (file_exists($sFilterDirectory.'filterMediaRel.php')) {
-			require_once($sFilterDirectory.'filterMediaRel.php');
-			$content = doFilterMediaRel($content);
+/* ### filter type: replace Sysvar placeholder ############################## */
+		if (file_exists($sFilterDirectory.'filterReplaceSysvar.php')) {
+			require_once($sFilterDirectory.'filterReplaceSysvar.php');
+			$content = doFilterReplaceSysvar($content);
 		}
 /* ### filter type: change [wblinkxx] into real URLs ######################## */
 		if (file_exists($sFilterDirectory.'filterWbLink.php')) {
@@ -58,10 +58,10 @@
 				$content = doFilterEmail($content, $output_filter_mode);
 			}
 		}
-/* ### filter type: replace MediaRel placeholder ############################ */
-		if (file_exists($sFilterDirectory.'filterMediaRel.php')) {
-			require_once($sFilterDirectory.'filterMediaRel.php');
-			$content = doFilterMediaRel($content);
+/* ### filter type: replace Sysvar placeholder ############################## */
+		if (file_exists($sFilterDirectory.'filterReplaceSysvar.php')) {
+			require_once($sFilterDirectory.'filterReplaceSysvar.php');
+			$content = doFilterReplaceSysvar($content);
 		}
 /* ### filter type: change [wblinkxx] into real URLs ######################## */
 		if (file_exists($sFilterDirectory.'filterWbLink.php')) {
