diff -urN wordpress.orig/wp-admin/includes/class-wp-filesystem-ftpext.php wordpress/wp-admin/includes/class-wp-filesystem-ftpext.php
|
old
|
new
|
|
| 58 | 58 | $this->options['password'] = $opt['password']; |
| 59 | 59 | |
| 60 | 60 | $this->options['ssl'] = ( !empty($opt['ssl']) ); |
| | 61 | $this->options['pasv'] = ( !empty($opt['pasv']) ); |
| 61 | 62 | } |
| 62 | 63 | |
| 63 | 64 | function connect() { |
| … |
… |
|
| 76 | 77 | return false; |
| 77 | 78 | } |
| 78 | 79 | |
| | 80 | // this enteres passive FTP mode if the server does have problems connection the FTP server due to some firewalling this could help |
| | 81 | if( $this->options['pasv'] ) |
| | 82 | @ftp_pasv( $this->link, 1 ); |
| | 83 | |
| 79 | 84 | return true; |
| 80 | 85 | } |
| 81 | 86 | |
diff -urN wordpress.orig/wp-admin/update.php wordpress/wp-admin/update.php
|
old
|
new
|
|
| 23 | 23 | $credentials['username'] = defined('FTP_USER') ? FTP_USER : (!empty($_POST['username']) ? $_POST['username'] : $credentials['username']); |
| 24 | 24 | $credentials['password'] = defined('FTP_PASS') ? FTP_PASS : (!empty($_POST['password']) ? $_POST['password'] : $credentials['password']); |
| 25 | 25 | $credentials['ssl'] = defined('FTP_SSL') ? FTP_SSL : ( isset($_POST['ssl']) ? $_POST['ssl'] : $credentials['ssl']); |
| | 26 | $credentials['pasv'] = defined('FTP_PASV') ? FTP_PASV : ( isset($_POST['pasv']) ? $_POST['pasv'] : $credentials['pasv']); |
| 26 | 27 | |
| 27 | 28 | if ( ! $error && !empty($credentials['password']) && !empty($credentials['username']) && !empty($credentials['hostname']) ) { |
| 28 | 29 | $stored_credentials = $credentials; |
| … |
… |
|
| 34 | 35 | $username = ''; |
| 35 | 36 | $password = ''; |
| 36 | 37 | $ssl = ''; |
| | 38 | $pasv = ''; |
| 37 | 39 | if ( !empty($credentials) ) |
| 38 | 40 | extract($credentials, EXTR_OVERWRITE); |
| 39 | 41 | if( $error ) |
| … |
… |
|
| 69 | 71 | </select> |
| 70 | 72 | </td> |
| 71 | 73 | </tr> |
| | 74 | <tr valign="top"> |
| | 75 | <th scope="row"><label for="pasv"><?php _e('Use passive FTP connection:') ?></label></th> |
| | 76 | <td> |
| | 77 | <select name="pasv" id="pasv"<?php if( defined('FTP_PASV') ) echo ' disabled="disabled"' ?>> |
| | 78 | <?php |
| | 79 | foreach ( array(0 => __('No'), 1 => __('Yes')) as $key => $value ) : |
| | 80 | $selected = ($pasv == $value) ? 'selected="selected"' : ''; |
| | 81 | echo "\n\t<option value='$key' $selected>" . $value . '</option>'; |
| | 82 | endforeach; |
| | 83 | ?> |
| | 84 | </select> |
| | 85 | </td> |
| | 86 | </tr> |
| 72 | 87 | </table> |
| 73 | 88 | <p class="submit"> |
| 74 | 89 | <input type="submit" name="submit" value="<?php _e('Proceed'); ?>" /> |