summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-08-23 13:02:38 +0000
committerDries Buytaert <dries@buytaert.net>2009-08-23 13:02:38 +0000
commite77beba5daef04a5db6d31b3ef33a4243b170a6e (patch)
tree23be9f6db3060cfaf6cf66fe25fac620978d8599 /modules
parent26024e03c895c7f590dcd076ebd76f8e95db3895 (diff)
downloadbrdo-e77beba5daef04a5db6d31b3ef33a4243b170a6e.tar.gz
brdo-e77beba5daef04a5db6d31b3ef33a4243b170a6e.tar.bz2
- Patch #113614 by John Morahan: small fix for token/placeholder substitution to core.
Diffstat (limited to 'modules')
-rw-r--r--modules/block/block.api.php21
-rw-r--r--modules/node/node.tokens.inc1
-rw-r--r--modules/system/system.test8
3 files changed, 3 insertions, 27 deletions
diff --git a/modules/block/block.api.php b/modules/block/block.api.php
index 96c04e06e..9c94166e3 100644
--- a/modules/block/block.api.php
+++ b/modules/block/block.api.php
@@ -72,10 +72,6 @@ function hook_block_list() {
/**
* Configuration form for the block.
*
- * Any module can export a block (or blocks) to be displayed by defining
- * the _block hook. This hook is called by theme.inc to display a block,
- * and also by block.module to procure the list of available blocks.
- *
* @param $delta
* Which block to return. This is a descriptive string used to identify
* blocks within each module and also within the theme system.
@@ -84,9 +80,6 @@ function hook_block_list() {
* @return
* Optionally return the configuration form.
*
- * After completing your blocks, do not forget to enable them in the
- * block admin menu.
- *
* For a detailed usage example, see block_example.module.
*/
function hook_block_configure($delta = '') {
@@ -104,10 +97,6 @@ function hook_block_configure($delta = '') {
/**
* Save the configuration options.
*
- * Any module can export a block (or blocks) to be displayed by defining
- * the _block hook. This hook is called by theme.inc to display a block,
- * and also by block.module to procure the list of available blocks.
- *
* @param $delta
* Which block to save the settings for. This is a descriptive string used
* to identify blocks within each module and also within the theme system.
@@ -116,9 +105,6 @@ function hook_block_configure($delta = '') {
* @param $edit
* The submitted form data from the configuration form.
*
- * After completing your blocks, do not forget to enable them in the
- * block admin menu.
- *
* For a detailed usage example, see block_example.module.
*/
function hook_block_save($delta = '', $edit = array()) {
@@ -130,10 +116,6 @@ function hook_block_save($delta = '', $edit = array()) {
/**
* Process the block when enabled in a region in order to view its contents.
*
- * Any module can export a block (or blocks) to be displayed by defining
- * the _block hook. This hook is called by theme.inc to display a block,
- * and also by block.module to procure the list of available blocks.
- *
* @param $delta
* Which block to return. This is a descriptive string used to identify
* blocks within each module and also within the theme system.
@@ -148,9 +130,6 @@ function hook_block_save($delta = '', $edit = array()) {
* content you want to display to your users. If the "content" element is empty,
* no block will be displayed even if "subject" is present.
*
- * After completing your blocks, do not forget to enable them in the
- * block admin menu.
- *
* For a detailed usage example, see block_example.module.
*/
function hook_block_view($delta = '') {
diff --git a/modules/node/node.tokens.inc b/modules/node/node.tokens.inc
index 915ac4100..bd8008b41 100644
--- a/modules/node/node.tokens.inc
+++ b/modules/node/node.tokens.inc
@@ -184,7 +184,6 @@ function node_tokens($type, $tokens, array $data = array(), array $options = arr
$replacements[$original] = format_date($node->changed, 'medium', '', NULL, $language_code);
break;
}
- dsm('node');
}
if ($author_tokens = token_find_with_prefix($tokens, 'author')) {
diff --git a/modules/system/system.test b/modules/system/system.test
index fe2ab3949..fd58a77c5 100644
--- a/modules/system/system.test
+++ b/modules/system/system.test
@@ -1237,13 +1237,11 @@ class TokenReplaceTestCase extends DrupalWebTestCase {
// token, [node:title].
$this->assertFalse(strcmp($target, $result), t('Basic placeholder tokens replaced.'));
- $raw_tokens = array(
- 'node' => array('title' => '[node:title]'),
- );
- $generated = token_generate($raw_tokens, array('node' => $node));
+ $raw_tokens = array('title' => '[node:title]');
+ $generated = token_generate('node', $raw_tokens, array('node' => $node));
$this->assertFalse(strcmp($generated['[node:title]'], check_plain($node->title)), t('Token sanitized.'));
- $generated = token_generate($raw_tokens, array('node' => $node), array('sanitize' => FALSE));
+ $generated = token_generate('node', $raw_tokens, array('node' => $node), array('sanitize' => FALSE));
$this->assertFalse(strcmp($generated['[node:title]'], $node->title), t('Unsanitized token generated properly.'));
}
}