Index: taxonomy_access.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/taxonomy_access/taxonomy_access.module,v retrieving revision 1.107.2.7 diff -u -p -r1.107.2.7 taxonomy_access.module --- taxonomy_access.module 15 May 2009 01:23:33 -0000 1.107.2.7 +++ taxonomy_access.module 17 Jun 2009 13:46:58 -0000 @@ -158,6 +158,15 @@ function taxonomy_access_init() { include_once($path .'/taxonomy_access_admin.inc'); drupal_add_css($path .'/admin.css'); } + + // Restrict direct access to forum/$tid paths. + if (arg(0) == 'forum' && is_numeric($tid = arg(1))) { + if (!db_result(db_query(db_rewrite_sql("SELECT COUNT(t.tid) FROM {term_data} t WHERE t.tid = %d", 't', 'tid'), $tid))) { + drupal_access_denied(); + module_invoke_all('exit'); + exit; + } + } } /**