Changes from branches/2.8/wp-admin/includes/class-wp-filesystem-direct.php at r11668 to trunk/wp-admin/includes/class-wp-filesystem-direct.php at r10919
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/class-wp-filesystem-direct.php
r11668 r10919 21 21 $this->method = 'direct'; 22 22 $this->errors = new WP_Error(); 23 $this->permission = umask(); 23 24 } 24 25 function connect() { … … 64 65 } 65 66 function chmod($file, $mode = false, $recursive = false) { 67 if ( ! $mode ) 68 $mode = $this->permission; 66 69 if ( ! $this->exists($file) ) 67 70 return false; 68 69 if ( ! $mode ) { 70 if ( $this->permission ) 71 $mode = $this->permission; 72 elseif ( $this->is_file($file) ) 73 $mode = FS_CHMOD_FILE; 74 elseif ( $this->is_dir($file) ) 75 $mode = FS_CHMOD_DIR; 76 else 77 return false; 78 } 79 80 if ( ! $recursive ) 81 return @chmod($file, $mode); 71 if ( ! $recursive ) 72 return @chmod($file,$mode); 82 73 if ( ! $this->is_dir($file) ) 83 74 return @chmod($file, $mode); … … 207 198 208 199 function mkdir($path, $chmod = false, $chown = false, $chgrp = false){ 209 if ( ! @mkdir($path) ) 210 return false; 211 $this->chmod($path, $chmod); 200 if ( ! $chmod) 201 $chmod = $this->permission; 202 203 if ( ! @mkdir($path, $chmod) ) 204 return false; 212 205 if ( $chown ) 213 206 $this->chown($path, $chown);
Note: See TracChangeset
for help on using the changeset viewer.