Set $wgNoFollowLinks to false iff "Authorized editors only" selected
authortisane <nathanlarson3141@gmail.com>
Sat, 16 Nov 2013 04:49:29 +0000 (23:49 -0500)
committertisane <nathanlarson3141@gmail.com>
Mon, 18 Nov 2013 19:27:04 +0000 (14:27 -0500)
Adds a little more whitespace for other configs; let me know if that's
not okay

Bug: 57115
Change-Id: I27775195a1a69cc83c2ea24640e563095591aff7

includes/installer/LocalSettingsGenerator.php

index 56d8353..49fbfe4 100644 (file)
@@ -220,6 +220,17 @@ class LocalSettingsGenerator {
                                                wfBoolToStr( $perm ) . ";\n";
                                }
                        }
+                       $noFollow = '';
+                       if ( $this->groupPermissions['*']['edit'] === false
+                               && $this->groupPermissions['*']['createaccount'] === false
+                               && $this->groupPermissions['*']['read'] !== false ) {
+                               $noFollow = "# Set \$wgNoFollowLinks to true if you open up your wiki to editing by\n"
+                                       . "# the general public and wish to apply nofollow to external links as a\n"
+                                       . "# deterrent to spammers. Nofollow is not a comprehensive anti-spam solution\n"
+                                       . "# and open wikis will generally require other anti-spam measures; for more\n"
+                                       . "# information, see https://www.mediawiki.org/wiki/Manual:Combating_spam\n"
+                                       . "\$wgNoFollowLinks = false;";
+                       }
                }
 
                $wgServerSetting = "";
@@ -353,6 +364,7 @@ ${wgServerSetting}
 # Path to the GNU diff3 utility. Used for conflict resolution.
 \$wgDiff3 = \"{$this->values['wgDiff3']}\";
 
-{$groupRights}";
+{$groupRights}
+{$noFollow}";
        }
 }