mirror of
https://github.com/diocloid/LinkTitles.git
synced 2025-07-13 01:39:30 +02:00
Use different query for SQLite databases.
- Fix: Avoid errors with SQLite database. Closes #35.
This commit is contained in:
@ -169,9 +169,24 @@ class Config {
|
||||
*/
|
||||
public $sameNamespace;
|
||||
|
||||
/**
|
||||
* Caches the global $wgDBtype variable.
|
||||
* @var string $dbType;
|
||||
*/
|
||||
private $dbType;
|
||||
|
||||
public $enableConsoleOutput;
|
||||
public $enableDebugConsoleOutput;
|
||||
|
||||
/**
|
||||
* Determines whether the MediaWiki database is SQLITE by inspecting the
|
||||
* $wgDBtype variable (which is cached in $this->dbType).
|
||||
* @return bool True if the database is SQLITE.
|
||||
*/
|
||||
public function sqliteDatabase() {
|
||||
return $this->dbType === 'sqlite';
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new Config object.
|
||||
*
|
||||
@ -197,6 +212,7 @@ class Config {
|
||||
global $wgLinkTitlesEnableNoTargetMagicWord;
|
||||
global $wgLinkTitlesCheckRedirect;
|
||||
global $wgLinkTitlesSpecialPageReloadAfter;
|
||||
global $wgDBtype;
|
||||
$this->parseOnEdit = $wgLinkTitlesParseOnEdit;
|
||||
$this->parseOnRender = $wgLinkTitlesParseOnRender;
|
||||
$this->preferShortTitles = $wgLinkTitlesPreferShortTitles;
|
||||
@ -217,5 +233,6 @@ class Config {
|
||||
$this->specialPageReloadAfter = $wgLinkTitlesSpecialPageReloadAfter;
|
||||
$this->enableConsoleOutput = false;
|
||||
$this->enableDebugConsoleOutput = false;
|
||||
$this->dbType = $wgDBtype;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user