Changeset 1625 for FCKeditor/trunk
- Timestamp:
- 02/25/08 17:13:58 (5 years ago)
- Location:
- FCKeditor/trunk
- Files:
-
- 4 edited
-
_whatsnew.html (modified) (1 diff)
-
editor/filemanager/connectors/php/commands.php (modified) (1 diff)
-
editor/filemanager/connectors/php/config.php (modified) (2 diffs)
-
editor/filemanager/connectors/php/io.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
FCKeditor/trunk/_whatsnew.html
r1622 r1625 132 132 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1906">#1906</a>] PHP file browser: fixed 133 133 problems with DetectHtml() function when open_basedir was set.</li> 134 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1871">#1871</a>] PHP file browser: permissions 135 applied with the chmod command are now configurable.</li> 134 136 <li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1873">#1873</a>] Python file browser: permissions 135 137 applied with the chmod command are now configurable.</li> -
FCKeditor/trunk/editor/filemanager/connectors/php/commands.php
r1615 r1625 221 221 if ( is_file( $sFilePath ) ) 222 222 { 223 if ( isset( $Config['ChmodOnUpload'] ) && !$Config['ChmodOnUpload'] ) 224 { 225 break ; 226 } 227 228 $permissions = 0777; 229 230 if ( isset( $Config['ChmodOnUpload'] ) && $Config['ChmodOnUpload'] ) 231 { 232 $permissions = $Config['ChmodOnUpload'] ; 233 } 234 223 235 $oldumask = umask(0) ; 224 chmod( $sFilePath, 0777) ;236 chmod( $sFilePath, $permissions ) ; 225 237 umask( $oldumask ) ; 226 238 } -
FCKeditor/trunk/editor/filemanager/connectors/php/config.php
r1565 r1625 48 48 $Config['ForceSingleExtension'] = true ; 49 49 50 // Perform additional checks for image files 51 // if set to true, validate image size (using getimagesize)50 // Perform additional checks for image files. 51 // If set to true, validate image size (using getimagesize). 52 52 $Config['SecureImageUploads'] = true; 53 53 54 // What the user can do with this connector 54 // What the user can do with this connector. 55 55 $Config['ConfigAllowedCommands'] = array('QuickUpload', 'FileUpload', 'GetFolders', 'GetFoldersAndFiles', 'CreateFolder') ; 56 56 57 // Allowed Resource Types 57 // Allowed Resource Types. 58 58 $Config['ConfigAllowedTypes'] = array('File', 'Image', 'Flash', 'Media') ; 59 59 … … 61 61 // following extensions only. 62 62 $Config['HtmlExtensions'] = array("html", "htm", "xml", "xsd", "txt", "js") ; 63 64 // After file is uploaded, sometimes it is required to change its permissions 65 // so that it was possible to access it at the later time. 66 // If possible, it is recommended to set more restrictive permissions, like 0755. 67 // Set to 0 to disable this feature. 68 // Note: not needed on Windows-based servers. 69 $Config['ChmodOnUpload'] = 0777 ; 70 71 // See comments above. 72 // Used when creating folders that does not exist. 73 $Config['ChmodOnFolderCreate'] = 0777 ; 63 74 64 75 /* -
FCKeditor/trunk/editor/filemanager/connectors/php/io.php
r1565 r1625 89 89 function CreateServerFolder( $folderPath, $lastFolder = null ) 90 90 { 91 global $Config ; 91 92 $sParent = GetParentFolder( $folderPath ) ; 92 93 … … 118 119 // Enable error tracking to catch the error. 119 120 ini_set( 'track_errors', '1' ) ; 120 121 // To create the folder with 0777 permissions, we need to set umask to zero. 122 $oldumask = umask(0) ; 123 mkdir( $folderPath, 0777 ) ; 124 umask( $oldumask ) ; 121 122 if ( isset( $Config['ChmodOnFolderCreate'] ) && !$Config['ChmodOnFolderCreate'] ) 123 { 124 mkdir( $folderPath ) ; 125 } 126 else 127 { 128 $permissions = 0777 ; 129 if ( isset( $Config['ChmodOnFolderCreate'] ) ) 130 { 131 $permissions = $Config['ChmodOnFolderCreate'] ; 132 } 133 // To create the folder with 0777 permissions, we need to set umask to zero. 134 $oldumask = umask(0) ; 135 mkdir( $folderPath, $permissions ) ; 136 umask( $oldumask ) ; 137 } 125 138 126 139 $sErrorMsg = $php_errormsg ;
Note: See TracChangeset
for help on using the changeset viewer.
