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

Fixed Warning points and duration are still editable when unchecked

Brogan

XenForo moderator
Staff member
#1
I have Manage all warnings set to Not Set.

I have unchecked the Points and expiry time are editable when giving warning field for a pre-defined warning

However, when issuing a warning, it is still possible to change the points and expiry date.

It also doesn't work if the permission is set to Never.
 

Mike

XenForo developer
Staff member
#2
This permission really just needs to be renamed to be clearer (as it only controls deleting of others' warnings).
 

Brogan

XenForo moderator
Staff member
#3
Now that you've explained it Mike, it works fine.

It was just a bit of erroneous information I was given as to what the permission was doing.
We won't mention any names though ;)

The unchecked Points and expiry time are editable when giving warning field is an issue though as they can be adjusted, and if doing so, the following error is returned:

Server Error

Undefined variable: expireInput
  1. XenForo_Application::handlePhpError() in XenForo/ControllerPublic/Member.php at line 631
  2. XenForo_ControllerPublic_Member->actionWarn() in XenForo/FrontController.php at line 310
  3. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 132
  4. XenForo_FrontController->run() in C:/xampplite/htdocs/xftest/index.php at line 13
 
R

ragtek

Guest
#4
that's coming from
PHP:
            if ($warning && !$warning['is_editable'])
            {
                $dwInput['points'] = $warning['points_default'];
                $dwInput['expiry_date'] = (
                    $expireInput['expiry_type'] == 'never' ? 0
                    : strtotime('+' . $warning['expiry_default'] . ' ' . $expireInput['expiry_type'])
                );
            }
in XenForo_ControllerPublic_Member

$expireInput should be IMO $warning