Move init of $noFollow outside of if
authortisane <nathanlarson3141@gmail.com>
Fri, 6 Dec 2013 14:51:01 +0000 (09:51 -0500)
committertisane <nathanlarson3141@gmail.com>
Fri, 6 Dec 2013 14:52:38 +0000 (09:52 -0500)
Bug: 58044
Change-Id: I5655a0dc64055f3ec5d0a287aa8e0c85c11d3a1f

includes/installer/LocalSettingsGenerator.php

index 2433fbd..515cedb 100644 (file)
@@ -210,6 +210,7 @@ class LocalSettingsGenerator {
                }
 
                $groupRights = '';
+               $noFollow = '';
                if ( $this->groupPermissions ) {
                        $groupRights .= "# The following permissions were set based on your choice in the installer\n";
                        foreach ( $this->groupPermissions as $group => $rightArr ) {
@@ -220,11 +221,10 @@ 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"
+                               $noFollow = "\n# 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"
@@ -364,7 +364,6 @@ ${serverSetting}
 # Path to the GNU diff3 utility. Used for conflict resolution.
 \$wgDiff3 = \"{$this->values['wgDiff3']}\";
 
-{$groupRights}
-{$noFollow}";
+{$groupRights}{$noFollow}";
        }
 }