REDO: ChangeLog t3lib/class.t3lib_div.php t3lib/class.t3lib_extmgm.php t3lib/thumbs...
authorMartin Kutschker <martin.t.kutschker@blackbox.net>
Sun, 29 Oct 2006 10:19:12 +0000 (10:19 +0000)
committerMartin Kutschker <martin.t.kutschker@blackbox.net>
Sun, 29 Oct 2006 10:19:12 +0000 (10:19 +0000)
Fixed bug #4021: array_merge error with PHP 5.0
Changed occurences of PATH_site.'typo3conf/' to PATH_typo3conf and PATH_site.TYPO3_mainDir to PATH_typo3

git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@1773 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_div.php
t3lib/class.t3lib_extmgm.php
typo3/mod/tools/em/class.em_index.php
typo3/sysext/indexed_search/class.crawler.php
typo3/sysext/setup/mod/index.php

index 9b34b66..3982d63 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+
+2006-10-29  Martin Kutschker  <martin.t.kutschker@blackbox.net>
+
+       * Fixed bug #4021: array_merge error with PHP 5.0
+       * Changed occurences of PATH_site.'typo3conf/' to PATH_typo3conf and PATH_site.TYPO3_mainDir to PATH_typo3
+
 2006-10-25  Kasper Skårhøj     <kasper2006@typo3.com>
        * Added "alt_main_new.php" including various modifications around to support this.
        * Added clean-up functions in extension "lowlevel" plus modified t3lib_refindex and t3lib_tcemain accordingly
 
        * ADOdb system extension updated to upstream 4.93. Added danish translation, thanks to Peter Klein!
 
-2006-10-12  Martin Kutschker  <martin.t.kutschker@blackbox.net>
-
-       * Fixed bug #4021: array_merge error with PHP 5.0
-       * Changed occurences of PATH_site.'typo3conf/' to PATH_typo3conf and PATH_site.TYPO3_mainDir to PATH_typo3
-
 2006-10-11  Martin Kutschker  <martin.t.kutschker@blackbox.net>
 
        * Changed index "parent" of sys_template to (pid,sorting)
