-
Notifications
You must be signed in to change notification settings - Fork 382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
disabling-doubleposts feature #424
Conversation
return false; | ||
} | ||
if ($user->user_id === $this->topic_poster) { | ||
if (Carbon::now()->subdays(1) > $this->topic_last_post_time) { |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
what's with all the file permission changes? might want to check your git setup. |
This gets created on a clean vagrant provision iirc |
I also get these modifications automatically right after the installation by vagrant.
No one noticed this before? |
I did, but I didn't really care to bring that up |
I guess the quick fix is to just let these files be merged. I don't think that would be a problem. |
Kinda up? |
@@ -425,4 +426,30 @@ public function deleteWithCover() | |||
|
|||
$this->delete(); | |||
} | |||
|
|||
public function isADoublePost(User $user) |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
|
Thanks |
Update post-box.coffee Update forum-post.less Update forum-post.less Update Authorize.php Update TopicsController.php Update forum-topic-reply.coffee Update Topic.php Update osu.php Update forum-topic-reply.coffee file modes changed
cleaning warnings
cleaning styleCl Update forum-post.less adding deleted empty lines
Done |
return false; | ||
} | ||
if ($user->user_id === $this->topic_poster) { | ||
if (Carbon::now()->subhours(config('osu.forum.authorDoublePostTime')) > $this->topic_last_post_time) { |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Just make it like this In <div class="forum-post__content forum-post__content forum-post__content--edit-bar">
@if (priv_check('ForumTopicReply', $topic)->can())
@include("forum.topics._post_box_footer", ["submitText" => trans("forum.topic.post_reply")])
@else
<span>
<i class="fa fa-warning"></i>
{{ priv_check('ForumTopicReply', $topic)->message() }}
</span>
@endif
</div> And add relevant check in |
Cleaning warnings
cleaning code cleaning code
Done |
@@ -29,6 +29,10 @@ | |||
'forum' => [ | |||
'admin_forum_id' => intval(env('ADMIN_FORUM_ID', 28)), | |||
'help_forum_ids' => array_map('intval', explode(' ', env('HELP_FORUM_IDS', '4 5 29 30 101'))), | |||
'doublePostTime' => [ |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
Done |
Doubleposting is disabled server-side and user-side. Users can doublepost 3 days after last post.
User that created topic can doublepost every 24h.