From 6670605b7c3483dc17c5ae1d67e744b32272c1c5 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Fri, 24 Aug 2018 20:43:52 +0930 Subject: [PATCH] Rename discussion.startUser --- framework/core/js/src/common/models/Discussion.js | 2 +- framework/core/js/src/forum/components/DiscussionList.js | 2 +- .../core/js/src/forum/components/DiscussionListItem.js | 8 ++++---- framework/core/js/src/forum/components/TerminalPost.js | 2 +- .../src/Api/Controller/CreateDiscussionController.php | 2 +- .../core/src/Api/Controller/ListDiscussionsController.php | 2 +- .../core/src/Api/Controller/ShowDiscussionController.php | 2 +- .../core/src/Api/Serializer/BasicDiscussionSerializer.php | 2 +- framework/core/src/Discussion/Discussion.php | 6 +++--- framework/core/src/Discussion/DiscussionRenamedLogger.php | 2 +- framework/core/src/User/UserMetadataUpdater.php | 2 +- 11 files changed, 16 insertions(+), 16 deletions(-) diff --git a/framework/core/js/src/common/models/Discussion.js b/framework/core/js/src/common/models/Discussion.js index 7634e47d9..7fa357e6b 100644 --- a/framework/core/js/src/common/models/Discussion.js +++ b/framework/core/js/src/common/models/Discussion.js @@ -10,7 +10,7 @@ Object.assign(Discussion.prototype, { slug: Model.attribute('slug'), startTime: Model.attribute('startTime', Model.transformDate), - startUser: Model.hasOne('startUser'), + user: Model.hasOne('user'), firstPost: Model.hasOne('firstPost'), lastTime: Model.attribute('lastTime', Model.transformDate), diff --git a/framework/core/js/src/forum/components/DiscussionList.js b/framework/core/js/src/forum/components/DiscussionList.js index 72fc707e0..48e1e88ea 100644 --- a/framework/core/js/src/forum/components/DiscussionList.js +++ b/framework/core/js/src/forum/components/DiscussionList.js @@ -87,7 +87,7 @@ export default class DiscussionList extends Component { * @api */ requestParams() { - const params = {include: ['startUser', 'lastUser'], filter: {}}; + const params = {include: ['user', 'lastUser'], filter: {}}; params.sort = this.sortMap()[this.props.params.sort]; diff --git a/framework/core/js/src/forum/components/DiscussionListItem.js b/framework/core/js/src/forum/components/DiscussionListItem.js index 1f4f663bf..39a9d7282 100644 --- a/framework/core/js/src/forum/components/DiscussionListItem.js +++ b/framework/core/js/src/forum/components/DiscussionListItem.js @@ -58,7 +58,7 @@ export default class DiscussionListItem extends Component { if (retain) return retain; const discussion = this.props.discussion; - const startUser = discussion.startUser(); + const user = discussion.user(); const isUnread = discussion.isUnread(); const isRead = discussion.isRead(); const showUnread = !this.showRepliesCount() && isUnread; @@ -93,14 +93,14 @@ export default class DiscussionListItem extends Component {
- - {avatar(startUser, {title: ''})} + {avatar(user, {title: ''})}