diff --git a/database.go b/database.go index 130e4af..b164dcb 100644 --- a/database.go +++ b/database.go @@ -901,7 +901,7 @@ func prepareStatements(db *sql.DB) { stmtHonksForUser = preparetodie(db, selecthonks+"where honks.honkid > ? and honks.userid = ? and dt > ?"+myhonkers+butnotthose+limit) stmtHonksForUserFirstClass = preparetodie(db, selecthonks+"where honks.honkid > ? and honks.userid = ? and dt > ? and (what <> 'tonk')"+myhonkers+butnotthose+limit) stmtHonksForMe = preparetodie(db, selecthonks+"where honks.honkid > ? and honks.userid = ? and dt > ? and whofore = 1"+butnotthose+limit) - stmtHonksFromLongAgo = preparetodie(db, selecthonks+"where honks.honkid > ? and honks.userid = ? and dt < ? and dt > ? and whofore = 2"+butnotthose+limit) + stmtHonksFromLongAgo = preparetodie(db, selecthonks+"where honks.honkid > ? and honks.userid = ? and dt > ? and dt < ? and whofore = 2"+butnotthose+limit) stmtHonksISaved = preparetodie(db, selecthonks+"where honks.honkid > ? and honks.userid = ? and flags & 4 order by honks.honkid desc") stmtHonksByHonker = preparetodie(db, selecthonks+"join honkers on (honkers.xid = honks.honker or honkers.xid = honks.oonker) where honks.honkid > ? and honks.userid = ? and honkers.name = ?"+butnotthose+limit) stmtHonksByXonker = preparetodie(db, selecthonks+" where honks.honkid > ? and honks.userid = ? and (honker = ? or oonker = ?)"+butnotthose+limit) diff --git a/views/header.html b/views/header.html index 4212c94..344bda3 100644 --- a/views/header.html +++ b/views/header.html @@ -34,7 +34,7 @@
  • chatter
  • tags
  • events -
  • long ago +
  • long ago
  • saved
  • honkers
  • filters diff --git a/views/honkpage.js b/views/honkpage.js index a93c332..e810c9f 100644 --- a/views/honkpage.js +++ b/views/honkpage.js @@ -238,6 +238,8 @@ function relinklinks() { el.onclick = pageswitcher("first", "") el = document.getElementById("savedlink") el.onclick = pageswitcher("saved", "") + el = document.getElementById("longagolink") + el.onclick = pageswitcher("longago", "") relinklinks() window.onpopstate = statechanger history.replaceState(curpagestate, "some title", "") diff --git a/web.go b/web.go index 2525285..cda4073 100644 --- a/web.go +++ b/web.go @@ -120,7 +120,7 @@ func homepage(w http.ResponseWriter, r *http.Request) { case "/longago": templinfo["ServerMessage"] = "long ago and far away!" templinfo["PageName"] = "longago" - honks = gethonksforme(userid, 0) + honks = gethonksfromlongago(userid, 0) honks = osmosis(honks, userid, false) case "/events": templinfo["ServerMessage"] = "some recent and upcoming events"