Changing squirrelmail/Squirrelmail to SquirrelMail in some strings as well as other...
[squirrelmail.git] / plugins / mail_fetch / class.POP3.php
index 8b68493914cfa512f035e1a8cc0e694689670e1b..f19b3cd96af174f0398dd89e74603a81c4df9b02 100644 (file)
@@ -1,9 +1,9 @@
-<?php 
+<?php
 
    /**
     * mail_fetch/setup.php
     *
 
    /**
     * mail_fetch/setup.php
     *
-    * Copyright (c) 1999-2004 The SquirrelMail Project Team
+    * Copyright (c) 1999-2005 The SquirrelMail Project Team
     *
     * Copyright (c) 1999 CDI (cdi@thewebmasters.net) All Rights Reserved
     * Modified by Philippe Mingo 2001 mingo@rotedic.com
     *
     * Copyright (c) 1999 CDI (cdi@thewebmasters.net) All Rights Reserved
     * Modified by Philippe Mingo 2001 mingo@rotedic.com
@@ -79,8 +79,8 @@ class POP3 {
         //  port defaults to 110. Returns true on success, false on fail
 
         // If MAILSERVER is set, override $server with it's value
         //  port defaults to 110. Returns true on success, false on fail
 
         // If MAILSERVER is set, override $server with it's value
-       
-       if (!isset($port) || !$port) {$port = 110;}
+
+        if (!isset($port) || !$port) {$port = 110;}
         if(!empty($this->MAILSERVER))
             $server = $this->MAILSERVER;
 
         if(!empty($this->MAILSERVER))
             $server = $this->MAILSERVER;
 
@@ -306,7 +306,7 @@ class POP3 {
                 $this->ERROR = _("POP3 pop_list:") . ' ' . _("Error ") . "[$reply]";
                 return false;
             }
                 $this->ERROR = _("POP3 pop_list:") . ' ' . _("Error ") . "[$reply]";
                 return false;
             }
-            list($junk,$num,$size) = explode(" ",$reply);
+            list($junk,$num,$size) = preg_split('/\s+/',$reply);
             return $size;
         }
         $cmd = "LIST";
             return $size;
         }
         $cmd = "LIST";
@@ -329,7 +329,7 @@ class POP3 {
                 $this->ERROR = _("POP3 pop_list:") . ' ' . _("Premature end of list");
                 return false;
             }
                 $this->ERROR = _("POP3 pop_list:") . ' ' . _("Premature end of list");
                 return false;
             }
-            list($thisMsg,$msgSize) = explode(" ",$line);
+            list($thisMsg,$msgSize) = preg_split('/\s+/',$line);
             settype($thisMsg,"integer");
             if($thisMsg != $msgC)
             {
             settype($thisMsg,"integer");
             if($thisMsg != $msgC)
             {
@@ -399,7 +399,7 @@ class POP3 {
             return $last;
         }
 
             return $last;
         }
 
-        $Vars = explode(" ",$reply);
+        $Vars = preg_split('/\s+/',$reply);
         $count = $Vars[1];
         $size = $Vars[2];
         settype($count,"integer");
         $count = $Vars[1];
         $size = $Vars[2];
         settype($count,"integer");
@@ -530,7 +530,7 @@ class POP3 {
                 $this->ERROR = _("POP3 uidl:") . ' ' . _("Error ") . "[$reply]";
                 return false;
             }
                 $this->ERROR = _("POP3 uidl:") . ' ' . _("Error ") . "[$reply]";
                 return false;
             }
-            list ($ok,$num,$myUidl) = explode(" ",$reply);
+            list ($ok,$num,$myUidl) = preg_split('/\s+/',$reply);
             return $myUidl;
         } else {
             $this->update_timer();
             return $myUidl;
         } else {
             $this->update_timer();
@@ -561,7 +561,7 @@ class POP3 {
                 if(ereg("^\.\r\n",$line)) {
                     break;
                 }
                 if(ereg("^\.\r\n",$line)) {
                     break;
                 }
-                list ($msg,$msgUidl) = explode(" ",$line);
+                list ($msg,$msgUidl) = preg_split('/\s+/',$line);
                 $msgUidl = $this->strip_clf($msgUidl);
                 if($count == $msg) {
                     $UIDLArray[$msg] = $msgUidl;
                 $msgUidl = $this->strip_clf($msgUidl);
                 if($count == $msg) {
                     $UIDLArray[$msg] = $msgUidl;
@@ -653,4 +653,4 @@ class POP3 {
 
 }   // End class
 
 
 }   // End class
 
-?>
+?>
\ No newline at end of file