Revision 2057
Added by darkviper almost 12 years ago
| branches/2.8.x/CHANGELOG | ||
|---|---|---|
| 11 | 11 |
! = Update/Change |
| 12 | 12 |
=============================================================================== |
| 13 | 13 |
|
| 14 |
01 Jan-2014 Build 2057 Manuela v.d.Decken(DarkViper) |
|
| 15 |
! replace filterMediaRel by filterReplaceSysvar in module/output_filter |
|
| 16 |
+ add OutputFilterApi in module/outputfilter |
|
| 17 |
! update index.php in module/output_filter |
|
| 14 | 18 |
01 Jan-2014 Build 2056 Manuela v.d.Decken(DarkViper) |
| 15 | 19 |
+ add missing EN translation for PHPMailer |
| 16 | 20 |
01 Jan-2014 Build 2055 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.4');
|
| 54 |
if(!defined('REVISION')) define('REVISION', '2056');
|
|
| 54 |
if(!defined('REVISION')) define('REVISION', '2057');
|
|
| 55 | 55 |
if(!defined('SP')) define('SP', '');
|
| branches/2.8.x/wb/modules/output_filter/OutputFilterApi.php | ||
|---|---|---|
| 1 |
<?php |
|
| 2 |
|
|
| 3 |
/* |
|
| 4 |
* To change this template, choose Tools | Templates |
|
| 5 |
* and open the template in the editor. |
|
| 6 |
*/ |
|
| 7 |
|
|
| 8 |
/** |
|
| 9 |
* OutputFilterApi.php |
|
| 10 |
* |
|
| 11 |
* @category Core |
|
| 12 |
* @package Core_package |
|
| 13 |
* @subpackage Name of the subpackage if needed |
|
| 14 |
* @copyright Manuela v.d.Decken <manuela@isteam.de> |
|
| 15 |
* @author Manuela v.d.Decken <manuela@isteam.de> |
|
| 16 |
* @license http://www.gnu.org/licenses/gpl.html GPL License |
|
| 17 |
* @version 0.0.1 |
|
| 18 |
* @revision $Revision: $ |
|
| 19 |
* @link $HeadURL: $ |
|
| 20 |
* @lastmodified $Date: $ |
|
| 21 |
* @since File available since 25.12.2013 |
|
| 22 |
* @deprecated This file is deprecated since the ... |
|
| 23 |
* @description xyz |
|
| 24 |
*/ |
|
| 25 |
function OutputFilterApi($sFilterName, $sContent) |
|
| 26 |
{
|
|
| 27 |
$oReg = WbAdaptor::getInstance(); |
|
| 28 |
$sFilterDir = __DIR__.'/filters/filter'; |
|
| 29 |
if (!preg_match('/^[a-z][a-z0-9\-]*$/si', $sContent)) {
|
|
| 30 |
return $sContent; |
|
| 31 |
} |
|
| 32 |
if (is_readable($sFilterDir.$sFilterName.$oReg->PageExtension)) {
|
|
| 33 |
require_once($sFilterDir.$sFilterName.$oReg->PageExtension); |
|
| 34 |
$sFilterFunc = 'doFilter'.$sFilterName; |
|
| 35 |
$sContent = $sFilterFunc($sContent); |
|
| 36 |
} |
|
| 37 |
return $sContent; |
|
| 38 |
} |
|
| 39 |
|
|
| branches/2.8.x/wb/modules/output_filter/filters/filterMediaRel.php | ||
|---|---|---|
| 1 |
<?php |
|
| 2 |
/** |
|
| 3 |
* doFilterMediaRel |
|
| 4 |
* @param string to modify |
|
| 5 |
* @return string |
|
| 6 |
* Convert the Placeholder {SYSVAR:MEDIA_REL} into the real, full qualified URL
|
|
| 7 |
*/ |
|
| 8 |
function doFilterMediaRel($sContent) {
|
|
| 9 |
return str_replace('{SYSVAR:MEDIA_REL}', WB_URL.MEDIA_DIRECTORY, $sContent);
|
|
| 10 |
} |
|
| 11 | 0 | |
| branches/2.8.x/wb/modules/output_filter/filters/filterReplaceSysvar.php | ||
|---|---|---|
| 1 |
<?php |
|
| 2 |
/** |
|
| 3 |
* doFilterReplaceSysvar |
|
| 4 |
* @param string to modify |
|
| 5 |
* @return string |
|
| 6 |
* Convert the {SYSVAR:xxxx} Placeholders into their real value
|
|
| 7 |
*/ |
|
| 8 |
function doFilterReplaceSysvar($sContent) {
|
|
| 9 |
$oReg = WbAdaptor::getInstance(); |
|
| 10 |
$aSearches = array(); |
|
| 11 |
$aReplacements = array(); |
|
| 12 |
// search for all SYSVARs |
|
| 13 |
if (preg_match_all('/\{SYSVAR\:([^\}]+)\}/sU', $sContent, $aMatches)) {
|
|
| 14 |
$aMatches = array_unique($aMatches[1], SORT_STRING); |
|
| 15 |
foreach ($aMatches as $sMatch) {
|
|
| 16 |
$sTmp = ''; |
|
| 17 |
$aTmp = preg_split('/\./', $sMatch);
|
|
| 18 |
foreach ($aTmp as $sSysvar) {
|
|
| 19 |
if (!isset($oReg->{$sSysvar})) {
|
|
| 20 |
$sTmp = ''; |
|
| 21 |
break; |
|
| 22 |
} |
|
| 23 |
$sTmp .= $oReg->{$sSysvar};
|
|
| 24 |
} |
|
| 25 |
if ($sTmp) {
|
|
| 26 |
$aSearches[] = '{SYSVAR:'.$sMatch.'}';
|
|
| 27 |
$aReplacements[] = $sTmp; |
|
| 28 |
} |
|
| 29 |
} |
|
| 30 |
$sContent = str_replace($aSearches, $aReplacements, $sContent); |
|
| 31 |
} |
|
| 32 |
return $sContent; |
|
| 33 |
} |
|
| branches/2.8.x/wb/modules/output_filter/index.php | ||
|---|---|---|
| 36 | 36 |
define('OUTPUT_FILTER_AT_REPLACEMENT', $filter_settings['at_replacement']);
|
| 37 | 37 |
define('OUTPUT_FILTER_DOT_REPLACEMENT', $filter_settings['dot_replacement']);
|
| 38 | 38 |
|
| 39 |
/* ### filter type: replace MediaRel placeholder ############################ */
|
|
| 40 |
if (file_exists($sFilterDirectory.'filterMediaRel.php')) {
|
|
| 41 |
require_once($sFilterDirectory.'filterMediaRel.php');
|
|
| 42 |
$content = doFilterMediaRel($content);
|
|
| 39 |
/* ### filter type: replace Sysvar placeholder ############################## */
|
|
| 40 |
if (file_exists($sFilterDirectory.'filterReplaceSysvar.php')) {
|
|
| 41 |
require_once($sFilterDirectory.'filterReplaceSysvar.php');
|
|
| 42 |
$content = doFilterReplaceSysvar($content);
|
|
| 43 | 43 |
} |
| 44 | 44 |
/* ### filter type: change [wblinkxx] into real URLs ######################## */ |
| 45 | 45 |
if (file_exists($sFilterDirectory.'filterWbLink.php')) {
|
| ... | ... | |
| 58 | 58 |
$content = doFilterEmail($content, $output_filter_mode); |
| 59 | 59 |
} |
| 60 | 60 |
} |
| 61 |
/* ### filter type: replace MediaRel placeholder ############################ */
|
|
| 62 |
if (file_exists($sFilterDirectory.'filterMediaRel.php')) {
|
|
| 63 |
require_once($sFilterDirectory.'filterMediaRel.php');
|
|
| 64 |
$content = doFilterMediaRel($content);
|
|
| 61 |
/* ### filter type: replace Sysvar placeholder ############################## */
|
|
| 62 |
if (file_exists($sFilterDirectory.'filterReplaceSysvar.php')) {
|
|
| 63 |
require_once($sFilterDirectory.'filterReplaceSysvar.php');
|
|
| 64 |
$content = doFilterReplaceSysvar($content);
|
|
| 65 | 65 |
} |
| 66 | 66 |
/* ### filter type: change [wblinkxx] into real URLs ######################## */ |
| 67 | 67 |
if (file_exists($sFilterDirectory.'filterWbLink.php')) {
|
Also available in: Unified diff
! replace filterMediaRel by filterReplaceSysvar in module/output_filter
+ add OutputFilterApi in module/outputfilter
! update index.php in module/output_filter