/[drupal]/contributions/modules/mailhandler/mailhandler.module
ViewVC logotype

Diff of /contributions/modules/mailhandler/mailhandler.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.87.2.17, Wed Sep 17 16:29:36 2008 UTC revision 1.87.2.18, Thu Dec 25 13:01:20 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: mailhandler.module,v 1.87.2.16 2008/09/14 15:26:07 zstolar Exp $  // $Id: mailhandler.module,v 1.87.2.17 2008/09/17 16:29:36 heine Exp $
3    
4  /**  /**
5   * Retrieve all msgs from a given mailbox and process them.   * Retrieve all msgs from a given mailbox and process them.
# Line 149  function mailhandler_node_submit($node, Line 149  function mailhandler_node_submit($node,
149    list($fromaddress, $fromname) = mailhandler_get_fromaddress($header, $mailbox);    list($fromaddress, $fromname) = mailhandler_get_fromaddress($header, $mailbox);
150    
151    //dprint_r($node); //DEBUG    //dprint_r($node); //DEBUG
152    
153    // Drupal 5.x & 6.x don't support multiple validations: each node_validate()    // Drupal 5.x & 6.x don't support multiple validations: each node_validate()
154    // call will ADD error messages to previous ones, so if some validation error    // call will ADD error messages to previous ones, so if some validation error
155    // occours in one message it will be reported in all messages after it.    // occours in one message it will be reported in all messages after it.
# Line 185  function mailhandler_node_submit($node, Line 185  function mailhandler_node_submit($node,
185    else {    else {
186      unset($_SESSION['messages']['error']);      unset($_SESSION['messages']['error']);
187    }    }
188    
189    if (!$error) {    if (!$error) {
190      // Prepare the node for save and allow modules make changes      // Prepare the node for save and allow modules make changes
191      $node = node_submit($node);      $node = node_submit($node);
# Line 339  function mailhandler_process_message($he Line 339  function mailhandler_process_message($he
339        $node->title .= $subjectarr[$i]->text;        $node->title .= $subjectarr[$i]->text;
340    }    }
341    
342    $node->created = $header->udate;    $node->date = format_date($header->udate, 'custom', 'Y-m-d H:i:s O');
   $node->changed = $header->udate;  
343    $node->format = $mailbox['format'];    $node->format = $mailbox['format'];
344    
345    return $node;    return $node;

Legend:
Removed from v.1.87.2.17  
changed lines
  Added in v.1.87.2.18

  ViewVC Help
Powered by ViewVC 1.1.2