-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 3.2.9, 3.3.0
-
Fix Version/s: 3.2.10-RC1, 3.3.1-RC1
-
Component/s: Posting
-
Labels:
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.