From 415e01780988505b92e5584b1ff5e8443ce48039 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Tue, 13 Oct 2015 22:17:46 +0100 Subject: [PATCH] Proper (non-hacky) fix for SUP-807. team.newSearch now rightly looks in the widget for configuration, not in the team. This means that configuration items set directly in the widget itself (such as the "target" setting in the Wikipedia and Reference Universe widgets) are now found, whereas previously only settings that had been established at the team level or higher -- such as the targetfilter categories of us.openrepo.net -- were found. --- src/mkws-team.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/mkws-team.js b/src/mkws-team.js index 7126abd..8c81a1a 100644 --- a/src/mkws-team.js +++ b/src/mkws-team.js @@ -297,13 +297,13 @@ mkws.makeTeam = function($, teamName) { } { - if (!sortOrder) sortOrder = that.config.sort; - if (!maxrecs) maxrecs = that.config.maxrecs; - if (!perpage) perpage = that.config.perpage; - if (!limit) limit = that.config.limit; - if (!targets) targets = that.config.targets; - if (!torusquery) torusquery = that.config.targetfilter; - var target = that.config.target; + if (!sortOrder) sortOrder = widget.config.sort; + if (!maxrecs) maxrecs = widget.config.maxrecs; + if (!perpage) perpage = widget.config.perpage; + if (!limit) limit = widget.config.limit; + if (!targets) targets = widget.config.targets; + if (!torusquery) torusquery = widget.config.targetfilter; + var target = widget.config.target; if (target) torusquery = 'udb=="' + target + '"'; var s = "running search: '" + query + "'"; -- 1.7.10.4