public function update_db()
{
if (isset($options['glob'])) {
$glob_patern = $options['glob'];
} else {
$glob_patern = 'config.php';
}
//$this->app->cache_manager->clear();
//clearstatcache();
$dir_name_mods = modules_path();
$modules_remove_old = false;
$dir = rglob($glob_patern, 0, $dir_name_mods);
if (!empty($dir)) {
$configs = array();
foreach ($dir as $value) {
$loc_of_config = $value;
if ($loc_of_config != false and is_file($loc_of_config)) {
include $loc_of_config;
if (isset($config)) {
$cfg = $config;
if (isset($config['tables']) and is_array($config['tables'])) {
$tabl = $config['tables'];
foreach ($tabl as $key1 => $fields_to_add) {
$table = $this->app->database_manager->real_table_name($key1);
$this->app->database_manager->build_table($table, $fields_to_add);
}
}
}
}
}
}
}