Skip to content

Commit ea98c55

Browse files
committed
Making sure posts always pick up morphs.
1 parent 9765ff1 commit ea98c55

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/models/Forum/Post.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class Forum_Post extends Forum
6363
'history' => array('hasMany', 'Forum_Post_Edit', 'foreignKey' => 'forum_post_id', 'orderBy' => array('created_at', 'desc')),
6464
'status' => array('hasOne', 'Forum_Post_Status', 'foreignKey' => 'forum_post_id'),
6565
'moderations' => array('morphMany', 'Forum_Moderation', 'name' => 'resource'),
66-
'morph' => array('morphTo'),
66+
'morph' => array('morphTo', 'withTrashed'),
6767
);
6868

6969
/********************************************************************
@@ -207,10 +207,6 @@ public function setStatus($statusId)
207207
$status->forum_support_status_id = $statusId;
208208

209209
$status->save();
210-
211-
if (count($status->getErrors()->all()) > 0) {
212-
ppd($status->getErrors()->all());
213-
}
214210
}
215211

216212
}

src/models/Forum/Reply.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class Forum_Reply extends Forum
6060
'roll' => array('hasOne', 'Forum_Reply_Roll', 'foreignKey' => 'forum_reply_id'),
6161
'history' => array('hasMany', 'Forum_Reply_Edit', 'foreignKey' => 'forum_reply_id', 'orderBy' => array('created_at', 'desc')),
6262
'moderations' => array('morphMany', 'Forum_Moderation', 'name' => 'resource'),
63-
'morph' => array('morphTo'),
63+
'morph' => array('morphTo', 'withTrashed'),
6464
'quote' => array('morphTo'),
6565
);
6666

0 commit comments

Comments
 (0)