community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject svn commit: r1729141 - /comdev/helpwanted.apache.org/site/listitems.lua
Date Mon, 08 Feb 2016 11:41:35 GMT
Author: humbedooh
Date: Mon Feb  8 11:41:35 2016
New Revision: 1729141

URL: http://svn.apache.org/viewvc?rev=1729141&view=rev
Log:
hide done tasks unless asked for

Modified:
    comdev/helpwanted.apache.org/site/listitems.lua

Modified: comdev/helpwanted.apache.org/site/listitems.lua
URL: http://svn.apache.org/viewvc/comdev/helpwanted.apache.org/site/listitems.lua?rev=1729141&r1=1729140&r2=1729141&view=diff
==============================================================================
--- comdev/helpwanted.apache.org/site/listitems.lua (original)
+++ comdev/helpwanted.apache.org/site/listitems.lua Mon Feb  8 11:41:35 2016
@@ -78,6 +78,15 @@ function handle(r)
     
     local doc = elastic.find(dsl, 200, 'item', 'created')
     if doc and #doc > 0 then
+        if not get.all then
+            local vdoc = {}
+            for k, v in pairs(doc) do
+                if not v.closed then
+                    table.insert(vdoc, v)
+                end
+            end
+            doc = vdoc
+        end
         r:puts(JSON.encode(doc))
     else
         r:puts[[{}]]



Mime
View raw message