Advertisement
Guest User

class-wp-filesystem-ssh2.php supportng changes

a guest
Jun 3rd, 2011
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.61 KB | None | 0 0
  1. #
  2. #-----[ OPEN ]------------------------------------------
  3. #
  4. wp-config.php
  5. #
  6. #-----[ FIND ]------------------------------------------
  7. #
  8. define('WPLANG', '');
  9. #
  10. #-----[ AFTER, ADD ]------------------------------------
  11. #
  12.  
  13. define('FS_METHOD', 'ssh2');
  14. #
  15. #-----[ OPEN ]------------------------------------------
  16. #
  17. wp-admin/includes/file.php
  18. #
  19. #-----[ FIND ]------------------------------------------
  20. #
  21.     if ( ! $method && isset($args['connection_type']) && 'ssh' == $args['connection_type'] && extension_loaded('ssh2') && function_exists('stream_get_contents') ) $method = 'ssh2';
  22. #
  23. #-----[ REPLACE WITH ]----------------------------------
  24. #
  25.     if ( ! $method && isset($args['connection_type']) && 'ssh' == $args['connection_type'] && function_exists('stream_get_contents') ) $method = 'ssh2';
  26. #
  27. #-----[ FIND ]------------------------------------------
  28. #
  29.                 ( 'ssh' == $credentials['connection_type'] && !empty($credentials['public_key']) && !empty($credentials['private_key']) )
  30. #
  31. #-----[ REPLACE WITH ]----------------------------------
  32. #
  33.                 ( 'ssh' == $credentials['connection_type'] && !empty($credentials['private_key']) )
  34. #
  35. #-----[ FIND ]------------------------------------------
  36. #
  37.     if ( extension_loaded('ssh2') && function_exists('stream_get_contents') )
  38. #
  39. #-----[ REPLACE WITH ]----------------------------------
  40. #
  41.     if ( function_exists('stream_get_contents') )
  42. #
  43. #-----[ FIND ]------------------------------------------
  44. #
  45. <th scope="row"><?php _e('Authentication Keys') ?>
  46. <div class="key-labels textright">
  47. <label for="public_key"><?php _e('Public Key:') ?></label ><br />
  48. <label for="private_key"><?php _e('Private Key:') ?></label>
  49. </div></th>
  50. <td><br /><input name="public_key" type="text" id="public_key" value="<?php echo esc_attr($public_key) ?>"<?php disabled( defined('FTP_PUBKEY') ); ?> size="40" /><br /><input name="private_key" type="text" id="private_key" value="<?php echo esc_attr($private_key) ?>"<?php disabled( defined('FTP_PRIKEY') ); ?> size="40" />
  51. <div><?php _e('Enter the location on the server where the keys are located. If a passphrase is needed, enter that in the password field above.') ?></div></td>
  52. </tr>
  53. #
  54. #-----[ REPLACE WITH ]----------------------------------
  55. #
  56. <th scope="row"><?php _e('Authentication Keys') ?>
  57. <div class="key-labels textright">
  58. <label for="private_key"><?php _e('Private Key:') ?></label>
  59. </div></th>
  60. <td><br /><textarea name="private_key" id="private_key" value="<?php echo esc_attr($private_key) ?>"<?php disabled( defined('FTP_PRIKEY') ); ?> />
  61. <div><?php _e('If a passphrase is needed, enter that in the password field above.') ?></div></td>
  62. </tr>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement