From: Mike Taylor Date: Wed, 23 Apr 2014 16:39:50 +0000 (+0100) Subject: New pp2filter implementation that uses visitTargets. X-Git-Tag: 1.0.0~867 X-Git-Url: http://git.indexdata.com/?p=mkws-moved-to-github.git;a=commitdiff_plain;h=242978c76db07a1f1f72a6f02c7b0e03bc6eb365 New pp2filter implementation that uses visitTargets. --- diff --git a/src/mkws-filter.js b/src/mkws-filter.js index 353fce5..02ce422 100644 --- a/src/mkws-filter.js +++ b/src/mkws-filter.js @@ -84,7 +84,19 @@ function filterSet(team) { }; that.NEW_pp2filter = function() { - return that.OLD_pp2filter(); + var res = ""; + + that.visitTargets(function(id, name) { + if (res) res += ","; + if (id.match(/^[a-z:]+[=~]/)) { + m_team.log("filter '" + id + "' already begins with SETTING OP"); + } else { + id = 'pz:id=' + id; + } + res += id; + }); + + return res; }; that.pp2limit = function(initial) {