Remove unneeded variable assignment
The variable already has the value Change-Id: I75f25cc944e30d91a65e1d2bb0abce7d671b19b8
This commit is contained in:
parent
c9e8d7e49d
commit
032b03dc7a
10 changed files with 1 additions and 13 deletions
|
|
@ -1432,7 +1432,6 @@ function wfClientAcceptsGzip( $force = false ) {
|
|||
)
|
||||
) {
|
||||
if ( isset( $m[2] ) && ( $m[1] == 'q' ) && ( $m[2] == 0 ) ) {
|
||||
$result = false;
|
||||
return $result;
|
||||
}
|
||||
wfDebug( "wfClientAcceptsGzip: client accepts gzip." );
|
||||
|
|
|
|||
|
|
@ -89,7 +89,6 @@ class ContributionsLookup {
|
|||
$dir = 'prev';
|
||||
$segment = $seg[1];
|
||||
} elseif ( $seg[0] == 'before' ) {
|
||||
$dir = 'next';
|
||||
$segment = $seg[1];
|
||||
} else {
|
||||
$dir = null;
|
||||
|
|
|
|||
|
|
@ -232,7 +232,6 @@ class RawAction extends FormlessAction {
|
|||
|
||||
if ( $content === null ) {
|
||||
// revision not found (or suppressed)
|
||||
$text = false;
|
||||
} elseif ( !$content instanceof TextContent ) {
|
||||
// non-text content
|
||||
wfHttpError( 415, "Unsupported Media Type", "The requested page uses the content model `"
|
||||
|
|
@ -247,7 +246,6 @@ class RawAction extends FormlessAction {
|
|||
|
||||
if ( $content === null || $content === false ) {
|
||||
// section not found (or section not supported, e.g. for JS, JSON, and CSS)
|
||||
$text = false;
|
||||
} else {
|
||||
$text = $content->getText();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -196,7 +196,6 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
|
|||
$casToken = $res['cas'];
|
||||
} else {
|
||||
$result = false;
|
||||
$casToken = null;
|
||||
}
|
||||
} else {
|
||||
$result = $client->get( $routeKey );
|
||||
|
|
|
|||
|
|
@ -729,7 +729,6 @@ class DefaultPreferencesFactory implements PreferencesFactory {
|
|||
$t = $lang->userTime( $emailTimestamp, $displayUser );
|
||||
$emailauthenticated = $context->msg( 'emailauthenticated',
|
||||
$time, $d, $t )->parse() . '<br />';
|
||||
$disableEmailPrefs = false;
|
||||
$emailauthenticationclass = 'mw-email-authenticated';
|
||||
} else {
|
||||
$disableEmailPrefs = true;
|
||||
|
|
|
|||
|
|
@ -395,7 +395,6 @@ JAVASCRIPT;
|
|||
sort( $modules );
|
||||
|
||||
if ( $mainContext->getDebug() && count( $modules ) > 1 ) {
|
||||
$chunks = [];
|
||||
// Recursively call us for every item
|
||||
foreach ( $modules as $name ) {
|
||||
$chunks[] = self::makeLoad( $mainContext, [ $name ], $only, $extraQuery, $nonce );
|
||||
|
|
|
|||
|
|
@ -419,7 +419,6 @@ abstract class SearchEngine {
|
|||
|
||||
foreach ( $allkeywords as $kw ) {
|
||||
if ( strncmp( $query, $kw, strlen( $kw ) ) == 0 ) {
|
||||
$extractedNamespace = null;
|
||||
$parsed = substr( $query, strlen( $kw ) );
|
||||
$allQuery = true;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -857,7 +857,6 @@ class SpecialBlock extends FormSpecialPage {
|
|||
if ( $isPartialBlock ) {
|
||||
if ( isset( $data['PageRestrictions'] ) && $data['PageRestrictions'] !== '' ) {
|
||||
$titles = explode( "\n", $data['PageRestrictions'] );
|
||||
$pageRestrictions = [];
|
||||
foreach ( $titles as $title ) {
|
||||
$pageRestrictions[] = PageRestriction::newFromTitle( $title );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,11 +53,9 @@ class FixMergeHistoryCorruption extends Maintenance {
|
|||
$dryRun = true;
|
||||
if ( $this->hasOption( 'dry-run' ) && $this->hasOption( 'delete' ) ) {
|
||||
$this->fatalError( 'Cannot do both --dry-run and --delete.' );
|
||||
} elseif ( $this->hasOption( 'dry-run' ) ) {
|
||||
$dryRun = true;
|
||||
} elseif ( $this->hasOption( 'delete' ) ) {
|
||||
$dryRun = false;
|
||||
} else {
|
||||
} elseif ( !$this->hasOption( 'dry-run' ) ) {
|
||||
$this->fatalError( 'Either --dry-run or --delete must be specified.' );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -122,7 +122,6 @@ class GetConfiguration extends Maintenance {
|
|||
|
||||
# Filter out globals based on the regex
|
||||
if ( $this->regex ) {
|
||||
$res = [];
|
||||
foreach ( $GLOBALS as $name => $value ) {
|
||||
if ( preg_match( $this->regex, $name ) ) {
|
||||
$res[$name] = $value;
|
||||
|
|
|
|||
Loading…
Reference in a new issue