From: Marcin Koziej <marcin.koziej@nowoczesnapolska.org.pl>
Date: Mon, 2 Apr 2012 10:21:23 +0000 (+0200)
Subject: ignore unfilled placeholders, add an atom: namespace to opensearch.xml
X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/e782ecb87d4e300bf1473c5b85123468c7c4193b?ds=sidebyside;hp=-c

ignore unfilled placeholders, add an atom: namespace to opensearch.xml
---

e782ecb87d4e300bf1473c5b85123468c7c4193b
diff --git a/apps/opds/views.py b/apps/opds/views.py
index e01c17283..bb38b7b6b 100644
--- a/apps/opds/views.py
+++ b/apps/opds/views.py
@@ -370,6 +370,11 @@ class SearchFeed(AcquisitionFeed):
             author = request.GET.get('author', '')
             title = request.GET.get('title', '')
             translator = request.GET.get('translator', '')
+
+            # Our client didn't handle the opds placeholders
+            if author == '{atom:author}': author = ''       
+            if title == '{atom:title}': title = ''
+            if translator == '{atom:contributor}': translator = ''
             categories = None
             fuzzy = False
 
diff --git a/lib/librarian b/lib/librarian
index b8e34e0e6..9e13b0c99 160000
--- a/lib/librarian
+++ b/lib/librarian
@@ -1 +1 @@
-Subproject commit b8e34e0e6730ef76a353a15ff653faa9e8c88a77
+Subproject commit 9e13b0c994e9d481008bef7006a74609adfd16f8
diff --git a/wolnelektury/static/opensearch.xml b/wolnelektury/static/opensearch.xml
index 1e05889ad..8ccdd269b 100644
--- a/wolnelektury/static/opensearch.xml
+++ b/wolnelektury/static/opensearch.xml
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"
-        xmlns:moz="http://www.mozilla.org/2006/browser/search/">
+		       xmlns:atom="http://www.w3.org/2005/Atom"
+		       xmlns:moz="http://www.mozilla.org/2006/browser/search/">
     <ShortName>Wolne Lektury</ShortName>
     <Description>WolneLektury.pl, szkolna biblioteka internetowa.</Description>
     <InputEncoding>UTF-8</InputEncoding>