Make WordPress Core


Ignore:
Timestamp:
06/23/2009 09:55:22 PM (15 years ago)
Author:
ryan
Message:

Enforce stream_get_contents() requirement for ssh2 fs. Props dd32. fixes #10093 for 2.8.1

File:
1 edited

Legend:

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

    r11588 r11633  
    646646    }
    647647
    648     if ( ! $method && isset($args['connection_type']) && 'ssh' == $args['connection_type'] && extension_loaded('ssh2') && extension_loaded('sockets') ) $method = 'ssh2';
     648    if ( ! $method && isset($args['connection_type']) && 'ssh' == $args['connection_type'] && extension_loaded('ssh2') && function_exists('stream_get_contents') ) $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') ) : ?>
     764<?php if ( extension_loaded('ssh2') && function_exists('stream_get_contents') ) : ?>
    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') ) : ?>
     784<?php if ( extension_loaded('ssh2') && function_exists('stream_get_contents') ) : ?>
    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.