Unbreak post resurrection. Whoopse

This commit is contained in:
Zixaphir 2014-01-09 11:54:51 -07:00
parent 8f5b04a55f
commit da8bcab4f6
3 changed files with 32 additions and 33 deletions

View File

@ -9778,7 +9778,7 @@
Redirect = {
init: function() {
var archive, archives, boardID, data, id, name, o, type, _i, _len, _ref, _ref1;
var archive, archives, boardID, boards, data, files, id, name, o, record, software, type, _i, _len, _ref;
o = {
thread: {},
post: {},
@ -9787,27 +9787,27 @@
archives = Redirect.archives;
_ref = Conf['selectedArchives'];
for (boardID in _ref) {
data = _ref[boardID];
for (type in data) {
id = data[type];
if ((archive = archives[id]) && __indexOf.call(archive[type] || archive['boards'], boardID) >= 0) {
record = _ref[boardID];
for (type in record) {
id = record[type];
if ((archive = archives[id]) && __indexOf.call((type === 'file' ? archive['file'] : archive['boards']), boardID) >= 0) {
o[type][boardID] = archive.data;
}
}
}
for (name in archives) {
archive = archives[name];
_ref1 = archive.boards;
for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
boardID = _ref1[_i];
data = archive.data;
data = archive.data, boards = archive.boards, files = archive.files;
software = data.software;
for (_i = 0, _len = boards.length; _i < _len; _i++) {
boardID = boards[_i];
if (!(boardID in o.thread)) {
o.thread[boardID] = data;
}
if (!(boardID in o.post || archive.software !== 'foolfuuka')) {
if (!(boardID in o.post || software !== 'foolfuuka')) {
o.post[boardID] = data;
}
if (!(boardID in o.file || __indexOf.call(archive.files, boardID) < 0)) {
if (!(boardID in o.file || __indexOf.call(files, boardID) < 0)) {
o.file[boardID] = data;
}
}

View File

@ -9767,7 +9767,7 @@
Redirect = {
init: function() {
var archive, archives, boardID, data, id, name, o, type, _i, _len, _ref, _ref1;
var archive, archives, boardID, boards, data, files, id, name, o, record, software, type, _i, _len, _ref;
o = {
thread: {},
post: {},
@ -9776,31 +9776,32 @@
archives = Redirect.archives;
_ref = Conf['selectedArchives'];
for (boardID in _ref) {
data = _ref[boardID];
for (type in data) {
id = data[type];
if ((archive = archives[id]) && __indexOf.call(archive[type] || archive['boards'], boardID) >= 0) {
record = _ref[boardID];
for (type in record) {
id = record[type];
if ((archive = archives[id]) && __indexOf.call((type === 'file' ? archive['file'] : archive['boards']), boardID) >= 0) {
o[type][boardID] = archive.data;
}
}
}
for (name in archives) {
archive = archives[name];
_ref1 = archive.boards;
for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
boardID = _ref1[_i];
data = archive.data;
data = archive.data, boards = archive.boards, files = archive.files;
software = data.software;
for (_i = 0, _len = boards.length; _i < _len; _i++) {
boardID = boards[_i];
if (!(boardID in o.thread)) {
o.thread[boardID] = data;
}
if (!(boardID in o.post || archive.software !== 'foolfuuka')) {
if (!(boardID in o.post || software !== 'foolfuuka')) {
o.post[boardID] = data;
}
if (!(boardID in o.file || __indexOf.call(archive.files, boardID) < 0)) {
if (!(boardID in o.file || __indexOf.call(files, boardID) < 0)) {
o.file[boardID] = data;
}
}
}
console.log(o);
return Redirect.data = o;
},
archives: {

View File

@ -8,20 +8,18 @@ Redirect =
{archives} = Redirect
for boardID, data of Conf['selectedArchives']
for type, id of data when (archive = archives[id]) and boardID in (archive[type] or archive['boards'])
for boardID, record of Conf['selectedArchives']
for type, id of record when (archive = archives[id]) and boardID in (if type is 'file' then archive['file'] else archive['boards'])
o[type][boardID] = archive.data
for name, archive of archives
for boardID in archive.boards
{data} = archive
unless boardID of o.thread
o.thread[boardID] = data
unless boardID of o.post or archive.software isnt 'foolfuuka'
o.post[boardID] = data
unless boardID of o.file or boardID not in archive.files
o.file[boardID] = data
{data, boards, files} = archive
{software} = data
for boardID in boards
o.thread[boardID] = data unless boardID of o.thread
o.post[boardID] = data unless boardID of o.post or software isnt 'foolfuuka'
o.file[boardID] = data unless boardID of o.file or boardID not in files
Redirect.data = o
archives: