Merge "Enable MediaWiki.Usage.ForbiddenFunctions.isset and make pass"

This commit is contained in:
jenkins-bot 2020-02-10 09:16:16 +00:00 committed by Gerrit Code Review
commit 8646dbe7f5
3 changed files with 3 additions and 4 deletions

View file

@ -8,7 +8,6 @@
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" /> <exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingReturn" /> <exclude name="MediaWiki.Commenting.FunctionComment.MissingReturn" />
<exclude name="MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName" /> <exclude name="MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName" />
<exclude name="MediaWiki.Usage.ForbiddenFunctions.isset" />
<exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" /> <exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" />
<exclude name="PSR12.Properties.ConstantVisibility.NotFound" /> <exclude name="PSR12.Properties.ConstantVisibility.NotFound" />
</rule> </rule>

View file

@ -316,7 +316,7 @@ class EchoEvent extends EchoAbstractEntity implements Bundleable {
// Lazy load the title from getTitle() so that we can do a batch-load // Lazy load the title from getTitle() so that we can do a batch-load
if ( if (
isset( $this->extra['page_title'], $this->extra['page_namespace'] ) isset( $this->extra['page_title'] ) && isset( $this->extra['page_namespace'] )
&& !$row->event_page_id && !$row->event_page_id
) { ) {
$this->title = Title::makeTitleSafe( $this->title = Title::makeTitleSafe(
@ -529,7 +529,7 @@ class EchoEvent extends EchoAbstractEntity implements Bundleable {
$this->title = Title::newFromID( $this->pageId, $fromMaster ? Title::GAID_FOR_UPDATE : 0 ); $this->title = Title::newFromID( $this->pageId, $fromMaster ? Title::GAID_FOR_UPDATE : 0 );
return $this->title; return $this->title;
} elseif ( isset( $this->extra['page_title'], $this->extra['page_namespace'] ) ) { } elseif ( isset( $this->extra['page_title'] ) && isset( $this->extra['page_namespace'] ) ) {
$this->title = Title::makeTitleSafe( $this->title = Title::makeTitleSafe(
$this->extra['page_namespace'], $this->extra['page_namespace'],
$this->extra['page_title'] $this->extra['page_title']

View file

@ -85,7 +85,7 @@ class EchoSuppressionRowUpdateGenerator implements RowUpdateGenerator {
protected function updatePageLinkedExtraData( $row, array $update ) { protected function updatePageLinkedExtraData( $row, array $update ) {
$extra = $this->extra( $row, $update ); $extra = $this->extra( $row, $update );
if ( isset( $extra['link-from-title'], $extra['link-from-namespace'] ) ) { if ( isset( $extra['link-from-title'] ) && isset( $extra['link-from-namespace'] ) ) {
$title = $this->newTitleFromNsAndText( $extra['link-from-namespace'], $extra['link-from-title'] ); $title = $this->newTitleFromNsAndText( $extra['link-from-namespace'], $extra['link-from-title'] );
unset( $extra['link-from-title'], $extra['link-from-namespace'] ); unset( $extra['link-from-title'], $extra['link-from-namespace'] );
// Link from page is always from a content page, if null or no article id it was // Link from page is always from a content page, if null or no article id it was