Вход Регистрация
Файл: system/controllers/admin/actions/settings_scheduler_toggle.php
Строк: 17
<?php

class actionAdminSettingsSchedulerToggle extends cmsAction {

    public function 
run($id=false){

        if (!
$id) {
            return 
$this->cms_template->renderJSON(array(
                
'error' => true
            
));
        }

        
$task $this->model->getSchedulerTask($id);
        if (!
$task) {
            return 
$this->cms_template->renderJSON(array(
                
'error' => true
            
));
        }

        
$is_active $task['is_active'] ? 1;

        
$this->model->toggleSchedulerPublication($id$is_active);

        return 
$this->cms_template->renderJSON(array(
            
'error' => false,
            
'is_on' => $is_active
        
));

    }

}
Онлайн: 0
Реклама