I would argue that these comments do not add any information that
would not be there already. Having them adds mental overhead, because
one needs to read both the comment and the next line of code first to
understand they say the exact same. I don't find this helpful, but
more distracting.
Change-Id: I39c98f25225947ebffdcc2fd8f0243e7a6c070d7
18 files changed:
$attribs["xmlns:$tag"] = $ns;
}
} else { // HTML5
$attribs["xmlns:$tag"] = $ns;
}
} else { // HTML5
$ret .= "<!DOCTYPE html>\n";
}
$ret .= "<!DOCTYPE html>\n";
}
$fauxReqArr['wlallrev'] = '';
}
$fauxReqArr['wlallrev'] = '';
}
$fauxReq = new FauxRequest( $fauxReqArr );
$fauxReq = new FauxRequest( $fauxReqArr );
$module = new ApiMain( $fauxReq );
$module->execute();
$module = new ApiMain( $fauxReq );
$module->execute();
$this->setupExternalResponse( $module, $params );
}
$this->setupExternalResponse( $module, $params );
}
$module->execute();
Hooks::run( 'APIAfterExecute', [ &$module ] );
$this->reportUnusedParams();
if ( !$this->mInternalMode ) {
$module->execute();
Hooks::run( 'APIAfterExecute', [ &$module ] );
$this->reportUnusedParams();
if ( !$this->mInternalMode ) {
- // append Debug information
MWDebug::appendDebugInfoToApiResult( $this->getContext(), $this->getResult() );
MWDebug::appendDebugInfoToApiResult( $this->getContext(), $this->getResult() );
$this->printResult();
}
}
$this->printResult();
}
}
}
} elseif ( $modCacheMode === 'public' ) {
// do nothing, if it's public already it will stay public
}
} elseif ( $modCacheMode === 'public' ) {
// do nothing, if it's public already it will stay public
$cacheMode = 'private';
}
$cacheMode = 'private';
}
$loglink = $this->list->msg( 'parentheses' )->rawParams( $loglink )->escaped();
// User links and action text
$action = $formatter->getActionText();
$loglink = $this->list->msg( 'parentheses' )->rawParams( $loglink )->escaped();
// User links and action text
$action = $formatter->getActionText();
$comment = $this->list->getLanguage()->getDirMark() .
$formatter->getComment();
$comment = $this->list->getLanguage()->getDirMark() .
$formatter->getComment();
}
if ( $this->readState == 'status' ) {
$this->processStatusLine( $lines[0] );
}
if ( $this->readState == 'status' ) {
$this->processStatusLine( $lines[0] );
$this->processHeaderLine( $lines[0] );
}
$this->readBuffer = $lines[1];
$this->processHeaderLine( $lines[0] );
}
$this->readBuffer = $lines[1];
private function unserialize( $string ) {
if ( $this->encoding === 'YAML' ) {
return yaml_parse( $string );
private function unserialize( $string ) {
if ( $this->encoding === 'YAML' ) {
return yaml_parse( $string );
return json_decode( $string, true );
}
}
return json_decode( $string, true );
}
}
$val = substr( $this->mFilteredExifData[$prop], 8 );
switch ( $charCode ) {
$val = substr( $this->mFilteredExifData[$prop], 8 );
switch ( $charCode ) {
- case "\x4A\x49\x53\x00\x00\x00\x00\x00":
- // JIS
+ case "JIS\x00\x00\x00\x00\x00":
$charset = "Shift-JIS";
break;
case "UNICODE\x00":
$charset = "Shift-JIS";
break;
case "UNICODE\x00":
$username = trim( $username );
$username = trim( $username );
$gender = User::getDefaultOption( 'gender' );
// allow prefix and normalize (e.g. "*foo" -> "*foo" ).
$gender = User::getDefaultOption( 'gender' );
// allow prefix and normalize (e.g. "*foo" -> "*foo" ).
$languages = Language::fetchLanguageNames( null, 'mwfile' );
$languageCode = $this->config->get( 'LanguageCode' );
if ( !array_key_exists( $languageCode, $languages ) ) {
$languages = Language::fetchLanguageNames( null, 'mwfile' );
$languageCode = $this->config->get( 'LanguageCode' );
if ( !array_key_exists( $languageCode, $languages ) ) {
}
$content['scripts'] = $scripts;
}
$content['scripts'] = $scripts;
$styles = [];
// Don't create empty stylesheets like [ '' => '' ] for modules
// that don't *have* any stylesheets (T40024).
$styles = [];
// Don't create empty stylesheets like [ '' => '' ] for modules
// that don't *have* any stylesheets (T40024).
$loglink = $this->list->msg( 'parentheses' )->rawParams( $loglink )->escaped();
// User links and action text
$action = $formatter->getActionText();
$loglink = $this->list->msg( 'parentheses' )->rawParams( $loglink )->escaped();
// User links and action text
$action = $formatter->getActionText();
$comment = CommentStore::getStore()->getComment( 'log_comment', $this->row )->text;
$comment = $this->list->getLanguage()->getDirMark()
. Linker::commentBlock( $comment );
$comment = CommentStore::getStore()->getComment( 'log_comment', $this->row )->text;
$comment = $this->list->getLanguage()->getDirMark()
. Linker::commentBlock( $comment );
}
protected function setup( $par ) {
}
protected function setup( $par ) {
$opts = new FormOptions();
$this->opts = $opts; // bind
$opts->add( 'hideliu', false );
$opts = new FormOptions();
$this->opts = $opts; // bind
$opts->add( 'hideliu', false );
$opts->add( $key, $params['default'] );
}
$opts->add( $key, $params['default'] );
}
$opts->fetchValuesFromRequest( $this->getRequest() );
if ( $par ) {
$this->parseParams( $par );
}
$opts->fetchValuesFromRequest( $this->getRequest() );
if ( $par ) {
$this->parseParams( $par );
}
$opts->validateIntBounds( 'limit', 0, 5000 );
}
$opts->validateIntBounds( 'limit', 0, 5000 );
}
// add raw $hitcount for sorting, because tags-hitcount contains numbers and letters
$newRow .= Xml::tags( 'td', [ 'data-sort-value' => $hitcount ], $hitcountLabel );
// add raw $hitcount for sorting, because tags-hitcount contains numbers and letters
$newRow .= Xml::tags( 'td', [ 'data-sort-value' => $hitcount ], $hitcountLabel );
if ( $showDeleteActions && ChangeTags::canDeleteTag( $tag )->isOK() ) {
$actionLinks[] = $linkRenderer->makeKnownLink(
$this->getPageTitle( 'delete' ),
if ( $showDeleteActions && ChangeTags::canDeleteTag( $tag )->isOK() ) {
$actionLinks[] = $linkRenderer->makeKnownLink(
$this->getPageTitle( 'delete' ),
}
if ( $showManageActions ) { // we've already checked that the user had the requisite userright
}
if ( $showManageActions ) { // we've already checked that the user had the requisite userright
if ( ChangeTags::canActivateTag( $tag )->isOK() ) {
$actionLinks[] = $linkRenderer->makeKnownLink(
$this->getPageTitle( 'activate' ),
if ( ChangeTags::canActivateTag( $tag )->isOK() ) {
$actionLinks[] = $linkRenderer->makeKnownLink(
$this->getPageTitle( 'activate' ),
if ( ChangeTags::canDeactivateTag( $tag )->isOK() ) {
$actionLinks[] = $linkRenderer->makeKnownLink(
$this->getPageTitle( 'deactivate' ),
if ( ChangeTags::canDeactivateTag( $tag )->isOK() ) {
$actionLinks[] = $linkRenderer->makeKnownLink(
$this->getPageTitle( 'deactivate' ),
return Status::newFatal( 'botpasswords-locked' );
}
return Status::newFatal( 'botpasswords-locked' );
}
$throttle = null;
if ( !empty( $wgPasswordAttemptThrottle ) ) {
$throttle = new MediaWiki\Auth\Throttler( $wgPasswordAttemptThrottle, [
$throttle = null;
if ( !empty( $wgPasswordAttemptThrottle ) ) {
$throttle = new MediaWiki\Auth\Throttler( $wgPasswordAttemptThrottle, [
'src' => $fsFile->getPath(), 'dst' => $dPath, 'overwrite' => 1 ];
} elseif ( $sExists === false ) { // does not exist in source
$ops[] = [ 'op' => 'delete', 'src' => $dPath, 'ignoreMissingSource' => 1 ];
'src' => $fsFile->getPath(), 'dst' => $dPath, 'overwrite' => 1 ];
} elseif ( $sExists === false ) { // does not exist in source
$ops[] = [ 'op' => 'delete', 'src' => $dPath, 'ignoreMissingSource' => 1 ];
$this->error( "Unable to sync '$dPath': could not stat file." );
$status->fatal( 'backend-fail-internal', $src->getName() );
$this->error( "Unable to sync '$dPath': could not stat file." );
$status->fatal( 'backend-fail-internal', $src->getName() );
'group' => 'jquery.ui',
'targets' => [ 'desktop', 'mobile' ],
],
'group' => 'jquery.ui',
'targets' => [ 'desktop', 'mobile' ],
],
'jquery.effects.core' => [
'deprecated' => true,
'scripts' => 'resources/lib/jquery.ui/jquery.ui.effect.js',
'jquery.effects.core' => [
'deprecated' => true,
'scripts' => 'resources/lib/jquery.ui/jquery.ui.effect.js',
$linkRenderer->makeKnownLink( $target, null, [], [ 'foo' => 'bar' ] )
);
$linkRenderer->makeKnownLink( $target, null, [], [ 'foo' => 'bar' ] )
);
$linkRenderer->setForceArticlePath( true );
$this->assertEquals(
'<a href="/wiki/Foobar?foo=bar" title="Foobar">Foobar</a>',
$linkRenderer->setForceArticlePath( true );
$this->assertEquals(
'<a href="/wiki/Foobar?foo=bar" title="Foobar">Foobar</a>',