show cancelling available (needed for repeating shows)
This commit is contained in:
parent
9a7dda49fe
commit
a83a4b6bae
5 changed files with 61 additions and 28 deletions
|
@ -49,6 +49,21 @@ class Show {
|
|||
$show->setDbBackgroundColor($backgroundColor);
|
||||
}
|
||||
|
||||
public function cancelShow($day_timestamp) {
|
||||
global $CC_DBC;
|
||||
|
||||
$timeinfo = explode(" ", $day_timestamp);
|
||||
|
||||
CcShowDaysQuery::create()
|
||||
->filterByDbShowId($this->_showId)
|
||||
->update(array('DbLastShow' => $timeinfo[0]));
|
||||
|
||||
$sql = "DELETE FROM cc_show_instances
|
||||
WHERE starts >= '{$day_timestamp}' AND show_id = {$this->_showId}";
|
||||
|
||||
$CC_DBC->query($sql);
|
||||
}
|
||||
|
||||
//end dates are non inclusive.
|
||||
public static function addShow($data) {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue