Merge "(bug 37138) Fix broken Google sitesearch in DatabaseError"
authorDemon <chadh@wikimedia.org>
Wed, 6 Jun 2012 18:23:46 +0000 (18:23 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 6 Jun 2012 18:23:46 +0000 (18:23 +0000)
includes/db/DatabaseError.php

index 6aed05c..53341c3 100644 (file)
@@ -210,7 +210,7 @@ class DBConnectionError extends DBError {
         * @return string
         */
        function searchForm() {
-               global $wgSitename, $wgServer, $wgRequest;
+               global $wgSitename, $wgCanonicalServer, $wgRequest;
 
                $usegoogle = htmlspecialchars( $this->msg( 'dberr-usegoogle', 'You can try searching via Google in the meantime.' ) );
                $outofdate = htmlspecialchars( $this->msg( 'dberr-outofdate', 'Note that their indexes of our content may be out of date.' ) );
@@ -218,7 +218,7 @@ class DBConnectionError extends DBError {
 
                $search = htmlspecialchars( $wgRequest->getVal( 'search' ) );
 
-               $server = htmlspecialchars( $wgServer );
+               $server = htmlspecialchars( $wgCanonicalServer );
                $sitename = htmlspecialchars( $wgSitename );
 
                $trygoogle = <<<EOT