Follow up changes relating to adding in new show repeat options
This commit is contained in:
parent
6da9b6bf42
commit
f7f2cdc51c
|
@ -18,8 +18,8 @@ class Application_Form_AddShowRepeats extends Zend_Form_SubForm
|
|||
'multiOptions' => array(
|
||||
"0" => _("weekly"),
|
||||
"1" => _("every 2 weeks"),
|
||||
"3" => _("every 3 weeks"),
|
||||
"4" => _("every 4 weeks"),
|
||||
"4" => _("every 3 weeks"),
|
||||
"5" => _("every 4 weeks"),
|
||||
"2" => _("monthly")
|
||||
),
|
||||
));
|
||||
|
|
|
@ -188,6 +188,10 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
|
|||
$interval = 'P7D';
|
||||
} elseif ($formData["add_show_repeat_type"] == 1) {
|
||||
$interval = 'P14D';
|
||||
} elseif ($formData["add_show_repeat_type"] == 4) {
|
||||
$interval = 'P21D';
|
||||
} elseif ($formData["add_show_repeat_type"] == 5) {
|
||||
$interval = 'P28D';
|
||||
} elseif ($formData["add_show_repeat_type"] == 2) {
|
||||
$interval = 'P1M';
|
||||
}
|
||||
|
|
|
@ -206,11 +206,11 @@ class Application_Service_ShowService
|
|||
new DateInterval("P14D"), $daysAdded);
|
||||
break;
|
||||
case REPEAT_TRI_WEEKLY:
|
||||
$this->createWeeklyRepeatInstances($day, $populateUntil, REPEAT_BI_WEEKLY,
|
||||
$this->createWeeklyRepeatInstances($day, $populateUntil, REPEAT_TRI_WEEKLY,
|
||||
new DateInterval("P21D"), $daysAdded);
|
||||
break;
|
||||
case REPEAT_QUAD_WEEKLY:
|
||||
$this->createWeeklyRepeatInstances($day, $populateUntil, REPEAT_BI_WEEKLY,
|
||||
$this->createWeeklyRepeatInstances($day, $populateUntil, REPEAT_QUAD_WEEKLY,
|
||||
new DateInterval("P28D"), $daysAdded);
|
||||
break;
|
||||
case REPEAT_MONTHLY_MONTHLY:
|
||||
|
@ -343,7 +343,7 @@ SQL;
|
|||
|
||||
//if the start date changes, these are the repeat types
|
||||
//that require show instance deletion
|
||||
$deleteRepeatTypes = array(REPEAT_BI_WEEKLY, REPEAT_MONTHLY_MONTHLY,
|
||||
$deleteRepeatTypes = array(REPEAT_BI_WEEKLY, REPEAT_TRI_WEEKLY, REPEAT_QUAD_WEEKLY, REPEAT_MONTHLY_MONTHLY,
|
||||
REPEAT_MONTHLY_WEEKLY);
|
||||
|
||||
if (in_array($this->repeatType, $deleteRepeatTypes) &&
|
||||
|
|
Loading…
Reference in New Issue