r42694 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r42693‎ | r42694 | r42695 >
Date:22:38, 27 October 2008
Author:demon
Status:old
Tags:
Comment:
Use sourceFile() here, rather than query(), the latter doesn't parse the sql options.
Modified paths:
  • /trunk/extensions/Drafts/Drafts.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Drafts/Drafts.php
@@ -77,11 +77,9 @@
7878 function efCheckSchema() {
7979 // Get a connection
8080 $db = wfGetDB( DB_MASTER );
81 - // Get statements from file
82 - $statement = file_get_contents( dirname( __FILE__ ) . '/Drafts.sql' );
8381 // Create table if it doesn't exist
8482 if ( !$db->tableExists( 'drafts' ) ) {
85 - $db->query( $statement, __METHOD__);
 83+ $db->sourceFile( dirname( __FILE__ ) . '/Drafts.sql' );
8684 }
8785 // Continue
8886 return true;

Status & tagging log