* fix times of last user access and now
authorWilfried Göesgens <willi@citadel.org>
Wed, 1 Oct 2008 20:41:22 +0000 (20:41 +0000)
committerWilfried Göesgens <willi@citadel.org>
Wed, 1 Oct 2008 20:41:22 +0000 (20:41 +0000)
webcit/http_datestring.c
webcit/static/t/userlist_detailview.html
webcit/useredit.c

index d4c69bf6c250506d534db938977b737c028cd839..908e65424e1e00bbf8f1d60ec062c8462164b48b 100644 (file)
@@ -74,15 +74,15 @@ void tmplput_nowno(StrBuf *Target, int nArgs, WCTemplateToken *Tokens, void *Con
 {
        time_t now;
        now = time(NULL);
-       StrBufAppendPrintf(Target, "%l", now);
+       StrBufAppendPrintf(Target, "%ld", now);
 }
 
 void 
 InitModule_DATE
 (void)
 {
-       RegisterNamespace("DATE:NOW:STR", 1, 2, tmplput_nowstr, CTX_NONE);
-       RegisterNamespace("DATE:NOW:NO", 1, 2, tmplput_nowno, CTX_NONE);
+       RegisterNamespace("DATE:NOW:STR", 0, 0, tmplput_nowstr, CTX_NONE);
+       RegisterNamespace("DATE:NOW:NO", 0, 0, tmplput_nowno, CTX_NONE);
 }
 
 /*@}*/
index b0e5e9e3dcd808c9fb2b8deec3f4861fd27bb9d6..63814bf6503f9321fd31b54e5c5afd761a87b6d0 100644 (file)
@@ -31,7 +31,7 @@
 <tr><td><?_("User ID number")></td><td><input type="text" name="usernum" value="<?USERLIST:UID>" maxlength="7"></td></tr>
 <tr><td><?_("Date and time of last login")></td><td><select name="lastcall">
   <option selected value="<?USERLIST:LASTLOGON:NO>"><?USERLIST:LASTLOGON:STR></option>
-  <option value="<?TIME:NOW:NO>"><?TIME:NOW:STR></option>
+  <option value="<?DATE:NOW:NO>"><?DATE:NOW:STR></option>
 </select></td></tr>
  
 <tr><td><?_("Auto-purge after this many days")></td><td><input type="text" name="purgedays" value="<?USERLIST:DAYSTILLPURGE>" maxlength="5"></td></tr>
index f016b2e21df45ed5c61f8be932f701caa3b3306d..c97a0a91ce50b6af9af038c906c037c5f28de024 100644 (file)
@@ -137,7 +137,7 @@ UserListEntry* NewUserListOneEntry(StrBuf *SerializedUser)
        ul->AccessLevel = StrBufExtract_int(SerializedUser, 5, '|');
        ul->UID = StrBufExtract_int(SerializedUser, 6, '|');
        StrBufExtract_token(ul->LastLogon, SerializedUser, 7, '|');
-       /// TODO: ul->LastLogon -> ulLastLogonT
+       ul->LastLogonT = StrTol(ul->LastLogon);
        ul->DaysTillPurge = StrBufExtract_int(SerializedUser, 8, '|');
        return ul;
 }
@@ -953,7 +953,6 @@ InitModule_USEREDIT
        RegisterConditional(HKEY("COND:USERACCESS"), 0,   ConditionalUserAccess, CTX_USERLIST);
        RegisterConditional(HKEY("COND:USERLIST:FLAG:USE_INTERNET"), 0, ConditionalFlagINetEmail, CTX_USERLIST);
 
-       RegisterConditional(HKEY("COND:USERNAME"), 0, ConditionalUser, CTX_USERLIST);
        RegisterIterator("USERLIST", 0, NULL, iterate_load_userlist, NULL, DeleteHash, CTX_USERLIST);
 }
 /*@}*/