[Zorba-coders] [Merge] lp:~zorba-coders/zorba/email-module-dayofweek-fix into lp:zorba/email-module

2012-06-14 Thread David Graf
The proposal to merge lp:~zorba-coders/zorba/email-module-dayofweek-fix into 
lp:zorba/email-module has been updated.

Commit Message changed to:

Fixing the problem of not parsing email dates if they don't contain the day of 
the week.

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/email-module-dayofweek-fix/+merge/108335
-- 
https://code.launchpad.net/~zorba-coders/zorba/email-module-dayofweek-fix/+merge/108335
Your team Zorba Coders is subscribed to branch lp:zorba/email-module.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/email-module-dayofweek-fix into lp:zorba/email-module

2012-06-14 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/email-module-dayofweek-fix-2012-06-14T16-01-24.92Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/email-module-dayofweek-fix/+merge/108335
Your team Zorba Coders is subscribed to branch lp:zorba/email-module.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/email-module-dayofweek-fix into lp:zorba/email-module

2012-06-14 Thread Zorba Build Bot
Validation queue job email-module-dayofweek-fix-2012-06-14T16-01-24.92Z is 
finished. The final status was:

All tests succeeded!
-- 
https://code.launchpad.net/~zorba-coders/zorba/email-module-dayofweek-fix/+merge/108335
Your team Zorba Coders is subscribed to branch lp:zorba/email-module.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/email-module-dayofweek-fix into lp:zorba/email-module

2012-06-14 Thread noreply
The proposal to merge lp:~zorba-coders/zorba/email-module-dayofweek-fix into 
lp:zorba/email-module has been updated.

Status: Approved = Merged

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/email-module-dayofweek-fix/+merge/108335
-- 
https://code.launchpad.net/~zorba-coders/zorba/email-module-dayofweek-fix/+merge/108335
Your team Zorba Coders is subscribed to branch lp:zorba/email-module.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/email-module-dayofweek-fix into lp:zorba/email-module

2012-06-06 Thread Sorin Marian Nasoi
Review: Approve

The changes seem OK to me.
-- 
https://code.launchpad.net/~zorba-coders/zorba/email-module-dayofweek-fix/+merge/108335
Your team Zorba Coders is subscribed to branch lp:zorba/email-module.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/email-module-dayofweek-fix into lp:zorba/email-module

2012-06-06 Thread Sorin Marian Nasoi
The proposal to merge lp:~zorba-coders/zorba/email-module-dayofweek-fix into 
lp:zorba/email-module has been updated.

Status: Needs review = Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/email-module-dayofweek-fix/+merge/108335
-- 
https://code.launchpad.net/~zorba-coders/zorba/email-module-dayofweek-fix/+merge/108335
Your team Zorba Coders is subscribed to branch lp:zorba/email-module.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/email-module-dayofweek-fix into lp:zorba/email-module

2012-06-06 Thread Chris Hillery
David - you also need to set the commit message for this merge proposal in 
order for it to go through the validation queue.
-- 
https://code.launchpad.net/~zorba-coders/zorba/email-module-dayofweek-fix/+merge/108335
Your team Zorba Coders is subscribed to branch lp:zorba/email-module.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/email-module-dayofweek-fix into lp:zorba/email-module

2012-06-04 Thread Chris Hillery
Review: Approve

Not a terribly pretty solution, but then text processing in C++ never is. As 
far as I can tell it gets the job done.
-- 
https://code.launchpad.net/~zorba-coders/zorba/email-module-dayofweek-fix/+merge/108335
Your team Zorba Coders is subscribed to branch lp:zorba/email-module.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/email-module-dayofweek-fix into lp:zorba/email-module

2012-06-01 Thread David Graf
David Graf has proposed merging 
lp:~zorba-coders/zorba/email-module-dayofweek-fix into lp:zorba/email-module.

Requested reviews:
  Chris Hillery (ceejatec)
  Sorin Marian Nasoi (sorin.marian.nasoi)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/email-module-dayofweek-fix/+merge/108335

Date of emails do sometimes not contain the day of the week.
-- 
https://code.launchpad.net/~zorba-coders/zorba/email-module-dayofweek-fix/+merge/108335
Your team Zorba Coders is subscribed to branch lp:zorba/email-module.
=== modified file 'src/com/zorba-xquery/www/modules/email/imap.xq.src/imap_function.cpp'
--- src/com/zorba-xquery/www/modules/email/imap.xq.src/imap_function.cpp	2012-01-24 11:30:35 +
+++ src/com/zorba-xquery/www/modules/email/imap.xq.src/imap_function.cpp	2012-06-01 12:49:33 +
@@ -178,12 +178,22 @@
   
   std::string lMonths = JanFebMarAprMayJunJulAugSepOctNovDec;
   size_t lMonthNumber = lMonths.find(lTokens[2]);
-  // if the month was not found, were really in trouble!
+  size_t lTokensShift = 0;
   if (lMonthNumber == std::string::npos) {
-Item lQName = theModule-getItemFactory()-createQName(SCHEMA_NAMESPACE,
-XPTY0004);
-throw USER_EXCEPTION(lQName, Error while processing month in date of message);
-  }  
+// if the month is not there, day of week is possibly missing, 
+// shift tokens by one and retry
+lTokensShift = -1;
+lMonthNumber = lMonths.find(lTokens[2 + lTokensShift]);
+if (lMonthNumber == std::string::npos) {
+  // now, we are really in trouble, something is wrong
+  Item lQName = theModule-getItemFactory()
+  -createQName(SCHEMA_NAMESPACE, XPTY0004);
+  throw USER_EXCEPTION(
+  lQName, 
+  Error while processing month in date of email message);
+}
+  }
+
   lMonthNumber = lMonthNumber/3 + 1;
   // make sure its MM and not just 
   if (lMonthNumber  10) {
@@ -191,12 +201,15 @@
   }  
   lResult  lMonthNumber  -;
   
-  if (lTokens[1].size() == 1) {
+  if (lTokens[1 + lTokensShift].size() == 1) {
 lResult  0;
   }
-  lResult  lTokens[1]  T;
+  lResult  lTokens[1 + lTokensShift]  T;
   // now hh:mm:ss
-  lResult  lTokens[4].substr(0,2)  :  lTokens[4].substr(3,2)  :  lTokens[4].substr(6,2);
+  lResult  lTokens[4 + lTokensShift].substr(0,2)  : 
+ lTokens[4 + lTokensShift].substr(3,2)  : 
+ lTokens[4 + lTokensShift].substr(6,2);
+
 
   return lResult.str();
   

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/email-module-dayofweek-fix into lp:zorba/email-module

2012-06-01 Thread David Graf
Pushed another two fixes.
-- 
https://code.launchpad.net/~zorba-coders/zorba/email-module-dayofweek-fix/+merge/108335
Your team Zorba Coders is subscribed to branch lp:zorba/email-module.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/email-module-dayofweek-fix into lp:zorba/email-module

2012-06-01 Thread Alexander Kreutz
Review: Approve

Now it should be good.
-- 
https://code.launchpad.net/~zorba-coders/zorba/email-module-dayofweek-fix/+merge/108335
Your team Zorba Coders is subscribed to branch lp:zorba/email-module.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp