Author: Alexandru Stanoi
Date: 2007-05-07 09:22:03 +0200 (Mon, 07 May 2007)
New Revision: 5090
Log:
- Added PEEK support to sortMessages() in IMAP transport.
Modified:
trunk/Mail/ChangeLog
trunk/Mail/src/transports/imap/imap_transport.php
trunk/Mail/tests/transports/transport_imap_test.php
Modified: trunk/Mail/ChangeLog
===================================================================
--- trunk/Mail/ChangeLog 2007-05-07 07:20:39 UTC (rev 5089)
+++ trunk/Mail/ChangeLog 2007-05-07 07:22:03 UTC (rev 5090)
@@ -37,7 +37,7 @@
- Implemented feature #10341: MixedPart mail without attachments -
Documentation enhancement
- Implemented feature #10682: The IMAP PEEK command is now supported
- through the top() method.
+ through the top() method. Added PEEK support to sortMessages() also.
1.2.1 - [RELEASEDATE]
Modified: trunk/Mail/src/transports/imap/imap_transport.php
===================================================================
--- trunk/Mail/src/transports/imap/imap_transport.php 2007-05-07 07:20:39 UTC
(rev 5089)
+++ trunk/Mail/src/transports/imap/imap_transport.php 2007-05-07 07:22:03 UTC
(rev 5090)
@@ -1512,7 +1512,7 @@
$messageNumbers = implode( ',', $messages );
$tag = $this->getNextTag();
- $this->connection->sendData( "{$tag} FETCH {$messageNumbers}
(BODY[HEADER.FIELDS ({$query})])" );
+ $this->connection->sendData( "{$tag} FETCH {$messageNumbers}
(BODY.PEEK[HEADER.FIELDS ({$query})])" );
$response = trim( $this->connection->getLine() );
while ( strpos( $response, $tag ) === false )
Modified: trunk/Mail/tests/transports/transport_imap_test.php
===================================================================
--- trunk/Mail/tests/transports/transport_imap_test.php 2007-05-07 07:20:39 UTC
(rev 5089)
+++ trunk/Mail/tests/transports/transport_imap_test.php 2007-05-07 07:22:03 UTC
(rev 5090)
@@ -1449,6 +1449,22 @@
$imap->deleteMailbox( "Guybrush" );
}
+ public function testSortWithPeek()
+ {
+ $imap = new ezcMailImapTransport( "dolly.ez.no" );
+ $imap->authenticate( "ezcomponents", "ezcomponents" );
+ $imap->createMailbox( "Guybrush" );
+ $imap->selectMailbox( "Inbox" );
+ $imap->copyMessages( "1,2", "Guybrush" );
+ $imap->selectMailbox( "Guybrush" );
+ $imap->clearFlag( "1,2", "SEEN" );
+ $this->assertEquals( 0, $imap->countByFlag( "SEEN" ) );
+ $src = $imap->sortMessages( array( 1, 2 ), "Subject" );
+ $this->assertEquals( 0, $imap->countByFlag( "SEEN" ) );
+ $imap->selectMailbox( "Inbox" );
+ $imap->deleteMailbox( "Guybrush" );
+ }
+
public function tearDown()
{
$imap = new ezcMailImapTransport( "dolly.ez.no" );
--
svn-components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/svn-components