diff -u --recursive --new-file typo3_src-4.2.8/t3lib/class.gzip_encode.php typo3_src-4.2.8-php5.3-compat/t3lib/class.gzip_encode.php --- typo3_src-4.2.8/t3lib/class.gzip_encode.php 2009-07-03 21:55:04.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/t3lib/class.gzip_encode.php 2009-07-09 16:37:53.000000000 +0200 @@ -364,7 +364,7 @@ function freebsd_loadavg() { $buffer= `uptime`; $load = array(); - ereg("averag(es|e): ([0-9][.][0-9][0-9]), ([0-9][.][0-9][0-9]), ([0-9][.][0-9][0-9]*)", $buffer, $load); + preg_match("/averag(es|e): ([0-9][.][0-9][0-9]), ([0-9][.][0-9][0-9]), ([0-9][.][0-9][0-9]*)/", $buffer, $load); return max((float)$load[2], (float)$load[3], (float)$load[4]); } diff -u --recursive --new-file typo3_src-4.2.8/t3lib/class.t3lib_arraybrowser.php typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_arraybrowser.php --- typo3_src-4.2.8/t3lib/class.t3lib_arraybrowser.php 2009-07-03 21:55:04.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_arraybrowser.php 2009-07-09 16:28:09.000000000 +0200 @@ -203,7 +203,7 @@ $deeper = is_array($keyArr[$key]); if ($this->regexMode) { - if (ereg($searchString,$keyArr[$key]) || ($this->searchKeysToo && ereg($searchString,$key))) { $this->searchKeys[$depth]=1; } + if (preg_match("/$searchString/",$keyArr[$key]) || ($this->searchKeysToo && preg_match("/$searchString/",$key))) { $this->searchKeys[$depth]=1; } } else { if (stristr($keyArr[$key],$searchString) || ($this->searchKeysToo && stristr($key,$searchString))) { $this->searchKeys[$depth]=1; } } diff -u --recursive --new-file typo3_src-4.2.8/t3lib/class.t3lib_befunc.php typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_befunc.php --- typo3_src-4.2.8/t3lib/class.t3lib_befunc.php 2009-07-03 21:55:04.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_befunc.php 2009-07-09 16:15:31.000000000 +0200 @@ -1010,7 +1010,7 @@ if (count($specConfParts)) { foreach($specConfParts as $k2 => $v2) { unset($specConfParts[$k2]); - if (ereg('(.*)\[(.*)\]', $v2, $reg)) { + if (preg_match('/(.*)\[(.*)\]/', $v2, $reg)) { $specConfParts[trim($reg[1])] = array( 'parameters' => t3lib_div::trimExplode('|', $reg[2], 1) ); @@ -1827,7 +1827,7 @@ $parts[] = $LANG->sL($TCA['pages']['columns']['mount_pid_ol']['label']); } } - if ($row['nav_hide']) $parts[] = ereg_replace(':$', '', $LANG->sL($TCA['pages']['columns']['nav_hide']['label'])); + if ($row['nav_hide']) $parts[] = preg_replace('/:$/', '', $LANG->sL($TCA['pages']['columns']['nav_hide']['label'])); if ($row['hidden']) $parts[] = $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.hidden'); if ($row['starttime']) $parts[] = $LANG->sL($TCA['pages']['columns']['starttime']['label']).' '.t3lib_BEfunc::dateTimeAge($row['starttime'], -1, 'date'); if ($row['endtime']) $parts[] = $LANG->sL($TCA['pages']['columns']['endtime']['label']).' '.t3lib_BEfunc::dateTimeAge($row['endtime'], -1, 'date'); @@ -3183,7 +3183,7 @@ if (is_array($dRec)) { reset($dRec); $dRecord = current($dRec); - return ereg_replace('\/$', '', $dRecord['domainName']); + return preg_replace('/\/$/', '', $dRecord['domainName']); } } } @@ -3200,9 +3200,9 @@ public static function getDomainStartPage($domain, $path = '') { if (t3lib_extMgm::isLoaded('cms')) { $domain = explode(':', $domain); - $domain = strtolower(ereg_replace('\.$', '', $domain[0])); + $domain = strtolower(preg_replace('/\.$/', '', $domain[0])); // path is calculated. - $path = trim(ereg_replace('\/[^\/]*$', '', $path)); + $path = trim(preg_replace('/\/[^\/]*$/', '', $path)); // stuff: $domain.=$path; @@ -3335,7 +3335,7 @@ foreach($keyList as $val) { $reg = array(); - if (ereg('^([[:alnum:]_-]+)\[(.*)\]$', $val, $reg)) { + if (preg_match('/^([[:alnum:]_-]+)\[(.*)\]$/', $val, $reg)) { $output[$reg[1]] = t3lib_div::trimExplode(';', $reg[2], 1); } else { $output[$val] = ''; diff -u --recursive --new-file typo3_src-4.2.8/t3lib/class.t3lib_cs.php typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_cs.php --- typo3_src-4.2.8/t3lib/class.t3lib_cs.php 2009-07-03 21:55:04.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_cs.php 2009-07-09 18:02:12.000000000 +0200 @@ -801,7 +801,7 @@ } $token = md5(microtime()); - $parts = explode($token,ereg_replace('(&([#[:alnum:]]*);)',$token.'\2'.$token,$str)); + $parts = explode($token,preg_replace('/(&([#[:alnum:]]*);)/',$token.'\2'.$token,$str)); foreach($parts as $k => $v) { if ($k%2) { if (substr($v,0,1)=='#') { // Dec or hex entities: @@ -993,13 +993,13 @@ // Detect type if not done yet: (Done on first real line) // The "whitespaced" type is on the syntax "0x0A 0x000A #LINE FEED" while "ms-token" is like "B9 = U+00B9 : SUPERSCRIPT ONE" - if (!$detectedType) $detectedType = ereg('[[:space:]]*0x([[:alnum:]]*)[[:space:]]+0x([[:alnum:]]*)[[:space:]]+',$value) ? 'whitespaced' : 'ms-token'; + if (!$detectedType) $detectedType = preg_match('/[[:space:]]*0x([[:alnum:]]*)[[:space:]]+0x([[:alnum:]]*)[[:space:]]+/',$value) ? 'whitespaced' : 'ms-token'; if ($detectedType=='ms-token') { - list($hexbyte,$utf8) = split('=|:',$value,3); + list($hexbyte,$utf8) = preg_split('/=|:/',$value,3); } elseif ($detectedType=='whitespaced') { $regA=array(); - ereg('[[:space:]]*0x([[:alnum:]]*)[[:space:]]+0x([[:alnum:]]*)[[:space:]]+',$value,$regA); + preg_match('/[[:space:]]*0x([[:alnum:]]*)[[:space:]]+0x([[:alnum:]]*)[[:space:]]+/',$value,$regA); $hexbyte = $regA[1]; $utf8 = 'U+'.$regA[2]; } @@ -1080,7 +1080,7 @@ while (!feof($fh)) { $line = fgets($fh,4096); // has a lot of info - list($char,$name,$cat,,,$decomp,,,$num,,,,$upper,$lower,$title,) = split(';', rtrim($line)); + list($char,$name,$cat,,,$decomp,,,$num,,,,$upper,$lower,$title,) = explode(';', rtrim($line)); $ord = hexdec($char); if ($ord > 0xFFFF) break; // only process the BMP @@ -1103,7 +1103,7 @@ // accented Latin letters without "official" decomposition $match = array(); - if (ereg('^LATIN (SMALL|CAPITAL) LETTER ([A-Z]) WITH',$name,$match) && !$decomp) { + if (preg_match('/^LATIN (SMALL|CAPITAL) LETTER ([A-Z]) WITH/',$name,$match) && !$decomp) { $c = ord($match[2]); if ($match[1] == 'SMALL') $c += 32; @@ -1112,7 +1112,7 @@ } $match = array(); - if (ereg('(<.*>)? *(.+)',$decomp,$match)) { + if (preg_match('/(<.*>)?\s*(.+)/',$decomp,$match)) { switch($match[1]) { case '': // add parenthesis as circle replacement, eg (1) $match[2] = '0028 '.$match[2].' 0029'; @@ -1123,7 +1123,7 @@ break; case '': // ignore multi char decompositions that start with a space - if (ereg('^0020 ',$match[2])) continue 2; + if (preg_match('/^0020/ ',$match[2])) continue 2; break; // ignore Arabic and vertical layout presentation decomposition @@ -1134,7 +1134,7 @@ case '': continue 2; } - $decomposition["U+$char"] = split(' ',$match[2]); + $decomposition["U+$char"] = explode(' ',$match[2]); } } fclose($fh); @@ -1152,17 +1152,17 @@ if ($cond == '' || $cond{0} == '#') { $utf8_char = $this->UnumberToChar(hexdec($char)); if ($char != $lower) { - $arr = split(' ',$lower); + $arr = explode(' ',$lower); for ($i=0; isset($arr[$i]); $i++) $arr[$i] = $this->UnumberToChar(hexdec($arr[$i])); $utf8CaseFolding['toLower'][$utf8_char] = implode('',$arr); } if ($char != $title && $title != $upper) { - $arr = split(' ',$title); + $arr = explode(' ',$title); for ($i=0; isset($arr[$i]); $i++) $arr[$i] = $this->UnumberToChar(hexdec($arr[$i])); $utf8CaseFolding['toTitle'][$utf8_char] = implode('',$arr); } if ($char != $upper) { - $arr = split(' ',$upper); + $arr =explode(' ',$upper); for ($i=0; isset($arr[$i]); $i++) $arr[$i] = $this->UnumberToChar(hexdec($arr[$i])); $utf8CaseFolding['toUpper'][$utf8_char] = implode('',$arr); } @@ -1183,7 +1183,7 @@ if ($line{0} != '#' && trim($line) != '') { list($char,$translit) = t3lib_div::trimExplode(';', $line); if (!$translit) $omit["U+$char"] = 1; - $decomposition["U+$char"] = split(' ', $translit); + $decomposition["U+$char"] = explode(' ', $translit); } } diff -u --recursive --new-file typo3_src-4.2.8/t3lib/class.t3lib_div.php typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_div.php --- typo3_src-4.2.8/t3lib/class.t3lib_div.php 2009-07-03 21:55:04.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_div.php 2009-07-09 18:52:38.000000000 +0200 @@ -1070,7 +1070,7 @@ */ public static function split_fileref($fileref) { $reg = array(); - if ( ereg('(.*/)(.*)$',$fileref,$reg) ) { + if ( preg_match('/(.*\/)(.*)$/',$fileref,$reg) ) { $info['path'] = $reg[1]; $info['file'] = $reg[2]; } else { @@ -1078,7 +1078,7 @@ $info['file'] = $fileref; } $reg=''; - if ( ereg('(.*)\.([^\.]*$)',$info['file'],$reg) ) { + if ( preg_match('/(.*)\.([^\.]*$)/',$info['file'],$reg) ) { $info['filebody'] = $reg[1]; $info['fileext'] = strtolower($reg[2]); $info['realFileext'] = $reg[2]; @@ -1154,7 +1154,7 @@ * @return string */ public static function rm_endcomma($string) { - return ereg_replace(',$','',$string); + return preg_replace('/,$/','',$string); } /** @@ -1294,7 +1294,7 @@ * @see calcParenthesis() */ public static function calcPriority($string) { - $string=ereg_replace('[[:space:]]*','',$string); // removing all whitespace + $string=preg_replace('/[[:space:]]*/','',$string); // removing all whitespace $string='+'.$string; // Ensuring an operator for the first entrance $qm='\*\/\+-^%'; $regex = '(['.$qm.'])(['.$qm.']?[0-9\.]*)'; @@ -1377,7 +1377,7 @@ * @return string Converted result. */ public static function deHSCentities($str) { - return ereg_replace('&([#[:alnum:]]*;)','&\1',$str); + return preg_replace('/&([#[:alnum:]]*;)/','&\1',$str); } /** @@ -1430,7 +1430,7 @@ if (strpos($email,' ') !== false) { return false; } - return ereg('^[A-Za-z0-9\._-]+[@][A-Za-z0-9\._-]+[\.].[A-Za-z0-9]+$',$email) ? TRUE : FALSE; + return preg_match('/^[A-Za-z0-9\._-]+[@][A-Za-z0-9\._-]+[\.].[A-Za-z0-9]+$/',$email) ? TRUE : FALSE; } /** @@ -1963,7 +1963,7 @@ $name = ''; } } else { - if ($key = strtolower(ereg_replace('[^a-zA-Z0-9]','',$val))) { + if ($key = strtolower(preg_replace('/[^a-zA-Z0-9]/','',$val))) { $attributes[$key] = ''; $name = $key; } @@ -1985,9 +1985,9 @@ * @return array Array with the attribute values. */ public static function split_tag_attributes($tag) { - $tag_tmp = trim(eregi_replace ('^<[^[:space:]]*','',trim($tag))); + $tag_tmp = trim(preg_replace ('/^<[^[:space:]]*/i','',trim($tag))); // Removes any > in the end of the string - $tag_tmp = trim(eregi_replace ('>$','',$tag_tmp)); + $tag_tmp = trim(preg_replace ('/>$/i','',$tag_tmp)); $value = array(); while (strcmp($tag_tmp,'')) { // Compared with empty string instead , 030102 @@ -2001,7 +2001,7 @@ $tag_tmp = trim(substr($tag_tmp,1)); // Removes = chars. } else { // There are '' around the value. We look for the next ' ' or '>' - $reg = split('[[:space:]=]',$tag_tmp,2); + $reg = preg_split('/[[:space:]=]/',$tag_tmp,2); $value[] = trim($reg[0]); $tag_tmp = trim(substr($tag_tmp,strlen($reg[0]),1).$reg[1]); } @@ -2252,7 +2252,7 @@ } // The tag name is cleaned up so only alphanumeric chars (plus - and _) are in there and not longer than 100 chars either. - $tagName = substr(ereg_replace('[^[:alnum:]_-]','',$tagName),0,100); + $tagName = substr(preg_replace('/[^[:alnum:]_-]/','',$tagName),0,100); // If the value is an array then we will call this function recursively: if (is_array($v)) { @@ -2781,7 +2781,7 @@ // Checking if the "subdir" is found: $subdir = substr($fI['dirname'],strlen($dirName)); if ($subdir) { - if (ereg('^[[:alnum:]_]+\/$',$subdir) || ereg('^[[:alnum:]_]+\/[[:alnum:]_]+\/$',$subdir)) { + if (preg_match("/^[[:alnum:]_]+\/$/",$subdir) || preg_match("/^[[:alnum:]_]+\/[[:alnum:]_]+\/$/",$subdir)) { $dirName.= $subdir; if (!@is_dir($dirName)) { t3lib_div::mkdir_deep(PATH_site.'typo3temp/', $subdir); @@ -2916,7 +2916,7 @@ // Initialize variabels: $filearray = array(); $sortarray = array(); - $path = ereg_replace('\/$','',$path); + $path = preg_replace('/\/$/','',$path); // Find files+directories: if (@is_dir($path)) { @@ -3334,7 +3334,7 @@ $pString = t3lib_div::implodeArrayForUrl('', $params); - return $pString ? $parts . '?' . ereg_replace('^&', '', $pString) : $parts; + return $pString ? $parts . '?' . preg_replace('/^&/', '', $pString) : $parts; } /** @@ -3458,7 +3458,7 @@ list($v,$n) = explode('|',$GLOBALS['TYPO3_CONF_VARS']['SYS']['requestURIvar']); $retVal = $GLOBALS[$v][$n]; } elseif (!$_SERVER['REQUEST_URI']) { // This is for ISS/CGI which does not have the REQUEST_URI available. - $retVal = '/'.ereg_replace('^/','',t3lib_div::getIndpEnv('SCRIPT_NAME')). + $retVal = '/'.preg_replace('/^\//','',t3lib_div::getIndpEnv('SCRIPT_NAME')). ($_SERVER['QUERY_STRING']?'?'.$_SERVER['QUERY_STRING']:''); } else { $retVal = $_SERVER['REQUEST_URI']; @@ -3684,11 +3684,11 @@ break; case 'msie': $tmp = strstr($useragent,'MSIE'); - $bInfo['VERSION'] = doubleval(ereg_replace('^[^0-9]*','',substr($tmp,4))); + $bInfo['VERSION'] = doubleval(preg_replace('/^[^0-9]*/','',substr($tmp,4))); break; case 'opera': $tmp = strstr($useragent,'Opera'); - $bInfo['VERSION'] = doubleval(ereg_replace('^[^0-9]*','',substr($tmp,5))); + $bInfo['VERSION'] = doubleval(preg_replace('/^[^0-9]*/','',substr($tmp,5))); break; case 'konqu': $tmp = strstr($useragent,'Konqueror/'); @@ -3857,7 +3857,7 @@ */ public static function verifyFilenameAgainstDenyPattern($filename) { if (strcmp($filename,'') && strcmp($GLOBALS['TYPO3_CONF_VARS']['BE']['fileDenyPattern'],'')) { - $result = eregi($GLOBALS['TYPO3_CONF_VARS']['BE']['fileDenyPattern'],$filename); + $result = preg_match("/".$GLOBALS['TYPO3_CONF_VARS']['BE']['fileDenyPattern']."/i",$filename); if ($result) return false; // so if a matching filename is found, return false; } return true; @@ -4035,7 +4035,7 @@ $file = t3lib_div::getFileAbsFileName($fileRef); if ($file) { - $baseFile = preg_replace('/\.(php|xml)$/', '', $file); + $baseFile = preg_replace("/\.(php|xml)$/", '', $file); if (@is_file($baseFile.'.xml')) { $LOCAL_LANG = t3lib_div::readLLXMLfile($baseFile.'.xml', $langKey, $charset); @@ -4979,7 +4979,7 @@ list($type,$destination) = explode(',',$log,3); if ($type == 'syslog') { - define_syslog_variables(); +// define_syslog_variables(); // depracted in php 5.3 if (TYPO3_OS == 'WIN') { $facility = LOG_USER; } else { @@ -5184,12 +5184,12 @@ if($quoteActive > -1) { $paramsArr[$quoteActive] .= ' '.$v; unset($paramsArr[$k]); - if(ereg('"$', $v)) { $quoteActive = -1; } + if(preg_match('/"$/', $v)) { $quoteActive = -1; } } elseif(!trim($v)) { unset($paramsArr[$k]); // Remove empty elements - } elseif(ereg('^"', $v)) { + } elseif(preg_match('/^"/', $v)) { $quoteActive = $k; } } diff -u --recursive --new-file typo3_src-4.2.8/t3lib/class.t3lib_foldertree.php typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_foldertree.php --- typo3_src-4.2.8/t3lib/class.t3lib_foldertree.php 2009-07-03 21:55:04.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_foldertree.php 2009-07-09 16:13:38.000000000 +0200 @@ -258,7 +258,7 @@ $treeKey = key($this->tree); // Get the key for this space $LN = ($a==$c)?'blank':'line'; - $val = ereg_replace('^\./','',$val); + $val = preg_replace('=^\./=','',$val); $title = $val; $path = $files_path.$val.'/'; $webpath=t3lib_BEfunc::getPathType_web_nonweb($path); diff -u --recursive --new-file typo3_src-4.2.8/t3lib/class.t3lib_fullsearch.php typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_fullsearch.php --- typo3_src-4.2.8/t3lib/class.t3lib_fullsearch.php 2009-07-03 21:55:04.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_fullsearch.php 2009-07-09 16:38:32.000000000 +0200 @@ -674,15 +674,15 @@ $fields = $fC['config']; $fields['exclude'] = $fC['exclude']; if (is_array($fC) && $fC['label']) { - $fields['label'] = ereg_replace(":$", '', trim($GLOBALS['LANG']->sL($fC['label']))); + $fields['label'] = preg_replace("/:$/", '', trim($GLOBALS['LANG']->sL($fC['label']))); switch ($fields['type']) { case 'input': - if (eregi('int|year', $fields['eval'])) { + if (preg_match('/int|year/i', $fields['eval'])) { $fields['type'] = 'number'; - } elseif (eregi('time', $fields['eval'])) { + } elseif (preg_match('/time/i', $fields['eval'])) { $fields['type'] = 'time'; - } elseif (eregi('date', $fields['eval'])) { + } elseif (preg_match('/date/i', $fields['eval'])) { $fields['type'] = 'date'; } else { $fields['type'] = 'text'; diff -u --recursive --new-file typo3_src-4.2.8/t3lib/class.t3lib_htmlmail.php typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_htmlmail.php --- typo3_src-4.2.8/t3lib/class.t3lib_htmlmail.php 2009-07-03 21:55:04.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_htmlmail.php 2009-07-09 18:29:38.000000000 +0200 @@ -923,14 +923,14 @@ $attribRegex = $this->tag_regex(array('img','table','td','tr','body','iframe','script','input','embed')); // split the document by the beginning of the above tags - $codepieces = split($attribRegex, $html_code); + $codepieces = preg_split("/".$attribRegex."/", $html_code); $len = strlen($codepieces[0]); $pieces = count($codepieces); $reg = array(); for ($i = 1; $i < $pieces; $i++) { $tag = strtolower(strtok(substr($html_code,$len+1,10),' ')); $len += strlen($tag)+strlen($codepieces[$i])+2; - $dummy = eregi("[^>]*", $codepieces[$i], $reg); + $dummy = preg_match("/[^>]*/i", $codepieces[$i], $reg); $attributes = $this->get_tag_attributes($reg[0]); // Fetches the attributes for the tag $imageData = array(); @@ -954,10 +954,10 @@ // Extracting stylesheets $attribRegex = $this->tag_regex(array('link')); // Split the document by the beginning of the above tags - $codepieces = split($attribRegex, $html_code); + $codepieces = preg_split("/".$attribRegex."/", $html_code); $pieces = count($codepieces); for ($i = 1; $i < $pieces; $i++) { - $dummy = eregi("[^>]*", $codepieces[$i], $reg); + $dummy = preg_match("/[^>]*/i", $codepieces[$i], $reg); // fetches the attributes for the tag $attributes = $this->get_tag_attributes($reg[0]); $imageData = array(); @@ -977,13 +977,13 @@ } // fixes javascript rollovers - $codepieces = split(quotemeta(".src"), $html_code); + $codepieces = preg_split("/".quotemeta(".src")."/", $html_code); $pieces = count($codepieces); $expr = "^[^".quotemeta("\"").quotemeta("'")."]*"; for($i = 1; $i < $pieces; $i++) { $temp = $codepieces[$i]; - $temp = trim(ereg_replace("=","",trim($temp))); - ereg($expr,substr($temp,1,strlen($temp)),$reg); + $temp = trim(preg_replace("/=/","",trim($temp))); + preg_match("/".$expr."/",substr($temp,1,strlen($temp)),$reg); $imageData['ref'] = $reg[0]; $imageData['quotes'] = substr($temp,0,1); // subst_str is the string to look for, when substituting lateron @@ -1013,14 +1013,14 @@ public function extractHyperLinks() { $html_code = $this->theParts['html']['content']; $attribRegex = $this->tag_regex(array('a','form','area')); - $codepieces = split($attribRegex, $html_code); // Splits the document by the beginning of the above tags + $codepieces = preg_split("/".$attribRegex."/", $html_code); // Splits the document by the beginning of the above tags $len = strlen($codepieces[0]); $pieces = count($codepieces); for($i = 1; $i < $pieces; $i++) { $tag = strtolower(strtok(substr($html_code,$len+1,10)," ")); $len += strlen($tag) + strlen($codepieces[$i]) + 2; - $dummy = eregi("[^>]*", $codepieces[$i], $reg); + $dummy = preg_match("/[^>]*/i", $codepieces[$i], $reg); // Fetches the attributes for the tag $attributes = $this->get_tag_attributes($reg[0]); $hrefData = array(); @@ -1069,10 +1069,10 @@ if (strpos(' '.$htmlCode,'tag_regex('frame'); // Splits the document by the beginning of the above tags - $codepieces = split($attribRegex, $htmlCode, 1000000); + $codepieces = preg_split("/".$attribRegex."/", $htmlCode, 1000000); $pieces = count($codepieces); for($i = 1; $i < $pieces; $i++) { - $dummy = eregi("[^>]*", $codepieces[$i], $reg); + $dummy = preg_match("/[^>]*/i", $codepieces[$i], $reg); // Fetches the attributes for the tag $attributes = $this->get_tag_attributes($reg[0]); $frame = array(); @@ -1154,7 +1154,7 @@ $len = strcspn($textpieces[$i],chr(32).chr(9).chr(13).chr(10)); if (trim(substr($textstr,-1)) == '' && $len) { $lastChar = substr($textpieces[$i],$len-1,1); - if (!ereg("[A-Za-z0-9\/#]",$lastChar)) { + if (!preg_match("/[A-Za-z0-9\/#]/",$lastChar)) { // Included "\/" 3/12 $len--; } @@ -1193,11 +1193,11 @@ foreach($items as $key => $part) { $sub = substr($part, 0, 200); - if (ereg("cid:part[^ \"']*",$sub,$reg)) { + if (preg_match("/cid:part[^ \"']*/",$sub,$reg)) { // The position of the string $thePos = strpos($part,$reg[0]); // Finds the id of the media... - ereg("cid:part([^\.]*).*",$sub,$reg2); + preg_match("/cid:part([^\.]*).*/",$sub,$reg2); $theSubStr = $this->theParts['html']['media'][intval($reg2[1])]['absRef']; if ($thePos && $theSubStr) { // ... and substitutes the javaScript rollover image with this instead @@ -1357,7 +1357,7 @@ $info = parse_url($ref); if ($info['scheme']) { return $ref; - } elseif (eregi("^/",$ref)) { + } elseif (preg_match("/^\//i",$ref)) { $addr = parse_url($this->theParts['html']['path']); return $addr['scheme'].'://'.$addr['host'].($addr['port']?':'.$addr['port']:'').$ref; } else { @@ -1375,7 +1375,7 @@ */ public function split_fileref($fileref) { $info = array(); - if (ereg("(.*/)(.*)$", $fileref, $reg)) { + if (preg_match("/(.*\/)(.*)$/", $fileref, $reg)) { $info['path'] = $reg[1]; $info['file'] = $reg[2]; } else { @@ -1383,7 +1383,7 @@ $info['file'] = $fileref; } $reg = ''; - if (ereg("(.*)\.([^\.]*$)", $info['file'], $reg)) { + if (preg_match("/(.*)\.([^\.]*$)/", $info['file'], $reg)) { $info['filebody'] = $reg[1]; $info['fileext'] = strtolower($reg[2]); $info['realFileext'] = $reg[2]; @@ -1403,7 +1403,7 @@ */ public function extParseUrl($path) { $res = parse_url($path); - ereg("(.*/)([^/]*)$", $res['path'], $reg); + preg_match("/(.*\/)([^\/]*)$/", $res['path'], $reg); $res['filepath'] = $reg[1]; $res['filename'] = $reg[2]; return $res; @@ -1422,7 +1422,7 @@ $c = count($tags); foreach($tags as $tag) { $c--; - $regexp .= '<' . sql_regcase($tag) . "[[:space:]]" . (($c) ? '|' : ''); + $regexp .= '<' . mb_sql_regcase($tag) . "[[:space:]]" . (($c) ? '|' : ''); } return $regexp; } @@ -1438,13 +1438,13 @@ */ public function get_tag_attributes($tag) { $attributes = array(); - $tag = ltrim(eregi_replace ("^<[^ ]*","",trim($tag))); + $tag = ltrim(preg_replace ("/^<[^ ]*/i","",trim($tag))); $tagLen = strlen($tag); $safetyCounter = 100; // Find attribute while ($tag) { $value = ''; - $reg = split("[[:space:]=>]",$tag,2); + $reg = preg_split("/[[:space:]=>]/",$tag,2); $attrib = $reg[0]; $tag = ltrim(substr($tag,strlen($attrib),$tagLen)); @@ -1457,7 +1457,7 @@ $value = $reg[0]; } else { // No quotes around value - ereg("^([^[:space:]>]*)(.*)",$tag,$reg); + preg_match("/^([^[:space:]>]*)(.*)/",$tag,$reg); $value = trim($reg[1]); $tag = ltrim($reg[2]); if (substr($tag,0,1) == '>') { diff -u --recursive --new-file typo3_src-4.2.8/t3lib/class.t3lib_iconworks.php typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_iconworks.php --- typo3_src-4.2.8/t3lib/class.t3lib_iconworks.php 2009-07-03 21:55:04.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_iconworks.php 2009-07-09 16:47:56.000000000 +0200 @@ -241,13 +241,13 @@ } // Create tagged icon file name: - $iconFileName_stateTagged = ereg_replace('.([[:alnum:]]+)$', '__'.$flags.'.\1', basename($iconfile)); + $iconFileName_stateTagged = preg_replace('/\.([[:alnum:]]+)$/', '__'.$flags.'.\1', basename($iconfile)); // Check if tagged icon file name exists (a tagget icon means the icon base name with the flags added between body and extension of the filename, prefixed with underscore) if (@is_file(dirname($absfile).'/'.$iconFileName_stateTagged)) { // Look for [iconname]_xxxx.[ext] return dirname($iconfile).'/'.$iconFileName_stateTagged; } elseif ($doNotGenerateIcon) { // If no icon generation can be done, try to look for the _X icon: - $iconFileName_X = ereg_replace('.([[:alnum:]]+)$', '__x.\1', basename($iconfile)); + $iconFileName_X = preg_replace('/\.([[:alnum:]]+)$/', '__x.\1', basename($iconfile)); if (@is_file(dirname($absfile).'/'.$iconFileName_X)) { return dirname($iconfile).'/'.$iconFileName_X; } else { @@ -277,7 +277,7 @@ public static function skinImg($backPath, $src, $wHattribs = '', $outputMode = 0) { // Setting source key. If the icon is refered to inside an extension, we homogenize the prefix to "ext/": - $srcKey = ereg_replace('^(\.\.\/typo3conf\/ext|sysext|ext)\/', 'ext/', $src); + $srcKey = preg_replace('/^(\.\.\/typo3conf\/ext|sysext|ext)\//', 'ext/', $src); #if ($src!=$srcKey)debug(array($src, $srcKey)); // LOOKING for alternative icons: @@ -288,7 +288,7 @@ // Search for alternative icon automatically: $fExt = $GLOBALS['TBE_STYLES']['skinImgAutoCfg']['forceFileExtension']; $scaleFactor = $GLOBALS['TBE_STYLES']['skinImgAutoCfg']['scaleFactor'] ? $GLOBALS['TBE_STYLES']['skinImgAutoCfg']['scaleFactor'] : 1; // Scaling factor - $lookUpName = $fExt ? ereg_replace('\.[[:alnum:]]+$', '', $srcKey).'.'.$fExt : $srcKey; // Set filename to look for + $lookUpName = $fExt ? preg_replace('/\.[[:alnum:]]+$/', '', $srcKey).'.'.$fExt : $srcKey; // Set filename to look for if ($fExt && !@is_file($GLOBALS['TBE_STYLES']['skinImgAutoCfg']['absDir'] . $lookUpName)) { // fallback to original filename if icon with forced extension doesn't exists diff -u --recursive --new-file typo3_src-4.2.8/t3lib/class.t3lib_install.php typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_install.php --- typo3_src-4.2.8/t3lib/class.t3lib_install.php 2009-07-03 21:55:04.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_install.php 2009-07-09 16:16:33.000000000 +0200 @@ -773,7 +773,7 @@ } if (substr(trim($lineContent),-1)==';') { if (isset($statementArray[$statementArrayPointer])) { - if (!trim($statementArray[$statementArrayPointer]) || ($query_regex && !eregi($query_regex,trim($statementArray[$statementArrayPointer])))) { + if (!trim($statementArray[$statementArrayPointer]) || ($query_regex && !preg_match('/'.$query_regex.'/',trim($statementArray[$statementArrayPointer])))) { unset($statementArray[$statementArrayPointer]); } } @@ -799,7 +799,7 @@ $insertCount = array(); foreach ($statements as $line => $lineContent) { $reg = array(); - if (eregi('^create[[:space:]]*table[[:space:]]*[`]?([[:alnum:]_]*)[`]?',substr($lineContent,0,100),$reg)) { + if (preg_match('/^create[[:space:]]*table[[:space:]]*[`]?([[:alnum:]_]*)[`]?/i',substr($lineContent,0,100),$reg)) { $table = trim($reg[1]); if ($table) { // table names are always lowercase on Windows! @@ -815,7 +815,7 @@ $lineContent = implode(chr(10), $sqlLines); $crTables[$table] = $lineContent; } - } elseif ($insertCountFlag && eregi('^insert[[:space:]]*into[[:space:]]*[`]?([[:alnum:]_]*)[`]?',substr($lineContent,0,100),$reg)) { + } elseif ($insertCountFlag && preg_match('/^insert[[:space:]]*into[[:space:]]*[`]?([[:alnum:]_]*)[`]?/i',substr($lineContent,0,100),$reg)) { $nTable = trim($reg[1]); $insertCount[$nTable]++; } diff -u --recursive --new-file typo3_src-4.2.8/t3lib/class.t3lib_loadmodules.php typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_loadmodules.php --- typo3_src-4.2.8/t3lib/class.t3lib_loadmodules.php 2009-07-03 21:55:04.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_loadmodules.php 2009-07-09 16:51:19.000000000 +0200 @@ -368,7 +368,7 @@ global $TYPO3_LOADED_EXT; if (isset($this->absPathArray[$name])) { - return ereg_replace ('\/$', '', substr($this->absPathArray[$name],strlen(PATH_site))); + return preg_replace ('/\/$/', '', substr($this->absPathArray[$name],strlen(PATH_site))); } } @@ -385,7 +385,7 @@ */ function checkMod($name, $fullpath) { $modconf=Array(); - $path = ereg_replace ('/[^/.]+/\.\./', '/', $fullpath); // because 'path/../path' does not work + $path = preg_replace ('/\/[^\/.]+\/\.\.\//', '/', $fullpath); // because 'path/../path' does not work if (@is_dir($path) && @file_exists($path.'/conf.php')) { $MCONF = array(); $MLANG = array(); @@ -562,8 +562,8 @@ return './'; } - $baseDir = ereg_replace ('^/', '', $baseDir); // remove beginning - $destDir = ereg_replace ('^/', '', $destDir); + $baseDir = preg_replace ('/^\//', '', $baseDir); // remove beginning + $destDir = preg_replace ('/^\//', '', $destDir); $found = true; $slash_pos=0; diff -u --recursive --new-file typo3_src-4.2.8/t3lib/class.t3lib_matchcondition.php typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_matchcondition.php --- typo3_src-4.2.8/t3lib/class.t3lib_matchcondition.php 2009-07-03 21:55:04.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_matchcondition.php 2009-07-09 18:05:00.000000000 +0200 @@ -237,7 +237,7 @@ $test = trim($test); if (strlen($test)) { if (preg_match('/^\*.+\*$/',$test)) { - $allLanguages = split('[,;]',t3lib_div::getIndpEnv('HTTP_ACCEPT_LANGUAGE')); + $allLanguages = preg_split('/[,;]/',t3lib_div::getIndpEnv('HTTP_ACCEPT_LANGUAGE')); if (in_array(substr($test,1,-1), $allLanguages)) {return true;} } else { if (t3lib_div::getIndpEnv('HTTP_ACCEPT_LANGUAGE') == $test) {return true;} @@ -359,7 +359,7 @@ { return t3lib_div::compat_version($value); } break; case 'userFunc': - $values = split('\(|\)',$value); + $values = preg_split('/\(|\)/',$value); $funcName=trim($values[0]); $funcValue = t3lib_div::trimExplode(',',$values[1]); $pre = $GLOBALS['TSFE']->TYPO3_CONF_VARS['FE']['userFuncClassPrefix']; diff -u --recursive --new-file typo3_src-4.2.8/t3lib/class.t3lib_modsettings.php typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_modsettings.php --- typo3_src-4.2.8/t3lib/class.t3lib_modsettings.php 2009-07-03 21:55:04.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_modsettings.php 2009-07-09 16:46:58.000000000 +0200 @@ -249,7 +249,7 @@ reset($SOBE->MOD_SETTINGS); while(list($key)=each($SOBE->MOD_SETTINGS)) { - if (ereg('^'.$prefix,$key)) { + if (preg_match('/^/'.$prefix,$key)) { $this->storeList[$key]=$key; } } diff -u --recursive --new-file typo3_src-4.2.8/t3lib/class.t3lib_page.php typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_page.php --- typo3_src-4.2.8/t3lib/class.t3lib_page.php 2009-07-03 21:55:04.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_page.php 2009-07-09 16:52:32.000000000 +0200 @@ -496,12 +496,12 @@ */ function getDomainStartPage($domain, $path='',$request_uri='') { $domain = explode(':',$domain); - $domain = strtolower(ereg_replace('\.$','',$domain[0])); + $domain = strtolower(preg_replace('/\.$/','',$domain[0])); // Removing extra trailing slashes - $path = trim(ereg_replace('\/[^\/]*$','',$path)); + $path = trim(preg_replace('/\/[^\/]*$/','',$path)); // Appending to domain string $domain.= $path; - $domain = ereg_replace('\/*$','',$domain); + $domain = preg_replace('/\/*$/','',$domain); $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery( 'pages.uid,sys_domain.redirectTo,sys_domain.prepend_params', @@ -520,8 +520,8 @@ if ($row['redirectTo']) { $rURL = $row['redirectTo']; if ($row['prepend_params']) { - $rURL = ereg_replace('\/$','',$rURL); - $prependStr = ereg_replace('^\/','',substr($request_uri,strlen($path))); + $rURL =preg_replace('/\/$/','',$rURL); + $prependStr = preg_replace('/^\//','',substr($request_uri,strlen($path))); $rURL.= '/'.$prependStr; } Header('HTTP/1.1 301 Moved Permanently'); diff -u --recursive --new-file typo3_src-4.2.8/t3lib/class.t3lib_parsehtml.php typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_parsehtml.php --- typo3_src-4.2.8/t3lib/class.t3lib_parsehtml.php 2009-07-03 21:55:04.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_parsehtml.php 2009-07-09 16:32:29.000000000 +0200 @@ -973,7 +973,7 @@ $parts = $this->splitIntoBlock('style',$content); foreach($parts as $k => $v) { if ($k%2) { - $parts[$k] = eregi_replace('(url[[:space:]]*\([[:space:]]*["\']?)([^"\')]*)(["\']?[[:space:]]*\))','\1'.$prefix.'\2'.$suffix.'\3',$parts[$k]); + $parts[$k] = preg_replace('/(url[[:space:]]*\([[:space:]]*["\']?)([^"\')]*)(["\']?[[:space:]]*\))/i','\1'.$prefix.'\2'.$suffix.'\3',$parts[$k]); } } $content = implode('',$parts); diff -u --recursive --new-file typo3_src-4.2.8/t3lib/class.t3lib_parsehtml_proc.php typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_parsehtml_proc.php --- typo3_src-4.2.8/t3lib/class.t3lib_parsehtml_proc.php 2009-07-03 21:55:04.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_parsehtml_proc.php 2009-07-09 18:16:05.000000000 +0200 @@ -150,8 +150,8 @@ */ function setRelPath($path) { $path = trim($path); - $path = ereg_replace('^/','',$path); - $path = ereg_replace('/$','',$path); + $path = preg_replace('/^\//','',$path); + $path = preg_replace('/\/$/','',$path); if ($path) { $this->relPath = $path; $this->relBackPath = ''; @@ -692,7 +692,7 @@ $siteUrl = $this->siteUrl(); // Parsing the typolink data. This parsing is roughly done like in tslib_content->typolink() if(strstr($link_param,'@')) { // mailadr - $href = 'mailto:'.eregi_replace('^mailto:','',$link_param); + $href = 'mailto:'.preg_replace('/^mailto:/i','',$link_param); } elseif (substr($link_param,0,1)=='#') { // check if anchor $href = $siteUrl.$link_param; } else { @@ -705,7 +705,7 @@ if (trim($rootFileDat) && !strstr($link_param,'/') && (@is_file(PATH_site.$rootFileDat) || t3lib_div::inList('php,html,htm',strtolower($rFD_fI['extension'])))) { $href = $siteUrl.$link_param; } elseif($urlChar && (strstr($link_param,'//') || !$fileChar || $urlChar<$fileChar)) { // url (external): If doubleSlash or if a '.' comes before a '/'. - if (!ereg('^[a-z]*://',trim(strtolower($link_param)))) {$scheme='http://';} else {$scheme='';} + if (!preg_match('/^[a-z]*:\/\//',trim(strtolower($link_param)))) {$scheme='http://';} else {$scheme='';} $href = $scheme.$link_param; } elseif($fileChar) { // file (internal) $href = $siteUrl.$link_param; @@ -982,8 +982,8 @@ case 'typolist': // Transform typolist blocks into OL/UL lists. Type 1 is expected to be numerical block if (!isset($this->procOptions['typolist']) || $this->procOptions['typolist']) { $tListContent = $this->removeFirstAndLastTag($blockSplit[$k]); - $tListContent = ereg_replace('^[ ]*'.chr(10),'',$tListContent); - $tListContent = ereg_replace(chr(10).'[ ]*$','',$tListContent); + $tListContent = preg_replace('/^[ ]*/'.chr(10),'',$tListContent); + $tListContent = preg_replace("/".chr(10).'[ ]*$/','',$tListContent); $lines = explode(chr(10),$tListContent); $typ = $attribArray['type']==1 ? 'ol' : 'ul'; $blockSplit[$k] = '<'.$typ.'>'.chr(10). @@ -1004,12 +1004,12 @@ } break; } - $blockSplit[$k+1] = ereg_replace('^[ ]*'.chr(10),'',$blockSplit[$k+1]); // Removing linebreak if typohead + $blockSplit[$k+1] = preg_replace('/^[ ]*'.chr(10)."/",'',$blockSplit[$k+1]); // Removing linebreak if typohead } else { // NON-block: $nextFTN = $this->getFirstTagName($blockSplit[$k+1]); $singleLineBreak = $blockSplit[$k]==chr(10); if (t3lib_div::inList('TABLE,BLOCKQUOTE,TYPOLIST,TYPOHEAD,'.($this->procOptions['preserveDIVSections']?'DIV,':'').$this->blockElementList,$nextFTN)) { // Removing linebreak if typolist/typohead - $blockSplit[$k] = ereg_replace(chr(10).'[ ]*$','',$blockSplit[$k]); + $blockSplit[$k] = preg_replace("/".chr(10).'[ ]*$/','',$blockSplit[$k]); } // If $blockSplit[$k] is blank then unset the line. UNLESS the line happend to be a single line break. if (!strcmp($blockSplit[$k],'') && !$singleLineBreak) { @@ -1249,7 +1249,7 @@ } else { //... but if NO subsection was found, we process it as a TRUE line without erronous content: $subLines = array($subLines); if (!$this->procOptions['dontConvBRtoParagraph']) { // process break-tags, if configured for. Simply, the breaktags will here be treated like if each was a line of content... - $subLines = spliti('',$v); + $subLines = preg_plit('//i',$v); } // Traverse sublines (there is typically one, except if
has been converted to lines as well!) @@ -1296,7 +1296,7 @@ } // Remove any line break char (10 or 13) - $subLines[$sk]=ereg_replace(chr(10).'|'.chr(13),'',$subLines[$sk]); + $subLines[$sk]=preg_replace("/".chr(10).'|'.chr(13)."/",'',$subLines[$sk]); // If there are any attributes or if we are supposed to remap the tag, then do so: if (count($newAttribs) && strcmp($remapParagraphTag,'1')) { @@ -1499,10 +1499,10 @@ $regex='[[:space:]]*:[[:space:]]*([0-9]*)[[:space:]]*px'; // Width $reg = array(); - eregi('width'.$regex,$style,$reg); + preg_match('/width'.$regex."/i",$style,$reg); $w = intval($reg[1]); // Height - eregi('height'.$regex,$style,$reg); + preg_match('/height'.$regex."/i",$style,$reg); $h = intval($reg[1]); } if (!$w) { diff -u --recursive --new-file typo3_src-4.2.8/t3lib/class.t3lib_querygenerator.php typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_querygenerator.php --- typo3_src-4.2.8/t3lib/class.t3lib_querygenerator.php 2009-07-03 21:55:04.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_querygenerator.php 2009-07-09 16:41:52.000000000 +0200 @@ -289,14 +289,14 @@ $this->fields[$fN] = $fC['config']; $this->fields[$fN]['exclude'] = $fC['exclude']; if (is_array($fC) && $fC['label']) { - $this->fields[$fN]['label'] = ereg_replace(':$','',trim($GLOBALS['LANG']->sL($fC['label']))); + $this->fields[$fN]['label'] = preg_replace('/:$/','',trim($GLOBALS['LANG']->sL($fC['label']))); switch ($this->fields[$fN]['type']) { case 'input': - if (eregi('int|year', $this->fields[$fN]['eval'])) { + if (preg_match('/int|year/i', $this->fields[$fN]['eval'])) { $this->fields[$fN]['type']='number'; - } elseif (eregi('time', $this->fields[$fN]['eval'])) { + } elseif (preg_match('/time/i', $this->fields[$fN]['eval'])) { $this->fields[$fN]['type'] = 'time'; - } elseif (eregi('date', $this->fields[$fN]['eval'])) { + } elseif (preg_match('/date/i', $this->fields[$fN]['eval'])) { $this->fields[$fN]['type']='date'; } else { $this->fields[$fN]['type']='text'; diff -u --recursive --new-file typo3_src-4.2.8/t3lib/class.t3lib_readmail.php typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_readmail.php --- typo3_src-4.2.8/t3lib/class.t3lib_readmail.php 2009-07-03 21:55:04.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_readmail.php 2009-07-09 16:40:13.000000000 +0200 @@ -178,7 +178,7 @@ while(list(,$ppstr)=each($parts)) { $mparts = explode('=',$ppstr,2); if (count($mparts)>1) { - $cTypes[strtolower(trim($mparts[0]))]=ereg_replace('^"','',trim(ereg_replace('"$','',trim($mparts[1])))); + $cTypes[strtolower(trim($mparts[0]))]=preg_replace('/^"/','',trim(preg_replace('/"$/','',trim($mparts[1])))); } else { $cTypes[]=$ppstr; } @@ -201,11 +201,11 @@ $parts = explode('>:',$c,2); $cp['reason_text']=trim($parts[1]); $cp['mailserver']='Qmail'; - if (eregi('550|no mailbox|account does not exist',$cp['reason_text'])) { + if (preg_match('/550|no mailbox|account does not exist/i',$cp['reason_text'])) { $cp['reason']=550; // 550 Invalid recipient } elseif (stristr($cp['reason_text'],'couldn\'t find any host named')) { $cp['reason']=2; // Bad host - } elseif (eregi('Error in Header|invalid Message-ID header',$cp['reason_text'])) { + } elseif (preg_match('/Error in Header|invalid Message-ID header/',$cp['reason_text'])) { $cp['reason']=554; } else { $cp['reason']=-1; @@ -228,11 +228,11 @@ $cp['content']=trim($c); $cp['reason_text']=trim(substr($c,0,1000)); $cp['mailserver']='unknown'; - if (eregi('Unknown Recipient|Delivery failed 550|Receiver not found|User not listed|recipient problem|Delivery to the following recipients failed|User unknown|recipient name is not recognized',$cp['reason_text'])) { + if (preg_match('/Unknown Recipient|Delivery failed 550|Receiver not found|User not listed|recipient problem|Delivery to the following recipients failed|User unknown|recipient name is not recognized/i',$cp['reason_text'])) { $cp['reason']=550; // 550 Invalid recipient, User unknown - } elseif (eregi('over quota|mailbox full',$cp['reason_text'])) { + } elseif (preg_match('/over quota|mailbox full/i',$cp['reason_text'])) { $cp['reason']=551; - } elseif (eregi('Error in Header',$cp['reason_text'])) { + } elseif (preg_match('/Error in Header/i',$cp['reason_text'])) { $cp['reason']=554; } else { $cp['reason']=-1; @@ -281,7 +281,7 @@ // Email: $reg=''; - ereg('<([^>]*)>',$str,$reg); + preg_match('/<([^>]*)>/',$str,$reg); if (t3lib_div::validEmail($str)) { $outArr['email']=$str; } elseif ($reg[1] && t3lib_div::validEmail($reg[1])) { @@ -290,7 +290,7 @@ list($namePart)=explode($reg[0],$str); if (trim($namePart)) { $reg=''; - ereg('"([^"]*)"',$str,$reg); + preg_match('/"([^"]*)"/',$str,$reg); if (trim($reg[1])) { $outArr['name']=trim($reg[1]); } else $outArr['name']=trim($namePart); @@ -314,7 +314,7 @@ next($cTypeParts); while(list(,$v)=Each($cTypeParts)) { $reg=''; - eregi('([^=]*)="(.*)"',$v,$reg); + preg_match('/([^=]*)="(.*)"/i',$v,$reg); if (trim($reg[1]) && trim($reg[2])) { $outValue[strtolower($reg[1])] = $reg[2]; } diff -u --recursive --new-file typo3_src-4.2.8/t3lib/class.t3lib_rteapi.php typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_rteapi.php --- typo3_src-4.2.8/t3lib/class.t3lib_rteapi.php 2009-07-03 21:55:04.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_rteapi.php 2009-07-09 16:31:31.000000000 +0200 @@ -196,7 +196,7 @@ */ function triggerField($fieldName) { - $triggerFieldName = ereg_replace('\[([^]]+)\]$','[_TRANSFORM_\1]', $fieldName); + $triggerFieldName = preg_replace('/\[([^]]+)\]$/','[_TRANSFORM_\1]', $fieldName); return ''; } } diff -u --recursive --new-file typo3_src-4.2.8/t3lib/class.t3lib_softrefproc.php typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_softrefproc.php --- typo3_src-4.2.8/t3lib/class.t3lib_softrefproc.php 2009-07-03 21:55:04.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_softrefproc.php 2009-07-09 16:29:32.000000000 +0200 @@ -236,7 +236,7 @@ $elements[$k]['matchString'] = $v; // If the image seems to be from fileadmin/ folder or an RTE image, then proceed to set up substitution token: - if (t3lib_div::isFirstPartOfStr($srcRef,$this->fileAdminDir.'/') || (t3lib_div::isFirstPartOfStr($srcRef,'uploads/') && ereg('^RTEmagicC_',basename($srcRef)))) { + if (t3lib_div::isFirstPartOfStr($srcRef,$this->fileAdminDir.'/') || (t3lib_div::isFirstPartOfStr($srcRef,'uploads/') && preg_match('/^RTEmagicC_/',basename($srcRef)))) { // Token and substitute value: if (strstr($splitContent[$k], $attribs[0]['src'])) { // Make sure the value we work on is found and will get substituted in the content (Very important that the src-value is not DeHSC'ed) $splitContent[$k] = str_replace($attribs[0]['src'], '{softref:'.$tokenID.'}', $splitContent[$k]); // Substitute value with token (this is not be an exact method if the value is in there twice, but we assume it will not) @@ -324,7 +324,7 @@ $elements = array(); foreach($linkTags as $k => $foundValue) { if ($k%2) { - $typolinkValue = eregi_replace('getTypoLinkParts($typolinkValue); $linkTags[$k] = 'setTypoLinkPartsElement($tLP, $elements, $typolinkValue, $k).'>'; } @@ -644,7 +644,7 @@ // Detecting the kind of reference: if(strstr($link_param,'@') && !$pU['scheme']) { // If it's a mail address: - $link_param = eregi_replace('^mailto:','',$link_param); + $link_param = preg_replace('/^mailto:/i','',$link_param); $finalTagParts['LINK_TYPE'] = 'mailto'; $finalTagParts['url'] = trim($link_param); diff -u --recursive --new-file typo3_src-4.2.8/t3lib/class.t3lib_sqlparser.php typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_sqlparser.php --- typo3_src-4.2.8/t3lib/class.t3lib_sqlparser.php 2009-07-03 21:55:04.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_sqlparser.php 2009-07-09 16:46:45.000000000 +0200 @@ -1132,7 +1132,7 @@ $reg = array(); //preg_match('/[\]*$/',$v,$reg); // does not work. what is the *exact* meaning of the next line? - ereg('[\]*$',$v,$reg); + preg_match('/[\\]*$/',$v,$reg); if ($reg AND strlen($reg[0])%2) { $buffer.=$quote; } else { diff -u --recursive --new-file typo3_src-4.2.8/t3lib/class.t3lib_stdgraphic.php typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_stdgraphic.php --- typo3_src-4.2.8/t3lib/class.t3lib_stdgraphic.php 2009-07-03 21:55:04.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_stdgraphic.php 2009-07-09 16:30:26.000000000 +0200 @@ -1959,12 +1959,12 @@ // Finding the RGB definitions of the color: $string=$cParts[0]; if (strstr($string,'#')) { - $string = ereg_replace('[^A-Fa-f0-9]*','',$string); + $string = preg_replace('/[^A-Fa-f0-9]*/','',$string); $col[]=HexDec(substr($string,0,2)); $col[]=HexDec(substr($string,2,2)); $col[]=HexDec(substr($string,4,2)); } elseif (strstr($string,',')) { - $string = ereg_replace('[^,0-9]*','',$string); + $string = preg_replace('/[^,0-9]*/','',$string); $strArr = explode(',',$string); $col[]=intval($strArr[0]); $col[]=intval($strArr[1]); @@ -2226,7 +2226,7 @@ * @see imageMagickConvert(), tslib_cObj::getImgResource() */ function getImageDimensions($imageFile) { - ereg('([^\.]*)$',$imageFile,$reg); + preg_match('/([^\.]*)$/',$imageFile,$reg); if (@file_exists($imageFile) && t3lib_div::inList($this->imageFileExt,strtolower($reg[0]))) { if ($returnArr = $this->getCachedImageDimensions($imageFile)) { return $returnArr; @@ -2285,7 +2285,7 @@ global $TYPO3_DB; // Create a md5 hash of the filename $md5Hash = md5_file($imageFile); - ereg('([^\.]*)$',$imageFile,$reg); + preg_match('/([^\.]*)$/',$imageFile,$reg); $res = $TYPO3_DB->exec_SELECTquery ('md5hash, imagewidth, imageheight', 'cache_imagesizes', 'md5filename='.$TYPO3_DB->fullQuoteStr(md5($imageFile),'cache_imagesizes')); if ($res) { if ($row = $TYPO3_DB->sql_fetch_assoc($res)) { @@ -2487,7 +2487,7 @@ $splitstring=$returnVal[0]; $this->IM_commands[] = Array ('identify',$cmd,$returnVal[0]); if ($splitstring) { - ereg('([^\.]*)$',$imagefile,$reg); + preg_match('/([^\.]*)$/',$imagefile,$reg); $splitinfo = explode(' ', $splitstring); while (list($key,$val) = each($splitinfo)) { $temp = ''; @@ -2690,7 +2690,7 @@ function output($file) { if ($file) { $reg = array(); - ereg('([^\.]*)$',$file,$reg); + preg_match('/([^\.]*)$/',$file,$reg); $ext=strtolower($reg[0]); switch($ext) { case 'gif': diff -u --recursive --new-file typo3_src-4.2.8/t3lib/class.t3lib_superadmin.php typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_superadmin.php --- typo3_src-4.2.8/t3lib/class.t3lib_superadmin.php 2009-07-03 21:55:04.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_superadmin.php 2009-07-09 16:30:48.000000000 +0200 @@ -445,8 +445,8 @@ $content = ''; foreach($this->parentDirs as $k => $v) { - $dir = ereg_replace('/$','',$v['dir']); - $baseUrl=ereg_replace('/$','',$v['url']); + $dir = preg_replace('/\/$/','',$v['dir']); + $baseUrl=preg_replace('/\/$/','',$v['url']); $content.='


'; $content.=$this->headerParentDir($dir); if (@is_dir($dir)) { diff -u --recursive --new-file typo3_src-4.2.8/t3lib/class.t3lib_syntaxhl.php typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_syntaxhl.php --- typo3_src-4.2.8/t3lib/class.t3lib_syntaxhl.php 2009-07-03 21:55:04.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_syntaxhl.php 2009-07-09 16:32:43.000000000 +0200 @@ -380,7 +380,7 @@ $token = md5(microtime()); // Markup all tag names with token. - $markUpStr = ereg_replace('<([[:alnum:]_]+)[^>]*>',$token.'\1'.$token,$str); + $markUpStr = preg_replace('/<([[:alnum:]_]+)[^>]*>/',$token.'\1'.$token,$str); // Splitting by token: $parts = explode($token,$markUpStr); diff -u --recursive --new-file typo3_src-4.2.8/t3lib/class.t3lib_tceforms.php typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_tceforms.php --- typo3_src-4.2.8/t3lib/class.t3lib_tceforms.php 2009-07-03 21:55:04.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_tceforms.php 2009-07-09 18:00:32.000000000 +0200 @@ -715,7 +715,7 @@ $editFieldList=array_unique(t3lib_div::trimExplode(',',$list,1)); foreach($editFieldList as $theFieldC) { - list($theField,$palFields) = split('\[|\]',$theFieldC); + list($theField,$palFields) = preg_split('/\[|\]/',$theFieldC); $theField = trim($theField); $palFields = trim($palFields); if ($TCA[$table]['columns'][$theField]) { @@ -4215,7 +4215,7 @@ $recursivityLevels = isset($fieldValue['config']['fileFolder_recursions']) ? t3lib_div::intInRange($fieldValue['config']['fileFolder_recursions'],0,99) : 99; // Get files: - $fileFolder = ereg_replace('\/$','',$fileFolder).'/'; + $fileFolder = preg_replace('/\/$/','',$fileFolder).'/'; $fileArr = t3lib_div::getAllFilesAndFoldersInPath(array(),$fileFolder,$extList,0,$recursivityLevels); $fileArr = t3lib_div::removePrefixPathFromList($fileArr, $fileFolder); @@ -4292,7 +4292,7 @@ // Item configuration: $items[] = array( - ereg_replace(':$','',$theTypeArrays[0]), + preg_replace('/:$/','',$theTypeArrays[0]), $theTypeArrays[1], '', $descr @@ -4323,7 +4323,7 @@ // Add item to be selected: $items[] = array( '['.$itemContent[2].'] '.$itemContent[1], - $tableFieldKey.':'.ereg_replace('[:|,]','',$itemValue).':'.$itemContent[0], + $tableFieldKey.':'.preg_replace('/[:|,]/','',$itemValue).':'.$itemContent[0], $icons[$itemContent[0]] ); } @@ -4356,7 +4356,7 @@ // Add item to be selected: $items[] = array( $GLOBALS['LANG']->sl($itemCfg[0]), - $coKey.':'.ereg_replace('[:|,]','',$itemKey), + $coKey.':'.preg_replace('/[:|,]/','',$itemKey), $icon, $GLOBALS['LANG']->sl($itemCfg[2]), ); diff -u --recursive --new-file typo3_src-4.2.8/t3lib/class.t3lib_tcemain.php typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_tcemain.php --- typo3_src-4.2.8/t3lib/class.t3lib_tcemain.php 2009-07-03 21:55:04.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_tcemain.php 2009-07-09 16:44:35.000000000 +0200 @@ -2068,16 +2068,16 @@ $value = str_replace(' ','',$value); break; case 'alpha': - $value = ereg_replace('[^a-zA-Z]','',$value); + $value = preg_replace('/[^a-zA-Z]/','',$value); break; case 'num': - $value = ereg_replace('[^0-9]','',$value); + $value = preg_replace('/[^0-9]/','',$value); break; case 'alphanum': - $value = ereg_replace('[^a-zA-Z0-9]','',$value); + $value = preg_replace('/[^a-zA-Z0-9]/','',$value); break; case 'alphanum_x': - $value = ereg_replace('[^a-zA-Z0-9_-]','',$value); + $value = preg_replace('/[^a-zA-Z0-9_-]/','',$value); break; default: if (substr($func, 0, 3) == 'tx_') { @@ -3237,7 +3237,7 @@ if (t3lib_div::isFirstPartOfStr($filename,'RTEmagicC_')) { $fileInfo['exists'] = @is_file(PATH_site.$rec['ref_string']); - $fileInfo['original'] = substr($rec['ref_string'],0,-strlen($filename)).'RTEmagicP_'.ereg_replace('\.[[:alnum:]]+$','',substr($filename,10)); + $fileInfo['original'] = substr($rec['ref_string'],0,-strlen($filename)).'RTEmagicP_'.preg_replace('/\.[[:alnum:]]+$/','',substr($filename,10)); $fileInfo['original_exists'] = @is_file(PATH_site.$fileInfo['original']); // CODE from tx_impexp and class.rte_images.php adapted for use here: @@ -6251,7 +6251,7 @@ * @return string Output string with any comma in the end removed, if any. */ function rmComma($input) { - return ereg_replace(',$','',$input); + return preg_replace('/,$/','',$input); } /** @@ -6262,7 +6262,7 @@ */ function convNumEntityToByteValue($input) { $token = md5(microtime()); - $parts = explode($token,ereg_replace('(&#([0-9]+);)',$token.'\2'.$token,$input)); + $parts = explode($token,preg_replace('/(&#([0-9]+);)/',$token.'\2'.$token,$input)); foreach($parts as $k => $v) { if ($k%2) { @@ -6651,7 +6651,7 @@ function clearPrefixFromValue($table,$value) { global $TCA; $regex = sprintf(quotemeta($this->prependLabel($table)),'[0-9]*').'$'; - return @ereg_replace($regex,'',$value); + return @preg_replace("/$regex/",'',$value); } /** @@ -7056,7 +7056,7 @@ // Clearing additional cache tables: if (is_array($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearAllCache_additionalTables'])) { foreach($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearAllCache_additionalTables'] as $tableName) { - if (!ereg('[^[:alnum:]_]',$tableName) && substr($tableName,-5)=='cache') { + if (!preg_match('/[^[:alnum:]_]/',$tableName) && substr($tableName,-5)=='cache') { $GLOBALS['TYPO3_DB']->exec_DELETEquery($tableName,''); } else { die('Fatal Error: Trying to flush table "'.$tableName.'" with "Clear All Cache"'); diff -u --recursive --new-file typo3_src-4.2.8/t3lib/class.t3lib_transferdata.php typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_transferdata.php --- typo3_src-4.2.8/t3lib/class.t3lib_transferdata.php 2009-07-03 21:55:04.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_transferdata.php 2009-07-09 16:48:13.000000000 +0200 @@ -752,7 +752,7 @@ foreach($theExcludeFields as $theExcludeFieldsArrays) { foreach($elements as $eKey => $value) { if (!strcmp($theExcludeFieldsArrays[1],$value)) { - $dataAcc[$eKey]=rawurlencode($value).'|'.rawurlencode(ereg_replace(':$','',$theExcludeFieldsArrays[0])); + $dataAcc[$eKey]=rawurlencode($value).'|'.rawurlencode(preg_replace('/:$/','',$theExcludeFieldsArrays[0])); } } } diff -u --recursive --new-file typo3_src-4.2.8/t3lib/class.t3lib_treeview.php typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_treeview.php --- typo3_src-4.2.8/t3lib/class.t3lib_treeview.php 2009-07-03 21:55:04.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_treeview.php 2009-07-09 16:31:58.000000000 +0200 @@ -537,7 +537,7 @@ * @return string Image tag, modified with $attr attributes added. */ function addTagAttributes($icon,$attr) { - return ereg_replace(' ?\/?>$','',$icon).' '.$attr.' />'; + return preg_replace('/\s?\/?>$/','',$icon).' '.$attr.' />'; } /** diff -u --recursive --new-file typo3_src-4.2.8/t3lib/class.t3lib_tsparser_ext.php typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_tsparser_ext.php --- typo3_src-4.2.8/t3lib/class.t3lib_tsparser_ext.php 2009-07-03 21:55:04.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_tsparser_ext.php 2009-07-09 16:19:38.000000000 +0200 @@ -367,7 +367,7 @@ $keyArr_alpha=array(); while (list($key,)=each($arr)) { if (substr($key,-2)!='..') { // Don't do anything with comments / linenumber registrations... - $key=ereg_replace('\.$','',$key); + $key=preg_replace('/\.$/','',$key); if (substr($key,-1)!='.') { if (t3lib_div::testInt($key)) { $keyArr_num[$key]=$arr[$key]; @@ -509,7 +509,7 @@ reset($arr); $keyArr=array(); while (list($key,)=each($arr)) { - $key=ereg_replace('\.$','',$key); + $key=preg_replace('/\.$/','',$key); if (substr($key,-1)!='.') { $keyArr[$key]=1; } @@ -522,13 +522,13 @@ $deeper = is_array($arr[$key.'.']); if ($this->regexMode) { - if (ereg($searchString,$arr[$key])) { // The value has matched + if (preg_match("/$searchString/",$arr[$key])) { // The value has matched $this->tsbrowser_searchKeys[$depth]+=2; } - if (ereg($searchString,$key)) { // The key has matched + if (preg_match("/$searchString/",$key)) { // The key has matched $this->tsbrowser_searchKeys[$depth]+=4; } - if (ereg($searchString,$depth_in)) { // Just open this subtree if the parent key has matched the search + if (preg_match("/$searchString/",$depth_in)) { // Just open this subtree if the parent key has matched the search $this->tsbrowser_searchKeys[$depth]=1; } } else { @@ -582,7 +582,7 @@ reset($arr); $keyArr=array(); while (list($key,)=each($arr)) { - $key=ereg_replace('\.$','',$key); + $key=preg_replace('/\.$/','',$key); if (substr($key,-1)!='.') { $keyArr[$key]=1; } @@ -676,7 +676,7 @@ } if ($syntaxHL) { - $all = ereg_replace('^[^'.chr(10).']*.','',$all); + $all = preg_replace('/^[^'.chr(10).']*./','',$all); $all = chop($all); $tsparser = t3lib_div::makeInstance('t3lib_TSparser'); $tsparser->lineNumberOffset=$this->ext_lineNumberOffset+1; @@ -729,7 +729,7 @@ * @return [type] ... */ function ext_formatTS($input, $ln, $comments=1, $crop=0) { - $input = ereg_replace('^[^'.chr(10).']*.','',$input); + $input = preg_replace('/^[^'.chr(10).']*./','',$input); $input = chop($input); $cArr = explode(chr(10),$input); @@ -816,7 +816,7 @@ $comment = trim($this->flatSetup[$const.'..']); $c_arr = explode(chr(10),$comment); while(list($k,$v)=each($c_arr)) { - $line=trim(ereg_replace('^[#\/]*','',$v)); + $line=trim(preg_replace('/^[#\/]*/','',$v)); if ($line) { $parts = explode(';', $line); while(list(,$par)=each($parts)) { @@ -925,7 +925,7 @@ if (t3lib_div::inList('int,options,file,boolean,offset,user', $retArr['type'])) { $p=trim(substr($type,$m)); $reg = array(); - ereg('\[(.*)\]',$p,$reg); + preg_match('/\[(.*)\]/',$p,$reg); $p=trim($reg[1]); if ($p) { $retArr['paramstr']=$p; @@ -1061,7 +1061,7 @@ function ext_readDirResources($path) { $path=trim($path); if ($path && substr($path,0,10)=='fileadmin/') { - $path = ereg_replace('\/$','',$path); + $path = preg_replace('/\/$/','',$path); $this->readDirectory(PATH_site.$path); } } @@ -1101,7 +1101,7 @@ function ext_fNandV($params) { $fN='data['.$params['name'].']'; $fV=$params['value']; - if (ereg('^{[\$][a-zA-Z0-9\.]*}$',trim($fV),$reg)) { // Values entered from the constantsedit cannot be constants! 230502; removed \{ and set { + if (preg_match('/^{[\$][a-zA-Z0-9\.]*}$/',trim($fV),$reg)) { // Values entered from the constantsedit cannot be constants! 230502; removed \{ and set { $fV=''; } $fV=htmlspecialchars($fV); @@ -1574,7 +1574,7 @@ case 'color': $col=array(); if($var && !t3lib_div::inList($this->HTMLcolorList,strtolower($var))) { - $var = ereg_replace('[^A-Fa-f0-9]*','',$var); + $var = preg_replace('/[^A-Fa-f0-9]*/','',$var); $useFullHex = strlen($var) > 3; $col[]=HexDec(substr($var,0,1)); @@ -1748,7 +1748,7 @@ */ function ext_setStar($val) { $fParts = explode('.',strrev($val),2); - $val=ereg_replace('_[0-9][0-9]$','',strrev($fParts[1])).'*.'.strrev($fParts[0]); + $val=preg_replace('/_[0-9][0-9]$/','',strrev($fParts[1])).'*.'.strrev($fParts[0]); return $val; } diff -u --recursive --new-file typo3_src-4.2.8/t3lib/class.t3lib_tsstyleconfig.php typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_tsstyleconfig.php --- typo3_src-4.2.8/t3lib/class.t3lib_tsstyleconfig.php 2009-07-03 21:55:04.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_tsstyleconfig.php 2009-07-09 16:44:48.000000000 +0200 @@ -262,7 +262,7 @@ function ext_loadResources($absPath) { $this->ext_readDirResources($GLOBALS["TYPO3_CONF_VARS"]["MODS"]["web_ts"]["onlineResourceDir"]); if (is_dir($absPath)) { - $absPath = ereg_replace("\/$","",$absPath); + $absPath = preg_replace("/\/$/","",$absPath); $this->readDirectory($absPath); } $this->ext_resourceDims(); diff -u --recursive --new-file typo3_src-4.2.8/t3lib/class.t3lib_tstemplate.php typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_tstemplate.php --- typo3_src-4.2.8/t3lib/class.t3lib_tstemplate.php 2009-07-03 21:55:04.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_tstemplate.php 2009-07-09 16:51:52.000000000 +0200 @@ -636,7 +636,7 @@ if (substr($ISF_file,0,4)=='EXT:') { list($ISF_extKey,$ISF_localPath) = explode('/',substr($ISF_file,4),2); if (strcmp($ISF_extKey,'') && t3lib_extMgm::isLoaded($ISF_extKey) && strcmp($ISF_localPath,'')) { - $ISF_localPath = ereg_replace('\/$','',$ISF_localPath).'/'; + $ISF_localPath = preg_replace('/\/$/','',$ISF_localPath).'/'; $ISF_filePath = t3lib_extMgm::extPath($ISF_extKey).$ISF_localPath; if (@is_dir($ISF_filePath)) { $mExtKey = str_replace('_','',$ISF_extKey.'/'.$ISF_localPath); @@ -1202,7 +1202,7 @@ $files = explode(',',$res); while(list(,$val)=each($files)) { $test = trim($val); - if (ereg('^'.quotemeta($fileparts[0]).'.*'.quotemeta($fileparts[$c-1]).'$', $test)) { + if (preg_match('/^'.quotemeta($fileparts[0]).'.*'.quotemeta($fileparts[$c-1]).'$/', $test)) { $outFile = $test; break; } diff -u --recursive --new-file typo3_src-4.2.8/t3lib/class.t3lib_userauthgroup.php typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_userauthgroup.php --- typo3_src-4.2.8/t3lib/class.t3lib_userauthgroup.php 2009-07-03 21:55:04.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_userauthgroup.php 2009-07-09 16:31:11.000000000 +0200 @@ -472,7 +472,7 @@ if (!strcmp($value,'')) return TRUE; // Certain characters are not allowed in the value - if (ereg('[:|,]',$value)) { + if (preg_match('/[:|,]/',$value)) { return FALSE; } diff -u --recursive --new-file typo3_src-4.2.8/t3lib/class.t3lib_xml.php typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_xml.php --- typo3_src-4.2.8/t3lib/class.t3lib_xml.php 2009-07-03 21:55:04.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/t3lib/class.t3lib_xml.php 2009-07-09 16:27:42.000000000 +0200 @@ -279,7 +279,7 @@ * @return string Processed input value */ function substNewline($string) { - return ereg_replace(chr(10),'',$string); + return preg_replace("/".chr(10)."/",'',$string); } /** diff -u --recursive --new-file typo3_src-4.2.8/t3lib/config_default.php typo3_src-4.2.8-php5.3-compat/t3lib/config_default.php --- typo3_src-4.2.8/t3lib/config_default.php 2009-07-03 21:55:04.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/t3lib/config_default.php 2009-07-09 16:37:09.000000000 +0200 @@ -170,7 +170,7 @@ 'ftpspace' => array('allow'=>'*', 'deny'=>'') ), 'customPermOptions' => array(), // Array with sets of custom permission options. Syntax is; 'key' => array('header' => 'header string, language splitted', 'items' => array('key' => array('label, language splitted', 'icon reference', 'Description text, language splitted'))). Keys cannot contain ":|," characters. - 'fileDenyPattern' => FILE_DENY_PATTERN_DEFAULT , // A regular expression that - if it matches a filename - will deny the file upload/rename or whatever in the webspace. For security reasons, files with multiple extensions have to be denied on an Apache environment with mod_alias, if the filename contains a valid php handler in an arbitary position. Also, ".htaccess" files have to be denied. Matching with eregi() (case-insensitive). Default value is stored in constant FILE_DENY_PATTERN_DEFAULT + 'fileDenyPattern' => FILE_DENY_PATTERN_DEFAULT , // A regular expression that - if it matches a filename - will deny the file upload/rename or whatever in the webspace. For security reasons, files with multiple extensions have to be denied on an Apache environment with mod_alias, if the filename contains a valid php handler in an arbitary position. Also, ".htaccess" files have to be denied. Matching with preg_match(//i) (case-insensitive). Default value is stored in constant FILE_DENY_PATTERN_DEFAULT 'interfaces' => 'backend', // This determines which interface options is available in the login prompt and in which order (All options: ",backend,backend_old,frontend") 'useOnContextMenuHandler' => 1, // Boolean. If set, the context menus (clickmenus) in the backend are activated on right-click - although this is not a XHTML attribute! 'loginLabels' => 'Username|Password|Interface|Log In|Log Out|Backend,Front End,Traditional Backend|Administration Login on ###SITENAME###|(Note: Cookies and JavaScript must be enabled!)|Important Messages:|Your login attempt did not succeed. Make sure to spell your username and password correctly, including upper/lowercase characters.', // Language labels of the login prompt. diff -u --recursive --new-file typo3_src-4.2.8/t3lib/thumbs.php typo3_src-4.2.8-php5.3-compat/t3lib/thumbs.php --- typo3_src-4.2.8/t3lib/thumbs.php 2009-07-03 21:55:04.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/t3lib/thumbs.php 2009-07-09 16:37:37.000000000 +0200 @@ -65,7 +65,7 @@ define('TYPO3_OS', stristr(PHP_OS,'win')&&!stristr(PHP_OS,'darwin')?'WIN':''); define('TYPO3_MODE','BE'); if(!defined('PATH_thisScript')) define('PATH_thisScript',str_replace('//','/', str_replace('\\','/', (php_sapi_name()=='cgi'||php_sapi_name()=='isapi' ||php_sapi_name()=='cgi-fcgi')&&($_SERVER['ORIG_PATH_TRANSLATED']?$_SERVER['ORIG_PATH_TRANSLATED']:$_SERVER['PATH_TRANSLATED'])? ($_SERVER['ORIG_PATH_TRANSLATED']?$_SERVER['ORIG_PATH_TRANSLATED']:$_SERVER['PATH_TRANSLATED']):($_SERVER['ORIG_SCRIPT_FILENAME']?$_SERVER['ORIG_SCRIPT_FILENAME']:$_SERVER['SCRIPT_FILENAME'])))); -if(!defined('PATH_site')) define('PATH_site', ereg_replace('[^/]*.[^/]*$','',PATH_thisScript)); // the path to the website folder (see init.php) +if(!defined('PATH_site')) define('PATH_site', preg_replace('/[^\/]*.[^\/]*$/','',PATH_thisScript)); // the path to the website folder (see init.php) if(!defined('PATH_t3lib')) define('PATH_t3lib', PATH_site.'t3lib/'); define('PATH_typo3conf', PATH_site.'typo3conf/'); define('TYPO3_mainDir', 'typo3/'); // This is the directory of the backend administration for the sites of this TYPO3 installation. @@ -188,7 +188,7 @@ // Check file extension: $reg = array(); - if (ereg('(.*)\.([^\.]*$)',$this->input,$reg)) { + if (preg_match('/(.*)\.([^\.]*$)/',$this->input,$reg)) { $ext=strtolower($reg[2]); $ext=($ext=='jpeg')?'jpg':$ext; if ($ext=='ttf') { diff -u --recursive --new-file typo3_src-4.2.8/typo3/alt_clickmenu.php typo3_src-4.2.8-php5.3-compat/typo3/alt_clickmenu.php --- typo3_src-4.2.8/typo3/alt_clickmenu.php 2009-07-03 21:55:38.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/alt_clickmenu.php 2009-07-09 16:53:09.000000000 +0200 @@ -1283,9 +1283,9 @@ '; } else { // Just make normal element: $onClick=$i[3]; - $onClick=eregi_replace('return[[:space:]]+hideCM\(\)[[:space:]]*;','',$onClick); - $onClick=eregi_replace('return[[:space:]]+false[[:space:]]*;','',$onClick); - $onClick=eregi_replace('hideCM\(\);','',$onClick); + $onClick=preg_replace('/return[[:space:]]+hideCM\(\)[[:space:]]*;/i','',$onClick); + $onClick=preg_replace('/return[[:space:]]+false[[:space:]]*;/i','',$onClick); + $onClick=preg_replace('/hideCM\(\);/i','',$onClick); if (!$i[5]) $onClick.='Clickmenu.hideAll();'; if ($GLOBALS['TYPO3_CONF_VARS']['BE']['useOnContextMenuHandler']) { diff -u --recursive --new-file typo3_src-4.2.8/typo3/class.browse_links.php typo3_src-4.2.8-php5.3-compat/typo3/class.browse_links.php --- typo3_src-4.2.8/typo3/class.browse_links.php 2009-07-03 21:55:38.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/class.browse_links.php 2009-07-09 17:24:25.000000000 +0200 @@ -2479,7 +2479,7 @@ * @return boolean If the input path is found in PATH_site then it returns true. */ function isWebFolder($folder) { - $folder = ereg_replace('\/$','',$folder).'/'; + $folder = preg_replace('/\/$/','',$folder).'/'; return t3lib_div::isFirstPartOfStr($folder,PATH_site) ? TRUE : FALSE; } @@ -2490,7 +2490,7 @@ * @return boolean If the input path is found in the backend users filemounts, then return true. */ function checkFolder($folder) { - return $this->fileProcessor->checkPathAgainstMounts(ereg_replace('\/$', '', $folder) . '/') ? true : false; + return $this->fileProcessor->checkPathAgainstMounts(preg_replace('/\/$/', '', $folder) . '/') ? true : false; } /** @@ -2500,7 +2500,7 @@ * @return boolean If the input path is found in the backend users filemounts and if the filemount is of type readonly, then return true. */ function isReadOnlyFolder($folder) { - return ($GLOBALS['FILEMOUNTS'][$this->fileProcessor->checkPathAgainstMounts(ereg_replace('\/$', '', $folder) . '/')]['type'] == 'readonly'); + return ($GLOBALS['FILEMOUNTS'][$this->fileProcessor->checkPathAgainstMounts(preg_replace('/\/$/', '', $folder) . '/')]['type'] == 'readonly'); } /** diff -u --recursive --new-file typo3_src-4.2.8/typo3/class.db_list_extra.inc typo3_src-4.2.8-php5.3-compat/typo3/class.db_list_extra.inc --- typo3_src-4.2.8/typo3/class.db_list_extra.inc 2009-07-03 21:55:38.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/class.db_list_extra.inc 2009-07-09 16:58:50.000000000 +0200 @@ -848,7 +848,7 @@ $editIdList = implode(',',$currentIdList); if ($this->clipNumPane()) $editIdList = "'+editList('".$table."','".$editIdList."')+'"; $params='&edit['.$table.']['.$editIdList.']=edit&columnsOnly='.$fCol.'&disHelp=1'; - $iTitle = sprintf($LANG->getLL('editThisColumn'),ereg_replace(':$','',trim($LANG->sL(t3lib_BEfunc::getItemLabel($table,$fCol))))); + $iTitle = sprintf($LANG->getLL('editThisColumn'),preg_replace('/:$/','',trim($LANG->sL(t3lib_BEfunc::getItemLabel($table,$fCol))))); $theData[$fCol].=''. 'backPath,'gfx/edit2.gif','width="11" height="12"').' title="'.htmlspecialchars($iTitle).'" alt="" />'. ''; @@ -1325,7 +1325,7 @@ $opt=array(); $opt[] = ''; foreach($fields as $fN) { - $fL = is_array($TCA[$table]['columns'][$fN]) ? ereg_replace(':$','',$LANG->sL($TCA[$table]['columns'][$fN]['label'])) : '['.$fN.']'; // Field label + $fL = is_array($TCA[$table]['columns'][$fN]) ? preg_replace('/:$/','',$LANG->sL($TCA[$table]['columns'][$fN]['label'])) : '['.$fN.']'; // Field label $opt[] = ' '; } diff -u --recursive --new-file typo3_src-4.2.8/typo3/class.db_list.inc typo3_src-4.2.8-php5.3-compat/typo3/class.db_list.inc --- typo3_src-4.2.8/typo3/class.db_list.inc 2009-07-03 21:55:38.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/class.db_list.inc 2009-07-09 16:58:11.000000000 +0200 @@ -513,7 +513,7 @@ // Traverse the configured columns and add all columns that can be searched: foreach($TCA[$table]['columns'] as $fieldName => $info) { - if ($info['config']['type']=='text' || ($info['config']['type']=='input' && !ereg('date|time|int',$info['config']['eval']))) { + if ($info['config']['type']=='text' || ($info['config']['type']=='input' && !preg_match('/date|time|int/i',$info['config']['eval']))) { $sfields[]=$fieldName; } } diff -u --recursive --new-file typo3_src-4.2.8/typo3/class.filelistfoldertree.php typo3_src-4.2.8-php5.3-compat/typo3/class.filelistfoldertree.php --- typo3_src-4.2.8/typo3/class.filelistfoldertree.php 2009-07-03 21:55:38.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/class.filelistfoldertree.php 2009-07-09 17:24:40.000000000 +0200 @@ -373,7 +373,7 @@ end($this->tree); $treeKey = key($this->tree); // Get the key for this space - $val = ereg_replace('^\./','',$val); + $val = preg_replace('/^\.\//','',$val); $title = $val; $path = $files_path.$val.'/'; diff -u --recursive --new-file typo3_src-4.2.8/typo3/cli_dispatch.phpsh typo3_src-4.2.8-php5.3-compat/typo3/cli_dispatch.phpsh --- typo3_src-4.2.8/typo3/cli_dispatch.phpsh 2009-07-03 21:55:38.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/cli_dispatch.phpsh 2009-07-09 16:57:22.000000000 +0200 @@ -93,7 +93,7 @@ $workingDirectory = $_SERVER['PWD'] ? $_SERVER['PWD'] : getcwd(); if ($workingDirectory) { $temp_PATH_thisScript = - $workingDirectory.'/'.ereg_replace('\.\/','',$temp_PATH_thisScript); + $workingDirectory.'/'.preg_replace('/\.\//','',$temp_PATH_thisScript); if (!@is_file($temp_PATH_thisScript)) { die ('Relative path found, but an error occured during resolving of the absolute path: '.$temp_PATH_thisScript.chr(10)); } diff -u --recursive --new-file typo3_src-4.2.8/typo3/index.php typo3_src-4.2.8-php5.3-compat/typo3/index.php --- typo3_src-4.2.8/typo3/index.php 2009-07-03 21:55:38.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/index.php 2009-07-09 18:28:41.000000000 +0200 @@ -58,7 +58,7 @@ * */ - +include_once("php5.3-compat-functions.php"); define('TYPO3_PROCEED_IF_NO_USER', 1); require ('init.php'); require ('template.php'); diff -u --recursive --new-file typo3_src-4.2.8/typo3/mod/tools/em/class.em_index.php typo3_src-4.2.8-php5.3-compat/typo3/mod/tools/em/class.em_index.php --- typo3_src-4.2.8/typo3/mod/tools/em/class.em_index.php 2009-07-03 21:55:14.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/mod/tools/em/class.em_index.php 2009-07-09 18:05:59.000000000 +0200 @@ -3556,7 +3556,7 @@ } } // - $XclassParts = split('if \(defined\([\'"]TYPO3_MODE[\'"]\) && \$TYPO3_CONF_VARS\[TYPO3_MODE\]\[[\'"]XCLASS[\'"]\]',$fContent,2); + $XclassParts = preg_split('/if \(defined\([\'"]TYPO3_MODE[\'"]\) && \$TYPO3_CONF_VARS\[TYPO3_MODE\]\[[\'"]XCLASS[\'"]\]/',$fContent,2); if (count($XclassParts)==2) { unset($reg); preg_match('/^\[[\'"]([[:alnum:]_\/\.]*)[\'"]\]/',$XclassParts[1],$reg); diff -u --recursive --new-file typo3_src-4.2.8/typo3/mod/tools/em/class.nusoap.php typo3_src-4.2.8-php5.3-compat/typo3/mod/tools/em/class.nusoap.php --- typo3_src-4.2.8/typo3/mod/tools/em/class.nusoap.php 2009-07-03 21:55:14.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/mod/tools/em/class.nusoap.php 2009-07-09 18:22:13.000000000 +0200 @@ -500,7 +500,7 @@ case (is_array($val) || $type): // detect if struct or array $valueType = $this->isArraySimpleOrStruct($val); - if($valueType=='arraySimple' || ereg('^ArrayOf',$type)){ + if($valueType=='arraySimple' || preg_match('/^ArrayOf/',$type)){ $i = 0; if(is_array($val) && count($val)> 0){ foreach($val as $v){ @@ -695,7 +695,7 @@ */ function expandQname($qname){ // get element prefix - if(strpos($qname,':') && !ereg('^http://',$qname)){ + if(strpos($qname,':') && !preg_match('/^http:\/\//',$qname)){ // get unqualified name $name = substr(strstr($qname,':'),1); // get ns prefix @@ -833,7 +833,7 @@ '([0-9]{2})(\.[0-9]*)?'. // seconds ss.ss... '(Z|[+\-][0-9]{2}:?[0-9]{2})?'; // Z to indicate UTC, -/+HH:MM:SS.SS... for local tz's - if(ereg($eregStr,$datestr,$regs)){ + if(preg_match("/".$eregStr."/",$datestr,$regs)){ return sprintf('%04d-%02d-%02dT%02d:%02d:%02dZ',$regs[1],$regs[2],$regs[3],$regs[4],$regs[5],$regs[6]); } return false; @@ -858,7 +858,7 @@ '([0-9]{2}):'. // minutes mm: '([0-9]{2})(\.[0-9]+)?'. // seconds ss.ss... '(Z|[+\-][0-9]{2}:?[0-9]{2})?'; // Z to indicate UTC, -/+HH:MM:SS.SS... for local tz's - if(ereg($eregStr,$datestr,$regs)){ + if(preg_match("/".$eregStr."/",$datestr,$regs)){ // not utc if($regs[8] != 'Z'){ $op = substr($regs[8],0,1); @@ -1162,7 +1162,7 @@ if(count($attrs) > 0){ foreach($attrs as $k => $v){ // if ns declarations, add to class level array of valid namespaces - if(ereg("^xmlns",$k)){ + if(preg_match("/^xmlns/",$k)){ //$this->xdebug("$k: $v"); //$this->xdebug('ns_prefix: '.$this->getPrefix($k)); if($ns_prefix = substr(strrchr($k,':'),1)){ @@ -1272,7 +1272,7 @@ // minOccurs="0" maxOccurs="unbounded" /> // // - if(isset($attrs['base']) && ereg(':Array$',$attrs['base'])){ + if(isset($attrs['base']) && preg_match('/:Array$/',$attrs['base'])){ $this->xdebug('complexType is unusual array'); $this->complexTypes[$this->currentComplexType]['phpType'] = 'array'; } else { @@ -1291,7 +1291,7 @@ // minOccurs="0" maxOccurs="unbounded" /> // // - if(isset($attrs['base']) && ereg(':Array$',$attrs['base'])){ + if(isset($attrs['base']) && preg_match('/:Array$/',$attrs['base'])){ $this->xdebug('complexType is unusual array'); $this->complexTypes[$this->currentComplexType]['phpType'] = 'array'; } else { @@ -1689,7 +1689,7 @@ } elseif(isset($this->attributes[$type])){ $this->xdebug("in getTypeDef, found attribute $type"); return $this->attributes[$type]; - } elseif (ereg('_ContainedType$', $type)) { + } elseif (preg_match('/_ContainedType$/', $type)) { $this->xdebug("in getTypeDef, have an untyped element $type"); $typeDef['typeClass'] = 'simpleType'; $typeDef['phpType'] = 'scalar'; @@ -2024,7 +2024,7 @@ function soap_transport_http($url){ parent::nusoap_base(); $this->setURL($url); - ereg('\$Revisio' . 'n: ([^ ]+)', $this->revision, $rev); + preg_match('/\$Revisio' . 'n: ([^ ]+)/', $this->revision, $rev); $this->outgoing_headers['User-Agent'] = $this->title.'/'.$this->version.' ('.$rev[1].')'; $this->debug('set User-Agent: ' . $this->outgoing_headers['User-Agent']); } @@ -2366,8 +2366,7 @@ $this->persistentConnection = false; $this->debug('set Connection: ' . $this->outgoing_headers['Connection']); } - set_magic_quotes_runtime(0); - // deprecated + //set_magic_quotes_runtime(0); depracted.. $this->encoding = $enc; } } @@ -2563,7 +2562,7 @@ } } // remove 100 header - if(isset($lb) && ereg('^HTTP/1.1 100',$data)){ + if(isset($lb) && preg_match('/^HTTP\/1.1 100/',$data)){ unset($lb); $data = ''; }// @@ -2716,7 +2715,7 @@ curl_close($this->ch); // remove 100 header(s) - while (ereg('^HTTP/1.1 100',$data)) { + while (preg_match('/^HTTP\/1.1 100/',$data)) { if ($pos = strpos($data,"\r\n\r\n")) { $data = ltrim(substr($data,$pos)); } elseif($pos = strpos($data,"\n\n") ) { @@ -2907,7 +2906,7 @@ */ function parseCookie($cookie_str) { $cookie_str = str_replace('; ', ';', $cookie_str) . ';'; - $data = split(';', $cookie_str); + $data = explode(';', $cookie_str); $value_str = $data[0]; $cookie_param = 'domain='; @@ -3282,7 +3281,7 @@ $this->currentSchema->schemaStartElement($parser, $name, $attrs); $this->appendDebug($this->currentSchema->getDebug()); $this->currentSchema->clearDebug(); - } elseif (ereg('schema$', $name)) { + } elseif (preg_match('/schema$/', $name)) { $this->debug('Parsing WSDL schema'); // $this->debug("startElement for $name ($attrs[name]). status = $this->status (".$this->getLocalPart($name).")"); $this->status = 'schema'; @@ -3301,7 +3300,7 @@ if (count($attrs) > 0) { // register namespace declarations foreach($attrs as $k => $v) { - if (ereg("^xmlns", $k)) { + if (preg_match("/^xmlns/", $k)) { if ($ns_prefix = substr(strrchr($k, ':'), 1)) { $this->namespaces[$ns_prefix] = $v; } else { @@ -3326,7 +3325,7 @@ $attrs = array(); } // get element prefix, namespace and name - if (ereg(':', $name)) { + if (preg_match('/:/', $name)) { // get ns prefix $prefix = substr($name, 0, strpos($name, ':')); // get ns @@ -3491,7 +3490,7 @@ */ function end_element($parser, $name){ // unset schema status - if (/*ereg('types$', $name) ||*/ ereg('schema$', $name)) { + if (/*ereg('types$', $name) ||*/ preg_match('/schema$/', $name)) { $this->status = ""; $this->appendDebug($this->currentSchema->getDebug()); $this->currentSchema->clearDebug(); @@ -4936,7 +4935,7 @@ $key_localpart = $this->getLocalPart($key); // if ns declarations, add to class level array of valid namespaces if($key_prefix == 'xmlns'){ - if(ereg('^http://www.w3.org/[0-9]{4}/XMLSchema$',$value)){ + if(preg_match('/^http:\/\/www.w3.org\/[0-9]{4}\/XMLSchema$/',$value)){ $this->XMLSchemaVersion = $value; $this->namespaces['xsd'] = $this->XMLSchemaVersion; $this->namespaces['xsi'] = $this->XMLSchemaVersion.'-instance'; @@ -4969,7 +4968,7 @@ [6] nextDimension ::= Digit+ ',' */ $expr = '([A-Za-z0-9_]+):([A-Za-z]+[A-Za-z0-9_]+)\[([0-9]+),?([0-9]*)\]'; - if(ereg($expr,$value,$regs)){ + if(preg_match("/".$expr."/",$value,$regs)){ $this->message[$pos]['typePrefix'] = $regs[1]; $this->message[$pos]['arrayTypePrefix'] = $regs[1]; if (isset($this->namespaces[$regs[1]])) { @@ -5682,7 +5681,7 @@ // detect transport switch(true){ // http(s) - case ereg('^http',$this->endpoint): + case preg_match('/^http/',$this->endpoint): $this->debug('transporting via HTTP'); if($this->persistentConnection == true && is_object($this->persistentConnection)){ $http =& $this->persistentConnection; @@ -5704,10 +5703,10 @@ $http->setEncoding($this->http_encoding); } $this->debug('sending message, length='.strlen($msg)); - if(ereg('^http:',$this->endpoint)){ + if(preg_match('/^http:/',$this->endpoint)){ //if(strpos($this->endpoint,'http:')){ $this->responseData = $http->send($msg,$timeout,$response_timeout,$this->cookies); - } elseif(ereg('^https',$this->endpoint)){ + } elseif(preg_match('/^https/',$this->endpoint)){ //} elseif(strpos($this->endpoint,'https:')){ //if(phpversion() == '4.3.0-dev'){ //$response = $http->send($msg,$timeout,$response_timeout); @@ -5765,7 +5764,7 @@ if (strpos($headers['content-type'], '=')) { $enc = str_replace('"', '', substr(strstr($headers["content-type"], '='), 1)); $this->debug('Got response encoding: ' . $enc); - if(eregi('^(ISO-8859-1|US-ASCII|UTF-8)$',$enc)){ + if(preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/',$enc)){ $this->xml_encoding = strtoupper($enc); } else { $this->xml_encoding = 'US-ASCII'; diff -u --recursive --new-file typo3_src-4.2.8/typo3/php5.3-compat-functions.php typo3_src-4.2.8-php5.3-compat/typo3/php5.3-compat-functions.php --- typo3_src-4.2.8/typo3/php5.3-compat-functions.php 1970-01-01 01:00:00.000000000 +0100 +++ typo3_src-4.2.8-php5.3-compat/typo3/php5.3-compat-functions.php 2009-07-09 18:28:58.000000000 +0200 @@ -0,0 +1,14 @@ + \ Kein Zeilenumbruch am Dateiende. diff -u --recursive --new-file typo3_src-4.2.8/typo3/show_item.php typo3_src-4.2.8-php5.3-compat/typo3/show_item.php --- typo3_src-4.2.8/typo3/show_item.php 2009-07-03 21:55:38.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/show_item.php 2009-07-09 17:23:25.000000000 +0200 @@ -196,7 +196,7 @@ } else { // if the filereference $this->file is relative, we correct the path if (substr($this->table,0,3)=='../') { - $this->file = PATH_site.ereg_replace('^\.\./','',$this->table); + $this->file = PATH_site.preg_replace('/^\.\.\//','',$this->table); } else { $this->file = $this->table; } diff -u --recursive --new-file typo3_src-4.2.8/typo3/sysext/adodb/adodb/adodb-datadict.inc.php typo3_src-4.2.8-php5.3-compat/typo3/sysext/adodb/adodb/adodb-datadict.inc.php --- typo3_src-4.2.8/typo3/sysext/adodb/adodb/adodb-datadict.inc.php 2009-07-03 21:55:38.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/sysext/adodb/adodb/adodb-datadict.inc.php 2009-07-09 18:12:07.000000000 +0200 @@ -410,7 +410,7 @@ // genfields can return FALSE at times if ($lines == null) $lines = array(); list(,$first) = each($lines); - list(,$column_def) = split("[\t ]+",$first,2); + list(,$column_def) = preg_split("/[\t ]+/",$first,2); } return array(sprintf($this->renameColumn,$tabname,$this->NameQuote($oldcolumn),$this->NameQuote($newcolumn),$column_def)); } diff -u --recursive --new-file typo3_src-4.2.8/typo3/sysext/adodb/adodb/adodb-perf.inc.php typo3_src-4.2.8-php5.3-compat/typo3/sysext/adodb/adodb/adodb-perf.inc.php --- typo3_src-4.2.8/typo3/sysext/adodb/adodb/adodb-perf.inc.php 2009-07-03 21:55:38.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/sysext/adodb/adodb/adodb-perf.inc.php 2009-07-09 18:11:50.000000000 +0200 @@ -87,10 +87,10 @@ $conn->_logsql = false; // disable logsql error simulation $dbT = $conn->databaseType; - $a0 = split(' ',$t0); + $a0 = explode(' ',$t0); $a0 = (float)$a0[1]+(float)$a0[0]; - $a1 = split(' ',$t1); + $a1 = explode(' ',$t1); $a1 = (float)$a1[1]+(float)$a1[0]; $time = $a1 - $a0; diff -u --recursive --new-file typo3_src-4.2.8/typo3/sysext/adodb/adodb/adodb-xmlschema03.inc.php typo3_src-4.2.8-php5.3-compat/typo3/sysext/adodb/adodb/adodb-xmlschema03.inc.php --- typo3_src-4.2.8/typo3/sysext/adodb/adodb/adodb-xmlschema03.inc.php 2009-07-03 21:55:38.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/sysext/adodb/adodb/adodb-xmlschema03.inc.php 2009-07-09 18:24:40.000000000 +0200 @@ -1407,7 +1407,7 @@ function adoSchema( &$db ) { // Initialize the environment $this->mgq = get_magic_quotes_runtime(); - set_magic_quotes_runtime(0); + //set_magic_quotes_runtime(0); depracted $this->db =& $db; $this->debug = $this->db->debug; diff -u --recursive --new-file typo3_src-4.2.8/typo3/sysext/adodb/adodb/adodb-xmlschema.inc.php typo3_src-4.2.8-php5.3-compat/typo3/sysext/adodb/adodb/adodb-xmlschema.inc.php --- typo3_src-4.2.8/typo3/sysext/adodb/adodb/adodb-xmlschema.inc.php 2009-07-03 21:55:38.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/sysext/adodb/adodb/adodb-xmlschema.inc.php 2009-07-09 18:24:13.000000000 +0200 @@ -1302,7 +1302,7 @@ function adoSchema( &$db ) { // Initialize the environment $this->mgq = get_magic_quotes_runtime(); - set_magic_quotes_runtime(0); + //set_magic_quotes_runtime(0); depracted $this->db =& $db; $this->debug = $this->db->debug; diff -u --recursive --new-file typo3_src-4.2.8/typo3/sysext/adodb/adodb/drivers/adodb-informix72.inc.php typo3_src-4.2.8-php5.3-compat/typo3/sysext/adodb/adodb/drivers/adodb-informix72.inc.php --- typo3_src-4.2.8/typo3/sysext/adodb/adodb/drivers/adodb-informix72.inc.php 2009-07-03 21:55:37.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/sysext/adodb/adodb/drivers/adodb-informix72.inc.php 2009-07-09 18:12:51.000000000 +0200 @@ -369,7 +369,7 @@ foreach($fp as $k => $v) { $o = new ADOFieldObject; $o->name = $k; - $arr = split(';',$v); //"SQLTYPE;length;precision;scale;ISNULLABLE" + $arr = explode(';',$v); //"SQLTYPE;length;precision;scale;ISNULLABLE" $o->type = $arr[0]; $o->max_length = $arr[1]; $this->_fieldprops[] = $o; diff -u --recursive --new-file typo3_src-4.2.8/typo3/sysext/adodb/adodb/drivers/adodb-ldap.inc.php typo3_src-4.2.8-php5.3-compat/typo3/sysext/adodb/adodb/drivers/adodb-ldap.inc.php --- typo3_src-4.2.8/typo3/sysext/adodb/adodb/drivers/adodb-ldap.inc.php 2009-07-03 21:55:37.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/sysext/adodb/adodb/drivers/adodb-ldap.inc.php 2009-07-09 18:12:35.000000000 +0200 @@ -55,7 +55,7 @@ $conn_info = array( $host,$this->port); if ( strstr( $host, ':' ) ) { - $conn_info = split( ':', $host ); + $conn_info = explode( ':', $host ); } $this->_connectionID = ldap_connect( $conn_info[0], $conn_info[1] ); diff -u --recursive --new-file typo3_src-4.2.8/typo3/sysext/adodb/adodb/drivers/adodb-postgres64.inc.php typo3_src-4.2.8-php5.3-compat/typo3/sysext/adodb/adodb/drivers/adodb-postgres64.inc.php --- typo3_src-4.2.8/typo3/sysext/adodb/adodb/drivers/adodb-postgres64.inc.php 2009-07-03 21:55:37.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/sysext/adodb/adodb/drivers/adodb-postgres64.inc.php 2009-07-09 18:12:21.000000000 +0200 @@ -659,7 +659,7 @@ if (strlen($db) == 0) $db = 'template1'; $db = adodb_addslashes($db); if ($str) { - $host = split(":", $str); + $host = explode(":", $str); if ($host[0]) $str = "host=".adodb_addslashes($host[0]); else $str = ''; if (isset($host[1])) $str .= " port=$host[1]"; diff -u --recursive --new-file typo3_src-4.2.8/typo3/sysext/adodb/adodb/drivers/adodb-sybase.inc.php typo3_src-4.2.8-php5.3-compat/typo3/sysext/adodb/adodb/drivers/adodb-sybase.inc.php --- typo3_src-4.2.8/typo3/sysext/adodb/adodb/drivers/adodb-sybase.inc.php 2009-07-03 21:55:37.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/sysext/adodb/adodb/drivers/adodb-sybase.inc.php 2009-07-09 17:21:01.000000000 +0200 @@ -376,7 +376,7 @@ global $ADODB_sybase_mths; //Dec 30 2000 12:00AM - if (!ereg( "([A-Za-z]{3})[-/\. ]+([0-9]{1,2})[-/\. ]+([0-9]{4})" + if (!preg_match( "/([A-Za-z]{3})[-\/\. ]+([0-9]{1,2})[-\/\. ]+([0-9]{4})/" ,$v, $rr)) return parent::UnixDate($v); if ($rr[3] <= TIMESTAMP_FIRST_YEAR) return 0; @@ -393,7 +393,7 @@ global $ADODB_sybase_mths; //11.02.2001 Toni Tunkkari toni.tunkkari@finebyte.com //Changed [0-9] to [0-9 ] in day conversion - if (!ereg( "([A-Za-z]{3})[-/\. ]([0-9 ]{1,2})[-/\. ]([0-9]{4}) +([0-9]{1,2}):([0-9]{1,2}) *([apAP]{0,1})" + if (!preg_match( "/([A-Za-z]{3})[-\/\. ]([0-9 ]{1,2})[-\/\. ]([0-9]{4}) +([0-9]{1,2}):([0-9]{1,2}) *([apAP]{0,1})/" ,$v, $rr)) return parent::UnixTimeStamp($v); if ($rr[3] <= TIMESTAMP_FIRST_YEAR) return 0; diff -u --recursive --new-file typo3_src-4.2.8/typo3/sysext/beuser/mod/index.php typo3_src-4.2.8-php5.3-compat/typo3/sysext/beuser/mod/index.php --- typo3_src-4.2.8/typo3/sysext/beuser/mod/index.php 2009-07-03 21:55:14.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/sysext/beuser/mod/index.php 2009-07-09 17:18:23.000000000 +0200 @@ -675,7 +675,7 @@ $pout[]=''.t3lib_iconWorks::getIconImage($table,array(),$GLOBALS['BACK_PATH'],'align="top"').$GLOBALS['LANG']->sL($GLOBALS['TCA'][$table]['ctrl']['title']).''; } if ($GLOBALS['TCA'][$table]['columns'][$field]) { - $pout[]=' - '.ereg_replace(':$','',$GLOBALS['LANG']->sL($GLOBALS['TCA'][$table]['columns'][$field]['label'])).''; + $pout[]=' - '.preg_replace('/:$/','',$GLOBALS['LANG']->sL($GLOBALS['TCA'][$table]['columns'][$field]['label'])).''; } } } diff -u --recursive --new-file typo3_src-4.2.8/typo3/sysext/cms/layout/class.tx_cms_layout.php typo3_src-4.2.8-php5.3-compat/typo3/sysext/cms/layout/class.tx_cms_layout.php --- typo3_src-4.2.8/typo3/sysext/cms/layout/class.tx_cms_layout.php 2009-07-03 21:55:24.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/sysext/cms/layout/class.tx_cms_layout.php 2009-07-09 18:09:15.000000000 +0200 @@ -318,7 +318,7 @@ foreach($this->fieldArray as $field) { if ($editIdList && isset($TCA['pages']['columns'][$field]) && $field!='uid' && !$this->pages_noEditColumns) { $params='&edit[pages]['.$editIdList.']=edit&columnsOnly='.$field.'&disHelp=1'; - $iTitle = sprintf($GLOBALS['LANG']->getLL('editThisColumn'),ereg_replace(':$','',trim($GLOBALS['LANG']->sL(t3lib_BEfunc::getItemLabel('pages',$field))))); + $iTitle = sprintf($GLOBALS['LANG']->getLL('editThisColumn'),preg_replace('/:$/','',trim($GLOBALS['LANG']->sL(t3lib_BEfunc::getItemLabel('pages',$field))))); $eI= ''. 'backPath,'gfx/edit2.gif','width="11" height="12"').' title="'.htmlspecialchars($iTitle).'" alt="" />'. ''; @@ -2270,7 +2270,7 @@ * @return string Processed output. */ function wordWrapper($content,$max=50,$char=' -') { - $array = split(' |'.chr(10),$content); + $array = explode(' |'.chr(10),$content); foreach($array as $val) { if (strlen($val)>$max) { $content=str_replace($val,substr(chunk_split($val,$max,$char),0,-1),$content); diff -u --recursive --new-file typo3_src-4.2.8/typo3/sysext/cms/tslib/class.tslib_content.php typo3_src-4.2.8-php5.3-compat/typo3/sysext/cms/tslib/class.tslib_content.php --- typo3_src-4.2.8/typo3/sysext/cms/tslib/class.tslib_content.php 2009-07-03 21:55:26.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/sysext/cms/tslib/class.tslib_content.php 2009-07-09 18:07:34.000000000 +0200 @@ -1726,7 +1726,7 @@ $confData['type'] = trim(strtolower(end($typeParts))); if (count($typeParts)==1) { $confData['fieldname'] = $this->cleanFormName($parts[0]); - if (strtolower(ereg_replace('[^[:alnum:]]','',$confData['fieldname']))=='email') {$confData['fieldname']='email';} + if (strtolower(preg_replace('/[^[:alnum:]]/','',$confData['fieldname']))=='email') {$confData['fieldname']='email';} // Duplicate fieldnames resolved if (isset($fieldname_hashArray[md5($confData['fieldname'])])) { $confData['fieldname'].='_'.$cc; @@ -2808,7 +2808,7 @@ */ function linkWrap($content,$wrap) { $wrapArr = explode('|', $wrap); - if (ereg("\{([0-9]*)\}",$wrapArr[0],$reg)) { + if (preg_match("/\{([0-9]*)\}/",$wrapArr[0],$reg)) { if ($uid = $GLOBALS['TSFE']->tmpl->rootLine[$reg[1]]['uid']) { $wrapArr[0] = str_replace($reg[0],$uid,$wrapArr[0]); } @@ -3017,7 +3017,7 @@ } $regex = implode('|',$aKeys); // Doing regex's - $storeArr['c'] = split($regex,$content); + $storeArr['c'] = preg_split("/".$regex."/",$content); preg_match_all('/'.$regex.'/',$content,$keyList); $storeArr['k']=$keyList[0]; // Setting cache: @@ -3262,10 +3262,10 @@ } if ($conf['doubleBrTag']) { - $content=ereg_replace("\r?\n[\t ]*\r?\n",$conf['doubleBrTag'],$content); + $content=preg_replace("/\r?\n[\t ]*\r?\n/",$conf['doubleBrTag'],$content); } if ($conf['br']) {$content=nl2br($content);} - if ($conf['brTag']) {$content= ereg_replace(chr(10),$conf['brTag'],$content);} + if ($conf['brTag']) {$content= preg_replace("/".chr(10)."/",$conf['brTag'],$content);} if ($conf['encapsLines.']) {$content=$this->encaps_lineSplit($content,$conf['encapsLines.']);} if ($conf['keywords']) {$content= $this->keywords($content);} if ($conf['innerWrap'] || $conf['innerWrap.']){$content=$this->wrap($content, $this->stdWrap($conf['innerWrap'], $conf['innerWrap.']));} @@ -3397,7 +3397,7 @@ } $temp = explode($char,$content); $last = ''.(count($temp)-1); - $index=$this->calc(eregi_replace('last',$last,$listNum)); + $index=$this->calc(preg_replace('/last/i',$last,$listNum)); return $temp[$index]; } @@ -3558,7 +3558,7 @@ */ function clean_directory($theDir) { if (t3lib_div::validPathStr($theDir)) { // proceeds if no '//', '..' or '\' is in the $theFile - $theDir = ereg_replace("[\/\. ]*$",'',$theDir); // Removes all dots, slashes and spaces after a path... + $theDir = preg_replace("/[\/\. ]*$/",'',$theDir); // Removes all dots, slashes and spaces after a path... if (!t3lib_div::isAbsPath($theDir) && @is_dir($theDir)) { return $theDir; } @@ -3733,7 +3733,7 @@ "'<\w+.*?(onabort|onbeforeunload|onblur|onchange|onclick|ondblclick|ondragdrop|onerror|onfilterchange|onfocus|onhelp|onkeydown|onkeypress|onkeyup|onload|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|onmove|onreadystatechange|onreset|onresize|onscroll|onselect|onselectstart|onsubmit|onunload).*?>'si", ), '', $text); - $text = eregi_replace(']*href[[:space:]]*=[[:space:]]*["\']?[[:space:]]*javascript[^>]*','',$text); + $text = preg_replace('/]*href[[:space:]]*=[[:space:]]*["\']?[[:space:]]*javascript[^>]*/','',$text); // Return clean content return $text; @@ -3944,7 +3944,7 @@ } // Wrapping file label - if ($conf['removePrependedNumbers']) $theValue=ereg_replace('_[0-9][0-9](\.[[:alnum:]]*)$','\1',$theValue); + if ($conf['removePrependedNumbers']) $theValue=preg_replace('/_[0-9][0-9](\.[[:alnum:]]*)$/','\1',$theValue); $theValue = $this->stdWrap($theValue,$conf['labelStdWrap.']); // Wrapping file @@ -4135,10 +4135,10 @@ $tagName=strtolower($htmlParser->getFirstTagName($v)); $cfg=$conf['externalBlocks.'][$tagName.'.']; if ($cfg['stripNLprev'] || $cfg['stripNL']) { - $parts[$k-1]=ereg_replace(chr(13).'?'.chr(10).'[ ]*$', '', $parts[$k-1]); + $parts[$k-1]=preg_replace("/".chr(13).'?'.chr(10).'[ ]*$/', '', $parts[$k-1]); } if ($cfg['stripNLnext'] || $cfg['stripNL']) { - $parts[$k+1]=ereg_replace('^[ ]*'.chr(13).'?'.chr(10), '', $parts[$k+1]); + $parts[$k+1]=preg_replace('/^[ ]*'.chr(13).'?'.chr(10)."/", '', $parts[$k+1]); } } } @@ -4261,7 +4261,7 @@ $data = substr($theValue,$pointer,$len); // $data is the content until the next no_cache && $conf['sword'] && is_array($GLOBALS['TSFE']->sWordList) && $GLOBALS['TSFE']->sWordRegEx) { $newstring = ''; do { - $pieces = split($GLOBALS['TSFE']->sWordRegEx,$data,2); + $pieces = preg_split("/".$GLOBALS['TSFE']->sWordRegEx."/",$data,2); $newstring.=$pieces[0]; $match_len = strlen($data)-(strlen($pieces[0])+strlen($pieces[1])); if (strstr($pieces[0],'<') || strstr($pieces[0],'>')) { @@ -4366,9 +4366,9 @@ } $this->parameters['allParams']=trim($currentTag[1]); if ($stripNL) { // Removes NL in the beginning and end of the tag-content AND at the end of the currentTagBuffer. $stripNL depends on the configuration of the current tag - $contentAccum[$contentAccumP-1] = ereg_replace(chr(13).'?'.chr(10).'[ ]*$', '', $contentAccum[$contentAccumP-1]); - $contentAccum[$contentAccumP] = ereg_replace('^[ ]*'.chr(13).'?'.chr(10), '', $contentAccum[$contentAccumP]); - $contentAccum[$contentAccumP] = ereg_replace(chr(13).'?'.chr(10).'[ ]*$', '', $contentAccum[$contentAccumP]); + $contentAccum[$contentAccumP-1] = preg_replace("/".chr(13).'?'.chr(10).'[ ]*$/', '', $contentAccum[$contentAccumP-1]); + $contentAccum[$contentAccumP] = preg_replace('/^[ ]*'.chr(13).'?'.chr(10)."/", '', $contentAccum[$contentAccumP]); + $contentAccum[$contentAccumP] = preg_replace("/".chr(13).'?'.chr(10).'[ ]*$/', '', $contentAccum[$contentAccumP]); } $this->data[$this->currentValKey] = $contentAccum[$contentAccumP]; $newInput=$this->cObjGetSingle($theName,$theConf,'/parseFunc/.tags.'.$tag[0]); // fetch the content object @@ -4521,7 +4521,7 @@ if (trim(substr($textstr,-1))=='' && $len) { $lastChar=substr($textpieces[$i],$len-1,1); - if (!ereg('[A-Za-z0-9\/#_-]',$lastChar)) {$len--;} // Included '\/' 3/12 + if (!preg_match('/[A-Za-z0-9\/#_-]/',$lastChar)) {$len--;} // Included '\/' 3/12 $parts[0]=substr($textpieces[$i],0,$len); $parts[1]=substr($textpieces[$i],$len); @@ -4588,11 +4588,11 @@ $len = strcspn($textpieces[$i],chr(32).chr(9).chr(13).chr(10)); if (trim(substr($textstr,-1))=='' && $len) { $lastChar = substr($textpieces[$i],$len-1,1); - if (!ereg('[A-Za-z0-9]',$lastChar)) {$len--;} + if (!preg_match('/[A-Za-z0-9]/',$lastChar)) {$len--;} $parts[0] = substr($textpieces[$i],0,$len); $parts[1] = substr($textpieces[$i],$len); - $linktxt = ereg_replace('\?.*','',$parts[0]); + $linktxt = preg_replace('/\?.*/','',$parts[0]); list($mailToUrl,$linktxt) = $this->getMailTo($parts[0],$linktxt,$initP); $mailToUrl = $GLOBALS['TSFE']->spamProtectEmailAddresses === 'ascii'?$mailToUrl:htmlspecialchars($mailToUrl); $res = ''; @@ -4661,7 +4661,7 @@ $gifCreator->init(); if ($GLOBALS['TSFE']->config['config']['meaningfulTempFilePrefix']) { - $gifCreator->filenamePrefix = $GLOBALS['TSFE']->fileNameASCIIPrefix(ereg_replace('\.[[:alnum:]]+$','',basename($theImage)),intval($GLOBALS['TSFE']->config['config']['meaningfulTempFilePrefix']),'_'); + $gifCreator->filenamePrefix = $GLOBALS['TSFE']->fileNameASCIIPrefix(preg_replace('/\.[[:alnum:]]+$/','',basename($theImage)),intval($GLOBALS['TSFE']->config['config']['meaningfulTempFilePrefix']),'_'); } if ($fileArray['sample']) { @@ -5158,7 +5158,7 @@ $JSwindowParts = array(); $JSwindowParams = ''; $onClick = ''; - if ($forceTarget && ereg('^([0-9]+)x([0-9]+)(:(.*)|.*)$',$forceTarget,$JSwindowParts)) { + if ($forceTarget && preg_match('/^([0-9]+)x([0-9]+)(:(.*)|.*)$/',$forceTarget,$JSwindowParts)) { // Take all pre-configured and inserted parameters and compile parameter list, including width+height: $JSwindow_tempParamsArr = t3lib_div::trimExplode(',',strtolower($conf['JSwindow_params'].','.$JSwindowParts[4]),1); $JSwindow_paramsArr=array(); @@ -5187,7 +5187,7 @@ // Detecting kind of link: if(strstr($link_param,'@') && (!$pU['scheme'] || $pU['scheme']=='mailto')) { // If it's a mail address: - $link_param = eregi_replace('^mailto:','',$link_param); + $link_param = preg_replace('/^mailto:/i','',$link_param); list($this->lastTypoLinkUrl,$linktxt) = $this->getMailTo($link_param,$linktxt,$initP); $finalTagParts['url']=$this->lastTypoLinkUrl; $finalTagParts['TYPE']='mailto'; @@ -5906,7 +5906,7 @@ * @return string Cleaned up string, keywords will be separated by a comma only. */ function keywords($content) { - $listArr = split(',|;|'.chr(10),$content); + $listArr = preg_split('/,|;|'.chr(10)."/",$content); reset($listArr); while(list($k,$v)=each($listArr)) { $listArr[$k]=trim($v); @@ -6029,7 +6029,7 @@ $emailContent = trim($msg); if ($emailContent) { - $parts = split(chr(10),$emailContent,2); // First line is subject + $parts = preg_split("/".chr(10)."/",$emailContent,2); // First line is subject $subject=trim($parts[0]); $plain_message=trim($parts[1]); @@ -6692,7 +6692,7 @@ $where = ''; if ($sw) { $searchFields = explode(',',$searchFieldList); - $kw = split('[ ,]',$sw); + $kw = preg_split('/[ ,]/',$sw); while(list(,$val)=each($kw)) { $val = trim($val); @@ -6762,8 +6762,8 @@ $GLOBALS['TT']->setTSlogMessage($error); } else { $row = $GLOBALS['TYPO3_DB']->sql_fetch_row($res); - $conf['max'] = eregi_replace('total', $row[0], $conf['max']); - $conf['begin'] = eregi_replace('total', $row[0], $conf['begin']); + $conf['max'] = preg_replace('/total/i', $row[0], $conf['max']); + $conf['begin'] = preg_replace('/total/i', $row[0], $conf['begin']); } $GLOBALS['TYPO3_DB']->sql_free_result($res); } @@ -7239,7 +7239,7 @@ $cBuf = rtrim($content); $securCount=30; while($securCount && substr($cBuf,-1)=='>' && substr($cBuf,-4)!='') { - $cBuf = rtrim(ereg_replace('<[^<]*>$','',$cBuf)); + $cBuf = rtrim(preg_replace('/<[^<]*>$/','',$cBuf)); $securCount--; } $content = strlen($cBuf)&&$securCount ? substr($content,0,strlen($cBuf)).$icon.substr($content,strlen($cBuf)) : $content=$icon.$content; diff -u --recursive --new-file typo3_src-4.2.8/typo3/sysext/cms/tslib/class.tslib_fe.php typo3_src-4.2.8-php5.3-compat/typo3/sysext/cms/tslib/class.tslib_fe.php --- typo3_src-4.2.8/typo3/sysext/cms/tslib/class.tslib_fe.php 2009-07-03 21:55:26.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/sysext/cms/tslib/class.tslib_fe.php 2009-07-09 18:08:48.000000000 +0200 @@ -1500,7 +1500,7 @@ $res = t3lib_div::getURL($code, 1, $headerArr); // Header and content are separated by an empty line - list($header,$content) = split("\r\n\r\n", $res, 2); + list($header,$content) = explode("\r\n\r\n", $res, 2); $content.= "\r\n"; if (false === $res) { @@ -1660,7 +1660,7 @@ $message = 'You logged out from Workspace preview mode. Click this link to go back to the website'; } die(sprintf($message, - htmlspecialchars(ereg_replace('\&?ADMCMD_prev=[[:alnum:]]+','',t3lib_div::_GET('returnUrl'))) + htmlspecialchars(preg_replace('/\&?ADMCMD_prev=[[:alnum:]]+/','',t3lib_div::_GET('returnUrl'))) )); } diff -u --recursive --new-file typo3_src-4.2.8/typo3/sysext/cms/tslib/class.tslib_gifbuilder.php typo3_src-4.2.8-php5.3-compat/typo3/sysext/cms/tslib/class.tslib_gifbuilder.php --- typo3_src-4.2.8/typo3/sysext/cms/tslib/class.tslib_gifbuilder.php 2009-07-03 21:55:26.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/sysext/cms/tslib/class.tslib_gifbuilder.php 2009-07-09 17:01:36.000000000 +0200 @@ -218,7 +218,7 @@ case 'IMAGE': $fileInfo = $this->getResource($conf['file'],$conf['file.']); if ($fileInfo) { - $this->combinedFileNames[] = ereg_replace('\.[[:alnum:]]+$','',basename($fileInfo[3])); + $this->combinedFileNames[] = preg_replace('/\.[[:alnum:]]+$/','',basename($fileInfo[3])); $this->setup[$theKey.'.']['file'] = $fileInfo[3]; $this->setup[$theKey.'.']['BBOX'] = $fileInfo; $this->objBB[$theKey] = $fileInfo; diff -u --recursive --new-file typo3_src-4.2.8/typo3/sysext/cms/tslib/class.tslib_pagegen.php typo3_src-4.2.8-php5.3-compat/typo3/sysext/cms/tslib/class.tslib_pagegen.php --- typo3_src-4.2.8/typo3/sysext/cms/tslib/class.tslib_pagegen.php 2009-07-03 21:55:26.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/sysext/cms/tslib/class.tslib_pagegen.php 2009-07-09 18:29:54.000000000 +0200 @@ -184,13 +184,13 @@ while (list($key,$val) = each($GLOBALS['TSFE']->sWordList)) { if (trim($val)) { if (!$noMixedCase) { - $GLOBALS['TSFE']->sWordRegEx.= $space.sql_regcase(quotemeta($val)).$space.'|'; + $GLOBALS['TSFE']->sWordRegEx.= $space.mb_sql_regcase(quotemeta($val)).$space.'|'; } else { $GLOBALS['TSFE']->sWordRegEx.= $space.quotemeta($val).$space.'|'; } } } - $GLOBALS['TSFE']->sWordRegEx = ereg_replace('\|$','',$GLOBALS['TSFE']->sWordRegEx); + $GLOBALS['TSFE']->sWordRegEx = preg_replace('/\|$/','',$GLOBALS['TSFE']->sWordRegEx); } // linkVars @@ -836,7 +836,7 @@ if (!$defBT) $defBT = $GLOBALS['TSFE']->defaultBodyTag; $bodyTag = $GLOBALS['TSFE']->pSetup['bodyTag'] ? $GLOBALS['TSFE']->pSetup['bodyTag'] : $defBT; if ($bgImg=$GLOBALS['TSFE']->cObj->getImgResource($GLOBALS['TSFE']->pSetup['bgImg'],$GLOBALS['TSFE']->pSetup['bgImg.'])) { - $bodyTag = ereg_replace('>$','',trim($bodyTag)).' background="'.$GLOBALS["TSFE"]->absRefPrefix.$bgImg[3].'">'; + $bodyTag = preg_replace('/>$/','',trim($bodyTag)).' background="'.$GLOBALS["TSFE"]->absRefPrefix.$bgImg[3].'">'; } if (isset($GLOBALS['TSFE']->pSetup['bodyTagMargins'])) { @@ -844,16 +844,16 @@ if ($GLOBALS['TSFE']->pSetup['bodyTagMargins.']['useCSS']) { // Setting margins in CSS, see above } else { - $bodyTag = ereg_replace('>$','',trim($bodyTag)).' leftmargin="'.$margins.'" topmargin="'.$margins.'" marginwidth="'.$margins.'" marginheight="'.$margins.'">'; + $bodyTag = preg_replace('/>$/','',trim($bodyTag)).' leftmargin="'.$margins.'" topmargin="'.$margins.'" marginwidth="'.$margins.'" marginheight="'.$margins.'">'; } } if (trim($GLOBALS['TSFE']->pSetup['bodyTagAdd'])) { - $bodyTag = ereg_replace('>$','',trim($bodyTag)).' '.trim($GLOBALS['TSFE']->pSetup['bodyTagAdd']).'>'; + $bodyTag = preg_replace('/>$/','',trim($bodyTag)).' '.trim($GLOBALS['TSFE']->pSetup['bodyTagAdd']).'>'; } if (count($JSef[1])) { // Event functions: - $bodyTag = ereg_replace('>$','',trim($bodyTag)).' '.trim(implode(' ',$JSef[1])).'>'; + $bodyTag = preg_replace('/>$/','',trim($bodyTag)).' '.trim(implode(' ',$JSef[1])).'>'; } $GLOBALS['TSFE']->content.= chr(10).$bodyTag; diff -u --recursive --new-file typo3_src-4.2.8/typo3/sysext/cms/tslib/class.tslib_pibase.php typo3_src-4.2.8-php5.3-compat/typo3/sysext/cms/tslib/class.tslib_pibase.php --- typo3_src-4.2.8/typo3/sysext/cms/tslib/class.tslib_pibase.php 2009-07-03 21:55:26.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/sysext/cms/tslib/class.tslib_pibase.php 2009-07-09 18:16:30.000000000 +0200 @@ -393,7 +393,7 @@ * @return string The processed input string, modified IF a tag was found */ function pi_openAtagHrefInJSwindow($str,$winName='',$winParams='width=670,height=500,status=0,menubar=0,scrollbars=1,resizable=1') { - if (eregi('(.*)(]*>)(.*)',$str,$match)) { + if (preg_match('/(.*)(]*>)(.*)/i',$str,$match)) { $aTagContent = t3lib_div::get_tag_attributes($match[2]); $match[2]='quotemeta($reg[0]),'',$sword); - $sword = trim(ereg_replace('^"','',$sword)); // Removes last double-quote - } elseif (ereg('^'.$specs,$sword,$reg)) { + $sword = preg_replace('/^'.$this->quotemeta($reg[0])."/",'',$sword); + $sword = trim(preg_replace('/^"/','',$sword)); // Removes last double-quote + } elseif (preg_match('/^'.$specs."/",$sword,$reg)) { $value[] = $reg[0]; - $sword = trim(ereg_replace('^'.$specs,'',$sword)); // Removes = sign - } elseif (ereg('[\+\-]',$sword)) { // Check if $sword contains + or - + $sword = trim(preg_replace('/^'.$specs."/",'',$sword)); // Removes = sign + } elseif (preg_match('/[\+\-]/',$sword)) { // Check if $sword contains + or - // + and - shall only be interpreted as $specchars when there's whitespace before it // otherwise it's included in the searchword (e.g. "know-how") $a_sword = explode(' ',$sword); // explode $sword to single words $word = array_shift($a_sword); // get first word - $word = ereg_replace($delchars.'$','',$word); // Delete $delchars at end of string + $word = preg_replace("/".$delchars.'$/','',$word); // Delete $delchars at end of string $value[] = $word; // add searchword to values $sword = implode(' ',$a_sword); // re-build $sword } else { // There are no double-quotes around the value. Looking for next (space) or special char. - ereg('^[^ '.$this->quotemeta($specchars).']*',$sword,$reg); - $word = ereg_replace($delchars.'$','',trim($reg[0])); // Delete $delchars at end of string + preg_match('/^[^ '.$this->quotemeta($specchars).']*/',$sword,$reg); + $word = preg_replace("/".$delchars.'$/','',trim($reg[0])); // Delete $delchars at end of string $value[] = $word; - $sword = trim(ereg_replace('^'.$this->quotemeta($reg[0]),'',$sword)); + $sword = trim(preg_replace('/^'.$this->quotemeta($reg[0])."/",'',$sword)); } } diff -u --recursive --new-file typo3_src-4.2.8/typo3/sysext/cms/tslib/media/scripts/fe_adminLib.inc typo3_src-4.2.8-php5.3-compat/typo3/sysext/cms/tslib/media/scripts/fe_adminLib.inc --- typo3_src-4.2.8/typo3/sysext/cms/tslib/media/scripts/fe_adminLib.inc 2009-07-03 21:55:25.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/sysext/cms/tslib/media/scripts/fe_adminLib.inc 2009-07-09 17:01:18.000000000 +0200 @@ -445,16 +445,16 @@ $this->dataArr[$theField] = str_replace(' ', '', $this->dataArr[$theField]); break; case 'alpha': - $this->dataArr[$theField] = ereg_replace('[^a-zA-Z]','',$this->dataArr[$theField]); + $this->dataArr[$theField] = preg_replace('/[^a-zA-Z]/','',$this->dataArr[$theField]); break; case 'num': - $this->dataArr[$theField] = ereg_replace('[^0-9]','',$this->dataArr[$theField]); + $this->dataArr[$theField] = preg_replace('/[^0-9]/','',$this->dataArr[$theField]); break; case 'alphanum': - $this->dataArr[$theField] = ereg_replace('[^a-zA-Z0-9]','',$this->dataArr[$theField]); + $this->dataArr[$theField] = preg_replace('/[^a-zA-Z0-9]/','',$this->dataArr[$theField]); break; case 'alphanum_x': - $this->dataArr[$theField] = ereg_replace('[^a-zA-Z0-9_-]','',$this->dataArr[$theField]); + $this->dataArr[$theField] = preg_replace('/[^a-zA-Z0-9_-]/','',$this->dataArr[$theField]); break; case 'trim': $this->dataArr[$theField] = trim($this->dataArr[$theField]); @@ -497,8 +497,8 @@ $hashArray=array(); while(list(,$fN)=each($otherFields)) { $vv = $this->dataArr[$fN]; - $vv = ereg_replace('[[:space:]]','',$vv); - $vv = ereg_replace('[^[:alnum:]]','',$vv); + $vv = preg_replace('/[[:space:]]/','',$vv); + $vv = preg_replace('/[^[:alnum:]]/','',$vv); $vv = strtolower($vv); $hashArray[]=$vv; } diff -u --recursive --new-file typo3_src-4.2.8/typo3/sysext/cms/tslib/media/scripts/plaintextLib.inc typo3_src-4.2.8-php5.3-compat/typo3/sysext/cms/tslib/media/scripts/plaintextLib.inc --- typo3_src-4.2.8/typo3/sysext/cms/tslib/media/scripts/plaintextLib.inc 2009-07-03 21:55:25.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/sysext/cms/tslib/media/scripts/plaintextLib.inc 2009-07-09 17:00:09.000000000 +0200 @@ -208,7 +208,7 @@ */ function getMenuSitemap() { $str = $this->cObj->cObjGetSingle($this->conf['menu'],$this->conf['menu.']); - $str = $this->breakBulletlist(trim(strip_tags(eregi_replace('',chr(10),$this->parseBody($str))))); + $str = $this->breakBulletlist(trim(strip_tags(preg_replace('//i',chr(10),$this->parseBody($str))))); return $str; } @@ -229,7 +229,7 @@ * @return string Content */ function getHTML($str=array()) { - return $this->breakContent(strip_tags(eregi_replace('',chr(10),$this->parseBody(is_string($str)?$str:$this->cObj->data['bodytext'])))); + return $this->breakContent(strip_tags(preg_replace('//i',chr(10),$this->parseBody(is_string($str)?$str:$this->cObj->data['bodytext'])))); } /** @@ -261,7 +261,7 @@ */ function parseBody($str) { // First, regular parsing: - $str = eregi_replace('',' ',$str); + $str = preg_replace('//',' ',$str); $str = $this->cObj->stdWrap($str,$this->conf['bodytext.']['stdWrap.']); // Then all a-tags: $aConf = array(); diff -u --recursive --new-file typo3_src-4.2.8/typo3/sysext/cms/tslib/media/scripts/wapversionLib.inc typo3_src-4.2.8-php5.3-compat/typo3/sysext/cms/tslib/media/scripts/wapversionLib.inc --- typo3_src-4.2.8/typo3/sysext/cms/tslib/media/scripts/wapversionLib.inc 2009-07-03 21:55:25.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/sysext/cms/tslib/media/scripts/wapversionLib.inc 2009-07-09 17:00:28.000000000 +0200 @@ -301,7 +301,7 @@ * @return string The processed value returned. */ function nl2br($str) { - return ereg_replace(chr(10),'
',$str); + return preg_replace("/".chr(10)."/",'
',$str); } /** diff -u --recursive --new-file typo3_src-4.2.8/typo3/sysext/cms/tslib/publish.php typo3_src-4.2.8-php5.3-compat/typo3/sysext/cms/tslib/publish.php --- typo3_src-4.2.8/typo3/sysext/cms/tslib/publish.php 2009-07-03 21:55:26.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/sysext/cms/tslib/publish.php 2009-07-09 17:09:13.000000000 +0200 @@ -122,7 +122,7 @@ // *************************** $publishDir = $TYPO3_CONF_VARS['FE']['publish_dir']; if ($publishDir && @is_dir($publishDir)) { - $publishDir = ereg_replace('/*$','',$publishDir).'/'; + $publishDir = preg_replace('/\/*$/','',$publishDir).'/'; debug('Publishing in: '.$publishDir,1); reset($temp_publish_array); while(list($key,$val)=each($temp_publish_array)) { diff -u --recursive --new-file typo3_src-4.2.8/typo3/sysext/dbal/class.ux_db_list_extra.php typo3_src-4.2.8-php5.3-compat/typo3/sysext/dbal/class.ux_db_list_extra.php --- typo3_src-4.2.8/typo3/sysext/dbal/class.ux_db_list_extra.php 2009-07-03 21:55:27.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/sysext/dbal/class.ux_db_list_extra.php 2009-07-09 17:10:59.000000000 +0200 @@ -76,7 +76,7 @@ foreach($TCA[$table]['columns'] as $fieldName => $info) { if ($GLOBALS['TYPO3_DB']->cache_fieldType[$table][$fieldName]['metaType'] == 'B') { // skip, LIKE is not supported on BLOB columns... - } elseif ($info['config']['type']=='text' || ($info['config']['type']=='input' && !ereg('date|time|int',$info['config']['eval']))) { + } elseif ($info['config']['type']=='text' || ($info['config']['type']=='input' && !preg_match('/date|time|int/i',$info['config']['eval']))) { $queryPart .= $or.$fieldName.' LIKE \'%'.$GLOBALS['TYPO3_DB']->quoteStr($this->searchString, $table).'%\''; $or = ' OR '; } @@ -84,7 +84,7 @@ } else { // Traverse the configured columns and add all columns that can be searched foreach($TCA[$table]['columns'] as $fieldName => $info) { - if ($info['config']['type']=='text' || ($info['config']['type']=='input' && !ereg('date|time|int',$info['config']['eval']))) { + if ($info['config']['type']=='text' || ($info['config']['type']=='input' && !preg_match('/date|time|int/i',$info['config']['eval']))) { $sfields[]=$fieldName; } } diff -u --recursive --new-file typo3_src-4.2.8/typo3/sysext/felogin/pi1/class.tx_felogin_pi1.php typo3_src-4.2.8-php5.3-compat/typo3/sysext/felogin/pi1/class.tx_felogin_pi1.php --- typo3_src-4.2.8/typo3/sysext/felogin/pi1/class.tx_felogin_pi1.php 2009-07-03 21:55:14.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/sysext/felogin/pi1/class.tx_felogin_pi1.php 2009-07-09 18:09:47.000000000 +0200 @@ -370,7 +370,7 @@ case 'referer': $redirect_url = t3lib_div::getIndpEnv('HTTP_REFERER'); // avoid forced logout, when trying to login immediatly after a logout - $redirect_url = ereg_replace("[&?]logintype=[a-z]+", '', $redirect_url); + $redirect_url = preg_replace("/[&?]logintype=[a-z]+/", '', $redirect_url); break; case 'refererDomains': // Auto redirect. @@ -381,11 +381,11 @@ $redirect_url = t3lib_div::getIndpEnv('HTTP_REFERER'); // is referring url allowed to redirect? $match = array(); - if (ereg('^http://([[:alnum:]._-]+)/', $redirect_url, $match)) { + if (preg_match('/^http:\/\/([[:alnum:]._-]+)\//', $redirect_url, $match)) { $redirect_domain = $match[1]; $found = false; - foreach(split(',', $this->conf['domains']) as $d) { - if (ereg('(^|\.)'.$d.'$', $redirect_domain)) { + foreach(explode(',', $this->conf['domains']) as $d) { + if (preg_match('/(^|\.)'.$d.'$/', $redirect_domain)) { $found = true; break; } @@ -396,7 +396,7 @@ } // Avoid forced logout, when trying to login immediatly after a logout - $redirect_url = ereg_replace("[&?]logintype=[a-z]+", "", $redirect_url); + $redirect_url = preg_replace("/[&?]logintype=[a-z]+/", "", $redirect_url); } break; } diff -u --recursive --new-file typo3_src-4.2.8/typo3/sysext/impexp/app/index.php typo3_src-4.2.8-php5.3-compat/typo3/sysext/impexp/app/index.php --- typo3_src-4.2.8/typo3/sysext/impexp/app/index.php 2009-07-03 21:55:27.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/sysext/impexp/app/index.php 2009-07-09 17:19:39.000000000 +0200 @@ -394,7 +394,7 @@ $inData['pagetree']['maxNumber'] = t3lib_div::intInRange($inData['pagetree']['maxNumber'],1,10000,100); $inData['listCfg']['maxNumber'] = t3lib_div::intInRange($inData['listCfg']['maxNumber'],1,10000,100); $inData['maxFileSize'] = t3lib_div::intInRange($inData['maxFileSize'],1,10000,1000); - $inData['filename'] = trim(ereg_replace('[^[:alnum:]./_-]*','',ereg_replace('\.(t3d|xml)$','',$inData['filename']))); + $inData['filename'] = trim(preg_replace('/[^[:alnum:].\/_-]*/','',preg_replace('/\.(t3d|xml)$/','',$inData['filename']))); if (strlen($inData['filename'])) { $inData['filename'].= $inData['filetype']=='xml' ? '.xml' : '.t3d'; } @@ -559,7 +559,7 @@ } // Filename: - $dlFile = $inData['filename'] ? $inData['filename'] : 'T3D_'.substr(ereg_replace('[^[:alnum:]_]','-',$inData['download_export_name']),0,20).'_'.date('d-m-H-i-s').$fExt; + $dlFile = $inData['filename'] ? $inData['filename'] : 'T3D_'.substr(preg_replace('/[^[:alnum:]_]/','-',$inData['download_export_name']),0,20).'_'.date('d-m-H-i-s').$fExt; // Export for download: if ($inData['download_export']) { diff -u --recursive --new-file typo3_src-4.2.8/typo3/sysext/impexp/class.tx_impexp.php typo3_src-4.2.8-php5.3-compat/typo3/sysext/impexp/class.tx_impexp.php --- typo3_src-4.2.8/typo3/sysext/impexp/class.tx_impexp.php 2009-07-03 21:55:27.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/sysext/impexp/class.tx_impexp.php 2009-07-09 17:19:11.000000000 +0200 @@ -844,7 +844,7 @@ $uniquePrefix = '###'.md5(time()).'###'; if (strtolower($html_fI['extension'])==='css') { - $prefixedMedias = explode($uniquePrefix, eregi_replace('(url[[:space:]]*\([[:space:]]*["\']?)([^"\')]*)(["\']?[[:space:]]*\))', '\1'.$uniquePrefix.'\2'.$uniquePrefix.'\3', $fileRec['content'])); + $prefixedMedias = explode($uniquePrefix, preg_replace('/(url[[:space:]]*\([[:space:]]*["\']?)([^"\')]*)(["\']?[[:space:]]*\))/i', '\1'.$uniquePrefix.'\2'.$uniquePrefix.'\3', $fileRec['content'])); } else { // html, htm: $htmlParser = t3lib_div::makeInstance('t3lib_parsehtml'); $prefixedMedias = explode($uniquePrefix, $htmlParser->prefixResourcePath($uniquePrefix,$fileRec['content'],array(),$uniquePrefix)); @@ -1728,7 +1728,7 @@ list($table,$uid,$field,$config) = $pParams; // In case the $path is used as index without a trailing slash we will remove that - if (!is_array($config['flexFormRels']['db'][$path]) && is_array($config['flexFormRels']['db'][ereg_replace('\/$','',$path)])) { + if (!is_array($config['flexFormRels']['db'][$path]) && is_array($config['flexFormRels']['db'][preg_replace('/\/$/','',$path)])) { $path = ereg_replace('\/$','',$path); } if (is_array($config['flexFormRels']['db'][$path])) { diff -u --recursive --new-file typo3_src-4.2.8/typo3/sysext/indexed_search/class.crawler.php typo3_src-4.2.8-php5.3-compat/typo3/sysext/indexed_search/class.crawler.php --- typo3_src-4.2.8/typo3/sysext/indexed_search/class.crawler.php 2009-07-03 21:55:30.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/sysext/indexed_search/class.crawler.php 2009-07-09 17:14:30.000000000 +0200 @@ -578,7 +578,7 @@ * @return string Returls the URL if OK, otherwise false */ function checkUrl($url,$urlLog,$baseUrl) { - $url = ereg_replace('\/\/$','/',$url); + $url = preg_replace('/\/\/$/','/',$url); list($url) = explode('#',$url); if (!strstr($url,'../')) { diff -u --recursive --new-file typo3_src-4.2.8/typo3/sysext/indexed_search/class.doublemetaphone.php typo3_src-4.2.8-php5.3-compat/typo3/sysext/indexed_search/class.doublemetaphone.php --- typo3_src-4.2.8/typo3/sysext/indexed_search/class.doublemetaphone.php 2009-07-03 21:55:30.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/sysext/indexed_search/class.doublemetaphone.php 2009-07-09 17:17:03.000000000 +0200 @@ -1011,7 +1011,7 @@ * @return [type] ... */ function IsVowel($string, $pos) { - return ereg("[AEIOUY]", substr($string, $pos, 1)); + return preg_match("/[AEIOUY]/", substr($string, $pos, 1)); } /** @@ -1021,7 +1021,7 @@ * @return [type] ... */ function SlavoGermanic($string) { - return ereg("W|K|CZ|WITZ", $string); + return preg_match("/W|K|CZ|WITZ/", $string); } } // end of class MetaPhone ?> \ Kein Zeilenumbruch am Dateiende. diff -u --recursive --new-file typo3_src-4.2.8/typo3/sysext/indexed_search/class.external_parser.php typo3_src-4.2.8-php5.3-compat/typo3/sysext/indexed_search/class.external_parser.php --- typo3_src-4.2.8/typo3/sysext/indexed_search/class.external_parser.php 2009-07-03 21:55:30.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/sysext/indexed_search/class.external_parser.php 2009-07-09 17:16:28.000000000 +0200 @@ -113,7 +113,7 @@ case 'pdf': // PDF if ($indexerConfig['pdftools']) { - $pdfPath = ereg_replace("\/$",'',$indexerConfig['pdftools']).'/'; + $pdfPath = preg_replace("/\/$/",'',$indexerConfig['pdftools']).'/'; if (ini_get('safe_mode') || (@is_file($pdfPath.'pdftotext'.$exe) && @is_file($pdfPath.'pdfinfo'.$exe))) { $this->app['pdfinfo'] = $pdfPath.'pdfinfo'.$exe; $this->app['pdftotext'] = $pdfPath.'pdftotext'.$exe; @@ -126,7 +126,7 @@ case 'doc': // Catdoc if ($indexerConfig['catdoc']) { - $catdocPath = ereg_replace("\/$",'',$indexerConfig['catdoc']).'/'; + $catdocPath = preg_replace("/\/$/",'',$indexerConfig['catdoc']).'/'; if (ini_get('safe_mode') || @is_file($catdocPath.'catdoc'.$exe)) { $this->app['catdoc'] = $catdocPath.'catdoc'.$exe; $extOK = TRUE; @@ -137,7 +137,7 @@ case 'ppt': // MS PowerPoint // ppthtml if ($indexerConfig['ppthtml']) { - $ppthtmlPath = ereg_replace('\/$','',$indexerConfig['ppthtml']).'/'; + $ppthtmlPath = preg_replace('/\/$/','',$indexerConfig['ppthtml']).'/'; if (ini_get('safe_mode') || @is_file($ppthtmlPath.'ppthtml'.$exe)){ $this->app['ppthtml'] = $ppthtmlPath.'ppthtml'.$exe; $extOK = TRUE; @@ -147,7 +147,7 @@ case 'xls': // MS Excel // Xlhtml if ($indexerConfig['xlhtml']) { - $xlhtmlPath = ereg_replace('\/$','',$indexerConfig['xlhtml']).'/'; + $xlhtmlPath = preg_replace('/\/$/','',$indexerConfig['xlhtml']).'/'; if (ini_get('safe_mode') || @is_file($xlhtmlPath.'xlhtml'.$exe)){ $this->app['xlhtml'] = $xlhtmlPath.'xlhtml'.$exe; $extOK = TRUE; @@ -171,7 +171,7 @@ case 'rtf': // Catdoc if ($indexerConfig['unrtf']) { - $unrtfPath = ereg_replace("\/$",'',$indexerConfig['unrtf']).'/'; + $unrtfPath = preg_replace("/\/$/",'',$indexerConfig['unrtf']).'/'; if (ini_get('safe_mode') || @is_file($unrtfPath.'unrtf'.$exe)) { $this->app['unrtf'] = $unrtfPath.'unrtf'.$exe; $extOK = TRUE; @@ -485,7 +485,7 @@ $fileContent = t3lib_div::getUrl($absFile); // Finding charset: - eregi('^[[:space:]]*<\?xml[^>]+encoding[[:space:]]*=[[:space:]]*["\'][[:space:]]*([[:alnum:]_-]+)[[:space:]]*["\']',substr($fileContent,0,200),$reg); + preg_match('/^[[:space:]]*<\?xml[^>]+encoding[[:space:]]*=[[:space:]]*["\'][[:space:]]*([[:alnum:]_-]+)[[:space:]]*["\']/',substr($fileContent,0,200),$reg); $charset = $reg[1] ? $this->pObj->csObj->parse_charset($reg[1]) : 'utf-8'; // Converting content: @@ -590,7 +590,7 @@ * @return string String */ function removeEndJunk($string) { - return trim(ereg_replace('['.chr(10).chr(12).']*$','',$string)); + return trim(preg_replace('/['.chr(10).chr(12).']*$/','',$string)); } diff -u --recursive --new-file typo3_src-4.2.8/typo3/sysext/indexed_search/class.indexer.php typo3_src-4.2.8-php5.3-compat/typo3/sysext/indexed_search/class.indexer.php --- typo3_src-4.2.8/typo3/sysext/indexed_search/class.indexer.php 2009-07-03 21:55:30.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/sysext/indexed_search/class.indexer.php 2009-07-09 17:14:19.000000000 +0200 @@ -661,8 +661,8 @@ * @return string The charset value if found. */ function getHTMLcharset($content) { - if (eregi(']*http-equiv[[:space:]]*=[[:space:]]*["\']CONTENT-TYPE["\'][^>]*>',$content,$reg)) { - if (eregi('charset[[:space:]]*=[[:space:]]*([[:alnum:]-]+)',$reg[0],$reg2)) { + if (preg_match('/]*http-equiv[[:space:]]*=[[:space:]]*["\']CONTENT-TYPE["\'][^>]*>/i',$content,$reg)) { + if (preg_match('/charset[[:space:]]*=[[:space:]]*([[:alnum:]-]+)/i',$reg[0],$reg2)) { return $reg2[1]; } } diff -u --recursive --new-file typo3_src-4.2.8/typo3/sysext/indexed_search/pi/class.tx_indexedsearch.php typo3_src-4.2.8-php5.3-compat/typo3/sysext/indexed_search/pi/class.tx_indexedsearch.php --- typo3_src-4.2.8/typo3/sysext/indexed_search/pi/class.tx_indexedsearch.php 2009-07-03 21:55:27.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/sysext/indexed_search/pi/class.tx_indexedsearch.php 2009-07-09 17:15:28.000000000 +0200 @@ -2024,17 +2024,17 @@ // Possibly shorten string: if (!$k) { // First entry at all (only cropped on the frontside) if ($strLen > $postPreLgd) { - $output[$k] = $divider.ereg_replace('^[^[:space:]]+[[:space:]]','',$GLOBALS['TSFE']->csConvObj->crop('utf-8',$parts[$k],-($postPreLgd-$postPreLgd_offset))); + $output[$k] = $divider.preg_replace('/^[^[:space:]]+[[:space:]]/','',$GLOBALS['TSFE']->csConvObj->crop('utf-8',$parts[$k],-($postPreLgd-$postPreLgd_offset))); } } elseif ($summaryLgd > $summaryMax || !isset($parts[$k+1])) { // In case summary length is exceed OR if there are no more entries at all: if ($strLen > $postPreLgd) { - $output[$k] = ereg_replace('[[:space:]][^[:space:]]+$','',$GLOBALS['TSFE']->csConvObj->crop('utf-8',$parts[$k],$postPreLgd-$postPreLgd_offset)).$divider; + $output[$k] = preg_replace('/[[:space:]][^[:space:]]+$/','',$GLOBALS['TSFE']->csConvObj->crop('utf-8',$parts[$k],$postPreLgd-$postPreLgd_offset)).$divider; } } else { // In-between search words: if ($strLen > $postPreLgd*2) { - $output[$k] = ereg_replace('[[:space:]][^[:space:]]+$','',$GLOBALS['TSFE']->csConvObj->crop('utf-8',$parts[$k],$postPreLgd-$postPreLgd_offset)). + $output[$k] = preg_replace('/[[:space:]][^[:space:]]+$/','',$GLOBALS['TSFE']->csConvObj->crop('utf-8',$parts[$k],$postPreLgd-$postPreLgd_offset)). $divider. - ereg_replace('^[^[:space:]]+[[:space:]]','',$GLOBALS['TSFE']->csConvObj->crop('utf-8',$parts[$k],-($postPreLgd-$postPreLgd_offset))); + preg_replace('/^[^[:space:]]+[[:space:]]/','',$GLOBALS['TSFE']->csConvObj->crop('utf-8',$parts[$k],-($postPreLgd-$postPreLgd_offset))); } } $summaryLgd+= $GLOBALS['TSFE']->csConvObj->strlen('utf-8', $output[$k]);; @@ -2265,7 +2265,7 @@ function getFirstSysDomainRecordForPage($id) { $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('domainName', 'sys_domain', 'pid='.intval($id).$this->cObj->enableFields('sys_domain'), '', 'sorting'); $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res); - return ereg_replace('\/$','',$row['domainName']); + return preg_replace('/\/$/','',$row['domainName']); } /** diff -u --recursive --new-file typo3_src-4.2.8/typo3/sysext/install/mod/class.tx_install.php typo3_src-4.2.8-php5.3-compat/typo3/sysext/install/mod/class.tx_install.php --- typo3_src-4.2.8/typo3/sysext/install/mod/class.tx_install.php 2009-07-03 21:55:33.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/sysext/install/mod/class.tx_install.php 2009-07-09 18:09:32.000000000 +0200 @@ -1122,7 +1122,7 @@ $tmap=array('day'=>1, 'week'=>7, 'month'=>30); $tt = $this->INSTALL['typo3temp_delete']; $subdir = $this->INSTALL['typo3temp_subdir']; - if (strlen($subdir) && !ereg('^[[:alnum:]_]+/$',$subdir)) die('subdir "'.$subdir.'" was not allowed!'); + if (strlen($subdir) && !preg_match('/^[[:alnum:]_]+\/$/',$subdir)) die('subdir "'.$subdir.'" was not allowed!'); $action = $this->INSTALL['typo3temp_action']; $d = @dir($this->typo3temp_path.$subdir); if (is_object($d)) { @@ -1142,7 +1142,7 @@ } if ($ok) { $hashPart=substr(basename($theFile),-14,10); - if (!ereg('[^a-f0-9]',$hashPart) || substr($theFile,-6)==='.cache' || substr($theFile,-4)==='.tbl' || substr(basename($theFile),0,8)==='install_') { // This is a kind of check that the file being deleted has a 10 char hash in it + if (!preg_match('/[^a-f0-9]/',$hashPart) || substr($theFile,-6)==='.cache' || substr($theFile,-4)==='.tbl' || substr(basename($theFile),0,8)==='install_') { // This is a kind of check that the file being deleted has a 10 char hash in it if ($action && $deleteCounter<$action) { $deleteCounter++; unlink($theFile); @@ -1857,7 +1857,7 @@ reset($paths); while(list($k,$v)=each($paths)) { reset($programs); - if (!ereg('[\\\/]$',$v)) $v.='/'; + if (!preg_match('/[\\\/]$/',$v)) $v.='/'; while(list(,$filename)=each($programs)) { if (ini_get('open_basedir') || (@file_exists($v)&&@is_file($v.$filename.$isExt))) { $version = $this->_checkImageMagick_getVersion($filename,$v); @@ -2145,7 +2145,7 @@ #debug($this->INSTALL); if (trim($this->INSTALL['localconf.php']['NEW_DATABASE_NAME'])) { $newdbname=trim($this->INSTALL['localconf.php']['NEW_DATABASE_NAME']); - if (!ereg('[^[:alnum:]_-]',$newdbname)) { + if (!preg_match('/[^[:alnum:]_-]/',$newdbname)) { if ($result = $GLOBALS['TYPO3_DB']->sql_pconnect(TYPO3_db_host, TYPO3_db_username, TYPO3_db_password)) { if ($GLOBALS['TYPO3_DB']->admin_query('CREATE DATABASE '.$newdbname)) { $this->INSTALL['localconf.php']['typo_db'] = $newdbname; @@ -2203,7 +2203,7 @@ break; case 'im_path': list($value,$version) = explode('|',$value); - if (!ereg('[[:space:]]',$value,$reg) && strlen($value)<100) { + if (!preg_match('/[[:space:]]/',$value,$reg) && strlen($value)<100) { if (strcmp($GLOBALS['TYPO3_CONF_VARS']['GFX'][$key], $value)) { $this->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS[\'GFX\'][\'' . $key . '\']', $value); } @@ -2224,7 +2224,7 @@ break; case 'im_path_lzw': list($value) = explode('|',$value); - if (!ereg('[[:space:]]',$value) && strlen($value)<100) { + if (!preg_match('/[[:space:]]/',$value) && strlen($value)<100) { if (strcmp($GLOBALS['TYPO3_CONF_VARS']['GFX'][$key], $value)) { $this->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS[\'GFX\'][\'' . $key . '\']', $value); } @@ -4414,7 +4414,7 @@ $out=''; switch($fieldInfo['config']['type']) { case 'input': - if (ereg('date|time|int|year',$fieldInfo['config']['eval'])) { + if (preg_match('/date|time|int|year/i',$fieldInfo['config']['eval'])) { $out = "int(11) NOT NULL default '0'"; } else { $max = intval($fieldInfo['config']['max']); @@ -4527,7 +4527,7 @@ * @return [type] ... */ function suggestTCAFieldDefinition($fieldName,$fieldInfo) { - list($type,$len) = split(' |\(|\)',$fieldInfo,3); + list($type,$len) = preg_split('/ |\(|\)/',$fieldInfo,3); switch($type) { case 'int': $out=" diff -u --recursive --new-file typo3_src-4.2.8/typo3/sysext/lowlevel/clmods/class.lost_files.php typo3_src-4.2.8-php5.3-compat/typo3/sysext/lowlevel/clmods/class.lost_files.php --- typo3_src-4.2.8/typo3/sysext/lowlevel/clmods/class.lost_files.php 2009-07-03 21:55:15.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/sysext/lowlevel/clmods/class.lost_files.php 2009-07-09 17:17:33.000000000 +0200 @@ -167,7 +167,7 @@ } } else { // When here it means the file was not found. So we test if it has a RTEmagic-image name and if so, we allow it: - if (ereg('^RTEmagic[P|C]_',basename($value))) { + if (preg_match('/^RTEmagic[P|C]_/',basename($value))) { unset($fileArr[$key]) ; $resultArray['RTEmagicFiles'][$shortKey] = $value; } else { diff -u --recursive --new-file typo3_src-4.2.8/typo3/sysext/lowlevel/clmods/class.rte_images.php typo3_src-4.2.8-php5.3-compat/typo3/sysext/lowlevel/clmods/class.rte_images.php --- typo3_src-4.2.8/typo3/sysext/lowlevel/clmods/class.rte_images.php 2009-07-03 21:55:15.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/sysext/lowlevel/clmods/class.rte_images.php 2009-07-09 17:17:48.000000000 +0200 @@ -135,7 +135,7 @@ foreach($recs as $rec) { $filename = basename($rec['ref_string']); if (t3lib_div::isFirstPartOfStr($filename,'RTEmagicC_')) { - $original = 'RTEmagicP_'.ereg_replace('\.[[:alnum:]]+$','',substr($filename,10)); + $original = 'RTEmagicP_'.preg_replace('/\.[[:alnum:]]+$/','',substr($filename,10)); $infoString = $this->infoStr($rec); // Build index: diff -u --recursive --new-file typo3_src-4.2.8/typo3/sysext/lowlevel/config/index.php typo3_src-4.2.8-php5.3-compat/typo3/sysext/lowlevel/config/index.php --- typo3_src-4.2.8/typo3/sysext/lowlevel/config/index.php 2009-07-03 21:55:15.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/sysext/lowlevel/config/index.php 2009-07-09 17:17:20.000000000 +0200 @@ -252,7 +252,7 @@ -    '.t3lib_BEfunc::getFuncCheck(0,'SET[regexsearch]',$this->MOD_SETTINGS['regexsearch'],'','','id="checkRegexsearch"').' +    '.t3lib_BEfunc::getFuncCheck(0,'SET[regexsearch]',$this->MOD_SETTINGS['regexsearch'],'','','id="checkRegexsearch"').'   diff -u --recursive --new-file typo3_src-4.2.8/typo3/sysext/lowlevel/dbint/index.php typo3_src-4.2.8-php5.3-compat/typo3/sysext/lowlevel/dbint/index.php --- typo3_src-4.2.8/typo3/sysext/lowlevel/dbint/index.php 2009-07-03 21:55:15.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/sysext/lowlevel/dbint/index.php 2009-07-09 17:18:05.000000000 +0200 @@ -647,7 +647,7 @@ if (is_array($files)) { $files_searched+=count($files); foreach ($files as $value) { - if (eregi($pattern,basename($value))) $matching_files[]=substr($value,strlen(PATH_site)); + if (preg_match("/".$pattern."/i",basename($value))) $matching_files[]=substr($value,strlen(PATH_site)); } } diff -u --recursive --new-file typo3_src-4.2.8/typo3/sysext/rtehtmlarea/class.tx_rtehtmlarea_base.php typo3_src-4.2.8-php5.3-compat/typo3/sysext/rtehtmlarea/class.tx_rtehtmlarea_base.php --- typo3_src-4.2.8/typo3/sysext/rtehtmlarea/class.tx_rtehtmlarea_base.php 2009-07-03 21:55:37.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/sysext/rtehtmlarea/class.tx_rtehtmlarea_base.php 2009-07-09 18:48:53.000000000 +0200 @@ -255,7 +255,7 @@ // Element ID + pid $this->elementId = $PA['itemFormElName']; // Form element name - $this->elementParts = explode('][',ereg_replace('\]$','',ereg_replace('^(TSFE_EDIT\[data\]\[|data\[)','',$this->elementId))); + $this->elementParts = explode('][',preg_replace('/\]$/','',preg_replace('/^(TSFE_EDIT\[data\]\[|data\[)/','',$this->elementId))); // Find the page PIDs: list($this->tscPID,$this->thePid) = t3lib_BEfunc::getTSCpid(trim($this->elementParts[0]),trim($this->elementParts[1]),$thePidValue); @@ -1520,19 +1520,19 @@ break; case 'gecko': $tmp = strstr($useragent,'rv:'); - $bInfo['VERSION'] = doubleval(ereg_replace('^[^0-9]*','',substr($tmp,3))); + $bInfo['VERSION'] = doubleval(preg_replace('/^[^0-9]*/','',substr($tmp,3))); break; case 'msie': $tmp = strstr($useragent,'MSIE'); - $bInfo['VERSION'] = doubleval(ereg_replace('^[^0-9]*','',substr($tmp,4))); + $bInfo['VERSION'] = doubleval(preg_replace('/^[^0-9]*/','',substr($tmp,4))); break; case 'safari': $tmp = strstr($useragent,'Safari/'); - $bInfo['VERSION'] = doubleval(ereg_replace('^[^0-9]*','',substr($tmp,3))); + $bInfo['VERSION'] = doubleval(preg_replace('/^[^0-9]*/','',substr($tmp,3))); break; case 'opera': $tmp = strstr($useragent,'Opera'); - $bInfo['VERSION'] = doubleval(ereg_replace('^[^0-9]*','',substr($tmp,5))); + $bInfo['VERSION'] = doubleval(preg_replace('/^[^0-9]*/','',substr($tmp,5))); break; case 'konqu': $tmp = strstr($useragent,'Konqueror/'); diff -u --recursive --new-file typo3_src-4.2.8/typo3/sysext/sys_action/class.tx_sysaction.php typo3_src-4.2.8-php5.3-compat/typo3/sysext/sys_action/class.tx_sysaction.php --- typo3_src-4.2.8/typo3/sysext/sys_action/class.tx_sysaction.php 2009-07-03 21:55:38.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/sysext/sys_action/class.tx_sysaction.php 2009-07-09 16:59:38.000000000 +0200 @@ -365,7 +365,7 @@ function fixUsername($username,$prefix) { $username=trim($username); $prefix=trim($prefix); - $username=ereg_replace("^".quotemeta($prefix),"",$username); + $username=preg_replace("/^".quotemeta($prefix)."/","",$username); if ($username) { return $prefix.$username; diff -u --recursive --new-file typo3_src-4.2.8/typo3/sysext/tstemplate_objbrowser/class.tx_tstemplateobjbrowser.php typo3_src-4.2.8-php5.3-compat/typo3/sysext/tstemplate_objbrowser/class.tx_tstemplateobjbrowser.php --- typo3_src-4.2.8/typo3/sysext/tstemplate_objbrowser/class.tx_tstemplateobjbrowser.php 2009-07-03 21:55:14.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/sysext/tstemplate_objbrowser/class.tx_tstemplateobjbrowser.php 2009-07-09 17:13:50.000000000 +0200 @@ -228,7 +228,7 @@ } if ($POST["add_property"]) { $property = trim($POST["data"][$name]["name"]); - if (ereg_replace("[^a-zA-Z0-9_\.]*","",$property)!=$property) { + if (preg_replace("/[^a-zA-Z0-9_\.]*/","",$property)!=$property) { $theOutput.=$this->pObj->doc->spacer(10); $theOutput.=$this->pObj->doc->section($GLOBALS["TBE_TEMPLATE"]->rfw("BAD PROPERTY!"),'You must enter a property with characters a-z, A-Z and 0-9, no spaces!
Nothing was updated!',0,0,0,1); } else { @@ -503,7 +503,7 @@ -    '.t3lib_BEfunc::getFuncCheck($this->pObj->id,"SET[ts_browser_regexsearch]",$this->pObj->MOD_SETTINGS["ts_browser_regexsearch"],'','','id="checkTs_browser_regexsearch"').' +    '.t3lib_BEfunc::getFuncCheck($this->pObj->id,"SET[ts_browser_regexsearch]",$this->pObj->MOD_SETTINGS["ts_browser_regexsearch"],'','','id="checkTs_browser_regexsearch"').'   diff -u --recursive --new-file typo3_src-4.2.8/typo3/template.php typo3_src-4.2.8-php5.3-compat/typo3/template.php --- typo3_src-4.2.8/typo3/template.php 2009-07-03 21:55:38.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/template.php 2009-07-09 16:59:22.000000000 +0200 @@ -228,12 +228,12 @@ global $TBE_STYLES; // Setting default scriptID: - $this->scriptID = ereg_replace('^.*\/(sysext|ext)\/','ext/',substr(PATH_thisScript,strlen(PATH_site))); + $this->scriptID = preg_replace('/^.*\/(sysext|ext)\//','ext/',substr(PATH_thisScript,strlen(PATH_site))); if (TYPO3_mainDir!='typo3/' && substr($this->scriptID,0,strlen(TYPO3_mainDir)) == TYPO3_mainDir) { $this->scriptID = 'typo3/'.substr($this->scriptID,strlen(TYPO3_mainDir)); // This fixes if TYPO3_mainDir has been changed so the script ids are STILL "typo3/..." } - $this->bodyTagId = ereg_replace('[^[:alnum:]-]','-',$this->scriptID); + $this->bodyTagId = preg_replace('/[^[:alnum:]-]/','-',$this->scriptID); // Individual configuration per script? If so, make a recursive merge of the arrays: if (is_array($TBE_STYLES['scriptIDindex'][$this->scriptID])) { @@ -440,7 +440,7 @@ $pathInfo = parse_url(t3lib_div::getIndpEnv('REQUEST_URI')); // Add the module identifier automatically if typo3/mod.php is used: - if (ereg('typo3/mod\.php$', $pathInfo['path']) && isset($GLOBALS['TBE_MODULES']['_PATHS'][$modName])) { + if (preg_match('/typo3\/mod\.php$/', $pathInfo['path']) && isset($GLOBALS['TBE_MODULES']['_PATHS'][$modName])) { $storeUrl = '&M='.$modName.$storeUrl; } diff -u --recursive --new-file typo3_src-4.2.8/typo3/view_help.php typo3_src-4.2.8-php5.3-compat/typo3/view_help.php --- typo3_src-4.2.8/typo3/view_help.php 2009-07-03 21:55:38.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/view_help.php 2009-07-09 18:13:37.000000000 +0200 @@ -536,7 +536,7 @@ global $TCA,$BE_USER,$TCA_DESCR; // Split references by comma or linebreak - $items = split('[,' . chr(10) . ']', $value); + $items = preg_split('/[,' . chr(10) . ']/', $value); $lines = array(); foreach($items as $val) { @@ -721,7 +721,7 @@ $tableName = is_array($TCA_DESCR[$table]['columns']['']) && $TCA_DESCR[$table]['columns']['']['alttitle'] ? $TCA_DESCR[$table]['columns']['']['alttitle'] : - (isset($TCA[$table]) ? $TCA[$table]['ctrl']['title'] : ereg_replace('^_MOD_','',$table)); + (isset($TCA[$table]) ? $TCA[$table]['ctrl']['title'] : preg_replace('/^_MOD_/','',$table)); $fieldName = is_array($TCA_DESCR[$table]['columns'][$field]) && $TCA_DESCR[$table]['columns'][$field]['alttitle'] ? $TCA_DESCR[$table]['columns'][$field]['alttitle'] : (isset($TCA[$table])&&isset($TCA[$table]['columns'][$field]) ? $TCA[$table]['columns'][$field]['label'] : $field); @@ -745,7 +745,7 @@ // Create label: $labelStr = $LANG->sL($tableName). - ($field ? $mergeToken.ereg_replace(':$','', trim($LANG->sL($fieldName))):''); + ($field ? $mergeToken.preg_replace('/:$/','', trim($LANG->sL($fieldName))):''); return $labelStr; } diff -u --recursive --new-file typo3_src-4.2.8/typo3/wizard_forms.php typo3_src-4.2.8-php5.3-compat/typo3/wizard_forms.php --- typo3_src-4.2.8/typo3/wizard_forms.php 2009-07-03 21:55:38.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/wizard_forms.php 2009-07-09 16:57:49.000000000 +0200 @@ -791,7 +791,7 @@ } // Compile the final line: - $inLines[]=ereg_replace("[\n\r]*",'',implode(' | ',$thisLine)); + $inLines[]=preg_replace("/[\\n\\r]*/",'',implode(' | ',$thisLine)); } } // Finally, implode the lines into a string, and return it: @@ -837,7 +837,7 @@ if ($confData['type']) { if (count($typeParts)==1) { - $confData['fieldname'] = substr(ereg_replace('[^a-zA-Z0-9_]','',str_replace(' ','_',trim($parts[0]))),0,30); + $confData['fieldname'] = substr(preg_replace('/[^a-zA-Z0-9_]/','',str_replace(' ','_',trim($parts[0]))),0,30); // Attachment names... if ($confData['type']=='file') { diff -u --recursive --new-file typo3_src-4.2.8/typo3/wizard_table.php typo3_src-4.2.8-php5.3-compat/typo3/wizard_table.php --- typo3_src-4.2.8/typo3/wizard_table.php 2009-07-03 21:55:38.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/wizard_table.php 2009-07-09 16:58:31.000000000 +0200 @@ -318,7 +318,7 @@ if ($this->inputStyle) { $cells[]='doc->formWidth(20).' name="TABLE[c]['.(($k+1)*2).']['.(($a+1)*2).']" value="'.htmlspecialchars($cellContent).'" />'; } else { - $cellContent=eregi_replace('',chr(10),$cellContent); + $cellContent=preg_replace('//',chr(10),$cellContent); $cells[]=''; } diff -u --recursive --new-file typo3_src-4.2.8/typo3/wizard_tsconfig.php typo3_src-4.2.8-php5.3-compat/typo3/wizard_tsconfig.php --- typo3_src-4.2.8/typo3/wizard_tsconfig.php 2009-07-03 21:55:38.000000000 +0200 +++ typo3_src-4.2.8-php5.3-compat/typo3/wizard_tsconfig.php 2009-07-09 17:23:12.000000000 +0200 @@ -570,7 +570,7 @@ // Generally "->[something]" $reg=array(); - ereg('->[[:alnum:]_]*',$dataType,$reg); + preg_match('/->[[:alnum:]_]*/',$dataType,$reg); if ($reg[0] && is_array($objTree[$reg[0]])) { $dataType = str_replace($reg[0],'
'.htmlspecialchars($reg[0]).'',$dataType); }