Make WordPress Core

Ticket #7690: 7690.3.diff

File 7690.3.diff, 2.2 KB (added by ShaneF, 18 years ago)

small update

  • wp-admin/includes/file.php

     
    480480                unlink($temp_file);
    481481        }
    482482
    483         if ( isset($args['connection_type']) && 'ssh' == $args['connection_type'] ) {
     483        if ( isset($args['connection_type']) && 'ssh' == $args['connection_type'] && extension_loaded('ssh') ) {
    484484                $method = 'SSH2';
    485485                return apply_filters('filesystem_method', $method);
    486486        }
     
    535535?>
    536536<form action="<?php echo $form_post ?>" method="post">
    537537<div class="wrap">
    538 <h2><?php _e('FTP Connection Information') ?></h2>
    539 <p><?php _e('To perform the requested action, FTP connection information is required.') ?></p>
     538<h2><?php _e('Connection Information') ?></h2>
     539<p><?php _e('To perform the requested action, connection information is required.') ?></p>
    540540<table class="form-table">
    541541<tr valign="top">
    542542<th scope="row"><label for="hostname"><?php _e('Hostname') ?></label></th>
     
    556556<fieldset><legend class="hidden"><?php _e('Connection Type') ?> </legend>
    557557<p><label><input name="connection_type"  type="radio" value="ftp" <?php checked('ftp', $connection_type); ?>    /> <?php _e('FTP') ?></label><br />
    558558<label><input name="connection_type" type="radio" value="ftps" <?php checked('ftps', $connection_type); ?> /> <?php _e('FTPS (SSL)') ?></label><br />
     559<?php if ( extension_loaded('ssh') ) { ?>
    559560<label><input name="connection_type" type="radio" value="ssh" <?php checked('ssh', $connection_type); ?> /> <?php _e('SSH') ?></label></p>
     561<?php } ?>
    560562</fieldset>
    561563</td>
    562564</tr>
  • wp-admin/update.php

     
    2727                return;
    2828
    2929        if ( ! WP_Filesystem($credentials) ) {
    30                 $error = true;
    31                 if ( is_object($wp_filesystem) && $wp_filesystem->errors->get_error_code() )
    32                         $error = $wp_filesystem->errors;
    33                 request_filesystem_credentials($url, '', $error); //Failed to connect, Error and request again
     30                request_filesystem_credentials($url, '', true); //Failed to connect, Error and request again
    3431                return;
    3532        }
    3633