? final_issues.patch ? new.patch Index: comment.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/project_issue/comment.inc,v retrieving revision 1.141 diff -u -p -r1.141 comment.inc --- comment.inc 29 Jan 2009 22:01:31 -0000 1.141 +++ comment.inc 30 Jan 2009 06:51:53 -0000 @@ -10,16 +10,15 @@ function project_issue_comment(&$arg, $o $nid = is_array($arg['nid']) ? $arg['nid']['#value'] : $arg['nid']; } $node = node_load($nid); + if ($node->type != 'project_issue') { + return; + } // Make a copy here so we have all the original metadata, since some // of it can change below. $original_node = drupal_clone($node); $old_data = (object) $original_node->project_issue; $old_data->title = $original_node->title; - if ($node->type != 'project_issue') { - return; - } - switch ($op) { case 'insert': // Get a lock on the issue in order to generate the next comment ID. @@ -98,7 +97,7 @@ function project_issue_comment(&$arg, $o * @param $form_state * Current form state. */ -function _project_issue_form_comment_form_alter(&$form, &$form_state) { +function project_issue_form_comment_form_alter(&$form, &$form_state) { $nid = $form['nid']['#value']; $node = node_load($nid); @@ -228,13 +227,6 @@ function _project_issue_form_comment_for $form['original_issue']['issue_info'] = $form['issue_info']; unset($form['project_info'], $form['issue_info']); unset($form['issue_details'], $form['project_help']); - - // Make sure the 'File attachments' fieldset is expanded and before the - // original issue fieldset. - if (isset($form['attachments'])) { - $form['attachments']['#collapsed'] = FALSE; - $form['attachments']['#weight'] = 2; - } } /** Index: issue.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/project_issue/issue.inc,v retrieving revision 1.335 diff -u -p -r1.335 issue.inc --- issue.inc 29 Jan 2009 22:01:31 -0000 1.335 +++ issue.inc 30 Jan 2009 06:51:54 -0000 @@ -781,7 +781,7 @@ function project_issue_view($node, $teas 'label' => t('Project'), 'current' => $project->title, ); - if ($release->project_release['version']) { + if (!empty($release->project_release['version'])) { $current_data['rid'] = array( 'label' => t('Version'), 'current' => $release->project_release['version'], Index: project_issue.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/project_issue/project_issue.module,v retrieving revision 1.118 diff -u -p -r1.118 project_issue.module --- project_issue.module 30 Jan 2009 01:20:36 -0000 1.118 +++ project_issue.module 30 Jan 2009 06:51:54 -0000 @@ -334,12 +334,14 @@ function project_issue_form_alter(&$form } break; + // see also: project_issue_form_comment_form_alter case 'comment_form': - // Using a form-specific hook here causes some of the altering - // code to be run before we have all the form elements we need. - // So here we break out this code into a separate function for - // clarity but leave it in the general hook_form_alter(). - _project_issue_form_comment_form_alter($form, $form_state); + // Make sure the 'File attachments' fieldset is expanded and before the + // original issue fieldset. + if (isset($form['attachments'])) { + $form['attachments']['#collapsed'] = FALSE; + $form['attachments']['#weight'] = 2; + } break; case 'comment_confirm_delete':