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
5d055a76
Commit
5d055a76
authored
Aug 23, 2009
by
webchick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#550228
by tobiasb and sun: Fixed double-escaping of title callbacks in Image module.
parent
e6eb4899
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
28 deletions
+12
-28
modules/image/image.admin.inc
modules/image/image.admin.inc
+12
-18
modules/image/image.module
modules/image/image.module
+0
-10
No files found.
modules/image/image.admin.inc
View file @
5d055a76
...
...
@@ -22,13 +22,6 @@ function image_style_list() {
}
/**
* Menu title callback; Title for editing and deleting image styles.
*/
function
image_style_title
(
$string
,
$style
)
{
return
t
(
$string
,
array
(
'!name'
=>
$style
[
'name'
]));
}
/**
* Form builder; Edit an image style name and effects order.
*
...
...
@@ -41,6 +34,9 @@ function image_style_title($string, $style) {
* @see image_style_name_validate()
*/
function
image_style_form
(
&
$form_state
,
$style
)
{
$title
=
t
(
'Edit %name style'
,
array
(
'%name'
=>
$style
[
'name'
]));
drupal_set_title
(
$title
,
PASS_THROUGH
);
$form_state
[
'image_style'
]
=
$style
;
$form
=
array
(
'#tree'
=>
TRUE
,
...
...
@@ -75,7 +71,7 @@ function image_style_form(&$form_state, $style) {
'#default_value'
=>
$effect
[
'weight'
],
);
$form
[
'effects'
][
$ieid
][
'configure'
]
=
array
(
'#markup'
=>
isset
(
$effect
[
'form callback'
])
?
l
(
t
(
'
configure
'
),
'admin/config/media/image-styles/edit/'
.
$style
[
'name'
]
.
'/effects/'
.
$effect
[
'ieid'
]
)
:
''
,
'#markup'
=>
isset
(
$effect
[
'form callback'
])
?
l
(
t
(
'
edit
'
),
'admin/config/media/image-styles/edit/'
.
$style
[
'name'
]
.
'/effects/'
.
$effect
[
'ieid'
]
)
:
''
,
);
$form
[
'effects'
][
$ieid
][
'remove'
]
=
array
(
'#markup'
=>
l
(
t
(
'delete'
),
'admin/config/media/image-styles/edit/'
.
$style
[
'name'
]
.
'/effects/'
.
$effect
[
'ieid'
]
.
'/delete'
),
...
...
@@ -275,16 +271,6 @@ function image_style_delete_form_submit($form, &$form_state) {
$form_state
[
'redirect'
]
=
'admin/config/media/image-styles'
;
}
/**
* Menu title callback; Title for editing, deleting, and adding image effects.
*
* @param $effect
* An image effect array.
*/
function
image_effect_title
(
$string
,
$effect
)
{
return
t
(
$string
,
array
(
'!label'
=>
$effect
[
'label'
]));
}
/**
* Form builder; Form for adding and editing image effects.
*
...
...
@@ -309,6 +295,14 @@ function image_effect_title($string, $effect) {
* @see image_effect_form_submit()
*/
function
image_effect_form
(
&
$form_state
,
$style
,
$effect
)
{
if
(
!
empty
(
$effect
[
'data'
]))
{
$title
=
t
(
'Edit %label effect'
,
array
(
'%label'
=>
$effect
[
'label'
]));
}
else
{
$title
=
t
(
'Add %label effect'
,
array
(
'%label'
=>
$effect
[
'label'
]));
}
drupal_set_title
(
$title
,
PASS_THROUGH
);
$form_state
[
'image_style'
]
=
$style
;
$form_state
[
'image_effect'
]
=
$effect
;
...
...
modules/image/image.module
View file @
5d055a76
...
...
@@ -71,8 +71,6 @@ function image_menu() {
);
$items
[
'admin/config/media/image-styles/edit/%image_style'
]
=
array
(
'title'
=>
'Edit style'
,
'title callback'
=>
'image_style_title'
,
'title arguments'
=>
array
(
'!name'
,
4
),
'description'
=>
'Configure an image style.'
,
'page callback'
=>
'drupal_get_form'
,
'page arguments'
=>
array
(
'image_style_form'
,
5
),
...
...
@@ -81,8 +79,6 @@ function image_menu() {
);
$items
[
'admin/config/media/image-styles/delete/%image_style'
]
=
array
(
'title'
=>
'Delete style'
,
'title callback'
=>
'image_style_title'
,
'title arguments'
=>
array
(
'Delete !name'
,
4
),
'description'
=>
'Delete an image style.'
,
'page callback'
=>
'drupal_get_form'
,
'page arguments'
=>
array
(
'image_style_delete_form'
,
5
,
TRUE
),
...
...
@@ -91,8 +87,6 @@ function image_menu() {
);
$items
[
'admin/config/media/image-styles/edit/%image_style/effects/%image_effect'
]
=
array
(
'title'
=>
'Edit image effect'
,
'title callback'
=>
'image_effect_title'
,
'title arguments'
=>
array
(
'!label effect'
,
6
),
'description'
=>
'Edit an exiting effect within a style.'
,
'page callback'
=>
'drupal_get_form'
,
'page arguments'
=>
array
(
'image_effect_form'
,
5
,
7
),
...
...
@@ -101,8 +95,6 @@ function image_menu() {
);
$items
[
'admin/config/media/image-styles/edit/%image_style/effects/%image_effect/delete'
]
=
array
(
'title'
=>
'Delete image effect'
,
'title callback'
=>
'image_effect_title'
,
'title arguments'
=>
array
(
'Delete !label'
,
6
),
'description'
=>
'Delete an exiting effect from a style.'
,
'page callback'
=>
'drupal_get_form'
,
'page arguments'
=>
array
(
'image_effect_delete_form'
,
5
,
7
),
...
...
@@ -111,8 +103,6 @@ function image_menu() {
);
$items
[
'admin/config/media/image-styles/edit/%image_style/add/%image_effect_definition'
]
=
array
(
'title'
=>
'Add image effect'
,
'title callback'
=>
'image_effect_title'
,
'title arguments'
=>
array
(
'Add !label effect'
,
6
),
'description'
=>
'Add a new effect to a style.'
,
'page callback'
=>
'drupal_get_form'
,
'page arguments'
=>
array
(
'image_effect_form'
,
5
,
7
),
...
...
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