Make WordPress Core


Ignore:
Timestamp:
02/11/2008 08:46:11 AM (17 years ago)
Author:
ryan
Message:

ftp fs tweaks. see #5586

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-filesystem-ftpext.php

    r6779 r6785  
    274274        return ftp_rename($this->link,$source,$destination);
    275275    }
    276     function delete($file,$recursive=false){
    277         if( $this->is_file($file) )
     276
     277    function delete($file,$recursive=false) {
     278        if ( $this->is_file($file) )
    278279            return ftp_delete($this->link,$file);
    279         if( !$recursive )
     280        if ( !$recursive )
    280281            return ftp_rmdir($this->link,$file);
    281282        $filelist = $this->dirlist($file);
    282         foreach($filelist as $filename => $fileinfo){
    283             echo "Delete $file/$filename<br />";
     283        foreach ($filelist as $filename => $fileinfo) {
    284284            $this->delete($file.'/'.$filename,$recursive);
    285285        }
    286286        return ftp_rmdir($this->link,$file);
    287287    }
     288
    288289    function exists($file){
    289290        $list = ftp_rawlist($this->link,$file,false);
Note: See TracChangeset for help on using the changeset viewer.