* Get a WikiPage object from a title or pageid param, if possible.
* Can die, if no param is set or if the title or page id is not valid.
*
- * @param array $params
+ * @param array $params User provided set of parameters, as from $this->extractRequestParams()
* @param bool|string $load Whether load the object's state from the database:
* - false: don't load (if the pageid is given, it will still be loaded)
* - 'fromdb': load from a replica DB
* Can die, if no param is set or if the title or page id is not valid.
*
* @since 1.29
- * @param array $params
+ * @param array $params User provided set of parameters, as from $this->extractRequestParams()
* @return Title
*/
public function getTitleFromTitleOrPageId( $params ) {
protected function getSeparateMainLB() {
global $wgDBtype;
- if ( $wgDBtype === 'mysql' && $this->usesMainDB() ) {
+ if ( $this->usesMainDB() && $wgDBtype !== 'sqlite' ) {
if ( !$this->separateMainLB ) {
// We must keep a separate connection to MySQL in order to avoid deadlocks
$lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
}
return $this->separateMainLB;
} else {
- // However, SQLite has an opposite behavior. And PostgreSQL needs to know
- // if we are in transaction or not (@TODO: find some PostgreSQL work-around).
+ // However, SQLite has an opposite behavior due to DB-level locking
return null;
}
}