mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
added comments
This commit is contained in:
@@ -25,6 +25,7 @@ class Clublog extends CI_Controller {
|
||||
public function upload() {
|
||||
$this->load->model('clublog_model');
|
||||
|
||||
// set the last run in cron table for the correct cron id
|
||||
$this->load->model('cron_model');
|
||||
$this->cron_model->set_last_run($this->router->class.'_'.$this->router->method);
|
||||
|
||||
|
||||
@@ -714,7 +714,7 @@ class eqsl extends CI_Controller {
|
||||
*/
|
||||
public function sync() {
|
||||
|
||||
$this->load->model('cron_model');
|
||||
// set the last run in cron table for the correct cron id
|
||||
$this->load->model('cron_model');
|
||||
$this->cron_model->set_last_run($this->router->class.'_'.$this->router->method);
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ class Hrdlog extends CI_Controller {
|
||||
public function upload() {
|
||||
$this->setOptions();
|
||||
|
||||
// set the last run in cron table for the correct cron id
|
||||
$this->load->model('cron_model');
|
||||
$this->cron_model->set_last_run($this->router->class.'_'.$this->router->method);
|
||||
|
||||
|
||||
@@ -198,6 +198,7 @@ class Lotw extends CI_Controller {
|
||||
echo "You must install php OpenSSL for LoTW functions to work";
|
||||
}
|
||||
|
||||
// set the last run in cron table for the correct cron id
|
||||
$this->load->model('cron_model');
|
||||
$this->cron_model->set_last_run($this->router->class.'_'.$this->router->method);
|
||||
|
||||
|
||||
@@ -69,6 +69,7 @@ class Qrz extends CI_Controller {
|
||||
public function upload() {
|
||||
$this->setOptions();
|
||||
|
||||
// set the last run in cron table for the correct cron id
|
||||
$this->load->model('cron_model');
|
||||
$this->cron_model->set_last_run($this->router->class.'_'.$this->router->method);
|
||||
|
||||
|
||||
@@ -180,6 +180,7 @@ class Update extends CI_Controller {
|
||||
// Updates the DXCC & Exceptions from the Club Log Cty.xml file.
|
||||
public function dxcc() {
|
||||
|
||||
// set the last run in cron table for the correct cron id
|
||||
$this->load->model('cron_model');
|
||||
$this->cron_model->set_last_run($this->router->class.'_'.$this->router->method);
|
||||
|
||||
@@ -307,6 +308,7 @@ class Update extends CI_Controller {
|
||||
|
||||
public function update_clublog_scp() {
|
||||
|
||||
// set the last run in cron table for the correct cron id
|
||||
$this->load->model('cron_model');
|
||||
$this->cron_model->set_last_run($this->router->class.'_'.$this->router->method);
|
||||
|
||||
@@ -358,6 +360,7 @@ class Update extends CI_Controller {
|
||||
|
||||
public function lotw_users() {
|
||||
|
||||
// set the last run in cron table for the correct cron id
|
||||
$this->load->model('cron_model');
|
||||
$this->cron_model->set_last_run($this->router->class.'_'.$this->router->method);
|
||||
|
||||
@@ -419,6 +422,7 @@ class Update extends CI_Controller {
|
||||
*/
|
||||
public function update_dok() {
|
||||
|
||||
// set the last run in cron table for the correct cron id
|
||||
$this->load->model('cron_model');
|
||||
$this->cron_model->set_last_run($this->router->class.'_'.$this->router->method);
|
||||
|
||||
@@ -448,6 +452,7 @@ class Update extends CI_Controller {
|
||||
*/
|
||||
public function update_sota() {
|
||||
|
||||
// set the last run in cron table for the correct cron id
|
||||
$this->load->model('cron_model');
|
||||
$this->cron_model->set_last_run($this->router->class.'_'.$this->router->method);
|
||||
|
||||
@@ -495,6 +500,7 @@ class Update extends CI_Controller {
|
||||
*/
|
||||
public function update_wwff() {
|
||||
|
||||
// set the last run in cron table for the correct cron id
|
||||
$this->load->model('cron_model');
|
||||
$this->cron_model->set_last_run($this->router->class.'_'.$this->router->method);
|
||||
|
||||
@@ -543,6 +549,7 @@ class Update extends CI_Controller {
|
||||
|
||||
public function update_pota() {
|
||||
|
||||
// set the last run in cron table for the correct cron id
|
||||
$this->load->model('cron_model');
|
||||
$this->cron_model->set_last_run($this->router->class.'_'.$this->router->method);
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
class Cron_model extends CI_Model
|
||||
{
|
||||
// get all crons from the database
|
||||
function get_crons() {
|
||||
$this->db->from('cron');
|
||||
|
||||
@@ -12,6 +13,7 @@ class Cron_model extends CI_Model
|
||||
return $results;
|
||||
}
|
||||
|
||||
// get details for a specific cron
|
||||
function cron($id) {
|
||||
|
||||
$clean_id = $this->security->xss_clean($id);
|
||||
@@ -21,6 +23,7 @@ class Cron_model extends CI_Model
|
||||
return $this->db->get('cron');
|
||||
}
|
||||
|
||||
// set the modified timestamp
|
||||
function set_modified($cron) {
|
||||
$data = array(
|
||||
'modified' => date('Y-m-d H:i:s')
|
||||
@@ -30,6 +33,7 @@ class Cron_model extends CI_Model
|
||||
$this->db->update('cron', $data);
|
||||
}
|
||||
|
||||
// set a new status for the cron
|
||||
function set_status($cron, $status) {
|
||||
$data = array(
|
||||
'status' => $status
|
||||
@@ -39,6 +43,7 @@ class Cron_model extends CI_Model
|
||||
$this->db->update('cron', $data);
|
||||
}
|
||||
|
||||
// set the last run
|
||||
function set_last_run($cron) {
|
||||
$data = array(
|
||||
'last_run' => date('Y-m-d H:i:s')
|
||||
@@ -48,6 +53,7 @@ class Cron_model extends CI_Model
|
||||
$this->db->update('cron', $data);
|
||||
}
|
||||
|
||||
// set the calculated next run
|
||||
function set_next_run($cron,$timestamp) {
|
||||
$data = array(
|
||||
'next_run' => $timestamp
|
||||
@@ -57,6 +63,7 @@ class Cron_model extends CI_Model
|
||||
$this->db->update('cron', $data);
|
||||
}
|
||||
|
||||
// set the cron enabled flag
|
||||
function set_cron_enabled($cron, $cron_enabled) {
|
||||
$data = array (
|
||||
'enabled' => ($cron_enabled === 'true' ? 1 : 0),
|
||||
@@ -69,6 +76,7 @@ class Cron_model extends CI_Model
|
||||
$this->set_modified($cron);
|
||||
}
|
||||
|
||||
// set the edited details for a cron
|
||||
function edit_cron($id, $description, $expression, $enabled) {
|
||||
|
||||
$data = array (
|
||||
|
||||
@@ -106,6 +106,7 @@ if($this->session->userdata('user_id') != null) {
|
||||
<script src="<?php echo base_url() ;?>assets/js/sections/oqrs.js"></script>
|
||||
<?php } ?>
|
||||
|
||||
<!-- JS library to convert cron format to human readable -->
|
||||
<?php if ($this->uri->segment(1) == "cron") { ?>
|
||||
<script src="<?php echo base_url() ;?>assets/js/cronstrue.min.js"async></script>
|
||||
<?php } ?>
|
||||
|
||||
Reference in New Issue
Block a user