Ticket #27265: file.php.patch
File file.php.patch, 1.6 KB (added by , 11 years ago) |
---|
-
wp-admin/includes/file.php
old new 880 880 * Note that the return value of this function can be overridden in 2 ways 881 881 * - By defining FS_METHOD in your <code>wp-config.php</code> file 882 882 * - By using the filesystem_method filter 883 * Valid values for these are: 'direct', 'ssh ', 'ftpext' or 'ftpsockets'883 * Valid values for these are: 'direct', 'ssh2', 'ftpext' or 'ftpsockets' 884 884 * Plugins may also define a custom transport handler, See the WP_Filesystem function for more information. 885 885 * 886 886 * @since 2.5.0 … … 890 890 * @return string The transport to use, see description for valid return values. 891 891 */ 892 892 function get_filesystem_method($args = array(), $context = false) { 893 $method = defined('FS_METHOD') ? FS_METHOD : false; //Please ensure that this is either 'direct', 'ssh ', 'ftpext' or 'ftpsockets'893 $method = defined('FS_METHOD') ? FS_METHOD : false; //Please ensure that this is either 'direct', 'ssh2', 'ftpext' or 'ftpsockets' 894 894 895 895 if ( ! $method && function_exists('getmyuid') && function_exists('fileowner') ){ 896 896 if ( !$context ) … … 970 970 unset($credentials['port']); 971 971 } 972 972 973 if ( (defined('FTP_SSH') && FTP_SSH) || (defined('FS_METHOD') && 'ssh ' == FS_METHOD) )973 if ( (defined('FTP_SSH') && FTP_SSH) || (defined('FS_METHOD') && 'ssh2' == FS_METHOD) ) 974 974 $credentials['connection_type'] = 'ssh'; 975 975 else if ( (defined('FTP_SSL') && FTP_SSL) && 'ftpext' == $type ) //Only the FTP Extension understands SSL 976 976 $credentials['connection_type'] = 'ftps';