Added Feature #12066: Added constants throughout the core for LF, CR, TAB (Thanks...
authorBenni Mack <benni.mack@typo3.org>
Mon, 12 Apr 2010 16:17:20 +0000 (16:17 +0000)
committerBenni Mack <benni.mack@typo3.org>
Mon, 12 Apr 2010 16:17:20 +0000 (16:17 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@7307 709f56b5-9817-0410-a4d7-c38de5d9e867

108 files changed:
ChangeLog
NEWS.txt
t3lib/class.gzip_encode.php
t3lib/class.t3lib_admin.php
t3lib/class.t3lib_befunc.php
t3lib/class.t3lib_beuserauth.php
t3lib/class.t3lib_cli.php
t3lib/class.t3lib_cs.php
t3lib/class.t3lib_db.php
t3lib/class.t3lib_diff.php
t3lib/class.t3lib_div.php
t3lib/class.t3lib_flexformtools.php
t3lib/class.t3lib_formmail.php
t3lib/class.t3lib_fullsearch.php
t3lib/class.t3lib_htmlmail.php
t3lib/class.t3lib_install.php
t3lib/class.t3lib_loaddbgroup.php
t3lib/class.t3lib_pagerenderer.php
t3lib/class.t3lib_parsehtml.php
t3lib/class.t3lib_parsehtml_proc.php
t3lib/class.t3lib_querygenerator.php
t3lib/class.t3lib_readmail.php
t3lib/class.t3lib_refindex.php
t3lib/class.t3lib_sqlengine.php
t3lib/class.t3lib_sqlparser.php
t3lib/class.t3lib_superadmin.php
t3lib/class.t3lib_tceforms.php
t3lib/class.t3lib_tcemain.php
t3lib/class.t3lib_tsparser.php
t3lib/class.t3lib_tsparser_ext.php
t3lib/class.t3lib_tsstyleconfig.php
t3lib/class.t3lib_tstemplate.php
t3lib/class.t3lib_userauthgroup.php
t3lib/class.t3lib_xml.php
t3lib/error/class.t3lib_error_debugexceptionhandler.php
tests/regularexpression_testcase.php
tests/t3lib/t3lib_div_testcase.php
tests/t3lib/t3lib_pagerenderer_testcase.php
typo3/alt_doc.php
typo3/alt_main.php
typo3/alt_topmenu_dummy.php
typo3/backend.php
typo3/classes/class.backendsearchmenu.php
typo3/classes/class.clearcachemenu.php
typo3/classes/class.modulemenu.php
typo3/classes/class.shortcutmenu.php
typo3/classes/class.workspaceselector.php
typo3/init.php
typo3/mod/tools/em/class.em_index.php
typo3/sysext/cms/layout/class.tx_cms_layout.php
typo3/sysext/cms/layout/db_layout.php
typo3/sysext/cms/tslib/class.tslib_adminpanel.php
typo3/sysext/cms/tslib/class.tslib_content.php
typo3/sysext/cms/tslib/class.tslib_fe.php
typo3/sysext/cms/tslib/class.tslib_fetce.php
typo3/sysext/cms/tslib/class.tslib_feuserauth.php
typo3/sysext/cms/tslib/class.tslib_menu.php
typo3/sysext/cms/tslib/class.tslib_pagegen.php
typo3/sysext/cms/tslib/class.tslib_pibase.php
typo3/sysext/cms/tslib/media/scripts/freesite_dummy_page_menu.php
typo3/sysext/cms/tslib/media/scripts/gmenu_layers.php
typo3/sysext/cms/tslib/media/scripts/tmenu_layers.php
typo3/sysext/css_styled_content/pi1/class.tx_cssstyledcontent_pi1.php
typo3/sysext/feedit/view/class.tx_feedit_editpanel.php
typo3/sysext/felogin/pi1/class.tx_felogin_pi1.php
typo3/sysext/impexp/class.tx_impexp.php
typo3/sysext/indexed_search/class.crawler.php
typo3/sysext/indexed_search/class.external_parser.php
typo3/sysext/indexed_search/class.indexer.php
typo3/sysext/lang/lang.php
typo3/sysext/lowlevel/HOWTO_clean_up_TYPO3_installations.txt
typo3/sysext/lowlevel/class.tx_lowlevel_admin_core.php
typo3/sysext/lowlevel/class.tx_lowlevel_cleaner_core.php
typo3/sysext/lowlevel/clmods/class.cleanflexform.php
typo3/sysext/lowlevel/clmods/class.deleted.php
typo3/sysext/lowlevel/clmods/class.double_files.php
typo3/sysext/lowlevel/clmods/class.lost_files.php
typo3/sysext/lowlevel/clmods/class.missing_files.php
typo3/sysext/lowlevel/clmods/class.missing_relations.php
typo3/sysext/lowlevel/clmods/class.orphan_records.php
typo3/sysext/lowlevel/clmods/class.rte_images.php
typo3/sysext/lowlevel/clmods/class.syslog.php
typo3/sysext/lowlevel/clmods/class.versions.php
typo3/sysext/lowlevel/dbint/index.php
typo3/sysext/opendocs/class.tx_opendocs.php
typo3/sysext/openid/sv1/class.tx_openid_sv1.php
typo3/sysext/recycler/mod1/index.php
typo3/sysext/rsaauth/sv1/backends/class.tx_rsaauth_cmdline_backend.php
typo3/sysext/rtehtmlarea/class.tx_rtehtmlarea_base.php
typo3/sysext/rtehtmlarea/extensions/TYPO3Link/class.tx_rtehtmlarea_typo3link.php
typo3/sysext/rtehtmlarea/pi1/class.tx_rtehtmlarea_pi1.php
typo3/sysext/scheduler/examples/class.tx_scheduler_testtask.php
typo3/sysext/setup/mod/index.php
typo3/sysext/statictemplates/media/scripts/freesite_dummy_page_menu.php
typo3/sysext/statictemplates/media/scripts/gmenu_layers.php
typo3/sysext/statictemplates/media/scripts/tmenu_layers.php
typo3/sysext/sys_action/toolbarmenu/class.tx_sysaction_toolbarmenu.php
typo3/sysext/t3editor/classes/class.tx_t3editor.php
typo3/sysext/tsconfig_help/mod1/index.php
typo3/sysext/tstemplate_analyzer/class.tx_tstemplateanalyzer.php
typo3/sysext/tstemplate_ceditor/class.tx_tstemplateceditor.php
typo3/sysext/tstemplate_info/class.tx_tstemplateinfo.php
typo3/sysext/tstemplate_objbrowser/class.tx_tstemplateobjbrowser.php
typo3/template.php
typo3/view_help.php
typo3/wizard_forms.php
typo3/wizard_table.php
typo3/wizard_tsconfig.php

index d7af96d..5d843c4 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,9 @@
+2010-04-12  Benjamin Mack  <benni@typo3.org>
+
+       * Added Feature #12066: Added constants throughout the core for LF, CR, TAB (Thanks to Oliver Klee)
+
 2010-04-12  Susanne Moog  <typo3@susanne-moog.de>
+
        * Fixed bug #14054: CSS Styled Content has no manual
 
 2010-04-12  Patrick Broens  <patrick@patrickbroens.nl>
index 541ed9f..3479819 100644 (file)
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -21,13 +21,13 @@ General
 Backend
 =======
 
-       * It is now possible to add whole directories of CSS files to the backend by setting $TBE_STYLES['stylesheetDirectories'][$_EXTKEY][] = 'EXT:myext/stylesheets/' 
+       * It is now possible to add whole directories of CSS files to the backend by setting $TBE_STYLES['stylesheetDirectories'][$_EXTKEY][] = 'EXT:myext/stylesheets/'
 
 
 Frontend
 ========
 
-       * Indexed search no logner puts a double wrap around search rules in the advanced search form. This may require style changes if a default indexed search is used.
+       * Indexed search no longer puts a double wrap around search rules in the advanced search form. This may require style changes if a default indexed search is used.
 
 
 Compatibility
@@ -39,7 +39,7 @@ Compatibility
 Development
 ===========
 
-       * ...
+       * t3lib_div now provides the constants LF, CR, CRLF and TAB which can be used to improve code readability.
 
 
 TypoScript changes
index 7e34909..c4af0da 100644 (file)
@@ -225,7 +225,7 @@ class gzip_encode {
 
                        // By Kasper Skaarhoj, start
                if ($outputCompressedSizes)     {
-                       $contents.=chr(10)."<!-- Compressed, level ".$level.", original size was ".strlen($contents)." bytes. New size is ".strlen(gzcompress($contents, $level))." bytes -->";
+                       $contents.=LF."<!-- Compressed, level ".$level.", original size was ".strlen($contents)." bytes. New size is ".strlen(gzcompress($contents, $level))." bytes -->";
                        $size = strlen($contents);      // Must set again!
                }
                        // By Kasper Skaarhoj, end
index 535ccbb..6ba9d5c 100644 (file)
@@ -160,7 +160,7 @@ class t3lib_admin {
 
                                // Build HTML output:
                        if ($this->genTree_makeHTML)    {
-                               $this->genTree_HTML.=chr(10).'<div><span class="nobr">';
+                               $this->genTree_HTML.=LF.'<div><span class="nobr">';
                                $PM = 'join';
                                $LN = ($a==$c)?'blank':'line';
                                $BTM = ($a==$c)?'bottom':'';
@@ -250,7 +250,7 @@ class t3lib_admin {
 
                                // Build HTML output:
                        if ($this->genTree_makeHTML)    {
-                               $this->genTree_HTML.=chr(10).'<div><span class="nobr">';
+                               $this->genTree_HTML.=LF.'<div><span class="nobr">';
                                $PM = 'join';
                                $LN = ($a==$c)?'blank':'line';
                                $BTM = ($a==$c)?'bottom':'';
index d8390be..dfe0191 100644 (file)
@@ -1336,7 +1336,7 @@ final class t3lib_BEfunc {
                }
 
                        // 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');
@@ -1401,7 +1401,7 @@ final class t3lib_BEfunc {
                        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);
@@ -1424,7 +1424,7 @@ final class t3lib_BEfunc {
                                $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));
                        }
@@ -2926,7 +2926,7 @@ final class t3lib_BEfunc {
                        }
                }
 
-               $content = implode(chr(10), $signals);
+               $content = implode(LF, $signals);
 
                t3lib_BEfunc::setUpdateSignal();        // for backwards compatibility, should be replaced
                return $content;
@@ -4366,7 +4366,7 @@ final class t3lib_BEfunc {
         */
        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 85f48c8..bc58f1c 100644 (file)
@@ -239,10 +239,10 @@ class t3lib_beUserAuth extends t3lib_userAuthGroup {
                                        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 ebbb2bd..0f45e3a 100644 (file)
@@ -144,7 +144,7 @@ class t3lib_cli {
                        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 @@ class t3lib_cli {
                                        $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 @@ class t3lib_cli {
 
                                $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 @@ class t3lib_cli {
                }
 
                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;
                }
        }
@@ -259,7 +259,7 @@ class t3lib_cli {
                                        $this->cli_echo($this->cli_indent(str_replace('###OPTIONS###',trim($optStr),$value),4)."\n\n");
                                break;
                                case 'options':
-                                       $this->cli_echo($this->cli_indent($value,4)."\n");
+                                       $this->cli_echo($this->cli_indent($value,4).LF);
 
                                        $maxLen = 0;
                                        foreach ($this->cli_options as $v)      {
@@ -267,9 +267,9 @@ class t3lib_cli {
                                        }
 
                                        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])).LF);
                                        }
-                                       $this->cli_echo("\n");
+                                       $this->cli_echo(LF);
                                break;
                                default:
                                        $this->cli_echo($this->cli_indent($value,4)."\n\n");
@@ -286,12 +286,12 @@ class t3lib_cli {
         * @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 4cd7749..bdacd5d 100644 (file)
@@ -987,7 +987,7 @@ class t3lib_cs {
                                        $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 32272fc..8f3902d 100644 (file)
@@ -1114,7 +1114,7 @@ class t3lib_DB {
                                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 .
index fd405de..999c5b1 100644 (file)
@@ -94,7 +94,7 @@ class t3lib_diff {
                $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 @@ class t3lib_diff {
                        }
                        $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 @@ class t3lib_diff {
         * @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 b763cb2..353d1d2 100644 (file)
@@ -58,8 +58,8 @@
  *  499:     function fixed_lgd($string,$origChars,$preStr='...')
  *  524:     function fixed_lgd_pre($string,$chars)
  *  538:     function fixed_lgd_cs($string,$chars)
- *  555:     function breakTextForEmail($str,$implChar="\n",$charWidth=76)
- *  574:     function breakLinesForEmail($str,$implChar="\n",$charWidth=76)
+ *  555:     function breakTextForEmail($str,$implChar=LF,$charWidth=76)
+ *  574:     function breakLinesForEmail($str,$implChar=LF,$charWidth=76)
  *  610:     function cmpIP($baseIP, $list)
  *  626:     function cmpIPv4($baseIP, $list)
  *  668:     function cmpIPv6($baseIP, $list)
  *
  */
 
-
-
-
-
-
-
-
-
-
-
+       // 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);
 
 /**
  * The legendary "t3lib_div" class - Miscellaneous functions for general purpose.
@@ -625,15 +623,15 @@ final class t3lib_div {
         * @deprecated since TYPO3 4.1 - Use PHP function wordwrap()
         * @return      string
         */
-       public static function breakTextForEmail($str,$implChar="\n",$charWidth=76)     {
+       public static function breakTextForEmail($str,$implChar=LF,$charWidth=76)       {
                self::logDeprecatedFunction();
 
-               $lines = explode(chr(10),$str);
+               $lines = explode(LF,$str);
                $outArr=array();
                foreach ($lines as $lStr) {
                        $outArr[] = self::breakLinesForEmail($lStr,$implChar,$charWidth);
                }
-               return implode(chr(10),$outArr);
+               return implode(LF,$outArr);
        }
 
        /**
@@ -646,7 +644,7 @@ final class t3lib_div {
         * @return      string
         * @see breakTextForEmail()
         */
-       public static function breakLinesForEmail($str,$implChar="\n",$charWidth=76)    {
+       public static function breakLinesForEmail($str,$implChar=LF,$charWidth=76)      {
                $lines=array();
                $l=$charWidth;
                $p=0;
@@ -1500,7 +1498,7 @@ final class t3lib_div {
         * @return      string          Formatted for <textarea>-tags
         */
        public static function formatForTextarea($content)      {
-               return chr(10).htmlspecialchars($content);
+               return LF.htmlspecialchars($content);
        }
 
        /**
@@ -2242,14 +2240,14 @@ final class t3lib_div {
        public static function wrapJS($string, $linebreak=TRUE) {
                if(trim($string)) {
                                // <script wrapped in nl?
-                       $cr = $linebreak? "\n" : '';
+                       $cr = $linebreak? LF : '';
 
                                // remove nl from the beginning
                        $string = preg_replace ('/^\n+/', '', $string);
                                // re-ident to one tab using the first line as reference
                        $match = array();
                        if(preg_match('/^(\t+)/',$string,$match)) {
-                               $string = str_replace($match[1],"\t", $string);
+                               $string = str_replace($match[1],TAB, $string);
                        }
                        $string = $cr.'<script type="text/javascript">
 /*<![CDATA[*/
@@ -2360,7 +2358,7 @@ final class t3lib_div {
                }
 
                        // Return XML:
-               return '<?xml version="1.0" encoding="'.htmlspecialchars($charset).'" standalone="yes" ?>'.chr(10).
+               return '<?xml version="1.0" encoding="'.htmlspecialchars($charset).'" standalone="yes" ?>'.LF.
                                self::array2xml($array,'',0,$docTag,0, $options);
        }
 
@@ -2381,7 +2379,7 @@ final class t3lib_div {
         * @param       string          tag-prefix, eg. a namespace prefix like "T3:"
         * @param       integer         Current recursion level. Don't change, stay at zero!
         * @param       string          Alternative document tag. Default is "phparray".
-        * @param       integer         If greater than zero, then the number of spaces corresponding to this number is used for indenting, if less than zero - no indentation, if zero - a single chr(9) (TAB) is used
+        * @param       integer         If greater than zero, then the number of spaces corresponding to this number is used for indenting, if less than zero - no indentation, if zero - a single TAB is used
         * @param       array           Options for the compilation. Key "useNindex" => 0/1 (boolean: whether to use "n0, n1, n2" for num. indexes); Key "useIndexTagForNum" => "[tag for numerical indexes]"; Key "useIndexTagForAssoc" => "[tag for associative indexes"; Key "parentTagMap" => array('parentTag' => 'thisLevelTag')
         * @param       string          Stack data. Don't touch.
         * @return      string          An XML string made from the input content in the array.
@@ -2394,9 +2392,9 @@ final class t3lib_div {
                                                chr(20).chr(21).chr(22).chr(23).chr(24).chr(25).chr(26).chr(27).chr(28).chr(29).
                                                chr(30).chr(31);
                        // Set indenting mode:
-               $indentChar = $spaceInd ? ' ' : chr(9);
+               $indentChar = $spaceInd ? ' ' : TAB;
                $indentN = $spaceInd>0 ? $spaceInd : 1;
-               $nl = ($spaceInd >= 0 ? chr(10) : '');
+               $nl = ($spaceInd >= 0 ? LF : '');
 
                        // Init output variable:
                $output='';
@@ -2715,7 +2713,7 @@ final class t3lib_div {
                require_once(PATH_typo3 . 'contrib/jsmin/jsmin.php');
                try {
                        $error = '';
-                       $script = trim(JSMin::minify(str_replace(chr(13), '', $script)));
+                       $script = trim(JSMin::minify(str_replace(CR, '', $script)));
                }
                catch(JSMinException $e) {
                        $error = 'Error while minifying JavaScript: ' . $e->getMessage();
@@ -2853,12 +2851,12 @@ final class t3lib_div {
                        $method = ($includeHeader == 2) ? 'HEAD' : 'GET';
                        $msg = $method . ' ' . $parsedURL['path'] .
                                        ($parsedURL['query'] ? '?' . $parsedURL['query'] : '') .
-                                       ' HTTP/1.0' . "\r\n" . 'Host: ' .
+                                       ' HTTP/1.0' . CRLF . 'Host: ' .
                                        $parsedURL['host'] . "\r\nConnection: close\r\n";
                        if (is_array($requestHeaders))  {
-                               $msg .= implode("\r\n", $requestHeaders) . "\r\n";
+                               $msg .= implode(CRLF, $requestHeaders) . CRLF;
                        }
-                       $msg .= "\r\n";
+                       $msg .= CRLF;
 
                        fputs($fp, $msg);
                        while (!feof($fp))      {
@@ -2895,7 +2893,7 @@ final class t3lib_div {
                        }
                        $ctx = stream_context_create(array(
                                                'http' => array(
-                                                       'header' => implode("\r\n", $requestHeaders)
+                                                       'header' => implode(CRLF, $requestHeaders)
                                                )
                                        )
                                );
@@ -5112,7 +5110,7 @@ final class t3lib_div {
         * @param       string          Email address to send to. (see PHP function mail())
         * @param       string          Subject line, non-encoded. (see PHP function mail())
         * @param       string          Message content, non-encoded. (see PHP function mail())
-        * @param       string          Headers, separated by chr(10)
+        * @param       string          Headers, separated by LF
         * @param       string          Encoding type: "base64", "quoted-printable", "8bit". Default value is "quoted-printable".
         * @param       string          Charset used in encoding-headers (only if $encoding is set to a valid value which produces such a header)
         * @param       boolean         If set, the header content will not be encoded.
@@ -5127,7 +5125,7 @@ final class t3lib_div {
                if (!$dontEncodeHeader) {
                                // Mail headers must be ASCII, therefore we convert the whole header to either base64 or quoted_printable
                        $newHeaders=array();
-                       foreach (explode(chr(10),$headers) as $line)    {       // Split the header in lines and convert each line separately
+                       foreach (explode(LF,$headers) as $line) {       // Split the header in lines and convert each line separately
                                $parts = explode(': ',$line,2); // Field tags must not be encoded
                                if (count($parts)==2)   {
                                        if (0 == strcasecmp($parts[0], 'from')) {
@@ -5139,7 +5137,7 @@ final class t3lib_div {
                                        $newHeaders[] = $line;  // Should never happen - is such a mail header valid? Anyway, just add the unchanged line...
                                }
                        }
-                       $headers = implode(chr(10),$newHeaders);
+                       $headers = implode(LF,$newHeaders);
                        unset($newHeaders);
 
                        $email = self::encodeHeader($email,$encoding,$charset);         // Email address must not be encoded, but it could be appended by a name which should be so (e.g. "Kasper Skårhøj <kasperYYYY@typo3.com>")
@@ -5148,24 +5146,24 @@ final class t3lib_div {
 
                switch ((string)$encoding)      {
                        case 'base64':
-                               $headers=trim($headers).chr(10).
-                               'Mime-Version: 1.0'.chr(10).
-                               'Content-Type: text/plain; charset="'.$charset.'"'.chr(10).
+                               $headers=trim($headers).LF.
+                               'Mime-Version: 1.0'.LF.
+                               'Content-Type: text/plain; charset="'.$charset.'"'.LF.
                                'Content-Transfer-Encoding: base64';
 
-                               $message=trim(chunk_split(base64_encode($message.chr(10)))).chr(10);    // Adding chr(10) because I think MS outlook 2002 wants it... may be removed later again.
+                               $message=trim(chunk_split(base64_encode($message.LF))).LF;      // Adding LF because I think MS outlook 2002 wants it... may be removed later again.
                        break;
                        case '8bit':
-                               $headers=trim($headers).chr(10).
-                               'Mime-Version: 1.0'.chr(10).
-                               'Content-Type: text/plain; charset='.$charset.chr(10).
+                               $headers=trim($headers).LF.
+                               'Mime-Version: 1.0'.LF.
+                               'Content-Type: text/plain; charset='.$charset.LF.
                                'Content-Transfer-Encoding: 8bit';
                        break;
                        case 'quoted-printable':
                        default:
-                               $headers=trim($headers).chr(10).
-                               'Mime-Version: 1.0'.chr(10).
-                               'Content-Type: text/plain; charset='.$charset.chr(10).
+                               $headers=trim($headers).LF.
+                               'Mime-Version: 1.0'.LF.
+                               'Content-Type: text/plain; charset='.$charset.LF.
                                'Content-Transfer-Encoding: quoted-printable';
 
                                $message=self::quoted_printable($message);
@@ -5175,7 +5173,7 @@ final class t3lib_div {
                // Headers must be separated by CRLF according to RFC 2822, not just LF.
                // But many servers (Gmail, for example) behave incorectly and want only LF.
                // So we stick to LF in all cases.
-               $headers = trim(implode(chr(10), self::trimExplode(chr(10), $headers, true)));  // Make sure no empty lines are there.
+               $headers = trim(implode(LF, self::trimExplode(LF, $headers, true)));    // Make sure no empty lines are there.
 
                $ret = @mail($email, $subject, $message, $headers);
                if (!$ret)      {
@@ -5196,16 +5194,16 @@ final class t3lib_div {
         */
        public static function quoted_printable($string,$maxlen=76)     {
                        // Make sure the string contains only Unix linebreaks
-               $string = str_replace(chr(13).chr(10), chr(10), $string);       // Replace Windows breaks (\r\n)
-               $string = str_replace(chr(13), chr(10), $string);               // Replace Mac breaks (\r)
+               $string = str_replace(CRLF, LF, $string);       // Replace Windows breaks (\r\n)
+               $string = str_replace(CR, LF, $string);         // Replace Mac breaks (\r)
 
-               $linebreak = chr(10);                   // Default line break for Unix systems.
+               $linebreak = LF;                        // Default line break for Unix systems.
                if (TYPO3_OS=='WIN')    {
-                       $linebreak = chr(13).chr(10);   // Line break for Windows. This is needed because PHP on Windows systems send mails via SMTP instead of using sendmail, and thus the linebreak needs to be \r\n.
+                       $linebreak = CRLF;      // Line break for Windows. This is needed because PHP on Windows systems send mails via SMTP instead of using sendmail, and thus the linebreak needs to be \r\n.
                }
 
                $newString = '';
-               $theLines = explode(chr(10),$string);   // Split lines
+               $theLines = explode(LF,$string);        // Split lines
                foreach ($theLines as $val)     {
                        $newVal = '';
                        $theValLen = strlen($val);
@@ -5226,7 +5224,7 @@ final class t3lib_div {
                                }
                        }
                        $newVal = preg_replace('/'.chr(32).'$/','=20',$newVal);         // Replaces a possible SPACE-character at the end of a line
-                       $newVal = preg_replace('/'.chr(9).'$/','=09',$newVal);          // Replaces a possible TAB-character at the end of a line
+                       $newVal = preg_replace('/'.TAB.'$/','=09',$newVal);             // Replaces a possible TAB-character at the end of a line
                        $newString.=$newVal.$linebreak;
                }
                return preg_replace('/'.$linebreak.'$/','',$newString);         // Remove last newline
@@ -5464,7 +5462,7 @@ final class t3lib_div {
                                $file = fopen($destination, 'a');
                                if ($file)     {
                                        flock($file, LOCK_EX);  // try locking, but ignore if not available (eg. on NFS and FAT)
-                                       fwrite($file, date($dateFormat.' '.$timeFormat).$msgLine.chr(10));
+                                       fwrite($file, date($dateFormat.' '.$timeFormat).$msgLine.LF);
                                        flock($file, LOCK_UN);    // release the lock
                                        fclose($file);
                                }
@@ -5473,10 +5471,10 @@ final class t3lib_div {
                        elseif ($type == 'mail')        {
                                list($to,$from) = explode('/',$destination);
                                mail($to, 'Warning - error in TYPO3 installation',
-                                       'Host: '.$TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_div.php']['systemLogHost']."\n".
-                                       'Extension: '.$extKey."\n".
-                                       'Severity: '.$severity."\n".
-                                       "\n".$msg,
+                                       'Host: '.$TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_div.php']['systemLogHost'].LF.
+                                       'Extension: '.$extKey.LF.
+                                       'Severity: '.$severity.LF.
+                                       LF.$msg,
                                        ($from ? 'From: '.$from : '')
                                );
                        }
@@ -5535,7 +5533,7 @@ final class t3lib_div {
                if ($file) {
                        $date = date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'] . ' ' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'] . ': ');
                        flock($file, LOCK_EX);  // try locking, but ignore if not available (eg. on NFS and FAT)
-                       @fwrite($file, $date.$msg.chr(10));
+                       @fwrite($file, $date.$msg.LF);
                        flock($file, LOCK_UN);    // release the lock
                        @fclose($file);
                }
@@ -5607,7 +5605,7 @@ final class t3lib_div {
                $valListCnt = count($valueList);
                foreach ($arr as $key => $value)        {
                        if (!$valListCnt || in_array($key, $valueList)) {
-                               $str .= (string)$key.trim(': '.self::fixed_lgd_cs(str_replace("\n",'|',(string)$value), $valueLength)).'; ';
+                               $str .= (string)$key.trim(': '.self::fixed_lgd_cs(str_replace(LF,'|',(string)$value), $valueLength)).'; ';
                        }
                }
                return $str;
@@ -5723,7 +5721,7 @@ final class t3lib_div {
         */
        static public function quoteJSvalue($value, $withinCData = false)       {
                $escapedValue = addcslashes(
-                       $value, '\'' . '"' . '\\' . chr(9) . chr(10) . chr(13)
+                       $value, '\'' . '"' . '\\' . TAB . LF . CR
                );
                if (!$withinCData) {
                        $escapedValue = htmlspecialchars($escapedValue);
index d1953c6..7c481e7 100644 (file)
@@ -464,7 +464,7 @@ class t3lib_flexformtools {
                $output = t3lib_div::array2xml($array,'',0,'T3FlexForms', $spaceInd, $options);
 
                if ($addPrologue)       {
-                       $output = '<?xml version="1.0" encoding="'.$GLOBALS['LANG']->charSet.'" standalone="yes" ?>'.chr(10).$output;
+                       $output = '<?xml version="1.0" encoding="'.$GLOBALS['LANG']->charSet.'" standalone="yes" ?>'.LF.$output;
                }
 
                return $output;
index fcff4f2..ff0d144 100644 (file)
@@ -144,14 +144,14 @@ class t3lib_formmail extends t3lib_htmlmail {
                                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;
                                                $HTML_val = ($convCharset && strlen($val)) ? $GLOBALS['TSFE']->csConvObj->conv(htmlspecialchars($val),$GLOBALS['TSFE']->renderCharset,$this->charset,1) : htmlspecialchars($val);
 
-                                               $Plain_content.= strtoupper($key).':  '.$space.$Plain_val."\n".$space;
+                                               $Plain_content.= strtoupper($key).':  '.$space.$Plain_val.LF.$space;
                                                $HTML_content.= '<tr><td bgcolor="#eeeeee"><font face="Verdana" size="1"><b>'.strtoupper($key).'</b></font></td><td bgcolor="#eeeeee"><font face="Verdana" size="1">'.nl2br($HTML_val).'&nbsp;</font></td></tr>';
                                        }
                                }
index bafd04d..a280765 100644 (file)
@@ -143,7 +143,7 @@ class t3lib_fullsearch {
                $TDparams=' nowrap="nowrap" class="bgColor4"';
                $tmpCode='
                <table border="0" cellpadding="3" cellspacing="1">
-               <tr'.$TDparams.'><td><select name="storeControl[STORE]" onChange="document.forms[0][\'storeControl[title]\'].value= this.options[this.selectedIndex].value!=0 ? this.options[this.selectedIndex].text : \'\';">'.implode(chr(10),$opt).'</select><input type="submit" name="storeControl[LOAD]" value="Load"></td></tr>
+               <tr'.$TDparams.'><td><select name="storeControl[STORE]" onChange="document.forms[0][\'storeControl[title]\'].value= this.options[this.selectedIndex].value!=0 ? this.options[this.selectedIndex].text : \'\';">'.implode(LF,$opt).'</select><input type="submit" name="storeControl[LOAD]" value="Load"></td></tr>
                <tr'.$TDparams.'><td nowrap><input name="storeControl[title]" value="" type="text" max="80"'.$GLOBALS['SOBE']->doc->formWidth().'><input type="submit" name="storeControl[SAVE]" value="Save" onClick="if (document.forms[0][\'storeControl[STORE]\'].options[document.forms[0][\'storeControl[STORE]\'].selectedIndex].value<0) return confirm(\'Are you sure you want to overwrite the existing query in this action?\');"><input type="submit" name="storeControl[REMOVE]" value="Remove"></td></tr>
                </table>
                ';
@@ -441,7 +441,7 @@ class t3lib_fullsearch {
                                        }
                                }
                                if (count($rowArr))     {
-                                       $out.='<table border="0" cellpadding="2" cellspacing="1" width="100%">'.$this->resultRowTitles($lrow, $TCA[$table], $table).implode(chr(10), $rowArr).'</table>';
+                                       $out.='<table border="0" cellpadding="2" cellspacing="1" width="100%">'.$this->resultRowTitles($lrow, $TCA[$table], $table).implode(LF, $rowArr).'</table>';
                                }
                                if (!$out)      $out='<em>No rows selected!</em>';
                                $cPR['header']='Result';
@@ -458,7 +458,7 @@ class t3lib_fullsearch {
                                        $rowArr[]=$this->csvValues($row, ',', '"', $TCA[$table], $table);
                                }
                                if (count($rowArr))     {
-                                       $out.='<textarea name="whatever" rows="20" wrap="off"'.$GLOBALS['SOBE']->doc->formWidthText($this->formW,'','off').' class="fixed-font">'.t3lib_div::formatForTextarea(implode(chr(10),$rowArr)).'</textarea>';
+                                       $out.='<textarea name="whatever" rows="20" wrap="off"'.$GLOBALS['SOBE']->doc->formWidthText($this->formW,'','off').' class="fixed-font">'.t3lib_div::formatForTextarea(implode(LF,$rowArr)).'</textarea>';
                                        if (!$this->noDownloadB)        {
                                                $out.='<BR><input type="submit" name="download_file" value="Click to download file" onClick="window.location.href=\''.$this->downloadScript.'\';">';            // document.forms[0].target=\'_blank\';
                                        }
@@ -468,7 +468,7 @@ class t3lib_fullsearch {
                                                $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;
                                        }
                                }
@@ -606,7 +606,7 @@ class t3lib_fullsearch {
                                                        $lrow=$row;
                                                }
                                                $GLOBALS['TYPO3_DB']->sql_free_result($res);
-                                               $out.='<table border="0" cellpadding="2" cellspacing="1">'.$this->resultRowTitles($lrow,$conf,$table).implode(chr(10),$rowArr).'</table>';
+                                               $out.='<table border="0" cellpadding="2" cellspacing="1">'.$this->resultRowTitles($lrow,$conf,$table).implode(LF,$rowArr).'</table>';
                                        }
                                        $out.='<HR>';
                                }
@@ -1070,7 +1070,7 @@ class t3lib_fullsearch {
                        // Close header row
                $tableHeader[] = '</tr></thead>';
 
-               return implode($tableHeader, chr(10));
+               return implode($tableHeader, LF);
        }
 
        /**
index 948b65c..2f3a823 100644 (file)
@@ -269,11 +269,11 @@ class t3lib_htmlmail {
 
 
                        // Default line break for Unix systems.
-               $this->linebreak = chr(10);
+               $this->linebreak = LF;
                        // Line break for Windows. This is needed because PHP on Windows systems
                        // send mails via SMTP instead of using sendmail, and thus the linebreak needs to be \r\n.
                if (TYPO3_OS == 'WIN') {
-                       $this->linebreak = chr(13).chr(10);
+                       $this->linebreak = CRLF;
                }
 
                        // Sets the Charset
@@ -561,13 +561,13 @@ class t3lib_htmlmail {
                        // Generate (plain/HTML) / attachments
                        $this->add_header('Content-Type: multipart/mixed;');
                        $this->add_header(' boundary="' . $boundary . '"');
-                       $this->add_message('This is a multi-part message in MIME format.' . "\n");
+                       $this->add_message('This is a multi-part message in MIME format.' . LF);
                        $this->constructMixed($boundary);
                } elseif ($this->theParts['html']['content']) {
                        // Generate plain/HTML mail
                        $this->add_header('Content-Type: ' . $this->getHTMLContentType() . ';');
                        $this->add_header(' boundary="' . $boundary . '"');
-                       $this->add_message('This is a multi-part message in MIME format.' . "\n");
+                       $this->add_message('This is a multi-part message in MIME format.' . LF);
                        $this->constructHTML($boundary);
                } else {
                        // Generate plain only
@@ -612,7 +612,7 @@ class t3lib_htmlmail {
                                $this->add_message($this->makeBase64($media['content']));
                        }
                }
-               $this->add_message('--' . $boundary . '--' . "\n");
+               $this->add_message('--' . $boundary . '--' . LF);
        }
 
 
@@ -662,7 +662,7 @@ class t3lib_htmlmail {
                $this->add_message($this->html_text_header);
                $this->add_message('');
                $this->add_message($this->getContent('html'));
-               $this->add_message('--' . $boundary . '--' . "\n");
+               $this->add_message('--' . $boundary . '--' . LF);
        }
 
 
@@ -686,7 +686,7 @@ class t3lib_htmlmail {
                                }
                        }
                }
-               $this->add_message('--' . $boundary . '--' . "\n");
+               $this->add_message('--' . $boundary . '--' . LF);
        }
 
 
@@ -749,7 +749,7 @@ class t3lib_htmlmail {
                        // Auto response
                if ($this->auto_respond_msg) {
                        $theParts = explode('/',$this->auto_respond_msg,2);
-                       $theParts[1] = str_replace("/",chr(10),$theParts[1]);
+                       $theParts[1] = str_replace("/",LF,$theParts[1]);
                        if ($returnPathPossible) {
                                $mailWasSent = mail($this->from_email,
                                        $theParts[0],
@@ -821,7 +821,7 @@ class t3lib_htmlmail {
                        }
                }
 
-               $this->headers .= $header."\n";
+               $this->headers .= $header.LF;
        }
 
 
@@ -832,7 +832,7 @@ class t3lib_htmlmail {
         * @return      void
         */
        public function add_message($msg) {
-               $this->message .= $msg."\n";
+               $this->message .= $msg.LF;
        }
 
 
@@ -1147,7 +1147,7 @@ class t3lib_htmlmail {
                $pieces = count($textpieces);
                $textstr = $textpieces[0];
                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)) {
@@ -1312,7 +1312,7 @@ class t3lib_htmlmail {
                        while (!feof($fd)) {
                                $line = fgetss($fd, 5000);
                                if (trim($line)) {
-                                       $content .= trim($line) . "\n";
+                                       $content .= trim($line) . LF;
                                }
                        }
                        fclose($fd);
index 933f9bc..6702b94 100644 (file)
@@ -216,7 +216,7 @@ class t3lib_install {
                }
 
                                // 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.
@@ -235,10 +235,10 @@ class t3lib_install {
 
                        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?';
                                }
@@ -274,7 +274,7 @@ class t3lib_install {
         * @see setValueInLocalconfFile()
         */
        function checkForBadString($string)     {
-               return preg_match('/['.chr(10).chr(13).']/',$string) ? FALSE : TRUE;
+               return preg_match('/['.LF.CR.']/',$string) ? FALSE : TRUE;
        }
 
        /**
@@ -285,9 +285,9 @@ class t3lib_install {
         * @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;
        }
@@ -314,7 +314,7 @@ class t3lib_install {
         * @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();
 
@@ -812,7 +812,7 @@ class t3lib_install {
         * @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();
@@ -839,7 +839,7 @@ class t3lib_install {
                                $statementArrayPointer++;
 
                        } elseif ($is_set) {
-                               $statementArray[$statementArrayPointer].= chr(10);
+                               $statementArray[$statementArrayPointer].= LF;
                        }
                }
 
@@ -865,13 +865,13 @@ class t3lib_install {
                                        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 7305dc4..e08eb7a 100644 (file)
@@ -298,7 +298,7 @@ class t3lib_loadDBGroup     {
 
 
                if ($this->MM_table_where) {
-                       $additionalWhere.= "\n".str_replace('###THIS_UID###', intval($uid), $this->MM_table_where);
+                       $additionalWhere.= LF.str_replace('###THIS_UID###', intval($uid), $this->MM_table_where);
                }
                foreach ($this->MM_match_fields as $field => $value) {
                        $additionalWhere.= ' AND '.$field.'='.$GLOBALS['TYPO3_DB']->fullQuoteStr($value, $tableName);
@@ -359,7 +359,7 @@ class t3lib_loadDBGroup     {
                        $additionalWhere = '';
                                // add WHERE clause if configured
                        if ($this->MM_table_where) {
-                               $additionalWhere.= "\n".str_replace('###THIS_UID###', intval($uid), $this->MM_table_where);
+                               $additionalWhere.= LF.str_replace('###THIS_UID###', intval($uid), $this->MM_table_where);
                        }
                                // Select, update or delete only those relations that match the configured fields
                        foreach ($this->MM_match_fields as $field => $value) {
@@ -504,7 +504,7 @@ class t3lib_loadDBGroup     {
                        $additionalWhere = '';
                                // add WHERE clause if configured
                        if ($this->MM_table_where) {
-                               $additionalWhere.= "\n".str_replace('###THIS_UID###', intval($uid), $this->MM_table_where);
+                               $additionalWhere.= LF.str_replace('###THIS_UID###', intval($uid), $this->MM_table_where);
                        }
                                // Select, update or delete only those relations that match the configured fields
                        foreach ($this->MM_match_fields as $field => $value) {
index 311b61e..d55b5ac 100644 (file)
@@ -136,12 +136,12 @@ class t3lib_PageRenderer implements t3lib_Singleton {
                $this->backPath = isset($backPath) ? $backPath : $GLOBALS['BACK_PATH'];
 
                $this->inlineJavascriptWrap = array(
-                       '<script type="text/javascript">' . chr(10) . '/*<![CDATA[*/' . chr(10) . '<!-- ' . chr(10),
-                       '// -->' . chr(10) . '/*]]>*/' . chr(10) . '</script>' . chr(10)
+                       '<script type="text/javascript">' . LF . '/*<![CDATA[*/' . LF . '<!-- ' . LF,
+                       '// -->' . LF . '/*]]>*/' . LF . '</script>' . LF
                );
                $this->inlineCssWrap = array(
-                       '<style type="text/css">' . chr(10) . '/*<![CDATA[*/' . chr(10) . '<!-- ' . chr(10),
-                       '-->' . chr(10) . '/*]]>*/' . chr(10) . '</style>' . chr(10)
+                       '<style type="text/css">' . LF . '/*<![CDATA[*/' . LF . '<!-- ' . LF,
+                       '-->' . LF . '/*]]>*/' . LF . '</style>' . LF
                );
 
        }
@@ -656,7 +656,7 @@ class t3lib_PageRenderer implements t3lib_Singleton {
        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
@@ -676,7 +676,7 @@ class t3lib_PageRenderer implements t3lib_Singleton {
        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
@@ -996,7 +996,7 @@ class t3lib_PageRenderer implements t3lib_Singleton {
                        $this->doConcatenate();
                }
 
-               $metaTags = implode(chr(10), $this->metaTags);
+               $metaTags = implode(LF, $this->metaTags);
 
                if (count($this->cssFiles)) {
                        foreach ($this->cssFiles as $file => $properties) {
@@ -1006,9 +1006,9 @@ class t3lib_PageRenderer implements t3lib_Singleton {
                                        $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;
                                }
                        }
                }
@@ -1017,9 +1017,9 @@ class t3lib_PageRenderer implements t3lib_Singleton {
 
                        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];
@@ -1037,15 +1037,15 @@ class t3lib_PageRenderer implements t3lib_Singleton {
                                }
                                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;
                                        }
                                }
 
@@ -1061,15 +1061,15 @@ class t3lib_PageRenderer implements t3lib_Singleton {
                                        }
                                        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;
                                                }
                                        }
                        }
@@ -1079,15 +1079,15 @@ class t3lib_PageRenderer implements t3lib_Singleton {
                        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;
                                        }
                                }
                        }
@@ -1108,7 +1108,7 @@ class t3lib_PageRenderer implements t3lib_Singleton {
                $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);
@@ -1116,11 +1116,11 @@ class t3lib_PageRenderer implements t3lib_Singleton {
                }
 
                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 = '';
                }
 
@@ -1129,7 +1129,7 @@ class t3lib_PageRenderer implements t3lib_Singleton {
                        '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) . implode(chr(10), $this->inlineComments) . '-->' . chr(10) . chr(10) : '',
+                       'INLINECOMMENT'     => $this->inlineComments ? LF . LF . '<!-- ' . LF . implode(LF, $this->inlineComments) . '-->' . 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,
@@ -1139,8 +1139,8 @@ class t3lib_PageRenderer implements t3lib_Singleton {
                        '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,
@@ -1162,7 +1162,7 @@ class t3lib_PageRenderer implements t3lib_Singleton {
                $out = '';
 
                if ($this->addPrototype) {
-                       $out .= '<script src="' . $this->backPath . 'contrib/prototype/prototype.js" type="text/javascript"></script>' . chr(10);
+                       $out .= '<script src="' . $this->backPath . 'contrib/prototype/prototype.js" type="text/javascript"></script>' . LF;
                        unset($this->jsFiles[$this->backPath . 'contrib/prototype/prototype.js']);
                }
 
@@ -1182,21 +1182,21 @@ class t3lib_PageRenderer implements t3lib_Singleton {
                                $moduleLoadString = '?load=' . implode(',', $mods);
                        }
 
-                       $out .= '<script src="' . $this->backPath . 'contrib/scriptaculous/scriptaculous.js' . $moduleLoadString . '" type="text/javascript"></script>' . chr(10);
+                       $out .= '<script src="' . $this->backPath . 'contrib/scriptaculous/scriptaculous.js' . $moduleLoadString . '" type="text/javascript"></script>' . LF;
                        unset($this->jsFiles[$this->backPath . 'contrib/scriptaculous/scriptaculous.js' . $moduleLoadString]);
                }
 
                        // include extCore
                if ($this->addExtCore) {
-                       $out .= '<script src="' . $this->backPath . 'contrib/extjs/ext-core' . ($this->enableExtCoreDebug ? '-debug' : '') . '.js" type="text/javascript"></script>' . chr(10);
+                       $out .= '<script src="' . $this->backPath . 'contrib/extjs/ext-core' . ($this->enableExtCoreDebug ? '-debug' : '') . '.js" type="text/javascript"></script>' . 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 .= '<script src="' . $this->backPath . 'contrib/extjs/adapter/' . ($this->enableExtJsDebug ? str_replace('.js', '-debug.js', $this->extJSadapter) : $this->extJSadapter) . '" type="text/javascript"></script>' . chr(10);
-                       $out .= '<script src="' . $this->backPath . 'contrib/extjs/ext-all' . ($this->enableExtJsDebug ? '-debug' : '') . '.js" type="text/javascript"></script>' . chr(10);
+                       $out .= '<script src="' . $this->backPath . 'contrib/extjs/adapter/' . ($this->enableExtJsDebug ? str_replace('.js', '-debug.js', $this->extJSadapter) : $this->extJSadapter) . '" type="text/javascript"></script>' . LF;
+                       $out .= '<script src="' . $this->backPath . 'contrib/extjs/ext-all' . ($this->enableExtJsDebug ? '-debug' : '') . '.js" type="text/javascript"></script>' . LF;
 
                                // add extJS localization
                        $localeMap = $this->csConvObj->isoArray; // load standard ISO mapping and modify for use with ExtJS
@@ -1211,7 +1211,7 @@ class t3lib_PageRenderer implements t3lib_Singleton {
                                // TODO autoconvert file from UTF8 to current BE charset if necessary!!!!
                        $extJsLocaleFile = 'contrib/extjs/locale/ext-lang-' . $extJsLang . '.js';
                        if (file_exists(PATH_typo3 . $extJsLocaleFile)) {
-                               $out .= '<script src="' . $this->backPath . $extJsLocaleFile . '" type="text/javascript" charset="utf-8"></script>' . chr(10);
+                               $out .= '<script src="' . $this->backPath . $extJsLocaleFile . '" type="text/javascript" charset="utf-8"></script>' . LF;
                        }
 
 
@@ -1245,10 +1245,10 @@ class t3lib_PageRenderer implements t3lib_Singleton {
 
                        $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);
 
@@ -1342,7 +1342,7 @@ class t3lib_PageRenderer implements t3lib_Singleton {
                                                        $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 566c663..b646a2a 100644 (file)
@@ -65,7 +65,7 @@
  * 1038:     function caseShift($str,$flag,$cacheKey='')
  * 1065:     function compileTagAttribs($tagAttrib,$meta=array(), $xhtmlClean=0)
  * 1093:     function get_tag_attributes_classic($tag,$deHSC=0)
- * 1106:     function indentLines($content, $number=1, $indentChar="\t")
+ * 1106:     function indentLines($content, $number=1, $indentChar=TAB)
  * 1123:     function HTMLparserConfig($TSconfig,$keepTags=array())
  * 1247:     function XHTML_clean($content)
  * 1269:     function processTag($value,$conf,$endTag,$protected=0)
@@ -1233,13 +1233,13 @@ class t3lib_parsehtml   {
         * @param       string          Indent character/string
         * @return      string          Indented code (typ. HTML)
         */
-       function indentLines($content, $number=1, $indentChar="\t")     {
+       function indentLines($content, $number=1, $indentChar=TAB)      {
                $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 28476ee..cacf9e8 100644 (file)
@@ -275,7 +275,7 @@ class t3lib_parsehtml_proc extends t3lib_parsehtml {
 
                        // 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 @@ class t3lib_parsehtml_proc extends t3lib_parsehtml {
                                                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 @@ class t3lib_parsehtml_proc extends t3lib_parsehtml {
                                                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 @@ class t3lib_parsehtml_proc extends t3lib_parsehtml {
 
                        // 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:
@@ -826,7 +826,7 @@ class t3lib_parsehtml_proc extends t3lib_parsehtml {
                        // Traverse the blocks
                foreach($blockSplit as $k => $v)        {
                        $cc++;
-                       $lastBR = $cc==$aC ? '' : chr(10);
+                       $lastBR = $cc==$aC ? '' : LF;
 
                        if ($k%2)       {       // Inside block:
 
@@ -847,23 +847,23 @@ class t3lib_parsehtml_proc extends t3lib_parsehtml {
                                                        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]='<typolist'.$params.'>'.chr(10).implode(chr(10),$parts).chr(10).'</typolist>'.$lastBR;
+                                                               $blockSplit[$k]='<typolist'.$params.'>'.LF.implode(LF,$parts).LF.'</typolist>'.$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':
@@ -898,17 +898,17 @@ class t3lib_parsehtml_proc extends t3lib_parsehtml {
                                                        }
                                                } 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]);
                        }
@@ -976,12 +976,12 @@ class t3lib_parsehtml_proc extends t3lib_parsehtml {
                                        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).
-                                                                                               '<li>'.implode('</li>'.chr(10).'<li>',$lines).'</li>'.
+                                                       $blockSplit[$k] = '<'.$typ.'>'.LF.
+                                                                                               '<li>'.implode('</li>'.LF.'<li>',$lines).'</li>'.
                                                                                                '</'.$typ.'>';
                                                }
                                        break;
@@ -998,12 +998,12 @@ class t3lib_parsehtml_proc extends t3lib_parsehtml {
                                                }
                                        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)   {
@@ -1013,7 +1013,7 @@ class t3lib_parsehtml_proc extends t3lib_parsehtml {
                                }
                        }
                }
-               return implode(chr(10),$blockSplit);
+               return implode(LF,$blockSplit);
        }
 
        /**
@@ -1199,7 +1199,7 @@ class t3lib_parsehtml_proc extends t3lib_parsehtml {
        }
 
        /**
-        * This resolves the $value into parts based on <div></div>-sections and <p>-sections and <br />-tags. These are returned as lines separated by chr(10).
+        * This resolves the $value into parts based on <div></div>-sections and <p>-sections and <br />-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.
@@ -1290,7 +1290,7 @@ class t3lib_parsehtml_proc extends t3lib_parsehtml {
                                                }
 
                                                        // 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'))               {
@@ -1301,7 +1301,7 @@ class t3lib_parsehtml_proc extends t3lib_parsehtml {
                                        }
                                }
                                        // 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 &nbsp; possibly) then just make it pure blank.
                                        // But, prevent filtering of lines that are blank in sense above, but whose tags contain attributes.
@@ -1317,7 +1317,7 @@ class t3lib_parsehtml_proc extends t3lib_parsehtml {
                }
 
                        // Return value:
-               return $returnArray ? $divSplit : implode(chr(10),$divSplit);
+               return $returnArray ? $divSplit : implode(LF,$divSplit);
        }
 
        /**
@@ -1337,8 +1337,8 @@ class t3lib_parsehtml_proc extends t3lib_parsehtml {
                $hSC = $this->procOptions['dontHSC_rte'] ? 0 : 1;       // Default: re-convert literals to characters (that is &lt; 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:
@@ -1360,7 +1360,7 @@ class t3lib_parsehtml_proc extends t3lib_parsehtml {
                }
 
                        // Implode result:
-               return implode(chr(10),$parts);
+               return implode(LF,$parts);
        }
 
        /**
index 7f17f8e..6ad5800 100644 (file)
@@ -1183,13 +1183,13 @@ class t3lib_queryGenerator      {
                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 332820f..ca4f867 100644 (file)
@@ -368,7 +368,7 @@ class t3lib_readmail {
        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 @@ class t3lib_readmail {
                        }
                        unset($lines[$k]);
                }
-               if (!$limit)    $headers['CONTENT']=ltrim(implode(chr(10),$lines));
+               if (!$limit)    $headers['CONTENT']=ltrim(implode(LF,$lines));
                return $headers;
        }
 
index 0069850..ade48c0 100644 (file)
@@ -715,7 +715,7 @@ class t3lib_refindex {
 
                                                                        // 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 @@ class t3lib_refindex {
 
                $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 @@ class t3lib_refindex {
                                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 @@ class t3lib_refindex {
                        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 @@ class t3lib_refindex {
                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 7236d4e..2d2ded4 100644 (file)
@@ -641,7 +641,7 @@ class t3lib_sqlengine extends t3lib_sqlparser {
                                $itemKeys = array_intersect($itemKeys, $subSelKeys);
                        }
                } else {
-                       $comp = strtoupper(str_replace(array(' ',"\t","\r","\n"),'',$config['comparator']));
+                       $comp = strtoupper(str_replace(array(' ',TAB,CR,LF),'',$config['comparator']));
                        $mod = strtoupper($config['modifier']);
                        switch($comp)   {
                                case 'NOTLIKE':
index 677b9ba..1492bd6 100644 (file)
@@ -135,7 +135,7 @@ class t3lib_sqlparser {
                        // Finding starting keyword of string:
                $_parseString = $parseString;   // Protecting original string...
                $keyword = $this->nextPart($_parseString, '^(SELECT|UPDATE|INSERT[[:space:]]+INTO|DELETE[[:space:]]+FROM|EXPLAIN|DROP[[:space:]]+TABLE|CREATE[[:space:]]+TABLE|CREATE[[:space:]]+DATABASE|ALTER[[:space:]]+TABLE|TRUNCATE[[:space:]]+TABLE)[[:space:]]+');
-               $keyword = strtoupper(str_replace(array(' ',"\t","\r","\n"),'',$keyword));
+               $keyword = strtoupper(str_replace(array(' ',TAB,CR,LF),'',$keyword));
 
                switch($keyword)        {
                        case 'SELECT':
@@ -481,7 +481,7 @@ class t3lib_sqlparser {
                                // While the parseString is not yet empty:
                        while(strlen($parseString)>0)   {
                                if ($key = $this->nextPart($parseString, '^(KEY|PRIMARY KEY|UNIQUE KEY|UNIQUE)([[:space:]]+|\()'))      {       // Getting key
-                                       $key = strtoupper(str_replace(array(' ',"\t","\r","\n"),'',$key));
+                                       $key = strtoupper(str_replace(array(' ',TAB,CR,LF),'',$key));
 
                                        switch($key)    {
                                                case 'PRIMARYKEY':
@@ -557,7 +557,7 @@ class t3lib_sqlparser {
 
                if ($result['TABLE'])   {
                        if ($result['action'] = $this->nextPart($parseString, '^(CHANGE|DROP[[:space:]]+KEY|DROP[[:space:]]+PRIMARY[[:space:]]+KEY|ADD[[:space:]]+KEY|ADD[[:space:]]+PRIMARY[[:space:]]+KEY|DROP|ADD|RENAME)([[:space:]]+|\()'))        {
-                               $actionKey = strtoupper(str_replace(array(' ',"\t","\r","\n"),'',$result['action']));
+                               $actionKey = strtoupper(str_replace(array(' ',TAB,CR,LF),'',$result['action']));
 
                                        // Getting field:
                                if (t3lib_div::inList('ADDPRIMARYKEY,DROPPRIMARYKEY',$actionKey) || $fieldKey = $this->nextPart($parseString, '^([[:alnum:]_]+)[[:space:]]+'))  {
@@ -832,7 +832,7 @@ class t3lib_sqlparser {
 
                                        // Looking for stop-keywords:
                                if ($stopRegex && $this->lastStopKeyWord = $this->nextPart($parseString, $stopRegex))   {
-                                       $this->lastStopKeyWord = strtoupper(str_replace(array(' ',"\t","\r","\n"),'',$this->lastStopKeyWord));
+                                       $this->lastStopKeyWord = strtoupper(str_replace(array(' ',TAB,CR,LF),'',$this->lastStopKeyWord));
                                        return $stack;
                                }
 
@@ -917,7 +917,7 @@ class t3lib_sqlparser {
                        if ($stack[$pnt]['table'] = $this->nextPart($parseString,'^([[:alnum:]_]+)(,|[[:space:]]+)')) {
                                        // Looking for stop-keywords before fetching potential table alias:
                                if ($stopRegex && ($this->lastStopKeyWord = $this->nextPart($parseString, $stopRegex))) {
-                                       $this->lastStopKeyWord = strtoupper(str_replace(array(' ',"\t","\r","\n"), '', $this->lastStopKeyWord));
+                                       $this->lastStopKeyWord = strtoupper(str_replace(array(' ',TAB,CR,LF), '', $this->lastStopKeyWord));
                                        return $stack;
                                }
                                if (!preg_match('/^(LEFT|RIGHT|JOIN|INNER)[[:space:]]+/i', $parseString)) {
@@ -969,7 +969,7 @@ class t3lib_sqlparser {
 
                                // Looking for stop-keywords:
                        if ($stopRegex && $this->lastStopKeyWord = $this->nextPart($parseString, $stopRegex)) {
-                               $this->lastStopKeyWord = strtoupper(str_replace(array(' ',"\t","\r","\n"), '', $this->lastStopKeyWord));
+                               $this->lastStopKeyWord = strtoupper(str_replace(array(' ',TAB,CR,LF), '', $this->lastStopKeyWord));
                                return $stack;
                        }
 
@@ -1230,7 +1230,7 @@ class t3lib_sqlparser {
 
                                                // Looking for stop-keywords:
                                        if ($stopRegex && $this->lastStopKeyWord = $this->nextPart($parseString, $stopRegex)) {
-                                               $this->lastStopKeyWord = strtoupper(str_replace(array(' ',"\t","\r","\n"), '', $this->lastStopKeyWord));
+                                               $this->lastStopKeyWord = strtoupper(str_replace(array(' ',TAB,CR,LF), '', $this->lastStopKeyWord));
                                                return $stack[0];
                                        } else {
                                                return $this->parseError('No operator, but parsing not finished in parseWhereClause().', $parseString);
@@ -1278,7 +1278,7 @@ class t3lib_sqlparser {
 
                                // Looking for keywords
                        while($keyword = $this->nextPart($parseString,'^(DEFAULT|NOT[[:space:]]+NULL|AUTO_INCREMENT|UNSIGNED)([[:space:]]+|,|\))'))     {
-                               $keywordCmp = strtoupper(str_replace(array(' ',"\t","\r","\n"),'',$keyword));
+                               $keywordCmp = strtoupper(str_replace(array(' ',TAB,CR,LF),'',$keyword));
 
                                $result['featureIndex'][$keywordCmp]['keyword'] = $keyword;
 
@@ -1339,7 +1339,7 @@ class t3lib_sqlparser {
        protected function getValue(&$parseString, $comparator = '', $mode = '') {
                $value = '';
 
-               if (t3lib_div::inList('NOTIN,IN,_LIST',strtoupper(str_replace(array(' ',"\n","\r","\t"),'',$comparator))))      {       // List of values:
+               if (t3lib_div::inList('NOTIN,IN,_LIST',strtoupper(str_replace(array(' ',LF,CR,TAB),'',$comparator))))   {       // List of values:
                        if ($this->nextPart($parseString,'^([(])'))     {
                                $listValues = array();
                                $comma=',';
@@ -1694,7 +1694,7 @@ class t3lib_sqlparser {
                $query = 'ALTER TABLE '.$components['TABLE'].' '.$components['action'].' '.($components['FIELD']?$components['FIELD']:$components['KEY']);
 
                        // Based on action, add the final part:
-               switch(strtoupper(str_replace(array(' ',"\t","\r","\n"),'',$components['action'])))     {
+               switch(strtoupper(str_replace(array(' ',TAB,CR,LF),'',$components['action'])))  {
                        case 'ADD':
                                $query.=' '.$this->compileFieldCfg($components['definition']);
                        break;
@@ -1929,7 +1929,7 @@ class t3lib_sqlparser {
                                                $output .= ' ' . $v['comparator'];
 
                                                        // Detecting value type; list or plain:
-                                               if (t3lib_div::inList('NOTIN,IN', strtoupper(str_replace(array(' ', "\t", "\r", "\n"), '', $v['comparator'])))) {
+                                               if (t3lib_div::inList('NOTIN,IN', strtoupper(str_replace(array(' ', TAB, CR, LF), '', $v['comparator'])))) {
                                                        if (isset($v['subquery'])) {
                                                                $output .= ' (' . $this->compileSELECT($v['subquery']) . ')';   
                                                        } else {
@@ -2062,10 +2062,10 @@ class t3lib_sqlparser {
 #              $str1 = stripslashes($str1);
 #              $str2 = stripslashes($str2);
 
-               if (strcmp(str_replace(array(' ',"\t","\r","\n"),'',$this->trimSQL($str1)),str_replace(array(' ',"\t","\r","\n"),'',$this->trimSQL($str2))))    {
+               if (strcmp(str_replace(array(' ',TAB,CR,LF),'',$this->trimSQL($str1)),str_replace(array(' ',TAB,CR,LF),'',$this->trimSQL($str2))))      {
                        return array(
-                                       str_replace(array(' ',"\t","\r","\n"),' ',$str),
-                                       str_replace(array(' ',"\t","\r","\n"),' ',$newStr),
+                                       str_replace(array(' ',TAB,CR,LF),' ',$str),
+                                       str_replace(array(' ',TAB,CR,LF),' ',$newStr),
                                );
                }
        }
index 23f36a6..229181e 100644 (file)
@@ -848,7 +848,7 @@ class t3lib_superadmin {
                                // List of those extension keys in a form field:
                        $extensionKeysCollect = array_unique($extensionKeysCollect);
                        asort($extensionKeysCollect);
-                       $out.='<form action=""><textarea cols="80" rows="10">'.implode(chr(10),$extensionKeysCollect).'</textarea></form>';
+                       $out.='<form action=""><textarea cols="80" rows="10">'.implode(LF,$extensionKeysCollect).'</textarea></form>';
 
                                // USER extension (prefixed "user_")
                        $out.='<br />
@@ -1094,7 +1094,7 @@ class t3lib_superadmin {
 
                        // debug($row);
                }
-               return '<pre>'.implode(chr(10),$lines).'</pre>';
+               return '<pre>'.implode(LF,$lines).'</pre>';
        }
 
        /**
index 1648547..97629fd 100644 (file)
@@ -326,8 +326,8 @@ class t3lib_TCEforms        {
 
                $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
@@ -1240,7 +1240,7 @@ class t3lib_TCEforms      {
                $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;
                }
 
@@ -1633,11 +1633,11 @@ class t3lib_TCEforms    {
                                } else {
                                        if (count($optGroupStart)) {
                                                if($optGroupOpen) { // Closing last optgroup before next one starts
-                                                       $opt[]='</optgroup>' . "\n";
+                                                       $opt[]='</optgroup>' . LF;
                                                }
                                                $opt[]= '<optgroup label="'.t3lib_div::deHSCentities(htmlspecialchars($optGroupStart[0])).'"'.
                                                                ($optGroupStart[1] ? ' style="'.htmlspecialchars($optGroupStart[1]).'"' : '').
-                                                               ' class="c-divider">' . "\n";
+                                                               ' class="c-divider">' . LF;
                                                $optGroupOpen = true;
                                                $c--;
                                                $optGroupStart = array();
@@ -1645,7 +1645,7 @@ class t3lib_TCEforms      {
                                        $opt[]= '<option value="'.htmlspecialchars($p[1]).'"'.
                                                        $sM.
                                                        ($styleAttrValue ? ' style="'.htmlspecialchars($styleAttrValue).'"' : '').
-                                                       '>'.t3lib_div::deHSCentities(htmlspecialchars($p[0])).'</option>' . "\n";
+                                                       '>'.t3lib_div::deHSCentities(htmlspecialchars($p[0])).'</option>' . LF;
                                }
                        }
 
@@ -2359,7 +2359,7 @@ class t3lib_TCEforms      {
                                $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;
                                }
                        }
@@ -4613,7 +4613,7 @@ class t3lib_TCEforms      {
                                                                // Description texts:
                                                        if ($this->edit_showFieldHelp)  {
                                                                $descr = $GLOBALS['LANG']->moduleLabels['labels'][$theMod.'_tablabel'].
-                                                                                       chr(10).
+                                                                                       LF.
                                                                                        $GLOBALS['LANG']->moduleLabels['labels'][$theMod.'_tabdescr'];
                                                        }
 
@@ -5446,21 +5446,21 @@ class t3lib_TCEforms    {
                        // $this->additionalJS_submit:
                if ($this->additionalJS_submit) {
                        $additionalJS_submit = implode('', $this->additionalJS_submit);
-                       $additionalJS_submit = str_replace("\r", '', $additionalJS_submit);
-                       $additionalJS_submit = str_replace("\n", '', $additionalJS_submit);
+                       $additionalJS_submit = str_replace(CR, '', $additionalJS_submit);
+                       $additionalJS_submit = str_replace(LF, '', $additionalJS_submit);
                        $out .= '
                        TBE_EDITOR.addActionChecks("submit", "'.addslashes($additionalJS_submit).'");
                        ';
                }
 
-               $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 325b923..8bb097b 100644 (file)
@@ -1187,7 +1187,7 @@ class t3lib_TCEmain       {
                                        $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:
@@ -4330,7 +4330,7 @@ class t3lib_TCEmain       {
                        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");
                                }
index 8e4945c..8e71b79 100644 (file)
@@ -82,7 +82,7 @@ class t3lib_TSparser {
 
                // 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 @@ class t3lib_TSparser {
         * @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 @@ class t3lib_TSparser {
                                        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 @@ class t3lib_TSparser {
 
                                                                        $tsFuncArg = str_replace(
                                                                                array('\\\\', '\n','\t'),
-                                                                               array('\\', chr(10),chr(9)),
+                                                                               array('\\', LF,TAB),
                                                                                $tsFuncArg
                                                                        );
 
@@ -371,7 +371,7 @@ class t3lib_TSparser {
                                                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 @@ class t3lib_TSparser {
                $splitStr='<INCLUDE_TYPOSCRIPT:';
                if (strstr($string,$splitStr))  {
                        $newString='';
-                       $allParts = explode($splitStr,chr(10).$string.chr(10)); // adds line break char before/after
+                       $allParts = explode($splitStr,LF.$string.LF);   // adds line break char before/after
                        foreach ($allParts as $c => $v) {
                                if (!$c)        {        // first goes through
                                        $newString.=$v;
@@ -526,7 +526,7 @@ class t3lib_TSparser {
                                        $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 @@ class t3lib_TSparser {
                                                                                                $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 @@ class t3lib_TSparser {
                $this->syntaxHighLight=1;
                $this->highLightData=array();
                $this->error=array();
-               $string = str_replace(chr(13),'',$string);              // This is done in order to prevent empty <span>..</span> 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 <span>..</span> sections around CR content. Should not do anything but help lessen the amount of HTML code.
 
                $this->parse($string);
 
@@ -699,7 +699,7 @@ class t3lib_TSparser {
                        $lines[] = $lineC;
                }
 
-               return '<pre class="ts-hl">'.implode(chr(10),$lines).'</pre>';
+               return '<pre class="ts-hl">'.implode(LF,$lines).'</pre>';
        }
 }
 
index 920e674..f6c8128 100644 (file)
@@ -466,7 +466,7 @@ class t3lib_tsparser_ext extends t3lib_TStemplate   {
                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 @@ class t3lib_tsparser_ext extends t3lib_TStemplate {
                $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 @@ class t3lib_tsparser_ext extends t3lib_TStemplate   {
         * @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 @@ class t3lib_tsparser_ext extends t3lib_TStemplate   {
                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 @@ class t3lib_tsparser_ext extends t3lib_TStemplate {
         */
        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 @@ class t3lib_tsparser_ext extends t3lib_TStemplate {
                        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 a14f4ef..70fd97f 100644 (file)
@@ -208,7 +208,7 @@ class t3lib_tsStyleConfig extends t3lib_tsparser_ext        {
         */
        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 bfea913..37147bb 100644 (file)
@@ -616,7 +616,7 @@ class t3lib_TStemplate      {
                        '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.
@@ -1012,7 +1012,7 @@ class t3lib_TStemplate    {
                }
                        // 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 82c991e..35b0822 100644 (file)
@@ -1201,7 +1201,7 @@ class t3lib_userAuthGroup extends t3lib_userAuth {
                                // 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
@@ -1459,12 +1459,12 @@ class t3lib_userAuthGroup extends t3lib_userAuth {
        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;
        }
 
@@ -1809,7 +1809,7 @@ This is a dump of the failures:
                                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 c62c35e..1b289c4 100644 (file)
@@ -120,7 +120,7 @@ class t3lib_xml {
         * @return      string
         */
        function getResult()    {
-               $content = implode(chr(10),$this->lines);
+               $content = implode(LF,$this->lines);
                return $this->output($content);
        }
 
@@ -209,7 +209,7 @@ class t3lib_xml {
                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;
        }
@@ -245,7 +245,7 @@ class t3lib_xml {
        /**
         * Internal function for adding the actual content of the $row from $table to the internal structure.
         * Notice that only fields from $table that are listed in $this->XML_recFields[$table] (set by setRecFields()) will be rendered (and in the order found in that array!)
-        * Content from the row will be htmlspecialchar()'ed, UTF-8 encoded and have chr(10) (newlines) exchanged for '<newline/>' tags. The element name for a value equals the fieldname from the record.
+        * Content from the row will be htmlspecialchar()'ed, UTF-8 encoded and have LF (newlines) exchanged for '<newline/>' tags. The element name for a value equals the fieldname from the record.
         *
         * @param       string          Table name
         * @param       array           Row from table to add.
@@ -273,13 +273,13 @@ class t3lib_xml {
        }
 
        /**
-        * Substitutes chr(10) characters with a '<newline/>' tag.
+        * Substitutes LF characters with a '<newline/>' tag.
         *
         * @param       string          Input value
         * @return      string          Processed input value
         */
        function substNewline($string)  {
-               return str_replace(chr(10),'<newline/>',$string);
+               return str_replace(LF,'<newline/>',$string);
        }
 
        /**
index a1b902c..ddaeed0 100644 (file)
@@ -130,8 +130,8 @@ class t3lib_error_DebugExceptionHandler extends t3lib_error_AbstractExceptionHan
                $exceptionCodeNumber = ($exception->getCode() > 0) ? '#' . $exception->getCode() . ': ' : '';
                $this->writeLogEntries($exception, self::CONTEXT_CLI);
 
-               echo "\nUncaught TYPO3 Exception " . $exceptionCodeNumber . $exception->getMessage() . "\n";
-               echo "thrown in file " . $filePathAndName . "\n";
+               echo "\nUncaught TYPO3 Exception " . $exceptionCodeNumber . $exception->getMessage() . LF;
+               echo "thrown in file " . $filePathAndName . LF;
                echo "in line " . $exception->getLine() . "\n\n";
        }
 
@@ -158,7 +158,7 @@ class t3lib_error_DebugExceptionHandler extends t3lib_error_AbstractExceptionHan
                                                        $preparedArgument = (strlen($argument) < 100) ? $argument : substr($argument, 0, 50) . '#tripleDot#' . substr($argument, -50);
                                                        $preparedArgument = htmlspecialchars($preparedArgument);
                                                        $preparedArgument = str_replace('#tripleDot#', '<span style="color:white;">&hellip;</span>', $preparedArgument);
-                                                       $preparedArgument = str_replace(chr(10), '<span style="color:white;">&crarr;</span>', $preparedArgument);
+                                                       $preparedArgument = str_replace(LF, '<span style="color:white;">&crarr;</span>', $preparedArgument);
                                                        $arguments .= '"<span style="color:#FF8700;" title="' . htmlspecialchars($argument) . '">' . $preparedArgument . '</span>"';
                                                } elseif (is_numeric($argument)) {
                                                        $arguments .= '<span style="color:#FF8700;">' . (string)$argument . '</span>';
@@ -199,7 +199,7 @@ class t3lib_error_DebugExceptionHandler extends t3lib_error_AbstractExceptionHan
                                if ($endLine > $startLine) {
                                        $codeSnippet = '<br /><span style="font-size:10px;">' . $filePathAndName . ':</span><br /><pre>';
                                        for ($line = $startLine; $line < $endLine; $line++) {
-                                               $codeLine = str_replace("\t", ' ', $phpFile[$line-1]);
+                                               $codeLine = str_replace(TAB, ' ', $phpFile[$line-1]);
 
                                                if ($line === $lineNumber) {
                                                        $codeSnippet .= '</pre><pre style="background-color: #F1F1F1; color: black;">';
index 831fc93..062e7b7 100644 (file)
@@ -96,8 +96,8 @@ class regularexpression_testcase extends tx_phpunit_testcase {
         */
        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 c9c5989..d7cc0b4 100644 (file)
@@ -92,7 +92,7 @@ class t3lib_div_testcase extends tx_phpunit_testcase {
         * @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);
 
@@ -820,7 +820,7 @@ class t3lib_div_testcase extends tx_phpunit_testcase {
        public function quoteJSvalueEscapesTab() {
                $this->assertEquals(
                        "'" . '\t' . "'",
-                       t3lib_div::quoteJSvalue(chr(9))
+                       t3lib_div::quoteJSvalue(TAB)
                );
        }
 
@@ -830,7 +830,7 @@ class t3lib_div_testcase extends tx_phpunit_testcase {
        public function quoteJSvalueEscapesLinefeed() {
                $this->assertEquals(
                        "'" . '\n' . "'",
-                       t3lib_div::quoteJSvalue(chr(10))
+                       t3lib_div::quoteJSvalue(LF)
                );
        }
 
@@ -840,7 +840,7 @@ class t3lib_div_testcase extends tx_phpunit_testcase {
        public function quoteJSvalueEscapesCarriageReturn() {
                $this->assertEquals(
                        "'" . '\r' . "'",
-                       t3lib_div::quoteJSvalue(chr(13))
+                       t3lib_div::quoteJSvalue(CR)
                );
        }
 
index 039573e..bb44616 100644 (file)
@@ -375,7 +375,7 @@ class t3lib_PageRenderer_testcase extends tx_phpunit_testcase {
        */
        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();
@@ -424,7 +424,7 @@ class t3lib_PageRenderer_testcase extends tx_phpunit_testcase {
        */
     public function testLoadExtJS() {
 
-               $expectedReturnValue = '<script src="contrib/extjs/adapter/jquery/ext-jquery-adapter.js" type="text/javascript"></script>' . chr(10) . '<script src="contrib/extjs/ext-all.js" type="text/javascript"></script>';
+               $expectedReturnValue = '<script src="contrib/extjs/adapter/jquery/ext-jquery-adapter.js" type="text/javascript"></script>' . LF . '<script src="contrib/extjs/ext-all.js" type="text/javascript"></script>';
                $this->fixture->loadExtJS(TRUE, TRUE, 'jquery');
                $out = $this->fixture->render();
 
@@ -456,7 +456,7 @@ class t3lib_PageRenderer_testcase extends tx_phpunit_testcase {
        */
        public function testEnableExtJsDebug() {
 
-               $expectedReturnValue = '<script src="contrib/extjs/adapter/jquery/ext-jquery-adapter.js" type="text/javascript"></script>' . chr(10) . '<script src="contrib/extjs/ext-all-debug.js" type="text/javascript"></script>';
+               $expectedReturnValue = '<script src="contrib/extjs/adapter/jquery/ext-jquery-adapter.js" type="text/javascript"></script>' . LF . '<script src="contrib/extjs/ext-all-debug.js" type="text/javascript"></script>';
                $this->fixture->loadExtJS(TRUE, TRUE, 'jquery');
                $this->fixture->enableExtJsDebug();
                $out = $this->fixture->render();
index 24eff76..13caa0f 100644 (file)
@@ -938,7 +938,7 @@ class SC_alt_doc {
 
                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;
        }
@@ -1031,7 +1031,7 @@ class SC_alt_doc {
                if (count($this->tceforms->commentMessages))    {
                        $tceformMessages = '
                                <!-- TCEFORM messages
-                               '.htmlspecialchars(implode(chr(10),$this->tceforms->commentMessages)).'
+                               '.htmlspecialchars(implode(LF,$this->tceforms->commentMessages)).'
                                -->
                        ';
                }
index 651df5e..0f57bc5 100644 (file)
@@ -134,7 +134,7 @@ class SC_alt_main {
 
                $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'));
@@ -298,7 +298,7 @@ class SC_alt_main {
                var acc;
                for (i in obj) {
                        if (obj[i])     {
-                               acc+=i+":  "+obj[i]+"\n";
+                               acc+=i+":  "+obj[i]+LF;
                        }
                }
                alert("Object: "+name+"\n\n"+acc);
index 6d4e580..56483a4 100644 (file)
@@ -139,7 +139,7 @@ class SC_alt_topmenu_dummy {
                                        <tr>';
 
                        foreach ($contentArray as $key=>$menucontent)   {
-                               $this->content .= implode(chr(10), $menucontent);
+                               $this->content .= implode(LF, $menucontent);
                        }
 
                        $this->content.='
index a5ef9a6..c54070f 100644 (file)
@@ -336,7 +336,7 @@ class TYPO3backend {
 
                $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 042ac68..ccb5813 100644 (file)
@@ -79,7 +79,7 @@ class BackendSearchMenu implements backend_toolbarItem {
                $searchMenu[] = '<input type="text" id="search-query" name="search-query" value="" />';
                $searchMenu[] = '</div>';
 
-               return implode("\n", $searchMenu);
+               return implode(LF, $searchMenu);
        }
 
        /**
index c174a93..0e1113e 100644 (file)
@@ -147,7 +147,7 @@ class ClearCacheMenu implements backend_toolbarItem {
 
                $cacheMenu[] = '</ul>';
 
-               return implode("\n", $cacheMenu);
+               return implode(LF, $cacheMenu);
        }
 
        /**
index ff83eff..cc74486 100644 (file)
@@ -158,11 +158,11 @@ class ModuleMenu {
                                        $menu .= $this->renderSubModules($moduleData['subitems'], $menuState);
                                }
 
-                               $menu .= '</li>' . "\n";
+                               $menu .= '</li>' . LF;
                        }
                }
 
-               return ($wrapInUl ? '<ul id="typo3-menu">' . "\n".$menu.'</ul>' . "\n" : $menu);
+               return ($wrapInUl ? '<ul id="typo3-menu">' . LF.$menu.'</ul>' . LF : $menu);
        }
 
        /**
@@ -216,10 +216,10 @@ class ModuleMenu {
                                        .'</a>';
                        }
 
-                       $moduleMenu .= '<li id="modmenu_' . $moduleData['name'] . '">' . $submoduleLink . '</li>' . "\n";
+                       $moduleMenu .= '<li id="modmenu_' . $moduleData['name'] . '">' . $submoduleLink . '</li>' . LF;
                }
 
-               return '<ul'.($menuState ? ' style="display:none;"' : '').'>'."\n".$moduleMenu.'</ul>'."\n";
+               return '<ul'.($menuState ? ' style="display:none;"' : '').'>'.LF.$moduleMenu.'</ul>'.LF;
        }
 
        /**
@@ -501,7 +501,7 @@ class ModuleMenu {
                var modScriptURL = "";
 
                switch(modName) {'
-                       ."\n".implode("\n", $moduleJavascriptCommands)."\n".'
+                       .LF.implode(LF, $moduleJavascriptCommands).LF.'
                }
                ';
 
index ad2cc39..fe25ee7 100644 (file)
@@ -121,7 +121,7 @@ class ShortcutMenu implements backend_toolbarItem {
                $shortcutMenu[] = $this->renderMenu();
                $shortcutMenu[] = '</div>';
 
-               return implode("\n", $shortcutMenu);
+               return implode(LF, $shortcutMenu);
        }
 
        /**
@@ -203,7 +203,7 @@ class ShortcutMenu implements backend_toolbarItem {
 
                $shortcutMenu[] = '</table>';
 
-               $compiledShortcutMenu = implode("\n", $shortcutMenu);
+               $compiledShortcutMenu = implode(LF, $shortcutMenu);
 
                return $compiledShortcutMenu;
        }
index 575230a..28621bd 100644 (file)
@@ -240,7 +240,7 @@ class WorkspaceSelector implements backend_toolbarItem {
 
                $workspaceMenu[] = '</ul>';
 
-               return implode("\n", $workspaceMenu);
+               return implode(LF, $workspaceMenu);
        }
 
        /**
index edd2113..fd27da3 100644 (file)
@@ -247,13 +247,13 @@ if (defined('TYPO3_cliMode') && TYPO3_cliMode && basename(PATH_thisScript)=='cli
                } else {
                        echo "The supplied 'cliKey' was not valid. Please use one of the available from this list:\n\n";
                        print_r(array_keys($TYPO3_CONF_VARS['SC_OPTIONS']['GLOBAL']['cliKeys']));
-                       echo "\n";
+                       echo LF;
                        exit;
                }
        } else {
                echo "Please supply a 'cliKey' as first argument. The following are available:\n\n";
                print_r($TYPO3_CONF_VARS['SC_OPTIONS']['GLOBAL']['cliKeys']);
-               echo "\n";
+               echo LF;
                exit;
        }
 }
@@ -431,9 +431,9 @@ if (defined('TYPO3_cliMode') && TYPO3_cliMode)      {
        if (!strcmp($_SERVER['argv'][1],'status'))      {
                echo "Status of TYPO3 CLI script:\n\n";
                echo "Username [uid]: ".$BE_USER->user['username']." [".$BE_USER->user['uid']."]\n";
-               echo "Database: ".TYPO3_db."\n";
-               echo "PATH_site: ".PATH_site."\n";
-               echo "\n";
+               echo "Database: ".TYPO3_db.LF;
+               echo "PATH_site: ".PATH_site.LF;
+               echo LF;
                exit;
        }
 }
index 8ebf01b..9fb17a8 100644 (file)
@@ -767,7 +767,7 @@ class SC_mod_tools_em_index extends t3lib_SCbase {
                                if(count($extensions)) {
                                        $lines[]='<tr><td colspan="'.(3+$this->detailCols[$this->MOD_SETTINGS['display_details']]).'"><br /></td></tr>';
                                        $lines[]='<tr><td colspan="'.(3+$this->detailCols[$this->MOD_SETTINGS['display_details']]).'"><img '.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/i/sysf.gif', 'width="18" height="16"').' align="top" alt="" /><strong>'.htmlspecialchars($this->listOrderTitle($this->MOD_SETTINGS['listOrder'],$catName)).'</strong></td></tr>';
-                                       $lines[] = implode(chr(10),$extensions);
+                                       $lines[] = implode(LF,$extensions);
                                }
                        }
                }
@@ -828,7 +828,7 @@ class SC_mod_tools_em_index extends t3lib_SCbase {
                                if(count($extensions)) {
                                        $lines[]='<tr><td colspan="'.(3+$this->detailCols[$this->MOD_SETTINGS['display_details']]).'"><br /></td></tr>';
                                        $lines[]='<tr><td colspan="'.(3+$this->detailCols[$this->MOD_SETTINGS['display_details']]).'"><img '.t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'],'gfx/i/sysf.gif', 'width="18" height="16"').'align="top" alt="" /><strong>'.htmlspecialchars($this->listOrderTitle($this->MOD_SETTINGS['listOrder'],$catName)).'</strong></td></tr>';
-                                       $lines[] = implode(chr(10),$extensions);
+                                       $lines[] = implode(LF,$extensions);
                                }
                        }
 
@@ -838,7 +838,7 @@ class SC_mod_tools_em_index extends t3lib_SCbase {
 <!--
 EXTENSION KEYS:
 
-'.trim(implode(chr(10),$allKeys)).'
+'.trim(implode(LF,$allKeys)).'
 
 -->
 
@@ -966,7 +966,7 @@ EXTENSION KEYS:
                                        $content.= '
 
                                        <!-- TER Extensions list -->
-                                       <table border="0" cellpadding="2" cellspacing="1">'.implode(chr(10),$lines).'</table>';
+                                       <table border="0" cellpadding="2" cellspacing="1">'.implode(LF,$lines).'</table>';
                                        $content .= '<br />'.$this->browseLinks();
                                        $content.= '<br /><br />'.$this->securityHint;
                                        $content .= '<br /><br /><strong>' . $GLOBALS['LANG']->getLL('privacy_notice_header') .
@@ -2340,7 +2340,7 @@ EXTENSION KEYS:
                                                        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'),
                                                                                '<b>' . $oldMD5 . '</b>'
@@ -2359,13 +2359,13 @@ EXTENSION KEYS:
                                                                '<b>' . substr($editFile, strlen($absPath)) . '</b> (' .
                                                                        t3lib_div::formatSize(filesize($editFile)) . ')<br />'
                                                        );
-                                                       $fileMD5 = md5(str_replace(chr(13),'',$fileContent));
+                                                       $fileMD5 = md5(str_replace(CR,'',$fileContent));
                                                        $info .= sprintf(
                                                                $GLOBALS['LANG']->getLL('ext_details_md5_current'),
                                                                '<b>' . $fileMD5 . '</b>'
                                                        ) . '<br />';
                                                        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'),
                                                                        '<b>' . $saveMD5 . '</b>'
@@ -3236,10 +3236,10 @@ EXTENSION KEYS:
                return nl2br(trim((is_array($techInfo['tables']) ?
                        ($tableHeader ?
                                "\n\n<strong>" . $GLOBALS['LANG']->getLL('extDumpTables_tables') . "</strong>\n" : '') .
-                       implode(chr(10), $techInfo['tables']) : '') .
+                       implode(LF, $techInfo['tables']) : '') .
                (is_array($techInfo['static']) ?
                        "\n\n<strong>" . $GLOBALS['LANG']->getLL('extBackup_static_tables') . "</strong>\n" .
-                       implode(chr(10), $techInfo['static']) : '').
+                       implode(LF, $techInfo['static']) : '').
                (is_array($techInfo['fields']) ?
                        "\n\n<strong>" . $GLOBALS['LANG']->getLL('extInfoArray_additional_fields') . "</strong>\n" .
                        implode('<hr />', $techInfo['fields']) : '')));
@@ -4179,7 +4179,7 @@ EXTENSION KEYS:
                                                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);
@@ -4240,7 +4240,7 @@ EXTENSION KEYS:
         * @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();
@@ -4405,7 +4405,7 @@ EXTENSION KEYS:
                } else $errors[] = $GLOBALS['LANG']->getLL('rmExtDir_error_unallowed_path') . ' ' . $removePath;
 
                // Return errors if any:
-               return implode(chr(10),$errors);
+               return implode(LF,$errors);
        }
 
        /**
@@ -4551,7 +4551,7 @@ EXTENSION KEYS:
         * @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();
@@ -4585,7 +4585,7 @@ EXTENSION KEYS:
                }
 
                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)));
                } elseif ($flag_Dispatch){
@@ -4743,7 +4743,7 @@ EXTENSION KEYS:
 $EM_CONF[$_EXTKEY] = '.$this->arrayToCode($EM_CONF, 0).';
 
 ?>';
-               return str_replace(chr(13), '', $code);
+               return str_replace(CR, '', $code);
        }
 
        /**
@@ -4755,17 +4755,17 @@ $EM_CONF[$_EXTKEY] = '.$this->arrayToCode($EM_CONF, 0).';
         * @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;
        }
 
@@ -4816,7 +4816,7 @@ $EM_CONF[$_EXTKEY] = '.$this->arrayToCode($EM_CONF, 0).';
                                                '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'];
 
@@ -5664,7 +5664,7 @@ $EM_CONF[$_EXTKEY] = '.$this->arrayToCode($EM_CONF, 0).';
                }
 
                // Return result:
-               return implode(chr(10).chr(10).chr(10),$tables);
+               return implode(LF.LF.LF,$tables);
        }
 
        /**
@@ -5688,9 +5688,9 @@ $EM_CONF[$_EXTKEY] = '.$this->arrayToCode($EM_CONF, 0).';
                                $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'));
                        }
@@ -5746,7 +5746,7 @@ $EM_CONF[$_EXTKEY] = '.$this->arrayToCode($EM_CONF, 0).';
 #
 '.($dropTableIfExists ? 'DROP TABLE IF EXISTS '.$table.';
 ' : '').'CREATE TABLE '.$table.' (
-'.implode(','.chr(10),$lines).'
+'.implode(','.LF,$lines).'
 );'
 );
                }
@@ -5787,7 +5787,7 @@ $EM_CONF[$_EXTKEY] = '.$this->arrayToCode($EM_CONF, 0).';
                $GLOBALS['TYPO3_DB']->sql_free_result($result);
 
                // Implode lines and return:
-               return implode(chr(10),$lines);
+               return implode(LF,$lines);
        }
 
        /**
@@ -6183,11 +6183,11 @@ $EM_CONF[$_EXTKEY] = '.$this->arrayToCode($EM_CONF, 0).';
                                }
                                $warn = '';
                                if (strcmp(serialize($currentMD5Array), serialize($serverMD5Array)))    {
-                                       $warn = '<tr class="bgColor4" style="color:red"><td colspan="7">'.$GLOBALS['TBE_TEMPLATE']->rfw('<br /><strong>'.$name.': '.$LANG->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:msg_warn_diff').'</strong>').'</td></tr>'."\n";
+                                       $warn = '<tr class="bgColor4" style="color:red"><td colspan="7">'.$GLOBALS['TBE_TEMPLATE']->rfw('<br /><strong>'.$name.': '.$LANG->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:msg_warn_diff').'</strong>').'</td></tr>'.LF;
                                        if ($this->MOD_SETTINGS['display_files'] == 1) {
                                                $affectedFiles = $this->findMD5ArrayDiff($serverMD5Array,$currentMD5Array);
                                                if (count($affectedFiles)) {
-                                                       $warn .= '<tr class="bgColor4"><td colspan="7"><strong>'.$LANG->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:msg_modified').'</strong><br />'.$GLOBALS['TBE_TEMPLATE']->rfw(implode('<br />',$affectedFiles)).'</td></tr>'."\n";
+                                                       $warn .= '<tr class="bgColor4"><td colspan="7"><strong>'.$LANG->sL('LLL:EXT:lang/locallang_mod_tools_em.xml:msg_modified').'</strong><br />'.$GLOBALS['TBE_TEMPLATE']->rfw(implode('<br />',$affectedFiles)).'</td></tr>'.LF;
                                                }
                                        }
                                }
@@ -6197,9 +6197,9 @@ $EM_CONF[$_EXTKEY] = '.$this->arrayToCode($EM_CONF, 0).';
 '<td valign="top" align="right">'.$data[EM_CONF][version].'</td>'.
 '<td valign="top" align="right">'.$lastversion.'</td>'.
 '<td valign="top" nowrap="nowrap">'.$this->typeLabels[$data['type']].(strlen($data['doubleInstall'])>1?'<strong> '.$GLOBALS['TBE_TEMPLATE']->rfw($extInfo['doubleInstall']).'</strong>':'').'</td>'.
-'<td valign="top">'.$comment.'</td></tr>'."\n".
+'<td valign="top">'.$comment.'</td></tr>'.LF.
 $warn.
-'<tr class="bgColor4"><td colspan="7"><hr style="margin:0px" /></td></tr>'."\n";
+'<tr class="bgColor4"><td colspan="7"><hr style="margin:0px" /></td></tr>'.LF;
                        }
                }
 
index 642ecba..2fdd2cc 100755 (executable)
@@ -1938,7 +1938,7 @@ class tx_cms_layout extends recordList {
         */
        function infoGif($infoArr)      {
                if (count($infoArr) && $this->tt_contentConfig['showInfo'])     {
-                       $out='<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/zoom2.gif','width="12" height="12"').' title="'.htmlspecialchars(implode(chr(10),$infoArr)).'" alt="" /> ';
+                       $out='<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/zoom2.gif','width="12" height="12"').' title="'.htmlspecialchars(implode(LF,$infoArr)).'" alt="" /> ';
                        return $out;
                }
        }
@@ -2323,7 +2323,7 @@ class tx_cms_layout extends recordList {
         * @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);
@@ -2702,7 +2702,7 @@ class tx_cms_layout extends recordList {
                if($fillEmptyContent && strstr($content, '><')) {
                        $content = preg_replace('/(<[^ >]* )([^ >]*)([^>]*>)(<\/[^>]*>)/', '$1$2$3$2$4', $content);
                }
-               $content = preg_replace('/<br.?\/?>/', chr(10), $content);
+               $content = preg_replace('/<br.?\/?>/', LF, $content);
 
                return strip_tags($content);
        }
index 969c12b..318d191 100755 (executable)
@@ -935,7 +935,7 @@ class SC_db_layout {
                if (count($tceforms->commentMessages))  {
                        $content.='
        <!-- TCEFORM messages
-       '.htmlspecialchars(implode(chr(10),$tceforms->commentMessages)).'
+       '.htmlspecialchars(implode(LF,$tceforms->commentMessages)).'
        -->
        ';
                }
index 2e4938b..7c50f06 100644 (file)
@@ -313,7 +313,7 @@ class tslib_AdminPanel {
                                        <input type="hidden" name="TSFE_ADMIN_PANEL[display_top]" value="' . $GLOBALS['BE_USER']->uc['TSFE_adminConfig']['display_top'] . '" />' . ($this->extNeedUpdate ? '<input type="submit" value="' . $this->extGetLL('update') . '" />' : '') . '</td>
                        </tr>';
 
-               $query = !t3lib_div::_GET('id') ? ('<input type="hidden" name="id" value="' . $GLOBALS['TSFE']->id . '" />' . chr(10)) : '';
+               $query = !t3lib_div::_GET('id') ? ('<input type="hidden" name="id" value="' . $GLOBALS['TSFE']->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 .= '<input type="hidden" name="TSFE_ADMIN_PANEL[DUMMY]" value="">';
                foreach (t3lib_div::_GET() as $key => $value) {
@@ -321,7 +321,7 @@ class tslib_AdminPanel {
                                if (is_array($value)) {
                                        $query .= $this->getHiddenFields($key, $value);
                                } else {
-                                       $query .= '<input type="hidden" name="' . $key . '" value="' . htmlspecialchars($value) . '">' . chr(10);
+                                       $query .= '<input type="hidden" name="' . $key . '" value="' . htmlspecialchars($value) . '">' . LF;
                                }
                        }
                }
@@ -399,7 +399,7 @@ $query . '
                        if (is_array($v)) {
                                $out .= $this->getHiddenFields($key . '[' . $k . ']', $v);
                        } else {
-                               $out .= '<input type="hidden" name="' . $key . '[' . $k . ']" value="' . htmlspecialchars($v) . '">' . chr(10);
+                               $out .= '<input type="hidden" name="' . $key . '[' . $k . ']" value="' . htmlspecialchars($v) . '">' . LF;
                        }
                }
                return $out;
index 15f1dd8..b4293ca 100644 (file)
@@ -908,7 +908,7 @@ class tslib_cObj {
                        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.']);
@@ -1730,7 +1730,7 @@ class tslib_cObj {
                        $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:
@@ -1880,7 +1880,7 @@ class tslib_cObj {
                                                } 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('<textarea name="%s"%s cols="%s" rows="%s"%s%s>%s</textarea>',
                                                        $confData['fieldname'], $elementIdAttribute, $cols, $rows, $wrap, $addParams, t3lib_div::formatForTextarea($default));
                                        break;
@@ -2617,7 +2617,7 @@ class tslib_cObj {
                                }
 
                                        // 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]));
@@ -2716,7 +2716,7 @@ class tslib_cObj {
                                                //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, '.')) {
@@ -2783,7 +2783,7 @@ class tslib_cObj {
                                $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;
@@ -2942,10 +2942,10 @@ class tslib_cObj {
                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.']);
@@ -3791,7 +3791,7 @@ class tslib_cObj {
                                        $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.']));}
@@ -4170,13 +4170,13 @@ class tslib_cObj {
                $parts = explode('|',$str);
 
                $output =
-                       chr(10).str_pad('',$parts[0],chr(9)).
+                       LF.str_pad('',$parts[0],TAB).
                        '<!-- '.htmlspecialchars($this->insertData($parts[1])).' [begin] -->'.
-                       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).
                        '<!-- '.htmlspecialchars($this->insertData($parts[1])).' [end] -->'.
-                       chr(10).str_pad('',$parts[0]+1,chr(9));
+                       LF.str_pad('',$parts[0]+1,TAB);
 
                return $output;
        }
@@ -4818,10 +4818,10 @@ class tslib_cObj {
                                        $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]);
                                        }
                                }
                        }
@@ -4857,7 +4857,7 @@ class tslib_cObj {
                                                                                $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('</p><p>','</p>'.chr(10).'<p>',$colParts[$kkk]);
+                                                                                       if ($cfg['HTMLtableCells.']['addChr10BetweenParagraphs'])       $colParts[$kkk]=str_replace('</p><p>','</p>'.LF.'<p>',$colParts[$kkk]);
                                                                                        $colParts[$kkk] = $this->parseFunc($colParts[$kkk], $conf);
                                                                                }
 
@@ -4941,7 +4941,7 @@ class tslib_cObj {
                                $data = substr($theValue,$pointer,$len);        // $data is the content until the next <tag-start or end is detected. In case of a currentTag set, this would mean all data between the start- and end-tags
                                if ($data!='')  {
                                        if ($stripNL)   {               // If the previous tag was set to strip NewLines in the beginning of the next data-chunk.
-                                               $data = preg_replace('/^[ ]*'.chr(13).'?'.chr(10).'/', '', $data);
+                                               $data = preg_replace('/^[ ]*'.CR.'?'.LF.'/', '', $data);
                                        }
 
                                        if (!is_array($currentTag))     {                       // These operations should only be performed on code outside the tags...
@@ -5044,9 +5044,9 @@ class tslib_cObj {
                                                }
                                                $this->parameters['allParams']=trim($currentTag[1]);
                                                if ($stripNL)   {       // Removes NL in the beginning and end of the tag-content AND at the end of the currentTagBuffer. $stripNL depends on the configuration of the current tag
-                                                       $contentAccum[$contentAccumP-1] = 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
@@ -5097,16 +5097,16 @@ class tslib_cObj {
        }
 
        /**
-        * 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'];
@@ -5174,7 +5174,7 @@ class tslib_cObj {
                        $lParts[$k] = $str_content;
                }
 
-               return implode(chr(10),$lParts);
+               return implode(LF,$lParts);
        }
 
        /**
@@ -5194,7 +5194,7 @@ class tslib_cObj {
                $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);
@@ -5264,7 +5264,7 @@ class tslib_cObj {
                $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--;}
@@ -6630,7 +6630,7 @@ class tslib_cObj {
         */
        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)))       {
@@ -6647,7 +6647,7 @@ class tslib_cObj {
         * @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);
                }
@@ -6771,12 +6771,12 @@ class tslib_cObj {
 
                $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;
                }
        }
@@ -6938,7 +6938,7 @@ class tslib_cObj {
         * @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) {
@@ -7991,16 +7991,16 @@ class tslib_frameset {
                                                        if (!$conf['src'] && !$typeNum)         {
                                                                $typeNum = -1;
                                                        }
-                                                       $content.='<frame'.$this->frameParams($conf,$typeNum).' />'.chr(10);
+                                                       $content.='<frame'.$this->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 '<frameset'.$this->framesetParams($setup).'>'.chr(10).$content.'</frameset>';
+                       return '<frameset'.$this->framesetParams($setup).'>'.LF.$content.'</frameset>';
                }
        }
 
@@ -8094,7 +8094,7 @@ class tslib_tableOffset   {
                                // 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).'<table '.$this->tableParams.'>';
+                       $this->begin = LF.'<table '.$this->tableParams.'>';
                        $this->end = '</table>';
                        $rows=array();
                        $widthImg = '';
@@ -8222,7 +8222,7 @@ class tslib_controlTable  {
                if (!$rows && $cols) $rows=1;           // If there are no rows in the middle but still som columns...
 
                if ($rows&&$cols)       {
-                       $res = chr(10).'<table '.$this->tableParams.'>';
+                       $res = LF.'<table '.$this->tableParams.'>';
                                // top offset:
                        if ($offArr[1]) {
                                $xoff = $offArr[0] ? 1 : 0;
index 809cc7f..bbde061 100644 (file)
                                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();
                        }
                        $res = t3lib_div::getURL($code, 1, $headerArr);
 
                                // Header and content are separated by an empty line
-                       list($header, $content) = explode("\r\n\r\n", $res, 2);
-                       $content.= "\r\n";
+                       list($header, $content) = explode(CRLF . CRLF, $res, 2);
+                       $content.= CRLF;
 
                        if (false === $res) {
                                        // Last chance -- redirect
                                                $base.= preg_replace('/(.*\/)[^\/]*/', '${1}', $url_parts['path']);
 
                                                        // Put it into content (generate also <head> if necessary)
-                                               $replacement = chr(10) . '<base href="' . htmlentities($base) . '" />' . chr(10);
+                                               $replacement = LF . '<base href="' . htmlentities($base) . '" />' . LF;
                                                if (stristr($content, '<head>'))        {
                                                        $content = preg_replace('/(<head>)/i', '\1' . $replacement, $content);
                                                } else {
                                                        $dateFormat = $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'];
                                                        $timeFormat = $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'];
 
-                                                       $this->content.= chr(10).'<!-- Cached page generated '.date($dateFormat.' '.$timeFormat, $row['tstamp']).'. Expires '.Date($dateFormat.' '.$timeFormat, $row['expires']).' -->';
+                                                       $this->content.= LF.'<!-- Cached page generated '.date($dateFormat.' '.$timeFormat, $row['tstamp']).'. Expires '.Date($dateFormat.' '.$timeFormat, $row['expires']).' -->';
                                                }
                                        }
                                $GLOBALS['TT']->pull();
                        $padSuffix = '<!--pad-->';      // prevent any trims
                        $padSize = 768 - strlen($padSuffix) - strlen($temp_content);
                        if ($padSize > 0) {
-                               $temp_content = str_pad($temp_content, $padSize, "\n") . $padSuffix;
+                               $temp_content = str_pad($temp_content, $padSize, LF) . $padSuffix;
                        }
 
                        if (!$this->headerNoCache() && $cachedRow = $this->getFromCache_queryRow())     {
 
                $GLOBALS['TT']->push('Substitute header section');
                $this->INTincScript_loadJSCode();
-               $this->content = str_replace('<!--HD_'.$this->config['INTincScript_ext']['divKey'].'-->', $this->convOutputCharset(implode(chr(10),$this->additionalHeaderData),'HD'), $this->content);
+               $this->content = str_replace('<!--HD_'.$this->config['INTincScript_ext']['divKey'].'-->', $this->convOutputCharset(implode(LF,$this->additionalHeaderData),'HD'), $this->content);
                $this->content = str_replace('<!--TDS_'.$this->config['INTincScript_ext']['divKey'].'-->', $this->convOutputCharset($this->divSection,'TDS'), $this->content);
                $this->setAbsRefPrefix();
                $GLOBALS['TT']->pull();
@@ -3285,7 +3285,7 @@ if (version == "n3") {
 <script type="text/javascript">
        /*<![CDATA[*/
 <!--
-'.implode(chr(10),$this->additionalJavaScript).'
+'.implode(LF,$this->additionalJavaScript).'
 '.trim($this->JSCode).'
 // -->
        /*]]>*/
@@ -3296,7 +3296,7 @@ if (version == "n3") {
 <style type="text/css">
        /*<![CDATA[*/
 <!--
-'.implode(chr(10),$this->additionalCSS).'
+'.implode(LF,$this->additionalCSS).'
 // -->
        /*]]>*/
 </style>';
@@ -3814,7 +3814,7 @@ if (version == "n3") {
 
                                                $GLOBALS['TT']->push('Write to log file (fputs)');
                                                        $logfilehandle = fopen($this->config['stat_vars']['logFile'], 'a');
-                                                       fputs($logfilehandle, $LogLine.chr(10));
+                                                       fputs($logfilehandle, $LogLine.LF);
                                                        @fclose($logfilehandle);
                                                $GLOBALS['TT']->pull();
 
@@ -4283,7 +4283,7 @@ if (version == "n3") {
 
                        exec ($this->TYPO3_CONF_VARS['FE']['tidy_path'].' '.$fname, $output);                   // run the $content through 'tidy', which formats the HTML to nice code.
                        @unlink ($fname);       // Delete the tempfile again
-                       $content = implode(chr(10),$output);
+                       $content = implode(LF,$output);
                        if (!trim($content))    {
                                $content = $oldContent; // Restore old content due empty return value.
                                $GLOBALS['TT']->setTSlogMessage('"tidy" returned an empty value!',2);
@@ -4453,7 +4453,7 @@ if (version == "n3") {
                        }
                                // 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);
                        $hash = md5('pageTS:'.$userTS);
                        $cachedContent = $this->sys_page->getHash($hash);
                        if (isset($cachedContent))      {
index cf4e60f..1794be7 100644 (file)
@@ -102,7 +102,7 @@ class tslib_feTCE   {
                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 1128c56..c0ec4cf 100644 (file)
@@ -326,7 +326,7 @@ class tslib_feUserAuth extends t3lib_userAuth {
                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 84d8d92..e92152e 100644 (file)
@@ -1874,8 +1874,8 @@ class tslib_tmenu extends tslib_menu {
                                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];
@@ -2395,8 +2395,8 @@ class tslib_gmenu extends tslib_menu {
                                                $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);
@@ -2847,7 +2847,7 @@ class tslib_jsmenu extends tslib_menu {
                        for ($a=1;$a<=$levels;$a++)     {
                                $JScode.="\n var ".$this->JSVarName.$a."=0;";
                        }
-                       $JScode.= $this->generate_level($levels,1,$this->id,$this->menuArr,$this->MP_array)."\n";
+                       $JScode.= $this->generate_level($levels,1,$this->id,$this->menuArr,$this->MP_array).LF;
 
                        $GLOBALS['TSFE']->additionalHeaderData['JSMenuCode']='<script type="text/javascript" src="'.$GLOBALS['TSFE']->absRefPrefix.'t3lib/jsfunc.menu.js"></script>';
                        $GLOBALS['TSFE']->JSCode.=$JScode;
@@ -2948,7 +2948,7 @@ class tslib_jsmenu extends tslib_menu {
                                                $url = $GLOBALS['TSFE']->baseUrlWrap($LD['totalURL']);
                                                $target = $LD['target'];
                                        }
-                                       $codeLines.="\n".$var.$count."=".$menuName.".add(".$parent.",".$prev.",0,".t3lib_div::quoteJSvalue($title, true).",".t3lib_div::quoteJSvalue($url, true).",".t3lib_div::quoteJSvalue($target, true).");";
+                                       $codeLines.=LF.$var.$count."=".$menuName.".add(".$parent.",".$prev.",0,".t3lib_div::quoteJSvalue($title, true).",".t3lib_div::quoteJSvalue($url, true).",".t3lib_div::quoteJSvalue($target, true).");";
                                                // If the active one should be chosen...
                                        $active = ($levelConf['showActive'] && $this->isActive($data['uid'], $MP_var));
                                                // If the first item should be shown
@@ -2956,9 +2956,9 @@ class tslib_jsmenu extends tslib_menu {
                                                // do it...
                                        if ($active || $first)  {
                                                if ($count==1)  {
-                                                       $codeLines.="\n".$menuName.".openID = ".$var.$count.";";
+                                                       $codeLines.=LF.$menuName.".openID = ".$var.$count.";";
                                                } else {
-                                                       $codeLines.="\n".$menuName.".entry[".$parent."].openID = ".$var.$count.";";
+                                                       $codeLines.=LF.$menuName.".entry[".$parent."].openID = ".$var.$count.";";
                                                }
                                        }
                                                // Add submenu...
@@ -2973,7 +2973,7 @@ class tslib_jsmenu extends tslib_menu {
                        $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 6e54b9c..5a5c9de 100644 (file)
@@ -302,7 +302,7 @@ See <a href="http://wiki.typo3.org/index.php/TYPO3_3.8.1" target="_blank">wiki.t
                        }
                }
 
-               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);
        }
 
        /**
@@ -357,7 +357,7 @@ See <a href="http://wiki.typo3.org/index.php/TYPO3_3.8.1" target="_blank">wiki.t
 
                $headerComment = $GLOBALS['TSFE']->config['config']['headerComment'];
                if (trim($headerComment)) {
-                       $pageRenderer->addInlineComment("\t" . str_replace("\n", "\n\t", trim($headerComment)) . "\n");
+                       $pageRenderer->addInlineComment(TAB . str_replace(LF, LF . TAB, trim($headerComment)) . LF);
                }
 
                        // Setting charset:
@@ -452,7 +452,7 @@ See <a href="http://wiki.typo3.org/index.php/TYPO3_3.8.1" target="_blank">wiki.t
 
                        // Adding doctype parts:
                if (count($docTypeParts)) {
-                       $pageRenderer->setXmlPrologAndDocType(implode(chr(10), $docTypeParts));
+                       $pageRenderer->setXmlPrologAndDocType(implode(LF, $docTypeParts));
                }
 
                        // Begin header section:
@@ -499,14 +499,14 @@ See <a href="http://wiki.typo3.org/index.php/TYPO3_3.8.1" target="_blank">wiki.t
                        $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));
                                }
                        }
                }
@@ -875,7 +875,7 @@ See <a href="http://wiki.typo3.org/index.php/TYPO3_3.8.1" target="_blank">wiki.t
                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;
                                }
                        }
                }
@@ -884,7 +884,7 @@ See <a href="http://wiki.typo3.org/index.php/TYPO3_3.8.1" target="_blank">wiki.t
                        // 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
@@ -966,12 +966,12 @@ See <a href="http://wiki.typo3.org/index.php/TYPO3_3.8.1" target="_blank">wiki.t
 
                        // 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
@@ -980,7 +980,7 @@ See <a href="http://wiki.typo3.org/index.php/TYPO3_3.8.1" target="_blank">wiki.t
                if ($GLOBALS['TSFE']->pSetup['frameSet.']) {
                        $fs = t3lib_div::makeInstance('tslib_frameset');
                        $pageRenderer->addBodyContent($fs->make($GLOBALS['TSFE']->pSetup['frameSet.']));
-                       $pageRenderer->addBodyContent(chr(10) . '<noframes>' . chr(10));
+                       $pageRenderer->addBodyContent(LF . '<noframes>' . LF);
                }
 
                        // Bodytag:
@@ -1008,22 +1008,22 @@ See <a href="http://wiki.typo3.org/index.php/TYPO3_3.8.1" target="_blank">wiki.t
                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) . '</noframes>';
+                       $GLOBALS['TSFE']->content .= LF . '</noframes>';
                }
 
        }
index 86ebca3..1a5320a 100644 (file)
@@ -566,7 +566,7 @@ class tslib_pibase {
                                        $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 = '';
                }
@@ -1060,14 +1060,14 @@ class tslib_pibase {
                                // 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!
                        }
                }
 
@@ -1077,11 +1077,11 @@ class tslib_pibase {
                $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 c4ecc01..63e5ef6 100755 (executable)
@@ -55,7 +55,7 @@ if ($pid)     {
                $key = $row['uid'];
                $val = $row['title'];
                $content.= '<a target="testTemplate" href="'.htmlspecialchars($GLOBALS['TSFE']->absRefPrefix.'index.php?id='.$GLOBALS['TSFE']->id.'&based_on_uid='.$key).'">'.$val.'</a><br />';
-               $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 @@ if ($pid)     {
                        $key = $row['uid'];
                        $val = $page_row['title'].' / '.$row['title'];
                        $content.= '<a target="testTemplate" href="'.htmlspecialchars($GLOBALS['TSFE']->absRefPrefix.'index.php?id='.$GLOBALS['TSFE']->id.'&based_on_uid='.$key).'">'.$val.'</a><br />';
-                       $specialComment.= '[globalVar= based_on_uid='.$key.']'.chr(10);
+                       $specialComment.= '[globalVar= based_on_uid='.$key.']'.LF;
                }
        }
 }
index f032d90..968f5f2 100644 (file)
@@ -375,7 +375,7 @@ GLV_date = new Date();
 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 @@ GLV_menuXY["'.$this->WMid.'"] = new Array();
 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 @@ function GL'.$this->WMid.'_out(mitm_id)     {
                $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 @@ function GL'.$this->WMid.'_hideCode() {
 '.$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 @@ GLV_timeout_count++;
                $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 13273e5..e9ef217 100644 (file)
@@ -375,7 +375,7 @@ GLV_date = new Date();
 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 @@ GLV_menuXY["'.$this->WMid.'"] = new Array();
 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 @@ function GL'.$this->WMid.'_out(mitm_id)     {
                $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 @@ function GL'.$this->WMid.'_hideCode() {
 '.$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 @@ GLV_timeout_count++;
                $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 72a7952..78940a7 100755 (executable)
@@ -101,7 +101,7 @@ class tx_cssstyledcontent_pi1 extends tslib_pibase {
                        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 = '<li>'.$this->cObj->stdWrap($val,$conf['innerStdWrap.']).'</li>';
                        }
@@ -173,7 +173,7 @@ class tx_cssstyledcontent_pi1 extends tslib_pibase {
                        $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 @@ class tx_cssstyledcontent_pi1 extends tslib_pibase {
                        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 c292a6c..0646a11 100644 (file)
@@ -123,7 +123,7 @@ class tx_feedit_editpanel {
                                $labelTxt = $this->cObj->stdWrap($conf['label'],$conf['label.']);
 
                                foreach((array) $hiddenFields as $name => $value) {
-                                       $hiddenFieldString .= '<input type="hidden" name="TSFE_EDIT[' . $name . ']" value="' . $value . '"/>' . chr(10);
+                                       $hiddenFieldString .= '<input type="hidden" name="TSFE_EDIT[' . $name . ']" value="' . $value . '"/>' . LF;
                                }
 
                                $panel='
index 94f2fa6..d1a7a78 100644 (file)
@@ -481,7 +481,7 @@ class tx_felogin_pi1 extends tslib_pibase {
                        $onSubmit = implode('; ', $onSubmitAr).'; return true;';
                }
                if (count($extraHiddenAr)) {
-                       $extraHidden = implode(chr(10), $extraHiddenAr);
+                       $extraHidden = implode(LF, $extraHiddenAr);
                }
 
                if (!$gpRedirectUrl && $this->redirectUrl) {
index b2e15d2..a3b5004 100755 (executable)
@@ -1091,7 +1091,7 @@ class tx_impexp {
 
                        // Creating XML file from $outputArray:
                $charset = $this->dat['header']['charset'] ? $this->dat['header']['charset'] : 'iso-8859-1';
-               $XML = '<?xml version="1.0" encoding="'.$charset.'" standalone="yes" ?>'.chr(10);
+               $XML = '<?xml version="1.0" encoding="'.$charset.'" standalone="yes" ?>'.LF;
                $XML.= t3lib_div::array2xml($this->dat,'',0,'T3RecordDocument',0,$options);
 
                return $XML;
index 66f6af7..91fdf28 100755 (executable)
@@ -788,10 +788,10 @@ class tx_indexedsearch_crawler {
         */
        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 83f52f1..77a0699 100755 (executable)
@@ -437,7 +437,7 @@ class tx_indexed_search_extparse {
                                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 @@ class tx_indexed_search_extparse {
                                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 @@ class tx_indexed_search_extparse {
                                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 @@ class tx_indexed_search_extparse {
                                                // 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 @@ class tx_indexed_search_extparse {
                                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 @@ class tx_indexed_search_extparse {
         * @return      string          String
         */
        function removeEndJunk($string) {
-               return trim(preg_replace('/['.chr(10).chr(12).']*$/','',$string));
+               return trim(preg_replace('/['.LF.chr(12).']*$/','',$string));
        }
 
 
index 46a6cef..6681994 100755 (executable)
@@ -942,7 +942,7 @@ class tx_indexedsearch_indexer {
 
                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)))       {
@@ -1224,7 +1224,7 @@ class tx_indexedsearch_indexer {
                if ($maxL)      {
                                // Takes the quadruple lenght first, because whitespace and entities may be removed and thus shorten the string more yet.
        #               $bodyDescription = implode(' ',split('[[:space:],]+',substr(trim($contentArr['body']),0,$maxL*4)));
-                       $bodyDescription = str_replace(array(' ',"\t","\r","\n"),' ',$contentArr['body']);
+                       $bodyDescription = str_replace(array(' ',TAB,CR,LF),' ',$contentArr['body']);
 
                                // Shorten the string:
                        $bodyDescription = $this->csObj->strtrunc('utf-8', $bodyDescription, $maxL);
index 890ddad..197e61e 100755 (executable)
@@ -373,7 +373,7 @@ class language {
                                                        // 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 96bd5d6..a24ce84 100644 (file)
@@ -149,7 +149,7 @@ STEP2: Build your cleaner class:
                                // Initialize result array:
                        $resultArray = array(
                                'message' => $this->cli_help['name'].
-                                                       chr(10).chr(10).
+                                                       LF.LF.
                                                        $this->cli_help['description'],
                                'headers' => array(
                                        'SOME_ANALYSIS_1' => array('HEADER','DESCRIPTION',VERBOSITY_LEVEL 0-3),