mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ConfirmEdit
synced 2024-11-24 00:04:15 +00:00
Swap ternary check for if statement
isset is not needed to check for null and if is used, because the else branch is not needed Change-Id: I3069ac43911101aa500c4897d419dca68f968040
This commit is contained in:
parent
40cc11817a
commit
9bc797453e
|
@ -593,7 +593,9 @@ class SimpleCaptcha {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Get link changes in the slowest way known to man
|
// Get link changes in the slowest way known to man
|
||||||
$oldtext = isset( $oldtext ) ? $oldtext : $this->loadText( $title, $section );
|
if ( $oldtext === null ) {
|
||||||
|
$oldtext = $this->loadText( $title, $section );
|
||||||
|
}
|
||||||
$oldLinks = $this->findLinks( $title, $oldtext );
|
$oldLinks = $this->findLinks( $title, $oldtext );
|
||||||
$newLinks = $this->findLinks( $title, $newtext );
|
$newLinks = $this->findLinks( $title, $newtext );
|
||||||
}
|
}
|
||||||
|
@ -621,7 +623,9 @@ class SimpleCaptcha {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
// Custom regex checks. Reuse $oldtext if set above.
|
// Custom regex checks. Reuse $oldtext if set above.
|
||||||
$oldtext = isset( $oldtext ) ? $oldtext : $this->loadText( $title, $section );
|
if ( $oldtext === null ) {
|
||||||
|
$oldtext = $this->loadText( $title, $section );
|
||||||
|
}
|
||||||
|
|
||||||
foreach ( $wgCaptchaRegexes as $regex ) {
|
foreach ( $wgCaptchaRegexes as $regex ) {
|
||||||
$newMatches = [];
|
$newMatches = [];
|
||||||
|
|
Loading…
Reference in a new issue