r76454 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76453‎ | r76454 | r76455 >
Date:16:06, 10 November 2010
Author:demon
Status:ok
Tags:
Comment:
Drop setup_database() here too. Only caller is the old installer
Modified paths:
  • /trunk/phase3/includes/db/DatabaseSqlite.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/db/DatabaseSqlite.php
@@ -538,36 +538,6 @@
539539 return parent::buildLike( $params ) . "ESCAPE '\' ";
540540 }
541541
542 - /**
543 - * Called by the installer script
544 - * - this is the same way PostgreSQL works, MySQL reads in tables.sql and interwiki.sql using DatabaseBase::sourceFile()
545 - */
546 - public function setup_database() {
547 - global $IP;
548 -
549 - # Process common MySQL/SQLite table definitions
550 - $err = $this->sourceFile( "$IP/maintenance/tables.sql" );
551 - if ( $err !== true ) {
552 - echo " <b>FAILED</b></li>";
553 - dieout( htmlspecialchars( $err ) );
554 - }
555 - echo " done.</li>";
556 -
557 - # Use DatabasePostgres's code to populate interwiki from MySQL template
558 - $f = fopen( "$IP/maintenance/interwiki.sql", 'r' );
559 - if ( !$f ) {
560 - dieout( "Could not find the interwiki.sql file." );
561 - }
562 -
563 - $sql = "INSERT INTO interwiki(iw_prefix,iw_url,iw_local,iw_api,iw_wikiid) VALUES ";
564 - while ( !feof( $f ) ) {
565 - $line = fgets( $f, 1024 );
566 - $matches = array();
567 - if ( !preg_match( '/^\s*(\(.+?),(\d)\)/', $line, $matches ) ) continue;
568 - $this->query( "$sql $matches[1],$matches[2],'','')" );
569 - }
570 - }
571 -
572542 public function getSearchEngine() {
573543 return "SearchSqlite";
574544 }

Status & tagging log