Skip to content
Snippets Groups Projects
Commit 248070e4 authored by deuce's avatar deuce
Browse files

Fix all the date stuff (date header is not a time_t)

parent 2545441b
No related branches found
No related tags found
No related merge requests found
...@@ -9,21 +9,25 @@ template.subs=msg_area.grp[grp].sub_list; ...@@ -9,21 +9,25 @@ template.subs=msg_area.grp[grp].sub_list;
for(s in msg_area.grp[grp].sub_list) { for(s in msg_area.grp[grp].sub_list) {
msgbase = new MsgBase(msg_area.grp[grp].sub_list[s].code); msgbase = new MsgBase(msg_area.grp[grp].sub_list[s].code);
if(msgbase.open()) { if(msgbase.open()) {
msgs=msgbase.total_msgs; var lastdate="Unknown";
lastmsg=msgbase.last_msg; msgs=msgbase.total_msgs;
if(lastmsg>0) { if(msgs != undefined && msgs > 0) {
lastdate=msgbase.get_msg_header(false,lastmsg); lastmsg=msgbase.last_msg;
lastdate=parseInt(lastdate.date); if(lastmsg != undefined && lastmsg > 0) {
lastdate=strftime("%m/%d/%y",lastdate); lastdate=msgbase.get_msg_header(false,lastmsg);
} if(lastdate!=undefined && lastdate != null) {
else lastdate=new Date(lastdate.date);
lastdate="Unknown"; lastdate=lastdate.getTime()/1000;
msgbase.close(); if(lastdate>0)
template.subs[s].messages=msgs; lastdate=strftime("%m/%d/%y",lastdate);
template.subs[s].lastmsg=lastdate; }
}
} }
msgbase.close();
template.subs[s].messages=msgs;
template.subs[s].lastmsg=lastdate;
}
} }
write_template("msgs/subs.inc"); write_template("msgs/subs.inc");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment