Index: profiles/custom/modules/spam/spam.module =================================================================== --- profiles/custom/modules/spam/spam.module (revision 3629) +++ profiles/custom/modules/spam/spam.module (working copy) @@ -448,6 +448,15 @@ 'access arguments' => array('administer spam'), 'weight' => 2, ); + $items['admin/content/spam/redirect'] = array( + 'title' => 'view', + 'type' => MENU_CALLBACK, + 'page callback' => 'spam_admin_list_redirect', + 'page arguments' => array(4,5), // type and id + 'access arguments' => array('administer spam'), + ); + + $items['admin/settings/spam'] = array( 'title' => 'Spam', 'page callback' => 'spam_admin_settings', @@ -473,6 +482,7 @@ 'type' => MENU_DEFAULT_LOCAL_TASK, 'access arguments' => array('administer spam'), ); + // TODO: Content groups. /* $items['admin/settings/spam/groups'] = array( @@ -1093,6 +1103,14 @@ } /** + * Menu callback sends admin to view the content. + */ +function spam_admin_list_redirect($type, $id) { + spam_invoke_module($type, 'redirect', $id); + drupal_not_found(); +} + +/** * Process spam feedback. */ function spam_admin_feedback_form_submit($form, &$form_state) { @@ -1335,8 +1353,10 @@ $all["$spam->content_type-$spam->content_id"] = ''; $form['content_type']["$spam->content_type-$spam->content_id"] = array('#value' => $spam->content_type); $title = spam_invoke_module($spam->content_type, 'title', $spam->content_id); - $link = spam_invoke_module($spam->content_type, 'edit_link', $spam->content_id); - $form['title']["$spam->content_type-$spam->content_id"] = array('#value' => l($title, $link)); + $path = "admin/content/spam/redirect/{$spam->content_type}/{$spam->content_id}"; + $form['title']["$spam->content_type-$spam->content_id"] = array('#value' => l($title, $path)); + $edit_path = spam_invoke_module($spam->content_type, 'edit_link', $spam->content_id); + $form['title']["$spam->content_type-$spam->content_id"]['#value'] .= ' ' . l(t('[edit]'), $edit_path); $form['score']["$spam->content_type-$spam->content_id"] = array('#value' => $spam->score); $status = spam_invoke_module($spam->content_type, 'status', $spam->content_id); $form['status']["$spam->content_type-$spam->content_id"] = array('#value' => $status == SPAM_PUBLISHED ? t('published') : t('not published'));