Clean up references to deprecated DB methods in other places

This commit is contained in:
Kijin Sung 2023-06-19 15:24:27 +09:00
parent 59113fc385
commit 959503b6ec
2 changed files with 5 additions and 5 deletions

View file

@ -992,7 +992,7 @@ class ModuleHandler extends Handler
} }
// If connection to DB has a problem even though it's not install module, set error // If connection to DB has a problem even though it's not install module, set error
if($this->module != 'install' && !DB::getInstance()->isConnected()) if($this->module != 'install' && !DB::getInstance()->getHandle())
{ {
$this->error = 'msg_dbconnect_failed'; $this->error = 'msg_dbconnect_failed';
} }

View file

@ -52,7 +52,7 @@ class installController extends install
// Check connection to the DB. // Check connection to the DB.
$oDB = DB::getInstance(); $oDB = DB::getInstance();
$output = $oDB->getError(); $output = $oDB->getError();
if (!$output->toBool() || !$oDB->isConnected()) if (!$output->toBool() || !$oDB->getHandle())
{ {
return $output; return $output;
} }
@ -61,7 +61,7 @@ class installController extends install
if(stripos($config->db_type, 'mysql') !== false) if(stripos($config->db_type, 'mysql') !== false)
{ {
// Check if InnoDB is supported. // Check if InnoDB is supported.
$show_engines = $oDB->_fetch($oDB->_query('SHOW ENGINES')); $show_engines = $oDB->query('SHOW ENGINES')->fetchAll();
foreach($show_engines as $engine_info) foreach($show_engines as $engine_info)
{ {
if ($engine_info->Engine === 'InnoDB' && $engine_info->Support !== 'NO') if ($engine_info->Engine === 'InnoDB' && $engine_info->Support !== 'NO')
@ -209,8 +209,8 @@ class installController extends install
Context::loadDBInfo($config); Context::loadDBInfo($config);
// Check DB. // Check DB.
$oDB = DB::getInstance(); $oDB = DB::getInstance('master');
if (!$oDB->isConnected()) if (!$oDB->getHandle())
{ {
return $oDB->getError(); return $oDB->getError();
} }