Change fourth argument of Post constructor to more general flags argument.
This commit is contained in:
parent
4f0a24484a
commit
64d8dce693
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user