mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-12 09:26:05 +00:00
Merge "Enable MediaWiki.Usage.ForbiddenFunctions.isset and make pass"
This commit is contained in:
commit
8646dbe7f5
|
@ -8,7 +8,6 @@
|
|||
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
|
||||
<exclude name="MediaWiki.Commenting.FunctionComment.MissingReturn" />
|
||||
<exclude name="MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName" />
|
||||
<exclude name="MediaWiki.Usage.ForbiddenFunctions.isset" />
|
||||
<exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment" />
|
||||
<exclude name="PSR12.Properties.ConstantVisibility.NotFound" />
|
||||
</rule>
|
||||
|
|
|
@ -316,7 +316,7 @@ class EchoEvent extends EchoAbstractEntity implements Bundleable {
|
|||
|
||||
// Lazy load the title from getTitle() so that we can do a batch-load
|
||||
if (
|
||||
isset( $this->extra['page_title'], $this->extra['page_namespace'] )
|
||||
isset( $this->extra['page_title'] ) && isset( $this->extra['page_namespace'] )
|
||||
&& !$row->event_page_id
|
||||
) {
|
||||
$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 );
|
||||
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->extra['page_namespace'],
|
||||
$this->extra['page_title']
|
||||
|
|
|
@ -85,7 +85,7 @@ class EchoSuppressionRowUpdateGenerator implements RowUpdateGenerator {
|
|||
protected function updatePageLinkedExtraData( $row, array $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'] );
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue