ignore unfilled placeholders, add an atom: namespace to opensearch.xml
authorMarcin Koziej <marcin.koziej@nowoczesnapolska.org.pl>
Mon, 2 Apr 2012 10:21:23 +0000 (12:21 +0200)
committerMarcin Koziej <marcin.koziej@nowoczesnapolska.org.pl>
Mon, 2 Apr 2012 10:22:18 +0000 (12:22 +0200)
apps/opds/views.py
lib/librarian
wolnelektury/static/opensearch.xml

index e01c172..bb38b7b 100644 (file)
@@ -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
 
index b8e34e0..9e13b0c 160000 (submodule)
@@ -1 +1 @@
-Subproject commit b8e34e0e6730ef76a353a15ff653faa9e8c88a77
+Subproject commit 9e13b0c994e9d481008bef7006a74609adfd16f8
index 1e05889..8ccdd26 100644 (file)
@@ -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>