-
Bug
-
Resolution: Fixed
-
Minor
-
3.2.9, 3.3.0
The S_SOFTDELETE_ALLOWED variable in posting.php is set only according to $mode and the result of a call to content_visibility::can_soft_delete. This is wrong since content_visibility::can_soft_delete does not test these additional conditions which are actually required for a soft delete:
$post_id == $post_data['topic_last_post_id'] && ($post_data['post_time'] > time() - ($config['delete_time'] * 60) || !$config['delete_time'])
These extra conditions are correctly tested for S_DELETE_ALLOWED so they just need to be extracted from there and applied to both.