$params = array(␊ |
'project' => $prj,␊ |
'user' => $request->user);␊ |
$preview = (isset($request->POST['preview'])) ?␊ |
$request->POST['content'] : false;␊ |
if ($request->method == 'POST') {␊ |
$form = new IDF_Form_IssueCreate(array_merge($request->POST,␊ |
$request->FILES),␊ |
$params);␊ |
if ($form->isValid()) {␊ |
if (!isset($request->POST['preview']) and $form->isValid()) {␊ |
$issue = $form->save();␊ |
$url = Pluf_HTTP_URL_urlForView('IDF_Views_Issue::index',␊ |
array($prj->shortname));␊ |
|
array('project' => $prj,␊ |
'form' => $form,␊ |
'page_title' => $title,␊ |
'preview' => $preview,␊ |
),␊ |
self::autoCompleteArrays($prj)␊ |
);␊ |
|
$starred = false;␊ |
$closed = in_array($issue->status, $prj->getTagIdsByStatus('closed'));␊ |
$interested = $issue->get_interested_list();␊ |
$preview = (isset($request->POST['preview'])) ?␊ |
$request->POST['content'] : false;␊ |
if (!$request->user->isAnonymous()) {␊ |
$starred = Pluf_Model_InArray($request->user, $issue->get_interested_list());␊ |
$params = array(␊ |
|
$form = new IDF_Form_IssueUpdate(array_merge($request->POST, ␊ |
$request->FILES),␊ |
$params);␊ |
if ($form->isValid()) {␊ |
if (!isset($request->POST['preview']) && $form->isValid()) {␊ |
$issue = $form->save();␊ |
$url = Pluf_HTTP_URL_urlForView('IDF_Views_Issue::index',␊ |
array($prj->shortname));␊ |
|
'starred' => $starred,␊ |
'page_title' => $title,␊ |
'closed' => $closed,␊ |
'preview' => $preview,␊ |
'interested' =>$interested->count(),␊ |
),␊ |
$arrays),␊ |