Index: tests/regularexpression_testcase.php =================================================================== --- tests/regularexpression_testcase.php (revision 6200) +++ tests/regularexpression_testcase.php (working copy) @@ -96,8 +96,8 @@ */ public function split1() { $string = 'test1, test2|test3;test4'; - $array1 = split(',|;|'.chr(10),$string); - $array2 = preg_split('/[,;'.chr(10).']/',$string); + $array1 = split(',|;|'.LF,$string); + $array2 = preg_split('/[,;'.LF.']/',$string); foreach($array1 as $key => $value) { $this->assertTrue( ($array2[$key] === $value) Index: tests/t3lib/t3lib_div_testcase.php =================================================================== --- tests/t3lib/t3lib_div_testcase.php (revision 6200) +++ tests/t3lib/t3lib_div_testcase.php (working copy) @@ -47,7 +47,7 @@ * @test */ public function checkTrimExplodeRemovesNewLines() { - $testString = ' a , b , ' . chr(10) . ' ,d ,, e,f,'; + $testString = ' a , b , ' . LF . ' ,d ,, e,f,'; $expectedArray = array('a', 'b', 'd', 'e', 'f'); $actualArray = t3lib_div::trimExplode(',', $testString, true); Index: tests/t3lib/t3lib_pagerenderer_testcase.php =================================================================== --- tests/t3lib/t3lib_pagerenderer_testcase.php (revision 6200) +++ tests/t3lib/t3lib_pagerenderer_testcase.php (working copy) @@ -374,7 +374,7 @@ */ public function testAddCssInlineBlockForceOnTop() { - $expectedReturnValue = '/*general1*/' . chr(10) . 'h1 {margin:20px;}' . chr(10) . '/*general*/' . chr(10) . 'body {margin:20px;}'; + $expectedReturnValue = '/*general1*/' . LF . 'h1 {margin:20px;}' . LF . '/*general*/' . LF . 'body {margin:20px;}'; $this->fixture->addCssInlineBlock('general', 'body {margin:20px;}'); $this->fixture->addCssInlineBlock('general1', 'h1 {margin:20px;}', NULL, TRUE); $out = $this->fixture->render(); @@ -423,7 +423,7 @@ */ public function testLoadExtJS() { - $expectedReturnValue = '' . chr(10) . ''; + $expectedReturnValue = '' . LF . ''; $this->fixture->loadExtJS(TRUE, TRUE, 'jquery'); $out = $this->fixture->render(); @@ -455,7 +455,7 @@ */ public function testEnableExtJsDebug() { - $expectedReturnValue = '' . chr(10) . ''; + $expectedReturnValue = '' . LF . ''; $this->fixture->loadExtJS(TRUE, TRUE, 'jquery'); $this->fixture->enableExtJsDebug(); $out = $this->fixture->render(); Index: t3lib/class.t3lib_install.php =================================================================== --- t3lib/class.t3lib_install.php (revision 6200) +++ t3lib/class.t3lib_install.php (working copy) @@ -215,7 +215,7 @@ } // Splitting localconf.php file into lines: - $lines = explode(chr(10),str_replace(chr(13),'',trim(t3lib_div::getUrl($writeToLocalconf_dat['file'])))); + $lines = explode(LF,str_replace(CR,'',trim(t3lib_div::getUrl($writeToLocalconf_dat['file'])))); $writeToLocalconf_dat['endLine'] = array_pop($lines); // Getting "? >" ending. // Checking if "updated" line was set by this tool - if so remove old line. @@ -234,10 +234,10 @@ if ($this->setLocalconf) { $success = FALSE; - if (!t3lib_div::writeFile($writeToLocalconf_dat['tmpfile'],implode(chr(10),$inlines))) { + if (!t3lib_div::writeFile($writeToLocalconf_dat['tmpfile'],implode(LF,$inlines))) { $msg = 'typo3conf/localconf.php'.$tmpExt.' could not be written - maybe a write access problem?'; } - elseif (strcmp(t3lib_div::getUrl($writeToLocalconf_dat['tmpfile']), implode(chr(10),$inlines))) { + elseif (strcmp(t3lib_div::getUrl($writeToLocalconf_dat['tmpfile']), implode(LF,$inlines))) { @unlink($writeToLocalconf_dat['tmpfile']); $msg = 'typo3conf/localconf.php'.$tmpExt.' was NOT written properly (written content didn\'t match file content) - maybe a disk space problem?'; } @@ -273,7 +273,7 @@ * @see setValueInLocalconfFile() */ function checkForBadString($string) { - return preg_match('/['.chr(10).chr(13).']/',$string) ? FALSE : TRUE; + return preg_match('/['.LF.CR.']/',$string) ? FALSE : TRUE; } /** @@ -284,9 +284,9 @@ * @see setValueInLocalconfFile() */ function slashValueForSingleDashes($value) { - $value = str_replace("'.chr(10).'", '###INSTALL_TOOL_LINEBREAK###', $value); + $value = str_replace("'.LF.'", '###INSTALL_TOOL_LINEBREAK###', $value); $value = str_replace("'","\'",str_replace('\\','\\\\',$value)); - $value = str_replace('###INSTALL_TOOL_LINEBREAK###', "'.chr(10).'", $value); + $value = str_replace('###INSTALL_TOOL_LINEBREAK###', "'.LF.'", $value); return $value; } @@ -313,7 +313,7 @@ * @return array Array with information about table. */ function getFieldDefinitions_fileContent($fileContent) { - $lines = t3lib_div::trimExplode(chr(10), $fileContent, 1); + $lines = t3lib_div::trimExplode(LF, $fileContent, 1); $table = ''; $total = array(); @@ -811,7 +811,7 @@ * @return array Array of SQL statements */ function getStatementArray($sqlcode,$removeNonSQL=0,$query_regex='') { - $sqlcodeArr = explode(chr(10), $sqlcode); + $sqlcodeArr = explode(LF, $sqlcode); // Based on the assumption that the sql-dump has $statementArray = array(); @@ -838,7 +838,7 @@ $statementArrayPointer++; } elseif ($is_set) { - $statementArray[$statementArrayPointer].= chr(10); + $statementArray[$statementArrayPointer].= LF; } } @@ -864,13 +864,13 @@ if (TYPO3_OS == 'WIN') { $table = strtolower($table); } - $sqlLines = explode(chr(10), $lineContent); + $sqlLines = explode(LF, $lineContent); foreach ($sqlLines as $k=>$v) { if (stristr($v,'auto_increment')) { $sqlLines[$k] = preg_replace('/ default \'0\'/i', '', $v); } } - $lineContent = implode(chr(10), $sqlLines); + $lineContent = implode(LF, $sqlLines); $crTables[$table] = $lineContent; } } elseif ($insertCountFlag && preg_match('/^insert[[:space:]]*into[[:space:]]*[`]?([[:alnum:]_]*)[`]?/i',substr($lineContent,0,100),$reg)) { Index: t3lib/class.t3lib_flexformtools.php =================================================================== --- t3lib/class.t3lib_flexformtools.php (revision 6200) +++ t3lib/class.t3lib_flexformtools.php (working copy) @@ -464,7 +464,7 @@ $output = t3lib_div::array2xml($array,'',0,'T3FlexForms', $spaceInd, $options); if ($addPrologue) { - $output = 'charSet.'" standalone="yes" ?>'.chr(10).$output; + $output = 'charSet.'" standalone="yes" ?>'.LF.$output; } return $output; Index: t3lib/class.t3lib_cli.php =================================================================== --- t3lib/class.t3lib_cli.php (revision 6200) +++ t3lib/class.t3lib_cli.php (working copy) @@ -144,7 +144,7 @@ if ($token{0}==='-' && !t3lib_div::testInt($token{1})) { // Options starting with a number is invalid - they could be negative values... ! list($index,$opt) = explode('=',$token,2); if (isset($cli_options[$index])) { - echo 'ERROR: Option '.$index.' was used twice!'.chr(10); + echo 'ERROR: Option '.$index.' was used twice!'.LF; exit; } $cli_options[$index] = array(); @@ -175,7 +175,7 @@ $ii=$i; if ($i>0) { if (!isset($cli_args_copy[$argSplit[0]][$i-1]) && $v{0}!='[') { // Using "[]" around a paramter makes it optional - echo 'ERROR: Option "'.$argSplit[0].'" requires a value ("'.$v.'") on position '.$i.chr(10); + echo 'ERROR: Option "'.$argSplit[0].'" requires a value ("'.$v.'") on position '.$i.LF; exit; } } @@ -183,7 +183,7 @@ $ii++; if (isset($cli_args_copy[$argSplit[0]][$ii-1])) { - echo 'ERROR: Option "'.$argSplit[0].'" does not support a value on position '.$ii.chr(10); + echo 'ERROR: Option "'.$argSplit[0].'" does not support a value on position '.$ii.LF; exit; } @@ -192,7 +192,7 @@ } if (count($cli_args_copy)) { - echo wordwrap('ERROR: Option '.implode(',',array_keys($cli_args_copy)).' was unknown to this script!'.chr(10).'(Options are: '.implode(', ',$allOptions).')'.chr(10)); + echo wordwrap('ERROR: Option '.implode(',',array_keys($cli_args_copy)).' was unknown to this script!'.LF.'(Options are: '.implode(', ',$allOptions).')'.LF); exit; } } @@ -267,7 +267,7 @@ } foreach ($this->cli_options as $v) { - $this->cli_echo($v[0].substr($this->cli_indent(rtrim($v[1].chr(10).$v[2]),$maxLen+4),strlen($v[0]))."\n"); + $this->cli_echo($v[0].substr($this->cli_indent(rtrim($v[1].LF.$v[2]),$maxLen+4),strlen($v[0]))."\n"); } $this->cli_echo("\n"); break; @@ -286,12 +286,12 @@ * @return string Result */ function cli_indent($str,$indent) { - $lines = explode(chr(10),wordwrap($str,75-$indent)); + $lines = explode(LF,wordwrap($str,75-$indent)); $indentStr = str_pad('',$indent,' '); foreach($lines as $k => $v) { $lines[$k] = $indentStr.$lines[$k]; } - return implode(chr(10),$lines); + return implode(LF,$lines); } } Index: t3lib/class.t3lib_userauthgroup.php =================================================================== --- t3lib/class.t3lib_userauthgroup.php (revision 6200) +++ t3lib/class.t3lib_userauthgroup.php (working copy) @@ -92,7 +92,7 @@ * SECTION: Logging * 1589: function writelog($type,$action,$error,$details_nr,$details,$data,$tablename='',$recuid='',$recpid='',$event_pid=-1,$NEWid='',$userId=0) * 1621: function simplelog($message, $extKey='', $error=0) - * 1642: function checkLogFailures($email, $secondsBack=3600, $max=3) + * 1642: function checkLogFailures($email, $secondsBack=ONE_HOUR, $max=3) * * TOTAL FUNCTIONS: 45 * (This index is automatically created/updated by the extension "extdeveval") @@ -1200,7 +1200,7 @@ // Check include lines. $this->TSdataArray = t3lib_TSparser::checkIncludeLines_array($this->TSdataArray); - $this->userTS_text = implode(chr(10).'[GLOBAL]'.chr(10),$this->TSdataArray); // Imploding with "[global]" will make sure that non-ended confinements with braces are ignored. + $this->userTS_text = implode(LF.'[GLOBAL]'.LF,$this->TSdataArray); // Imploding with "[global]" will make sure that non-ended confinements with braces are ignored. if ($GLOBALS['TYPO3_CONF_VARS']['BE']['TSconfigConditions'] && !$this->userTS_dontGetCached) { // Perform TS-Config parsing with condition matching @@ -1456,12 +1456,12 @@ function addTScomment($str) { $delimiter = '# ***********************************************'; - $out = $delimiter.chr(10); - $lines = t3lib_div::trimExplode(chr(10),$str); + $out = $delimiter.LF; + $lines = t3lib_div::trimExplode(LF,$str); foreach($lines as $v) { - $out.= '# '.$v.chr(10); + $out.= '# '.$v.LF; } - $out.= $delimiter.chr(10); + $out.= $delimiter.LF; return $out; } @@ -1767,7 +1767,7 @@ * @return void * @access private */ - function checkLogFailures($email, $secondsBack=3600, $max=3) { + function checkLogFailures($email, $secondsBack=ONE_HOUR, $max=3) { if ($email) { @@ -1806,7 +1806,7 @@ while($testRows = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) { $theData = unserialize($testRows['log_data']); $email_body.= date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'].' '.$GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'],$testRows['tstamp']).': '.@sprintf($testRows['details'],''.$theData[0],''.$theData[1],''.$theData[2]); - $email_body.= chr(10); + $email_body.= LF; } mail( $email, $subject, Index: t3lib/class.t3lib_diff.php =================================================================== --- t3lib/class.t3lib_diff.php (revision 6200) +++ t3lib/class.t3lib_diff.php (working copy) @@ -94,7 +94,7 @@ $str1Lines = $this->explodeStringIntoWords($str1); $str2Lines = $this->explodeStringIntoWords($str2); - $diffRes = $this->getDiff(implode(chr(10),$str1Lines).chr(10),implode(chr(10),$str2Lines).chr(10)); + $diffRes = $this->getDiff(implode(LF,$str1Lines).LF,implode(LF,$str2Lines).LF); if (is_array($diffRes)) { reset($diffRes); @@ -143,7 +143,7 @@ } $outString.=$this->addClearBuffer($clearBuffer,1); - $outString = str_replace(' ',chr(10),$outString); + $outString = str_replace(' ',LF,$outString); if (!$this->stripTags) { $outString = $this->tagSpace($outString,1); } @@ -203,7 +203,7 @@ * @access private */ function explodeStringIntoWords($str) { - $strArr = t3lib_div::trimExplode(chr(10),$str); + $strArr = t3lib_div::trimExplode(LF,$str); $outArray=array(); reset($strArr); while(list(,$lineOfWords)=each($strArr)) { Index: t3lib/class.t3lib_readmail.php =================================================================== --- t3lib/class.t3lib_readmail.php (revision 6200) +++ t3lib/class.t3lib_readmail.php (working copy) @@ -368,7 +368,7 @@ function extractMailHeader($content,$limit=0) { if ($limit) $content = substr($content,0,$limit); - $lines=explode(chr(10),ltrim($content)); + $lines=explode(LF,ltrim($content)); $headers=array(); $p=''; while(list($k,$str)=each($lines)) { @@ -386,7 +386,7 @@ } unset($lines[$k]); } - if (!$limit) $headers['CONTENT']=ltrim(implode(chr(10),$lines)); + if (!$limit) $headers['CONTENT']=ltrim(implode(LF,$lines)); return $headers; } Index: t3lib/class.t3lib_formmail.php =================================================================== --- t3lib/class.t3lib_formmail.php (revision 6200) +++ t3lib/class.t3lib_formmail.php (working copy) @@ -144,8 +144,8 @@ reset($V); while (list($key,$val)=each($V)) { if (!t3lib_div::inList($this->reserved_names,$key)) { - $space = (strlen($val)>60)?chr(10):''; - $val = (is_array($val) ? implode($val,chr(10)) : $val); + $space = (strlen($val)>60)?LF:''; + $val = (is_array($val) ? implode($val,LF) : $val); // convert form data from renderCharset to mail charset (HTML may use entities) $Plain_val = ($convCharset && strlen($val)) ? $GLOBALS['TSFE']->csConvObj->conv($val,$GLOBALS['TSFE']->renderCharset,$this->charset,0) : $val; Index: t3lib/class.t3lib_tsparser.php =================================================================== --- t3lib/class.t3lib_tsparser.php (revision 6200) +++ t3lib/class.t3lib_tsparser.php (working copy) @@ -82,7 +82,7 @@ // Internal var $setup = Array(); // TypoScript hierarchy being build during parsing. - var $raw; // raw data, the input string exploded by chr(10) + var $raw; // raw data, the input string exploded by LF var $rawP; // pointer to entry in raw data array var $lastComment=''; // Holding the value of the last comment var $commentSet=0; // Internally set, used as internal flag to create a multi-line comment (one of those like /*... */) @@ -131,7 +131,7 @@ * @return void */ function parse($string,$matchObj='') { - $this->raw = explode(chr(10),$string); + $this->raw = explode(LF,$string); $this->rawP = 0; $pre = '[GLOBAL]'; while($pre) { @@ -206,7 +206,7 @@ if (substr($line,0,1)==')') { // Multiline ends... if ($this->syntaxHighLight) $this->regHighLight("operator",$lineP,strlen($line)-1); $this->multiLineEnabled=0; // Disable multiline - $theValue = implode($this->multiLineValue,chr(10)); + $theValue = implode($this->multiLineValue,LF); if (strstr($this->multiLineObject,'.')) { $this->setVal($this->multiLineObject,$setup,array($theValue)); // Set the value deeper. } else { @@ -258,7 +258,7 @@ $tsFuncArg = str_replace( array('\\\\', '\n','\t'), - array('\\', chr(10),chr(9)), + array('\\', LF,TAB), $tsFuncArg ); @@ -371,7 +371,7 @@ if ($this->syntaxHighLight) $this->regHighLight("comment", $lineP); // Comment. The comments are concatenated in this temporary string: - if ($this->regComments) $this->lastComment.= trim($line).chr(10); + if ($this->regComments) $this->lastComment.= trim($line).LF; } } } @@ -518,7 +518,7 @@ $splitStr=' $v) { if (!$c) { // first goes through $newString.=$v; @@ -526,7 +526,7 @@ $subparts=explode('>',$v,2); if (preg_match('/^\s*\r?\n/',$subparts[1])) { // There must be a line-break char after // SO, the include was positively recognized: - $newString.='### '.$splitStr.$subparts[0].'> BEGIN:'.chr(10); + $newString.='### '.$splitStr.$subparts[0].'> BEGIN:'.LF; $params = t3lib_div::get_tag_attributes($subparts[0]); if ($params['source']) { $sourceParts = explode(':',$params['source'],2); @@ -544,13 +544,13 @@ $includedFiles = array_merge($includedFiles, $included_text['files']); $included_text = $included_text['typoscript']; } - $newString.= $included_text.chr(10); + $newString.= $included_text.LF; } } break; } } - $newString.='### '.$splitStr.$subparts[0].'> END:'.chr(10); + $newString.='### '.$splitStr.$subparts[0].'> END:'.LF; $newString.=$subparts[1]; } else $newString.=$splitStr.$v; } else $newString.=$splitStr.$v; @@ -620,7 +620,7 @@ $this->syntaxHighLight=1; $this->highLightData=array(); $this->error=array(); - $string = str_replace(chr(13),'',$string); // This is done in order to prevent empty .. sections around chr(13) content. Should not do anything but help lessen the amount of HTML code. + $string = str_replace(CR,'',$string); // This is done in order to prevent empty .. sections around CR content. Should not do anything but help lessen the amount of HTML code. $this->parse($string); @@ -699,7 +699,7 @@ $lines[] = $lineC; } - return '
'.implode(chr(10),$lines).'
'; + return '
'.implode(LF,$lines).'
'; } } Index: t3lib/class.t3lib_pagerenderer.php =================================================================== --- t3lib/class.t3lib_pagerenderer.php (revision 6200) +++ t3lib/class.t3lib_pagerenderer.php (working copy) @@ -135,12 +135,12 @@ $this->backPath = isset($backPath) ? $backPath : $GLOBALS['BACK_PATH']; $this->inlineJavascriptWrap = array( - '' . chr(10) + '' . LF ); $this->inlineCssWrap = array( - '' . chr(10) + '' . LF ); } @@ -636,7 +636,7 @@ public function addJsInlineCode($name, $block, $compress = TRUE, $forceOnTop = FALSE) { if (!isset($this->jsInline[$name])) { $this->jsInline[$name] = array ( - 'code' => $block . chr(10), + 'code' => $block . LF, 'section' => self::PART_HEADER, 'compress' => $compress, 'forceOnTop' => $forceOnTop @@ -656,7 +656,7 @@ public function addJsFooterInlineCode($name, $block, $compress = TRUE, $forceOnTop = FALSE) { if (!isset($this->jsInline[$name])) { $this->jsInline[$name] = array ( - 'code' => $block . chr(10), + 'code' => $block . LF, 'section' => self::PART_FOOTER, 'compress' => $compress, 'forceOnTop' => $forceOnTop @@ -952,7 +952,7 @@ $this->doConcatenate(); } - $metaTags = implode(chr(10), $this->metaTags); + $metaTags = implode(LF, $this->metaTags); if (count($this->cssFiles)) { foreach ($this->cssFiles as $file => $properties) { @@ -962,9 +962,9 @@ $tag = str_replace('|', $tag, $properties['allWrap']); } if ($properties['forceOnTop']) { - $cssFiles = $tag . chr(10) . $cssFiles; + $cssFiles = $tag . LF . $cssFiles; } else { - $cssFiles .= chr(10) . $tag; + $cssFiles .= LF . $tag; } } } @@ -973,9 +973,9 @@ foreach ($this->cssInline as $name => $properties) { if ($properties['forceOnTop']) { - $cssInline = '/*' . htmlspecialchars($name) . '*/' . chr(10) . $properties['code'] . chr(10) . $cssInline; + $cssInline = '/*' . htmlspecialchars($name) . '*/' . LF . $properties['code'] . LF . $cssInline; } else { - $cssInline .= '/*' . htmlspecialchars($name) . '*/' . chr(10) . $properties['code'] . chr(10); + $cssInline .= '/*' . htmlspecialchars($name) . '*/' . LF . $properties['code'] . LF; } } $cssInline = $this->inlineCssWrap[0] . $cssInline . $this->inlineCssWrap[1]; @@ -991,15 +991,15 @@ } if ($properties['forceOnTop']) { if ($properties['section'] === self::PART_HEADER) { - $jsLibs = $tag . chr(10) . $jsLibs; + $jsLibs = $tag . LF . $jsLibs; } else { - $jsFooterLibs = $tag . chr(10) . $jsFooterLibs; + $jsFooterLibs = $tag . LF . $jsFooterLibs; } } else { if ($properties['section'] === self::PART_HEADER) { - $jsLibs .= chr(10) . $tag; + $jsLibs .= LF . $tag; } else { - $jsFooterLibs .= chr(10) . $tag; + $jsFooterLibs .= LF . $tag; } } @@ -1015,15 +1015,15 @@ } if ($properties['forceOnTop']) { if ($properties['section'] === self::PART_HEADER) { - $jsFiles = $tag . chr(10) . $jsFiles; + $jsFiles = $tag . LF . $jsFiles; } else { - $jsFooterFiles = $tag . chr(10) . $jsFooterFiles; + $jsFooterFiles = $tag . LF . $jsFooterFiles; } } else { if ($properties['section'] === self::PART_HEADER) { - $jsFiles .= chr(10) . $tag; + $jsFiles .= LF . $tag; } else { - $jsFooterFiles .= chr(10) . $tag; + $jsFooterFiles .= LF . $tag; } } } @@ -1033,15 +1033,15 @@ foreach ($this->jsInline as $name => $properties) { if ($properties['forceOnTop']) { if ($properties['section'] === self::PART_HEADER) { - $jsInline = '/*' . htmlspecialchars($name) . '*/' . chr(10) . $properties['code'] . chr(10) . $jsInline; + $jsInline = '/*' . htmlspecialchars($name) . '*/' . LF . $properties['code'] . LF . $jsInline; } else { - $jsFooterInline = '/*' . htmlspecialchars($name) . '*/' . chr(10) . $properties['code'] . chr(10) . $jsFooterInline; + $jsFooterInline = '/*' . htmlspecialchars($name) . '*/' . LF . $properties['code'] . LF . $jsFooterInline; } } else { if ($properties['section'] === self::PART_HEADER) { - $jsInline .= '/*' . htmlspecialchars($name) . '*/' . chr(10) . $properties['code'] . chr(10); + $jsInline .= '/*' . htmlspecialchars($name) . '*/' . LF . $properties['code'] . LF; } else { - $jsFooterInline .= '/*' . htmlspecialchars($name) . '*/' . chr(10) . $properties['code'] . chr(10); + $jsFooterInline .= '/*' . htmlspecialchars($name) . '*/' . LF . $properties['code'] . LF; } } } @@ -1062,7 +1062,7 @@ $template = t3lib_div::getURL($templateFile); if ($this->removeEmptyLinesFromTemplate) { - $template = strtr($template, array(chr(10) => '', chr(13) => '')); + $template = strtr($template, array(LF => '', CR => '')); } if ($part != self::PART_COMPLETE) { $templatePart = explode('###BODY###', $template); @@ -1070,11 +1070,11 @@ } if ($this->moveJsFromHeaderToFooter) { - $jsFooterLibs = $jsLibs . chr(10) . $jsFooterLibs; + $jsFooterLibs = $jsLibs . LF . $jsFooterLibs; $jsLibs = ''; - $jsFooterFiles = $jsFiles . chr(10) . $jsFooterFiles; + $jsFooterFiles = $jsFiles . LF . $jsFooterFiles; $jsFiles = ''; - $jsFooterInline = $jsInline . chr(10) . $jsFooterInline; + $jsFooterInline = $jsInline . LF . $jsFooterInline; $jsInline = ''; } @@ -1083,7 +1083,7 @@ 'HTMLTAG' => $this->htmlTag, 'HEADTAG' => $this->headTag, 'METACHARSET' => $this->charSet ? str_replace('|', htmlspecialchars($this->charSet), $this->metaCharsetTag) : '', - 'INLINECOMMENT' => $this->inlineComments ? chr(10) . chr(10) . '' . chr(10) . chr(10) : '', + 'INLINECOMMENT' => $this->inlineComments ? LF . LF . '' . LF . LF : '', 'BASEURL' => $this->baseUrl ? str_replace('|', $this->baseUrl, $this->baseUrlTag) : '', 'SHORTCUT' => $this->favIcon ? sprintf($this->shortcutTag, htmlspecialchars($this->favIcon), $this->iconMimeType) : '', 'CSS_INCLUDE' => $cssFiles, @@ -1093,8 +1093,8 @@ 'JS_LIBS' => $jsLibs, 'TITLE' => $this->title ? str_replace('|', htmlspecialchars($this->title), $this->titleTag) : '', 'META' => $metaTags, - 'HEADERDATA' => $this->headerData ? implode(chr(10), $this->headerData) : '', - 'FOOTERDATA' => $this->footerData ? implode(chr(10), $this->footerData) : '', + 'HEADERDATA' => $this->headerData ? implode(LF, $this->headerData) : '', + 'FOOTERDATA' => $this->footerData ? implode(LF, $this->footerData) : '', 'JS_LIBS_FOOTER' => $jsFooterLibs, 'JS_INCLUDE_FOOTER' => $jsFooterFiles, 'JS_INLINE_FOOTER' => $jsFooterInline, @@ -1116,7 +1116,7 @@ $out = ''; if ($this->addPrototype) { - $out .= '' . chr(10); + $out .= '' . LF; unset($this->jsFiles[$this->backPath . 'contrib/prototype/prototype.js']); } @@ -1136,21 +1136,21 @@ $moduleLoadString = '?load=' . implode(',', $mods); } - $out .= '' . chr(10); + $out .= '' . LF; unset($this->jsFiles[$this->backPath . 'contrib/scriptaculous/scriptaculous.js' . $moduleLoadString]); } // include extCore if ($this->addExtCore) { - $out .= '' . chr(10); + $out .= '' . LF; unset($this->jsFiles[$this->backPath . 'contrib/extjs/ext-core' . ($this->enableExtCoreDebug ? '-debug' : '') . '.js']); } // include extJS if ($this->addExtJS) { // use the base adapter all the time - $out .= '' . chr(10); - $out .= '' . chr(10); + $out .= '' . LF; + $out .= '' . LF; // add extJS localization $localeMap = $this->csConvObj->isoArray; // load standard ISO mapping and modify for use with ExtJS @@ -1165,7 +1165,7 @@ // TODO autoconvert file from UTF8 to current BE charset if necessary!!!! $extJsLocaleFile = 'contrib/extjs/locale/ext-lang-' . $extJsLang . '-min.js'; if (file_exists(PATH_typo3 . $extJsLocaleFile)) { - $out .= '' . chr(10); + $out .= '' . LF; } @@ -1189,10 +1189,10 @@ $out .= $this->inlineJavascriptWrap[0] . ' Ext.ns("TYPO3"); - Ext.BLANK_IMAGE_URL = "' . htmlspecialchars(t3lib_div::locationHeaderUrl($this->backPath . 'gfx/clear.gif')) . '";' . chr(10) . + Ext.BLANK_IMAGE_URL = "' . htmlspecialchars(t3lib_div::locationHeaderUrl($this->backPath . 'gfx/clear.gif')) . '";' . LF . $inlineSettings . 'Ext.onReady(function() {' . - ($this->enableExtJSQuickTips ? 'Ext.QuickTips.init();' . chr(10) : '') . $code . + ($this->enableExtJSQuickTips ? 'Ext.QuickTips.init();' . LF : '') . $code . ' });' . $this->inlineJavascriptWrap[1]; unset ($this->extOnReadyCode); @@ -1282,7 +1282,7 @@ $error = ''; $this->jsInline[$name]['code'] = t3lib_div::minifyJavaScript($properties['code'], $error); if ($error) { - $this->compressError .= 'Error with minify JS Inline Block "' . $name . '": ' . $error . chr(10); + $this->compressError .= 'Error with minify JS Inline Block "' . $name . '": ' . $error . LF; } } } Index: t3lib/class.t3lib_tcemain.php =================================================================== --- t3lib/class.t3lib_tcemain.php (revision 6200) +++ t3lib/class.t3lib_tcemain.php (working copy) @@ -146,7 +146,7 @@ * 4846: function insertDB($table,$id,$fieldArray,$newVersion=FALSE,$suggestedUid=0,$dontSetNewIdIndex=FALSE) * 4919: function checkStoredRecord($table,$id,$fieldArray,$action) * 4956: function setHistory($table,$id,$logId) - * 4989: function clearHistory($maxAgeSeconds=604800,$table) + * 4989: function clearHistory($maxAgeSeconds=ONE_WEEK,$table) * 5003: function updateRefIndex($table,$id) * * SECTION: Misc functions @@ -1187,7 +1187,7 @@ $eFileMarker = $eFile['markerField']&&trim($mixedRec[$eFile['markerField']]) ? trim($mixedRec[$eFile['markerField']]) : '###TYPO3_STATICFILE_EDIT###'; $insertContent = str_replace($eFileMarker,'',$mixedRec[$eFile['contentField']]); // must replace the marker if present in content! - $SW_fileNewContent = $parseHTML->substituteSubpart($SW_fileContent, $eFileMarker, chr(10).$insertContent.chr(10), 1, 1); + $SW_fileNewContent = $parseHTML->substituteSubpart($SW_fileContent, $eFileMarker, LF.$insertContent.LF, 1, 1); t3lib_div::writeFile($eFile['editFile'],$SW_fileNewContent); // Write status: @@ -4284,7 +4284,7 @@ foreach($files as $dat) { if (@is_file($dat['ID_absFile'])) { unlink ($dat['ID_absFile']); -#echo 'DELETE FlexFormFile:'.$dat['ID_absFile'].chr(10); +#echo 'DELETE FlexFormFile:'.$dat['ID_absFile'].LF; } else { $this->log($table,0,3,0,100,"Delete: Referenced file '".$dat['ID_absFile']."' that was supposed to be deleted together with it's record didn't exist"); } @@ -6155,7 +6155,7 @@ * @param string table where the history should be cleared * @return void */ - function clearHistory($maxAgeSeconds=604800,$table) { + function clearHistory($maxAgeSeconds=ONE_WEEK,$table) { $tstampLimit = $maxAgeSeconds ? $GLOBALS['EXEC_TIME'] - $maxAgeSeconds : 0; $GLOBALS['TYPO3_DB']->exec_DELETEquery('sys_history', 'tstamp<'.intval($tstampLimit).' AND tablename='.$GLOBALS['TYPO3_DB']->fullQuoteStr($table, 'sys_history')); Index: t3lib/cache/backend/class.t3lib_cache_backend_abstractbackend.php =================================================================== --- t3lib/cache/backend/class.t3lib_cache_backend_abstractbackend.php (revision 6200) +++ t3lib/cache/backend/class.t3lib_cache_backend_abstractbackend.php (working copy) @@ -49,7 +49,7 @@ * * @var integer */ - protected $defaultLifetime = 3600; + protected $defaultLifetime = ONE_HOUR; /** * Constructs this backend Index: t3lib/class.t3lib_beuserauth.php =================================================================== --- t3lib/class.t3lib_beuserauth.php (revision 6200) +++ t3lib/class.t3lib_beuserauth.php (working copy) @@ -234,10 +234,10 @@ if ($this->user['uid']) { if (!$this->isAdmin()) { return TRUE; - } else die('ERROR: CLI backend user "'.$userName.'" was ADMIN which is not allowed!'.chr(10).chr(10)); - } else die('ERROR: No backend user named "'.$userName.'" was found! [Database: '.TYPO3_db.']'.chr(10).chr(10)); - } else die('ERROR: Module name, "'.$GLOBALS['MCONF']['name'].'", was not prefixed with "_CLI_"'.chr(10).chr(10)); - } else die('ERROR: Another user was already loaded which is impossible in CLI mode!'.chr(10).chr(10)); + } else die('ERROR: CLI backend user "'.$userName.'" was ADMIN which is not allowed!'.LF.LF); + } else die('ERROR: No backend user named "'.$userName.'" was found! [Database: '.TYPO3_db.']'.LF.LF); + } else die('ERROR: Module name, "'.$GLOBALS['MCONF']['name'].'", was not prefixed with "_CLI_"'.LF.LF); + } else die('ERROR: Another user was already loaded which is impossible in CLI mode!'.LF.LF); } } Index: t3lib/class.t3lib_querygenerator.php =================================================================== --- t3lib/class.t3lib_querygenerator.php (revision 6200) +++ t3lib/class.t3lib_querygenerator.php (working copy) @@ -1183,13 +1183,13 @@ while(list($key,$conf) = each($queryConfig)) { switch($conf['type']) { case 'newlevel': - $qs.=chr(10).$pad.trim($conf['operator']).' ('.$this->getQuery($queryConfig[$key]['nl'],$pad.' ').chr(10).$pad.')'; + $qs.=LF.$pad.trim($conf['operator']).' ('.$this->getQuery($queryConfig[$key]['nl'],$pad.' ').LF.$pad.')'; break; case 'userdef': - $qs.=chr(10).$pad.getUserDefQuery($conf,$first); + $qs.=LF.$pad.getUserDefQuery($conf,$first); break; default: - $qs.=chr(10).$pad.$this->getQuerySingle($conf,$first); + $qs.=LF.$pad.$this->getQuerySingle($conf,$first); break; } $first=0; Index: t3lib/class.t3lib_xml.php =================================================================== --- t3lib/class.t3lib_xml.php (revision 6200) +++ t3lib/class.t3lib_xml.php (working copy) @@ -120,7 +120,7 @@ * @return string */ function getResult() { - $content = implode(chr(10),$this->lines); + $content = implode(LF,$this->lines); return $this->output($content); } @@ -209,7 +209,7 @@ if ($b) $this->XMLIndent++; else $this->XMLIndent--; $this->Icode=''; for ($a=0;$a<$this->XMLIndent;$a++) { - $this->Icode.=chr(9); + $this->Icode.=TAB; } return $this->Icode; } @@ -273,13 +273,13 @@ } /** - * Substitutes chr(10) characters with a '' tag. + * Substitutes LF characters with a '' tag. * * @param string Input value * @return string Processed input value */ function substNewline($string) { - return str_replace(chr(10),'',$string); + return str_replace(LF,'',$string); } /** Index: t3lib/class.t3lib_tsstyleconfig.php =================================================================== --- t3lib/class.t3lib_tsstyleconfig.php (revision 6200) +++ t3lib/class.t3lib_tsstyleconfig.php (working copy) @@ -211,7 +211,7 @@ */ function ext_mergeIncomingWithExisting($arr) { $parseObj = t3lib_div::makeInstance("t3lib_TSparser"); - $parseObj->parse(implode(chr(10),$this->ext_incomingValues)); + $parseObj->parse(implode(LF,$this->ext_incomingValues)); $arr2 = $parseObj->setup; return t3lib_div::array_merge_recursive_overrule($arr,$arr2); } Index: t3lib/class.t3lib_tceforms.php =================================================================== --- t3lib/class.t3lib_tceforms.php (revision 6200) +++ t3lib/class.t3lib_tceforms.php (working copy) @@ -326,8 +326,8 @@ $this->RTEenabled = $GLOBALS['BE_USER']->isRTE(); if (!$this->RTEenabled) { - $this->RTEenabled_notReasons = implode(chr(10),$GLOBALS['BE_USER']->RTE_errors); - $this->commentMessages[] = 'RTE NOT ENABLED IN SYSTEM due to:'.chr(10).$this->RTEenabled_notReasons; + $this->RTEenabled_notReasons = implode(LF,$GLOBALS['BE_USER']->RTE_errors); + $this->commentMessages[] = 'RTE NOT ENABLED IN SYSTEM due to:'.LF.$this->RTEenabled_notReasons; } // Default color+class scheme @@ -1232,7 +1232,7 @@ $origRows = $rows = t3lib_div::intInRange($config['rows'] ? $config['rows'] : 5, 1, 20); if (strlen($PA['itemFormElValue']) > $this->charsPerRow*2) { $cols = $this->maxTextareaWidth; - $rows = t3lib_div::intInRange(round(strlen($PA['itemFormElValue'])/$this->charsPerRow), count(explode(chr(10),$PA['itemFormElValue'])), 20); + $rows = t3lib_div::intInRange(round(strlen($PA['itemFormElValue'])/$this->charsPerRow), count(explode(LF,$PA['itemFormElValue'])), 20); if ($rows<$origRows) $rows = $origRows; } @@ -2341,7 +2341,7 @@ $origRows = $rows = t3lib_div::intInRange($rows, 1, 20); if (strlen($itemValue)>$this->charsPerRow*2) { $cols = $this->maxTextareaWidth; - $rows = t3lib_div::intInRange(round(strlen($itemValue)/$this->charsPerRow),count(explode(chr(10),$itemValue)),20); + $rows = t3lib_div::intInRange(round(strlen($itemValue)/$this->charsPerRow),count(explode(LF,$itemValue)),20); if ($rows<$origRows) $rows=$origRows; } } @@ -4590,7 +4590,7 @@ // Description texts: if ($this->edit_showFieldHelp) { $descr = $GLOBALS['LANG']->moduleLabels['labels'][$theMod.'_tablabel']. - chr(10). + LF. $GLOBALS['LANG']->moduleLabels['labels'][$theMod.'_tabdescr']; } @@ -5430,14 +5430,14 @@ '; } - $out .= chr(10).implode(chr(10),$this->additionalJS_post).chr(10).$this->extJSCODE; + $out .= LF.implode(LF,$this->additionalJS_post).LF.$this->extJSCODE; $out .= ' TBE_EDITOR.loginRefreshed(); '; // Regular direct output: if (!$update) { - $spacer = chr(10) . chr(9); + $spacer = LF . TAB; $out = $spacer . implode($spacer, $jsFile) . t3lib_div::wrapJS($out); } Index: t3lib/class.t3lib_tstemplate.php =================================================================== --- t3lib/class.t3lib_tstemplate.php (revision 6200) +++ t3lib/class.t3lib_tstemplate.php (working copy) @@ -602,7 +602,7 @@ 'title'=>$row['title'], 'uid'=>$row['uid'], 'pid'=>$row['pid'], - 'configLines' => substr_count($row['config'], chr(10))+1 + 'configLines' => substr_count($row['config'], LF)+1 ); // Adding the content of the fields constants (Constants), config (Setup) and editorcfg (Backend Editor Configuration) to the internal arrays. @@ -999,7 +999,7 @@ } // Parsing the user TS (or getting from cache) $TSdataArray = t3lib_TSparser::checkIncludeLines_array($TSdataArray); - $userTS = implode(chr(10).'[GLOBAL]'.chr(10),$TSdataArray); + $userTS = implode(LF.'[GLOBAL]'.LF,$TSdataArray); $parseObj = t3lib_div::makeInstance('t3lib_TSparser'); $parseObj->parse($userTS); Index: t3lib/class.t3lib_userauth.php =================================================================== --- t3lib/class.t3lib_userauth.php (revision 6200) +++ t3lib/class.t3lib_userauth.php (working copy) @@ -150,7 +150,7 @@ var $lockHashKeyWords = 'useragent'; // Keyword list (commalist with no spaces!): "useragent". Each keyword indicates some information that can be included in a integer hash made to lock down usersessions. var $warningEmail = ''; // warning -emailaddress: - var $warningPeriod = 3600; // Period back in time (in seconds) in which number of failed logins are collected + var $warningPeriod = ONE_HOUR; // Period back in time (in seconds) in which number of failed logins are collected var $warningMax = 3; // The maximum accepted number of warnings before an email is sent var $checkPid = TRUE; // If set, the user-record must $checkPid_value as pid var $checkPid_value=0; // The pid, the user-record must have as page-id @@ -301,7 +301,7 @@ // Set $this->gc_time if not explicitely specified if ($this->gc_time==0) { - $this->gc_time = ($this->auth_timeout_field==0 ? 86400 : $this->auth_timeout_field); // Default to 1 day if $this->auth_timeout_field is 0 + $this->gc_time = ($this->auth_timeout_field==0 ? ONE_DAY : $this->auth_timeout_field); // Default to 1 day if $this->auth_timeout_field is 0 } // If we're lucky we'll get to clean up old sessions.... Index: t3lib/t3lib_constants.php =================================================================== --- t3lib/t3lib_constants.php (revision 0) +++ t3lib/t3lib_constants.php (revision 0) @@ -0,0 +1,39 @@ + +* All rights reserved +* +* This script is part of the TYPO3 project. The TYPO3 project is +* free software); you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation); either version 2 of the License, or +* (at your option) any later version. +* +* The GNU General Public License can be found at +* http://www.gnu.org/copyleft/gpl.html. +* +* This script is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY); without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* This copyright notice MUST APPEAR in all copies of the script! +***************************************************************/ + + // a tabulator +define('TAB', chr(9)); + // a linefeed +define('LF', chr(10)); + // a carriage return +define('CR', chr(13)); + // a CR-LF combination +define('CRLF', CR . LF); + // one hour in seconds +define('ONE_HOUR', 3600); + // one day in seconds +define('ONE_DAY', 86400); + // one week in seconds +define('ONE_WEEK', 604800); +?> \ No newline at end of file Property changes on: t3lib/t3lib_constants.php ___________________________________________________________________ Added: svn:mime-type + text/plain Index: t3lib/class.t3lib_admin.php =================================================================== --- t3lib/class.t3lib_admin.php (revision 6200) +++ t3lib/class.t3lib_admin.php (working copy) @@ -160,7 +160,7 @@ // Build HTML output: if ($this->genTree_makeHTML) { - $this->genTree_HTML.=chr(10).'
'; + $this->genTree_HTML.=LF.'
'; $PM = 'join'; $LN = ($a==$c)?'blank':'line'; $BTM = ($a==$c)?'bottom':''; @@ -250,7 +250,7 @@ // Build HTML output: if ($this->genTree_makeHTML) { - $this->genTree_HTML.=chr(10).'
'; + $this->genTree_HTML.=LF.'
'; $PM = 'join'; $LN = ($a==$c)?'blank':'line'; $BTM = ($a==$c)?'bottom':''; Index: t3lib/class.t3lib_parsehtml_proc.php =================================================================== --- t3lib/class.t3lib_parsehtml_proc.php (revision 6200) +++ t3lib/class.t3lib_parsehtml_proc.php (working copy) @@ -275,7 +275,7 @@ // Line breaks of content is unified into char-10 only (removing char 13) if (!$this->procOptions['disableUnifyLineBreaks']) { - $value = str_replace(chr(13).chr(10),chr(10),$value); + $value = str_replace(CRLF,LF,$value); } // In an entry-cleaner was configured, pass value through the HTMLcleaner with that: @@ -309,7 +309,7 @@ break; case 'ts_transform': case 'css_transform': - $value = str_replace(chr(13),'',$value); // Has a very disturbing effect, so just remove all '13' - depend on '10' + $value = str_replace(CR,'',$value); // Has a very disturbing effect, so just remove all '13' - depend on '10' $this->allowedClasses = t3lib_div::trimExplode(',', $this->procOptions['allowedClasses'], 1); $value = $this->TS_transform_db($value,$cmd=='css_transform'); break; @@ -344,7 +344,7 @@ break; case 'ts_transform': case 'css_transform': - $value = str_replace(chr(13),'',$value); // Has a very disturbing effect, so just remove all '13' - depend on '10' + $value = str_replace(CR,'',$value); // Has a very disturbing effect, so just remove all '13' - depend on '10' $value = $this->TS_transform_rte($value,$cmd=='css_transform'); break; default: @@ -361,8 +361,8 @@ // Final clean up of linebreaks: if (!$this->procOptions['disableUnifyLineBreaks']) { - $value = str_replace(chr(13).chr(10),chr(10),$value); // Make sure no \r\n sequences has entered in the meantime... - $value = str_replace(chr(10),chr(13).chr(10),$value); // ... and then change all \n into \r\n + $value = str_replace(CRLF,LF,$value); // Make sure no \r\n sequences has entered in the meantime... + $value = str_replace(LF,CRLF,$value); // ... and then change all \n into \r\n } // Return value: @@ -832,7 +832,7 @@ // Traverse the blocks foreach($blockSplit as $k => $v) { $cc++; - $lastBR = $cc==$aC ? '' : chr(10); + $lastBR = $cc==$aC ? '' : LF; if ($k%2) { // Inside block: @@ -853,23 +853,23 @@ if (!isset($this->procOptions['typolist']) || $this->procOptions['typolist']) { $parts = $this->getAllParts($this->splitIntoBlock('LI',$this->removeFirstAndLastTag($blockSplit[$k])),1,0); while(list($k2)=each($parts)) { - $parts[$k2]=preg_replace('/['.preg_quote(chr(10).chr(13)).']+/','',$parts[$k2]); // remove all linesbreaks! + $parts[$k2]=preg_replace('/['.preg_quote(LF.CR).']+/','',$parts[$k2]); // remove all linesbreaks! $parts[$k2]=$this->defaultTStagMapping($parts[$k2],'db'); $parts[$k2]=$this->cleanFontTags($parts[$k2],0,0,0); $parts[$k2] = $this->HTMLcleaner_db($parts[$k2],strtolower($this->procOptions['allowTagsInTypolists']?$this->procOptions['allowTagsInTypolists']:'br,font,b,i,u,a,img,span,strong,em')); } if ($tagName=='ol') { $params=' type="1"'; } else { $params=''; } - $blockSplit[$k]=''.chr(10).implode(chr(10),$parts).chr(10).''.$lastBR; + $blockSplit[$k]=''.LF.implode(LF,$parts).LF.''.$lastBR; } } else { - $blockSplit[$k]=preg_replace('/['.preg_quote(chr(10).chr(13)).']+/',' ',$this->transformStyledATags($blockSplit[$k])).$lastBR; + $blockSplit[$k]=preg_replace('/['.preg_quote(LF.CR).']+/',' ',$this->transformStyledATags($blockSplit[$k])).$lastBR; } break; case 'table': // Tables are NOT allowed in any form (unless preserveTables is set or CSS is the mode) if (!$this->procOptions['preserveTables'] && !$css) { $blockSplit[$k]=$this->TS_transform_db($this->removeTables($blockSplit[$k])); } else { - $blockSplit[$k]=preg_replace('/['.preg_quote(chr(10).chr(13)).']+/',' ',$this->transformStyledATags($blockSplit[$k])).$lastBR; + $blockSplit[$k]=preg_replace('/['.preg_quote(LF.CR).']+/',' ',$this->transformStyledATags($blockSplit[$k])).$lastBR; } break; case 'h1': @@ -904,17 +904,17 @@ } } else { // Eliminate true linebreaks inside Hx tags - $blockSplit[$k]=preg_replace('/['.preg_quote(chr(10).chr(13)).']+/',' ',$this->transformStyledATags($blockSplit[$k])).$lastBR; + $blockSplit[$k]=preg_replace('/['.preg_quote(LF.CR).']+/',' ',$this->transformStyledATags($blockSplit[$k])).$lastBR; } break; default: // Eliminate true linebreaks inside other headlist tags and after hr tag - $blockSplit[$k]=preg_replace('/['.preg_quote(chr(10).chr(13)).']+/',' ',$this->transformStyledATags($blockSplit[$k])).$lastBR; + $blockSplit[$k]=preg_replace('/['.preg_quote(LF.CR).']+/',' ',$this->transformStyledATags($blockSplit[$k])).$lastBR; break; } } else { // NON-block: if (strcmp(trim($blockSplit[$k]),'')) { - $blockSplit[$k]=$this->divideIntoLines(preg_replace('/['.preg_quote(chr(10).chr(13)).']+/',' ',$blockSplit[$k])).$lastBR; + $blockSplit[$k]=$this->divideIntoLines(preg_replace('/['.preg_quote(LF.CR).']+/',' ',$blockSplit[$k])).$lastBR; $blockSplit[$k]=$this->transformStyledATags($blockSplit[$k]); } else unset($blockSplit[$k]); } @@ -982,12 +982,12 @@ 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 = preg_replace('/^[ ]*'.chr(10).'/','',$tListContent); - $tListContent = preg_replace('/'.chr(10).'[ ]*$/','',$tListContent); - $lines = explode(chr(10),$tListContent); + $tListContent = preg_replace('/^[ ]*'.LF.'/','',$tListContent); + $tListContent = preg_replace('/'.LF.'[ ]*$/','',$tListContent); + $lines = explode(LF,$tListContent); $typ = $attribArray['type']==1 ? 'ol' : 'ul'; - $blockSplit[$k] = '<'.$typ.'>'.chr(10). - '
  • '.implode('
  • '.chr(10).'
  • ',$lines).'
  • '. + $blockSplit[$k] = '<'.$typ.'>'.LF. + '
  • '.implode('
  • '.LF.'
  • ',$lines).'
  • '. ''; } break; @@ -1004,12 +1004,12 @@ } break; } - $blockSplit[$k+1] = preg_replace('/^[ ]*'.chr(10).'/','',$blockSplit[$k+1]); // Removing linebreak if typohead + $blockSplit[$k+1] = preg_replace('/^[ ]*'.LF.'/','',$blockSplit[$k+1]); // Removing linebreak if typohead } else { // NON-block: $nextFTN = $this->getFirstTagName($blockSplit[$k+1]); - $singleLineBreak = $blockSplit[$k]==chr(10); + $singleLineBreak = $blockSplit[$k]==LF; if (t3lib_div::inList('TABLE,BLOCKQUOTE,TYPOLIST,TYPOHEAD,'.($this->procOptions['preserveDIVSections']?'DIV,':'').$this->blockElementList,$nextFTN)) { // Removing linebreak if typolist/typohead - $blockSplit[$k] = preg_replace('/'.chr(10).'[ ]*$/','',$blockSplit[$k]); + $blockSplit[$k] = preg_replace('/'.LF.'[ ]*$/','',$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) { @@ -1019,7 +1019,7 @@ } } } - return implode(chr(10),$blockSplit); + return implode(LF,$blockSplit); } /** @@ -1205,7 +1205,7 @@ } /** - * This resolves the $value into parts based on
    -sections and

    -sections and
    -tags. These are returned as lines separated by chr(10). + * This resolves the $value into parts based on

    -sections and

    -sections and
    -tags. These are returned as lines separated by LF. * This point is to resolve the HTML-code returned from RTE into ordinary lines so it's 'human-readable' * The function ->setDivTags does the opposite. * This function processes content to go into the database. @@ -1296,7 +1296,7 @@ } // Remove any line break char (10 or 13) - $subLines[$sk]=preg_replace('/'.chr(10).'|'.chr(13).'/','',$subLines[$sk]); + $subLines[$sk]=preg_replace('/'.LF.'|'.CR.'/','',$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')) { @@ -1307,7 +1307,7 @@ } } // Add the processed line(s) - $divSplit[$k] = implode(chr(10),$subLines); + $divSplit[$k] = implode(LF,$subLines); // If it turns out the line is just blank (containing a   possibly) then just make it pure blank. // But, prevent filtering of lines that are blank in sense above, but whose tags contain attributes. @@ -1323,7 +1323,7 @@ } // Return value: - return $returnArray ? $divSplit : implode(chr(10),$divSplit); + return $returnArray ? $divSplit : implode(LF,$divSplit); } /** @@ -1343,8 +1343,8 @@ $hSC = $this->procOptions['dontHSC_rte'] ? 0 : 1; // Default: re-convert literals to characters (that is < to <) $convNBSP = !$this->procOptions['dontConvAmpInNBSP_rte']?1:0; - // Divide the content into lines, based on chr(10): - $parts = explode(chr(10),$value); + // Divide the content into lines, based on LF: + $parts = explode(LF,$value); foreach($parts as $k => $v) { // Processing of line content: @@ -1366,7 +1366,7 @@ } // Implode result: - return implode(chr(10),$parts); + return implode(LF,$parts); } /** Index: t3lib/class.t3lib_div.php =================================================================== --- t3lib/class.t3lib_div.php (revision 6200) +++ t3lib/class.t3lib_div.php (working copy) @@ -646,12 +646,12 @@ public static function breakTextForEmail($str,$implChar="\n",$charWidth=76) { self::logDeprecatedFunction(); - $lines = explode(chr(10),$str); + $lines = explode(LF,$str); $outArr=array(); foreach ($lines as $lStr) { $outArr[] = t3lib_div::breakLinesForEmail($lStr,$implChar,$charWidth); } - return implode(chr(10),$outArr); + return implode(LF,$outArr); } /** @@ -1518,7 +1518,7 @@ * @return string Formatted for '; + $out.='

    '; // USER extension (prefixed "user_") $out.='
    @@ -1089,7 +1089,7 @@ // debug($row); } - return '
    '.implode(chr(10),$lines).'
    '; + return '
    '.implode(LF,$lines).'
    '; } /** Index: t3lib/class.t3lib_tsparser_ext.php =================================================================== --- t3lib/class.t3lib_tsparser_ext.php (revision 6200) +++ t3lib/class.t3lib_tsparser_ext.php (working copy) @@ -466,7 +466,7 @@ if (!is_array($this->lnToScript)) { $this->lnToScript = array(); $c=1; - $c+=substr_count($GLOBALS['TYPO3_CONF_VARS']['FE']['defaultTypoScript_setup'],chr(10))+2; + $c+=substr_count($GLOBALS['TYPO3_CONF_VARS']['FE']['defaultTypoScript_setup'],LF)+2; $this->lnToScript[$c] = '[Default]'; foreach($this->hierarchyInfoToRoot as $info) { @@ -681,11 +681,11 @@ $all=''; reset($config); while (list(,$str)=each($config)) { - $all .= chr(10) .'[GLOBAL]' . chr(10) . $str; + $all .= LF .'[GLOBAL]' . LF . $str; } if ($syntaxHL) { - $all = preg_replace('/^[^'.chr(10).']*./','',$all); + $all = preg_replace('/^[^'.LF.']*./','',$all); $all = chop($all); $tsparser = t3lib_div::makeInstance('t3lib_TSparser'); $tsparser->lineNumberOffset=$this->ext_lineNumberOffset+1; @@ -738,9 +738,9 @@ * @return [type] ... */ function ext_formatTS($input, $ln, $comments=1, $crop=0) { - $input = preg_replace('/^[^'.chr(10).']*./','',$input); + $input = preg_replace('/^[^'.LF.']*./','',$input); $input = chop($input); - $cArr = explode(chr(10),$input); + $cArr = explode(LF,$input); reset($cArr); $n = ceil(log10(count($cArr)+$this->ext_lineNumberOffset)); @@ -823,7 +823,7 @@ while(list($const,$value)=each($this->flatSetup)) { if (substr($const,-2)!='..' && isset($this->flatSetup[$const.'..'])) { $comment = trim($this->flatSetup[$const.'..']); - $c_arr = explode(chr(10),$comment); + $c_arr = explode(LF,$comment); while(list($k,$v)=each($c_arr)) { $line=trim(preg_replace('/^[#\/]*/','',$v)); if ($line) { @@ -1428,7 +1428,7 @@ */ function ext_regObjectPositions($constants) { // This runs through the lines of the constants-field of the active template and registers the constants-names and linepositions in an array, $this->objReg - $this->raw = explode(chr(10),$constants); + $this->raw = explode(LF,$constants); $this->rawP=0; $this->objReg=array(); // resetting the objReg if the divider is found!! @@ -1575,7 +1575,7 @@ while(list($key,$var)=each($data)) { if (isset($theConstants[$key])) { if ($this->ext_dontCheckIssetValues || isset($check[$key])) { // If checkbox is set, update the value - list($var) = explode(chr(10),$var); // exploding with linebreak, just to make sure that no multiline input is given! + list($var) = explode(LF,$var); // exploding with linebreak, just to make sure that no multiline input is given! $typeDat=$this->ext_getTypeData($theConstants[$key]['type']); switch($typeDat['type']) { case 'int': Index: t3lib/class.t3lib_befunc.php =================================================================== --- t3lib/class.t3lib_befunc.php (revision 6200) +++ t3lib/class.t3lib_befunc.php (working copy) @@ -1333,7 +1333,7 @@ } // Parsing the page TS-Config (or getting from cache) - $pageTS = implode(chr(10) . '[GLOBAL]' . chr(10), $TSdataArray); + $pageTS = implode(LF . '[GLOBAL]' . LF, $TSdataArray); if ($GLOBALS['TYPO3_CONF_VARS']['BE']['TSconfigConditions']) { /* @var $parseObj t3lib_TSparser_TSconfig */ $parseObj = t3lib_div::makeInstance('t3lib_TSparser_TSconfig'); @@ -1398,7 +1398,7 @@ if (count($set)) { // Get page record and TS config lines $pRec = t3lib_befunc::getRecord('pages', $id); - $TSlines = explode(chr(10), $pRec['TSconfig']); + $TSlines = explode(LF, $pRec['TSconfig']); $TSlines = array_reverse($TSlines); // Reset the set of changes. reset($set); @@ -1421,7 +1421,7 @@ $TSlines = array_reverse($TSlines); // store those changes - $TSconf = implode(chr(10), $TSlines); + $TSconf = implode(LF, $TSlines); $GLOBALS['TYPO3_DB']->exec_UPDATEquery('pages', 'uid='.intval($id), array('TSconfig' => $TSconf)); } @@ -1608,7 +1608,7 @@ */ public static function daysUntil($tstamp) { $delta_t = $tstamp-$GLOBALS['EXEC_TIME']; - return ceil($delta_t/(3600*24)); + return ceil($delta_t/(ONE_DAY)); } /** @@ -1635,7 +1635,7 @@ /** * Returns $value (in seconds) formatted as hh:mm:ss - * For instance $value = 3600 + 60*2 + 3 should return "01:02:03" + * For instance $value = ONE_HOUR + 60*2 + 3 should return "01:02:03" * Usage: 1 (class t3lib_BEfunc) * * @param integer Time stamp, seconds @@ -1643,9 +1643,9 @@ * @return string Formatted time */ public static function time($value, $withSeconds = TRUE) { - $hh = floor($value/3600); - $min = floor(($value-$hh*3600)/60); - $sec = $value-$hh*3600-$min*60; + $hh = floor($value/ONE_HOUR); + $min = floor(($value-$hh*ONE_HOUR)/60); + $sec = $value-$hh*ONE_HOUR-$min*60; $l = sprintf('%02d', $hh).':'.sprintf('%02d', $min); if ($withSeconds) { $l .= ':'.sprintf('%02d', $sec); @@ -1665,14 +1665,14 @@ $labelArr = explode('|', $labels); $prefix = ''; if ($seconds<0) {$prefix = '-'; $seconds = abs($seconds);} - if ($seconds<3600) { + if ($secondsuser['uid']).' - AND sys_lockedrecords.tstamp > '.($GLOBALS['EXEC_TIME']-2*3600) + AND sys_lockedrecords.tstamp > '.($GLOBALS['EXEC_TIME']-2*ONE_HOUR) ); while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) { // Get the type of the user that locked this record: @@ -4301,7 +4301,7 @@ */ public static function processParams($params) { $paramArr = array(); - $lines = explode(chr(10), $params); + $lines = explode(LF, $params); while(list(,$val) = each($lines)) { $val = trim($val); if ($val) { Index: t3lib/config_default.php =================================================================== --- t3lib/config_default.php (revision 6200) +++ t3lib/config_default.php (working copy) @@ -201,7 +201,7 @@ 'warning_email_addr' => '', // Email-address that will receive a warning if there has been failed logins 4 times within an hour (all users). 'warning_mode' => '', // Bit 1: If set, warning_email_addr gets a mail everytime a user logs in. Bit 2: If set, a mail is sent if an ADMIN user logs in! Other bits reserved for future options. 'lockIP' => 4, // Integer (0-4). Session IP locking for backend users. See [FE][lockIP] for details. Default is 4 (which is locking the FULL IP address to session). - 'sessionTimeout' => 3600, // Integer, seconds. Session time out for backend users. Default is 3600 seconds = 1 hour. + 'sessionTimeout' => ONE_HOUR, // Integer, seconds. Session time out for backend users. Default is 3600 seconds = 1 hour. 'IPmaskList' => '', // String. Lets you define a list of IP-numbers (with *-wildcards) that are the ONLY ones allowed access to ANY backend activity. On error an error header is sent and the script exits. Works like IP masking for users configurable through TSconfig. See syntax for that (or look up syntax for the function t3lib_div::cmpIP()) 'lockBeUserToDBmounts' => 1, // Boolean. If set, the backend user is allowed to work only within his page-mount. It's advisable to leave this on because it makes security easy to manage. 'lockSSL' => 0, // Int. 0,1,2,3: If set (1,2,3), the backend can only be operated from an ssl-encrypted connection (https). Set to 2 you will be redirected to the https admin-url supposed to be the http-url, but with https scheme instead. If set to 3, only the login is forced to SSL, then the user switches back to non-SSL-mode @@ -308,7 +308,7 @@ 'lockIP' => 2, // Integer (0-4). If >0, fe_users are locked to (a part of) their REMOTE_ADDR IP for their session. Enhances security but may throw off users that may change IP during their session (in which case you can lower it to 2 or 3). The integer indicates how many parts of the IP address to include in the check. Reducing to 1-3 means that only first, second or third part of the IP address is used. 4 is the FULL IP address and recommended. 0 (zero) disables checking of course. 'loginSecurityLevel' => '', // See description for TYPO3_CONF_VARS[BE][loginSecurityLevel]. Default state for frontend is "normal". Alternative authentication services can implement higher levels if preferred. For example, "rsa" level uses RSA password encryption (only if the rsaauth extension is installed) 'lifetime' => 0, // Integer, positive. If >0, the cookie of FE users will have a lifetime of the number of seconds this value indicates. Otherwise it will be a session cookie (deleted when browser is shut down). Setting this value to 604800 will result in automatic login of FE users during a whole week, 86400 will keep the FE users logged in for a day. - 'sessionDataLifetime' => 86400, // Integer, positive. If >0, the session data will timeout and be removed after the number of seconds given (86400 seconds represents 24 hours). + 'sessionDataLifetime' => ONE_DAY, // Integer, positive. If >0, the session data will timeout and be removed after the number of seconds given (86400 seconds represents 24 hours). 'permalogin' => 2, // Integer. -1: Permanent login for FE users disabled. 0: By default permalogin is disabled for FE users but can be enabled by a form control in the login form. 1: Permanent login is by default enabled but can be disabled by a form control in the login form. // 2: Permanent login is forced to be enabled. // In any case, permanent login is only possible if TYPO3_CONF_VARS[FE][lifetime] lifetime is > 0. 'maxSessionDataSize' => 10000, // Integer. Setting the maximum size (bytes) of frontend session data stored in the table fe_session_data. Set to zero (0) means no limit, but this is not recommended since it also disables a check that session data is stored only if a confirmed cookie is set. 'lockHashKeyWords' => 'useragent', // Keyword list (Strings commaseparated). Currently only "useragent"; If set, then the FE user session is locked to the value of HTTP_USER_AGENT. This lowers the risk of session hi-jacking. However some cases (like payment gateways) might have to use the session cookie and in this case you will have to disable that feature (eg. with a blank string). Index: t3lib/class.t3lib_cs.php =================================================================== --- t3lib/class.t3lib_cs.php (revision 6200) +++ t3lib/class.t3lib_cs.php (working copy) @@ -987,7 +987,7 @@ $this->parsedCharsets[$charset]=unserialize(t3lib_div::getUrl($cacheFile)); } else { // Parse conversion table into lines: - $lines=t3lib_div::trimExplode(chr(10),t3lib_div::getUrl($charsetConvTableFile),1); + $lines=t3lib_div::trimExplode(LF,t3lib_div::getUrl($charsetConvTableFile),1); // Initialize the internal variable holding the conv. table: $this->parsedCharsets[$charset]=array('local'=>array(),'utf8'=>array()); // traverse the lines: Index: t3lib/class.t3lib_parsehtml.php =================================================================== --- t3lib/class.t3lib_parsehtml.php (revision 6200) +++ t3lib/class.t3lib_parsehtml.php (working copy) @@ -1235,11 +1235,11 @@ */ function indentLines($content, $number=1, $indentChar="\t") { $preTab = str_pad('', $number*strlen($indentChar), $indentChar); - $lines = explode(chr(10),str_replace(chr(13),'',$content)); + $lines = explode(LF,str_replace(CR,'',$content)); foreach ($lines as $k => $v) { $lines[$k] = $preTab.$v; } - return implode(chr(10), $lines); + return implode(LF, $lines); } /** Index: t3lib/class.gzip_encode.php =================================================================== --- t3lib/class.gzip_encode.php (revision 6200) +++ t3lib/class.gzip_encode.php (working copy) @@ -225,7 +225,7 @@ // By Kasper Skaarhoj, start if ($outputCompressedSizes) { - $contents.=chr(10).""; + $contents.=LF.""; $size = strlen($contents); // Must set again! } // By Kasper Skaarhoj, end Index: t3lib/class.t3lib_db.php =================================================================== --- t3lib/class.t3lib_db.php (revision 6200) +++ t3lib/class.t3lib_db.php (working copy) @@ -981,7 +981,7 @@ if (!$this->link) { t3lib_div::sysLog('Could not connect to MySQL server '.$TYPO3_db_host.' with user '.$TYPO3_db_username.': '.$error_msg,'Core',4); } else { - $setDBinit = t3lib_div::trimExplode(chr(10), $GLOBALS['TYPO3_CONF_VARS']['SYS']['setDBinit'],TRUE); + $setDBinit = t3lib_div::trimExplode(LF, $GLOBALS['TYPO3_CONF_VARS']['SYS']['setDBinit'],TRUE); foreach ($setDBinit as $v) { if (mysql_query($v, $this->link) === FALSE) { t3lib_div::sysLog('Could not initialize DB connection with query "'.$v.'": '.mysql_error($this->link),'Core',3); Index: t3lib/class.t3lib_refindex.php =================================================================== --- t3lib/class.t3lib_refindex.php (revision 6200) +++ t3lib/class.t3lib_refindex.php (working copy) @@ -715,7 +715,7 @@ // Return errors if any: if (count($tce->errorLog)) { - return chr(10).'TCEmain:'.implode(chr(10).'TCEmain:',$tce->errorLog); + return LF.'TCEmain:'.implode(LF.'TCEmain:',$tce->errorLog); } } } @@ -1007,9 +1007,9 @@ $headerContent = $testOnly ? 'Reference Index being TESTED (nothing written, use "-e" to update)' : 'Reference Index being Updated'; if ($cli_echo) echo - '*******************************************'.chr(10). - $headerContent.chr(10). - '*******************************************'.chr(10); + '*******************************************'.LF. + $headerContent.LF. + '*******************************************'.LF; // Traverse all tables: foreach ($TCA as $tableName => $cfg) { @@ -1028,7 +1028,7 @@ if ($result['addedNodes'] || $result['deletedNodes']) { $Err = 'Record '.$tableName.':'.$recdat['uid'].' had '.$result['addedNodes'].' added indexes and '.$result['deletedNodes'].' deleted indexes'; $errors[]= $Err; - if ($cli_echo) echo $Err.chr(10); + if ($cli_echo) echo $Err.LF; #$errors[] = t3lib_div::view_array($result); } } @@ -1039,7 +1039,7 @@ if (count($lostIndexes)) { $Err = 'Table '.$tableName.' has '.count($lostIndexes).' lost indexes which are now deleted'; $errors[]= $Err; - if ($cli_echo) echo $Err.chr(10); + if ($cli_echo) echo $Err.LF; if (!$testOnly) $TYPO3_DB->exec_DELETEquery('sys_refindex',$where); } } @@ -1050,14 +1050,14 @@ if (count($lostTables)) { $Err = 'Index table hosted '.count($lostTables).' indexes for non-existing tables, now removed'; $errors[]= $Err; - if ($cli_echo) echo $Err.chr(10); + if ($cli_echo) echo $Err.LF; if (!$testOnly) $TYPO3_DB->exec_DELETEquery('sys_refindex',$where); } - $testedHowMuch = $recCount.' records from '.$tableCount.' tables were checked/updated.'.chr(10); + $testedHowMuch = $recCount.' records from '.$tableCount.' tables were checked/updated.'.LF; - $bodyContent = $testedHowMuch.(count($errors)?implode(chr(10),$errors):'Index Integrity was perfect!'); - if ($cli_echo) echo $testedHowMuch.(count($errors)?'Updates: '.count($errors):'Index Integrity was perfect!').chr(10); + $bodyContent = $testedHowMuch.(count($errors)?implode(LF,$errors):'Index Integrity was perfect!'); + if ($cli_echo) echo $testedHowMuch.(count($errors)?'Updates: '.count($errors):'Index Integrity was perfect!').LF; return array($headerContent,$bodyContent,count($errors)); } Index: t3lib/class.t3lib_fullsearch.php =================================================================== --- t3lib/class.t3lib_fullsearch.php (revision 6200) +++ t3lib/class.t3lib_fullsearch.php (working copy) @@ -143,7 +143,7 @@ $TDparams=' nowrap="nowrap" class="bgColor4"'; $tmpCode=' - +
    doc->formWidth().'>
    '; @@ -439,7 +439,7 @@ } } if (count($rowArr)) { - $out.=''.$this->resultRowTitles($lrow, $TCA[$table], $table).implode(chr(10), $rowArr).'
    '; + $out.=''.$this->resultRowTitles($lrow, $TCA[$table], $table).implode(LF, $rowArr).'
    '; } if (!$out) $out='No rows selected!'; $cPR['header']='Result'; @@ -456,7 +456,7 @@ $rowArr[]=$this->csvValues($row, ',', '"', $TCA[$table], $table); } if (count($rowArr)) { - $out.=''; + $out.=''; if (!$this->noDownloadB) { $out.='
    '; // document.forms[0].target=\'_blank\'; } @@ -466,7 +466,7 @@ $mimeType = 'application/octet-stream'; header('Content-Type: '.$mimeType); header('Content-Disposition: attachment; filename='.$filename); - echo implode(chr(13).chr(10),$rowArr); + echo implode(CRLF,$rowArr); exit; } } @@ -598,7 +598,7 @@ $rowArr[]=$this->resultRowDisplay($row,$conf,$table); $lrow=$row; } - $out.=''.$this->resultRowTitles($lrow,$conf,$table).implode(chr(10),$rowArr).'
    '; + $out.=''.$this->resultRowTitles($lrow,$conf,$table).implode(LF,$rowArr).'
    '; } $out.='
    '; } Index: typo3/template.php =================================================================== --- typo3/template.php (revision 6200) +++ typo3/template.php (working copy) @@ -707,19 +707,19 @@ if ($this->docType !== 'html_3') { // Put the XML prologue before or after the doctype declaration according to browser if ($browserInfo['browser'] === 'msie' && $browserInfo['version'] < 7) { - $headerStart = $headerStart . chr(10) . $xmlPrologue; + $headerStart = $headerStart . LF . $xmlPrologue; } else { - $headerStart = $xmlPrologue . chr(10) . $headerStart; + $headerStart = $xmlPrologue . LF . $headerStart; } // Add the xml stylesheet according to doctype if ($this->docType !== 'xhtml_frames') { - $headerStart = $headerStart . chr(10) . $xmlStylesheet; + $headerStart = $headerStart . LF . $xmlStylesheet; } } $this->pageRenderer->setXmlPrologAndDocType($headerStart); - $this->pageRenderer->setHeadTag('' . chr(10). ''); + $this->pageRenderer->setHeadTag('' . LF. ''); $this->pageRenderer->setCharSet($this->charset); $this->pageRenderer->addMetaTag($this->generator()); $this->pageRenderer->setTitle($title); @@ -993,7 +993,7 @@ $this->inDocStylesArray[] = $this->inDocStyles_TBEstyle; // Implode it all: - $inDocStyles = implode(chr(10), $this->inDocStylesArray); + $inDocStyles = implode(LF, $this->inDocStylesArray); if ($this->styleSheetFile) { $this->pageRenderer->addCssFile($this->backPath . $this->styleSheetFile); @@ -1002,7 +1002,7 @@ $this->pageRenderer->addCssFile($this->backPath . $this->styleSheetFile2); } - $this->pageRenderer->addCssInlineBlock('inDocStyles', $inDocStyles . chr(10) . '/*###POSTCSSMARKER###*/'); + $this->pageRenderer->addCssInlineBlock('inDocStyles', $inDocStyles . LF . '/*###POSTCSSMARKER###*/'); if ($this->styleSheetFile_post) { $this->pageRenderer->addCssFile($this->backPath . $this->styleSheetFile_post); } Index: typo3/init.php =================================================================== --- typo3/init.php (revision 6200) +++ typo3/init.php (working copy) @@ -163,6 +163,7 @@ } } +require_once(PATH_t3lib . 't3lib_constants.php'); // ************************************************* // t3lib_div + extention management class included Index: typo3/backend.php =================================================================== --- typo3/backend.php (revision 6200) +++ typo3/backend.php (working copy) @@ -217,9 +217,9 @@ foreach($this->jsFiles as $jsFile) { $GLOBALS['TBE_TEMPLATE']->loadJavascriptLib($jsFile); } - $GLOBALS['TBE_TEMPLATE']->JScode .= chr(10); + $GLOBALS['TBE_TEMPLATE']->JScode .= LF; $this->generateJavascript(); - $GLOBALS['TBE_TEMPLATE']->JScode .= $GLOBALS['TBE_TEMPLATE']->wrapScriptTags($this->js) . chr(10); + $GLOBALS['TBE_TEMPLATE']->JScode .= $GLOBALS['TBE_TEMPLATE']->wrapScriptTags($this->js) . LF; foreach($this->jsFilesAfterInline as $jsFile) { $GLOBALS['TBE_TEMPLATE']->JScode .= ' @@ -331,7 +331,7 @@ $pathTYPO3 = t3lib_div::dirname(t3lib_div::getIndpEnv('SCRIPT_NAME')).'/'; $goToModuleSwitch = $this->moduleMenu->getGotoModuleJavascript(); - $moduleFramesHelper = implode(chr(10), $this->moduleMenu->getFsMod()); + $moduleFramesHelper = implode(LF, $this->moduleMenu->getFsMod()); // If another page module was specified, replace the default Page module with the new one $newPageModule = trim($GLOBALS['BE_USER']->getTSConfigVal('options.overridePageModule')); Index: typo3/mod/tools/em/class.em_index.php =================================================================== --- typo3/mod/tools/em/class.em_index.php (revision 6200) +++ typo3/mod/tools/em/class.em_index.php (working copy) @@ -767,7 +767,7 @@ if(count($extensions)) { $lines[]='
    '; $lines[]=''.$this->listOrderTitle($this->MOD_SETTINGS['listOrder'],$catName).''; - $lines[] = implode(chr(10),$extensions); + $lines[] = implode(LF,$extensions); } } } @@ -828,7 +828,7 @@ if(count($extensions)) { $lines[]='
    '; $lines[]=''.$this->listOrderTitle($this->MOD_SETTINGS['listOrder'],$catName).''; - $lines[] = implode(chr(10),$extensions); + $lines[] = implode(LF,$extensions); } } @@ -838,7 +838,7 @@ @@ -966,7 +966,7 @@ $content.= ' - '.implode(chr(10),$lines).'
    '; + '.implode(LF,$lines).'
    '; $content .= '
    '.$this->browseLinks(); $content.= '

    '.$this->securityHint; $content .= '

    ' . $GLOBALS['LANG']->getLL('privacy_notice_header') . @@ -2337,7 +2337,7 @@ if(isset($submittedContent['file']) && !$GLOBALS['TYPO3_CONF_VARS']['EXT']['noEdit']) { // Check referer here? $oldFileContent = t3lib_div::getUrl($editFile); if($oldFileContent != $submittedContent['file']) { - $oldMD5 = md5(str_replace(chr(13),'',$oldFileContent)); + $oldMD5 = md5(str_replace(CR,'',$oldFileContent)); $info .= sprintf( $GLOBALS['LANG']->getLL('ext_details_md5_previous'), '' . $oldMD5 . '' @@ -2356,13 +2356,13 @@ '' . substr($editFile, strlen($absPath)) . ' (' . t3lib_div::formatSize(filesize($editFile)) . ')
    ' ); - $fileMD5 = md5(str_replace(chr(13),'',$fileContent)); + $fileMD5 = md5(str_replace(CR,'',$fileContent)); $info .= sprintf( $GLOBALS['LANG']->getLL('ext_details_md5_current'), '' . $fileMD5 . '' ) . '
    '; if($saveFlag) { - $saveMD5 = md5(str_replace(chr(13),'',$submittedContent['file'])); + $saveMD5 = md5(str_replace(CR,'',$submittedContent['file'])); $info .= sprintf( $GLOBALS['LANG']->getLL('ext_details_md5_submitted'), '' . $saveMD5 . '' @@ -3228,10 +3228,10 @@ return nl2br(trim((is_array($techInfo['tables']) ? ($tableHeader ? "\n\n" . $GLOBALS['LANG']->getLL('extDumpTables_tables') . "\n" : '') . - implode(chr(10), $techInfo['tables']) : '') . + implode(LF, $techInfo['tables']) : '') . (is_array($techInfo['static']) ? "\n\n" . $GLOBALS['LANG']->getLL('extBackup_static_tables') . "\n" . - implode(chr(10), $techInfo['static']) : ''). + implode(LF, $techInfo['static']) : ''). (is_array($techInfo['fields']) ? "\n\n" . $GLOBALS['LANG']->getLL('extInfoArray_additional_fields') . "\n" . implode('
    ', $techInfo['fields']) : ''))); @@ -4171,7 +4171,7 @@ if (preg_match('/\n[[:space:]]*class[[:space:]]*([[:alnum:]_]+)([[:alnum:][:space:]_]*)/',$fContent,$reg)) { // Find classes: - $lines = explode(chr(10),$fContent); + $lines = explode(LF,$fContent); foreach($lines as $l) { $line = trim($l); unset($reg); @@ -4232,7 +4232,7 @@ * @see writeTYPO3_MOD_PATH() */ function modConfFileAnalysis($confFilePath) { - $lines = explode(chr(10),t3lib_div::getUrl($confFilePath)); + $lines = explode(LF,t3lib_div::getUrl($confFilePath)); $confFileInfo = array(); $confFileInfo['lines'] = $lines; $reg = array(); @@ -4397,7 +4397,7 @@ } else $errors[] = $GLOBALS['LANG']->getLL('rmExtDir_error_unallowed_path') . ' ' . $removePath; // Return errors if any: - return implode(chr(10),$errors); + return implode(LF,$errors); } /** @@ -4543,7 +4543,7 @@ * @see modConfFileAnalysis() */ function writeTYPO3_MOD_PATH($confFilePath,$type,$mP) { - $lines = explode(chr(10),t3lib_div::getUrl($confFilePath)); + $lines = explode(LF,t3lib_div::getUrl($confFilePath)); $confFileInfo = array(); $confFileInfo['lines'] = $lines; $reg = array(); @@ -4568,7 +4568,7 @@ } if ($flag_B && $flag_M) { - t3lib_div::writeFile($confFilePath,implode(chr(10),$lines)); + t3lib_div::writeFile($confFilePath,implode(LF,$lines)); return sprintf($GLOBALS['LANG']->getLL('writeModPath_ok'), substr($confFilePath, strlen(PATH_site))); } else return $GLOBALS["TBE_TEMPLATE"]->rfw( @@ -4721,7 +4721,7 @@ $EM_CONF[$_EXTKEY] = '.$this->arrayToCode($EM_CONF, 0).'; ?>'; - return str_replace(chr(13), '', $code); + return str_replace(CR, '', $code); } /** @@ -4733,17 +4733,17 @@ * @return unknown */ function arrayToCode($array, $level=0) { - $lines = 'array('.chr(10); + $lines = 'array('.LF; $level++; foreach($array as $k => $v) { if(strlen($k) && is_array($v)) { - $lines .= str_repeat(chr(9),$level)."'".$k."' => ".$this->arrayToCode($v, $level); + $lines .= str_repeat(TAB,$level)."'".$k."' => ".$this->arrayToCode($v, $level); } elseif(strlen($k)) { - $lines .= str_repeat(chr(9),$level)."'".$k."' => ".(t3lib_div::testInt($v) ? intval($v) : "'".t3lib_div::slashJS(trim($v),1)."'").','.chr(10); + $lines .= str_repeat(TAB,$level)."'".$k."' => ".(t3lib_div::testInt($v) ? intval($v) : "'".t3lib_div::slashJS(trim($v),1)."'").','.LF; } } - $lines .= str_repeat(chr(9),$level-1).')'.($level-1==0 ? '':','.chr(10)); + $lines .= str_repeat(TAB,$level-1).')'.($level-1==0 ? '':','.LF); return $lines; } @@ -4794,7 +4794,7 @@ 'content' => t3lib_div::getUrl($file) ); if (t3lib_div::inList('php,inc',strtolower($fI['extension']))) { - $uploadArray['FILES'][$relFileName]['codelines']=count(explode(chr(10),$uploadArray['FILES'][$relFileName]['content'])); + $uploadArray['FILES'][$relFileName]['codelines']=count(explode(LF,$uploadArray['FILES'][$relFileName]['content'])); $uploadArray['misc']['codelines']+=$uploadArray['FILES'][$relFileName]['codelines']; $uploadArray['misc']['codebytes']+=$uploadArray['FILES'][$relFileName]['size']; @@ -5626,7 +5626,7 @@ } // Return result: - return implode(chr(10).chr(10).chr(10),$tables); + return implode(LF.LF.LF,$tables); } /** @@ -5650,9 +5650,9 @@ $header = $this->dumpTableHeader($table,$dbFields[$table],1); $insertStatements = $this->dumpTableContent($table,$dbFields[$table]['fields']); - $out.= $dHeader.chr(10).chr(10).chr(10). - $header.chr(10).chr(10).chr(10). - $insertStatements.chr(10).chr(10).chr(10); + $out.= $dHeader.LF.LF.LF. + $header.LF.LF.LF. + $insertStatements.LF.LF.LF; } else { die($GLOBALS['LANG']->getLL('dumpStaticTables_table_not_found')); } @@ -5708,7 +5708,7 @@ # '.($dropTableIfExists ? 'DROP TABLE IF EXISTS '.$table.'; ' : '').'CREATE TABLE '.$table.' ( -'.implode(','.chr(10),$lines).' +'.implode(','.LF,$lines).' );' ); } @@ -5749,7 +5749,7 @@ $GLOBALS['TYPO3_DB']->sql_free_result($result); // Implode lines and return: - return implode(chr(10),$lines); + return implode(LF,$lines); } /** Index: typo3/sysext/cms/web_info/class.tx_cms_webinfo.php =================================================================== --- typo3/sysext/cms/web_info/class.tx_cms_webinfo.php (revision 6200) +++ typo3/sysext/cms/web_info/class.tx_cms_webinfo.php (working copy) @@ -125,7 +125,7 @@ $dblist->stat_codes[]='HITS_days:'.(-$a); } $timespan_b = mktime (0,0,0); - $timespan_e = mktime (0,0,0)-(30-1)*3600*24+1; + $timespan_e = mktime (0,0,0)-(30-1)*ONE_DAY+1; $header='
    '.sprintf($LANG->getLL('stat_period'),t3lib_BEfunc::date($timespan_b),t3lib_BEfunc::date($timespan_e)).'
    '; // Index: typo3/sysext/cms/ext_tables.php =================================================================== --- typo3/sysext/cms/ext_tables.php (revision 6200) +++ typo3/sysext/cms/ext_tables.php (working copy) @@ -293,11 +293,11 @@ array('LLL:EXT:cms/locallang_tca.xml:pages.cache_timeout.I.2', 300), array('LLL:EXT:cms/locallang_tca.xml:pages.cache_timeout.I.3', 900), array('LLL:EXT:cms/locallang_tca.xml:pages.cache_timeout.I.4', 1800), - array('LLL:EXT:cms/locallang_tca.xml:pages.cache_timeout.I.5', 3600), + array('LLL:EXT:cms/locallang_tca.xml:pages.cache_timeout.I.5', ONE_HOUR), array('LLL:EXT:cms/locallang_tca.xml:pages.cache_timeout.I.6', 14400), - array('LLL:EXT:cms/locallang_tca.xml:pages.cache_timeout.I.7', 86400), + array('LLL:EXT:cms/locallang_tca.xml:pages.cache_timeout.I.7', ONE_DAY), array('LLL:EXT:cms/locallang_tca.xml:pages.cache_timeout.I.8', 172800), - array('LLL:EXT:cms/locallang_tca.xml:pages.cache_timeout.I.9', 604800), + array('LLL:EXT:cms/locallang_tca.xml:pages.cache_timeout.I.9', ONE_WEEK), array('LLL:EXT:cms/locallang_tca.xml:pages.cache_timeout.I.10', 2678400) ), 'default' => '0' Index: typo3/sysext/cms/layout/class.tx_cms_layout.php =================================================================== --- typo3/sysext/cms/layout/class.tx_cms_layout.php (revision 6200) +++ typo3/sysext/cms/layout/class.tx_cms_layout.php (working copy) @@ -340,7 +340,7 @@ $fParts = explode(':',substr($field,5)); switch($fParts[0]) { case 'days': - $timespan = mktime (0,0,0)+intval($fParts[1])*3600*24; + $timespan = mktime (0,0,0)+intval($fParts[1])*ONE_DAY; $theData[$field]=' '.date('d',$timespan); break; default: @@ -1399,14 +1399,14 @@ $fParts = explode(':',substr($field,5)); switch($fParts[0]) { case 'days': - $timespan = mktime (0,0,0)+intval($fParts[1])*3600*24; + $timespan = mktime (0,0,0)+intval($fParts[1])*ONE_DAY; // Page hits $number = $GLOBALS['TYPO3_DB']->exec_SELECTcountRows( '*', 'sys_stat', $this->stat_select_field . '=' . intval($row['uid']) . ' AND tstamp >=' . intval($timespan) . - ' AND tstamp <' . intval($timespan + 3600 * 24) + ' AND tstamp <' . intval($timespan + ONE_DAY) ); if ($number) { // Sessions @@ -1415,7 +1415,7 @@ 'sys_stat', $this->stat_select_field.'='.intval($row['uid']).' AND tstamp>='.intval($timespan).' - AND tstamp<'.intval($timespan+3600*24).' + AND tstamp<'.intval($timespan+ONE_DAY).' AND surecookie!=""', 'surecookie' ); @@ -1916,7 +1916,7 @@ */ function infoGif($infoArr) { if (count($infoArr) && $this->tt_contentConfig['showInfo']) { - $out='backPath,'gfx/zoom2.gif','width="12" height="12"').' title="'.htmlspecialchars(implode(chr(10),$infoArr)).'" alt="" /> '; + $out='backPath,'gfx/zoom2.gif','width="12" height="12"').' title="'.htmlspecialchars(implode(LF,$infoArr)).'" alt="" /> '; return $out; } } @@ -2301,7 +2301,7 @@ * @return string Processed output. */ function wordWrapper($content,$max=50,$char=' -') { - $array = preg_split('/[ ' . chr(10) . ']/', $content); + $array = preg_split('/[ ' . LF . ']/', $content); foreach($array as $val) { if (strlen($val)>$max) { $content=str_replace($val,substr(chunk_split($val,$max,$char),0,-1),$content); @@ -2509,9 +2509,9 @@ // Last 10 days - $nextMidNight = mktime (0,0,0)+1*3600*24; + $nextMidNight = mktime (0,0,0)+1*ONE_DAY; - $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('count(*), FLOOR(('.$nextMidNight.'-tstamp)/(24*3600)) AS day', 'sys_stat', 'page_id='.intval($rec['uid']).' AND tstamp>'.($nextMidNight-10*24*3600), 'day'); + $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('count(*), FLOOR(('.$nextMidNight.'-tstamp)/(24*3600)) AS day', 'sys_stat', 'page_id='.intval($rec['uid']).' AND tstamp>'.($nextMidNight-10*ONE_DAY), 'day'); $days=array(); while($rrow = $GLOBALS['TYPO3_DB']->sql_fetch_row($res)) { $days[$rrow[1]] = $rrow[0]; @@ -2521,7 +2521,7 @@ $contentH=array(); for($a=9;$a>=0;$a--) { $headerH[]=' -  '.date('d',$nextMidNight-($a+1)*24*3600).' '; +  '.date('d',$nextMidNight-($a+1)*ONE_DAY).' '; $contentH[]=' '.($days[$a] ? intval($days[$a]) : '-').''; } @@ -2536,10 +2536,10 @@ // Last 24 hours - $nextHour = mktime (date('H'),0,0)+3600; + $nextHour = mktime (date('H'),0,0)+ONE_HOUR; $hours=16; - $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('count(*), FLOOR(('.$nextHour.'-tstamp)/3600) AS hours', 'sys_stat', 'page_id='.intval($rec['uid']).' AND tstamp>'.($nextHour-$hours*3600), 'hours'); + $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('count(*), FLOOR(('.$nextHour.'-tstamp)/ONE_HOUR) AS hours', 'sys_stat', 'page_id='.intval($rec['uid']).' AND tstamp>'.($nextHour-$hours*ONE_HOUR), 'hours'); $days=array(); while($rrow = $GLOBALS['TYPO3_DB']->sql_fetch_row($res)) { $days[$rrow[1]]=$rrow[0]; @@ -2549,7 +2549,7 @@ $contentH=array(); for($a=($hours-1);$a>=0;$a--) { $headerH[]=' -  '.intval(date('H',$nextHour-($a+1)*3600)).' '; +  '.intval(date('H',$nextHour-($a+1)*ONE_HOUR)).' '; $contentH[]=' '.($days[$a] ? intval($days[$a]) : '-').''; } @@ -2680,7 +2680,7 @@ if($fillEmptyContent && strstr($content, '><')) { $content = preg_replace('/(<[^ >]* )([^ >]*)([^>]*>)(<\/[^>]*>)/', '$1$2$3$2$4', $content); } - $content = preg_replace('//', chr(10), $content); + $content = preg_replace('//', LF, $content); return strip_tags($content); } Index: typo3/sysext/cms/layout/db_layout.php =================================================================== --- typo3/sysext/cms/layout/db_layout.php (revision 6200) +++ typo3/sysext/cms/layout/db_layout.php (working copy) @@ -892,7 +892,7 @@ if (count($tceforms->commentMessages)) { $content.=' '; } Index: typo3/sysext/cms/tslib/class.tslib_menu.php =================================================================== --- typo3/sysext/cms/tslib/class.tslib_menu.php (revision 6200) +++ typo3/sysext/cms/tslib/class.tslib_menu.php (working copy) @@ -1856,8 +1856,8 @@ if ($imgROInfo) { $theName = $this->imgNamePrefix.$this->I['uid'].$this->I['INPfix'].$pref; $name = ' '.$this->nameAttribute.'="'.$theName.'"'; - $GLOBALS['TSFE']->JSImgCode.= chr(10).$theName.'_n=new Image(); '.$theName.'_n.src = "'.$GLOBALS['TSFE']->absRefPrefix.$imgInfo[3].'"; '; - $GLOBALS['TSFE']->JSImgCode.= chr(10).$theName.'_h=new Image(); '.$theName.'_h.src = "'.$GLOBALS['TSFE']->absRefPrefix.$imgROInfo[3].'"; '; + $GLOBALS['TSFE']->JSImgCode.= LF.$theName.'_n=new Image(); '.$theName.'_n.src = "'.$GLOBALS['TSFE']->absRefPrefix.$imgInfo[3].'"; '; + $GLOBALS['TSFE']->JSImgCode.= LF.$theName.'_h=new Image(); '.$theName.'_h.src = "'.$GLOBALS['TSFE']->absRefPrefix.$imgROInfo[3].'"; '; } } $GLOBALS['TSFE']->imagesOnPage[]=$imgInfo[3]; @@ -2377,8 +2377,8 @@ $this->I['name'] = ' '.$this->nameAttribute.'="'.$this->I["theName"].'"'; $this->I['linkHREF']['onMouseover']=$this->WMfreezePrefix.'over(\''.$this->I['theName'].'\');'; $this->I['linkHREF']['onMouseout']=$this->WMfreezePrefix.'out(\''.$this->I['theName'].'\');'; - $GLOBALS['TSFE']->JSImgCode.= chr(10).$this->I['theName'].'_n=new Image(); '.$this->I['theName'].'_n.src = "'.$GLOBALS['TSFE']->absRefPrefix.$this->I['val']['output_file'].'"; '; - $GLOBALS['TSFE']->JSImgCode.= chr(10).$this->I['theName'].'_h=new Image(); '.$this->I['theName'].'_h.src = "'.$GLOBALS['TSFE']->absRefPrefix.$this->result['RO'][$key]['output_file'].'"; '; + $GLOBALS['TSFE']->JSImgCode.= LF.$this->I['theName'].'_n=new Image(); '.$this->I['theName'].'_n.src = "'.$GLOBALS['TSFE']->absRefPrefix.$this->I['val']['output_file'].'"; '; + $GLOBALS['TSFE']->JSImgCode.= LF.$this->I['theName'].'_h=new Image(); '.$this->I['theName'].'_h.src = "'.$GLOBALS['TSFE']->absRefPrefix.$this->result['RO'][$key]['output_file'].'"; '; $GLOBALS['TSFE']->imagesOnPage[]=$this->result['RO'][$key]['output_file']; $GLOBALS['TSFE']->setJS('mouseOver'); $this->extProc_RO($key); @@ -2947,7 +2947,7 @@ $levelConf['firstLabel'] = $this->mconf['firstLabelGeneral']; } if ($levelConf['firstLabel'] && $codeLines) { - $codeLines.= chr(10).$menuName.'.defTopTitle['.$count.'] = '.t3lib_div::quoteJSvalue($levelConf['firstLabel'], true).';'; + $codeLines.= LF.$menuName.'.defTopTitle['.$count.'] = '.t3lib_div::quoteJSvalue($levelConf['firstLabel'], true).';'; } return $codeLines; } Index: typo3/sysext/cms/tslib/class.tslib_fetce.php =================================================================== --- typo3/sysext/cms/tslib/class.tslib_fetce.php (revision 6200) +++ typo3/sysext/cms/tslib/class.tslib_fetce.php (working copy) @@ -102,7 +102,7 @@ while(list($table,$id_arr)=each($data)) { t3lib_div::loadTCA($table); if (is_array($id_arr)) { - $sep=$FEData[$table.'.']['separator']?$FEData[$table.'.']['separator']:chr(10); + $sep=$FEData[$table.'.']['separator']?$FEData[$table.'.']['separator']:LF; reset($id_arr); while(list($id,$field_arr)=each($id_arr)) { $this->newData[$table][$id]=Array(); Index: typo3/sysext/cms/tslib/class.tslib_pibase.php =================================================================== --- typo3/sysext/cms/tslib/class.tslib_pibase.php (revision 6200) +++ typo3/sysext/cms/tslib/class.tslib_pibase.php (working copy) @@ -561,7 +561,7 @@ $links[]=$this->cObj->wrap($this->pi_getLL('pi_list_browseresults_last','Last >>',$hscText),$wrapper['disabledLinkWrap']); } } - $theLinks = $this->cObj->wrap(implode(chr(10),$links),$wrapper['browseLinksWrap']); + $theLinks = $this->cObj->wrap(implode(LF,$links),$wrapper['browseLinksWrap']); } else { $theLinks = ''; } @@ -1053,14 +1053,14 @@ // TypoScript property .recursive is a int+ which determines how many levels down from the pids in the pid-list subpages should be included in the select. $pidList = $this->pi_getPidList($this->conf['pidList'],$this->conf['recursive']); if (is_array($mm_cat)) { - $query='FROM '.$table.','.$mm_cat['table'].','.$mm_cat['mmtable'].chr(10). - ' WHERE '.$table.'.uid='.$mm_cat['mmtable'].'.uid_local AND '.$mm_cat['table'].'.uid='.$mm_cat['mmtable'].'.uid_foreign '.chr(10). - (strcmp($mm_cat['catUidList'],'')?' AND '.$mm_cat['table'].'.uid IN ('.$mm_cat['catUidList'].')':'').chr(10). - ' AND '.$table.'.pid IN ('.$pidList.')'.chr(10). - $this->cObj->enableFields($table).chr(10); // This adds WHERE-clauses that ensures deleted, hidden, starttime/endtime/access records are NOT selected, if they should not! Almost ALWAYS add this to your queries! + $query='FROM '.$table.','.$mm_cat['table'].','.$mm_cat['mmtable'].LF. + ' WHERE '.$table.'.uid='.$mm_cat['mmtable'].'.uid_local AND '.$mm_cat['table'].'.uid='.$mm_cat['mmtable'].'.uid_foreign '.LF. + (strcmp($mm_cat['catUidList'],'')?' AND '.$mm_cat['table'].'.uid IN ('.$mm_cat['catUidList'].')':'').LF. + ' AND '.$table.'.pid IN ('.$pidList.')'.LF. + $this->cObj->enableFields($table).LF; // This adds WHERE-clauses that ensures deleted, hidden, starttime/endtime/access records are NOT selected, if they should not! Almost ALWAYS add this to your queries! } else { - $query='FROM '.$table.' WHERE pid IN ('.$pidList.')'.chr(10). - $this->cObj->enableFields($table).chr(10); // This adds WHERE-clauses that ensures deleted, hidden, starttime/endtime/access records are NOT selected, if they should not! Almost ALWAYS add this to your queries! + $query='FROM '.$table.' WHERE pid IN ('.$pidList.')'.LF. + $this->cObj->enableFields($table).LF; // This adds WHERE-clauses that ensures deleted, hidden, starttime/endtime/access records are NOT selected, if they should not! Almost ALWAYS add this to your queries! } } @@ -1070,11 +1070,11 @@ $WHERE = trim($WHERE); // Add '$addWhere' - if ($addWhere) {$WHERE.=' '.$addWhere.chr(10);} + if ($addWhere) {$WHERE.=' '.$addWhere.LF;} // Search word: if ($this->piVars['sword'] && $this->internal['searchFieldList']) { - $WHERE.=$this->cObj->searchWhere($this->piVars['sword'],$this->internal['searchFieldList'],$table).chr(10); + $WHERE.=$this->cObj->searchWhere($this->piVars['sword'],$this->internal['searchFieldList'],$table).LF; } if ($count) { Index: typo3/sysext/cms/tslib/index_ts.php =================================================================== --- typo3/sysext/cms/tslib/index_ts.php (revision 6200) +++ typo3/sysext/cms/tslib/index_ts.php (working copy) @@ -80,6 +80,8 @@ // ********************* ob_start(); +require_once(PATH_t3lib . 't3lib_constants.php'); + // ********************* // Timetracking started // ********************* Index: typo3/sysext/cms/tslib/class.tslib_feuserauth.php =================================================================== --- typo3/sysext/cms/tslib/class.tslib_feuserauth.php (revision 6200) +++ typo3/sysext/cms/tslib/class.tslib_feuserauth.php (working copy) @@ -105,7 +105,7 @@ var $auth_timeout_field = 6000; // Server session lifetime. If > 0: session-timeout in seconds. If false or <0: no timeout. If string: The string is a fieldname from the usertable where the timeout can be found. var $lifetime = 0; // Client session lifetime. 0 = Session-cookies. If session-cookies, the browser will stop the session when the browser is closed. Otherwise this specifies the lifetime of a cookie that keeps the session. - protected $sessionDataLifetime = 86400; // Lifetime of session data in seconds. + protected $sessionDataLifetime = ONE_DAY; // Lifetime of session data in seconds. var $sendNoCacheHeaders = 0; var $getFallBack = 1; // If this is set, authentication is also accepted by the _GET. Notice that the identification is NOT 128bit MD5 hash but reduced. This is done in order to minimize the size for mobile-devices, such as WAP-phones var $getMethodEnabled = 1; // Login may be supplied by url. @@ -150,7 +150,7 @@ $this->sessionDataLifetime = intval($GLOBALS['TYPO3_CONF_VARS']['FE']['sessionDataLifetime']); if ($this->sessionDataLifetime <= 0) { - $this->sessionDataLifetime = 86400; + $this->sessionDataLifetime = ONE_DAY; } parent::start(); @@ -326,7 +326,7 @@ if (!$this->userTSUpdated) { // Parsing the user TS (or getting from cache) $this->TSdataArray = t3lib_TSparser::checkIncludeLines_array($this->TSdataArray); - $userTS = implode(chr(10).'[GLOBAL]'.chr(10),$this->TSdataArray); + $userTS = implode(LF.'[GLOBAL]'.LF,$this->TSdataArray); $parseObj = t3lib_div::makeInstance('t3lib_TSparser'); $parseObj->parse($userTS); $this->userTS = $parseObj->setup; Index: typo3/sysext/cms/tslib/class.tslib_content.php =================================================================== --- typo3/sysext/cms/tslib/class.tslib_content.php (revision 6200) +++ typo3/sysext/cms/tslib/class.tslib_content.php (working copy) @@ -907,7 +907,7 @@ if ($conf['captionSplit'] && $conf['captionSplit.']['cObject']) { $legacyCaptionSplit = 1; $capSplit = $this->stdWrap($conf['captionSplit.']['token'], $conf['captionSplit.']['token.']); - if (!$capSplit) {$capSplit=chr(10);} + if (!$capSplit) {$capSplit=LF;} $captionArray = explode($capSplit, $this->cObjGetSingle($conf['captionSplit.']['cObject'], $conf['captionSplit.']['cObject.'], 'captionSplit.cObject')); foreach ($captionArray as $ca_key => $ca_val) { $captionArray[$ca_key] = $this->stdWrap(trim($captionArray[$ca_key]), $conf['captionSplit.']['stdWrap.']); @@ -1729,7 +1729,7 @@ $dataArr = array(); // Getting the original config if (trim($data)) { - $data = str_replace(chr(10),'||',$data); + $data = str_replace(LF,'||',$data); $dataArr = explode('||',$data); } // Adding the new dataArray config form: @@ -1879,7 +1879,7 @@ } else { $wrap = $wrap ? ' wrap="'.$wrap.'"' : ' wrap="virtual"'; } - $default = $this->getFieldDefaultValue($conf['noValueInsert'], $confData['fieldname'], str_replace('\n',chr(10),trim($parts[2]))); + $default = $this->getFieldDefaultValue($conf['noValueInsert'], $confData['fieldname'], str_replace('\n',LF,trim($parts[2]))); $fieldCode=sprintf('', $confData['fieldname'], $elementIdAttribute, $cols, $rows, $wrap, $addParams, t3lib_div::formatForTextarea($default)); break; @@ -2616,7 +2616,7 @@ } // fetching params - $lines = explode(chr(10), $this->stdWrap($conf['params'],$conf['params.'])); + $lines = explode(LF, $this->stdWrap($conf['params'],$conf['params.'])); foreach ($lines as $l) { $parts = explode('=', $l); $parameter = strtolower(trim($parts[0])); @@ -2715,7 +2715,7 @@ //custom parameter entry $rawTS = $val['mmParamCustomEntry']; //read and merge - $tmp = t3lib_div::trimExplode(chr(10), $rawTS); + $tmp = t3lib_div::trimExplode(LF, $rawTS); if (count($tmp)) { foreach ($tmp as $tsLine) { if (substr($tsLine, 0, 1) != '#' && $pos = strpos($tsLine, '.')) { @@ -2797,7 +2797,7 @@ $paramsArray = array_merge((array) $typeConf['default.']['params.'], (array) $conf['params.'], $conf['predefined']); $conf['params']= ''; foreach ($paramsArray as $key => $value) { - $conf['params'] .= $key . '=' . $value . chr(10); + $conf['params'] .= $key . '=' . $value . LF; } $content = $this->MULTIMEDIA($conf); break; @@ -2954,10 +2954,10 @@ if (is_array($conf['params.'])) { t3lib_div::remapArrayKeys($conf['params.'], $typeConf['mapping.']['params.']); foreach ($conf['params.'] as $key => $value) { - $params .= $qtObject . '.addParam("' .$key . '", "' . $value . '");' . chr(10); + $params .= $qtObject . '.addParam("' .$key . '", "' . $value . '");' . LF; } } - $params = ($params ? substr($params, 0, -2) : '') . chr(10) . $qtObject . '.write("' . $replaceElementIdString . '");'; + $params = ($params ? substr($params, 0, -2) : '') . LF . $qtObject . '.write("' . $replaceElementIdString . '");'; $alternativeContent = $this->stdWrap($conf['alternativeContent'], $conf['alternativeContent.']); $layout = $this->stdWrap($conf['layout'], $conf['layout.']); @@ -3803,7 +3803,7 @@ $content=preg_replace("/\r?\n[\t ]*\r?\n/",$conf['doubleBrTag'],$content); } if ($conf['br']) {$content=nl2br($content);} - if ($conf['brTag']) {$content= str_replace(chr(10),$conf['brTag'],$content);} + if ($conf['brTag']) {$content= str_replace(LF,$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.']));} @@ -4182,13 +4182,13 @@ $parts = explode('|',$str); $output = - chr(10).str_pad('',$parts[0],chr(9)). + LF.str_pad('',$parts[0],TAB). ''. - chr(10).str_pad('',$parts[0]+1,chr(9)). + LF.str_pad('',$parts[0]+1,TAB). $content. - chr(10).str_pad('',$parts[0],chr(9)). + LF.str_pad('',$parts[0],TAB). ''. - chr(10).str_pad('',$parts[0]+1,chr(9)); + LF.str_pad('',$parts[0]+1,TAB); return $output; } @@ -4830,10 +4830,10 @@ $tagName=strtolower($htmlParser->getFirstTagName($v)); $cfg=$conf['externalBlocks.'][$tagName.'.']; if ($cfg['stripNLprev'] || $cfg['stripNL']) { - $parts[$k-1]=preg_replace('/'.chr(13).'?'.chr(10).'[ ]*$/', '', $parts[$k-1]); + $parts[$k-1]=preg_replace('/'.CR.'?'.LF.'[ ]*$/', '', $parts[$k-1]); } if ($cfg['stripNLnext'] || $cfg['stripNL']) { - $parts[$k+1]=preg_replace('/^[ ]*'.chr(13).'?'.chr(10).'/', '', $parts[$k+1]); + $parts[$k+1]=preg_replace('/^[ ]*'.CR.'?'.LF.'/', '', $parts[$k+1]); } } } @@ -4869,7 +4869,7 @@ $colParts[$kkk] = $htmlParser->removeFirstAndLastTag($vvv); if ($cfg['HTMLtableCells.'][$cc.'.']['callRecursive'] || (!isset($cfg['HTMLtableCells.'][$cc.'.']['callRecursive']) && $cfg['HTMLtableCells.']['default.']['callRecursive'])) { - if ($cfg['HTMLtableCells.']['addChr10BetweenParagraphs']) $colParts[$kkk]=str_replace('

    ','

    '.chr(10).'

    ',$colParts[$kkk]); + if ($cfg['HTMLtableCells.']['addChr10BetweenParagraphs']) $colParts[$kkk]=str_replace('

    ','

    '.LF.'

    ',$colParts[$kkk]); $colParts[$kkk] = $this->parseFunc($colParts[$kkk], $conf); } @@ -4953,7 +4953,7 @@ $data = substr($theValue,$pointer,$len); // $data is the content until the next 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] = 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]); + $contentAccum[$contentAccumP-1] = preg_replace('/'.CR.'?'.LF.'[ ]*$/', '', $contentAccum[$contentAccumP-1]); + $contentAccum[$contentAccumP] = preg_replace('/^[ ]*'.CR.'?'.LF.'/', '', $contentAccum[$contentAccumP]); + $contentAccum[$contentAccumP] = preg_replace('/'.CR.'?'.LF.'[ ]*$/', '', $contentAccum[$contentAccumP]); } $this->data[$this->currentValKey] = $contentAccum[$contentAccumP]; $newInput=$this->cObjGetSingle($theName,$theConf,'/parseFunc/.tags.'.$tag[0]); // fetch the content object @@ -5109,16 +5109,16 @@ } /** - * Lets you split the content by chr(10) and proces each line independently. Used to format content made with the RTE. + * Lets you split the content by LF and proces each line independently. Used to format content made with the RTE. * * @param string The input value * @param array TypoScript options - * @return string The processed input value being returned; Splitted lines imploded by chr(10) again. + * @return string The processed input value being returned; Splitted lines imploded by LF again. * @access private * @link http://typo3.org/doc.0.html?&tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=323&cHash=a19312be78 */ function encaps_lineSplit($theValue, $conf) { - $lParts = explode(chr(10),$theValue); + $lParts = explode(LF,$theValue); $encapTags = t3lib_div::trimExplode(',',strtolower($conf['encapsTagList']),1); $nonWrappedTag = $conf['nonWrappedTag']; @@ -5186,7 +5186,7 @@ $lParts[$k] = $str_content; } - return implode(chr(10),$lParts); + return implode(LF,$lParts); } /** @@ -5206,7 +5206,7 @@ $textstr = $textpieces[0]; $initP = '?id='.$GLOBALS['TSFE']->id.'&type='.$GLOBALS['TSFE']->type; for($i=1; $i<$pieces; $i++) { - $len=strcspn($textpieces[$i],chr(32).chr(9).chr(13).chr(10)); + $len=strcspn($textpieces[$i],chr(32).TAB.CRLF); if (trim(substr($textstr,-1))=='' && $len) { $lastChar=substr($textpieces[$i],$len-1,1); @@ -5276,7 +5276,7 @@ $textstr = $textpieces[0]; $initP = '?id='.$GLOBALS['TSFE']->id.'&type='.$GLOBALS['TSFE']->type; for($i=1; $i<$pieces; $i++) { - $len = strcspn($textpieces[$i],chr(32).chr(9).chr(13).chr(10)); + $len = strcspn($textpieces[$i],chr(32).TAB.CRLF); if (trim(substr($textstr,-1))=='' && $len) { $lastChar = substr($textpieces[$i],$len-1,1); if (!preg_match('/[A-Za-z0-9]/',$lastChar)) {$len--;} @@ -6634,7 +6634,7 @@ */ function processParams($params) { $paramArr=array(); - $lines=t3lib_div::trimExplode(chr(10),$params,1); + $lines=t3lib_div::trimExplode(LF,$params,1); foreach($lines as $val) { $pair = explode('=',$val,2); if (!t3lib_div::inList('#,/',substr(trim($pair[0]),0,1))) { @@ -6651,7 +6651,7 @@ * @return string Cleaned up string, keywords will be separated by a comma only. */ function keywords($content) { - $listArr = preg_split('/[,;' . chr(10) . ']/', $content); + $listArr = preg_split('/[,;' . LF . ']/', $content); foreach ($listArr as $k => $v) { $listArr[$k]=trim($v); } @@ -6775,12 +6775,12 @@ $emailContent = trim($msg); if ($emailContent) { - $parts = explode(chr(10), $emailContent, 2); // First line is subject + $parts = explode(LF, $emailContent, 2); // First line is subject $subject=trim($parts[0]); $plain_message=trim($parts[1]); - if ($recipients) $GLOBALS['TSFE']->plainMailEncoded($recipients, $subject, $plain_message, implode(chr(10),$headers)); - if ($cc) $GLOBALS['TSFE']->plainMailEncoded($cc, $subject, $plain_message, implode(chr(10),$headers)); + if ($recipients) $GLOBALS['TSFE']->plainMailEncoded($recipients, $subject, $plain_message, implode(LF,$headers)); + if ($cc) $GLOBALS['TSFE']->plainMailEncoded($cc, $subject, $plain_message, implode(LF,$headers)); return true; } } @@ -6942,7 +6942,7 @@ * @see gifBuilderTextBox() */ function linebreaks($string,$chars,$maxLines=0) { - $lines = explode(chr(10),$string); + $lines = explode(LF,$string); $lineArr=Array(); $c=0; foreach ($lines as $paragraph) { @@ -7995,16 +7995,16 @@ if (!$conf['src'] && !$typeNum) { $typeNum = -1; } - $content.='frameParams($conf,$typeNum).' />'.chr(10); + $content.='frameParams($conf,$typeNum).' />'.LF; break; case 'FRAMESET': $frameset = t3lib_div::makeInstance('tslib_frameset'); - $content.=$frameset->make($conf).chr(10); + $content.=$frameset->make($conf).LF; break; } } } - return 'framesetParams($setup).'>'.chr(10).$content.''; + return 'framesetParams($setup).'>'.LF.$content.''; } } @@ -8098,7 +8098,7 @@ // If width is defined AND there has been no change to the default table params, then extend them to a tablewidth of 1 if ($valPairs[4] && $this->default_tableParams==$this->tableParams) {$this->tableParams.=' width="1"';} // Init: - $this->begin = chr(10).'tableParams.'>'; + $this->begin = LF.'
    tableParams.'>'; $this->end = '
    '; $rows=array(); $widthImg = ''; @@ -8226,7 +8226,7 @@ if (!$rows && $cols) $rows=1; // If there are no rows in the middle but still som columns... if ($rows&&$cols) { - $res = chr(10).'tableParams.'>'; + $res = LF.'
    tableParams.'>'; // top offset: if ($offArr[1]) { $xoff = $offArr[0] ? 1 : 0; Index: typo3/sysext/cms/tslib/class.tslib_adminpanel.php =================================================================== --- typo3/sysext/cms/tslib/class.tslib_adminpanel.php (revision 6200) +++ typo3/sysext/cms/tslib/class.tslib_adminpanel.php (working copy) @@ -311,7 +311,7 @@ ' . ($this->extNeedUpdate ? '' : '') . ''; - $query = !t3lib_div::_GET('id') ? ('' . chr(10)) : ''; + $query = !t3lib_div::_GET('id') ? ('' . LF) : ''; // the dummy field is needed for Firefox: to force a page reload on submit with must change the form value with JavaScript (see "onsubmit" attribute of the "form" element") $query .= ''; foreach (t3lib_div::_GET() as $key => $value) { @@ -319,7 +319,7 @@ if (is_array($value)) { $query .= $this->getHiddenFields($key, $value); } else { - $query .= '' . chr(10); + $query .= '' . LF; } } } @@ -397,7 +397,7 @@ if (is_array($v)) { $out .= $this->getHiddenFields($key . '[' . $k . ']', $v); } else { - $out .= '' . chr(10); + $out .= '' . LF; } } return $out; Index: typo3/sysext/cms/tslib/media/scripts/tmenu_layers.php =================================================================== --- typo3/sysext/cms/tslib/media/scripts/tmenu_layers.php (revision 6200) +++ typo3/sysext/cms/tslib/media/scripts/tmenu_layers.php (working copy) @@ -375,7 +375,7 @@ GLV_timeout["'.$this->WMid.'"] = GLV_date.getTime(); GLV_timeoutRef["'.$this->WMid.'"] = '.t3lib_div::intInRange($this->mconf['hideMenuTimer'],0,20000).'; GLV_menuXY["'.$this->WMid.'"] = new Array(); -'.implode(chr(10),$this->WMxyArray).' +'.implode(LF,$this->WMxyArray).' '.$this->WMrestoreVars; if ($this->mconf['freezeMouseover']) { @@ -384,14 +384,14 @@ function GL'.$this->WMid.'_over(mitm_id) { GL'.$this->WMid.'_out(""); // removes any old roll over state of an item. Needed for alwaysKeep and Opera browsers. switch(mitm_id) { -'.implode(chr(10),$this->VMmouseoverActions).' +'.implode(LF,$this->VMmouseoverActions).' } GLV_currentROitem["'.$this->WMid.'"]=mitm_id; } function GL'.$this->WMid.'_out(mitm_id) { if (!mitm_id) mitm_id=GLV_currentROitem["'.$this->WMid.'"]; switch(mitm_id) { -'.implode(chr(10),$this->VMmouseoutActions).' +'.implode(LF,$this->VMmouseoutActions).' } } '; @@ -399,7 +399,7 @@ $GLOBALS["TSFE"]->JSCode.= ' function GL'.$this->WMid.'_getMouse(e) { if (GLV_menuOn["'.$this->WMid.'"]!=null && !GLV_dontFollowMouse["'.$this->WMid.'"]){ -'.implode(chr(10),$GLV_menuOn).' +'.implode(LF,$GLV_menuOn).' } GL_mouseMoveEvaluate("'.$this->WMid.'"); } @@ -407,7 +407,7 @@ '.$this->WMhideCode.' } function GL'.$this->WMid.'_doTop(WMid,id) { -'.trim(implode(chr(10),$DoTop)).' +'.trim(implode(LF,$DoTop)).' } function GL'.$this->WMid.'_restoreMenu() { '.$this->WMrestoreScript.' @@ -428,7 +428,7 @@ $GLOBALS['TSFE']->JSeventFuncCalls['onmousemove'][$this->WMid]= 'GL'.$this->WMid.'_getMouse(e);'; $GLOBALS['TSFE']->JSeventFuncCalls['onmouseup'][$this->WMid]= 'GL_mouseUp(\''.$this->WMid.'\',e);'; - $GLOBALS['TSFE']->divSection.=implode($this->divLayers,chr(10)).chr(10); + $GLOBALS['TSFE']->divSection.=implode($this->divLayers,LF).LF; return parent::extProc_finish(); } Index: typo3/sysext/cms/tslib/media/scripts/freesite_dummy_page_menu.php =================================================================== --- typo3/sysext/cms/tslib/media/scripts/freesite_dummy_page_menu.php (revision 6200) +++ typo3/sysext/cms/tslib/media/scripts/freesite_dummy_page_menu.php (working copy) @@ -55,7 +55,7 @@ $key = $row['uid']; $val = $row['title']; $content.= ''.$val.'
    '; - $specialComment.= '[globalVar= based_on_uid='.$key.']'.chr(10); + $specialComment.= '[globalVar= based_on_uid='.$key.']'.LF; } // Select subcategories of template folder. $page_res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'pages', 'pid='.intval($pid).' AND deleted=0 AND hidden=0 AND starttime=0 AND endtime=0 AND fe_group=0', '', 'sorting'); @@ -67,7 +67,7 @@ $key = $row['uid']; $val = $page_row['title'].' / '.$row['title']; $content.= ''.$val.'
    '; - $specialComment.= '[globalVar= based_on_uid='.$key.']'.chr(10); + $specialComment.= '[globalVar= based_on_uid='.$key.']'.LF; } } } Index: typo3/sysext/cms/tslib/media/scripts/gmenu_layers.php =================================================================== --- typo3/sysext/cms/tslib/media/scripts/gmenu_layers.php (revision 6200) +++ typo3/sysext/cms/tslib/media/scripts/gmenu_layers.php (working copy) @@ -375,7 +375,7 @@ GLV_timeout["'.$this->WMid.'"] = GLV_date.getTime(); GLV_timeoutRef["'.$this->WMid.'"] = '.t3lib_div::intInRange($this->mconf['hideMenuTimer'],0,20000).'; GLV_menuXY["'.$this->WMid.'"] = new Array(); -'.implode(chr(10),$this->WMxyArray).' +'.implode(LF,$this->WMxyArray).' '.$this->WMrestoreVars; if ($this->mconf['freezeMouseover']) { @@ -384,14 +384,14 @@ function GL'.$this->WMid.'_over(mitm_id) { GL'.$this->WMid.'_out(""); // removes any old roll over state of an item. Needed for alwaysKeep and Opera browsers. switch(mitm_id) { -'.implode(chr(10),$this->VMmouseoverActions).' +'.implode(LF,$this->VMmouseoverActions).' } GLV_currentROitem["'.$this->WMid.'"]=mitm_id; } function GL'.$this->WMid.'_out(mitm_id) { if (!mitm_id) mitm_id=GLV_currentROitem["'.$this->WMid.'"]; switch(mitm_id) { -'.implode(chr(10),$this->VMmouseoutActions).' +'.implode(LF,$this->VMmouseoutActions).' } } '; @@ -399,7 +399,7 @@ $GLOBALS["TSFE"]->JSCode.= ' function GL'.$this->WMid.'_getMouse(e) { if (GLV_menuOn["'.$this->WMid.'"]!=null && !GLV_dontFollowMouse["'.$this->WMid.'"]){ -'.implode(chr(10),$GLV_menuOn).' +'.implode(LF,$GLV_menuOn).' } GL_mouseMoveEvaluate("'.$this->WMid.'"); } @@ -407,7 +407,7 @@ '.$this->WMhideCode.' } function GL'.$this->WMid.'_doTop(WMid,id) { -'.trim(implode(chr(10),$DoTop)).' +'.trim(implode(LF,$DoTop)).' } function GL'.$this->WMid.'_restoreMenu() { '.$this->WMrestoreScript.' @@ -428,7 +428,7 @@ $GLOBALS['TSFE']->JSeventFuncCalls['onmousemove'][$this->WMid]= 'GL'.$this->WMid.'_getMouse(e);'; $GLOBALS['TSFE']->JSeventFuncCalls['onmouseup'][$this->WMid]= 'GL_mouseUp(\''.$this->WMid.'\',e);'; - $GLOBALS['TSFE']->divSection.=implode($this->divLayers,chr(10)).chr(10); + $GLOBALS['TSFE']->divSection.=implode($this->divLayers,LF).LF; return parent::extProc_finish(); } Index: typo3/sysext/cms/tslib/class.tslib_pagegen.php =================================================================== --- typo3/sysext/cms/tslib/class.tslib_pagegen.php (revision 6200) +++ typo3/sysext/cms/tslib/class.tslib_pagegen.php (working copy) @@ -302,7 +302,7 @@ } } - return array(count($functions)? implode(chr(10), $functions) . chr(10) . implode(chr(10), $setEvents) : '', $setBody); + return array(count($functions)? implode(LF, $functions) . LF . implode(LF, $setEvents) : '', $setBody); } /** @@ -452,7 +452,7 @@ // Adding doctype parts: if (count($docTypeParts)) { - $pageRenderer->setXmlPrologAndDocType(implode(chr(10), $docTypeParts)); + $pageRenderer->setXmlPrologAndDocType(implode(LF, $docTypeParts)); } // Begin header section: @@ -500,14 +500,14 @@ $temp_styleLines = array (); foreach ($GLOBALS['TSFE']->tmpl->setup['plugin.'] as $key => $iCSScode) { if (is_array($iCSScode) && $iCSScode['_CSS_DEFAULT_STYLE']) { - $temp_styleLines[] = '/* default styles for extension "' . substr($key, 0, - 1) . '" */' . chr(10) . $iCSScode['_CSS_DEFAULT_STYLE']; + $temp_styleLines[] = '/* default styles for extension "' . substr($key, 0, - 1) . '" */' . LF . $iCSScode['_CSS_DEFAULT_STYLE']; } } if (count($temp_styleLines)) { if ($GLOBALS['TSFE']->config['config']['inlineStyle2TempFile']) { - $pageRenderer->addCssFile(TSpagegen::inline2TempFile(implode(chr(10), $temp_styleLines), 'css')); + $pageRenderer->addCssFile(TSpagegen::inline2TempFile(implode(LF, $temp_styleLines), 'css')); } else { - $pageRenderer->addCssInlineBlock('TSFEinlineStyle', implode(chr(10), $temp_styleLines)); + $pageRenderer->addCssInlineBlock('TSFEinlineStyle', implode(LF, $temp_styleLines)); } } } @@ -874,7 +874,7 @@ if (is_array($GLOBALS['TSFE']->inlineJS)) { foreach ($GLOBALS['TSFE']->inlineJS as $key => $val) { if (! is_array($val)) { - $inlineJS .= chr(10) . $val . chr(10); + $inlineJS .= LF . $val . LF; } } } @@ -883,7 +883,7 @@ // Javascript inline code $inline = $GLOBALS['TSFE']->cObj->cObjGet($GLOBALS['TSFE']->pSetup['jsInline.'], 'jsInline.'); if ($inline) { - $inlineJS .= chr(10) . $inline . chr(10); + $inlineJS .= LF . $inline . LF; } // Javascript inline code for Footer @@ -965,12 +965,12 @@ // add header data block if ($GLOBALS['TSFE']->additionalHeaderData) { - $pageRenderer->addHeaderData(implode(chr(10), $GLOBALS['TSFE']->additionalHeaderData)); + $pageRenderer->addHeaderData(implode(LF, $GLOBALS['TSFE']->additionalHeaderData)); } // add footer data block if ($GLOBALS['TSFE']->additionalFooterData) { - $pageRenderer->addFooterData(implode(chr(10), $GLOBALS['TSFE']->additionalFooterData)); + $pageRenderer->addFooterData(implode(LF, $GLOBALS['TSFE']->additionalFooterData)); } // Header complete, now add content @@ -979,7 +979,7 @@ if ($GLOBALS['TSFE']->pSetup['frameSet.']) { $fs = t3lib_div::makeInstance('tslib_frameset'); $pageRenderer->addBodyContent($fs->make($GLOBALS['TSFE']->pSetup['frameSet.'])); - $pageRenderer->addBodyContent(chr(10) . '' . chr(10)); + $pageRenderer->addBodyContent(LF . '<noframes>' . LF); } // Bodytag: @@ -1007,22 +1007,22 @@ if (count($JSef[1])) { // Event functions: $bodyTag = preg_replace('/>$/', '', trim($bodyTag)) . ' ' . trim(implode(' ', $JSef[1])) . '>'; } - $pageRenderer->addBodyContent(chr(10) . $bodyTag); + $pageRenderer->addBodyContent(LF . $bodyTag); // Div-sections if ($GLOBALS['TSFE']->divSection) { - $pageRenderer->addBodyContent(chr(10) . $GLOBALS['TSFE']->divSection); + $pageRenderer->addBodyContent(LF . $GLOBALS['TSFE']->divSection); } // Page content - $pageRenderer->addBodyContent(chr(10) . $pageContent); + $pageRenderer->addBodyContent(LF . $pageContent); // Render complete page $GLOBALS['TSFE']->content = $pageRenderer->render(); // Ending page if ($GLOBALS['TSFE']->pSetup['frameSet.']) { - $GLOBALS['TSFE']->content .= chr(10) . ''; + $GLOBALS['TSFE']->content .= LF . ''; } } Index: typo3/sysext/cms/tslib/class.tslib_fe.php =================================================================== --- typo3/sysext/cms/tslib/class.tslib_fe.php (revision 6200) +++ typo3/sysext/cms/tslib/class.tslib_fe.php (working copy) @@ -1506,7 +1506,7 @@ if ($reason == '') { $reason = 'Page cannot be found.'; } - $reason.= chr(10) . chr(10) . 'Additionally, ' . $code . ' was not found while trying to retrieve the error document.'; + $reason.= LF . LF . 'Additionally, ' . $code . ' was not found while trying to retrieve the error document.'; $this->printError('Reason: '.nl2br(htmlspecialchars($reason))); exit(); } @@ -1559,7 +1559,7 @@ $base.= preg_replace('/(.*\/)[^\/]*/', '${1}', $url_parts['path']); // Put it into content (generate also if necessary) - $replacement = chr(10) . '' . chr(10); + $replacement = LF . '' . LF; if (stristr($content, '')) { $content = preg_replace('/()/i', '\1' . $replacement, $content); } else { @@ -1912,7 +1912,7 @@ $dateFormat = $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy']; $timeFormat = $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm']; - $this->content.= chr(10).''; + $this->content.= LF.''; } } $GLOBALS['TT']->pull(); @@ -3175,7 +3175,7 @@ $GLOBALS['TT']->push('Substitute header section'); $this->INTincScript_loadJSCode(); - $this->content = str_replace('', $this->convOutputCharset(implode(chr(10),$this->additionalHeaderData),'HD'), $this->content); + $this->content = str_replace('', $this->convOutputCharset(implode(LF,$this->additionalHeaderData),'HD'), $this->content); $this->content = str_replace('', $this->convOutputCharset($this->divSection,'TDS'), $this->content); $this->setAbsRefPrefix(); $GLOBALS['TT']->pull(); @@ -3268,7 +3268,7 @@ '; @@ -3259,7 +3259,7 @@ } if (count($out)) { $col = t3lib_div::intInRange(count($out),2,10); - $outputStr = ''; + $outputStr = ''; return ''.$outputStr.''; }; } @@ -3458,7 +3458,7 @@ foreach ($GLOBALS['TYPO3_LOADED_EXT'] as $loadedExtConf) { if (is_array($loadedExtConf) && $loadedExtConf['ext_tables.sql']) { - $tblFileContent.= chr(10).chr(10).chr(10).chr(10).t3lib_div::getUrl($loadedExtConf['ext_tables.sql']); + $tblFileContent.= LF.LF.LF.LF.t3lib_div::getUrl($loadedExtConf['ext_tables.sql']); } } } elseif (@is_file($actionParts[1])) { @@ -3466,7 +3466,7 @@ } if ($tblFileContent) { $fileContent = implode( - chr(10), + LF, $this->getStatementArray($tblFileContent,1,'^CREATE TABLE ') ); $FDfile = $this->getFieldDefinitions_fileContent($fileContent); @@ -3622,7 +3622,7 @@ reset($GLOBALS['TYPO3_LOADED_EXT']); while(list(,$loadedExtConf)=each($GLOBALS['TYPO3_LOADED_EXT'])) { if (is_array($loadedExtConf) && $loadedExtConf['ext_tables.sql']) { - $tblFileContent.= chr(10).chr(10).chr(10).chr(10).t3lib_div::getUrl($loadedExtConf['ext_tables.sql']); + $tblFileContent.= LF.LF.LF.LF.t3lib_div::getUrl($loadedExtConf['ext_tables.sql']); } } } @@ -3630,7 +3630,7 @@ reset($GLOBALS['TYPO3_LOADED_EXT']); while(list(,$loadedExtConf)=each($GLOBALS['TYPO3_LOADED_EXT'])) { if (is_array($loadedExtConf) && $loadedExtConf['ext_tables_static+adt.sql']) { - $tblFileContent.= chr(10).chr(10).chr(10).chr(10).t3lib_div::getUrl($loadedExtConf['ext_tables_static+adt.sql']); + $tblFileContent.= LF.LF.LF.LF.t3lib_div::getUrl($loadedExtConf['ext_tables_static+adt.sql']); } } } @@ -3655,7 +3655,7 @@ // Make a database comparison because some tables that are defined twice have not been created at this point. This applies to the "pages.*" fields defined in sysext/cms/ext_tables.sql for example. $fileContent = implode( $this->getStatementArray($tblFileContent,1,'^CREATE TABLE '), - chr(10) + LF ); $FDfile = $this->getFieldDefinitions_fileContent($fileContent); $FDdb = $this->getFieldDefinitions_database(); @@ -3780,7 +3780,7 @@ if (count($statements)) { $out = ''; foreach ($statements as $statement) { - $out.= nl2br(htmlspecialchars(t3lib_div::fixed_lgd_cs($statement,$maxlen)).chr(10).chr(10)); + $out.= nl2br(htmlspecialchars(t3lib_div::fixed_lgd_cs($statement,$maxlen)).LF.LF); } } $this->message($tLabel,'Content of '.basename($actionParts[1]),$out,1); @@ -3995,7 +3995,7 @@ $updateWizardBoxes.= '

    '.$identifier.'

    -

    '.str_replace(chr(10),'
    ',$explanation).'

    +

    '.str_replace(LF,'
    ',$explanation).'

    '; } @@ -4817,7 +4817,7 @@ '; - $out.=implode($valArray,chr(10)); + $out.=implode($valArray,LF); } return '
     
    '.$this->fw($header.':',2).'
    '.$out.'
    '; } @@ -4904,7 +4904,7 @@ $out[]=''.$this->fw($c.': '.$v).''; } - $code = ''.implode($out,chr(10)).'
    '; + $code = ''.implode($out,LF).'
    '; $code = ''; return '

    '.$code.'
    '; } Index: typo3/sysext/indexed_search/class.external_parser.php =================================================================== --- typo3/sysext/indexed_search/class.external_parser.php (revision 6200) +++ typo3/sysext/indexed_search/class.external_parser.php (working copy) @@ -437,7 +437,7 @@ if ($this->app['catdoc']) { $cmd = $this->app['catdoc'] . ' -d utf-8 ' . escapeshellarg($absFile); exec($cmd,$res); - $content = implode(chr(10),$res); + $content = implode(LF,$res); unset($res); $contentArr = $this->pObj->splitRegularContent($this->removeEndJunk($content)); } @@ -447,7 +447,7 @@ if ($this->app['ppthtml']) { $cmd = $this->app['ppthtml'] . ' ' . escapeshellarg($absFile); exec($cmd,$res); - $content = implode(chr(10),$res); + $content = implode(LF,$res); unset($res); $content = $this->pObj->convertHTMLToUtf8($content); $contentArr = $this->pObj->splitHTMLContent($this->removeEndJunk($content)); @@ -458,7 +458,7 @@ if ($this->app['xlhtml']) { $cmd = $this->app['xlhtml'] . ' -nc -te ' . escapeshellarg($absFile); exec($cmd,$res); - $content = implode(chr(10),$res); + $content = implode(LF,$res); unset($res); $content = $this->pObj->convertHTMLToUtf8($content); $contentArr = $this->pObj->splitHTMLContent($this->removeEndJunk($content)); @@ -475,13 +475,13 @@ // Read content.xml: $cmd = $this->app['unzip'] . ' -p ' . escapeshellarg($absFile) . ' content.xml'; exec($cmd,$res); - $content_xml = implode(chr(10),$res); + $content_xml = implode(LF,$res); unset($res); // Read meta.xml: $cmd = $this->app['unzip'] . ' -p ' . escapeshellarg($absFile) . ' meta.xml'; exec($cmd, $res); - $meta_xml = implode(chr(10),$res); + $meta_xml = implode(LF,$res); unset($res); $utf8_content = trim(strip_tags(str_replace('<',' <',$content_xml))); @@ -508,7 +508,7 @@ if ($this->app['unrtf']) { $cmd = $this->app['unrtf'] . ' ' . escapeshellarg($absFile); exec($cmd,$res); - $fileContent = implode(chr(10),$res); + $fileContent = implode(LF,$res); unset($res); $fileContent = $this->pObj->convertHTMLToUtf8($fileContent); $contentArr = $this->pObj->splitHTMLContent($fileContent); @@ -637,7 +637,7 @@ * @return string String */ function removeEndJunk($string) { - return trim(preg_replace('/['.chr(10).chr(12).']*$/','',$string)); + return trim(preg_replace('/['.LF.chr(12).']*$/','',$string)); } Index: typo3/sysext/indexed_search/class.indexer.php =================================================================== --- typo3/sysext/indexed_search/class.indexer.php (revision 6200) +++ typo3/sysext/indexed_search/class.indexer.php (working copy) @@ -442,8 +442,8 @@ // Indexer configuration from Extension Manager interface: $this->indexerConfig = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['indexed_search']); - $this->tstamp_minAge = t3lib_div::intInRange($this->indexerConfig['minAge']*3600,0); - $this->tstamp_maxAge = t3lib_div::intInRange($this->indexerConfig['maxAge']*3600,0); + $this->tstamp_minAge = t3lib_div::intInRange($this->indexerConfig['minAge']*ONE_HOUR,0); + $this->tstamp_maxAge = t3lib_div::intInRange($this->indexerConfig['maxAge']*ONE_HOUR,0); $this->maxExternalFiles = t3lib_div::intInRange($this->indexerConfig['maxExternalFiles'],0,1000,5); $this->flagBitMask = t3lib_div::intInRange($this->indexerConfig['flagBitMask'],0,255); @@ -935,7 +935,7 @@ if (strlen($content)) { // Compile headers: - $headers = t3lib_div::trimExplode(chr(10),$content,1); + $headers = t3lib_div::trimExplode(LF,$content,1); $retVal = array(); foreach($headers as $line) { if (!strlen(trim($line))) { Index: typo3/sysext/indexed_search/class.crawler.php =================================================================== --- typo3/sysext/indexed_search/class.crawler.php (revision 6200) +++ typo3/sysext/indexed_search/class.crawler.php (working copy) @@ -762,15 +762,15 @@ $currentTime = $GLOBALS['EXEC_TIME']; // Now, find a midnight time to use for offset calculation. This has to differ depending on whether we have frequencies within a day or more than a day; Less than a day, we don't care which day to use for offset, more than a day we want to respect the currently entered day as offset regardless of when the script is run - thus the day-of-week used in case "Weekly" is selected will be respected - if ($cfgRec['timer_frequency']<=24*3600) { - $aMidNight = mktime (0,0,0)-1*24*3600; + if ($cfgRec['timer_frequency']<=ONE_DAY) { + $aMidNight = mktime (0,0,0)-1*ONE_DAY; } else { $lastTime = $cfgRec['timer_next_indexing'] ? $cfgRec['timer_next_indexing'] : $GLOBALS['EXEC_TIME']; $aMidNight = mktime (0,0,0, date('m',$lastTime), date('d',$lastTime), date('y',$lastTime)); } // Find last offset time plus frequency in seconds: - $lastSureOffset = $aMidNight+t3lib_div::intInRange($cfgRec['timer_offset'],0,86400); + $lastSureOffset = $aMidNight+t3lib_div::intInRange($cfgRec['timer_offset'],0,ONE_DAY); $frequencySeconds = t3lib_div::intInRange($cfgRec['timer_frequency'],1); // Now, find out how many blocks of the length of frequency there is until the next time: @@ -791,10 +791,10 @@ */ function checkDeniedSuburls($url, $url_deny) { if (trim($url_deny)) { - $url_denyArray = t3lib_div::trimExplode(chr(10),$url_deny,1); + $url_denyArray = t3lib_div::trimExplode(LF,$url_deny,1); foreach($url_denyArray as $testurl) { if (t3lib_div::isFirstPartOfStr($url,$testurl)) { - echo $url.' /// '.$url_deny.chr(10); + echo $url.' /// '.$url_deny.LF; return TRUE; } } Index: typo3/sysext/indexed_search/tca.php =================================================================== --- typo3/sysext/indexed_search/tca.php (revision 6200) +++ typo3/sysext/indexed_search/tca.php (working copy) @@ -190,7 +190,7 @@ 'size' => '8', 'max' => '20', 'eval' => 'time', - 'default' => 3600, + 'default' => ONE_HOUR, ) ), 'timer_frequency' => Array ( @@ -198,13 +198,13 @@ 'config' => Array ( 'type' => 'select', 'items' => Array ( - Array('LLL:EXT:indexed_search/locallang_db.php:index_config.timer_frequency.I.0', '3600'), - Array('LLL:EXT:indexed_search/locallang_db.php:index_config.timer_frequency.I.1', '86400'), - Array('LLL:EXT:indexed_search/locallang_db.php:index_config.timer_frequency.I.2', '604800'), + Array('LLL:EXT:indexed_search/locallang_db.php:index_config.timer_frequency.I.0', 'ONE_HOUR'), + Array('LLL:EXT:indexed_search/locallang_db.php:index_config.timer_frequency.I.1', 'ONE_DAY'), + Array('LLL:EXT:indexed_search/locallang_db.php:index_config.timer_frequency.I.2', 'ONE_WEEK'), ), 'size' => 1, 'maxitems' => 1, - 'default' => 86400, + 'default' => ONE_DAY, ) ), 'recordsbatch' => Array ( Index: typo3/sysext/tstemplate_ceditor/class.tx_tstemplateceditor.php =================================================================== --- typo3/sysext/tstemplate_ceditor/class.tx_tstemplateceditor.php (revision 6200) +++ typo3/sysext/tstemplate_ceditor/class.tx_tstemplateceditor.php (working copy) @@ -119,7 +119,7 @@ if ($tmpl->changed) { // Set the data to be saved $recData=array(); - $recData["sys_template"][$saveId]["constants"] = implode($tmpl->raw,chr(10)); + $recData["sys_template"][$saveId]["constants"] = implode($tmpl->raw,LF); // Create new tce-object $tce = t3lib_div::makeInstance("t3lib_TCEmain"); $tce->stripslashes_values=0; Index: typo3/sysext/tstemplate_info/class.tx_tstemplateinfo.php =================================================================== --- typo3/sysext/tstemplate_info/class.tx_tstemplateinfo.php (revision 6200) +++ typo3/sysext/tstemplate_info/class.tx_tstemplateinfo.php (working copy) @@ -484,12 +484,12 @@ ); $outCode.= $this->tableRow( $GLOBALS['LANG']->getLL('constants'), - sprintf($GLOBALS['LANG']->getLL('editToView'), (trim($tplRow[constants]) ? count(explode(chr(10), $tplRow[constants])) : 0)), + sprintf($GLOBALS['LANG']->getLL('editToView'), (trim($tplRow[constants]) ? count(explode(LF, $tplRow[constants])) : 0)), 'constants' ); $outCode.= $this->tableRow( $GLOBALS['LANG']->getLL('setup'), - sprintf($GLOBALS['LANG']->getLL('editToView'), (trim($tplRow[config]) ? count(explode(chr(10), $tplRow[config])) : 0)), + sprintf($GLOBALS['LANG']->getLL('editToView'), (trim($tplRow[config]) ? count(explode(LF, $tplRow[config])) : 0)), 'config' ); $outCode = ''.$outCode.'
    '; Index: typo3/sysext/felogin/pi1/class.tx_felogin_pi1.php =================================================================== --- typo3/sysext/felogin/pi1/class.tx_felogin_pi1.php (revision 6200) +++ typo3/sysext/felogin/pi1/class.tx_felogin_pi1.php (working copy) @@ -315,7 +315,7 @@ */ protected function generateAndSendHash($user) { $hours = intval($this->conf['forgotLinkHashValidTime']) > 0 ? intval($this->conf['forgotLinkHashValidTime']) : 24; - $validEnd = time() + 3600 * $hours; + $validEnd = time() + ONE_HOUR * $hours; $validEndString = date($this->conf['dateFormat'], $validEnd); $hash = md5(rand()); @@ -462,7 +462,7 @@ } if (count($onSubmitAr)) { $onSubmit = implode('; ', $onSubmitAr).'; return true;'; - $extraHidden = implode(chr(10), $extraHiddenAr); + $extraHidden = implode(LF, $extraHiddenAr); } // Login form Index: typo3/sysext/css_styled_content/pi1/class.tx_cssstyledcontent_pi1.php =================================================================== --- typo3/sysext/css_styled_content/pi1/class.tx_cssstyledcontent_pi1.php (revision 6200) +++ typo3/sysext/css_styled_content/pi1/class.tx_cssstyledcontent_pi1.php (working copy) @@ -101,7 +101,7 @@ if (!strcmp($content,'')) return ''; // Split into single lines: - $lines = t3lib_div::trimExplode(chr(10),$content); + $lines = t3lib_div::trimExplode(LF,$content); foreach($lines as &$val) { $val = '
  • '.$this->cObj->stdWrap($val,$conf['innerStdWrap.']).'
  • '; } @@ -173,7 +173,7 @@ $headerIdPrefix = $headerScope.$this->cObj->data['uid'].'-'; // Split into single lines (will become table-rows): - $rows = t3lib_div::trimExplode(chr(10),$content); + $rows = t3lib_div::trimExplode(LF,$content); reset($rows); // Find number of columns to render: @@ -314,7 +314,7 @@ if (count($fileArray)) { // Get the descriptions for the files (if any): - $descriptions = t3lib_div::trimExplode(chr(10),$this->cObj->data['imagecaption']); + $descriptions = t3lib_div::trimExplode(LF,$this->cObj->data['imagecaption']); // Adding hardcoded TS to linkProc configuration: $conf['linkProc.']['path.']['current'] = 1; Index: typo3/sysext/feedit/view/class.tx_feedit_editpanel.php =================================================================== --- typo3/sysext/feedit/view/class.tx_feedit_editpanel.php (revision 6200) +++ typo3/sysext/feedit/view/class.tx_feedit_editpanel.php (working copy) @@ -123,7 +123,7 @@ $labelTxt = $this->cObj->stdWrap($conf['label'],$conf['label.']); foreach((array) $hiddenFields as $name => $value) { - $hiddenFieldString .= '' . chr(10); + $hiddenFieldString .= '' . LF; } $panel=' Index: typo3/sysext/impexp/class.tx_impexp.php =================================================================== --- typo3/sysext/impexp/class.tx_impexp.php (revision 6200) +++ typo3/sysext/impexp/class.tx_impexp.php (working copy) @@ -1091,7 +1091,7 @@ // Creating XML file from $outputArray: $charset = $this->dat['header']['charset'] ? $this->dat['header']['charset'] : 'iso-8859-1'; - $XML = ''.chr(10); + $XML = ''.LF; $XML.= t3lib_div::array2xml($this->dat,'',0,'T3RecordDocument',0,$options); return $XML; Index: typo3/sysext/rsaauth/sv1/backends/class.tx_rsaauth_cmdline_backend.php =================================================================== --- typo3/sysext/rsaauth/sv1/backends/class.tx_rsaauth_cmdline_backend.php (revision 6200) +++ typo3/sysext/rsaauth/sv1/backends/class.tx_rsaauth_cmdline_backend.php (working copy) @@ -150,7 +150,7 @@ @unlink($privateKeyFile); @unlink($dataFile); - return implode(chr(10), $output); + return implode(LF, $output); } /** Index: typo3/sysext/belog/class.tx_belog_webinfo.php =================================================================== --- typo3/sysext/belog/class.tx_belog_webinfo.php (revision 6200) +++ typo3/sysext/belog/class.tx_belog_webinfo.php (working copy) @@ -174,17 +174,17 @@ case 0: // This week $week = (date('w') ? date('w') : 7)-1; - $starttime = mktime (0,0,0)-$week*3600*24; + $starttime = mktime (0,0,0)-$week*ONE_DAY; break; case 1: // Last week $week = (date('w') ? date('w') : 7)-1; - $starttime = mktime (0,0,0)-($week+7)*3600*24; - $endtime = mktime (0,0,0)-$week*3600*24; + $starttime = mktime (0,0,0)-($week+7)*ONE_DAY; + $endtime = mktime (0,0,0)-$week*ONE_DAY; break; case 2: // Last 7 days - $starttime = mktime (0,0,0)-7*3600*24; + $starttime = mktime (0,0,0)-ONE_WEEK; break; case 10: // This month @@ -197,7 +197,7 @@ break; case 12: // Last 31 days - $starttime = mktime (0,0,0)-31*3600*24; + $starttime = mktime (0,0,0)-31*ONE_DAY; break; } if ($starttime) { Index: typo3/sysext/belog/mod/index.php =================================================================== --- typo3/sysext/belog/mod/index.php (revision 6200) +++ typo3/sysext/belog/mod/index.php (working copy) @@ -275,17 +275,17 @@ case 0: // This week $week = (date('w') ? date('w') : 7)-1; - $starttime = mktime (0,0,0)-$week*3600*24; + $starttime = mktime (0,0,0)-$week*ONE_DAY; break; case 1: // Last week $week = (date('w') ? date('w') : 7)-1; - $starttime = mktime (0,0,0)-($week+7)*3600*24; - $endtime = mktime (0,0,0)-$week*3600*24; + $starttime = mktime (0,0,0)-($week+7)*ONE_DAY; + $endtime = mktime (0,0,0)-$week*ONE_DAY; break; case 2: // Last 7 days - $starttime = mktime (0,0,0)-7*3600*24; + $starttime = mktime (0,0,0)-ONE_WEEK; break; case 10: // This month @@ -298,7 +298,7 @@ break; case 12: // Last 31 days - $starttime = mktime (0,0,0)-31*3600*24; + $starttime = mktime (0,0,0)-31*ONE_DAY; break; } } Index: typo3/sysext/lang/lang.php =================================================================== --- typo3/sysext/lang/lang.php (revision 6200) +++ typo3/sysext/lang/lang.php (working copy) @@ -370,7 +370,7 @@ // Add label: switch((string)$kParts[2]) { case '+': // adding - $TCA_DESCR[$table]['columns'][$kParts[0]][$kParts[1]].= chr(10).$lVal; + $TCA_DESCR[$table]['columns'][$kParts[0]][$kParts[1]].= LF.$lVal; break; default: // Substituting: $TCA_DESCR[$table]['columns'][$kParts[0]][$kParts[1]] = $lVal; Index: typo3/sysext/scheduler/examples/class.tx_scheduler_testtask.php =================================================================== --- typo3/sysext/scheduler/examples/class.tx_scheduler_testtask.php (revision 6200) +++ typo3/sysext/scheduler/examples/class.tx_scheduler_testtask.php (working copy) @@ -76,18 +76,18 @@ $multiple = $exec->getMultiple(); $cronCmd = $exec->getCronCmd(); $mailBody = - 'SCHEDULER TEST-TASK' . chr(10) - . '- - - - - - - - - - - - - - - -' . chr(10) - . 'UID: ' . $this->taskUid . chr(10) - . 'Sitename: ' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] . chr(10) - . 'Site: ' . $site . chr(10) - . 'Called by: ' . $calledBy . chr(10) - . 'tstamp: ' . date('Y-m-d H:i:s') . ' [' . time() . ']' . chr(10) - . 'maxLifetime: ' . $this->scheduler->extConf['maxLifetime'] . chr(10) - . 'start: ' . date('Y-m-d H:i:s', $start) . ' [' . $start . ']' . chr(10) - . 'end: ' . ((empty($end)) ? '-' : (date('Y-m-d H:i:s', $end) . ' [' . $end . ']')) . chr(10) - . 'interval: ' . $interval . chr(10) - . 'multiple: ' . ($multiple ? 'yes' : 'no') . chr(10) + 'SCHEDULER TEST-TASK' . LF + . '- - - - - - - - - - - - - - - -' . LF + . 'UID: ' . $this->taskUid . LF + . 'Sitename: ' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'] . LF + . 'Site: ' . $site . LF + . 'Called by: ' . $calledBy . LF + . 'tstamp: ' . date('Y-m-d H:i:s') . ' [' . time() . ']' . LF + . 'maxLifetime: ' . $this->scheduler->extConf['maxLifetime'] . LF + . 'start: ' . date('Y-m-d H:i:s', $start) . ' [' . $start . ']' . LF + . 'end: ' . ((empty($end)) ? '-' : (date('Y-m-d H:i:s', $end) . ' [' . $end . ']')) . LF + . 'interval: ' . $interval . LF + . 'multiple: ' . ($multiple ? 'yes' : 'no') . LF . 'cronCmd: ' . ($cronCmd ? $cronCmd : 'not used'); // Prepare mailer and send the mail Index: typo3/sysext/tstemplate_analyzer/class.tx_tstemplateanalyzer.php =================================================================== --- typo3/sysext/tstemplate_analyzer/class.tx_tstemplateanalyzer.php (revision 6200) +++ typo3/sysext/tstemplate_analyzer/class.tx_tstemplateanalyzer.php (working copy) @@ -157,7 +157,7 @@ '; $tmpl->ext_lineNumberOffset = -2; // Don't know why -2 and not 0... :-) But works. $tmpl->ext_lineNumberOffset_mode = "const"; - $tmpl->ext_lineNumberOffset += count(explode(chr(10), t3lib_TSparser::checkIncludeLines("" . $GLOBALS["TYPO3_CONF_VARS"]["FE"]["defaultTypoScript_constants"]))) + 1; + $tmpl->ext_lineNumberOffset += count(explode(LF, t3lib_TSparser::checkIncludeLines("" . $GLOBALS["TYPO3_CONF_VARS"]["FE"]["defaultTypoScript_constants"]))) + 1; reset($tmpl->clearList_const); foreach ($tmpl->constants as $key => $val) { @@ -178,7 +178,7 @@ break; } } - $tmpl->ext_lineNumberOffset += count(explode(chr(10), $val)) + 1; + $tmpl->ext_lineNumberOffset += count(explode(LF, $val)) + 1; next($tmpl->clearList_const); } $theOutput .= ' @@ -196,7 +196,7 @@ '; $tmpl->ext_lineNumberOffset = 0; $tmpl->ext_lineNumberOffset_mode = "setup"; - $tmpl->ext_lineNumberOffset += count(explode(chr(10), t3lib_TSparser::checkIncludeLines("" . $GLOBALS["TYPO3_CONF_VARS"]["FE"]["defaultTypoScript_setup"]))) + 1; + $tmpl->ext_lineNumberOffset += count(explode(LF, t3lib_TSparser::checkIncludeLines("" . $GLOBALS["TYPO3_CONF_VARS"]["FE"]["defaultTypoScript_setup"]))) + 1; reset($tmpl->clearList_setup); foreach ($tmpl->config as $key => $val) { @@ -214,7 +214,7 @@ break; } } - $tmpl->ext_lineNumberOffset += count(explode(chr(10), $val)) + 1; + $tmpl->ext_lineNumberOffset += count(explode(LF, $val)) + 1; next($tmpl->clearList_setup); } $theOutput .= ' Index: typo3/sysext/info_pagetsconfig/class.tx_infopagetsconfig_webinfo.php =================================================================== --- typo3/sysext/info_pagetsconfig/class.tx_infopagetsconfig_webinfo.php (revision 6200) +++ typo3/sysext/info_pagetsconfig/class.tx_infopagetsconfig_webinfo.php (working copy) @@ -27,10 +27,10 @@ /** * Contains class for Page TSconfig wizard * - * Revised for TYPO3 3.7 June/2004 by Kasper Sk�rh�+ * Revised for TYPO3 3.7 June/2004 by Kasper Skaarhoj * XHTML compliant * - * @author Kasper Sk�rh�j + * @author Kasper Skaarhoj */ /** * [CLASS/FUNCTION INDEX of SCRIPT] @@ -123,11 +123,11 @@ ''; } - $TScontent = nl2br(htmlspecialchars(trim($v).chr(10))); + $TScontent = nl2br(htmlspecialchars(trim($v).LF)); $tsparser = t3lib_div::makeInstance('t3lib_TSparser'); $tsparser->lineNumberOffset=0; - $TScontent = $tsparser->doSyntaxHighlight(trim($v).chr(10),'',1); + $TScontent = $tsparser->doSyntaxHighlight(trim($v).LF,'',1); $lines[]=' '.$pTitle.' Index: typo3/wizard_table.php =================================================================== --- typo3/wizard_table.php (revision 6200) +++ typo3/wizard_table.php (working copy) @@ -359,7 +359,7 @@ if ($this->inputStyle) { $cells[]='doc->formWidth(20).' name="TABLE[c]['.(($k+1)*2).']['.(($a+1)*2).']" value="'.htmlspecialchars($cellContent).'" />'; } else { - $cellContent=preg_replace('//i',chr(10),$cellContent); + $cellContent=preg_replace('//i',LF,$cellContent); $cells[]=''; } @@ -588,7 +588,7 @@ while(list($a)=each($this->TABLECFG['c'])) { reset($this->TABLECFG['c'][$a]); while(list($b)=each($this->TABLECFG['c'][$a])) { - $this->TABLECFG['c'][$a][$b] = str_replace(chr(10),'
    ',str_replace(chr(13),'',$this->TABLECFG['c'][$a][$b])); + $this->TABLECFG['c'][$a][$b] = str_replace(LF,'
    ',str_replace(CR,'',$this->TABLECFG['c'][$a][$b])); } } } @@ -617,7 +617,7 @@ } // Finally, implode the lines into a string: - $bodyText = implode(chr(10),$inLines); + $bodyText = implode(LF,$inLines); // Return the configuration code: return $bodyText; @@ -634,7 +634,7 @@ function cfgString2CfgArray($cfgStr,$cols) { // Explode lines in the configuration code - each line is a table row. - $tLines=explode(chr(10),$cfgStr); + $tLines=explode(LF,$cfgStr); // Setting number of columns if (!$cols && trim($tLines[0])) { // auto... Index: typo3/wizard_forms.php =================================================================== --- typo3/wizard_forms.php (revision 6200) +++ typo3/wizard_forms.php (working copy) @@ -800,7 +800,7 @@ // Default: if ($vv['type']=='select' || $vv['type']=='radio') { - $thisLine[2]=str_replace(chr(10),', ',str_replace(',','',$vv['options'])); + $thisLine[2]=str_replace(LF,', ',str_replace(',','',$vv['options'])); } elseif ($vv['type']=='check') { if ($vv['default']) $thisLine[2]=1; } elseif (strcmp(trim($vv['default']),'')) { @@ -814,7 +814,7 @@ } } // Finally, implode the lines into a string, and return it: - return implode(chr(10),$inLines); + return implode(LF,$inLines); } /** @@ -827,7 +827,7 @@ function cfgString2CfgArray($cfgStr) { // Traverse the number of form elements: - $tLines=explode(chr(10),$cfgStr); + $tLines=explode(LF,$cfgStr); foreach($tLines as $k => $v) { // Initialize: @@ -870,7 +870,7 @@ switch((string)$confData['type']) { case 'select': case 'radio': - $confData['default'] = implode(chr(10),t3lib_div::trimExplode(',',$parts[2])); + $confData['default'] = implode(LF,t3lib_div::trimExplode(',',$parts[2])); break; default: $confData['default'] = trim($parts[2]); Index: typo3/view_help.php =================================================================== --- typo3/view_help.php (revision 6200) +++ typo3/view_help.php (working copy) @@ -532,7 +532,7 @@ global $TCA,$BE_USER,$TCA_DESCR; // Split references by comma or linebreak - $items = preg_split('/[,' . chr(10) . ']/', $value); + $items = preg_split('/[,' . LF . ']/', $value); $lines = array(); foreach($items as $val) { @@ -582,7 +582,7 @@ // Splitting: $imgArray = t3lib_div::trimExplode(',', $images, 1); if (count($imgArray)) { - $descrArray = explode(chr(10),$descr,count($imgArray)); + $descrArray = explode(LF,$descr,count($imgArray)); foreach($imgArray as $k => $image) { $descr = $descrArray[$k]; Index: typo3/alt_topmenu_dummy.php =================================================================== --- typo3/alt_topmenu_dummy.php (revision 6200) +++ typo3/alt_topmenu_dummy.php (working copy) @@ -139,7 +139,7 @@ '; foreach ($contentArray as $key=>$menucontent) { - $this->content .= implode(chr(10), $menucontent); + $this->content .= implode(LF, $menucontent); } $this->content.=' Index: typo3/alt_main.php =================================================================== --- typo3/alt_main.php (revision 6200) +++ typo3/alt_main.php (working copy) @@ -134,7 +134,7 @@ $pt3 = t3lib_div::dirname(t3lib_div::getIndpEnv('SCRIPT_NAME')).'/'; $goToModule_switch = $this->alt_menuObj->topMenu($this->loadModules->modules,0,"",4); - $fsMod = implode(chr(10),$this->alt_menuObj->fsMod); + $fsMod = implode(LF,$this->alt_menuObj->fsMod); // If another page module was specified, replace the default Page module with the new one $newPageModule = trim($GLOBALS['BE_USER']->getTSConfigVal('options.overridePageModule')); Index: typo3/alt_doc.php =================================================================== --- typo3/alt_doc.php (revision 6200) +++ typo3/alt_doc.php (working copy) @@ -926,7 +926,7 @@ if (is_array($this->tceforms->extraFormHeaders)) { $extraTemplate = t3lib_parsehtml::getSubpart($this->doc->moduleTemplate, '###DOCHEADER_EXTRAHEADER###'); - $extraTemplate = t3lib_parsehtml::substituteMarker($extraTemplate, '###EXTRAHEADER###', implode(chr(10), $this->tceforms->extraFormHeaders)); + $extraTemplate = t3lib_parsehtml::substituteMarker($extraTemplate, '###EXTRAHEADER###', implode(LF, $this->tceforms->extraFormHeaders)); } return $extraTemplate; } @@ -1019,7 +1019,7 @@ if (count($this->tceforms->commentMessages)) { $tceformMessages = ' '; } Index: typo3/wizard_tsconfig.php =================================================================== --- typo3/wizard_tsconfig.php (revision 6200) +++ typo3/wizard_tsconfig.php (working copy) @@ -549,7 +549,7 @@ foreach($table['rows'] as $row) { // Linking: - $lP=t3lib_div::trimExplode(chr(10),$row['property'],1); + $lP=t3lib_div::trimExplode(LF,$row['property'],1); $lP2=array(); while(list($k,$lStr)=each($lP)) { $lP2[$k] = $this->linkProperty($lStr,$lStr,$objString,$row['datatype']);