Changeset 12997
- Timestamp:
- 02/07/2010 01:12:29 AM (15 years ago)
- Location:
- trunk/wp-admin/includes
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/class-wp-filesystem-direct.php
r12741 r12997 136 136 $file = trailingslashit($file); 137 137 $filelist = $this->dirlist($file); 138 foreach ( $filelist as $filename)138 foreach ( (array)$filelist as $filename => $filemeta) 139 139 $this->chmod($file . $filename, $mode, $recursive); 140 140 -
trunk/wp-admin/includes/class-wp-filesystem-ftpext.php
r12733 r12997 155 155 } 156 156 157 if ( ! $recursive || ! $this->is_dir($file) ) {158 if ( ! function_exists('ftp_chmod') )159 return @ftp_site($this->link, sprintf('CHMOD %o %s', $mode, $file));160 return @ftp_chmod($this->link, $mode, $file);161 }162 //Is a directory, and we want recursive163 $filelist = $this->dirlist($file); 164 foreach ( $filelist as $filename ) {165 $this->chmod($file . '/' . $filename, $mode, $recursive);166 }167 return true;157 // chmod any sub-objects if recursive. 158 if ( $recursive && $this->is_dir($file) ) { 159 $filelist = $this->dirlist($file); 160 foreach ( (array)$filelist as $filename => $filemeta ) 161 $this->chmod($file . '/' . $filename, $mode, $recursive); 162 } 163 164 // chmod the file or directory 165 if ( ! function_exists('ftp_chmod') ) 166 return @ftp_site($this->link, sprintf('CHMOD %o %s', $mode, $file)); 167 return @ftp_chmod($this->link, $mode, $file); 168 168 } 169 169 function chown($file, $owner, $recursive = false ) { -
trunk/wp-admin/includes/class-wp-filesystem-ftpsockets.php
r12723 r12997 165 165 } 166 166 167 if ( ! $recursive || ! $this->is_dir($file) ) { 168 return $this->ftp->chmod($file, $mode); 169 } 170 171 //Is a directory, and we want recursive 172 $filelist = $this->dirlist($file); 173 foreach ( $filelist as $filename ) 174 $this->chmod($file . '/' . $filename, $mode, $recursive); 175 176 return true; 167 // chmod any sub-objects if recursive. 168 if ( $recursive && $this->is_dir($file) ) { 169 $filelist = $this->dirlist($file); 170 foreach ( (array)$filelist as $filename => $filemeta ) 171 $this->chmod($file . '/' . $filename, $mode, $recursive); 172 } 173 174 // chmod the file or directory 175 return $this->ftp->chmod($file, $mode); 177 176 } 178 177
Note: See TracChangeset
for help on using the changeset viewer.