Index: cleanup/mms_us_att/mms_us_att.inc =================================================================== RCS file: cleanup/mms_us_att/mms_us_att.inc diff -N cleanup/mms_us_att/mms_us_att.inc --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ cleanup/mms_us_att/mms_us_att.inc 19 May 2009 06:48:20 -0000 @@ -0,0 +1,41 @@ +fromaddress)) { + // Remove AT&T spam from message and trim whitespace. + $node->body = trim(preg_replace('/--.*?This mobile text message is brought to you by AT&T/s', '', $node->body)); + $node->teaser = node_teaser($node->body); + + if (empty($node->title)) { + // Discard empty messages. + if (empty($node->body) && empty($node->mailsave_attachments)) { + $node = FALSE; + } + // If there is no body, set a default title. + elseif (empty($node->body)) { + $node->title = t('Mobile Submission'); + } + // If there is a body use it to set a title. + else { + $node->title = truncate_utf8($node->body, 60, TRUE, TRUE); + } + } + } +} + +/** + * Report back module information when requested. + */ +function mms_us_att_mailsave_clean_info() { + return array('mms_us_att' => array( + 'provider' => t('AT&T'), + 'country' => 'US', + 'author' => 'Mark Burdett', + 'description' => t('Clean up MMS messages sent via the AT&T US network.'), + )); +}