Skip to content
Permalink
Browse files

Fixed some minor problems.

Added a datetime stamp to log lines.

Signed-off-by: Michel <info@1st-setup.nl>
  • Loading branch information
1stsetup committed Nov 9, 2013
1 parent 985401c commit 8544848264379e7dfe8a13a8fd99c2ef929e3ee7
@@ -72,6 +72,24 @@ function erFindOccurrencesRequest(aArgument, aCbOk, aCbError, aListener)
this.startDate = aArgument.startDate;
this.endDate = aArgument.endDate;

try{
if (!this.startDate) {
var monthBeforeDuration = cal.createDuration("-P4W");

this.startDate = cal.now();
this.startDate.addDuration(monthBeforeDuration);
}
dump(" -------------->>> erFindOccurrences: this.startDate="+this.startDate+"\n");
if (!this.endDate) {
var monthAfterDuration = cal.createDuration("P4W");

this.endDate = cal.now();
this.endDate.addDuration(monthAfterDuration);
}
dump(" -------------->>> erFindOccurrences: this.endDate="+this.endDate+"\n");
}
catch(err){dump(" ERROR: erFindOccurrences: err:"+err+"\n");}

this.currentSearchIndex = 1;
this.currentRealIndex = 0;
this.idGroupSize = 25; // We will request in pages of 50 occurrences of the list at once
@@ -184,6 +184,7 @@ try{
//}

rm = null;
aResp = null;

if (lastItemInRange == "false") {
if (!this.getSyncState) {
@@ -201,6 +202,9 @@ try{
if (this.mCbOk) {
this.mCbOk(this, this.creations, this.updates, this.deletions, syncState);
}
this.creations = [];
this.updates = [];
this.deletions = [];
this.isRunning = false;
}
}
@@ -593,7 +593,7 @@ mivExchangeAbCard.prototype = {
}

this.storedDebugLevel = this.globalFunctions.safeGetIntPref(null, PREF_MAINPART+"debuglevel", 0, true);
this.storedDebugLevel = 1;
//this.storedDebugLevel = 1;

if (debugLevel <= this.storedDebugLevel) {
this.globalFunctions.LOG("[exchangeAbCard] "+message + " ("+this.globalFunctions.STACKshort()+")");
@@ -422,7 +422,8 @@ mivFunctions.prototype = {
}
string += "End object\n";
} else {
string = "1st-setup: " + aArg;
var dt = new Date();
string = "1st-setup:"+dt.getFullYear()+"-"+dt.getMonth()+"-"+dt.getDay()+" "+dt.getHours()+":"+dt.getMinutes()+":"+dt.getSeconds()+"."+dt.getMilliseconds()+":" + aArg;
}

// xxx todo consider using function debug()

0 comments on commit 8544848

Please sign in to comment.
You can’t perform that action at this time.