Brian Wolff has uploaded a new change for review.

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


Change subject: Use canonical url instead of protocol relative for sitemap feed.
......................................................................

Use canonical url instead of protocol relative for sitemap feed.

No idea if google understand proto-relative, but I would guess no.

Change-Id: If9f05d42866a780753e210f371316eb0bbf8f4a8
---
M FeedSMItem.php
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GoogleNewsSitemap 
refs/changes/59/69259/1

diff --git a/FeedSMItem.php b/FeedSMItem.php
index 7f82bf0..fbbb1b8 100644
--- a/FeedSMItem.php
+++ b/FeedSMItem.php
@@ -35,12 +35,12 @@
                $commentsURL = '';
                if ( $comment === true ) {
                        // The comment ns is this article's talk namespace.
-                       $commentsURL = $title->getTalkPage()->getFullUrl();
+                       $commentsURL = $title->getTalkPage()->getCanonicalURL();
                } elseif ( is_int( $comment ) ) {
                        // There's a specific comments namespace.
                        $commentsTitle = Title::makeTitle( $comment, 
$title->getDBkey() );
                        if ( $commentsTitle ) {
-                               $commentsURL = $commentsTitle->getFullUrl();
+                               $commentsURL = 
$commentsTitle->getCanonicalURL();
                        }
                }
 
@@ -48,7 +48,7 @@
                $this->titleObj = $title;
 
                parent::__construct( $title->getText(), '' /* Description */,
-                       $title->getFullURL(), $pubDate, '' /* Author */, 
$commentsURL  );
+                       $title->getCanonicalURL(), $pubDate, '' /* Author */, 
$commentsURL  );
        }
 
        /**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If9f05d42866a780753e210f371316eb0bbf8f4a8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GoogleNewsSitemap
Gerrit-Branch: master
Gerrit-Owner: Brian Wolff <[email protected]>

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

Reply via email to