public function manage() { set_time_limit(0); if (!db::table_exists('_cms_module')) { $this->build(); } if (!db::table_exists('_cms_setting')) { $this->build_settings(); } $var = (int) get::setting('cms_version'); if ($var < self::$current_version) { for ($i = (int) $var + 1; $i <= self::$current_version; $i++) { $this->run_patch($i); } } }