Make WordPress Core


Ignore:
Timestamp:
05/30/2009 05:14:07 PM (16 years ago)
Author:
westi
Message:

Fix plugin/theme upgrade issues when using ftp extension. Fixes #9980 props DD32.

File:
1 edited

Legend:

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

    r11082 r11495  
    4848
    4949        // Check if the options provided are OK.
    50         if ( empty ($opt['username']) )
     50        if ( empty($opt['username']) )
    5151            $this->errors->add('empty_username', __('FTP username is required'));
    5252        else
    5353            $this->options['username'] = $opt['username'];
    5454
    55         if ( empty ($opt['password']) )
     55        if ( empty($opt['password']) )
    5656            $this->errors->add('empty_password', __('FTP password is required'));
    5757        else
     
    5959
    6060        $this->options['ssl'] = false;
    61         if ( isset($opt['ssl']) )
    62             $this->options['ssl'] = ( !empty($opt['ssl']) );
    63         elseif ( isset( $opt['connection_type']) )
    64             $this->options['ssl'] = ( 'ftps' == $opt['connection_type'] );
     61        if ( isset($opt['connection_type']) && 'ftps' == $opt['connection_type'] )
     62            $this->options['ssl'] = true;
    6563    }
    6664
    6765    function connect() {
    6866        if ( isset($this->options['ssl']) && $this->options['ssl'] && function_exists('ftp_ssl_connect') )
    69             $this->link = @ftp_ssl_connect($this->options['hostname'], $this->options['port'],$this->timeout);
    70         else
    71             $this->link = @ftp_connect($this->options['hostname'], $this->options['port'],$this->timeout);
     67            $this->link = @ftp_ssl_connect($this->options['hostname'], $this->options['port'], $this->timeout);
     68        else
     69            $this->link = @ftp_connect($this->options['hostname'], $this->options['port'], $this->timeout);
    7270
    7371        if ( ! $this->link ) {
Note: See TracChangeset for help on using the changeset viewer.