Fixed bug #13649: Deprecated function sql_regcase in cms/tslib/class.tslib_pagegen...
authorSteffen Kamper <info@sk-typo3.de>
Tue, 27 Jul 2010 21:13:19 +0000 (21:13 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Tue, 27 Jul 2010 21:13:19 +0000 (21:13 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@8295 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/cms/tslib/class.tslib_content.php
typo3/sysext/cms/tslib/class.tslib_pagegen.php

index 7922a88..348e02f 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-07-27  Steffen Kamper  <steffen@typo3.org>
+
+       * Fixed bug #13649: Deprecated function sql_regcase in cms/tslib/class.tslib_pagegen.php (Thanks to Martin Müller)
+
 2010-07-27  Susanne Moog  <typo3@susanne-moog.de>
 
        * Fixed bug #15147: Inconsistent icon usage for Edit Page Properties (thanks to Georg Ringer)
index e0aeea6..c74be97 100644 (file)
@@ -5024,7 +5024,12 @@ class tslib_cObj {
                                                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],'>'))   {
index bfc2b74..110b4cf 100644 (file)
@@ -163,17 +163,11 @@ See <a href="http://wiki.typo3.org/index.php/TYPO3_3.8.1" target="_blank">wiki.t
                $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);