Skip to content
Browse files

Working on 'No Subject' parsing

  • Loading branch information...
1 parent dac9f20 commit ecdbdc892f6d8050171bca11c469695e3cd4c276 @stefancrain stefancrain committed Jan 24, 2013
Showing with 2 additions and 2 deletions.
  1. +1 −1 civicrm/custom/php/CRM/IMAP/AJAX.php
  2. +1 −1 civicrm/scripts/processMailboxes.php
View
2 civicrm/custom/php/CRM/IMAP/AJAX.php
@@ -157,7 +157,7 @@ public static function unifiedMessageInfo($email) {
$origin_subject = ($status == 'direct') ? preg_replace("/(Fwd:|fwd:|Fw:|fw:|Re:|re:) /i", "", $header['subject']) : preg_replace("/(Fwd:|fwd:|Fw:|fw:|Re:|re:) /i", "", $subjects['2']);
$origin_subject = preg_replace("/(\(|\))/i", "", $origin_subject);
- if( trim(strip_tags($origin_subject)) =='' || strtolower($origin_subject) == 'no subject' ){
+ if( trim(strip_tags($origin_subject)) == "" | trim($origin_subject) == "no subject"){
$origin_subject = "No Subject";
}
View
2 civicrm/scripts/processMailboxes.php
@@ -488,7 +488,7 @@ function civiProcessEmail($email, $customHandler)
// remove () sometimes found in emails with no subject
$subject = preg_replace("/(\(|\))/i", "", $subject);
- if( trim(strip_tags($origin_subject)) == "" | $subject == "no subject"){
+ if( trim(strip_tags($subject)) == "" | trim($subject) == "no subject"){
$subject = "No Subject";
}

0 comments on commit ecdbdc8

Please sign in to comment.
Something went wrong with that request. Please try again.