X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/11be15bd505d66a91e2c80062190b13e315a04a9..3194d1bb103c2d8db4f44feeced5e58ee2756658:/wp-admin/includes/class-ftp-pure.php?ds=sidebyside diff --git a/wp-admin/includes/class-ftp-pure.php b/wp-admin/includes/class-ftp-pure.php index c765d553..28e56779 100644 --- a/wp-admin/includes/class-ftp-pure.php +++ b/wp-admin/includes/class-ftp-pure.php @@ -3,7 +3,7 @@ * PemFTP - A Ftp implementation in pure PHP * * @package PemFTP - * @since 2.5 + * @since 2.5.0 * * @version 1.0 * @copyright Alexey Dotsenko @@ -17,7 +17,7 @@ * * @package PemFTP * @subpackage Pure - * @since 2.5 + * @since 2.5.0 * * @version 1.0 * @copyright Alexey Dotsenko @@ -27,14 +27,14 @@ */ class ftp extends ftp_base { - function ftp($verb=FALSE, $le=FALSE) { - $this->__construct($verb, $le); - } - function __construct($verb=FALSE, $le=FALSE) { parent::__construct(false, $verb, $le); } + function ftp($verb=FALSE, $le=FALSE) { + $this->__construct($verb, $le); + } + // // // @@ -110,7 +110,7 @@ class ftp extends ftp_base { $this->_data_close(); return FALSE; } - $ip_port = explode(",", ereg_replace("^.+ \\(?([0-9]{1,3},[0-9]{1,3},[0-9]{1,3},[0-9]{1,3},[0-9]+,[0-9]+)\\)?.*".CRLF."$", "\\1", $this->_message)); + $ip_port = explode(",", preg_replace("/^.+ \\(?([0-9]{1,3},[0-9]{1,3},[0-9]{1,3},[0-9]{1,3},[0-9]+,[0-9]+)\\)?.*$/s", "\\1", $this->_message)); $this->_datahost=$ip_port[0].".".$ip_port[1].".".$ip_port[2].".".$ip_port[3]; $this->_dataport=(((int)$ip_port[4])<<8) + ((int)$ip_port[5]); $this->SendMSG("Connecting to ".$this->_datahost.":".$this->_dataport);