Skip to content
Snippets Groups Projects
Commit 1e6b866f authored by deuce's avatar deuce
Browse files

Remove deleted an unmoderated headers from the passed all_hdrs object, so

they can be used without further testing.
parent e4bd7d42
No related branches found
No related tags found
No related merge requests found
......@@ -9,6 +9,7 @@ function podcast_load_headers(base, from, to, all_hdrs)
var hdrs = [];
var i;
var hdr;
var unvalidated = false;
if (all_hdrs == undefined)
all_hdrs = base.get_all_msg_headers();
......@@ -19,13 +20,23 @@ function podcast_load_headers(base, from, to, all_hdrs)
}
for (i in all_hdrs) {
hdr = all_hdrs[i];
if (hdr == null)
if (unvalidated) {
delete all_hdrs[i];
continue;
if (hdr.attr & MSG_DELETE)
}
if (hdr == null) {
delete all_hdrs[i];
continue;
}
if (hdr.attr & MSG_DELETE) {
delete all_hdrs[i];
continue;
}
if (hdr.attr & MSG_MODERATED) {
if (!(hdr.attr & MSG_VALIDATED))
break;
if (!(hdr.attr & MSG_VALIDATED)) {
unvalidated=true;
continue;
}
}
if (hdr.thread_back != 0)
continue;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment