From: Mike Taylor Date: Mon, 9 Dec 2013 22:00:55 +0000 (+0000) Subject: "pz:id=" prefix only prepended to filter string if it doesn't have ANY X-Git-Tag: 0.9.1~108 X-Git-Url: http://sru.miketaylor.org.uk/?a=commitdiff_plain;h=3fdc091d1c577fc776bad0750efbeb2b9f59184a;p=mkws-moved-to-github.git "pz:id=" prefix only prepended to filter string if it doesn't have ANY setting+op up front. Allows more flexibility in the use of ~ operation and non-pz:id settings. --- diff --git a/tools/htdocs/mkws.js b/tools/htdocs/mkws.js index 18ac664..ec346d2 100644 --- a/tools/htdocs/mkws.js +++ b/tools/htdocs/mkws.js @@ -469,9 +469,12 @@ function triggerSearch (query, sort, targets) var filter = mkws.filters[i]; if (filter.id) { if (pp2filter) - pp2filter += "|"; - if (filter.id.indexOf('pz:id=') != 0) + pp2filter += ","; + if (filter.id.match(/^[a-z:]+[=~]/)) { + log("filter '" + filter + "' already begins with SETTING OP"); + } else { filter.id = 'pz:id=' + filter.id; + } pp2filter += filter.id; } else { if (pp2limit)