Jaxel
Well-known member
Simple... all other content types have their own functions...
However, to do the same for ProfilePosts, I must instead use the following:
Sure... still simple... but I'm a fan of uniformity.
Code:
$this->getModelFromCache('XenForo_Model_Thread')->deleteThread($thread['content_id'], 'hard');
Code:
$this->getModelFromCache('XenForo_Model_Post')->deletePost($post['content_id'], 'hard');
However, to do the same for ProfilePosts, I must instead use the following:
Code:
$dw = XenForo_DataWriter::create('XenForo_DataWriter_DiscussionMessage_ProfilePost');
$dw->setExistingData($profile_post['content_id']);
$dw->delete();
Sure... still simple... but I'm a fan of uniformity.
Upvote
0