imap_header strangeness
| From: | Chuck Hagenbuch | Date: | Wed, 18 Aug 1999 20:39:57 +0000 |
| Subject: | imap_header strangeness | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-10002@lists.php.net to get a copy of this message | ||
I'm curious about these two lines (1887 and 1888) from php3_imap_headerinfo:
add_property_string(return_value,"Recent",cache->recent ? (cache->seen ?
"R": "N") : " ",1);
add_property_string(return_value,"Unseen",(cache->recent | cache->seen) ? "
" : "U",1);
The first makes sense, although it is non-obvious that you need to check for
both R and N to determine if a message is really recent.
Why the second, though? If a message is unseen, it's unseen - why act as if
it's seen if it's also recent?
I'd really like to see these changed to boolean properties, but I guess that
would break a lot of code. Is there any reason why 1888 couldn't be changed
to just depend on cache->seen, though?
-chuck
--
Charles Hagenbuch, <chagenbu@wso.williams.edu>
--
"sleep comes from acorns." - jess