+
+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)
* 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='...') {
* 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) {
* @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);
}
/**
* 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) {
/**
* 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) {
/**
* 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);
* @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 = '';
}
$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.'/');
}
// 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;
$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);
/***************************************************************
* 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
# 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']);
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
+?>
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>';
}
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 />'.