if ( $badParams ) {
$this->dieWithError(
- [ 'apierror-mustpostparams', join( ', ', $badParams ), count( $badParams ) ]
+ [ 'apierror-mustpostparams', implode( ', ', $badParams ), count( $badParams ) ]
);
}
}
if ( $multi ) {
// This loses the potential $wgContLang->checkTitleEncoding() transformation
// done by WebRequest for $_GET. Let's call that a feature.
- $value = join( "\x1f", $request->normalizeUnicode( explode( "\x1f", $rawValue ) ) );
+ $value = implode( "\x1f", $request->normalizeUnicode( explode( "\x1f", $rawValue ) ) );
} else {
$this->dieWithError( 'apierror-badvalue-notmultivalue', 'badvalue_notmultivalue' );
}
* @return string Validated and normalized parameter
*/
private function validateUser( $value, $encParamName ) {
+ if ( ExternalUserNames::isExternal( $value ) && User::newFromName( $value, false ) ) {
+ return $value;
+ }
+
$title = Title::makeTitleSafe( NS_USER, $value );
if ( $title === null || $title->hasFragment() ) {
$this->dieWithError(
$msgs = [ $this->msg( 'api-usage-mailinglist-ref' ) ];
Hooks::run( 'ApiDeprecationHelp', [ &$msgs ] );
if ( count( $msgs ) > 1 ) {
- $key = '$' . join( ' $', range( 1, count( $msgs ) ) );
+ $key = '$' . implode( ' $', range( 1, count( $msgs ) ) );
$msg = ( new RawMessage( $key ) )->params( $msgs );
} else {
$msg = reset( $msgs );
realpath( __DIR__ ) ?: __DIR__ => [
'path' => $IP,
'name' => 'MediaWiki',
- 'license-name' => 'GPL-2.0+',
+ 'license-name' => 'GPL-2.0-or-later',
],
realpath( "$IP/extensions" ) ?: "$IP/extensions" => null,
realpath( $extDir ) ?: $extDir => null,
return false;
}
- /**
- * @deprecated since 1.25, always returns empty string
- * @param IDatabase|bool $db
- * @return string
- */
- public function getModuleProfileName( $db = false ) {
- wfDeprecated( __METHOD__, '1.25' );
- return '';
- }
-
/**
* @deprecated since 1.25
*/
wfDeprecated( __METHOD__, '1.25' );
}
- /**
- * @deprecated since 1.25, always returns 0
- * @return float
- */
- public function getProfileTime() {
- wfDeprecated( __METHOD__, '1.25' );
- return 0;
- }
-
/**
* @deprecated since 1.25
*/
wfDeprecated( __METHOD__, '1.25' );
}
- /**
- * @deprecated since 1.25, always returns 0
- * @return float
- */
- public function getProfileDBTime() {
- wfDeprecated( __METHOD__, '1.25' );
- return 0;
- }
-
/**
* Call wfTransactionalTimeLimit() if this request was POSTed
* @since 1.26