Ticket #25741: 25741.diff
| File 25741.diff, 3.3 KB (added by , 12 years ago) |
|---|
-
src/wp-admin/includes/class-wp-filesystem-base.php
630 630 * @return bool Whether $file is readable. 631 631 */ 632 632 function is_readable( $file ) { 633 return false;633 return true; 634 634 } 635 635 636 636 /** … … 642 642 * @return bool Whether $file is writable. 643 643 */ 644 644 function is_writable( $file ) { 645 return false;645 return true; 646 646 } 647 647 648 648 /** -
src/wp-admin/includes/class-wp-filesystem-ftpext.php
183 183 184 184 function owner($file) { 185 185 $dir = $this->dirlist($file); 186 return $dir[ $file]['owner'];186 return $dir[ basename( $file ) ]['owner']; 187 187 } 188 188 189 189 function getchmod($file) { 190 190 $dir = $this->dirlist($file); 191 return $dir[ $file]['permsn'];191 return $dir[ basename( $file ) ]['permsn']; 192 192 } 193 193 194 194 function group($file) { 195 195 $dir = $this->dirlist($file); 196 return $dir[ $file]['group'];196 return $dir[ basename( $file ) ]['group']; 197 197 } 198 198 199 199 function copy($source, $destination, $overwrite = false, $mode = false) { … … 243 243 return false; 244 244 } 245 245 246 function is_readable($file) {247 return true;248 }249 250 function is_writable($file) {251 return true;252 }253 254 function atime($file) {255 return false;256 }257 258 246 function mtime($file) { 259 247 return ftp_mdtm($this->link, $file); 260 248 } … … 263 251 return ftp_size($this->link, $file); 264 252 } 265 253 266 function touch($file, $time = 0, $atime = 0) {267 return false;268 }269 270 254 function mkdir($path, $chmod = false, $chown = false, $chgrp = false) { 271 255 $path = untrailingslashit($path); 272 256 if ( empty($path) ) -
src/wp-admin/includes/class-wp-filesystem-ftpsockets.php
188 188 } 189 189 190 190 function owner($file) { 191 $dir = $this->dirlist( $file);192 return $dir[ $file]['owner'];191 $dir = $this->dirlist( untrailingslashit( $file ) ); 192 return $dir[ basename( $file ) ]['owner']; 193 193 } 194 194 195 195 function getchmod($file) { 196 $dir = $this->dirlist( $file);197 return $dir[ $file]['permsn'];196 $dir = $this->dirlist( $file ); 197 return $dir[ basename( $file ) ]['permsn']; 198 198 } 199 199 200 200 function group($file) { 201 201 $dir = $this->dirlist($file); 202 return $dir[ $file]['group'];202 return $dir[ basename( $file ) ]['group']; 203 203 } 204 204 205 205 function copy($source, $destination, $overwrite = false, $mode = false) { … … 251 251 return false; 252 252 } 253 253 254 function is_readable($file) {255 return true;256 }257 258 function is_writable($file) {259 return true;260 }261 262 function atime($file) {263 return false;264 }265 266 254 function mtime($file) { 267 255 return $this->ftp->mdtm($file); 268 256 } … … 271 259 return $this->ftp->filesize($file); 272 260 } 273 261 274 function touch($file, $time = 0, $atime = 0 ) {275 return false;276 }277 278 262 function mkdir($path, $chmod = false, $chown = false, $chgrp = false ) { 279 263 $path = untrailingslashit($path); 280 264 if ( empty($path) )