2011-11-04 14:00:50

by Radoslaw Jablonski

[permalink] [raw]
Subject: [PATCH obexd 0/1] Fix for missing URL in vcard data problem

I'm sending this patch on behalf Rafal Michalski - he
is on sick leave this week - that's reason why I'm sending
this using my e-mail account.
It fixes one minor bug with handling URL's in sparql queries.

BR,
Radek


2011-11-10 11:44:25

by Johan Hedberg

[permalink] [raw]
Subject: Re: [PATCH obexd 1/1] Fix missing URL vCard's field with OTHER subtype

Hi Mika,

On Thu, Nov 10, 2011, Mika Linnanoja wrote:
> On Fri, Nov 4, 2011 at 4:00 PM, Radoslaw Jablonski
> <[email protected]> wrote:
> > From: Rafal Michalski <[email protected]>
> >
> > Previously URL vCard's field (imported with default OTHER subtype) was
> > missing after pulling entire phonebook or single vCard (for phonebook
> > and each call history as well).
> > This patch fixes that issue by adjusting queries to URL field.
> > ---
> > ?plugins/phonebook-tracker.c | ? 10 ++++------
> > ?1 files changed, 4 insertions(+), 6 deletions(-)
>
> Anybody any comments to this patch? It's well tested to work (is
> anything else using phonebook-tracker than N9?).

I had just missed it. It has now been pushed upstream. Thanks.

Johan

2011-11-10 11:22:07

by Mika Linnanoja

[permalink] [raw]
Subject: Re: [PATCH obexd 1/1] Fix missing URL vCard's field with OTHER subtype

On Fri, Nov 4, 2011 at 4:00 PM, Radoslaw Jablonski
<[email protected]> wrote:
> From: Rafal Michalski <[email protected]>
>
> Previously URL vCard's field (imported with default OTHER subtype) was
> missing after pulling entire phonebook or single vCard (for phonebook
> and each call history as well).
> This patch fixes that issue by adjusting queries to URL field.
> ---
> ?plugins/phonebook-tracker.c | ? 10 ++++------
> ?1 files changed, 4 insertions(+), 6 deletions(-)

Anybody any comments to this patch? It's well tested to work (is
anything else using phonebook-tracker than N9?).

Cheers,
Mika

2011-11-04 14:00:51

by Radoslaw Jablonski

[permalink] [raw]
Subject: [PATCH obexd 1/1] Fix missing URL vCard's field with OTHER subtype

From: Rafal Michalski <[email protected]>

Previously URL vCard's field (imported with default OTHER subtype) was
missing after pulling entire phonebook or single vCard (for phonebook
and each call history as well).
This patch fixes that issue by adjusting queries to URL field.
---
plugins/phonebook-tracker.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/plugins/phonebook-tracker.c b/plugins/phonebook-tracker.c
index e4f2383..a8b97c2 100644
--- a/plugins/phonebook-tracker.c
+++ b/plugins/phonebook-tracker.c
@@ -115,7 +115,7 @@
"nco:birthDate(?_contact) " \
"nco:nickname(?_contact) " \
"(SELECT GROUP_CONCAT(fn:concat( " \
- "?url_val, \"\31\", rdfs:label(?_role) " \
+ "?url_val, \"\31\", tracker:coalesce(rdfs:label(?_role), \"\") "\
"), \"\30\") " \
"WHERE {" \
"?_role nco:url ?url_val . " \
@@ -224,13 +224,11 @@ CALLS_CONSTRAINTS(CONSTRAINT) \
"}) " \
"nco:birthDate(?_contact) " \
"nco:nickname(?_contact) " \
-"(SELECT GROUP_CONCAT(fn:concat( " \
- "?url_value, \"\31\", ?aff_type " \
- "), \"\30\") " \
+"(SELECT GROUP_CONCAT(fn:concat(?url_value, \"\31\", " \
+ "tracker:coalesce(rdfs:label(?c_role), \"\")), \"\30\") " \
"WHERE {" \
"?_contact nco:hasAffiliation ?c_role . " \
"?c_role nco:url ?url_value . " \
- "?c_role rdfs:label ?aff_type . " \
"})" \
"nie:url(nco:photo(?_contact)) " \
"nco:role(?_role) " \
@@ -320,7 +318,7 @@ COMBINED_CONSTRAINT \
"nco:birthDate(<%s>) " \
"nco:nickname(<%s>) " \
"(SELECT GROUP_CONCAT(fn:concat( " \
- "?url_val, \"\31\", rdfs:label(?_role) " \
+ "?url_val, \"\31\", tracker:coalesce(rdfs:label(?_role), \"\") "\
"), \"\30\") " \
"WHERE {" \
"?_role nco:url ?url_val . " \
--
1.6.3.3