From 770e0d54f9c5b33c4d01b5cefe652b61b132dc0c Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Sat, 29 Aug 2009 04:16:15 +0000 Subject: #364470 by stBorchert and JohnAlbin: Made theming of 'Submitted by author, on date' easier. --- modules/node/node.module | 20 ++------------------ modules/node/node.test | 4 ++-- modules/node/node.tpl.php | 14 +++++++++----- 3 files changed, 13 insertions(+), 25 deletions(-) (limited to 'modules/node') diff --git a/modules/node/node.module b/modules/node/node.module index 1218b9d32..0561adb20 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -128,9 +128,6 @@ function node_theme() { 'node_log_message' => array( 'arguments' => array('log' => NULL), ), - 'node_submitted' => array( - 'arguments' => array('node' => NULL), - ), 'node_admin_overview' => array( 'arguments' => array('name' => NULL, 'type' => NULL), ), @@ -1142,11 +1139,11 @@ function template_preprocess_node(&$variables) { // Display post information only on certain node types. if (variable_get('node_submitted_' . $node->type, TRUE)) { - $variables['submitted'] = theme('node_submitted', $node); + $variables['display_submitted'] = TRUE; $variables['user_picture'] = theme_get_setting('toggle_node_user_picture') ? theme('user_picture', $node) : ''; } else { - $variables['submitted'] = ''; + $variables['display_submitted'] = FALSE; $variables['user_picture'] = ''; } @@ -2807,19 +2804,6 @@ function node_forms() { return $forms; } -/** - * Format the "Submitted by username on date/time" for each node - * - * @ingroup themeable - */ -function theme_node_submitted($node) { - return t('Submitted by !username on @datetime', - array( - '!username' => theme('username', $node), - '@datetime' => format_date($node->created), - )); -} - /** * Implement hook_hook_info(). */ diff --git a/modules/node/node.test b/modules/node/node.test index 389494b57..0de3355ca 100644 --- a/modules/node/node.test +++ b/modules/node/node.test @@ -533,7 +533,7 @@ class NodePostSettingsTestCase extends DrupalWebTestCase { // Check that the post information is displayed. $node = $this->drupalGetNodeByTitle($edit['title']); - $this->assertRaw(theme('node_submitted', $node), t('Post information is displayed.')); + $this->assertRaw('', t('Post information is displayed.')); } /** @@ -555,7 +555,7 @@ class NodePostSettingsTestCase extends DrupalWebTestCase { // Check that the post information is displayed. $node = $this->drupalGetNodeByTitle($edit['title']); - $this->assertNoRaw(theme('node_submitted', $node), t('Post information is not displayed.')); + $this->assertNoRaw('