From 8b04c7f0db4a7a483049635f961d1dcba7e568f1 Mon Sep 17 00:00:00 2001 From: Steven Wittens Date: Sat, 15 Apr 2006 04:07:18 +0000 Subject: #51002: Admins could not see unpublished comments (plus minor usability enhancements for previewing/unpublished) --- includes/theme.inc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'includes') diff --git a/includes/theme.inc b/includes/theme.inc index 610865a60..0baed0463 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -569,15 +569,19 @@ function theme_help() { * A string containing the node output. */ function theme_node($node, $teaser = FALSE, $page = FALSE) { + if (!$node->status) { + $output = '
'; + } + if (module_exist('taxonomy')) { $terms = taxonomy_link('taxonomy terms', $node); } if ($page == 0) { - $output = t('%title by %name', array('%title' => '

'. check_plain($node->title) .'

', '%name' => theme('username', $node))); + $output .= t('%title by %name', array('%title' => '

'. check_plain($node->title) .'

', '%name' => theme('username', $node))); } else { - $output = t('by %name', array('%name' => theme('username', $node))); + $output .= t('by %name', array('%name' => theme('username', $node))); } if (count($terms)) { @@ -595,6 +599,10 @@ function theme_node($node, $teaser = FALSE, $page = FALSE) { $output .= ''; } + if (!$node->status) { + $output .= '
'; + } + return $output; } -- cgit v1.2.3