diff --git a/src/General/Test.coffee b/src/General/Test.coffee index a7f0343d0..30b7f03f9 100644 --- a/src/General/Test.coffee +++ b/src/General/Test.coffee @@ -76,7 +76,7 @@ Test = root = g.SITE.Build.post obj t2 = new Date().getTime() Test.time += t2 - t1 - post2 = new Post root, post.thread, post.board, 'forBuildTest' + post2 = new Post root, post.thread, post.board, {forBuildTest: true} fail = false x = post.normalizedOriginal diff --git a/src/classes/Post.coffee b/src/classes/Post.coffee index 58d927b37..a03bbfc21 100644 --- a/src/classes/Post.coffee +++ b/src/classes/Post.coffee @@ -1,11 +1,12 @@ class Post toString: -> @ID - constructor: (root, @thread, @board) -> + constructor: (root, @thread, @board, flags={}) -> <% if (readJSON('/.tests_enabled')) { %> @normalizedOriginal = Test.normalize root <% } %> + $.extend @, flags @ID = +root.id.match(/\d*$/)[0] @threadID = @thread.ID @boardID = @board.ID @@ -55,7 +56,7 @@ class Post @clones = [] <% if (readJSON('/.tests_enabled')) { %> - return if arguments[3] is 'forBuildTest' + return if @forBuildTest <% } %> if g.posts[@fullID] @isRebuilt = true