Index: modules/search/search-result.tpl.php =================================================================== RCS file: /cvs/drupal/drupal/modules/search/search-result.tpl.php,v retrieving revision 1.1 diff -u -F^function -r1.1 search-result.tpl.php --- modules/search/search-result.tpl.php 31 Oct 2007 18:06:38 -0000 1.1 +++ modules/search/search-result.tpl.php 22 Dec 2007 05:25:58 -0000 @@ -13,8 +13,9 @@ * - $url: URL of the result. * - $title: Title of the result. * - $snippet: A small preview of the result. Does not apply to user searches. - * - $info: String of all the meta information ready for print. Does not apply - * to user searches. + * - $info: String of all the meta information ready for print. Applies only to + * node searches, and then only for node types where theme settings allow post + * information to be displayed. Does not apply to user searches. * - $info_split: Contains same data as $info split into a keyed array. * - $type: The type of search, e.g., "node" or "user". * @@ -29,9 +30,8 @@ * being the count. Depends on upload.module. * * Since $info_split is keyed, a direct print of the item is possible. - * This array does not apply to user searches so it is recommended to check - * for their existance before printing. The default keys of 'type', 'user' and - * 'date' always exist for node searches. Modules may provide other data. + * This array does not always apply so it is recommended to check for their + * existence before printing. Modules may provide other data. * * * Index: modules/search/search.pages.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/search/search.pages.inc,v retrieving revision 1.4 diff -u -F^function -r1.4 search.pages.inc --- modules/search/search.pages.inc 6 Dec 2007 09:51:01 -0000 1.4 +++ modules/search/search.pages.inc 22 Dec 2007 05:25:58 -0000 @@ -83,17 +83,21 @@ function template_preprocess_search_resu $variables['title'] = check_plain($result['title']); $info = array(); - if (!empty($result['type'])) { - $info['type'] = check_plain($result['type']); - } - if (!empty($result['user'])) { - $info['user'] = $result['user']; - } - if (!empty($result['date'])) { - $info['date'] = format_date($result['date'], 'small'); - } - if (isset($result['extra']) && is_array($result['extra'])) { - $info = array_merge($info, $result['extra']); + // If the item is a node, only display the post information if allowed by the + // theme. For any other type of item, display any available information. + if ($variables['type'] != 'node' || theme_get_setting('toggle_node_info_'. $result['node']->type)) { + if (!empty($result['type'])) { + $info['type'] = check_plain($result['type']); + } + if (!empty($result['user'])) { + $info['user'] = $result['user']; + } + if (!empty($result['date'])) { + $info['date'] = format_date($result['date'], 'small'); + } + if (isset($result['extra']) && is_array($result['extra'])) { + $info = array_merge($info, $result['extra']); + } } // Check for existence. User search does not include snippets. $variables['snippet'] = isset($result['snippet']) ? $result['snippet'] : '';