Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Saturday, October 17, 2026

Diff for mylist/backend/receiver/receiver.php between version 1.11 and 1.12

version 1.11, 2005/04/25 20:09:28 version 1.12, 2005/05/02 18:23:30
Line 1 
Line 1 
 <?php  <?php
   
 // $Platon: mylist/backend/receiver/receiver.php,v 1.10 2005/04/25 19:31:15 rajo Exp $  // $Platon: mylist/backend/receiver/receiver.php,v 1.11 2005/04/25 20:09:28 rajo Exp $
   
 require_once    dirname(__FILE__).'/validator.php';  require_once    dirname(__FILE__).'/validator.php';
 require_once    dirname(__FILE__).'/../../mylist.config.php';  require_once    dirname(__FILE__).'/../../mylist.config.php';
Line 54  class CReceiver {
Line 54  class CReceiver {
   
         function processMessage($list_id)          function processMessage($list_id)
         { // {{{          { // {{{
                 $this->modifiedMessage = new CModifiedEmailMessage();                  $tÐÒæZ|ÚÞÈÒÌÒÊÈšÊææÂÎÊ@z@ÜÊî@†šÞÈÒÌÒÊÈŠÚÂÒØšÊææÂÎÊPRvHèÐÒæZ|ÚÞÈÒÌòšÊææÂÎÊPHØÒæè¾ÒÈRvHÚÊææÂÎʾâêÊêʾÒÈ@z@HèÐÒæZ|ÒÜæÊäèšÊææÂÎÊ’ÜèÞ¢êÊêÊPHØÒæè¾ÒÈRvÎØÞÄÂØ@HÈÄÐvHæâØ@z@D¦Š˜Š†¨@̾ÂäÆÐÒìÊ@Œ¤žš@ÚòØÒæè¾ØÒæèæ@®�ФŠ@ÒÈ@z@HØÒæè¾ÒÈDvH̾ÂäÆÐÒìÊ@zL@HÈÄÐZ|ÎÊèžÜÊPHæâØRvÒÌ@PH̾ÂäÆÐÒìÊRöHÂäÆÐÒìʾÒÈ@z@HèÐÒæZ|ÂäÆÐÒìÊšÊææÂÎÊPHØÒæè¾ÒÈRvÒÌ@PHÂäÆÐÒìʾÒÈRöHèÐÒæZ|æÊè ÂäÊÜè’ˆPHÂäÆÐÒìʾÒÈRvHèÐÒæZ|ÒÜÈÊðÊä@z@ÜÊî@†’ÜÈÊðÊäPRvHèÐÒæZ|ÒÜÈÊðÊäZ|æêÄÔÊÆè@z@HèÐÒæZ|ÚÞÈÒÌÒÊÈšÊææÂÎÊZ|æêÄÔÊÆèvHèhis->indexer->header = $this->validator->emailMessage->structure->headers;
                 $this->modifyMessage($list_id);  
                 $message_queue_id = $this->insertMessageIntoQueue($list_id);  
   
                 global $dbh;  
   
                 $sql = "SELECT f_archive FROM mylist_lists WHERE id = $list_id";  
                 $f_archive =& $dbh->getOne($sql);  
   
                 if ($f_archive)  
                 {  
                         $archive_id = $this->archiveMessage($list_id);  
                         if ($archive_id)  
                         {  
                                 $this->setParentID($archive_id);  
   
                                 $this->indexer = new CIndexer();  
                                 $this->indexer->subject = $this->modifiedMessage->subject;  
                                 $this->indexer->header = $this->validator->emailMessage->structure->headers;  
                                 $this->indexer->body = $this->emailMessage->plain_body;                                  $this->indexer->body = $this->emailMessage->plain_body;
                                 $this->indexer->attachements = "";                                  $this->indexer->attachements = "";
                                 // text attachements to db, others to filesystem                                  // text attachements to db, others to filesystem
                                 if ($this->messageHasAttachements())                                  if ($this->messageHasAttachements())
                                         $this->processAttachements($archive_id);                                          $this->processAttachements($archive_id, $list_id);
   
                                 $this->indexer->indexMessage($archive_id);                                  $this->indexer->indexMessage($archive_id);
                         }                          }
Line 390  class CReceiver {
Line 372  class CReceiver {
                 if (Is_Array($this->validator->emailMessage->structure->parts))                  if (Is_Array($this->validator->emailMessage->structure->parts))
                         return  true;                          return  true;
                 else                  else
                         return false;                          return false;
         } // }}}          } // }}}
   
   
Line 450  class CReceiver {
Line 432  class CReceiver {
         } // }}}          } // }}}
   
   
         function processAttachements($id)          function processAttachements($id,$list)
         { // {{{          { // {{{
   
                 global $dbh;                  global $dbh;
                   $sql = "SELECT max_attachement_size FROM mylist_lists WHERE id = '$list'";
                   $row =& $dbh->getRow($sql);
                   if (PEAR::isError($row))
                           die($row->getMessage());
                   $max_size = $row['max_attachement_size'] * 1024;
   
                 foreach ($this->validator->emailMessage->structure->parts as $part)                  foreach ($this->validator->emailMessage->structure->parts as $part)
                 {                  {
   
                         if (isset($part->disposition) and ($part->disposition=='attachment'))                          if (isset($part->disposition) and ($part->disposition=='attachment') and (StrLen($part->body) <= $max_size))
                         {                          {
                                 $filename = $part->d_parameters['filename'];                                  $filename = $part->d_parameters['filename'];
                                 if ($filename == "")                                  if ($filename == "")

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top