Changeset 34281
- Timestamp:
- 09/18/2015 08:19:18 AM (9 years ago)
- Location:
- trunk/src/wp-admin/includes
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-ftp-pure.php
r32990 r34281 111 111 return FALSE; 112 112 } 113 $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));113 $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)); 114 114 $this->_datahost=$ip_port[0].".".$ip_port[1].".".$ip_port[2].".".$ip_port[3]; 115 115 $this->_dataport=(((int)$ip_port[4])<<8) + ((int)$ip_port[5]); -
trunk/src/wp-admin/includes/class-ftp-sockets.php
r32990 r34281 132 132 return FALSE; 133 133 } 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));134 $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 135 $this->_datahost=$ip_port[0].".".$ip_port[1].".".$ip_port[2].".".$ip_port[3]; 136 136 $this->_dataport=(((int)$ip_port[4])<<8) + ((int)$ip_port[5]); 137 137 $this->SendMSG("Connecting to ".$this->_datahost.":".$this->_dataport); 138 138 if(!@socket_connect($this->_ftp_data_sock, $this->_datahost, $this->_dataport)) { -
trunk/src/wp-admin/includes/class-ftp.php
r32990 r34281 381 381 if(!$this->_exec("PWD", "pwd")) return FALSE; 382 382 if(!$this->_checkCode()) return FALSE; 383 return ereg_replace("^[0-9]{3} \"(.+)\".+", "\\1", $this->_message);383 return preg_replace("/^[0-9]{3} \"(.+)\".*$/s", "\\1", $this->_message); 384 384 } 385 385 … … 425 425 if(!$this->_exec("SIZE ".$pathname, "filesize")) return FALSE; 426 426 if(!$this->_checkCode()) return FALSE; 427 return ereg_replace("^[0-9]{3} ([0-9]+)".CRLF, "\\1", $this->_message);427 return preg_replace("/^[0-9]{3} ([0-9]+).*$/s", "\\1", $this->_message); 428 428 } 429 429 … … 445 445 if(!$this->_exec("MDTM ".$pathname, "mdtm")) return FALSE; 446 446 if(!$this->_checkCode()) return FALSE; 447 $mdtm = ereg_replace("^[0-9]{3} ([0-9]+)".CRLF, "\\1", $this->_message);447 $mdtm = preg_replace("/^[0-9]{3} ([0-9]+).*$/", "\\1", $this->_message); 448 448 $date = sscanf($mdtm, "%4d%2d%2d%2d%2d%2d"); 449 449 $timestamp = mktime($date[3], $date[4], $date[5], $date[1], $date[2], $date[0]); … … 819 819 $sensitive=(PHP_OS!='WIN32'); 820 820 return ($sensitive? 821 ereg($pattern,$probe):822 eregi($pattern,$probe)821 preg_match( '/' . preg_quote( $pattern, '/' ) . '/', $probe ) : 822 preg_match( '/' . preg_quote( $pattern, '/' ) . '/i', $probe ) 823 823 ); 824 824 }
Note: See TracChangeset
for help on using the changeset viewer.