]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/includes/class-ftp.php
WordPress 3.9.1-scripts
[autoinstalls/wordpress.git] / wp-admin / includes / class-ftp.php
index 80703a9552ce44b4eb43889e4a17d9e63df3b5f6..f068f157bd8224e073d02b8948e24e4aa88ae892 100644 (file)
@@ -9,7 +9,7 @@
  * @copyright Alexey Dotsenko
  * @author Alexey Dotsenko
  * @link http://www.phpclasses.org/browse/package/1743.html Site
- * @license LGPL License http://www.opensource.org/licenses/lgpl-license.html
+ * @license LGPL http://www.opensource.org/licenses/lgpl-license.html
  */
 
 /**
@@ -495,7 +495,7 @@ class ftp_base {
                $this->_features=array();
                foreach($f as $k=>$v) {
                        $v=explode(" ", trim($v));
-                       $this->_features[array_shift($v)]=$v;;
+                       $this->_features[array_shift($v)]=$v;
                }
                return true;
        }
@@ -896,11 +896,12 @@ class ftp_base {
        }
 }
 
-$mod_sockets=TRUE;
-if (!extension_loaded('sockets')) {
-       $prefix = (PHP_SHLIB_SUFFIX == 'dll') ? 'php_' : '';
-       if(!@dl($prefix . 'sockets.' . PHP_SHLIB_SUFFIX)) $mod_sockets=FALSE;
+$mod_sockets = extension_loaded( 'sockets' );
+if ( ! $mod_sockets && function_exists( 'dl' ) && is_callable( 'dl' ) ) {
+       $prefix = ( PHP_SHLIB_SUFFIX == 'dll' ) ? 'php_' : '';
+       @dl( $prefix . 'sockets.' . PHP_SHLIB_SUFFIX );
+       $mod_sockets = extension_loaded( 'sockets' );
 }
 
-require_once "class-ftp-".($mod_sockets?"sockets":"pure").".php";
+require_once "class-ftp-" . ( $mod_sockets ? "sockets" : "pure" ) . ".php";
 ?>