WordPress.org

Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-ftp-sockets.php

    r46955 r46955  
    11<?php
    22/**
    3  * PemFTP - A Ftp implementation in pure PHP
     3 * PemFTP - An Ftp implementation in pure PHP
    44 *
    55 * @package PemFTP
     
    99 * @copyright Alexey Dotsenko
    1010 * @author Alexey Dotsenko
    11  * @link http://www.phpclasses.org/browse/package/1743.html Site
    12  * @license LGPL http://www.opensource.org/licenses/lgpl-license.html
     11 * @link https://www.phpclasses.org/package/1743-PHP-FTP-client-in-pure-PHP.html
     12 * @license LGPL https://opensource.org/licenses/lgpl-license.html
    1313 */
    1414
     
    2323 * @copyright Alexey Dotsenko
    2424 * @author Alexey Dotsenko
    25  * @link http://www.phpclasses.org/browse/package/1743.html Site
    26  * @license LGPL http://www.opensource.org/licenses/lgpl-license.html
     25 * @link https://www.phpclasses.org/package/1743-PHP-FTP-client-in-pure-PHP.html
     26 * @license LGPL https://opensource.org/licenses/lgpl-license.html
    2727 */
    28 class ftp extends ftp_base {
     28class ftp_sockets extends ftp_base {
    2929
    3030    function __construct($verb=FALSE, $le=FALSE) {
    3131        parent::__construct(true, $verb, $le);
    32     }
    33 
    34     function ftp($verb=FALSE, $le=FALSE) {
    35         $this->__construct($verb, $le);
    3632    }
    3733
     
    132128                return FALSE;
    133129            }
    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));
    135131            $this->_datahost=$ip_port[0].".".$ip_port[1].".".$ip_port[2].".".$ip_port[3];
    136             $this->_dataport=(((int)$ip_port[4])<<8) + ((int)$ip_port[5]);
     132            $this->_dataport=(((int)$ip_port[4])<<8) + ((int)$ip_port[5]);
    137133            $this->SendMSG("Connecting to ".$this->_datahost.":".$this->_dataport);
    138134            if(!@socket_connect($this->_ftp_data_sock, $this->_datahost, $this->_dataport)) {
Note: See TracChangeset for help on using the changeset viewer.