1
0
mirror of https://github.com/flarum/core.git synced 2025-08-05 07:57:46 +02:00

Database changes (#16)

* Update core references

* Update core attribute names
This commit is contained in:
Toby Zerner
2018-09-17 04:20:02 +09:30
committed by Franz Liedke
parent 021752296d
commit 58224c2980
4 changed files with 5 additions and 5 deletions

View File

@@ -12,6 +12,6 @@ export default class DiscussionLockedNotification extends Notification {
} }
content() { content() {
return app.translator.trans('flarum-lock.forum.notifications.discussion_locked_text', {user: this.props.notification.sender()}); return app.translator.trans('flarum-lock.forum.notifications.discussion_locked_text', {user: this.props.notification.fromUser()});
} }
} }

View File

@@ -96,10 +96,10 @@ class CreatePostWhenDiscussionIsLocked
$post = $discussion->mergePost($post); $post = $discussion->mergePost($post);
if ($discussion->start_user_id !== $user->id) { if ($discussion->user_id !== $user->id) {
$notification = new DiscussionLockedBlueprint($post); $notification = new DiscussionLockedBlueprint($post);
$this->notifications->sync($notification, $post->exists ? [$discussion->startUser] : []); $this->notifications->sync($notification, $post->exists ? [$discussion->user] : []);
} }
} }
} }

View File

@@ -33,7 +33,7 @@ class DiscussionLockedBlueprint implements BlueprintInterface
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function getSender() public function getFromUser()
{ {
return $this->post->user; return $this->post->user;
} }

View File

@@ -61,7 +61,7 @@ class DiscussionLockedPost extends AbstractEventPost implements MergeableInterfa
$post = new static; $post = new static;
$post->content = static::buildContent($isLocked); $post->content = static::buildContent($isLocked);
$post->time = time(); $post->created_at = time();
$post->discussion_id = $discussionId; $post->discussion_id = $discussionId;
$post->user_id = $userId; $post->user_id = $userId;