Commit 5f64af83 authored by Michael Stucki's avatar Michael Stucki
Browse files

2005-02-04 Michael Stucki <michael@typo3.org>

 * Corrected some typos
 * Fix permissions after ImageMagick has created a new file. Introduced new function t3lib_div::fixPermissions. Closes bug #0000677.
 * Fixed bug #0000422: "Fatal error at 3: Image Processing -> 5: GD library functions"
 * Added a new constant TYPO3_branch which includes only the major and the minor numbers of the version (not the patchlevel). This is used in the "generator" meta tag and will finally close bug number #0000318.
 * ContextMenu is no longer disabled by default on Macintosh systems (except Opera, might have to do with bug #0000675). Closes bugs #0000542 and #0000486.
 * XHTML 1.1 compliancy fixes (thanks to Ernesto Baschny)
 * List view now resolves values of MM tables (thanks to Rupert Germann)
 * Use t3lib_div::isAbsPath() to check if the logfile path is absolute (doesn't work on Windows otherwise)


git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@552 709f56b5-9817-0410-a4d7-c38de5d9e867
parent 227a743c
2005-02-04 Michael Stucki <michael@typo3.org>
* Corrected some typos
* Fix permissions after ImageMagick has created a new file. Introduced new function t3lib_div::fixPermissions. Closes bug #0000677.
* Fixed bug #0000422: "Fatal error at 3: Image Processing -> 5: GD library functions"
* Added a new constant TYPO3_branch which includes only the major and the minor numbers of the version (not the patchlevel). This is used in the "generator" meta tag and will finally close bug number #0000318.
* ContextMenu is no longer disabled by default on Macintosh systems (except Opera, might have to do with bug #0000675). Closes bugs #0000542 and #0000486.
* XHTML 1.1 compliancy fixes (thanks to Ernesto Baschny)
* List view now resolves values of MM tables (thanks to Rupert Germann)
* Use t3lib_div::isAbsPath() to check if the logfile path is absolute (doesn't work on Windows otherwise)
2005-02-02 Ingmar Schlecht <ingmar@typo3.org>
* Fixed bug #0000728: "Enabling DevLog in t3lib_modsettings via SC_OPTIONS does not work." Reason: t3lib_modsettings::init() used $TYPO3_CONF_VARS although the global var was not available there. Changed it to $GLOBALS['TYPO3_CONF_VARS'].
......@@ -8,7 +19,7 @@
2005-01-24 Jan-Erik Revsbech <jer@moccompany.com>
* The check to see if Postfix version 1.XX is used requires that the executable /usr/sbin/postconf exists. If it does not exists, some php configurations will die with an error. Now htmlmail makes a check to see if the files exists before calling it.
* The check to see if Postfix version 1.x is used requires that the executable /usr/sbin/postconf exists. If it does not exist, some PHP installations will die with an error. Now htmlmail makes a check to see if the files exist before calling it.
2005-01-22 Ingmar Schlecht <ingmar@typo3.org>
......@@ -16,10 +27,10 @@
2005-01-21 Ingmar Schlecht <ingmar@typo3.org>
* Fixed bug #0000703: Added missing ';' to '&nbsp' in t3lib\class.t3lib_formmail.php
* Fixed bug #0000703: Added missing ';' to '&nbsp' in t3lib/class.t3lib_formmail.php
2005-01-21 Jan-Erik Revsbech <jer@moccompany.com>
* Added a check to class t3lib_htmlmail to check if postfix version 1.XX is used. If this is the case the -f parameter is not used for call to mail(). This should fix the problem with mails not being sent when using Postfix as MTA..
2005-01-21 Kasper Skårhøj,,, <kasper@typo3.com>
......@@ -37,14 +48,10 @@
2004-12-20 Kasper Skårhøj,,, <kasper@typo3.com>
* Changed "config.disableContentLengthHeader" over to "enableContentLengthHeader" because a default content-length header might introduce some weird and hard-to-debug situation for people.
2004-12-20 Kasper Skårhøj,,, <kasper@typo3.com>
* Added possibility to enable cache-control headers on frontend output; This allows a site to be cached by client browsers and proxies. See TSref for configuration ("config.sendCacheHeaders")
* Added that a cache-control header sent from client can regenerate an otherwise cached page. In reality this means that a shift-reload click in the browser will always circumvent TYPO3s page-cache, regenerate the page and store a new version in cache if applicable. If anyone has objections agains this default feature (eg. fear of DoS attacks), please bring up a discussion on dev-list.
* Added "Content-Length" header on frontend output (can be disabled)
* Fixed bug that gave inconsistent SYS_LASTCHANGED values whether a page was gotten from cache or generated.
2004-12-20 Kasper Skårhøj,,, <kasper@typo3.com>
* Added check for explicitAllow/Deny in the content element wizard (during a trainride from Allerød in S-Tog line A to Nørreport - thats all it took).
2004-12-17 Kasper Skårhøj,,, <kasper@typo3.com>
......
......@@ -108,7 +108,7 @@
* 1691: function getLabelFromItemlist($table,$col,$key)
* 1717: function getItemLabel($table,$col,$printAllWrap='')
* 1742: function getRecordTitle($table,$row,$prep=0)
* 1778: function getProcessedValue($table,$col,$value,$fixed_lgd_chars=0,$defaultPassthrough=0)
* 1778: function getProcessedValue($table,$col,$value,$fixed_lgd_chars=0,$defaultPassthrough=0,$noRecordLookup=FALSE,$uid=0)
* 1872: function getProcessedValueExtra($table,$fN,$fV,$fixed_lgd_chars=0)
* 1896: function getFileIcon($ext)
* 1910: function getCommonSelectFields($table,$prefix)
......@@ -1774,9 +1774,10 @@ class t3lib_BEfunc {
* @param integer $fixed_lgd_chars is the max amount of characters the value may occupy
* @param boolean $defaultPassthrough flag means that values for columns that has no conversion will just be pass through directly (otherwise cropped to 200 chars or returned as "N/A")
* @param boolean If set, no records will be looked up, UIDs are just shown.
* @param integer uid of the current record
* @return string
*/
function getProcessedValue($table,$col,$value,$fixed_lgd_chars=0,$defaultPassthrough=0,$noRecordLookup=FALSE) {
function getProcessedValue($table,$col,$value,$fixed_lgd_chars=0,$defaultPassthrough=0,$noRecordLookup=FALSE,$uid=0) {
global $TCA;
// Load full TCA for $table
t3lib_div::loadTCA($table);
......@@ -1791,7 +1792,26 @@ class t3lib_BEfunc {
break;
case 'select':
if ($theColConf['MM']) {
$l='N/A';
// Display the title of MM related records in lists
$MMres = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query(
$theColConf['foreign_table'].'.'.$TCA[$theColConf['foreign_table']]['ctrl']['label'],
$table,
$theColConf['MM'],
$theColConf['foreign_table'],
'AND '.$table.'.uid ='.intval($uid).t3lib_BEfunc::deleteClause($theColConf['foreign_table'])
);
if ($MMres) {
while($MMrow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($MMres)) {
$mmlA[] = $MMrow[$TCA[$theColConf['foreign_table']]['ctrl']['label']];
}
if (is_array($mmlA)) {
$l=implode(', ',$mmlA);
} else {
$l = '';
}
} else {
$l = 'n/A';
}
} else {
$l = t3lib_BEfunc::getLabelFromItemlist($table,$col,$value);
$l = $GLOBALS['LANG']->sL($l);
......@@ -1871,12 +1891,13 @@ class t3lib_BEfunc {
* @param string Field name
* @param string Field value
* @param integer $fixed_lgd_chars is the max amount of characters the value may occupy
* @param integer uid of the current record
* @return string
* @see getProcessedValue()
*/
function getProcessedValueExtra($table,$fN,$fV,$fixed_lgd_chars=0) {
function getProcessedValueExtra($table,$fN,$fV,$fixed_lgd_chars=0,$uid=0) {
global $TCA;
$fVnew = t3lib_BEfunc::getProcessedValue($table,$fN,$fV,$fixed_lgd_chars);
$fVnew = t3lib_BEfunc::getProcessedValue($table,$fN,$fV,$fixed_lgd_chars,0,0,$uid);
if (!isset($fVnew)) {
if (is_array($TCA[$table])) {
if ($fN==$TCA[$table]['ctrl']['tstamp'] || $fN==$TCA[$table]['ctrl']['crdate']) {
......
......@@ -1384,7 +1384,7 @@ class t3lib_div {
}
/**
* Merges two arrays recursively and "binary safe" (integer keys are overridden as well), overruling similar the values in the first array ($arr0) with the values of the second array ($arr1)
* Merges two arrays recursively and "binary safe" (integer keys are overridden as well), overruling similar values in the first array ($arr0) with the values of the second array ($arr1)
* In case of identical keys, ie. keeping the values of the second.
* Usage: 0
*
......@@ -2058,18 +2058,26 @@ class t3lib_div {
fwrite( $fd, $content);
fclose( $fd );
// Setting file system mode & group ownership of file:
if (@is_file($file) && TYPO3_OS!='WIN') {
@chmod($file, octdec($GLOBALS['TYPO3_CONF_VARS']['BE']['fileCreateMask'])); // "@" is there because file is not necessarily OWNED by the user
if($GLOBALS['TYPO3_CONF_VARS']['BE']['createGroup']) { // skip this if createGroup is empty
@chgrp($file, $GLOBALS['TYPO3_CONF_VARS']['BE']['createGroup']); // "@" is there because file is not necessarily OWNED by the user
}
}
t3lib_div::fixPermissions($file); // Change the permissions of the file
return true;
}
}
/**
* Setting file system mode & group ownership of file
*
* @param string Filepath of newly created file
*/
function fixPermissions($file) {
if (@is_file($file) && TYPO3_OS!='WIN') {
@chmod($file, octdec($GLOBALS['TYPO3_CONF_VARS']['BE']['fileCreateMask'])); // "@" is there because file is not necessarily OWNED by the user
if($GLOBALS['TYPO3_CONF_VARS']['BE']['createGroup']) { // skip this if createGroup is empty
@chgrp($file, $GLOBALS['TYPO3_CONF_VARS']['BE']['createGroup']); // "@" is there because file is not necessarily OWNED by the user
}
}
}
/**
* Writes $content to a filename in the typo3temp/ folder (and possibly a subfolder...)
* Accepts an additional subdirectory in the file path!
......@@ -2923,13 +2931,7 @@ class t3lib_div {
@copy($source,$destination);
}
// Setting file system mode & group ownership of file:
if (@is_file($destination) && TYPO3_OS!='WIN') {
chmod($destination, octdec($GLOBALS['TYPO3_CONF_VARS']['BE']['fileCreateMask']));
if($GLOBALS['TYPO3_CONF_VARS']['BE']['createGroup']) { // skip this if createGroup is empty
chgrp($destination, $GLOBALS['TYPO3_CONF_VARS']['BE']['createGroup']);
}
}
t3lib_div::fixPermissions($destination); // Change the permissions of the file
// If here the file is copied and the temporary $source is still around, so when returning false the user can try unlink to delete the $source
return $uploaded ? $uploadedResult : FALSE;
......
......@@ -246,7 +246,7 @@ class t3lib_htmlmail {
/**
* Constructor for the class. Make a check to see if Postfix version below 2.XX is used.
* Constructor for the class. Make a check to see if Postfix version below 2.0 is used.
* If this is the case all calls to mail() must not be called with the -f parameter to correctly set
* the Return-Path header.
* @return [type] ...
......@@ -569,7 +569,7 @@ class t3lib_htmlmail {
function constructAlternative($boundary) {
// Here plain is combined with HTML
$this->add_message("--".$boundary);
// plain is added
// plain is added
$this->add_message($this->plain_text_header);
$this->add_message('');
$this->add_message($this->getContent("plain"));
......@@ -617,7 +617,7 @@ class t3lib_htmlmail {
/**
* Sends the mail by calling the mail() function in php. On Linux systems this will invoke the MTA
* defined in sys.ini (sendmail -t -i by default), on Windows a SMTP must be specified in the sys.ini.
* defined in php.ini (sendmail -t -i by default), on Windows a SMTP must be specified in the sys.ini.
* Most common MTA's on Linux has a Sendmail interface, including Postfix and Exim.
* For setting the return-path correctly, the parameter -f has to be added to the system call to sendmail.
* This obviously does not have any effect on Windows, but on Sendmail compliant systems this works. If safe mode
......
......@@ -284,8 +284,10 @@ class t3lib_stdGraphic {
if (TYPO3_MODE=='FE') {
$this->csConvObj = &$GLOBALS['TSFE']->csConvObj;
} else { // BE assumed:
} elseif(is_object($GLOBALS['LANG'])) { // BE assumed:
$this->csConvObj = &$GLOBALS['LANG']->csConvObj;
} else { // The object may not exist yet, so we need to create it now. Happens in the Install Tool for example.
$this->csConvObj = t3lib_div::makeInstance('t3lib_cs');
}
$this->nativeCharset = $GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset'];
}
......@@ -2373,7 +2375,11 @@ class t3lib_stdGraphic {
if (!$this->NO_IMAGE_MAGICK) {
$cmd = $this->imageMagickPath.'convert '.$params.' '.$this->wrapFileName($input).' '.$this->wrapFileName($output);
$this->IM_commands[] = Array ($output,$cmd);
return exec($cmd);
$ret = exec($cmd);
t3lib_div::fixPermissions($this->wrapFileName($output)); // Change the permissions of the file
return $ret;
}
}
......@@ -2391,7 +2397,11 @@ class t3lib_stdGraphic {
if (!$this->NO_IMAGE_MAGICK) {
$cmd = $this->imageMagickPath.$this->combineScript.' -compose over '.$this->wrapFileName($input).' '.$this->wrapFileName($overlay).' '.$this->wrapFileName($mask).' '.$this->wrapFileName($output);
$this->IM_commands[] = Array ($output,$cmd);
exec($cmd);
$ret = exec($cmd);
t3lib_div::fixPermissions($this->wrapFileName($output)); // Change the permissions of the file
return $ret;
}
}
......@@ -2630,7 +2640,6 @@ class t3lib_stdGraphic {
}
}
if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_stdgraphic.php']) {
include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_stdgraphic.php']);
}
......
......@@ -141,7 +141,7 @@ class t3lib_userAuth {
var $user; // Internal: Will contain user- AND session-data from database (joined tables)
var $get_URL_ID = ''; // Internal: Will will be set to the url--ready (eg. '&login=ab7ef8d...') GET-auth-var if getFallBack is true. Should be inserted in links!
var $forceSetCookie=0; // Will force the session cookie to be set everytime (liftime must be 0)
var $forceSetCookie=0; // Will force the session cookie to be set everytime (lifetime must be 0)
var $dontSetCookie=0; // Will prevent the setting of the session cookie (takes precedence over forceSetCookie)
......
......@@ -228,6 +228,7 @@ $T3_VAR = array(); // Initialize.
// TYPO3 version
$TYPO_VERSION = '3.8.0-dev';
define('TYPO3_version', $TYPO_VERSION);
define('TYPO3_branch', '3.8');
// Database-variables are cleared!
$typo_db = ''; // The database name
......
......@@ -568,6 +568,7 @@ class localRecordList extends recordList {
$theData = Array();
foreach($this->fieldArray as $fCol) {
if ($fCol==$titleCol) {
$recTitle = t3lib_BEfunc::getProcessedValueExtra($table,$fCol,$row[$fCol],$GLOBALS['BE_USER']->uc['titleLen'],$row['uid']);
$theData[$fCol] = $this->linkWrapItems($table,$row['uid'],$recTitle,$row);
} elseif ($fCol=='pid') {
$theData[$fCol]=$row[$fCol];
......@@ -584,7 +585,7 @@ class localRecordList extends recordList {
} elseif ($fCol=='_LOCALIZATION_b') {
// Do nothing, has been done above.
} else {
$theData[$fCol]=htmlspecialchars(t3lib_BEfunc::getProcessedValueExtra($table,$fCol,$row[$fCol],100));
$theData[$fCol]=htmlspecialchars(t3lib_BEfunc::getProcessedValueExtra($table,$fCol,$row[$fCol],100,$row['uid']));
}
}
......
......@@ -1212,7 +1212,7 @@ class tx_cms_layout extends recordList {
if ($fieldName==$thumbsCol) { // If the column is a thumbnail column:
$out[$fieldName] = $this->thumbCode($row,$table,$fieldName);
} else { // ... otherwise just render the output:
$out[$fieldName] = nl2br(htmlspecialchars(trim(t3lib_div::fixed_lgd_cs(t3lib_BEfunc::getProcessedValue($table,$fieldName,$row[$fieldName]),250))));
$out[$fieldName] = nl2br(htmlspecialchars(trim(t3lib_div::fixed_lgd_cs(t3lib_BEfunc::getProcessedValue($table,$fieldName,$row[$fieldName],0,0,0,$row['uid']),250))));
}
} else { // Each field is separated by <br /> and shown in the same cell (If not a TCA field, then explode the field name with ";" and check each value there as a TCA configured field)
$theFields = explode(';',$fieldName);
......@@ -1222,7 +1222,7 @@ class tx_cms_layout extends recordList {
if ($TCA[$table]['columns'][$fName2]) {
$out[$fieldName].= '<b>'.$GLOBALS['LANG']->sL($TCA[$table]['columns'][$fName2]['label'],1).'</b>'.
'&nbsp;&nbsp;'.
htmlspecialchars(t3lib_div::fixed_lgd_cs(t3lib_BEfunc::getProcessedValue($table,$fName2,$row[$fName2]),25)).
htmlspecialchars(t3lib_div::fixed_lgd_cs(t3lib_BEfunc::getProcessedValue($table,$fName2,$row[$fName2],0,0,0,$row['uid']),25)).
'<br />';
}
}
......
......@@ -1084,10 +1084,10 @@ class tslib_cObj {
$spaceBelowAbove = intval($this->stdWrap($conf['spaceBelowAbove'],$conf['spaceBelowAbove.']));
switch ($contentPosition) {
case '0': // above
$output= '<div align="'.$align.'">'.$tablecode.'</div>'.$this->wrapSpace($content, $spaceBelowAbove.'|0');
$output= '<div style="text-align:'.$align.';">'.$tablecode.'</div>'.$this->wrapSpace($content, $spaceBelowAbove.'|0');
break;
case '8': // below
$output= $this->wrapSpace($content, '0|'.$spaceBelowAbove).'<div align="'.$align.'">'.$tablecode.'</div>';
$output= $this->wrapSpace($content, '0|'.$spaceBelowAbove).'<div style="text-align:'.$align.';">'.$tablecode.'</div>';
break;
case '16': // in text
$output= $tablecode.$content;
......@@ -3063,7 +3063,7 @@ class tslib_cObj {
if ($conf['wrapAlign'] || $conf['wrapAlign.']){
$wrapAlign = trim($this->stdWrap($conf['wrapAlign'], $conf['wrapAlign.']));
if ($wrapAlign) {$content=$this->wrap($content, '<div align="'.$wrapAlign.'">|</div>');}
if ($wrapAlign) {$content=$this->wrap($content, '<div style="text-align:'.$wrapAlign.';">|</div>');}
}
if ($conf['typolink.']){$content=$this->typolink($content, $conf['typolink.']);}
......@@ -3565,7 +3565,7 @@ class tslib_cObj {
$theValue=$this->wrap($theValue, $fontWrap);
}
// align
if ($align) {$theValue=$this->wrap($theValue, '<div align="'.$align.'">|</div>');}
if ($align) {$theValue=$this->wrap($theValue, '<div style="text-align:'.$align.';">|</div>');}
// return
return $theValue;
}
......
......@@ -1442,7 +1442,7 @@
// STAT:
$theLogFile = $this->TYPO3_CONF_VARS['FE']['logfile_dir'].$this->config['config']['stat_apache_logfile'];
// Add PATH_site left to $theLogFile if the path is not absolute yet
if(!ereg("^/", $theLogFile)) $theLogFile = PATH_site.$theLogFile;
if(!t3lib_div::isAbsPath($theLogFile)) $theLogFile = PATH_site.$theLogFile;
if ($this->config['config']['stat_apache'] && $this->config['config']['stat_apache_logfile'] && !strstr($this->config['config']['stat_apache_logfile'],'/')) {
if(t3lib_div::isAllowedAbsPath($theLogFile) && @is_file($theLogFile) && @is_writable($theLogFile)) {
......
......@@ -610,7 +610,7 @@ $GLOBALS['TSFE']->content.='
<title>'.htmlspecialchars($titleTagContent).'</title>';
}
$GLOBALS['TSFE']->content.='
<meta name="generator" content="TYPO3 3.8 CMS" />';
<meta name="generator" content="TYPO3 '.TYPO3_branch.' CMS" />';
$conf=$GLOBALS['TSFE']->pSetup['meta.'];
if (is_array($conf)) {
......
......@@ -346,7 +346,7 @@ class template {
* @return boolean
*/
function isCMlayers() {
return !$GLOBALS['BE_USER']->uc['disableCMlayers'] && $GLOBALS['CLIENT']['FORMSTYLE'] && $GLOBALS['CLIENT']['SYSTEM']!='mac';
return !$GLOBALS['BE_USER']->uc['disableCMlayers'] && $GLOBALS['CLIENT']['FORMSTYLE'] && !($GLOBALS['CLIENT']['SYSTEM']=='mac' && $GLOBALS['CLIENT']['BROWSER']=='Opera');
}
/**
......@@ -942,7 +942,7 @@ $str.=$this->docBodyTagBegin().
* @return string <meta> tag with name "GENERATOR"
*/
function generator() {
$str = 'TYPO3 '.$GLOBALS['TYPO_VERSION'].', http://typo3.com, &#169; Kasper Sk&#229;rh&#248;j 1998-2004, extensions are copyright of their respective owners.';
$str = 'TYPO3 '.TYPO3_branch.', http://typo3.com, &#169; Kasper Sk&#229;rh&#248;j 1998-2005, extensions are copyright of their respective owners.';
return '<meta name="GENERATOR" content="'.$str .'" />';
}
......@@ -1675,7 +1675,7 @@ $str.=$this->docBodyTagBegin().
document.getElementById(idBase+"-"+index+"-DIV").style.display = "none";
if(isInit) {
document.getElementById(idBase+"-"+index+"-MENU").attributes.getNamedItem("class").nodeValue = "tab";
} else {
} else {
DTM_origClass = "tab";
}
top.DTM_currentTabs[idBase+"-"+index] = 0;
......@@ -1683,7 +1683,7 @@ $str.=$this->docBodyTagBegin().
document.getElementById(idBase+"-"+index+"-DIV").style.display = "block";
if(isInit) {
document.getElementById(idBase+"-"+index+"-MENU").attributes.getNamedItem("class").nodeValue = "tabact";
} else {
} else {
DTM_origClass = "tabact";
}
top.DTM_currentTabs[idBase+"-"+index] = 1;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment