Browse Source

Add comment to parsePriority function. I had to duplicate this function in
Rfc822Header.php AND imap_messages.php because both seem to do header parsing.

Thijs Kinkhorst 20 years ago
parent
commit
a3de86e11f
1 changed files with 12 additions and 1 deletions
  1. 12 1
      functions/imap_messages.php

+ 12 - 1
functions/imap_messages.php

@@ -479,6 +479,17 @@ function elapsedTime($start) {
 }
 }
 
 
 
 
+/**
+ * Normalise the different Priority headers into a uniform value,
+ * namely that of the X-Priority header (1, 3, 5). Supports:
+ * Prioirty, X-Priority, Importance.
+ * X-MS-Mail-Priority is not parsed because it always coincides
+ * with one of the other headers.
+ *
+ * DUPLICATE CODE ALERT:
+ * NOTE: this is actually a duplicate from the function in
+ * class/mime/Rfc822Header.php.
+ */
 function parsePriority($value) {
 function parsePriority($value) {
     $value = strtolower(array_shift(split('/\w/',trim($value))));
     $value = strtolower(array_shift(split('/\w/',trim($value))));
     if ( is_numeric($value) ) {
     if ( is_numeric($value) ) {
@@ -972,4 +983,4 @@ function sqimap_get_small_header($imap_stream, $id, $sent) {
     return $res[0];
     return $res[0];
 }
 }
 
 
-?>
+?>