wp/wp-admin/includes/class-ftp-pure.php
changeset 7 cf61fcea0001
parent 5 5e2f62d02dcd
child 9 177826044cd9
--- a/wp/wp-admin/includes/class-ftp-pure.php	Tue Jun 09 11:14:17 2015 +0000
+++ b/wp/wp-admin/includes/class-ftp-pure.php	Mon Oct 14 17:39:30 2019 +0200
@@ -25,11 +25,7 @@
  * @link http://www.phpclasses.org/browse/package/1743.html Site
  * @license LGPL http://www.opensource.org/licenses/lgpl-license.html
  */
-class ftp extends ftp_base {
-
-	function ftp($verb=FALSE, $le=FALSE) {
-		$this->__construct($verb, $le);
-	}
+class ftp_pure extends ftp_base {
 
 	function __construct($verb=FALSE, $le=FALSE) {
 		parent::__construct(false, $verb, $le);
@@ -110,7 +106,7 @@
 				$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);