EditPage, ApiEditPage: Use parantheses to be explicit about order of evaluation

Follow-up for 48c8cee183, caught by the
forthcoming release of MediaWiki-CodeSniffer.

Change-Id: Ib75df401916e8a0d750844ec364c5ab8f92ff003
This commit is contained in:
James D. Forrester 2024-07-29 11:41:20 -04:00
parent 2134c3ef12
commit 356f0b00d2
2 changed files with 2 additions and 2 deletions

View file

@ -619,7 +619,7 @@ class ApiEditPage extends ApiBase {
// the top-level redirect if this a first edit on
// a wiki that is not the user's home wiki.
$shouldRedirectForTempUser = isset( $result['savedTempUser'] ) ||
$user->isTemp() && $user->getEditCount() === 0;
( $user->isTemp() && ( $user->getEditCount() === 0 ) );
if ( $shouldRedirectForTempUser ) {
$r['tempusercreated'] = true;
$params['returnto'] ??= $titleObj->getPrefixedDBkey();

View file

@ -1968,7 +1968,7 @@ class EditPage implements IEditObject {
// the top-level redirect if this a first edit on
// a wiki that is not the user's home wiki.
$shouldRedirectForTempUser = $this->tempUserCreateDone ||
$user->isTemp() && $user->getEditCount() === 0;
( $user->isTemp() && ( $user->getEditCount() === 0 ) );
if ( $shouldRedirectForTempUser ) {
$this->getHookRunner()->onTempUserCreatedRedirect(
$this->context->getRequest()->getSession(),