* Code conventions
authorRob Church <robchurch@users.mediawiki.org>
Tue, 10 Jul 2007 14:19:22 +0000 (14:19 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Tue, 10 Jul 2007 14:19:22 +0000 (14:19 +0000)
* Tweak release notes

RELEASE-NOTES
includes/DefaultSettings.php
includes/GlobalFunctions.php
includes/Wiki.php

index d962d81..c5adac0 100644 (file)
@@ -25,7 +25,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * $wgAddGroups, $wgRemoveGroups - Finer control over who can assign which
   usergroups
 * $wgEnotifImpersonal, $wgEnotifUseJobQ - Bulk mail options for large sites
-* $wgShowHostnames - Shows host names in API results and HTML comments
+* $wgShowHostnames - Expose server host names through the API and HTML comments
 
 == New features since 1.10 ==
 
index 74ffbe4..542a726 100644 (file)
@@ -921,12 +921,12 @@ $wgColorErrors          = true;
 $wgShowExceptionDetails = false;
 
 /**
- * If set to true, exposes host names through API and HTML comments.
+ * Expose server host names through the API and various HTML comments
  */
 $wgShowHostnames = false;
-/** * disable experimental dmoz-like category browsing. Output things like:
- * Encyclopedia > Music > Style of Music > Jazz
+
+/**
+ * Use experimental, DMOZ-like category browser
  */
 $wgUseCategoryBrowser   = false;
 
@@ -2690,6 +2690,4 @@ $wgDisableOutputCompression = false;
  * show a more obvious warning.
  */
 $wgSlaveLagWarning = 10;
-$wgSlaveLagCritical = 30;
-
-
+$wgSlaveLagCritical = 30;
\ No newline at end of file
index a1db8f8..f06cd47 100644 (file)
@@ -706,11 +706,9 @@ function wfHostname() {
                $now = wfTime();
                $elapsed = $now - $wgRequestTime;
 
-        if ($wgShowHostnames) {
-            return sprintf( "<!-- Served by %s in %01.3f secs. -->", wfHostname(), $elapsed );
-        } else {
-            return sprintf( "<!-- Served in %01.3f secs. -->", $elapsed );
-        }
+               return $wgShowHostnames
+                       ? sprintf( "<!-- Served by %s in %01.3f secs. -->", wfHostname(), $elapsed )
+                       : sprintf( "<!-- Served in %01.3f secs. -->", $elapsed );
        }
 
 /**
index 9593033..897a2d4 100644 (file)
@@ -58,14 +58,13 @@ class MediaWiki {
 
        function checkMaxLag( $maxLag ) {
                global $wgLoadBalancer, $wgShowHostnames;
-               
                list( $host, $lag ) = $wgLoadBalancer->getMaxLag();
                if ( $lag > $maxLag ) {
                        header( 'HTTP/1.1 503 Service Unavailable' );
                        header( 'Retry-After: ' . max( intval( $maxLag ), 5 ) );
                        header( 'X-Database-Lag: ' . intval( $lag ) );
                        header( 'Content-Type: text/plain' );
-                       if ($wgShowHostnames) {
+                       if( $wgShowHostnames ) {
                                echo "Waiting for $host: $lag seconds lagged\n";
                        } else {
                                echo "Waiting for a database server: $lag seconds lagged\n";