summaryrefslogtreecommitdiffstats
path: root/etherpad/src/plugins/urlIndexer
diff options
context:
space:
mode:
authorEgil Moeller <egil.moller@freecode.no>2010-04-17 00:16:58 +0200
committerEgil Moeller <egil.moller@freecode.no>2010-04-17 00:16:58 +0200
commit630d57aa4d017cca3d12f234497e9832005c3ded (patch)
tree8322f566d9b6066613a8474a0a7c580e0e1d82df /etherpad/src/plugins/urlIndexer
parent6bd555cb7ff5f45b041eab0179fa758e50a5158c (diff)
downloadetherpad-630d57aa4d017cca3d12f234497e9832005c3ded.tar.gz
etherpad-630d57aa4d017cca3d12f234497e9832005c3ded.tar.bz2
etherpad-630d57aa4d017cca3d12f234497e9832005c3ded.zip
Fixed so that parts of a URL query can be modified w/o affecting the rest of the query
Diffstat (limited to 'etherpad/src/plugins/urlIndexer')
-rw-r--r--etherpad/src/plugins/urlIndexer/controllers/urlBrowser.js4
-rw-r--r--etherpad/src/plugins/urlIndexer/templates/urlBrowser.ejs4
2 files changed, 4 insertions, 4 deletions
diff --git a/etherpad/src/plugins/urlIndexer/controllers/urlBrowser.js b/etherpad/src/plugins/urlIndexer/controllers/urlBrowser.js
index ebd39bd..cdb9602 100644
--- a/etherpad/src/plugins/urlIndexer/controllers/urlBrowser.js
+++ b/etherpad/src/plugins/urlIndexer/controllers/urlBrowser.js
@@ -72,8 +72,8 @@ function onRequest() {
var queryNewTagsSql = tagQuery.newTagsSql(querySql);
var newTags = sqlobj.executeRaw(queryNewTagsSql.sql, queryNewTagsSql.params);
- urlSql = urlSql(querySql, 10);
- var matchingUrls = sqlobj.executeRaw(urlSql.sql, urlSql.params);
+ url = urlSql(querySql, 10);
+ var matchingUrls = sqlobj.executeRaw(url.sql, url.params);
for (i = 0; i < matchingUrls.length; i++) {
matchingUrls[i].TAGS = matchingUrls[i].TAGS.split('#');
diff --git a/etherpad/src/plugins/urlIndexer/templates/urlBrowser.ejs b/etherpad/src/plugins/urlIndexer/templates/urlBrowser.ejs
index a254dc1..1996dc5 100644
--- a/etherpad/src/plugins/urlIndexer/templates/urlBrowser.ejs
+++ b/etherpad/src/plugins/urlIndexer/templates/urlBrowser.ejs
@@ -18,7 +18,7 @@ limitations under the License. */ %>
helpers.setHtmlTitle("EtherPad: Browse URLs by tags");
helpers.includeCss("plugins/twitterStyleTags/tagBrowser.css");
helpers.includeCss("plugins/twitterStyleTags/pad.css");
- helpers.addToHead('\n<link rel="alternate" href="/ep/url/?query=' + tagQuery.tagsToQuery(tags, antiTags) + '&format=rss" type="application/rss+xml" title="Query results as RSS" />\n');
+ helpers.addToHead('\n<link rel="alternate" href="' + helpers.updateToUrl({format:'rss'}) + '" type="application/rss+xml" title="Query results as RSS" />\n');
function inArray(item, arr) {
for (var i = 0; i < arr.length; i++)
@@ -46,7 +46,7 @@ limitations under the License. */ %>
<dd>
<a href="<%= matchingPadUrl %>"><%= matchingPadId %></a>:
<% for (j = 0; j < matchingUrls[i].TAGS.length; j++) { %>
- <a href="/ep/url/?query=<%= tagQuery.tagsToQuery(tags.concat([matchingUrls[i].TAGS[j]]), antiTags) %>" class="padtag" title="<%= matchingUrls[i].TAGS[j] %> matches">#<%= matchingUrls[i].TAGS[j] %></a>
+ <a href="<%= helpers.updateToUrl({query:tagQuery.tagsToQuery(tags.concat([matchingUrls[i].TAGS[j]]), antiTags)}) %>" class="padtag" title="<%= matchingUrls[i].TAGS[j] %> matches">#<%= matchingUrls[i].TAGS[j] %></a>
<% } %>
</dd>
<% } %>