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

Allow extensions to overwrite CANNOT_EDIT_* checks in posting.php and viewtopic.php

    XMLWordPrintable

Details

    Description

      the section should basically be something like

      	if ($s_cannot_edit)
      	{
      		trigger_error('USER_CANNOT_EDIT');
      	}
       
      	if ($s_cannot_edit_time)
      	{
      		trigger_error('CANNOT_EDIT_TIME');
      	}
       
      	if ($s_cannot_edit_locked)
      	{
      		trigger_error('CANNOT_EDIT_POST_LOCKED');
      	}

      So extensions can overwrite each condition.

      The $edit_allowed in viewforum.php needs a similar event and the section must be changed accordingly:

      	$edit_allowed = ($user->data['is_registered'] && ($auth->acl_get('m_edit', $forum_id) || (
      		!$s_cannot_edit &&
      		!$s_cannot_edit_locked &&
      		!$s_cannot_edit_time
      	)));

      Attachments

        Activity

          People

            nickvergessen Joas Schilling
            nickvergessen Joas Schilling
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: