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
Branches
Tags
No related merge requests found
......@@ -9,21 +9,25 @@ template.subs=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);
if(msgbase.open()) {
msgs=msgbase.total_msgs;
lastmsg=msgbase.last_msg;
if(lastmsg>0) {
lastdate=msgbase.get_msg_header(false,lastmsg);
lastdate=parseInt(lastdate.date);
lastdate=strftime("%m/%d/%y",lastdate);
}
else
lastdate="Unknown";
msgbase.close();
template.subs[s].messages=msgs;
template.subs[s].lastmsg=lastdate;
}
if(msgbase.open()) {
var lastdate="Unknown";
msgs=msgbase.total_msgs;
if(msgs != undefined && msgs > 0) {
lastmsg=msgbase.last_msg;
if(lastmsg != undefined && lastmsg > 0) {
lastdate=msgbase.get_msg_header(false,lastmsg);
if(lastdate!=undefined && lastdate != null) {
lastdate=new Date(lastdate.date);
lastdate=lastdate.getTime()/1000;
if(lastdate>0)
lastdate=strftime("%m/%d/%y",lastdate);
}
}
}
msgbase.close();
template.subs[s].messages=msgs;
template.subs[s].lastmsg=lastdate;
}
}
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