summaryrefslogtreecommitdiff
path: root/maintenance/rebuildtextindex.php
diff options
context:
space:
mode:
Diffstat (limited to 'maintenance/rebuildtextindex.php')
-rw-r--r--maintenance/rebuildtextindex.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/maintenance/rebuildtextindex.php b/maintenance/rebuildtextindex.php
index 46282c18..04606c75 100644
--- a/maintenance/rebuildtextindex.php
+++ b/maintenance/rebuildtextindex.php
@@ -28,6 +28,10 @@ require_once( dirname( __FILE__ ) . '/Maintenance.php' );
class RebuildTextIndex extends Maintenance {
const RTI_CHUNK_SIZE = 500;
+
+ /**
+ * @var DatabaseBase
+ */
private $db;
public function __construct() {
@@ -40,10 +44,11 @@ class RebuildTextIndex extends Maintenance {
}
public function execute() {
- global $wgTitle, $wgDBtype;
+ global $wgTitle;
// Shouldn't be needed for Postgres
- if ( $wgDBtype == 'postgres' ) {
+ $this->db = wfGetDB( DB_MASTER );
+ if ( $this->db->getType() == 'postgres' ) {
$this->error( "This script is not needed when using Postgres.\n", true );
}