[Pkg-mozext-commits] [gcontactsync] 58/88: Issue #37 - Last modified date warning if a new TB contact has a photo

David Prévot taffit at moszumanska.debian.org
Thu Sep 18 20:52:30 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository gcontactsync.

commit 7a5dcf2d538ab8bb14bac64e3db75e1f14963ec2
Author: Josh Geenen <joshgeenen at gmail.com>
Date:   Sun Jun 22 17:16:09 2014 -0500

    Issue #37 - Last modified date warning if a new TB contact has a photo
---
 src/content/GContact.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/content/GContact.js b/src/content/GContact.js
index ab6ef35..1f9c302 100644
--- a/src/content/GContact.js
+++ b/src/content/GContact.js
@@ -506,10 +506,12 @@ com.gContactSync.GContact.prototype = {
    */
   getLastModifiedDate: function GContact_getLastModifiedDate(aIgnoreWriteOnly) {
     try {
+      var elems = this.xml.getElementsByTagName('updated');
+      if (elems.length === 0) return 0;  // New contact
       if (com.gContactSync.Preferences.mSyncPrefs.writeOnly.value && !aIgnoreWriteOnly) {
         return 1;
       }
-      var sModified = this.xml.getElementsByTagName('updated')[0].childNodes[0].nodeValue,
+      var sModified = elems[0].childNodes[0].nodeValue,
           year      = sModified.substring(0, 4),
           month     = sModified.substring(5, 7),
           day       = sModified.substring(8, 10),

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/gcontactsync.git



More information about the Pkg-mozext-commits mailing list