r75284 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75283‎ | r75284 | r75285 >
Date:20:02, 23 October 2010
Author:ialex
Status:deferred
Tags:
Comment:
Much simplier to use wfGetDB( DB_MASTER ) to get a db connection with admin rights...
Modified paths:
  • /trunk/extensions/MetavidWiki/maintenance/mv_update.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MetavidWiki/maintenance/mv_update.php
@@ -5,12 +5,10 @@
66 // include commandLine.inc from the mediaWiki maintance dir:
77 require_once ( '../../../maintenance/commandLine.inc' );
88
9 -$dbclass = 'Database' . ucfirst( $wgDBtype ) ;
10 -
119 # Attempt to connect to the database as a privileged user
1210 # This will vomit up an error if there are permissions problems
1311
14 -$wgDatabase = new $dbclass( $wgDBserver, $wgDBadminuser, $wgDBadminpassword, $wgDBname, 1 );
 12+$wgDatabase = wfGetDB( DB_MASTER );
1513
1614 //first run the mv_tables.sql
1715 $wgDatabase->sourceFile( 'mv_tables.sql' );

Status & tagging log