[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdesupport/akonadi/server/src/handler
From: Volker Krause <vkrause () kde ! org>
Date: 2009-02-28 21:56:46
Message-ID: 1235858206.094944.28466.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 933425 by vkrause:
Only retrieve all child items when we absolutely have to.
M +12 -5 modify.cpp
--- trunk/kdesupport/akonadi/server/src/handler/modify.cpp #933424:933425
@@ -53,11 +53,18 @@
if ( collection.id() == 0 )
return failureResponse( "Cannot modify root collection" );
- if ( line.indexOf( "PARENT ", pos ) > 0 ) {
- ItemRetriever retriever( connection() );
- retriever.setCollection( collection, true );
- retriever.setRetrieveFullPayload( true );
- retriever.exec();
+ int p = 0;
+ if ( (p = line.indexOf( "PARENT ", pos )) > 0 ) {
+ ImapParser::parseString( line, collectionByteArray, pos );
+ const Collection newParent = HandlerHelper::collectionFromIdOrName( collectionByteArray );
+ if ( newParent.isValid() && collection.parentId() != newParent.id()
+ && collection.resourceId() != newParent.resourceId() )
+ {
+ ItemRetriever retriever( connection() );
+ retriever.setCollection( collection, true );
+ retriever.setRetrieveFullPayload( true );
+ retriever.exec();
+ }
}
DataStore *db = connection()->storageBackend();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic