• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Lack of interest ProfilePost model missing basic delete function?


Well-known member
I am using the following two codes to hard delete threads and posts:
if ($thread['delete_age'] > $cutoff)
$this->getModelFromCache('XenForo_Model_Thread')->deleteThread($thread['thread_id'], 'hard');
XenForo_Helper_Cookie::clearIdFromCookie($thread['thread_id'], 'inlinemod_threads');
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...
if ($profile_post['delete_age'] > $cutoff)
$dw = XenForo_DataWriter::create('XenForo_DataWriter_DiscussionMessage_ProfilePost');

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.