Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
300
Merge Requests
300
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
e77beba5
Commit
e77beba5
authored
Aug 23, 2009
by
Dries
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Patch
#113614
by John Morahan: small fix for token/placeholder substitution to core.
parent
26024e03
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
27 deletions
+3
-27
modules/block/block.api.php
modules/block/block.api.php
+0
-21
modules/node/node.tokens.inc
modules/node/node.tokens.inc
+0
-1
modules/system/system.test
modules/system/system.test
+3
-5
No files found.
modules/block/block.api.php
View file @
e77beba5
...
...
@@ -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
=
''
)
{
...
...
modules/node/node.tokens.inc
View file @
e77beba5
...
...
@@ -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'
))
{
...
...
modules/system/system.test
View file @
e77beba5
...
...
@@ -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.'
));
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment