projects
/
timetracker.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removed debug tracing from time.php to keep it simple.
[timetracker.git]
/
predefined_expenses.php
diff --git
a/predefined_expenses.php
b/predefined_expenses.php
index
4e79912
..
e1c14d8
100644
(file)
--- a/
predefined_expenses.php
+++ b/
predefined_expenses.php
@@
-28,13
+28,18
@@
require_once('initialize.php');
import('form.Form');
require_once('initialize.php');
import('form.Form');
-import('tt
Team
Helper');
+import('tt
Group
Helper');
-// Access check.
-if (!ttAccessAllowed('manage_advanced_settings')
|| !$user->isPluginEnabled('ex')
) {
+// Access check
s
.
+if (!ttAccessAllowed('manage_advanced_settings')) {
header('Location: access_denied.php');
exit();
}
header('Location: access_denied.php');
exit();
}
+if (!$user->isPluginEnabled('ex')) {
+ header('Location: feature_disabled.php');
+ exit();
+}
+// End of access checks.
$form = new Form('predefinedExpensesForm');
$form = new Form('predefinedExpensesForm');
@@
-46,7
+51,7
@@
if ($request->isPost()) {
}
} else {
$form->addInput(array('type'=>'submit','name'=>'btn_add','value'=>$i18n->get('button.add')));
}
} else {
$form->addInput(array('type'=>'submit','name'=>'btn_add','value'=>$i18n->get('button.add')));
- $predefinedExpenses = tt
TeamHelper::getPredefinedExpenses($user->team_id
);
+ $predefinedExpenses = tt
GroupHelper::getPredefinedExpenses(
);
}
$smarty->assign('forms', array($form->getName()=>$form->toArray()));
}
$smarty->assign('forms', array($form->getName()=>$form->toArray()));