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
|
root = g.SITE.Build.post obj
|
||||||
t2 = new Date().getTime()
|
t2 = new Date().getTime()
|
||||||
Test.time += t2 - t1
|
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
|
fail = false
|
||||||
|
|
||||||
x = post.normalizedOriginal
|
x = post.normalizedOriginal
|
||||||
|
|||||||
@ -1,11 +1,12 @@
|
|||||||
class Post
|
class Post
|
||||||
toString: -> @ID
|
toString: -> @ID
|
||||||
|
|
||||||
constructor: (root, @thread, @board) ->
|
constructor: (root, @thread, @board, flags={}) ->
|
||||||
<% if (readJSON('/.tests_enabled')) { %>
|
<% if (readJSON('/.tests_enabled')) { %>
|
||||||
@normalizedOriginal = Test.normalize root
|
@normalizedOriginal = Test.normalize root
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
|
$.extend @, flags
|
||||||
@ID = +root.id.match(/\d*$/)[0]
|
@ID = +root.id.match(/\d*$/)[0]
|
||||||
@threadID = @thread.ID
|
@threadID = @thread.ID
|
||||||
@boardID = @board.ID
|
@boardID = @board.ID
|
||||||
@ -55,7 +56,7 @@ class Post
|
|||||||
|
|
||||||
@clones = []
|
@clones = []
|
||||||
<% if (readJSON('/.tests_enabled')) { %>
|
<% if (readJSON('/.tests_enabled')) { %>
|
||||||
return if arguments[3] is 'forBuildTest'
|
return if @forBuildTest
|
||||||
<% } %>
|
<% } %>
|
||||||
if g.posts[@fullID]
|
if g.posts[@fullID]
|
||||||
@isRebuilt = true
|
@isRebuilt = true
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user