Habari\InstallHandler::upgrade_db_post_5107 PHP Метод

upgrade_db_post_5107() приватный Метод

private upgrade_db_post_5107 ( )
    private function upgrade_db_post_5107()
    {
        // delete the current un-namespaced CronJobs by these names
        CronTab::delete_cronjob('trim_log');
        CronTab::delete_cronjob('update_check');
        // we could have a bunch of the single update crons now, and there's no way to handle that using CronTab, so do it manually
        $crons = DB::get_results('SELECT * FROM {crontab} WHERE name = ?', array('update_check_single'), '\\Habari\\CronJob');
        foreach ($crons as $cron) {
            $cron->delete();
        }
        // Add the cronjob to trim the log so that it doesn't get too big
        CronTab::add_daily_cron('trim_log', Method::create('\\Habari\\EventLog', 'trim'), _t('Trim the log table'));
        // Add the cronjob to check for plugin updates
        CronTab::add_daily_cron('update_check', Method::create('\\Habari\\Update', 'cron'), _t('Perform a check for plugin updates.'));
    }