Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Nedeľa, 25. október 2026

Rozdiely pre Metafox/lib/Mail/RFC822.php medzi verziami 1.1 a 1.2

verzia 1.1, 2005/06/05 12:14:29 verzia 1.2, 2005/11/07 20:37:48
Riadok 177  class Mail_RFC822 {
Riadok 177  class Mail_RFC822 {
         $this->error      = null;          $this->error      = null;
         $this->index      = null;          $this->index      = null;
   
         while ($this->address = $this->_splitAddresses($this->address)) {          // Unfold any long lines in $this->address.
             continue;          $this->address = preg_replace('/\r?\n/', "\r\n", $this->address);
         }          $this->address = preg_replace('/\r\n(\t| )+/', ' ', $this->address);
   
           while ($this->address = $this->_splitAddresses($this->address));
   
         if ($this->address === false || isset($this->error)) {          if ($this->address === false || isset($this->error)) {
             require_once 'PEAR.php';              require_once 'PEAR.php';
Riadok 472  class Mail_RFC822 {
Riadok 474  class Mail_RFC822 {
         for ($i = 0; $i < count($addresses); $i++) {          for ($i = 0; $i < count($addresses); $i++) {
             if (!$this->validateMailbox($addresses[$i])) {              if (!$this->validateMailbox($addresses[$i])) {
                 if (empty($this->error)) {                  if (empty($this->error)) {
                     $this->error = 'Validation failed for "' . $addresses[$i] . '"';                      $this->error = 'Validation failed for: ' . $addresses[$i];
                 }                  }
                 return false;                  return false;
             }              }
Riadok 584  class Mail_RFC822 {
Riadok 586  class Mail_RFC822 {
         // Leading and trailing "          // Leading and trailing "
         $qstring = substr($qstring, 1, -1);          $qstring = substr($qstring, 1, -1);
   
         // Perform check.          // Perform check, removing quoted characters first.
         return !(preg_match('/(.)[\x0D\\\\"]/', $qstring, $matches) && $matches[1] != '\\');          return !preg_match('/[\x0D\\\\"]/', preg_replace('/\\\\./', '', $qstring));
     }      }
   
     /**      /**
Riadok 910  class Mail_RFC822 {
Riadok 912  class Mail_RFC822 {
      */       */
     function isValidInetAddress($data, $strict = false)      function isValidInetAddress($data, $strict = false)
     {      {
         $regex = $strict ? '/^([.0-9a-z_-]+)@(([0-9a-z-]+\.)+[0-9a-z]{2,4})$/i' : '/^([*+!.&#$|\'\\%\/0-9a-z^_`{}=?~:-]+)@(([0-9a-z-]+\.)+[0-9a-z]{2,4})$/i';          $regex = $strict ? '/^([.0-9a-z_+-]+)@(([0-9a-z-]+\.)+[0-9a-z]{2,4})$/i' : '/^([*+!.&#$|\'\\%\/0-9a-z^_`{}=?~:-]+)@(([0-9a-z-]+\.)+[0-9a-z]{2,4})$/i';
         if (preg_match($regex, trim($data), $matches)) {          if (preg_match($regex, trim($data), $matches)) {
             return array($matches[1], $matches[2]);              return array($matches[1], $matches[2]);
         } else {          } else {

Legend:
Odstranené z verzie1.1  
zmenené riadky
  Pridané vo verzii1.2

Platon Group <platon@platon.sk> http://platon.sk/
Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok