Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-16310

S_SOFTDELETE_ALLOWED condition in posting.php is wrong and causes soft delete option to appear when it should not

    XMLWordPrintable

Details

    Description

      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.

      Attachments

        Activity

          People

            mrgoldy mrgoldy
            Snover Snover [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: