avoid using magic internal database->db value

This commit is contained in:
Shish 2012-06-24 00:27:21 +01:00
parent bcfcca7cda
commit dd505e556e
2 changed files with 2 additions and 2 deletions

View File

@ -44,7 +44,7 @@ class ET extends Extension {
$info['sys_shimmie'] = VERSION;
$info['sys_schema'] = $config->get_string("db_version");
$info['sys_php'] = phpversion();
$info['sys_db'] = $database->db->getAttribute(PDO::ATTR_DRIVER_NAME);
$info['sys_db'] = $database->engine->name;
$info['sys_os'] = php_uname();
$info['sys_disk'] = to_shorthand_int(disk_total_space("./") - disk_free_space("./")) . " / " .
to_shorthand_int(disk_total_space("./"));

View File

@ -40,7 +40,7 @@ class Upgrade extends Extension {
$config->set_bool("in_upgrade", true);
$config->set_int("db_version", 9);
if($database->db->getAttribute(PDO::ATTR_DRIVER_NAME) == 'mysql') {
if($database->engine->name == 'mysql') {
$tables = $database->get_col("SHOW TABLES");
foreach($tables as $table) {
log_info("upgrade", "converting $table to innodb");