Hell, lets be a little funny, too.

This commit is contained in:
Zixaphir 2014-01-09 11:57:45 -07:00
parent da8bcab4f6
commit a7a7df6b7b
3 changed files with 5 additions and 9 deletions

View File

@ -9778,7 +9778,7 @@
Redirect = { Redirect = {
init: function() { init: function() {
var archive, archives, boardID, boards, data, files, id, name, o, record, software, type, _i, _len, _ref; var archive, archives, boardID, boards, data, files, id, name, o, record, software, type, _i, _len, _ref, _ref1;
o = { o = {
thread: {}, thread: {},
post: {}, post: {},
@ -9796,8 +9796,7 @@
} }
} }
for (name in archives) { for (name in archives) {
archive = archives[name]; _ref1 = archives[name], data = _ref1.data, boards = _ref1.boards, files = _ref1.files;
data = archive.data, boards = archive.boards, files = archive.files;
software = data.software; software = data.software;
for (_i = 0, _len = boards.length; _i < _len; _i++) { for (_i = 0, _len = boards.length; _i < _len; _i++) {
boardID = boards[_i]; boardID = boards[_i];

View File

@ -9767,7 +9767,7 @@
Redirect = { Redirect = {
init: function() { init: function() {
var archive, archives, boardID, boards, data, files, id, name, o, record, software, type, _i, _len, _ref; var archive, archives, boardID, boards, data, files, id, name, o, record, software, type, _i, _len, _ref, _ref1;
o = { o = {
thread: {}, thread: {},
post: {}, post: {},
@ -9785,8 +9785,7 @@
} }
} }
for (name in archives) { for (name in archives) {
archive = archives[name]; _ref1 = archives[name], data = _ref1.data, boards = _ref1.boards, files = _ref1.files;
data = archive.data, boards = archive.boards, files = archive.files;
software = data.software; software = data.software;
for (_i = 0, _len = boards.length; _i < _len; _i++) { for (_i = 0, _len = boards.length; _i < _len; _i++) {
boardID = boards[_i]; boardID = boards[_i];
@ -9801,7 +9800,6 @@
} }
} }
} }
console.log(o);
return Redirect.data = o; return Redirect.data = o;
}, },
archives: { archives: {

View File

@ -12,8 +12,7 @@ Redirect =
for type, id of record when (archive = archives[id]) and boardID in (if type is 'file' then archive['file'] else archive['boards']) 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 o[type][boardID] = archive.data
for name, archive of archives for name, {data, boards, files} of archives
{data, boards, files} = archive
{software} = data {software} = data
for boardID in boards for boardID in boards
o.thread[boardID] = data unless boardID of o.thread o.thread[boardID] = data unless boardID of o.thread