mirror of
https://github.com/moodle/moodle.git
synced 2025-04-22 17:02:03 +02:00
MDL-15096 removed some obsoleted installation code
This commit is contained in:
parent
655b09ca8a
commit
83d957fca4
@ -104,13 +104,6 @@ $separator = (array_key_exists('WINDIR', $_SERVER)) ? ';' : ':' ;
|
||||
Zend_Search_Lucene_Analysis_Analyzer::setDefault(new Zend_Search_Lucene_Analysis_Analyzer_Common_Utf8());
|
||||
$index = new Zend_Search_Lucene($index_path, true);
|
||||
|
||||
/*
|
||||
OBSOLETE REGENERATION - DB installs with search block by now
|
||||
if (!$dbcontrol->checkDB()) {
|
||||
search_pexit("Database error. Please check settings/files.");
|
||||
}
|
||||
*/
|
||||
|
||||
/// New regeneration
|
||||
|
||||
mtrace('Deleting old index entries.');
|
||||
|
@ -193,29 +193,6 @@ class IndexDBControl {
|
||||
}
|
||||
} //checkTableExists
|
||||
|
||||
/**
|
||||
* is our database setup valid?
|
||||
* @uses db, CFG
|
||||
* @deprecated Database is installed at install and should not be dropped out
|
||||
*/
|
||||
public function checkDB() {
|
||||
global $CFG, $DB;
|
||||
|
||||
$sqlfile = "{$CFG->dirroot}/search/db/$CFG->dbtype.sql";
|
||||
$ret = false;
|
||||
if ($this->checkTableExists()) {
|
||||
execute_sql('drop table '.$CFG->prefix.SEARCH_DATABASE_TABLE, false);
|
||||
}
|
||||
|
||||
//turn output buffering on - to hide modify_database() output
|
||||
ob_start();
|
||||
$ret = modify_database($sqlfile, '', false);
|
||||
|
||||
//chuck the buffer and resume normal operation
|
||||
ob_end_clean();
|
||||
return $ret;
|
||||
} //checkDB
|
||||
|
||||
/**
|
||||
* add a document record to the table
|
||||
* @param document must be a Lucene SearchDocument instance
|
||||
|
Loading…
x
Reference in New Issue
Block a user