[gnome-documents] query: limit the string to which format parsing apply



commit 396eced685ea5249fd375b3d573a48998f3a5903
Author: Alban Browaeys <prahal yahoo com>
Date:   Wed Sep 21 19:09:36 2011 +0200

    query: limit the string to which format parsing apply
    
    The full string includes filename as uri which contains percent
    characters which mess up with the format function regex.
    So only apply the format to a subset of the query string to avoid
    confusing the parser.

 src/query.js |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/query.js b/src/query.js
index ea35895..7a4ba1d 100644
--- a/src/query.js
+++ b/src/query.js
@@ -144,11 +144,11 @@ QueryBuilder.prototype = {
 
         if (global) {
             globalSparql +=
-                (Global.categoryManager.getActiveCategoryWhere() +
+                Global.categoryManager.getActiveCategoryWhere() +
                  this._buildFilterString() +
                  ' } ' +
                  'ORDER BY DESC (?mtime)' +
-                 'LIMIT %d OFFSET %d').format(Global.offsetController.getOffsetStep(),
+                 ('LIMIT %d OFFSET %d').format(Global.offsetController.getOffsetStep(),
                                               Global.offsetController.getOffset());
         } else {
             globalSparql += this._buildFilterString() + ' }';



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