r102910 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102909‎ | r102910 | r102911 >
Date:21:42, 13 November 2011
Author:reedy
Status:resolved (Comments)
Tags:
Comment:
Bug 32379 - DatabaseError.php is hardcoding http

Also tidy up a couple of returns (per others in method, and/or parents)
Modified paths:
  • /trunk/phase3/includes/db/DatabaseError.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/db/DatabaseError.php
@@ -176,7 +176,7 @@
177177 }
178178
179179 # We can't, cough and die in the usual fashion
180 - return parent::reportHTML();
 180+ parent::reportHTML();
181181 }
182182
183183 /**
@@ -198,7 +198,7 @@
199199 <div style="margin: 1.5em">$usegoogle<br />
200200 <small>$outofdate</small></div>
201201 <!-- SiteSearch Google -->
202 -<form method="get" action="http://www.google.com/search" id="googlesearch">
 202+<form method="get" action="//www.google.com/search" id="googlesearch">
203203 <input type="hidden" name="domains" value="$server" />
204204 <input type="hidden" name="num" value="50" />
205205 <input type="hidden" name="ie" value="UTF-8" />
@@ -223,7 +223,7 @@
224224 global $wgTitle, $wgOut, $wgRequest;
225225
226226 if ( $wgOut->isDisabled() ) {
227 - return; // Done already?
 227+ return ''; // Done already?
228228 }
229229
230230 if ( $wgTitle ) { // use $wgTitle if we managed to set it
@@ -255,7 +255,7 @@
256256 public $error, $errno, $sql, $fname;
257257
258258 function __construct( DatabaseBase &$db, $error, $errno, $sql, $fname ) {
259 - $message = "A database error has occurred. Did you forget to run maintenance/update.php after upgrading? See: http://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script\n" .
 259+ $message = "A database error has occurred. Did you forget to run maintenance/update.php after upgrading? See: //www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script\n" .
260260 "Query: $sql\n" .
261261 "Function: $fname\n" .
262262 "Error: $errno $error\n";

Follow-up revisions

RevisionCommit summaryAuthorDate
r102965Followup r102910...reedy10:34, 14 November 2011

Comments

#Comment by Catrope (talk | contribs)   07:03, 14 November 2011
-		$message = "A database error has occurred.  Did you forget to run maintenance/update.php after upgrading?  See: [http://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script\n http://www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script\n]" .
+		$message = "A database error has occurred.  Did you forget to run maintenance/update.php after upgrading?  See: //www.mediawiki.org/wiki/Manual:Upgrading#Run_the_update_script\n" .

This should one should be reverted. URLs that are used inline like that can't be protocol-relative. The google.com URL is OK because it's in an HTML attribute.

Status & tagging log