Changeset 11495 for trunk/wp-admin/includes/class-wp-filesystem-ftpext.php
- Timestamp:
- 05/30/2009 05:14:07 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/class-wp-filesystem-ftpext.php
r11082 r11495 48 48 49 49 // Check if the options provided are OK. 50 if ( empty 50 if ( empty($opt['username']) ) 51 51 $this->errors->add('empty_username', __('FTP username is required')); 52 52 else 53 53 $this->options['username'] = $opt['username']; 54 54 55 if ( empty 55 if ( empty($opt['password']) ) 56 56 $this->errors->add('empty_password', __('FTP password is required')); 57 57 else … … 59 59 60 60 $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; 65 63 } 66 64 67 65 function connect() { 68 66 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); 72 70 73 71 if ( ! $this->link ) {
Note: See TracChangeset
for help on using the changeset viewer.