- Timestamp:
- 11/18/2015 05:22:34 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-filesystem-ftpsockets.php
r34495 r35664 70 70 $this->ftp->setTimeout(FS_CONNECT_TIMEOUT); 71 71 72 if ( ! $this->ftp->SetServer($this->options['hostname'], $this->options['port']) ) { 73 $this->errors->add('connect', sprintf(__('Failed to connect to FTP Server %1$s:%2$s'), $this->options['hostname'], $this->options['port'])); 72 if ( ! $this->ftp->SetServer( $this->options['hostname'], $this->options['port'] ) ) { 73 $this->errors->add( 'connect', 74 /* translators: %s: hostname:port */ 75 sprintf( __( 'Failed to connect to FTP Server %s' ), 76 $this->options['hostname'] . ':' . $this->options['port'] 77 ) 78 ); 74 79 return false; 75 80 } 76 81 77 82 if ( ! $this->ftp->connect() ) { 78 $this->errors->add('connect', sprintf(__('Failed to connect to FTP Server %1$s:%2$s'), $this->options['hostname'], $this->options['port'])); 79 return false; 80 } 81 82 if ( ! $this->ftp->login($this->options['username'], $this->options['password']) ) { 83 $this->errors->add('auth', sprintf(__('Username/Password incorrect for %s'), $this->options['username'])); 83 $this->errors->add( 'connect', 84 /* translators: %s: hostname:port */ 85 sprintf( __( 'Failed to connect to FTP Server %s' ), 86 $this->options['hostname'] . ':' . $this->options['port'] 87 ) 88 ); 89 return false; 90 } 91 92 if ( ! $this->ftp->login( $this->options['username'], $this->options['password'] ) ) { 93 $this->errors->add( 'auth', 94 /* translators: %s: username */ 95 sprintf( __( 'Username/Password incorrect for %s' ), 96 $this->options['username'] 97 ) 98 ); 84 99 return false; 85 100 }
Note: See TracChangeset
for help on using the changeset viewer.