cvs diff: Diffing modules/project_issue Index: modules/project_issue/comment.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/project_issue/comment.inc,v retrieving revision 1.72 diff -u -p -r1.72 comment.inc --- modules/project_issue/comment.inc 18 Dec 2006 09:11:08 -0000 1.72 +++ modules/project_issue/comment.inc 20 Dec 2006 06:32:08 -0000 @@ -5,7 +5,7 @@ function project_comment_page() { if (user_access('create project issues')) { - $edit = (object) $_POST['edit']; + $edit = (object)$_POST; $node = node_load(array('nid' => arg(3), 'type' => 'project_issue')); if ($_POST['op'] == t('Preview') || $_POST['op'] == t('Submit')) { @@ -91,7 +91,6 @@ function project_comment_validate(&$edit function project_comment_view($node, $main = 0) { global $user; - $links = array(); $rows = array(); $result = db_query('SELECT p.*, u.name FROM {project_comments} p INNER JOIN {users} u USING (uid) WHERE p.nid = %d ORDER BY p.created ASC', $node->nid); if (db_num_rows($result)) { Index: modules/project_issue/issue.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/project_issue/issue.inc,v retrieving revision 1.202 diff -u -p -r1.202 issue.inc --- modules/project_issue/issue.inc 20 Dec 2006 01:27:30 -0000 1.202 +++ modules/project_issue/issue.inc 20 Dec 2006 06:32:10 -0000 @@ -93,11 +93,11 @@ function project_issue_build_form_url($u } } - // dispatch to hanlders based on value of $_POST['edit']['form_id'] - if ($_POST['edit']['form_id'] == 'project_issue_query_result_quick_search') { + // dispatch to hanlders based on value of $_POST['form_id'] + if ($_POST['form_id'] == 'project_issue_query_result_quick_search') { return project_issue_quick_search($url_arg, $filters); } - else if ($_POST['edit']['form_id'] == 'project_issue_query') { + else if ($_POST['form_id'] == 'project_issue_query') { return project_issue_advanced_search($url_arg, $adv_filters); } } @@ -115,13 +115,13 @@ function project_issue_quick_search($url // My issues query, so stay on the same page $destination = 'project/issues/user'; } - elseif ($_POST['edit']['projects'] == 0 || strpos($_POST['edit']['projects'], ',') !== FALSE) { + elseif ($_POST['projects'] == 0 || strpos($_POST['projects'], ',') !== FALSE) { // search is for all/multiple projects, so just send to project/issues $destination = 'project/issues'; } else { // try to find the project, and 404 if not found - if (!$project = project_project_retrieve($_POST['edit']['projects'])) { + if (!$project = project_project_retrieve($_POST['projects'])) { drupal_not_found(); exit; } @@ -131,10 +131,10 @@ function project_issue_quick_search($url // if 'q' is the only thing in $_GET, and it == destination, don't redirect if (count($_GET) == 1 && isset($_GET['q']) && $_GET['q'] == $destination) { - // put $_POST['edit'] where pager will see them + // put $_POST where pager will see them foreach ($filters as $filter) { - if (!empty($_POST['edit'][$filter])) { - $_REQUEST[$filter] = $_POST['edit'][$filter]; + if (!empty($_POST[$filter])) { + $_REQUEST[$filter] = $_POST[$filter]; } } @@ -146,8 +146,8 @@ function project_issue_quick_search($url // redirecting, so put filters in session foreach ($filters as $filter) { - if (!empty($_POST['edit'][$filter])) { - $issue_filters[$filter] = $_POST['edit'][$filter]; + if (!empty($_POST[$filter])) { + $issue_filters[$filter] = $_POST[$filter]; } } drupal_goto($destination, drupal_query_string_encode($issue_filters)); @@ -159,20 +159,20 @@ function project_issue_quick_search($url function project_issue_advanced_search($url_arg, $filters) { // Figure out what issue filters are in place for the query we're showing foreach ($filters as $filter) { - if (!empty($_POST['edit'][$filter])) { - if (is_array($_POST['edit'][$filter])) { - $issue_filters[$filter] = implode(',', $_POST['edit'][$filter]); + if (!empty($_POST[$filter])) { + if (is_array($_POST[$filter])) { + $issue_filters[$filter] = implode(',', $_POST[$filter]); } else { - $issue_filters[$filter] = $_POST['edit'][$filter]; + $issue_filters[$filter] = $_POST[$filter]; } } } // do we have just one project to search for? - if (isset($_POST['edit']['projects']) && count($_POST['edit']['projects']) == 1) { + if (isset($_POST['projects']) && count($_POST['projects']) == 1) { // try to find the project, and 404 if not found - if (!$project = project_project_retrieve($_POST['edit']['projects'][0])) { + if (!$project = project_project_retrieve($_POST['projects'][0])) { drupal_not_found(); exit; } @@ -208,7 +208,7 @@ function project_issue_statistics($proje $filter = sprintf(' AND p.pid = %d ', db_escape_string($project->nid)); } - $output = '
'; + $output = '
'; // Issue lifetime $header = array(t('Category'), t('Overall'), t('Last month')); @@ -415,7 +415,7 @@ function theme_project_issue_subscribe($ /** * Implementation of hook_form(). */ -function project_issue_form(&$node, &$param) { +function project_issue_form($node, $param) { global $user; $default_state = variable_get('project_issue_default_state', 1); @@ -427,10 +427,10 @@ function project_issue_form(&$node, &$pa $form['page'] = array( '#type' => 'hidden', - '#value' => isset($_POST['edit']['page']) ? $_POST['edit']['page'] : 1, + '#value' => isset($_POST['page']) ? $_POST['page'] : 1, ); - $form['#prefix'] = '
'; + $form['#prefix'] = '
'; $form['#suffix'] = '
'; // Fetch a list of all projects to make swapping simpler @@ -446,7 +446,7 @@ function project_issue_form(&$node, &$pa $node->pid = db_result(db_query(db_rewrite_sql("SELECT p.nid FROM {project_projects} p WHERE p.uri = '%s'", 'p'), $arg), 0); } } - $pid = $node->pid ? $node->pid : $_POST['edit']['pid']; + $pid = $node->pid ? $node->pid : $_POST['pid']; if ($pid) { // Load the project and initialize some support arrays. $project = node_load(array('nid' => $pid, 'type' => 'project_project')); @@ -603,7 +603,7 @@ function project_issue_form_pre_render($ // have a value for 'Project' (via a submit with project in the // URL), we'll already be on page 2 of the form and must increment // our page or we'll display the wrong buttons. - if (!form_get_errors() && $form['page']['#value'] < 2 && (isset($_POST['edit']['page']) || isset($form['project_info']['pid']['#value']))) { + if (!form_get_errors() && $form['page']['#value'] < 2 && (isset($_POST['page']) || isset($form['project_info']['pid']['#value']))) { $form['page']['#value'] = $form['page']['#value'] + 1; } @@ -664,7 +664,7 @@ function _project_issue_form_add_require function project_issue_node_form_validate($form_id, $form) { global $form_values; - $edit = $_POST['edit']; + $edit = $_POST; if (!$form_values['pid']) { form_set_error('pid', t('You have to specify a valid project.')); @@ -762,7 +762,7 @@ function project_issue_comment_validate( return $node; } -function project_issue_view(&$node, $teaser = false, $page = false) { +function project_issue_view($node, $teaser = false, $page = false) { $node = node_prepare($node, $teaser); if (!$teaser && $page) { @@ -771,7 +771,7 @@ function project_issue_view(&$node, $tea $release = project_release_load($release); $assigned = ($node->assigned && ($account = user_load(array('uid' => $node->assigned))) ? $account->name : t('Unassigned')); - $output = '
'; + $output = '
'; $rows = array(); $rows[] = array('Project:', check_plain($project->title)); if ($release->version) { @@ -1088,7 +1088,7 @@ function theme_project_issue_query($form array('data' => drupal_render($form['submit']), 'colspan' => 3) ); - $output = '
'; + $output = '
'; $output .= theme('table', array(), $rows); $output .= '
'; $output .= drupal_render($form); @@ -1189,7 +1189,7 @@ function project_issue_admin_states_page function project_issue_admin_save_states() { // Check for and apply changes or additions to project issue status options. - $edit = $_POST['edit']; + $edit = $_POST; if (isset($edit['default_state'])) { variable_set('project_issue_default_state', $edit['default_state']); } @@ -1284,18 +1284,37 @@ function project_issue_query_result($que } if ($project) { - drupal_set_title(t('issues for %name', array('%name' => theme('placeholder', $project->title)))); + drupal_set_title(t('issues for %name', array('%name' => $project->title))); $releases = project_release_get_releases($project, 0); $query->projects = $project->nid; $links = array(); if (user_access('create project issues')) { - $links[] = l(t('submit'), "node/add/project_issue/$project->uri", array('title' => t('Submit a new issue for %project.', array('%project' => check_plain($project->uri))))); + $links[] = array( + 'title' => t('Submit'), + 'href' => "node/add/project_issue/$project->uri", + 'attributes' => array('title' => t('Submit a new issue for @project.', array('@project' => $project->uri))), + ); } - $links[] = l(t('statistics'), "project/issues/statistics/$project->uri", array('title' => t('See statistics about %project issues.', array('%project' => check_plain($project->uri))))); + $links[] = array( + 'title' => t('Statistics'), + 'href' => "project/issues/statistics/$project->uri", + 'attributes' => array('title' => t('See statistics about @project issues.', array('@project' => $project->uri))), + ); if ($user->uid) { - $links[] = l(t('subscribe'), "project/issues/subscribe/$project->uri", array('title' => t('Receive email updates about issues for %project.', array('%project' => check_plain($project->uri))))); + $links[] = array( + 'title' => t('Subscribe'), + 'href' => "project/issues/subscribe/$project->uri", + 'attributes' => array('title' => t('Receive email updates about @project issues.', array('@project' => $project->uri))), + ); + } + $links[] = array( + 'title' => t('Advanced search'), + 'href' => "project/issues/search/$project->uri", + 'attributes' => array('title' => t('Use the advanced search page to find %project issues.', array('@project' => $project->uri))), + ); + if (user_access('create project issues')) { + } - $links[] = l(t('advanced search'), "project/issues/search/$project->uri", array('title' => t('Use the advanced search page to find %project issues.', array('%project' => check_plain($project->uri))))); } else { // only set a more descriptive title if we're not looking at "my @@ -1305,13 +1324,29 @@ function project_issue_query_result($que } $links = array(); if (user_access('create project issues')) { - $links[] = l(t('submit'), "node/add/project_issue", array('title' => t('Submit a new issue.'))); + $links[] = array( + 'title' => t('Submit'), + 'href' => "node/add/project_issue", + 'attributes' => array('title' => t('Submit a new issue.')), + ); } - $links[] = l(t('statistics'), "project/issues/statistics", array('title' => t('See statistics about issues.'))); + $links[] = array( + 'title' => t('Statistics'), + 'href' => "project/issues/statistics", + 'attributes' => array('title' => t('See statistics about issues.')), + ); if ($user->uid) { - $links[] = l(t('subscribe'), "project/issues/subscribe", array('title' => t('Receive email updates about issues.'))); + $links[] = array( + 'title' => t('Subscribe'), + 'href' => "project/issues/subscribe", + 'attributes' => array('title' => t('Receive email updates about issues.')), + ); } - $links[] = l(t('advanced search'), "project/issues/search/", array('title' => t('Use the advanced search page for finding issues.'))); + $links[] = array( + 'title' => t('Advanced search'), + 'href' => "project/issues/search/", + 'attributes' => array('title' => t('Use the advanced search page for finding issues.')), + ); } $header = array(); @@ -1465,7 +1500,7 @@ function project_issue_query_result($que $rows[] = array(array('data' => t('No issues found.'), 'colspan'=> 8)); } - $output = '
'; + $output = '
'; $output .= ''; @@ -1501,7 +1536,7 @@ function project_issue_query_url($query } /** - * Parses $_POST['edit'] or $_GET and creates the appropriate query + * Parses $_POST or $_GET and creates the appropriate query * object based on whatever choices a user has made to filter the * issue queue. This function *MUST* return a valid $query object, * since the rest of project_issue_query_result() assumes that $query @@ -1520,8 +1555,8 @@ function project_issue_query_url($query */ function project_issue_query_parse($query = NULL) { $fields = array('projects', 'text', 'attachment', 'summary', 'comment', 'categories', 'components', 'versions', 'states', 'priorities', 'users', 'assigned', 'submitted', 'participated'); - if ($_SERVER['REQUEST_METHOD'] == 'POST' && is_array($_POST['edit'])) { - foreach ($_POST['edit'] as $key => $value) { + if ($_SERVER['REQUEST_METHOD'] == 'POST' && is_array($_POST)) { + foreach ($_POST as $key => $value) { if (!empty($value) && in_array($key, $fields)) { $query->$key = !is_array($value) ? explode(',', $value) : $value; } Index: modules/project_issue/mail.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/project_issue/mail.inc,v retrieving revision 1.65 diff -u -p -r1.65 mail.inc --- modules/project_issue/mail.inc 18 Dec 2006 09:11:08 -0000 1.65 +++ modules/project_issue/mail.inc 20 Dec 2006 06:32:10 -0000 @@ -237,8 +237,8 @@ function project_mail_notify($node) { } // Create link to related node - $links = t('Issue status update for %link', array('%link' => "\n". url("node/$node->nid", NULL, NULL, 1))) ."\n"; - $links .= t('Post a follow up: %link', array('%link' => "\n". url("project/comments/add/$node->nid", NULL, NULL, 1))) ."\n"; + $links = t('Issue status update for !link', array('!link' => "\n". url("node/$node->nid", NULL, NULL, 1))) ."\n"; + $links .= t('Post a follow up: !link', array('!link' => "\n". url("project/comments/add/$node->nid", NULL, NULL, 1))) ."\n"; // Mail summary (status values) foreach ($fields as $field => $text) { Index: modules/project_issue/project_issue.css =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/project_issue/project_issue.css,v retrieving revision 1.6 diff -u -p -r1.6 project_issue.css --- modules/project_issue/project_issue.css 18 Dec 2006 09:11:08 -0000 1.6 +++ modules/project_issue/project_issue.css 20 Dec 2006 06:32:10 -0000 @@ -6,13 +6,13 @@ padding-top: 0.5em; } -.node-form .project .options fieldset .form-item { +.project-issue .node-form .options fieldset .form-item { float: left; padding-right: 0.8em; margin: 0.05em 0.1em; } -.node-form .project fieldset:after { +.project-issue .node-form fieldset:after { content: "."; display: block; height: 0; @@ -20,7 +20,7 @@ visibility: hidden; } -.node-form .project .options fieldset {display: inline-table;} +.project-issue .node-form .options fieldset {display: inline-table;} table.projects { width: 100%; cvs diff: modules/project_issue/project_issue.info is a new entry, no comparison available Index: modules/project_issue/project_issue.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/project_issue/project_issue.module,v retrieving revision 1.10 diff -u -p -r1.10 project_issue.module --- modules/project_issue/project_issue.module 20 Dec 2006 01:09:34 -0000 1.10 +++ modules/project_issue/project_issue.module 20 Dec 2006 06:32:10 -0000 @@ -1,5 +1,5 @@ project_issues @@ -14,8 +14,6 @@ if (file_exists("$path/issue.inc")) { function project_issue_help($section) { switch ($section) { - case 'admin/modules#description': - return t('Provides issues tracking for the project.module.'); case 'admin/help#project_issue': $help = t('

Mailhandler support

'. '

Basic mail format:

'. @@ -33,7 +31,7 @@ function project_issue_help($section) { return $help; case 'node/add#project_issue': return t('Add a new issue (bug report, feature request, etc) to an existing project.'); - case 'admin/settings/project_issue/status': + case 'admin/project/project-issue-status': return t('

Use this page to add new status options for project issues or to change or delete existing options.

Adding
To add a new status option, put its name in one of the blank places at the bottom of the form and assign it a weight.

Updating
When renaming existing issues, keep in mind that issues with the existing name will receive the new one.
@@ -48,7 +46,11 @@ function project_issue_help($section) { function project_issue_node_info() { return array( - 'project_issue' => array('name' => t('issue'), 'base' => 'project_issue'), + 'project_issue' => array( + 'name' => t('Issue'), + 'module' => 'project_issue', + 'description' => t('An issue that can be tracked, such as a bug report, feature request, or task.'), + ), ); } @@ -69,7 +71,7 @@ function project_issue_perm() { /** * Callback for the main settings page. */ -function project_issue_settings() { +function project_issue_settings_form() { $project_directory = file_create_path(variable_get('project_directory_issues', 'issues')); if (!file_check_directory($project_directory)) { $error['project_directory_issues'] = theme('error', t('Directory does not exist, or is not writable.')); @@ -84,7 +86,7 @@ function project_issue_settings() { '#description' => t("Subdirectory in the directory '%dir' where attachment to issues will be stored.", array('%dir' => variable_get('file_directory_path', 'files') . '/')), ); - if (module_exist('mailhandler')) { + if (module_exists('mailhandler')) { // TODO: move this stuff to mailhandler.module ? $items = array(t('')); $result = db_query('SELECT mail FROM {mailhandler} ORDER BY mail'); @@ -98,7 +100,7 @@ function project_issue_settings() { '#options' => $items, ); } - return $form; + return system_settings_form($form); } function project_issue_cron() { @@ -128,7 +130,10 @@ function project_issue_link($type, $node case 'node': if ($node->type == 'project_issue') { if (user_access('create project issues')) { - $links[] = l(t('follow up'), "project/comments/add/$node->nid"); + $links['project_issue_follow_up'] = array( + 'title' => t('follow up'), + 'href' => "project/comments/add/$node->nid", + ); } } break; @@ -141,67 +146,60 @@ function project_issue_menu($may_cache) global $user; if ($may_cache) { - // Authenticated user pages: + // Anonymous user pages: // Issues $access = user_access('access project issues'); $items[] = array( 'path' => 'project/issues', - 'title' => t('issues'), + 'title' => t('Issues'), 'callback' => 'project_issue_page', 'access' => $access, 'type' => MENU_NORMAL_ITEM, ); $items[] = array( - 'path' => 'project/issues/user', - 'title' => t('my issues'), - 'callback' => 'project_issue_page', - 'access' => $GLOBALS['user']->uid && $access, - 'type' => MENU_NORMAL_ITEM, - ); - $items[] = array( - 'path' => 'project/issues/subscribe', - 'title' => t('subscribe'), - 'callback' => 'project_issue_page', - 'access' => $GLOBALS['user']->uid && $access, - 'type' => MENU_NORMAL_ITEM, - ); - $items[] = array( 'path' => 'project/issues/add', - 'title' => t('submit'), + 'title' => t('Submit'), 'callback' => 'project_issue_page', 'access' => $access, 'type' => MENU_NORMAL_ITEM, ); $items[] = array( 'path' => 'project/issues/statistics', - 'title' => t('statistics'), + 'title' => t('Statistics'), 'callback' => 'project_issue_page', 'access' => $access, 'type' => MENU_NORMAL_ITEM, ); $items[] = array( 'path' => 'project/issues/search', - 'title' => t('search'), + 'title' => t('Search'), 'callback' => 'project_issue_search_page', 'access' => $access, 'type' => MENU_NORMAL_ITEM, ); - if (module_exist('search')) { + if (module_exists('search')) { $items[] = array( 'path' => 'search/issues', - 'title' => t('issues'), + 'title' => t('Issues'), 'callback' => 'project_issue_search_page', 'access' => $access, 'type' => MENU_LOCAL_TASK, 'weight' => 4, ); } + $items[] = array( + 'path' => 'project/issues/subscribe', + 'title' => t('Subscribe'), + 'callback' => 'project_issue_page', + 'access' => $GLOBALS['user']->uid && $access, + 'type' => MENU_NORMAL_ITEM, + ); // "My projects" page (which shows all issues for all your projects) $items[] = array( 'path' => 'project/user', - 'title' => t('my projects'), + 'title' => t('My projects'), 'callback' => 'project_issue_user_page', 'access' => $user->uid && $access, 'type' => MENU_NORMAL_ITEM, @@ -211,61 +209,86 @@ function project_issue_menu($may_cache) $access = user_access('create project issues'); $items[] = array( 'path' => 'node/add/project_issue', - 'title' => t('issue'), + 'title' => t('Issue'), 'callback' => 'node_page', 'access' => $access, 'type' => MENU_NORMAL_ITEM, 'weight' => 1, ); - // Administer issue status settings - $access = user_access('administer projects'); - $items[] = array( - 'path' => 'admin/settings/project_issue/status', - 'title' => t('status options'), - 'callback' => 'project_issue_admin_states_page', - 'access' => $access, - 'type' => MENU_NORMAL_ITEM, - ); - $items[] = array( - 'path' => 'admin/settings/project_issue/status/save', - 'title' => t('save'), - 'callback' => 'project_issue_admin_states_page', - 'access' => $access, - 'type' => MENU_CALLBACK, - ); - $items[] = array( - 'path' => 'admin/settings/project_issue/status/delete', - 'title' => t('delete'), - 'callback' => 'project_issue_admin_states_page', - 'access' => $access, - 'type' => MENU_CALLBACK, - ); - - // Comments + // Reply to issues $access = user_access('create project issues'); $items[] = array( 'path' => 'project/comments', - 'title' => t('comments'), + 'title' => t('Comments'), 'callback' => 'project_comment_page', 'access' => $access, 'type' => MENU_CALLBACK, ); } else { + // Authenticated users + + $items[] = array( + 'path' => 'project/issues/user', + 'title' => t('My issues'), + 'callback' => 'project_issue_page', + 'access' => $GLOBALS['user']->uid && $access, + 'type' => MENU_NORMAL_ITEM, + ); + // Issues subtab on project node edit tab. if (arg(0) == 'node' && is_numeric(arg(1))) { $node = node_load(arg(1)); if ($node->type == 'project_project' && node_access('update', $node)) { $items[] = array( 'path' => 'node/'. arg(1) .'/edit/issues', - 'title' => t('issues'), + 'title' => t('Issues'), 'callback' => 'project_issue_project_edit_issues', 'type' => MENU_LOCAL_TASK, ); } } - theme_add_style(drupal_get_path('module', 'project_issue') .'/project_issue.css'); + + // Administrative pages + $access = user_access('administer projects'); + $items[] = array( + 'path' => 'admin/project/project-issue-settings', + 'title' => t('Project issue settings'), + 'description' => t('Specify where attachments to issues should be stored on your site.'), + 'callback' => 'drupal_get_form', + 'callback arguments' => array('project_issue_settings_form'), + 'type' => MENU_NORMAL_ITEM, + 'weight' => 1, + 'access' => $access, + ); + + // Administer issue status settings + $items[] = array( + 'path' => 'admin/project/project-issue-status', + 'title' => t('Project issue status options'), + 'description' => t('Configure what issue status values should be used on your site.'), + 'callback' => 'project_issue_admin_states_page', + 'weight' => 1, + 'access' => $access, + 'type' => MENU_NORMAL_ITEM, + ); + $items[] = array( + 'path' => 'admin/project/project-issue-status/save', + 'title' => t('Save'), + 'callback' => 'project_issue_admin_states_page', + 'access' => $access, + 'type' => MENU_CALLBACK, + ); + $items[] = array( + 'path' => 'admin/project/project-issue-status/delete', + 'title' => t('Delete'), + 'callback' => 'project_issue_admin_states_page', + 'access' => $access, + 'type' => MENU_CALLBACK, + ); + + drupal_add_css(drupal_get_path('module', 'project_issue') .'/project_issue.css'); } return $items; } @@ -284,7 +307,13 @@ function project_issue_project_edit_issu elseif (empty($node->components)) { $node->components = "Code\nDocumentation\nMiscellaneous\nUser interface"; } + return drupal_get_form('project_issue_project_edit_form', $node); +} +/** + * Form builder for the issues subtab on the edit tab for project nodes. + */ +function project_issue_project_edit_form($node) { /* Issue properties */ $form['issue'] = array( '#type' => 'fieldset', @@ -392,7 +421,7 @@ function project_issue_project_edit_issu '#weight' => 45, ); - return drupal_get_form('project_issue_project_edit_form', $form); + return $form; } /** @@ -511,16 +540,31 @@ function project_issue_user_page($arg = } foreach ($projects as $node) { $issue_links = array( - l(t('view'), "project/issues/$node->nid"), - l(t('search'), "project/issues/search/$node->nid"), - l(t('submit'), "node/add/project_issue/$node->nid"), + array( + 'title' => t('View'), + 'href' => "project/issues/$node->nid" + ), + array( + 'title' => t('Search'), + 'href' => "project/issues/search/$node->nid", + ), + array( + 'title' => t('Submit'), + 'href' => "node/add/project_issue/$node->nid", + ), ); if ($node->is_admin) { $project_links = array( - l(t('edit'), "node/$node->nid/edit"), + array( + 'title' => t('Edit'), + 'href' => "node/$node->nid/edit", + ), ); - if (module_exist('project_release')) { - $project_links[] = l(t('add release'), "node/add/project_release/$node->nid"); + if (module_exists('project_release')) { + $project_links[] = array( + 'title' => t('Add release'), + 'href' => "node/add/project_release/$node->nid", + ); } } $row = array(