Lack of interest ProfilePost model missing basic delete function?

This suggestion has been closed automatically because it did not receive enough votes over an extended period of time. If you wish to see this, please search for an open suggestion and, if you don't find any, post a new one.

Jaxel

Well-known member
I am using the following two codes to hard delete threads and posts:
Code:
if ($thread['delete_age'] > $cutoff)
{
$this->getModelFromCache('XenForo_Model_Thread')->deleteThread($thread['thread_id'], 'hard');
XenForo_Helper_Cookie::clearIdFromCookie($thread['thread_id'], 'inlinemod_threads');
}
Code:
if ($post['delete_age'] > $cutoff)
{
$this->getModelFromCache('XenForo_Model_Post')->deletePost($post['post_id'], 'hard');
XenForo_Helper_Cookie::clearIdFromCookie($post['post_id'], 'inlinemod_posts');
}

Very simple right? However, the same can not be done with Profile Posts... I must instead do...
Code:
if ($profile_post['delete_age'] > $cutoff)
{
$dw = XenForo_DataWriter::create('XenForo_DataWriter_DiscussionMessage_ProfilePost');
$dw->setExistingData($profile_post['profile_post_id']);
$dw->delete();

XenForo_Helper_Cookie::clearIdFromCookie($profile_post['profile_post_id'], 'inlinemod_profilePosts');
$this->getModelFromCache('XenForo_Model_DeletionLog')->removeDeletionLog('profile_post', $profile_post['content_id']);
}

You'll notice that no only do I need to manually write the delete code... but I must ALSO delete the entry for the deletion log, which is missing from the profilepost datawriter.
 
Upvote 0
This suggestion has been closed. Votes are no longer accepted.
Top Bottom