[gnome-documents] documents: use tracker:coalesce() to sanitize the authors string



commit 013493fd316fd8dfa78a0967dfd91e72cbcdf957
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Mon Aug 29 13:39:43 2011 -0400

    documents: use tracker:coalesce() to sanitize the authors string

 src/documents.js |    2 --
 src/query.js     |    2 +-
 2 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/src/documents.js b/src/documents.js
index b771d9f..5713634 100644
--- a/src/documents.js
+++ b/src/documents.js
@@ -104,8 +104,6 @@ DocCommon.prototype = {
         this.pixbuf = Utils.pixbufFromRdfType(this._type);
 
         // sanitize
-        if (!this.author)
-            this.author = '';
         if (!this.uri)
             this.uri = '';
 
diff --git a/src/query.js b/src/query.js
index 40dbbcb..187c47f 100644
--- a/src/query.js
+++ b/src/query.js
@@ -110,7 +110,7 @@ QueryBuilder.prototype = {
             'SELECT DISTINCT ?urn ' + // urn
              'nie:url(?urn) ' + // uri
              'tracker:coalesce(nie:title(?urn), nfo:fileName(?urn)) ' + // title
-             'tracker:coalesce(nco:fullname(?creator), nco:fullname(?publisher)) ' + // author
+             'tracker:coalesce(nco:fullname(?creator), nco:fullname(?publisher), \'\') ' + // author
              'tracker:coalesce(nfo:fileLastModified(?urn), nie:contentLastModified(?urn)) AS ?mtime ' + // mtime
              'nao:identifier(?urn) ' + // identifier
              'rdf:type(?urn) ' + // type



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]