r76165 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76164‎ | r76165 | r76166 >
Date:23:36, 5 November 2010
Author:platonides
Status:ok
Tags:
Comment:
dieout() function already takes into account if a </ul> is needed.
Modified paths:
  • /trunk/phase3/includes/db/DatabaseMssql.php (modified) (history)
  • /trunk/phase3/includes/db/DatabasePostgres.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/db/DatabasePostgres.php
@@ -234,7 +234,7 @@
235235 $PGMINVER = '8.1';
236236 if ( $version < $PGMINVER ) {
237237 print "<b>FAILED</b>. Required version is $PGMINVER. You have " . htmlspecialchars( $version ) . "</li>\n";
238 - dieout( '</ul>' );
 238+ dieout( '' );
239239 }
240240 print 'version ' . htmlspecialchars( $this->numeric_version ) . " is OK.</li>\n";
241241
@@ -251,7 +251,7 @@
252252 $rows = $this->numRows( $res = $this->doQuery( $SQL ) );
253253 if ( !$rows ) {
254254 print '<li>ERROR: Could not read permissions for user "' . htmlspecialchars( $superuser ) . "\"</li>\n";
255 - dieout( '</ul>' );
 255+ dieout( '' );
256256 }
257257 $perms = pg_fetch_result( $res, 0, 0 );
258258
@@ -263,7 +263,7 @@
264264 if ( $perms != 1 && $perms != 3 ) {
265265 print '<li>ERROR: the user "' . htmlspecialchars( $superuser ) . '" cannot create other users. ';
266266 print 'Please use a different Postgres user.</li>';
267 - dieout( '</ul>' );
 267+ dieout( '' );
268268 }
269269 print '<li>Creating user <b>' . htmlspecialchars( $wgDBuser ) . '</b>...';
270270 $safepass = $this->addQuotes( $wgDBpassword );
@@ -281,7 +281,7 @@
282282 if ( $perms < 1 ) {
283283 print '<li>ERROR: the user "' . htmlspecialchars( $superuser ) . '" cannot create databases. ';
284284 print 'Please use a different Postgres user.</li>';
285 - dieout( '</ul>' );
 285+ dieout( '' );
286286 }
287287 print '<li>Creating database <b>' . htmlspecialchars( $wgDBname ) . '</b>...';
288288 $safename = $this->quote_ident( $wgDBname );
@@ -309,7 +309,7 @@
310310 @$this->mConn = pg_connect( $this->makeConnectionString( $connectVars ) );
311311 if ( !$this->mConn ) {
312312 print "<b>FAILED TO CONNECT!</b></li>";
313 - dieout( '</ul>' );
 313+ dieout( '' );
314314 }
315315 print "OK</li>\n";
316316 }
@@ -323,7 +323,7 @@
324324 htmlspecialchars( $wgDBname ) . '".';
325325 print 'Please see <a href="http://www.devx.com/opensource/Article/21674/0/page/2">this article</a>';
326326 print " for instructions or ask on #postgresql on irc.freenode.net</li>\n";
327 - dieout( '</ul>' );
 327+ dieout( '' );
328328 }
329329 print "OK</li>\n";
330330 print '<li>Ensuring that user "' . htmlspecialchars( $wgDBuser ) .
@@ -343,7 +343,7 @@
344344 $result = $this->doQuery( "CREATE SCHEMA $safeschema AUTHORIZATION $safeuser" );
345345 if ( !$result ) {
346346 print "<b>FAILED</b>.</li>\n";
347 - dieout( '</ul>' );
 347+ dieout( '' );
348348 }
349349 print "OK</li>\n";
350350 } else {
@@ -361,7 +361,7 @@
362362 $res = $this->doQuery( $SQL );
363363 if ( !$res ) {
364364 print "<b>FAILED</b>. Could not set rights for the user.</li>\n";
365 - dieout( '</ul>' );
 365+ dieout( '' );
366366 }
367367 $this->doQuery( "SET search_path = $safeschema" );
368368 $rows = $this->numRows( $res );
@@ -388,7 +388,7 @@
389389 print '<b>FAILED</b>. Make sure tsearch2 is installed. See <a href="';
390390 print 'http://www.devx.com/opensource/Article/21674/0/page/2">this article</a>';
391391 print " for instructions.</li>\n";
392 - dieout( '</ul>' );
 392+ dieout( '' );
393393 }
394394 print "OK</li>\n";
395395
@@ -406,7 +406,7 @@
407407 print "<b>FAILED</b> to access " . htmlspecialchars( "pg_ts_$tname" ) .
408408 ". Make sure that the user \"". htmlspecialchars( $wgDBuser ) .
409409 "\" has SELECT access to all four tsearch2 tables</li>\n";
410 - dieout( '</ul>' );
 410+ dieout( '' );
