From a4411976fd67b01b02063f3c7a757df4e300761a Mon Sep 17 00:00:00 2001 From: Dries Buytaert <dries@buytaert.net> Date: Tue, 7 Jul 2009 13:51:58 +0000 Subject: [PATCH] - Patch #373201 by Berdir: clean-up of some drupal_render() oversight. --- modules/node/node.module | 29 +++------------------------- modules/simpletest/tests/common.test | 2 +- 2 files changed, 4 insertions(+), 27 deletions(-) diff --git a/modules/node/node.module b/modules/node/node.module index 7fc0e7ab848e..fff04872a6a4 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -1149,8 +1149,9 @@ function node_build_content($node, $build_mode = 'full') { ); } $node->content['links']['node'] = array( - '#type' => 'node_links', - '#value' => $links + '#theme' => 'links', + '#links' => $links, + '#attributes' => array('class' => 'links inline'), ); // Allow modules to make their own additions to the node. @@ -3130,30 +3131,6 @@ function node_list_permissions($type) { return $perms; } -/** - * Implement hook_elements(). - */ -function node_elements() { - $type['node_links'] = array('#theme' => 'node_links'); - - return $type; -} - -/** - * Format a set of node links. - * - * @param $element - * An associative array containing the properties of the element. - * Properties used: value - * @return - * A themed HTML string representing the links. - * - * @ingroup themeable - */ -function theme_node_links($element) { - return theme('links', $element['#value'], array('class' => 'links inline')); -} - /** * Implement hook_requirements(). */ diff --git a/modules/simpletest/tests/common.test b/modules/simpletest/tests/common.test index 1c418a26b117..229b91c2120a 100644 --- a/modules/simpletest/tests/common.test +++ b/modules/simpletest/tests/common.test @@ -714,7 +714,7 @@ class DrupalRenderUnitTestCase extends DrupalWebTestCase { ); // Test that defaults work. $this->assertEqual(drupal_render($element), 'foobar', 'Defaults work'); - dd(drupal_render($e), 'defaults'); $element = array( + $element = array( '#theme' => 'common_test_foo', '#foo' => $this->randomName(), '#bar' => $this->randomName(), -- GitLab