Project

General

Profile

Bug #19728 » 9994_TYPO3_trunk.patch

Administrator Admin, 2008-12-21 22:37

View differences:

typo3/wizard_forms.php (working copy)
}
// 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:
......
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') {
typo3/class.filelistfoldertree.php (working copy)
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.'/';
typo3/sysext/lowlevel/clmods/class.rte_images.php (working copy)
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('/\.\w+$/', '', substr($filename, 10));
$infoString = $this->infoStr($rec);
// Build index:
typo3/sysext/cms/layout/class.tx_cms_layout.php (working copy)
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= '<a href="#" onclick="'.htmlspecialchars(t3lib_BEfunc::editOnClick($params,$this->backPath,'')).'">'.
'<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/edit2.gif','width="11" height="12"').' title="'.htmlspecialchars($iTitle).'" alt="" />'.
'</a>';
typo3/sysext/cms/tslib/class.tslib_fe.php (working copy)
$message = 'You logged out from Workspace preview mode. Click this link to <a href="%1$s">go back to the website</a>';
}
die(sprintf($message,
htmlspecialchars(ereg_replace('\&?ADMCMD_prev=[[:alnum:]]+','',t3lib_div::_GET('returnUrl')))
htmlspecialchars(preg_replace('/\&?ADMCMD_prev=\w+/', '', t3lib_div::_GET('returnUrl')))
));
}
typo3/sysext/cms/tslib/class.tslib_gifbuilder.php (working copy)
case 'IMAGE':
$fileInfo = $this->getResource($conf['file'],$conf['file.']);
if ($fileInfo) {
$this->combinedFileNames[] = ereg_replace('\.[[:alnum:]]+$','',basename($fileInfo[3]));
$this->combinedFileNames[] = preg_replace('/\.\w+$/', '', basename($fileInfo[3]));
$this->setup[$theKey.'.']['file'] = $fileInfo[3];
$this->setup[$theKey.'.']['BBOX'] = $fileInfo;
$this->objBB[$theKey] = $fileInfo;
typo3/sysext/cms/tslib/class.tslib_search.php (working copy)
// As long as $sword is true (that means $sword MUST be reduced little by little until its empty inside the loop!)
while ($sword) {
if (ereg('^"',$sword)) { // There was a double-quote and we will then look for the ending quote.
$sword = ereg_replace('^"','',$sword); // Removes first double-quote
$sword = preg_replace('/^"/', '', $sword); // Removes first double-quote
ereg('^[^"]*',$sword,$reg); // Removes everything till next double-quote
$value[] = $reg[0]; // reg[0] is the value, should not be trimmed
$sword = ereg_replace('^'.$this->quotemeta($reg[0]),'',$sword);
$sword = trim(ereg_replace('^"','',$sword)); // Removes last double-quote
$sword = preg_replace('/^' . $this->quotemeta($reg[0]) . '/', '', $sword);
$sword = trim(preg_replace('/^"/', '', $sword)); // Removes last double-quote
} elseif (ereg('^'.$specs,$sword,$reg)) {
$value[] = $reg[0];
$sword = trim(ereg_replace('^'.$specs,'',$sword)); // Removes = sign
$sword = trim(preg_replace('/^' . $specs . '/', '', $sword)); // Removes = sign
} elseif (ereg('[\+\-]',$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
$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));
}
}
typo3/sysext/cms/tslib/class.tslib_content.php (working copy)
$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('/[^\w]/', '', $confData['fieldname'])) == 'email') {$confData['fieldname'] = 'email';}
// Duplicate fieldnames resolved
if (isset($fieldname_hashArray[md5($confData['fieldname'])])) {
$confData['fieldname'].='_'.$cc;
......
}
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.']));}
......
*/
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;
}
......
}
// 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](\.\w*)$/', '\1', $theValue);
$theValue = $this->stdWrap($theValue,$conf['labelStdWrap.']);
// Wrapping file
......
$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]);
}
}
}
......
$data = substr($theValue,$pointer,$len); // $data is the content until the next <tag-start or end is detected. In case of a currentTag set, this would mean all data between the start- and end-tags
if ($data!='') {
if ($stripNL) { // If the previous tag was set to strip NewLines in the beginning of the next data-chunk.
$data = ereg_replace('^[ ]*'.chr(13).'?'.chr(10), '', $data);
$data = preg_replace('/^[ ]*' . chr(13) . '?' . chr(10) . '/', '', $data);
}
if (!is_array($currentTag)) { // These operations should only be performed on code outside the tags...
......
}
$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
......
$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 = '<a href="'.$mailToUrl.'"'.$aTagParams.'>';
......
$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('/\.\w+$/', '', basename($theImage)), intval($GLOBALS['TSFE']->config['config']['meaningfulTempFilePrefix']), '_');
}
if ($fileArray['sample']) {
typo3/sysext/cms/tslib/publish.php (working copy)
// ***************************
$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)) {
typo3/sysext/cms/tslib/class.tslib_pagegen.php (working copy)
}
}
}
$GLOBALS['TSFE']->sWordRegEx = ereg_replace('\|$','',$GLOBALS['TSFE']->sWordRegEx);
$GLOBALS['TSFE']->sWordRegEx = preg_replace('/\|$/', '', $GLOBALS['TSFE']->sWordRegEx);
}
// linkVars
......
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'])) {
......
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;
typo3/sysext/impexp/class.tx_impexp.php (working copy)
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)])) {
$path = ereg_replace('\/$','',$path);
if (!is_array($config['flexFormRels']['db'][$path]) && is_array($config['flexFormRels']['db'][preg_replace('/\/$/', '', $path)])) {
$path = preg_replace('/\/$/', '', $path);
}
if (is_array($config['flexFormRels']['db'][$path])) {
$valArray = $this->setRelations_db($config['flexFormRels']['db'][$path]);
......
}
} else {
// Create the resouces directory name (filename without extension, suffixed "_FILES")
$resourceDir = dirname($newName).'/'.ereg_replace('\.[^.]*$','',basename($newName)).'_FILES';
$resourceDir = dirname($newName) . '/' . preg_replace('/\.[^.]*$/', '', basename($newName)) . '_FILES';
if (t3lib_div::mkdir($resourceDir)) {
foreach($fileHeaderInfo['EXT_RES_ID'] as $res_fileID) {
if ($this->dat['files'][$res_fileID]['filename']) {
typo3/sysext/impexp/app/index.php (working copy)
$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('/[^\w.\/-]*/', '', preg_replace('/\.(t3d|xml)$/', '', $inData['filename'])));
if (strlen($inData['filename'])) {
$inData['filename'].= $inData['filetype']=='xml' ? '.xml' : '.t3d';
}
......
}
// 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('/[^\w]/', '-', $inData['download_export_name']), 0, 20) . '_' . date('d-m-H-i-s') . $fExt;
// Export for download:
if ($inData['download_export']) {
typo3/sysext/felogin/pi1/class.tx_felogin_pi1.php (working copy)
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.
......
}
// 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;
}
typo3/sysext/fe_edit/view/class.tx_feedit_editpanel.php (working copy)
$cBuf = rtrim($content);
$securCount = 30;
while($securCount && substr($cBuf, -1) == '>' && substr($cBuf, -4) != '</a>') {
$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;
typo3/sysext/beuser/mod/index.php (working copy)
$pout[]='<span class="nobr">'.t3lib_iconWorks::getIconImage($table,array(),$GLOBALS['BACK_PATH'],'align="top"').$GLOBALS['LANG']->sL($GLOBALS['TCA'][$table]['ctrl']['title']).'</span>';
}
if ($GLOBALS['TCA'][$table]['columns'][$field]) {
$pout[]='<span class="nobr"> - '.ereg_replace(':$','',$GLOBALS['LANG']->sL($GLOBALS['TCA'][$table]['columns'][$field]['label'])).'</span>';
$pout[] = '<span class="nobr"> - ' . preg_replace('/:$/', '', $GLOBALS['LANG']->sL($GLOBALS['TCA'][$table]['columns'][$field]['label'])) . '</span>';
}
}
}
typo3/sysext/install/mod/class.tx_install.php (working copy)
case 'adminUser': // Create admin user
if ($whichTables['be_users']) {
if (is_array($this->INSTALL['database_adminUser'])) {
$username = ereg_replace('[^[:alnum:]_-]','',trim($this->INSTALL['database_adminUser']['username']));
$username = preg_replace('/[^\w-]/', '', trim($this->INSTALL['database_adminUser']['username']));
$username = str_replace(' ','_',$username);
$pass = trim($this->INSTALL['database_adminUser']['password']);
if ($username && $pass) {
typo3/sysext/sys_action/class.tx_sysaction.php (working copy)
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;
typo3/sysext/tstemplate_objbrowser/class.tx_tstemplateobjbrowser.php (working copy)
}
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!<BR>Nothing was updated!',0,0,0,1);
} else {
typo3/sysext/rtehtmlarea/class.tx_rtehtmlarea_base.php (working copy)
// 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);
......
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/');
typo3/sysext/indexed_search/pi/class.tx_indexedsearch.php (working copy)
// 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('/^[^\s]+\s/' , '', $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('/\s[^\s]+$/', '', $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)).
$divider.
ereg_replace('^[^[:space:]]+[[:space:]]','',$GLOBALS['TSFE']->csConvObj->crop('utf-8',$parts[$k],-($postPreLgd-$postPreLgd_offset)));
$output[$k] = preg_replace('/\s[^\s]+$/', '', $GLOBALS['TSFE']->csConvObj->crop('utf-8', $parts[$k], $postPreLgd - $postPreLgd_offset)) .
$divider .
preg_replace('/^[^\s]+\s', '', $GLOBALS['TSFE']->csConvObj->crop('utf-8', $parts[$k], -($postPreLgd - $postPreLgd_offset)));
}
}
$summaryLgd+= $GLOBALS['TSFE']->csConvObj->strlen('utf-8', $output[$k]);;
......
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']);
}
/**
typo3/sysext/indexed_search/class.crawler.php (working copy)
* @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,'../')) {
typo3/sysext/indexed_search/class.external_parser.php (working copy)
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;
......
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;
......
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;
......
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;
......
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;
......
* @return string String
*/
function removeEndJunk($string) {
return trim(ereg_replace('['.chr(10).chr(12).']*$','',$string));
return trim(preg_replace('/[' . chr(10) . chr(12) . ']*$/', '', $string));
}
typo3/show_item.php (working copy)
} 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;
}
typo3/class.browse_links.php (working copy)
* @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;
}
......
* @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;
}
/**
......
* @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');
}
/**
typo3/template.php (working copy)
// Setting default scriptID:
if (($temp_M = (string) t3lib_div::_GET('M')) && $GLOBALS['TBE_MODULES']['_PATHS'][$temp_M]) {
$this->scriptID = ereg_replace('^.*\/(sysext|ext)\/', 'ext/', $GLOBALS['TBE_MODULES']['_PATHS'][$temp_M] . 'index.php');
$this->scriptID = preg_replace('/^.*\/(sysext|ext)\//', 'ext/', $GLOBALS['TBE_MODULES']['_PATHS'][$temp_M] . 'index.php');
} else {
$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('/[^\w-]/', '-', $this->scriptID);
// Individual configuration per script? If so, make a recursive merge of the arrays:
if (is_array($TBE_STYLES['scriptIDindex'][$this->scriptID])) {
typo3/view_help.php (working copy)
$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);
......
// Create label:
$labelStr = $LANG->sL($tableName).
($field ? $mergeToken.ereg_replace(':$','', trim($LANG->sL($fieldName))):'');
($field ? $mergeToken . preg_replace('/:$/', '', trim($LANG->sL($fieldName))) : '');
return $labelStr;
}
t3lib/class.t3lib_fullsearch.php (working copy)
$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':
t3lib/class.t3lib_querygenerator.php (working copy)
$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'])) {
t3lib/class.t3lib_loadmodules.php (working copy)
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)));
}
}
......
*/
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();
......
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;
t3lib/class.t3lib_div.php (working copy)
* @return string
*/
public static function rm_endcomma($string) {
return ereg_replace(',$','',$string);
return preg_replace('/,$/', '', $string);
}
/**
......
* @see calcParenthesis()
*/
public static function calcPriority($string) {
$string=ereg_replace('[[:space:]]*','',$string); // removing all whitespace
$string = preg_replace('/\s*/', '', $string); // removing all whitespace
$string='+'.$string; // Ensuring an operator for the first entrance
$qm='\*\/\+-^%';
$regex = '(['.$qm.'])(['.$qm.']?[0-9\.]*)';
......
* @return string Converted result.
*/
public static function deHSCentities($str) {
return ereg_replace('&amp;([#[:alnum:]]*;)','&\1',$str);
return preg_replace('/&amp;([#\w]*;)/', '&\1', $str);
}
/**
......
$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;
}
......
}
// 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('/[^\w-]/', '', $tagName) , 0, 100);
// If the value is an array then we will call this function recursively:
if (is_array($v)) {
......
// Initialize variabels:
$filearray = array();
$sortarray = array();
$path = ereg_replace('\/$','',$path);
$path = preg_replace('/\/$/', '', $path);
// Find files+directories:
if (@is_dir($path)) {
......
* @param array Array of GET parameters to include
* @return string
*/
public static function linkThisScript(array $getParams=array()) {
$parts = t3lib_div::getIndpEnv('SCRIPT_NAME');
$params = t3lib_div::_GET();
foreach($getParams as $k => $v) {
if (strcmp($v,'')) {
$params[$k]=$v;
} else unset($params[$k]);
}
$pString = t3lib_div::implodeArrayForUrl('',$params);
return $pString ? $parts.'?'.ereg_replace('^&','',$pString) : $parts;
return $pString ? $parts . '?' . preg_replace('/^&/', '', $pString) : $parts;
}
/**
......
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')).
($_SERVER['QUERY_STRING']?'?'.$_SERVER['QUERY_STRING']:'');
$retVal = '/' . preg_replace('/^\//', '', t3lib_div::getIndpEnv('SCRIPT_NAME')) .
($_SERVER['QUERY_STRING'] ? '?' . $_SERVER['QUERY_STRING'] : '');
} else {
$retVal = $_SERVER['REQUEST_URI'];
}
......
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/');
t3lib/class.t3lib_iconworks.php (working copy)
}
// Create tagged icon file name:
$iconFileName_stateTagged = ereg_replace('.([[:alnum:]]+)$', '__'.$flags.'.\1', basename($iconfile));
$iconFileName_stateTagged = preg_replace('/.(\w+)$/', '__' . $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('/.(\w+)$/', '__x.\1', basename($iconfile));
if (@is_file(dirname($absfile).'/'.$iconFileName_X)) {
return dirname($iconfile).'/'.$iconFileName_X;
} else {
......
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:
......
// 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('/\.\w+$/', '', $srcKey) . '.' . $fExt : $srcKey; // Set filename to look for
// If file is found:
if (@is_file($GLOBALS['TBE_STYLES']['skinImgAutoCfg']['absDir'].$lookUpName)) { // If there is a file...
t3lib/class.t3lib_cs.php (working copy)
}
$token = md5(microtime());
$parts = explode($token,ereg_replace('(&([#[:alnum:]]*);)',$token.'\2'.$token,$str));
$parts = explode($token, preg_replace('/(&([#\w]*);)/', $token . '\\2' . $token, $str));
foreach($parts as $k => $v) {
if ($k%2) {
if (substr($v,0,1)=='#') { // Dec or hex entities:
t3lib/class.t3lib_stdgraphic.php (working copy)
// 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]);
t3lib/class.t3lib_rteapi.php (working copy)
*/
function triggerField($fieldName) {
$triggerFieldName = ereg_replace('\[([^]]+)\]$','[_TRANSFORM_\1]', $fieldName);
$triggerFieldName = preg_replace('/\[([^]]+)\]$/', '[_TRANSFORM_\1]', $fieldName);
return '<input type="hidden" name="'.htmlspecialchars($triggerFieldName).'" value="RTE" />';
}
}
t3lib/class.t3lib_page.php (working copy)
*/
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));
// 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.redirectHttpStatusCode,sys_domain.prepend_params',
......
if ($row['redirectTo']) {
$redirectUrl = $row['redirectTo'];
if ($row['prepend_params']) {
$redirectUrl = ereg_replace('\/$', '', $redirectUrl);
$prependStr = ereg_replace('^\/','',substr($request_uri,strlen($path)));
$redirectUrl = preg_replace('/\/$/', '', $redirectUrl);
$prependStr = preg_replace('/^\//', '', substr($request_uri, strlen($path)));
$redirectUrl .= '/' . $prependStr;
}
t3lib/class.t3lib_readmail.php (working copy)
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;
}
t3lib/class.t3lib_superadmin.php (working copy)
$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.='<br /><br /><br />';
$content.=$this->headerParentDir($dir);
if (@is_dir($dir)) {
t3lib/class.t3lib_parsehtml_proc.php (working copy)
*/
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 = '';
......
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).
......
}
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) {
......
}
// 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')) {
t3lib/class.t3lib_foldertree.php (working copy)
$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);
t3lib/class.t3lib_befunc.php (working copy)
$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');
......
if (is_array($dRec)) {
reset($dRec);
$dRecord = current($dRec);
return ereg_replace('\/$', '', $dRecord['domainName']);
return preg_replace('/\/$/', '', $dRecord['domainName']);
}
}
}
......
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;
t3lib/class.t3lib_htmlmail.php (working copy)
$expr = "^[^".quotemeta("\"").quotemeta("'")."]*";
for($i = 1; $i < $pieces; $i++) {
$temp = $codepieces[$i];
$temp = trim(ereg_replace("=","",trim($temp)));
$temp = trim(preg_replace('/=/', '', trim($temp)));
ereg($expr,substr($temp,1,strlen($temp)),$reg);
$imageData['ref'] = $reg[0];
$imageData['quotes'] = substr($temp,0,1);
(1-1/6)