projects
/
timetracker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removed unneeded cycle.
[timetracker.git]
/
time.php
diff --git
a/time.php
b/time.php
index
33b5763
..
768a809
100644
(file)
--- a/
time.php
+++ b/
time.php
@@
-66,13
+66,13
@@
if ($user->isPluginEnabled('cf')) {
if ($user->isPluginEnabled('mq')){
require_once('plugins/MonthlyQuota.class.php');
$quota = new MonthlyQuota();
if ($user->isPluginEnabled('mq')){
require_once('plugins/MonthlyQuota.class.php');
$quota = new MonthlyQuota();
- $month
lyQ
uota = $quota->get($selected_date->mYear, $selected_date->mMonth);
+ $month
_q
uota = $quota->get($selected_date->mYear, $selected_date->mMonth);
$month_total = ttTimeHelper::getTimeForMonth($user->getActiveUser(), $selected_date);
$month_total = ttTimeHelper::getTimeForMonth($user->getActiveUser(), $selected_date);
- $minutes
Left = ttTimeHelper::toMinutes($monthlyQ
uota) - ttTimeHelper::toMinutes($month_total);
+ $minutes
_left = ttTimeHelper::toMinutes($month_q
uota) - ttTimeHelper::toMinutes($month_total);
$smarty->assign('month_total', $month_total);
$smarty->assign('month_total', $month_total);
- $smarty->assign('over_quota', $minutes
L
eft < 0);
- $smarty->assign('
month_left', ttTimeHelper::fromMinutes($minutesL
eft));
+ $smarty->assign('over_quota', $minutes
_l
eft < 0);
+ $smarty->assign('
quota_remaining', ttTimeHelper::toAbsDuration($minutes_l
eft));
}
// Initialize variables.
}
// Initialize variables.
@@
-232,10
+232,8
@@
if ($request->isPost()) {
if (MODE_PROJECTS_AND_TASKS == $user->tracking_mode) {
if (!$cl_task) $err->add($i18n->getKey('error.task'));
}
if (MODE_PROJECTS_AND_TASKS == $user->tracking_mode) {
if (!$cl_task) $err->add($i18n->getKey('error.task'));
}
- if (!$cl_duration) {
- if ('0' == $cl_duration)
- $err->add($i18n->getKey('error.field'), $i18n->getKey('label.duration'));
- elseif ($cl_start || $cl_finish) {
+ if (strlen($cl_duration) == 0) {
+ if ($cl_start || $cl_finish) {
if (!ttTimeHelper::isValidTime($cl_start))
$err->add($i18n->getKey('error.field'), $i18n->getKey('label.start'));
if ($cl_finish) {
if (!ttTimeHelper::isValidTime($cl_start))
$err->add($i18n->getKey('error.field'), $i18n->getKey('label.start'));
if ($cl_finish) {