mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-07-15 08:58:10 +00:00
add method remove(), add optional parameter to getParameter()
This commit is contained in:
parent
204387237f
commit
92bf2e1d69
|
@ -248,7 +248,9 @@ class SeedDMS_SchedulerTask {
|
||||||
return true;
|
return true;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
public function getParameter() {
|
public function getParameter($name = '') {
|
||||||
|
if($name)
|
||||||
|
return isset($this->_params[$name]) ? $this->_params[$name] : null;
|
||||||
return $this->_params;
|
return $this->_params;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -275,4 +277,21 @@ class SeedDMS_SchedulerTask {
|
||||||
$this->_lastrun = $lastrun;
|
$this->_lastrun = $lastrun;
|
||||||
$this->_nextrun = $nextrun;
|
$this->_nextrun = $nextrun;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete task
|
||||||
|
*
|
||||||
|
* @return boolean true on success or false in case of an error
|
||||||
|
*/
|
||||||
|
function remove() { /* {{{ */
|
||||||
|
$db = $this->db;
|
||||||
|
|
||||||
|
$queryStr = "DELETE FROM `tblSchedulerTask` WHERE `id` = " . $this->_id;
|
||||||
|
if (!$db->getResult($queryStr)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
} /* }}} */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user