/**
* Add Link headers for preloading the wiki's logo.
*
- * @since 1.26
+ * @since 1.26
*/
protected function addLogoPreloadLinkHeaders() {
$logo = $this->getConfig()->get( 'Logo' ); // wgLogo
// (e.g. can't express ">= 1.5 and not >= 2).
// Workaround: Use <= 1.9999 in place of < 2.
$upper_bound = floatval( $logos[ $i + 1 ]['dppx'] ) - 0.000001;
- $media_query = '(min-resolution: ' . $logos[ $i ]['dppx'] .
+ $media_query = '(min-resolution: ' . $logos[ $i ]['dppx'] .
'dppx) and (max-resolution: ' . $upper_bound . 'dppx)';
} else {
// Largest dppx
'rb' => $common,
'rp' => $common,
'rt' => $common, # array_merge( $common, array( 'rbspan' ) ),
- 'rtc' => $common,
+ 'rtc' => $common,
# MathML root element, where used for extensions
# 'title' may not be 100% valid here; it's XHTML
}
/**
- * Whether the magic words __INDEX__ and __NOINDEX__ function for this page.
+ * Whether the magic words __INDEX__ and __NOINDEX__ function for this page.
*
* @return bool
*/
}
if ( array_key_exists( 'rcTypes', $options ) ) {
- $conds['rc_type'] = array_map( 'intval', $options['rcTypes'] );
+ $conds['rc_type'] = array_map( 'intval', $options['rcTypes'] );
}
$conds = array_merge(
}
if ( isset( $options['filter'] ) ) {
$filter = $options['filter'];
- if ( $filter === self::FILTER_CHANGED ) {
+ if ( $filter === self::FILTER_CHANGED ) {
$conds[] = 'wl_notificationtimestamp IS NOT NULL';
} else {
$conds[] = 'wl_notificationtimestamp IS NULL';
class WikiReference {
private $mCanonicalServer; ///< canonical server URL, e.g. 'https://www.mediawiki.org'
private $mServer; ///< server URL, may be protocol-relative, e.g. '//www.mediawiki.org'
- private $mPath; ///< path, '/wiki/$1'
+ private $mPath; ///< path, '/wiki/$1'
/**
* @param string $canonicalServer
$throttleKey = wfGlobalCacheKey( 'throttler', $this->type, $index, $ipKey, $userKey );
$throttleCount = $this->cache->get( $throttleKey );
- if ( !$throttleCount ) { // counter not started yet
+ if ( !$throttleCount ) { // counter not started yet
$this->cache->add( $throttleKey, 1, $expiry );
} elseif ( $throttleCount < $count ) { // throttle limited not yet reached
$this->cache->incr( $throttleKey );
'rc_logid' => 0,
'rc_log_type' => null,
'rc_log_action' => '',
- 'rc_params' => serialize( [
+ 'rc_params' => serialize( [
'hidden-cat' => WikiCategoryPage::factory( $categoryTitle )->isHidden()
] )
];
$deleteWheres = []; // list of WHERE clause arrays for each DB delete() call
if ( $table === 'pagelinks' || $table === 'templatelinks' || $table === 'iwlinks' ) {
- $baseKey = ( $table === 'iwlinks' ) ? 'iwl_prefix' : "{$prefix}_namespace";
+ $baseKey = ( $table === 'iwlinks' ) ? 'iwl_prefix' : "{$prefix}_namespace";
$curBatchSize = 0;
$curDeletionBatch = [];
$error = array_merge( [ $error['message'] ], $error['params'] );
}
}
- } elseif ( $elementsType === 'errors' ) {
+ } elseif ( $elementsType === 'errors' ) {
$errors = $elements;
if ( !is_array( $errors ) ) {
$errors = [ $errors ];
$this->parseHeader();
$this->setStatus();
- return Status::wrap( $this->status ); // TODO B/C; move this to callers
+ return Status::wrap( $this->status ); // TODO B/C; move this to callers
}
/**
},
'cssClassSuffix' => 'patrolled',
'isRowApplicableCallable' => function ( $ctx, $rc ) {
- return $rc->getAttribute( 'rc_patrolled' );
+ return $rc->getAttribute( 'rc_patrolled' );
},
],
[
},
'cssClassSuffix' => 'unpatrolled',
'isRowApplicableCallable' => function ( $ctx, $rc ) {
- return !$rc->getAttribute( 'rc_patrolled' );
+ return !$rc->getAttribute( 'rc_patrolled' );
},
],
],
&$tables, &$fields, &$conds, &$query_options, &$join_conds, $selectedExpLevels ) {
global $wgLearnerEdits,
- $wgExperiencedUserEdits,
- $wgLearnerMemberSince,
- $wgExperiencedUserMemberSince;
+ $wgExperiencedUserEdits,
+ $wgLearnerMemberSince,
+ $wgExperiencedUserMemberSince;
$LEVEL_COUNT = 3;
);
if ( $selectedExpLevels === [ 'newcomer' ] ) {
- $conds[] = "NOT ( $aboveNewcomer )";
+ $conds[] = "NOT ( $aboveNewcomer )";
} elseif ( $selectedExpLevels === [ 'learner' ] ) {
$conds[] = $dbr->makeList(
[ $aboveNewcomer, "NOT ( $aboveLearner )" ],
'text',
[
'id' => 'emailusertarget',
- 'class' => 'mw-autocomplete-user', // used by mediawiki.userSuggest
+ 'class' => 'mw-autocomplete-user', // used by mediawiki.userSuggest
'autofocus' => true,
'size' => 30,
]
*/
protected function transformFilterDefinition( array $filterDefinition ) {
if ( isset( $filterDefinition['showHideSuffix'] ) ) {
- $filterDefinition['showHide'] = 'wl' . $filterDefinition['showHideSuffix'];
+ $filterDefinition['showHide'] = 'wl' . $filterDefinition['showHideSuffix'];
}
return $filterDefinition;