Index: modules/forum/forum.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/forum/forum.module,v
retrieving revision 1.572
diff -u -p -r1.572 forum.module
--- modules/forum/forum.module	8 Aug 2010 12:47:00 -0000	1.572
+++ modules/forum/forum.module	14 Aug 2010 11:47:48 -0000
@@ -167,11 +167,10 @@ function forum_menu() {
 function forum_menu_local_tasks_alter(&$data, $router_item, $root_path) {
   global $user;
 
-  // Add action link to 'node/add/forum' on 'forum' page.
-  if ($root_path == 'forum') {
-    $tid = (isset($router_item['page_arguments'][0]) ? $router_item['page_arguments'][0] : 0);
-    $forum_term = forum_forum_load($tid);
-    if ($forum_term) {
+  // Add action link to 'node/add/forum' on 'forum' page and sub-pages.
+  if ($root_path == 'forum' || $root_path == 'forum/%') {
+    if (isset($router_item['page_arguments'][0]) && !in_array($router_item['page_arguments'][0]->tid, variable_get('forum_containers', array()))) {
+      $forum_term = $router_item['page_arguments'][0];
       $vid = variable_get('forum_nav_vocabulary', 0);
       $vocabulary = taxonomy_vocabulary_load($vid);
 
@@ -610,7 +609,7 @@ function forum_form_alter(&$form, $form_
       $form['advanced']['parent']['#access'] = FALSE;
     }
   }
-  if ($form_id == 'forum_node_form') {
+  if (!empty($form['#node_edit_form']) && isset($form['taxonomy_forums'])) {
     $langcode = $form['taxonomy_forums']['#language'];
     // Make the vocabulary required for 'real' forum-nodes.
     $form['taxonomy_forums'][$langcode]['#required'] = TRUE;
Index: modules/forum/forum.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/forum/forum.test,v
retrieving revision 1.61
diff -u -p -r1.61 forum.test
--- modules/forum/forum.test	9 Aug 2010 01:18:46 -0000	1.61
+++ modules/forum/forum.test	14 Aug 2010 11:47:48 -0000
@@ -48,6 +48,10 @@ class ForumTestCase extends DrupalWebTes
     // Login an unprivileged user to view the forum topics and generate an
     // active forum topics list.
     $this->drupalLogin($this->web_user);
+    // Verify that this user is shown a message that they may not post content.
+    $this->drupalGet('/forum/' . $this->forum['tid']);
+    $this->assertText(t('You are not allowed to post new content in the forum'), "Authenticated user without permission to post forum content is shown message in local tasks to that effect.");
+
     $this->viewForumTopics($this->nids);
 
     // Log in, and do basic tests for a user with permission to edit any forum
@@ -64,6 +68,12 @@ class ForumTestCase extends DrupalWebTes
     // Verify that this user cannot edit forum content authored by another user.
     $this->verifyForums($this->edit_any_topics_user, $any_topics_user_node, FALSE, 403);
 
+    // Verify that this user is shown a local task to add new forum content.
+    $this->drupalGet('/forum');
+    $this->assertNoLink(t('Add new Forum topic'), "No local task to post topic for forum's front page.");
+    $this->drupalGet('/forum/' . $this->forum['tid']);
+    $this->assertLinkByHref('/node/add/forum/' . $this->forum['tid']);
+
     // Login a user with permission to edit any forum content.
     $this->drupalLogin($this->edit_any_topics_user);
     // Verify that this user can edit forum content authored by another user.
