mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-23 13:46:48 +00:00
Merge "Simplify code by replacing isset() with falsy check"
This commit is contained in:
commit
5a930d59d3
|
@ -74,16 +74,17 @@ class AbuseFilterViewHistory extends AbuseFilterView {
|
|||
$canViewProtectedVars = $this->afPermManager->canViewProtectedVariables( $this->getAuthority() );
|
||||
|
||||
if ( $filter ) {
|
||||
$filterObj = null;
|
||||
try {
|
||||
$filterObj = $this->filterLookup->getFilter( $filter, false );
|
||||
} catch ( FilterNotFoundException $_ ) {
|
||||
$filter = null;
|
||||
}
|
||||
if ( isset( $filterObj ) && $filterObj->isHidden() && !$canViewPrivate ) {
|
||||
if ( $filterObj && $filterObj->isHidden() && !$canViewPrivate ) {
|
||||
$out->addWikiMsg( 'abusefilter-history-error-hidden' );
|
||||
return;
|
||||
}
|
||||
if ( isset( $filterObj ) && $filterObj->isProtected() && !$canViewProtectedVars ) {
|
||||
if ( $filterObj && $filterObj->isProtected() && !$canViewProtectedVars ) {
|
||||
$out->addWikiMsg( 'abusefilter-history-error-protected' );
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue