]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/includes/file.php
Wordpress 2.8.4
[autoinstalls/wordpress.git] / wp-admin / includes / file.php
index 77baecd2a2fa22ffc9da9204d77a7af279979300..5cd7a454d6cdd1f5598c94a596d9566edaab37c6 100644 (file)
@@ -445,7 +445,7 @@ function download_url( $url ) {
        if ( ! $handle )
                return new WP_Error('http_no_file', __('Could not create Temporary file'));
 
-       $response = wp_remote_get($url, array('timeout' => 30));
+       $response = wp_remote_get($url, array('timeout' => 60));
 
        if ( is_wp_error($response) ) {
                fclose($handle);
@@ -645,7 +645,7 @@ function get_filesystem_method($args = array(), $context = false) {
                }
        }
 
-       if ( ! $method && isset($args['connection_type']) && 'ssh' == $args['connection_type'] && extension_loaded('ssh2') && extension_loaded('sockets') ) $method = 'ssh2';
+       if ( ! $method && isset($args['connection_type']) && 'ssh' == $args['connection_type'] && extension_loaded('ssh2') && function_exists('stream_get_contents') ) $method = 'ssh2';
        if ( ! $method && extension_loaded('ftp') ) $method = 'ftpext';
        if ( ! $method && ( extension_loaded('sockets') || function_exists('fsockopen') ) ) $method = 'ftpsockets'; //Sockets: Socket extension; PHP Mode: FSockopen / fwrite / fread
        return apply_filters('filesystem_method', $method, $args);
@@ -761,7 +761,7 @@ jQuery(function($){
 <td><input name="password" type="password" id="password" value="<?php if ( defined('FTP_PASS') ) echo '*****'; ?>"<?php if ( defined('FTP_PASS') ) echo ' disabled="disabled"' ?> size="40" /></td>
 </tr>
 
-<?php if ( extension_loaded('ssh2') ) : ?>
+<?php if ( extension_loaded('ssh2') && function_exists('stream_get_contents') ) : ?>
 <tr id="ssh_keys" valign="top" style="<?php if ( 'ssh' != $connection_type ) echo 'display:none' ?>">
 <th scope="row"><?php _e('Authentication Keys') ?>
 <div class="key-labels textright">
@@ -781,7 +781,7 @@ jQuery(function($){
 <?php if ( 'ftpext' == $type ) : ?>
 <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>
 <?php endif; ?>
-<?php if ( extension_loaded('ssh2') ) : ?>
+<?php if ( extension_loaded('ssh2') && function_exists('stream_get_contents') ) : ?>
 <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>
 <?php endif; ?>
 </fieldset>