Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/file.php

    r11633 r11499  
    446446        return new WP_Error('http_no_file', __('Could not create Temporary file'));
    447447
    448     $response = wp_remote_get($url, array('timeout' => 60));
     448    $response = wp_remote_get($url, array('timeout' => 30));
    449449
    450450    if ( is_wp_error($response) ) {
     
    646646    }
    647647
    648     if ( ! $method && isset($args['connection_type']) && 'ssh' == $args['connection_type'] && extension_loaded('ssh2') && function_exists('stream_get_contents') ) $method = 'ssh2';
     648    if ( ! $method && isset($args['connection_type']) && 'ssh' == $args['connection_type'] && extension_loaded('ssh2') && extension_loaded('sockets') ) $method = 'ssh2';
    649649    if ( ! $method && extension_loaded('ftp') ) $method = 'ftpext';
    650650    if ( ! $method && ( extension_loaded('sockets') || function_exists('fsockopen') ) ) $method = 'ftpsockets'; //Sockets: Socket extension; PHP Mode: FSockopen / fwrite / fread
     
    762762</tr>
    763763
    764 <?php if ( extension_loaded('ssh2') && function_exists('stream_get_contents') ) : ?>
     764<?php if ( extension_loaded('ssh2') ) : ?>
    765765<tr id="ssh_keys" valign="top" style="<?php if ( 'ssh' != $connection_type ) echo 'display:none' ?>">
    766766<th scope="row"><?php _e('Authentication Keys') ?>
     
    782782<br /><label><input id="ftps" name="connection_type" type="radio" value="ftps" <?php checked('ftps', $connection_type); if ( defined('FTP_SSL') || defined('FTP_SSH') ) echo ' disabled="disabled"';  ?>/> <?php _e('FTPS (SSL)') ?></label>
    783783<?php endif; ?>
    784 <?php if ( extension_loaded('ssh2') && function_exists('stream_get_contents') ) : ?>
     784<?php if ( extension_loaded('ssh2') ) : ?>
    785785<br /><label><input id="ssh" name="connection_type" type="radio" value="ssh" <?php checked('ssh', $connection_type);  if ( defined('FTP_SSL') || defined('FTP_SSH') ) echo ' disabled="disabled"'; ?>/> <?php _e('SSH') ?></label>
    786786<?php endif; ?>
Note: See TracChangeset for help on using the changeset viewer.