X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/098a79f0819ebb89b7d48df4a6b154af4560f68e..62da0ed23af9ae74faf8d103bc3ce025c56b673e:/project_add.php diff --git a/project_add.php b/project_add.php index 2bdb77bb..d799044c 100644 --- a/project_add.php +++ b/project_add.php @@ -69,9 +69,9 @@ if ($request->getMethod() == 'POST') { // Validate user input. if (!ttValidString($cl_name)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('label.thing_name')); if (!ttValidString($cl_description, true)) $errors->add($i18n->getKey('error.field'), $i18n->getKey('label.description')); - + if ($errors->isEmpty()) { - if (!ttProjectHelper::getProjectByName($cl_name)) { + if (!ttProjectHelper::getProjectByName($cl_name)) { if (ttProjectHelper::insert(array( 'team_id' => $user->team_id, 'name' => $cl_name, @@ -86,11 +86,10 @@ if ($request->getMethod() == 'POST') { } else $errors->add($i18n->getKey('error.project_exists')); } -} // post +} // POST $smarty->assign('forms', array($form->getName()=>$form->toArray())); $smarty->assign('onload', 'onLoad="document.projectForm.project_name.focus()"'); $smarty->assign('title', $i18n->getKey('title.add_project')); $smarty->assign('content_page_name', 'project_add.tpl'); $smarty->display('index.tpl'); -?> \ No newline at end of file