Alex Monk has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/62162


Change subject: Do not send notifications for page links when the page is a 
redirect
......................................................................

Do not send notifications for page links when the page is a redirect

Bug: 48045
Change-Id: Ib61574732bde3f7a8aeec4a33a379cc3d1aab60b
---
M Hooks.php
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo 
refs/changes/62/62162/1

diff --git a/Hooks.php b/Hooks.php
index a0f1bd9..a91a1d7 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -531,6 +531,10 @@
                foreach ( $insertions as $key => $page ) {
                        if ( MWNamespace::isContent( $page['pl_namespace'] ) ) {
                                $title = Title::makeTitle( 
$page['pl_namespace'], $page['pl_title'] );
+                               if ( $title->isRedirect() ) {
+                                       continue;
+                               }
+
                                EchoEvent::create( array(
                                        'type' => 'page-linked',
                                        'title' => $title,

-- 
To view, visit https://gerrit.wikimedia.org/r/62162
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib61574732bde3f7a8aeec4a33a379cc3d1aab60b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Alex Monk <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to