Index: includes/filetransfer/ftp.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/filetransfer/ftp.inc,v
retrieving revision 1.13
diff -u -p -r1.13 ftp.inc
--- includes/filetransfer/ftp.inc	17 Aug 2010 22:05:22 -0000	1.13
+++ includes/filetransfer/ftp.inc	3 Oct 2010 05:59:15 -0000
@@ -21,8 +21,7 @@ abstract class FileTransferFTP extends F
    * @param array $settings
    * @return FileTransferFTP
    *   The appropriate FileTransferFTP subclass based on the available
-   *   options.  If the FTP PHP extension is available, use it.  Otherwise, we
-   *   try to use the FTP file stream support.
+   *   options. If the FTP PHP extension is available, use it.
    */
   static function factory($jail, $settings) {
     $settings['hostname'] = empty($settings['hostname']) ? 'localhost' : $settings['hostname'];
@@ -31,9 +30,6 @@ abstract class FileTransferFTP extends F
     if (function_exists('ftp_connect')) {
       $class = 'FileTransferFTPExtension';
     }
-    elseif (ini_get('allow_url_fopen')) {
-      $class = 'FileTransferFTPWrapper';
-    }
     else {
       throw new FileTransferException('No FTP backend available.');
     }
@@ -42,70 +38,6 @@ abstract class FileTransferFTP extends F
   }
 }
 
-/**
- * Connection class using the FTP URL wrapper.
- */
-class FileTransferFTPWrapper extends FileTransferFTP {
-
-  function connect() {
-    $this->connection = 'ftp://' . urlencode($this->username) . ':' . urlencode($this->password) . '@' . $this->hostname . ':' . $this->port . '/';
-    if (!is_dir($this->connection)) {
-      throw new FileTransferException('FTP Connection failed.');
-    }
-  }
-
-  function createDirectoryJailed($directory) {
-    if (!@drupal_mkdir($this->connection . $directory)) {
-      $exception = new FileTransferException('Cannot create directory @directory.', NULL, array('@directory' => $directory));
-      throw $exception;
-    }
-  }
-
-  function removeDirectoryJailed($directory) {
-    if (is_dir($this->connection . $directory)) {
-      $dh = opendir($this->connection . $directory);
-      while (($resource = readdir($dh)) !== FALSE) {
-        if ($resource == '.' || $resource == '..') {
-          continue;
-        }
-        $full_path = $directory . DIRECTORY_SEPARATOR . $resource;
-        if (is_file($this->connection . $full_path)) {
-          $this->removeFile($full_path);
-        }
-        elseif (is_dir($this->connection . $full_path)) {
-          $this->removeDirectory($full_path . '/');
-        }
-      }
-      closedir($dh);
-      if (!drupal_rmdir($this->connection . $directory)) {
-        $exception = new FileTransferException('Cannot remove @directory.', NULL, array('@directory' => $directory));
-        throw $exception;
-      }
-    }
-  }
-
-  function copyFileJailed($source, $destination) {
-    if (!@copy($source, $this->connection . '/' . $destination)) {
-      throw new FileTransferException('Cannot copy @source_file to @destination_file.', NULL, array('@source' => $source, '@destination' => $destination));
-    }
-  }
-
-  function removeFileJailed($destination) {
-    if (!@drupal_unlink($this->connection . '/' .$destination)) {
-      throw new FileTransferException('Cannot remove @destination', NULL, array('@destination' => $destination));
-    }
-  }
-
-  function isDirectory($path) {
-    return is_dir($this->connection . '/' . $path);
-  }
-
-  public function isFile($path) {
-    // This is stupid, but is_file and file_exists don't work! always return true.
-    return @fopen($this->connection . '/' . $path,'r');
-  }
-}
-
 class FileTransferFTPExtension extends FileTransferFTP implements FileTransferChmodInterface {
 
   public function connect() {
Index: modules/system/system.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.969
diff -u -p -r1.969 system.module
--- modules/system/system.module	1 Oct 2010 18:37:23 -0000	1.969
+++ modules/system/system.module	3 Oct 2010 05:59:17 -0000
@@ -1724,7 +1724,7 @@ function system_filetransfer_backends() 
   $backends = array();
 
   // This is the default, will be available on most systems.
-  if (function_exists('ftp_connect') || ini_get('allow_url_fopen')) {
+  if (function_exists('ftp_connect')) {
     $backends['ftp'] = array(
       'title' => t('FTP'),
       'class' => 'FileTransferFTP',
