Feature #14490 » 0000677-permissions.diff
t3lib/class.t3lib_stdgraphic.php 19 Jan 2005 00:40:25 -0000 | ||
---|---|---|
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;
|
||
}
|
||
}
|
||
... | ... | |
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;
|
||
}
|
||
}
|
||
t3lib/class.t3lib_div.php 19 Jan 2005 00:40:57 -0000 | ||
---|---|---|
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!
|
||
*
|
||
... | ... | |
@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;
|
- « Previous
- 1
- 2
- Next »