Bug #22178 » patch_13649_1.diff
typo3/sysext/cms/tslib/class.tslib_content.php (Arbeitskopie) | ||
---|---|---|
if ($GLOBALS['TSFE']->no_cache && $conf['sword'] && is_array($GLOBALS['TSFE']->sWordList) && $GLOBALS['TSFE']->sWordRegEx) {
|
||
$newstring = '';
|
||
do {
|
||
$pieces = preg_split('/' . $GLOBALS['TSFE']->sWordRegEx . '/', $data, 2);
|
||
$pregSplitMode = 'i';
|
||
if (isset($GLOBALS['TSFE']->config['config']['sword_noMixedCase']) && !empty($GLOBALS['TSFE']->config['config']['sword_noMixedCase'])) {
|
||
$pregSplitMode = '';
|
||
}
|
||
$pieces = preg_split('/' . $GLOBALS['TSFE']->sWordRegEx . '/'.$pregSplitMode, $data, 2);
|
||
$newstring.=$pieces[0];
|
||
$match_len = strlen($data)-(strlen($pieces[0])+strlen($pieces[1]));
|
||
if (strstr($pieces[0],'<') || strstr($pieces[0],'>')) {
|
typo3/sysext/cms/tslib/class.tslib_pagegen.php (Arbeitskopie) | ||
---|---|---|
$GLOBALS['TSFE']->sWordRegEx='';
|
||
$GLOBALS['TSFE']->sWordList = t3lib_div::_GP('sword_list');
|
||
if (is_array($GLOBALS['TSFE']->sWordList)) {
|
||
$standAlone = trim(''.$GLOBALS['TSFE']->config['config']['sword_standAlone']);
|
||
$noMixedCase = trim(''.$GLOBALS['TSFE']->config['config']['sword_noMixedCase']);
|
||
$space = (!empty($GLOBALS['TSFE']->config['config']['sword_standAlone'])) ? '[[:space:]]' : '';
|
||
$space = ($standAlone) ? '[[:space:]]' : '';
|
||
foreach ($GLOBALS['TSFE']->sWordList as $val) {
|
||
if (trim($val)) {
|
||
if (!$noMixedCase) {
|
||
$GLOBALS['TSFE']->sWordRegEx.= $space.sql_regcase(quotemeta($val)).$space.'|';
|
||
} else {
|
||
if (strlen(trim($val)) > 0) {
|
||
$GLOBALS['TSFE']->sWordRegEx.= $space.quotemeta($val).$space.'|';
|
||
}
|
||
}
|
||
}
|
||
$GLOBALS['TSFE']->sWordRegEx = preg_replace('/\|$/','',$GLOBALS['TSFE']->sWordRegEx);
|