r74134 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r74133‎ | r74134 | r74135 >
Date:08:29, 2 October 2010
Author:ialex
Status:resolved (Comments)
Tags:
Comment:
removed call to deprecated function dbsource() and a comment that mentioned it
Modified paths:
  • /trunk/phase3/includes/db/DatabaseMssql.php (modified) (history)
  • /trunk/phase3/includes/db/DatabaseSqlite.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/db/DatabaseMssql.php
@@ -830,7 +830,11 @@
831831 }
832832 $this->doQuery( "DROP TABLE $ctest" );
833833
834 - $res = dbsource( "../maintenance/mssql/tables.sql", $this );
 834+ $res = $this->sourceFile( "../maintenance/mssql/tables.sql" );
 835+ if ( $err !== true ) {
 836+ echo " <b>FAILED</b></li>";
 837+ dieout( htmlspecialchars( $err ) );
 838+ }
835839
836840 # # Update version information
837841 $mwv = $this->addQuotes( $wgVersion );
Index: trunk/phase3/includes/db/DatabaseSqlite.php
@@ -555,7 +555,7 @@
556556
557557 /**
558558 * Called by the installer script (when modified according to the MediaWikiLite installation instructions)
559 - * - this is the same way PostgreSQL works, MySQL reads in tables.sql and interwiki.sql using dbsource (which calls db->sourceFile)
 559+ * - this is the same way PostgreSQL works, MySQL reads in tables.sql and interwiki.sql using DatabaseBase::sourceFile()
560560 */
561561 public function setup_database() {
562562 global $IP;

Follow-up revisions

RevisionCommit summaryAuthorDate
r74135Fix for r74134: copy-paste errorialex08:30, 2 October 2010

Comments

#Comment by Platonides (talk | contribs)   14:48, 10 October 2010

Shouldn't the sourceFile() calls use absolute paths?

#Comment by IAlex (talk | contribs)   16:42, 10 October 2010

dbsource() passes the file name directly to sourceFile(), so this should work the same as before.

#Comment by MaxSem (talk | contribs)   16:58, 10 October 2010

All the other databases do exactly the same and are known to work.

#Comment by Platonides (talk | contribs)   00:17, 11 October 2010

It's more about "the right thing to do" than if it happens to work (based on the current folder).

Status & tagging log