Patch title: Release 94 bulk changes
Abstract:
File: /pliant/storage/database/login.pli
Key:
    Removed line
    Added line
module "/pliant/language/unsafe.pli"
module "/pliant/language/schedule/threads_engine.pli"
module "/pliant/util/encoding/html.pli"
module "/pliant/util/encoding/date.pli"


(gvar Relation logins) flags := 4
gvar Sem sem


function data_login user
  arg Str user
  sem request
  logins define addressof:current_thread_header null addressof:(new Str "<plogin timestamp=[dq]"+rfc1123_date:datetime+"[dq] user=[dq]"+html_encode:user+"[dq] />")
  sem release


function data_logout
  sem request
  logins define addressof:current_thread_header null null
  sem release
  

function data_read_login_tag -> log
  arg Link:Str log
  sem rd_request
  log :> (logins query addressof:current_thread_header null) map Str
  if addressof:log=null
    log :> new Str "<plogin timestamp=[dq]"+rfc1123_date:datetime+"[dq] />"
  sem rd_release


export data_login data_logout data_read_login_tag