index 4297e4b..32009a9 100755 (executable)
@@ -487,13 +487,13 @@ class t3lib_div {
         * Truncate string
         * Returns a new string of max. $chars length.
         * If the string is longer, it will be truncated and appended with '...'.
-        * DEPRECATED. Works ONLY for single-byte charsets! USE t3lib_div::fixed_lgd_cs() instead
         * Usage: 39
         *
         * @param       string          string to truncate
         * @param       integer         must be an integer with an absolute value of at least 4. if negative the string is cropped from the right end.
         * @param       string          String to append to the output if it is truncated, default is '...'
         * @return      string          new string
+        * @deprecated          Works ONLY for single-byte charsets! USE t3lib_div::fixed_lgd_cs() instead
         * @see fixed_lgd_pre()
         */
        function fixed_lgd($string,$origChars,$preStr='...')    {
@@ -513,12 +513,12 @@ class t3lib_div {
         * Returns a new string of max. $chars length.
         * If the string is longer, it will be truncated and prepended with '...'.
         * This works like fixed_lgd, but is truncated in the start of the string instead of the end
-        * DEPRECATED. Use either fixed_lgd() or fixed_lgd_cs() (with negative input value for $chars)
         * Usage: 6
         *
         * @param       string          string to truncate
         * @param       integer         must be an integer of at least 4
         * @return      string          new string
+        * @deprecated          Use either fixed_lgd() or fixed_lgd_cs() (with negative input value for $chars)
         * @see fixed_lgd()
         */
        function fixed_lgd_pre($string,$chars)  {
@@ -550,13 +550,14 @@ class t3lib_div {
         * @param       string          The string to break up
         * @param       string          The string to implode the broken lines with (default/typically \n)
         * @param       integer         The line length
+        * @deprecated          Use PHP function wordwrap()
         * @return      string
         */
        function breakTextForEmail($str,$implChar="\n",$charWidth=76)   {
                $lines = explode(chr(10),$str);
                $outArr=array();
                while(list(,$lStr)=each($lines))        {
-                       $outArr = array_merge($outArr,t3lib_div::breakLinesForEmail($lStr,$implChar,$charWidth));
+                       $outArr[] = t3lib_div::breakLinesForEmail($lStr,$implChar,$charWidth);
                }
                return implode(chr(10),$outArr);
        }
@@ -1082,11 +1083,11 @@ class t3lib_div {
 
        /**
         * strtoupper which converts danish (and other characters) characters as well
-        * (DEPRECATED, use t3lib_cs::conv_case() instead or for HTML output, wrap your content in <span class="uppercase">...</span>)
         * Usage: 0
         *
         * @param       string          String to process
         * @return      string
+        * @deprecated          Use t3lib_cs::conv_case() instead or for HTML output, wrap your content in <span class="uppercase">...</span>)
         * @ignore
         */
        function danish_strtoupper($string)     {
@@ -1097,11 +1098,11 @@ class t3lib_div {
        /**
         * Change umlaut characters to plain ASCII with normally two character target
         * Only known characters will be converted, so don't expect a result for any character.
-        * (DEPRECATED: Works only for western europe single-byte charsets! Use t3lib_cs::specCharsToASCII() instead!)
         *
         * ä => ae, Ö => Oe
         *
         * @param       string          String to convert.
+        * @deprecated          Works only for western europe single-byte charsets! Use t3lib_cs::specCharsToASCII() instead!
         * @return      string
         */
        function convUmlauts($str)      {
@@ -1463,13 +1464,12 @@ class t3lib_div {
 
        /**
         * Remove duplicate values from an array
-        * This function is deprecated, use the PHP function array_unique instead
         * Usage: 0
         *
         * @param       array           Array of values to make unique
         * @return      array
         * @ignore
-        * @deprecated
+        * @deprecated          Use the PHP function array_unique instead
         */
        function uniqueArray($valueArray)       {
                return array_unique($valueArray);
@@ -3698,16 +3698,15 @@ class t3lib_div {
         * @return      string          Returns the filename reference for the language unless error occured (or local mode is used) in which case it will be NULL
         */
        function llXmlAutoFileName($fileRef,$language)  {
-
                        // Analyse file reference:
                $location = 'typo3conf/l10n/'.$language.'/';    // Default location of translations
-               if (t3lib_div::isFirstPartOfStr($fileRef,PATH_site.TYPO3_mainDir.'sysext/'))    {       // Is system:
-                       $validatedPrefix = PATH_site.TYPO3_mainDir.'sysext/';
+               if (t3lib_div::isFirstPartOfStr($fileRef,PATH_typo3.'sysext/')) {       // Is system:
+                       $validatedPrefix = PATH_typo3.'sysext/';
                        #$location = 'EXT:csh_'.$language.'/';  // For system extensions translations are found in "csh_*" extensions (language packs)
-               } elseif (t3lib_div::isFirstPartOfStr($fileRef,PATH_site.TYPO3_mainDir.'ext/')) {       // Is global:
-                       $validatedPrefix = PATH_site.TYPO3_mainDir.'ext/';
-               } elseif (t3lib_div::isFirstPartOfStr($fileRef,PATH_site.'typo3conf/ext/'))     {       // Is local:
-                       $validatedPrefix = PATH_site.'typo3conf/ext/';
+               } elseif (t3lib_div::isFirstPartOfStr($fileRef,PATH_typo3.'ext/'))      {       // Is global:
+                       $validatedPrefix = PATH_typo3.'ext/';
+               } elseif (t3lib_div::isFirstPartOfStr($fileRef,PATH_typo3conf.'ext/'))  {       // Is local:
+                       $validatedPrefix = PATH_typo3conf.'ext/';
                } else {
                        $validatedPrefix = '';
                }
index f9052bd..0783c41 100644 (file)
@@ -984,11 +984,11 @@ tt_content.'.$key.$prefix.' {
                                $temp_extensions = array_unique(t3lib_div::trimExplode(',',$rawExtList,1));
                                foreach($temp_extensions as $temp_extKey)       {
                                                // Check local, global and system locations:
-                                       if (@is_dir(PATH_site.'typo3conf/ext/'.$temp_extKey.'/'))       {
+                                       if (@is_dir(PATH_typo3conf.'ext/'.$temp_extKey.'/'))    {
                                                $extensions[$temp_extKey] = array('type'=>'L', 'siteRelPath'=>'typo3conf/ext/'.$temp_extKey.'/', 'typo3RelPath'=>'../typo3conf/ext/'.$temp_extKey.'/');
-                                       } elseif (@is_dir(PATH_site.TYPO3_mainDir.'ext/'.$temp_extKey.'/'))     {
+                                       } elseif (@is_dir(PATH_typo3.'ext/'.$temp_extKey.'/'))  {
                                                $extensions[$temp_extKey] = array('type'=>'G', 'siteRelPath'=>TYPO3_mainDir.'ext/'.$temp_extKey.'/', 'typo3RelPath'=>'ext/'.$temp_extKey.'/');
-                                       } elseif (@is_dir(PATH_site.TYPO3_mainDir.'sysext/'.$temp_extKey.'/'))  {
+                                       } elseif (@is_dir(PATH_typo3.'sysext/'.$temp_extKey.'/'))       {
                                                $extensions[$temp_extKey] = array('type'=>'S', 'siteRelPath'=>TYPO3_mainDir.'sysext/'.$temp_extKey.'/', 'typo3RelPath'=>'sysext/'.$temp_extKey.'/');
                                        }
 
@@ -1006,8 +1006,8 @@ tt_content.'.$key.$prefix.' {
 
                                        // write cache?
                                if ($TYPO3_CONF_VARS['EXT']['extCache'] &&
-                                               @is_dir(PATH_site.TYPO3_mainDir.'sysext/') &&
-                                               @is_dir(PATH_site.TYPO3_mainDir.'ext/'))        {       // Must also find global and system extension directories to exist, otherwise caching cannot be allowed (since it is most likely a temporary server problem). This might fix a rare, unrepeatable bug where global/system extensions are not loaded resulting in fatal errors if that is cached!
+                                               @is_dir(PATH_typo3.'sysext/') &&
+                                               @is_dir(PATH_typo3.'ext/'))     {       // Must also find global and system extension directories to exist, otherwise caching cannot be allowed (since it is most likely a temporary server problem). This might fix a rare, unrepeatable bug where global/system extensions are not loaded resulting in fatal errors if that is cached!
                                        $wrError = t3lib_extMgm::cannotCacheFilesWritable($cacheFilePrefix);
                                        if ($wrError)   {
                                                $TYPO3_CONF_VARS['EXT']['extCache']=0;
index bc4073a..2933273 100644 (file)
@@ -2931,13 +2931,13 @@ EXTENSION KEYS:
                $list = array();
                $cat = $this->defaultCategories;
 
-               $path = PATH_site.TYPO3_mainDir.'sysext/';
+               $path = PATH_typo3.'sysext/';
                $this->getInstExtList($path,$list,$cat,'S');
 
-               $path = PATH_site.TYPO3_mainDir.'ext/';
+               $path = PATH_typo3.'ext/';
                $this->getInstExtList($path,$list,$cat,'G');
 
-               $path = PATH_site.'typo3conf/ext/';
+               $path = PATH_typo3conf.'ext/';
                $this->getInstExtList($path,$list,$cat,'L');
 
                return array($list,$cat);
index 971e623..54341d8 100755 (executable)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 2001-2005 Kasper Skaarhoj (kasperYYYY@typo3.com)
+*  (c) 2001-2006 Kasper Skaarhoj (kasperYYYY@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -70,7 +70,7 @@
 
 
 # To make sure the backend charset is available:
-require_once(PATH_site.TYPO3_mainDir.'sysext/lang/lang.php');
+require_once(PATH_typo3.'sysext/lang/lang.php');
 if (!is_object($GLOBALS['LANG']))      {
        $GLOBALS['LANG'] = t3lib_div::makeInstance('language');
        $GLOBALS['LANG']->init($GLOBALS['BE_USER']->uc['lang']);
@@ -926,4 +926,4 @@ class tx_indexedsearch_files {
 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/indexed_search/class.crawler.php'])   {
        include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/indexed_search/class.crawler.php']);
 }
-?>
\ No newline at end of file
+?>
index d0e5fd3..b6d9dea 100755 (executable)
@@ -285,7 +285,7 @@ class SC_mod_user_setup_index {
                foreach($theLanguages as $val)  {
                        if ($val!='default')    {
                                $localLabel = '  -  ['.htmlspecialchars($GLOBALS['LOCAL_LANG']['default']['lang_'.$val]).']';
-                               $unavailable = $val!='default' && !@is_dir(PATH_site.'typo3conf/l10n/'.$val) ? '1' : '';
+                               $unavailable = $val!='default' && !@is_dir(PATH_typo3conf.'l10n/'.$val) ? '1' : '';
                                $opt[$GLOBALS['LOCAL_LANG']['default']['lang_'.$val].'--'.$val]='
                                        <option value="'.$val.'"'.($BE_USER->uc['lang']==$val?' selected="selected"':'').($unavailable ? ' class="c-na"' : '').'>'.$LANG->getLL('lang_'.$val,1).$localLabel.'</option>';
                        }
@@ -296,7 +296,7 @@ class SC_mod_user_setup_index {
                                        implode('',$opt).'
                                </select>'.
                                t3lib_BEfunc::cshItem('_MOD_user_setup', 'language', $GLOBALS['BACK_PATH'],'|');
-                               if ($BE_USER->uc['lang'] && !@is_dir(PATH_site.'typo3conf/l10n/'.$BE_USER->uc['lang'])) {
+                               if ($BE_USER->uc['lang'] && !@is_dir(PATH_typo3conf.'l10n/'.$BE_USER->uc['lang']))      {
                                        $code.= '<table border="0" cellpadding="0" cellspacing="0" class="warningbox"><tr><td>'.
                                                                $this->doc->icons(3).
                                                                'The selected language is not available before the language pack is installed.<br />'.