[epiphany/history-rewrite-second: 18/26] history-service: Ignore queries time range if not set



commit a7f4568572804ce3de50de5c9bde2d7f6f9810fe
Author: Claudio Saavedra <csaavedra igalia com>
Date:   Tue Jan 10 19:11:08 2012 +0200

    history-service: Ignore queries time range if not set

 lib/history/ephy-history-service-urls-table.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/lib/history/ephy-history-service-urls-table.c b/lib/history/ephy-history-service-urls-table.c
index 3c7834b..4892fd4 100644
--- a/lib/history/ephy-history-service-urls-table.c
+++ b/lib/history/ephy-history-service-urls-table.c
@@ -248,9 +248,9 @@ ephy_history_service_find_url_rows (EphyHistoryService *self, EphyHistoryQuery *
 
   statement_str = g_string_new (base_statement);
 
-  if (query->from >= 0)
+  if (query->from > 0)
     statement_str = g_string_append (statement_str, "visits.visit_time >= ? AND ");
-  if (query->to >= 0)
+  if (query->to > 0)
     statement_str = g_string_append (statement_str, "visits.visit_time <= ? AND ");
 
   for (substring = query->substring_list; substring != NULL; substring = substring->next)
@@ -269,7 +269,7 @@ ephy_history_service_find_url_rows (EphyHistoryService *self, EphyHistoryQuery *
     return NULL;
   }
 
-  if (query->from >= 0) {
+  if (query->from > 0) {
     if (ephy_sqlite_statement_bind_int (statement, i++, (int)query->from, &error) == FALSE) {
       g_error ("Could not build urls table query statement: %s", error->message);
       g_error_free (error);
@@ -277,7 +277,7 @@ ephy_history_service_find_url_rows (EphyHistoryService *self, EphyHistoryQuery *
       return NULL;
     }
   }
-  if (query->to >= 0) {
+  if (query->to > 0) {
     if (ephy_sqlite_statement_bind_int (statement, i++, (int)query->to, &error) == FALSE) {
       g_error ("Could not build urls table query statement: %s", error->message);
       g_error_free (error);



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