diff options
author | Egil Moeller <egil.moller@freecode.no> | 2010-03-27 19:33:53 +0100 |
---|---|---|
committer | Egil Moeller <egil.moller@freecode.no> | 2010-03-27 19:33:53 +0100 |
commit | 8c8980de42f8b73e36316bcb394dfae462734eaf (patch) | |
tree | 8d16c851aa7cd86956d5814512740098d07ccd14 | |
parent | 09cf289402efbd795616a121855a69c89f9678af (diff) | |
download | etherpad-8c8980de42f8b73e36316bcb394dfae462734eaf.tar.gz etherpad-8c8980de42f8b73e36316bcb394dfae462734eaf.tar.xz etherpad-8c8980de42f8b73e36316bcb394dfae462734eaf.zip |
Added ability to show last changed pads
-rw-r--r-- | etherpad/src/plugins/twitterStyleTags/controllers/tagBrowser.js | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/etherpad/src/plugins/twitterStyleTags/controllers/tagBrowser.js b/etherpad/src/plugins/twitterStyleTags/controllers/tagBrowser.js index f5e63f7..46175c8 100644 --- a/etherpad/src/plugins/twitterStyleTags/controllers/tagBrowser.js +++ b/etherpad/src/plugins/twitterStyleTags/controllers/tagBrowser.js @@ -196,12 +196,21 @@ function onRequest() { var newTags = sqlobj.executeRaw(queryNewTagsSql.sql, queryNewTagsSql.params); var matchingPads; - if (tags.length > 0 || antiTags.length > 0) { - var sql = "select p.PAD_ID as ID, p.TAGS from PAD_TAG_CACHE as p, " + querySql.sql + " as q where p.PAD_ID = q.ID limit 10" + var sql = '' + + 'select ' + + ' m.id as ID, ' + + ' c.TAGS ' + + 'from ' + + querySql.sql + ' as q ' + + ' join PAD_SQLMETA as m on ' + + ' m.id = q.ID ' + + ' join PAD_TAG_CACHE as c on ' + + ' c.PAD_ID = q.ID ' + + 'order by ' + + ' lastWriteTime desc ' + + 'limit 10'; + matchingPads = sqlobj.executeRaw(sql, querySql.params); - } else { - matchingPads = []; - } for (i = 0; i < matchingPads.length; i++) { matchingPads[i].TAGS = matchingPads[i].TAGS.split('#'); |