Fully decoupled import code from the rest of the app.
[timetracker.git] / task_add.php
index b1ad08a..1fdc7b1 100644 (file)
@@ -68,8 +68,6 @@ if ($request->isPost()) {
   if ($err->no()) {
     if (!ttTaskHelper::getTaskByName($cl_name)) {
       if (ttTaskHelper::insert(array(
-        'group_id' => $user->getGroup(),
-        'org_id' => $user->org_id,
         'name' => $cl_name,
         'description' => $cl_description,
         'status' => ACTIVE,
@@ -84,6 +82,7 @@ if ($request->isPost()) {
 } // isPost
 
 $smarty->assign('forms', array($form->getName()=>$form->toArray()));
+$smarty->assign('show_projects', count($projects) > 0);
 $smarty->assign('onload', 'onLoad="document.taskForm.name.focus()"');
 $smarty->assign('title', $i18n->get('title.add_task'));
 $smarty->assign('content_page_name', 'task_add.tpl');