Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.1/wp-includes/class-pop3.php

    r17677 r17436  
    33 * mail_fetch/setup.php
    44 *
    5  * Copyright (c) 1999-2011 CDI (cdi@thewebmasters.net) All Rights Reserved
    6  * Modified by Philippe Mingo 2001-2009 mingo@rotedic.com
     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
    711 * An RFC 1939 compliant wrapper class for the POP3 protocol.
    812 *
    913 * Licensed under the GNU GPL. For full terms see the file COPYING.
     14 * @license http://opensource.org/licenses/gpl-license.php GNU General Public License
    1015 *
    11  * POP3 class
     16 * pop3 class
    1217 *
    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
     18 * $Id$
    1719 */
    1820
     
    7577        // If MAILSERVER is set, override $server with it's value
    7678
    77     if (!isset($port) || !$port) {$port = 110;}
     79    if (!isset($port) || !$port) {$port = 110;}
    7880        if(!empty($this->MAILSERVER))
    7981            $server = $this->MAILSERVER;
     
    252254
    253255        $line = fgets($fp,$buffer);
    254         while ( !preg_match('/^\.\r\n/',$line))
     256        while ( !ereg("^\.\r\n",$line))
    255257        {
    256258            $MsgArray[$count] = $line;
     
    319321            $line = fgets($fp,$this->BUFFER);
    320322            $line = $this->strip_clf($line);
    321             if(strpos($line, '.') === 0)
     323            if(ereg("^\.",$line))
    322324            {
    323325                $this->ERROR = "POP3 pop_list: " . _("Premature end of list");
     
    365367
    366368        $line = fgets($fp,$buffer);
    367         while ( !preg_match('/^\.\r\n/',$line))
    368         {
    369             if ( $line{0} == '.' ) { $line = substr($line,1); }
     369        while ( !ereg("^\.\r\n",$line))
     370        {
     371            if ( $line[0] == '.' ) { $line = substr($line,1); }
    370372            $MsgArray[$count] = $line;
    371373            $count++;
     
    553555            $count = 1;
    554556            $line = fgets($fp,$buffer);
    555             while ( !preg_match('/^\.\r\n/',$line)) {
     557            while ( !ereg("^\.\r\n",$line)) {
     558                if(ereg("^\.\r\n",$line)) {
     559                    break;
     560                }
    556561                list ($msg,$msgUidl) = preg_split('/\s+/',$line);
    557562                $msgUidl = $this->strip_clf($msgUidl);
     
    603608            return false;
    604609        else
    605             return( stripos($cmd, '+OK') !== false );
     610            return( ereg ("^\+OK", $cmd ) );
    606611    }
    607612
     
    612617            return $text;
    613618        else {
    614             $stripped = str_replace(array("\r","\n"),'',$text);
     619            $stripped = str_replace("\r",'',$text);
     620            $stripped = str_replace("\n",'',$stripped);
    615621            return $stripped;
    616622        }
     
    644650
    645651}   // End class
    646 
    647 // For php4 compatibility
    648 if (!function_exists("stripos")) {
    649     function stripos($haystack, $needle){
    650         return strpos($haystack, stristr( $haystack, $needle ));
    651     }
    652 }
     652?>
Note: See TracChangeset for help on using the changeset viewer.