Permalink
Browse files

Revert "s/callback/jsonp for clarity."

callback is JQuery's default, so it's a better name.

This reverts commit 03c9f8b.
  • Loading branch information...
1 parent 5fd8e27 commit b5326bdf398466af56f1d25b5b0f280ef8d2227b Robert Newson committed Jul 14, 2009
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/main/java/com/github/rnewson/couchdb/lucene/SearchRequest.java
@@ -68,7 +68,7 @@
private final boolean rewrite_query;
- private final String jsonp;
+ private final String callback;
private final String ifNoneMatch;
@@ -86,7 +86,7 @@ public SearchRequest(final JSONObject obj, final String viewsig) throws ParseExc
this.debug = query.optBoolean("debug", false);
this.include_docs = query.optBoolean("include_docs", false);
this.rewrite_query = query.optBoolean("rewrite", false);
- this.jsonp = query.optString("jsonp");
+ this.callback = query.optString("callback");
// Parse query.
this.q = Config.QP.parse(query.getString("q"));
@@ -255,8 +255,8 @@ public String execute(final IndexSearcher searcher) throws IOException {
headers.put("Content-Type", "text/plain");
result.put("body", escape(json.toString(2)));
} else {
- if (jsonp != null)
- result.put("json", String.format("%s(%s)", jsonp, json));
+ if (callback != null)
+ result.put("json", String.format("%s(%s)", callback, json));
else
result.put("json", json);
}

0 comments on commit b5326bd

Please sign in to comment.