Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
e77beba5
Commit
e77beba5
authored
15 years ago
by
Dries Buytaert
Browse files
Options
Downloads
Patches
Plain Diff
- Patch
#113614
by John Morahan: small fix for token/placeholder substitution to core.
parent
26024e03
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
modules/block/block.api.php
+0
-21
0 additions, 21 deletions
modules/block/block.api.php
modules/node/node.tokens.inc
+0
-1
0 additions, 1 deletion
modules/node/node.tokens.inc
modules/system/system.test
+3
-5
3 additions, 5 deletions
modules/system/system.test
with
3 additions
and
27 deletions
modules/block/block.api.php
+
0
−
21
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
=
''
)
{
...
...
This diff is collapsed.
Click to expand it.
modules/node/node.tokens.inc
+
0
−
1
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'
))
{
...
...
This diff is collapsed.
Click to expand it.
modules/system/system.test
+
3
−
5
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.'
));
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment