/**
* Determine whether an existing installation of MediaWiki is present in
* the configured administrative connection. Returns true if there is
* such a wiki, false if the database doesn't exist.
*
* Traditionally, this is done by testing for the existence of either
* the revision table or the cur table.
*
* @return bool
*/
public function needsUpgrade()
{
$status = $this->getConnection();
if (!$status->isOK()) {
return false;
}
if (!$this->db->selectDB($this->getVar('wgDBname'))) {
return false;
}
return $this->db->tableExists('cur', __METHOD__) || $this->db->tableExists('revision', __METHOD__);
}