From: Jakub Skoczen Date: Mon, 2 Jul 2007 12:52:03 +0000 (+0000) Subject: Removing array pushes. X-Git-Tag: PAZPAR2.1.0.1~11 X-Git-Url: http://git.indexdata.com/?p=pazpar2-moved-to-github.git;a=commitdiff_plain;h=b1d27db97fd80ec83559efd8620a6f641486ec31 Removing array pushes. --- diff --git a/js/pz2.js b/js/pz2.js index 4cd86ef..6d173a9 100644 --- a/js/pz2.js +++ b/js/pz2.js @@ -1,5 +1,5 @@ /* -** $Id: pz2.js,v 1.41 2007-07-02 10:16:46 jakub Exp $ +** $Id: pz2.js,v 1.42 2007-07-02 12:52:03 jakub Exp $ ** pz2.js - pazpar2's javascript client library. */ @@ -207,10 +207,11 @@ pz2.prototype = else throw new Error("You need to supply query to the search command"); - var searchParams = [{ "command": "search", "query": __myself.currQuery }]; - searchParams.push({"session":__myself.sessionID}); - if (filter !== undefined) - searchParams.push({"filter": filter}); + var searchParams = { "command": "search", "query": __myself.currQuery, "session": __myself.sessionID }; + + if (filter !== undefined) + searchParams["filter"] = filter; + var request = new pzHttpRequest(__myself.pz2String, __myself.errorHandler); request.get( searchParams,