jenkins-bot has submitted this change and it was merged.

Change subject: Add mediawiki.org to default $wgNoFollowDomainExceptions
......................................................................


Add mediawiki.org to default $wgNoFollowDomainExceptions

It doesn't make sense to apply nofollow to links included by default,
for instance on Special:Version. It kind of defeats the purpose of those
links and makes MediaWiki and all MediaWiki wikis less connected and more
sparse, harder to find.

Make some assumptions of SideBarTest explicit so that it tests what is should.

Change-Id: I5e7ad67c0037b099236cf7e1b73ae669ebcec0f1
---
M includes/DefaultSettings.php
M tests/phpunit/skins/SideBarTest.php
2 files changed, 12 insertions(+), 2 deletions(-)

Approvals:
  Hoo man: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index e23aea4..3102384 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -3811,13 +3811,16 @@
  * (or any subdomains) will not be set to rel="nofollow" regardless of the
  * value of $wgNoFollowLinks.  For instance:
  *
- * $wgNoFollowDomainExceptions = array( 'en.wikipedia.org', 'wiktionary.org' );
+ * $wgNoFollowDomainExceptions = array( 'en.wikipedia.org', 'wiktionary.org',
+ * 'mediawiki.org' );
  *
  * This would add rel="nofollow" to links to de.wikipedia.org, but not
  * en.wikipedia.org, wiktionary.org, en.wiktionary.org, us.en.wikipedia.org,
  * etc.
+ *
+ * Defaults to mediawiki.org for the links included in the software by default.
  */
-$wgNoFollowDomainExceptions = array();
+$wgNoFollowDomainExceptions = array( 'mediawiki.org' );
 
 /**
  * Allow DISPLAYTITLE to change title display
diff --git a/tests/phpunit/skins/SideBarTest.php 
b/tests/phpunit/skins/SideBarTest.php
index fc06ee4..7d33a59 100644
--- a/tests/phpunit/skins/SideBarTest.php
+++ b/tests/phpunit/skins/SideBarTest.php
@@ -90,6 +90,11 @@
         * @covers SkinTemplate::addToSidebarPlain
         */
        public function testExternalUrlsRequireADescription() {
+               $this->setMwGlobals( array(
+                       'wgNoFollowLinks' => true,
+                       'wgNoFollowDomainExceptions' => array(),
+                       'wgNoFollowNsExceptions' => array(),
+               ) );
                $this->assertSidebar(
                        array( 'Title' => array(
                                # ** http://www.mediawiki.org/| Home
@@ -162,6 +167,8 @@
        public function testTestAttributesAssertionHelper() {
                $this->setMwGlobals( array(
                        'wgNoFollowLinks' => true,
+                       'wgNoFollowDomainExceptions' => array(),
+                       'wgNoFollowNsExceptions' => array(),
                        'wgExternalLinkTarget' => false,
                ) );
                $attribs = $this->getAttribs();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5e7ad67c0037b099236cf7e1b73ae669ebcec0f1
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Nemo bis <federicol...@tiscali.it>
Gerrit-Reviewer: Brian Wolff <bawolff...@gmail.com>
Gerrit-Reviewer: Hoo man <h...@online.de>
Gerrit-Reviewer: MarkAHershberger <mhershber...@wikimedia.org>
Gerrit-Reviewer: Nemo bis <federicol...@tiscali.it>
Gerrit-Reviewer: Parent5446 <tylerro...@gmail.com>
Gerrit-Reviewer: Umherirrender <umherirrender_de...@web.de>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to