Changeset 17677
- Timestamp:
- 04/21/2011 08:40:32 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/class-pop3.php
r17435 r17677 3 3 * mail_fetch/setup.php 4 4 * 5 * @package SquirrelMail 6 * 7 * @copyright (c) 1999-2006 The SquirrelMail Project Team 8 * 9 * @copyright (c) 1999 CDI (cdi@thewebmasters.net) All Rights Reserved 10 * Modified by Philippe Mingo 2001 mingo@rotedic.com 5 * Copyright (c) 1999-2011 CDI (cdi@thewebmasters.net) All Rights Reserved 6 * Modified by Philippe Mingo 2001-2009 mingo@rotedic.com 11 7 * An RFC 1939 compliant wrapper class for the POP3 protocol. 12 8 * 13 9 * Licensed under the GNU GPL. For full terms see the file COPYING. 14 * @license http://opensource.org/licenses/gpl-license.php GNU General Public License15 10 * 16 * pop3 class11 * POP3 class 17 12 * 18 * $Id$ 13 * @copyright 1999-2011 The SquirrelMail Project Team 14 * @license http://opensource.org/licenses/gpl-license.php GNU Public License 15 * @package plugins 16 * @subpackage mail_fetch 19 17 */ 20 18 … … 77 75 // If MAILSERVER is set, override $server with it's value 78 76 79 77 if (!isset($port) || !$port) {$port = 110;} 80 78 if(!empty($this->MAILSERVER)) 81 79 $server = $this->MAILSERVER; … … 254 252 255 253 $line = fgets($fp,$buffer); 256 while ( ! ereg("^\.\r\n",$line))254 while ( !preg_match('/^\.\r\n/',$line)) 257 255 { 258 256 $MsgArray[$count] = $line; … … 321 319 $line = fgets($fp,$this->BUFFER); 322 320 $line = $this->strip_clf($line); 323 if( ereg("^\.",$line))321 if(strpos($line, '.') === 0) 324 322 { 325 323 $this->ERROR = "POP3 pop_list: " . _("Premature end of list"); … … 367 365 368 366 $line = fgets($fp,$buffer); 369 while ( ! ereg("^\.\r\n",$line))370 { 371 if ( $line [0]== '.' ) { $line = substr($line,1); }367 while ( !preg_match('/^\.\r\n/',$line)) 368 { 369 if ( $line{0} == '.' ) { $line = substr($line,1); } 372 370 $MsgArray[$count] = $line; 373 371 $count++; … … 555 553 $count = 1; 556 554 $line = fgets($fp,$buffer); 557 while ( !ereg("^\.\r\n",$line)) { 558 if(ereg("^\.\r\n",$line)) { 559 break; 560 } 555 while ( !preg_match('/^\.\r\n/',$line)) { 561 556 list ($msg,$msgUidl) = preg_split('/\s+/',$line); 562 557 $msgUidl = $this->strip_clf($msgUidl); … … 608 603 return false; 609 604 else 610 return( ereg ("^\+OK", $cmd ));605 return( stripos($cmd, '+OK') !== false ); 611 606 } 612 607 … … 617 612 return $text; 618 613 else { 619 $stripped = str_replace("\r",'',$text); 620 $stripped = str_replace("\n",'',$stripped); 614 $stripped = str_replace(array("\r","\n"),'',$text); 621 615 return $stripped; 622 616 } … … 650 644 651 645 } // End class 652 ?> 646 647 // For php4 compatibility 648 if (!function_exists("stripos")) { 649 function stripos($haystack, $needle){ 650 return strpos($haystack, stristr( $haystack, $needle )); 651 } 652 }
Note: See TracChangeset
for help on using the changeset viewer.