diff options
-rw-r--r-- | app/Model/Task.php | 42 | ||||
-rwxr-xr-x | app/Model/TaskDuplication.php | 10 | ||||
-rw-r--r-- | app/Subscriber/RecurringTaskSubscriber.php | 8 | ||||
-rw-r--r-- | app/Template/board/task_footer.php | 4 | ||||
-rw-r--r-- | app/Template/task/details.php | 2 | ||||
-rw-r--r-- | app/Template/task/edit_recurrence.php | 4 | ||||
-rw-r--r-- | app/Template/task/recurring_info.php | 4 |
7 files changed, 37 insertions, 37 deletions
diff --git a/app/Model/Task.php b/app/Model/Task.php index 02469047..abd787ad 100644 --- a/app/Model/Task.php +++ b/app/Model/Task.php @@ -46,35 +46,35 @@ class Task extends Base * * @var integer */ - const RECURE_STATUS_NONE = 0; - const RECURE_STATUS_PENDING = 1; - const RECURE_STATUS_PROCESSED = 2; + const RECURRING_STATUS_NONE = 0; + const RECURRING_STATUS_PENDING = 1; + const RECURRING_STATUS_PROCESSED = 2; /** * Recurrence: trigger * * @var integer */ - const RECURE_TRIGGER_FIRST = 0; - const RECURE_TRIGGER_LAST = 1; - const RECURE_TRIGGER_CLOSE = 2; + const RECURRING_TRIGGER_FIRST_COLUMN = 0; + const RECURRING_TRIGGER_LAST_COLUMN = 1; + const RECURRING_TRIGGER_CLOSE = 2; /** * Recurrence: timeframe * * @var integer */ - const RECURE_DAYS = 0; - const RECURE_MONTHS = 1; - const RECURE_YEARS = 2; + const RECURRING_TIMEFRAME_DAYS = 0; + const RECURRING_TIMEFRAME_MONTHS = 1; + const RECURRING_TIMEFRAME_YEARS = 2; /** * Recurrence: base date used to calculate new due date * * @var integer */ - const RECURE_BASEDATE_DUEDATE = 0; - const RECURE_BASEDATE_TRIGGERDATE = 1; + const RECURRING_BASEDATE_DUEDATE = 0; + const RECURRING_BASEDATE_TRIGGERDATE = 1; /** * Remove a task @@ -121,8 +121,8 @@ class Task extends Base public function getRecurrenceStatusList() { return array ( - Task::RECURE_STATUS_NONE => t('No'), - Task::RECURE_STATUS_PENDING => t('Yes'), + Task::RECURRING_STATUS_NONE => t('No'), + Task::RECURRING_STATUS_PENDING => t('Yes'), ); } @@ -135,9 +135,9 @@ class Task extends Base public function getRecurrenceTriggerList() { return array ( - Task::RECURE_TRIGGER_FIRST => t('When task is moved from first column'), - Task::RECURE_TRIGGER_LAST => t('When task is moved to last column'), - Task::RECURE_TRIGGER_CLOSE => t('When task is closed'), + Task::RECURRING_TRIGGER_FIRST_COLUMN => t('When task is moved from first column'), + Task::RECURRING_TRIGGER_LAST_COLUMN => t('When task is moved to last column'), + Task::RECURRING_TRIGGER_CLOSE => t('When task is closed'), ); } @@ -150,8 +150,8 @@ class Task extends Base public function getRecurrenceBasedateList() { return array ( - Task::RECURE_BASEDATE_DUEDATE => t('Existing due date'), - Task::RECURE_BASEDATE_TRIGGERDATE => t('Action date'), + Task::RECURRING_BASEDATE_DUEDATE => t('Existing due date'), + Task::RECURRING_BASEDATE_TRIGGERDATE => t('Action date'), ); } @@ -164,9 +164,9 @@ class Task extends Base public function getRecurrenceTimeframeList() { return array ( - Task::RECURE_DAYS => t('Day(s)'), - Task::RECURE_MONTHS => t('Month(s)'), - Task::RECURE_YEARS => t('Year(s)'), + Task::RECURRING_TIMEFRAME_DAYS => t('Day(s)'), + Task::RECURRING_TIMEFRAME_MONTHS => t('Month(s)'), + Task::RECURRING_TIMEFRAME_YEARS => t('Year(s)'), ); } } diff --git a/app/Model/TaskDuplication.php b/app/Model/TaskDuplication.php index 7f9308d2..42777335 100755 --- a/app/Model/TaskDuplication.php +++ b/app/Model/TaskDuplication.php @@ -62,7 +62,7 @@ class TaskDuplication extends Base { $values = $this->copyFields($task_id); - if ($values['recurrence_status'] == Task::RECURE_STATUS_PENDING) { + if ($values['recurrence_status'] == Task::RECURRING_STATUS_PENDING) { $values['recurrence_parent'] = $task_id; $values['column_id'] = $this->board->getFirstColumn($values['project_id']); @@ -76,7 +76,7 @@ class TaskDuplication extends Base ->table(Task::TABLE) ->eq('id', $task_id) ->update(array( - 'recurrence_status' => Task::RECURE_STATUS_PROCESSED, + 'recurrence_status' => Task::RECURRING_STATUS_PROCESSED, 'recurrence_child' => $recurring_task_id, )); @@ -181,7 +181,7 @@ class TaskDuplication extends Base { if (! empty($values['date_due']) && $values['recurrence_factor'] != 0) { - if ($values['recurrence_basedate'] == Task::RECURE_BASEDATE_TRIGGERDATE) { + if ($values['recurrence_basedate'] == Task::RECURRING_BASEDATE_TRIGGERDATE) { $values['date_due'] = time(); } @@ -189,10 +189,10 @@ class TaskDuplication extends Base $subtract = $values['recurrence_factor'] < 0; switch ($values['recurrence_timeframe']) { - case Task::RECURE_MONTHS: + case Task::RECURRING_TIMEFRAME_MONTHS: $interval = 'P' . $factor . 'M'; break; - case Task::RECURE_YEARS: + case Task::RECURRING_TIMEFRAME_YEARS: $interval = 'P' . $factor . 'Y'; break; default: diff --git a/app/Subscriber/RecurringTaskSubscriber.php b/app/Subscriber/RecurringTaskSubscriber.php index 57812fba..87418814 100644 --- a/app/Subscriber/RecurringTaskSubscriber.php +++ b/app/Subscriber/RecurringTaskSubscriber.php @@ -18,12 +18,12 @@ class RecurringTaskSubscriber extends Base implements EventSubscriberInterface public function onMove(TaskEvent $event) { - if ($event['recurrence_status'] == Task::RECURE_STATUS_PENDING) { + if ($event['recurrence_status'] == Task::RECURRING_STATUS_PENDING) { - if ($event['recurrence_trigger'] == Task::RECURE_TRIGGER_FIRST && $this->board->getFirstColumn($event['project_id']) == $event['src_column_id']) { + if ($event['recurrence_trigger'] == Task::RECURRING_TRIGGER_FIRST_COLUMN && $this->board->getFirstColumn($event['project_id']) == $event['src_column_id']) { $this->taskDuplication->duplicateRecurringTask($event['task_id']); } - else if ($event['recurrence_trigger'] == Task::RECURE_TRIGGER_LAST && $this->board->getLastColumn($event['project_id']) == $event['dst_column_id']) { + else if ($event['recurrence_trigger'] == Task::RECURRING_TRIGGER_LAST_COLUMN && $this->board->getLastColumn($event['project_id']) == $event['dst_column_id']) { $this->taskDuplication->duplicateRecurringTask($event['task_id']); } } @@ -31,7 +31,7 @@ class RecurringTaskSubscriber extends Base implements EventSubscriberInterface public function onClose(TaskEvent $event) { - if ($event['recurrence_status'] == Task::RECURE_STATUS_PENDING && $event['recurrence_trigger'] == Task::RECURE_TRIGGER_CLOSE) { + if ($event['recurrence_status'] == Task::RECURRING_STATUS_PENDING && $event['recurrence_trigger'] == Task::RECURRING_TRIGGER_CLOSE) { $this->taskDuplication->duplicateRecurringTask($event['task_id']); } } diff --git a/app/Template/board/task_footer.php b/app/Template/board/task_footer.php index b8868f52..0ea0f5fa 100644 --- a/app/Template/board/task_footer.php +++ b/app/Template/board/task_footer.php @@ -25,11 +25,11 @@ </span> <?php endif ?> - <?php if ($task['recurrence_status'] == \Model\Task::RECURE_STATUS_PENDING): ?> + <?php if ($task['recurrence_status'] == \Model\Task::RECURRING_STATUS_PENDING): ?> <span title="<?= t('Recurrence') ?>" class="task-board-tooltip" data-href="<?= $this->u('board', 'recurrence', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><i class="fa fa-refresh fa-rotate-90"></i></span> <?php endif ?> - <?php if ($task['recurrence_status'] == \Model\Task::RECURE_STATUS_PROCESSED): ?> + <?php if ($task['recurrence_status'] == \Model\Task::RECURRING_STATUS_PROCESSED): ?> <span title="<?= t('Recurrence') ?>" class="task-board-tooltip" data-href="<?= $this->u('board', 'recurrence', array('task_id' => $task['id'], 'project_id' => $task['project_id'])) ?>"><i class="fa fa-refresh fa-rotate-90 fa-inverse"></i></span> <?php endif ?> diff --git a/app/Template/task/details.php b/app/Template/task/details.php index 32f0fbb8..c70945bc 100644 --- a/app/Template/task/details.php +++ b/app/Template/task/details.php @@ -81,7 +81,7 @@ </li> <?php endif ?> - <?php if (! isset($not_editable) && $task['recurrence_status'] != \Model\Task::RECURE_STATUS_NONE): ?> + <?php if (! isset($not_editable) && $task['recurrence_status'] != \Model\Task::RECURRING_STATUS_NONE): ?> <li> <strong><?= t('Recurring information') ?></strong> <?= $this->render('task/recurring_info', array( diff --git a/app/Template/task/edit_recurrence.php b/app/Template/task/edit_recurrence.php index 7a65173c..76894bd4 100644 --- a/app/Template/task/edit_recurrence.php +++ b/app/Template/task/edit_recurrence.php @@ -2,7 +2,7 @@ <h2><?= t('Edit recurrence') ?></h2> </div> -<?php if ($task['recurrence_status'] != \Model\Task::RECURE_STATUS_NONE): ?> +<?php if ($task['recurrence_status'] != \Model\Task::RECURRING_STATUS_NONE): ?> <div class="listing"> <?= $this->render('task/recurring_info', array( 'task' => $task, @@ -13,7 +13,7 @@ </div> <?php endif ?> -<?php if ($task['recurrence_status'] != \Model\Task::RECURE_STATUS_PROCESSED): ?> +<?php if ($task['recurrence_status'] != \Model\Task::RECURRING_STATUS_PROCESSED): ?> <form method="post" action="<?= $this->u('task', 'recurrence', array('task_id' => $task['id'], 'project_id' => $task['project_id'], 'ajax' => $ajax)) ?>" autocomplete="off"> diff --git a/app/Template/task/recurring_info.php b/app/Template/task/recurring_info.php index 1009a970..2a283337 100644 --- a/app/Template/task/recurring_info.php +++ b/app/Template/task/recurring_info.php @@ -1,7 +1,7 @@ <ul> - <?php if ($task['recurrence_status'] == \Model\Task::RECURE_STATUS_PENDING): ?> + <?php if ($task['recurrence_status'] == \Model\Task::RECURRING_STATUS_PENDING): ?> <li><?= t('Recurrent task is scheduled to be generated') ?></li> - <?php elseif ($task['recurrence_status'] == \Model\Task::RECURE_STATUS_PROCESSED): ?> + <?php elseif ($task['recurrence_status'] == \Model\Task::RECURRING_STATUS_PROCESSED): ?> <li><?= t('Recurrent task has been generated') ?> <ul> <li> |