[tracker/tracker-1.0] tracker-search: Don't show "(null)" for nie:InformationElements with no nie:url
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/tracker-1.0] tracker-search: Don't show "(null)" for nie:InformationElements with no nie:url
- Date: Thu, 10 Jul 2014 13:36:18 +0000 (UTC)
commit ef2ef4b9ec6f8b70b46de337332cb75bb1ae83e9
Author: Martyn Russell <martyn lanedo com>
Date: Fri Jun 27 08:51:50 2014 +0100
tracker-search: Don't show "(null)" for nie:InformationElements with no nie:url
src/tracker-utils/tracker-search.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/tracker-utils/tracker-search.c b/src/tracker-utils/tracker-search.c
index 2a4968a..9fd9846 100644
--- a/src/tracker-utils/tracker-search.c
+++ b/src/tracker-utils/tracker-search.c
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2009, Nokia <ivan frade nokia com>
+ * Copyright (C) 2014, SoftAtHome <contact softathome com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -1292,9 +1293,10 @@ get_files (TrackerSparqlConnection *connection,
fts = get_fts_string (search_terms, use_or_operator);
if (fts) {
- query = g_strdup_printf ("SELECT ?u nie:url(?u) "
+ query = g_strdup_printf ("SELECT ?u ?url"
"WHERE { "
" ?u a nie:InformationElement ;"
+ " ?url nie:url(?u) ;"
" fts:match \"%s\" ."
" %s"
"} "
@@ -1306,9 +1308,10 @@ get_files (TrackerSparqlConnection *connection,
search_offset,
search_limit);
} else {
- query = g_strdup_printf ("SELECT ?u nie:url(?u) "
+ query = g_strdup_printf ("SELECT ?u ?url "
"WHERE { "
- " ?u a nie:InformationElement ."
+ " ?u a nie:InformationElement ;"
+ " nie:url ?url ."
" %s"
"} "
"ORDER BY ASC(nie:url(?u)) "
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]