| 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. |
| 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. |
| 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); |
| 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; |