From: Chad Horohoe Date: Wed, 10 Nov 2010 16:06:42 +0000 (+0000) Subject: Drop setup_database() here too. Only caller is the old installer X-Git-Tag: 1.31.0-rc.0~33941 X-Git-Url: http://git.cyclocoop.org/fichier?a=commitdiff_plain;h=a5947f6e870cca34b4a7e1a627ff3277b3a54296;p=lhc%2Fweb%2Fwiklou.git Drop setup_database() here too. Only caller is the old installer --- diff --git a/includes/db/DatabaseSqlite.php b/includes/db/DatabaseSqlite.php index 3a9a171d80..af00b04117 100644 --- a/includes/db/DatabaseSqlite.php +++ b/includes/db/DatabaseSqlite.php @@ -538,36 +538,6 @@ class DatabaseSqlite extends DatabaseBase { return parent::buildLike( $params ) . "ESCAPE '\' "; } - /** - * Called by the installer script - * - this is the same way PostgreSQL works, MySQL reads in tables.sql and interwiki.sql using DatabaseBase::sourceFile() - */ - public function setup_database() { - global $IP; - - # Process common MySQL/SQLite table definitions - $err = $this->sourceFile( "$IP/maintenance/tables.sql" ); - if ( $err !== true ) { - echo " FAILED"; - dieout( htmlspecialchars( $err ) ); - } - echo " done."; - - # Use DatabasePostgres's code to populate interwiki from MySQL template - $f = fopen( "$IP/maintenance/interwiki.sql", 'r' ); - if ( !$f ) { - dieout( "Could not find the interwiki.sql file." ); - } - - $sql = "INSERT INTO interwiki(iw_prefix,iw_url,iw_local,iw_api,iw_wikiid) VALUES "; - while ( !feof( $f ) ) { - $line = fgets( $f, 1024 ); - $matches = array(); - if ( !preg_match( '/^\s*(\(.+?),(\d)\)/', $line, $matches ) ) continue; - $this->query( "$sql $matches[1],$matches[2],'','')" ); - } - } - public function getSearchEngine() { return "SearchSqlite"; }