- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-ftp-sockets.php
r32990 r46626 1 1 <?php 2 2 /** 3 * PemFTP - A Ftp implementation in pure PHP3 * PemFTP - An Ftp implementation in pure PHP 4 4 * 5 5 * @package PemFTP … … 9 9 * @copyright Alexey Dotsenko 10 10 * @author Alexey Dotsenko 11 * @link http ://www.phpclasses.org/browse/package/1743.html Site12 * @license LGPL http ://www.opensource.org/licenses/lgpl-license.html11 * @link https://www.phpclasses.org/package/1743-PHP-FTP-client-in-pure-PHP.html 12 * @license LGPL https://opensource.org/licenses/lgpl-license.html 13 13 */ 14 14 … … 23 23 * @copyright Alexey Dotsenko 24 24 * @author Alexey Dotsenko 25 * @link http ://www.phpclasses.org/browse/package/1743.html Site26 * @license LGPL http ://www.opensource.org/licenses/lgpl-license.html25 * @link https://www.phpclasses.org/package/1743-PHP-FTP-client-in-pure-PHP.html 26 * @license LGPL https://opensource.org/licenses/lgpl-license.html 27 27 */ 28 class ftp extends ftp_base {28 class ftp_sockets extends ftp_base { 29 29 30 30 function __construct($verb=FALSE, $le=FALSE) { 31 31 parent::__construct(true, $verb, $le); 32 }33 34 function ftp($verb=FALSE, $le=FALSE) {35 $this->__construct($verb, $le);36 32 } 37 33 … … 132 128 return FALSE; 133 129 } 134 $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));130 $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)); 135 131 $this->_datahost=$ip_port[0].".".$ip_port[1].".".$ip_port[2].".".$ip_port[3]; 136 132 $this->_dataport=(((int)$ip_port[4])<<8) + ((int)$ip_port[5]); 137 133 $this->SendMSG("Connecting to ".$this->_datahost.":".$this->_dataport); 138 134 if(!@socket_connect($this->_ftp_data_sock, $this->_datahost, $this->_dataport)) {
Note: See TracChangeset
for help on using the changeset viewer.