Index: privatemsg_filter.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/privatemsg/privatemsg_filter/privatemsg_filter.module,v retrieving revision 1.1.2.7 diff -u -r1.1.2.7 privatemsg_filter.module --- privatemsg_filter.module 20 Feb 2009 21:38:29 -0000 1.1.2.7 +++ privatemsg_filter.module 20 Feb 2009 23:42:57 -0000 @@ -404,7 +404,7 @@ * Implementation of hook_privatemsg_list_messages_alter(). */ function privatemsg_filter_privatemsg_list_messages_alter(&$content, $account) { - if (!empty($content['list']['content']) || privatemsg_filter_get_filter($account)) { + if ((!empty($content['list']['content']) || privatemsg_filter_get_filter($account)) && privatemsg_user_access('use privatemsg_filter')) { $content['tags']['content'] = drupal_get_form('privatemsg_filter_dropdown', $account); $content['tags']['#weight'] = -5; } @@ -453,7 +453,7 @@ } function privatemsg_filter_privatemsg_view_messages_alter(&$content, $count) { - if ($count > 0) { + if ($count > 0 && db_result(db_query('SELECT COUNT(*) FROM {pm_tags}')) > 0) { $content['tags']['content'] = drupal_get_form('privatemsg_filter_form'); $content['tags']['#weight'] = 10; } @@ -462,7 +462,7 @@ function privatemsg_filter_form(&$form_state) { global $user; $thread_id = arg(2); - + $form['tags'] = array( '#type' => 'fieldset', '#title' => t('Tags'), @@ -515,4 +515,4 @@ } drupal_set_message(t('Tagging information has been saved.')); } -} +} \ No newline at end of file