411411 }
412412 }
413413 $SQL = "SELECT ts_name FROM $safetsschema.pg_ts_cfg WHERE locale = " . $this->addQuotes( $ctype ) ;
@@ -443,7 +443,7 @@
444444 print '<b>FAILED</b>. ';
445445 print 'Please make sure that the locale in pg_ts_cfg for "default" is set to "' .
446446 htmlspecialchars( $ctype ) . "\"</li>\n";
447 - dieout( '</ul>' );
 447+ dieout( '' );
448448 }
449449 print 'OK</li>';
450450 }
@@ -453,7 +453,7 @@
454454 $res = $this->doQuery( $SQL );
455455 if ( !$res ) {
456456 print '<b>FAILED</b>. Specifically, "' . htmlspecialchars( $SQL ) . '" did not work.</li>';
457 - dieout( '</ul>' );
 457+ dieout( '' );
458458 }
459459 print 'OK</li>';
460460 }
@@ -475,7 +475,7 @@
476476 'You can try making them the owner of the database, or try creating the schema with a '.
477477 'different user, and then grant access to the "' .
478478 htmlspecialchars( $wgDBuser ) . "\" user.</li>\n";
479 - dieout( '</ul>' );
 479+ dieout( '' );
480480 }
481481 print "OK</li>\n";
482482 } elseif ( $result != $wgDBuser ) {
@@ -492,7 +492,7 @@
493493 $result = pg_query( $this->mConn, $SQL );
494494 if ( !$result ) {
495495 print "<b>FAILED</b>.</li>\n";
496 - dieout( '</ul>' );
 496+ dieout( '' );
497497 }
498498 print "OK</li>\n";
499499 // Set for the rest of this session
@@ -500,7 +500,7 @@
501501 $result = pg_query( $this->mConn, $SQL );
502502 if ( !$result ) {
503503 print "<li>Failed to set timezone</li>\n";
504 - dieout( '</ul>' );
 504+ dieout( '' );
505505 }
506506
507507 print '<li>Setting the datestyle to ISO, YMD for user "' . htmlspecialchars( $wgDBuser ) . '" ...';
@@ -508,7 +508,7 @@
509509 $result = pg_query( $this->mConn, $SQL );
510510 if ( !$result ) {
511511 print "<b>FAILED</b>.</li>\n";
512 - dieout( '</ul>' );
 512+ dieout( '' );
513513 }
514514 print "OK</li>\n";
515515 // Set for the rest of this session
@@ -516,7 +516,7 @@
517517 $result = pg_query( $this->mConn, $SQL );
518518 if ( !$result ) {
519519 print "<li>Failed to set datestyle</li>\n";
520 - dieout( '</ul>' );
 520+ dieout( '' );
521521 }
522522
523523 // Fix up the search paths if needed
@@ -532,7 +532,7 @@
533533 $result = pg_query( $this->mConn, $SQL );
534534 if ( !$result ) {
535535 print "<b>FAILED</b>.</li>\n";
536 - dieout( '</ul>' );
 536+ dieout( '' );
537537 }
538538 print "OK</li>\n";
539539 // Set for the rest of this session
@@ -540,7 +540,7 @@
541541 $result = pg_query( $this->mConn, $SQL );
542542 if ( !$result ) {
543543 print "<li>Failed to set search_path</li>\n";
544 - dieout( '</ul>' );
 544+ dieout( '' );
545545 }
546546 define( 'POSTGRES_SEARCHPATH', $path );
547547 }
@@ -565,12 +565,12 @@
566566 if ( !$result ) {
567567 print '<b>FAILED</b>. You need to install the language PL/pgSQL in the database <tt>' .
568568 htmlspecialchars( $wgDBname ) . '</tt></li>';
569 - dieout( '</ul>' );
 569+ dieout( '' );
570570 }
571571 } else {
572572 print '<b>FAILED</b>. You need to install the language PL/pgSQL in the database <tt>' .
573573 htmlspecialchars( $wgDBname ) . '</tt></li>';
574 - dieout( '</ul>' );
 574+ dieout( '' );
575575 }
576576 }
577577 print "OK</li>\n";
Index: trunk/phase3/includes/db/DatabaseMssql.php
@@ -824,7 +824,7 @@
825825 $res = $this->doQuery( $SQL );
826826 if ( !$res ) {
827827 print "<b>FAILED</b>. Make sure that the user " . htmlspecialchars( $wgDBuser ) . " can write to the database</li>\n";
828 - dieout( "</ul>" );
 828+ dieout( "" );
829829 }
830830 $this->doQuery( "DROP TABLE $ctest" );
831831

Follow-up revisions

RevisionCommit summaryAuthorDate
r77181dieout() now default to empty text. follow up r76165hashar20:39, 23 November 2010

Status & tagging log