* Fixed bug #7052: Permission problem of htmlArea RTE images
authorStanislas Rolland <typo3@sjbr.ca>
Wed, 6 Feb 2008 22:19:45 +0000 (22:19 +0000)
committerStanislas Rolland <typo3@sjbr.ca>
Wed, 6 Feb 2008 22:19:45 +0000 (22:19 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@3111 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/rtehtmlarea/ChangeLog
typo3/sysext/rtehtmlarea/mod4/class.tx_rtehtmlarea_dam_browse_media.php
typo3/sysext/rtehtmlarea/mod4/class.tx_rtehtmlarea_select_image.php

index 7c2fb34..a721897 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,7 @@
 
        * Fixed bug #7419: htmlArea RTE: Localization error in Remove Format plugin
        * Fixed bug #7421: htmlArea RTE: typographical error in localization file
+       * Fixed bug #7052: Permission problem of htmlArea RTE images
 
 2008-02-05  Oliver Hader  <oh@inpublica.de>
 
index f9eed3c..7cf47bc 100644 (file)
@@ -7,6 +7,7 @@
 
        * Fixed bug: htmlArea RTE calling t3lib_div::getUserObj() with an empty string
        * Fixed bug: htmlArea RTE: incorrect configuration of TYPO3HtmlParser plugin
+       * Fixed bug #7052: Permission problem of htmlArea RTE images
 
 2008-02-01  Stanislas Rolland  <stanislas.rolland@fructifor.ca>
 
index 85d12c4..7ea20fd 100644 (file)
@@ -289,10 +289,10 @@ class tx_rtehtmlarea_dam_browse_media extends tx_dam_browse_media {
                                                $destPath =PATH_site.$this->rteImageStorageDir();
                                                if (@is_dir($destPath)) {
                                                        $destName = $fileFunc->getUniqueName($basename,$destPath);
+                                                       @copy($imgInfo[3],$destName);
                                                        if (isset($TYPO3_CONF_VARS['BE']['fileCreateMask'])) {
-                                                               @chmod($destName, $TYPO3_CONF_VARS['BE']['fileCreateMask']);
+                                                               @chmod($destName, octdec($TYPO3_CONF_VARS['BE']['fileCreateMask']));
                                                        }
-                                                       @copy($imgInfo[3],$destName);
                                                        
                                                        $cWidth = t3lib_div::intInRange(t3lib_div::_GP('cWidth'),0,$this->magicMaxWidth);
                                                        $cHeight = t3lib_div::intInRange(t3lib_div::_GP('cHeight'),0,$this->magicMaxHeight);
@@ -304,10 +304,10 @@ class tx_rtehtmlarea_dam_browse_media extends tx_dam_browse_media {
                                                                $fI=pathinfo($imgI[3]);
                                                                $mainBase='RTEmagicC_'.substr(basename($destName),10).'.'.$fI['extension'];
                                                                $destName = $fileFunc->getUniqueName($mainBase,$destPath);
+                                                               @copy($imgI[3],$destName);
                                                                if (isset($TYPO3_CONF_VARS['BE']['fileCreateMask'])) {
-                                                                       @chmod($destName, $TYPO3_CONF_VARS['BE']['fileCreateMask']);
+                                                                       @chmod($destName, octdec($TYPO3_CONF_VARS['BE']['fileCreateMask']));
                                                                }
-                                                               @copy($imgI[3],$destName);
                                                                $iurl = $this->siteUrl.substr($destName,strlen(PATH_site));
                                                                $this->imageInsertJS($iurl,$imgI[0],$imgI[1],$imgMetaData['alt_text'],$imgMetaData[$this->imgTitleDAMColumn],substr($imgInfo[3],strlen(PATH_site)));
                                                        }
index d915b86..5b3dd55 100644 (file)
@@ -292,10 +292,10 @@ class tx_rtehtmlarea_select_image extends browse_links {
                                $destPath =PATH_site.$this->rteImageStorageDir();
                                if (@is_dir($destPath)) {
                                        $destName = $fileFunc->getUniqueName($basename,$destPath);
+                                       @copy($imgInfo[3],$destName);
                                        if (isset($TYPO3_CONF_VARS['BE']['fileCreateMask'])) {
-                                               @chmod($destName, $TYPO3_CONF_VARS['BE']['fileCreateMask']);
+                                               @chmod($destName, octdec($TYPO3_CONF_VARS['BE']['fileCreateMask']));
                                        }
-                                       @copy($imgInfo[3],$destName);
                                        
                                        $cWidth = t3lib_div::intInRange(t3lib_div::_GP('cWidth'),0,$this->magicMaxWidth);
                                        $cHeight = t3lib_div::intInRange(t3lib_div::_GP('cHeight'),0,$this->magicMaxHeight);
@@ -307,11 +307,11 @@ class tx_rtehtmlarea_select_image extends browse_links {
                                                $fI=pathinfo($imgI[3]);
                                                $mainBase='RTEmagicC_'.substr(basename($destName),10).'.'.$fI['extension'];
                                                $destName = $fileFunc->getUniqueName($mainBase,$destPath);
+                                               @copy($imgI[3],$destName);
                                                if (isset($TYPO3_CONF_VARS['BE']['fileCreateMask'])) {
-                                                       @chmod($destName, $TYPO3_CONF_VARS['BE']['fileCreateMask']);
+                                                       @chmod($destName, octdec($TYPO3_CONF_VARS['BE']['fileCreateMask']));
                                                }
-                                               @copy($imgI[3],$destName);
-
+                                               
                                                $destName = dirname($destName).'/'.rawurlencode(basename($destName));
                                                $iurl = $this->siteUrl.substr($destName,strlen(PATH_site));
                                                echo'