Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
workflow
Commits
9507ec22
Commit
9507ec22
authored
Nov 28, 2009
by
jvandyk
Browse files
#617620
by serenecloud: run check_plain() only once
parent
bb3e8f0d
Changes
1
Hide whitespace changes
Inline
Side-by-side
workflow.module
View file @
9507ec22
...
...
@@ -179,7 +179,7 @@ function workflow_tab_page($nid) {
}
else
{
// Regular state.
$state_name
=
$states
[
$history
->
sid
];
$state_name
=
check_plain
(
t
(
$states
[
$history
->
sid
]
))
;
}
if
(
isset
(
$deleted_states
[
$history
->
old_sid
]))
{
...
...
@@ -187,7 +187,7 @@ function workflow_tab_page($nid) {
$footer_needed
=
TRUE
;
}
else
{
$old_state_name
=
$states
[
$history
->
old_sid
];
$old_state_name
=
check_plain
(
t
(
$states
[
$history
->
old_sid
]
))
;
}
$rows
[]
=
theme
(
'workflow_history_table_row'
,
$history
,
$old_state_name
,
$state_name
);
}
...
...
@@ -198,12 +198,15 @@ function workflow_tab_page($nid) {
/*
* Theme one workflow history table row.
*
* $old_state_name and $state_name must be run through check_plain(t())
* before calling this function.
*/
function
theme_workflow_history_table_row
(
$history
,
$old_state_name
,
$state_name
)
{
return
array
(
format_date
(
$history
->
stamp
),
check_plain
(
t
(
$old_state_name
))
,
check_plain
(
t
(
$state_name
))
,
$old_state_name
,
$state_name
,
theme
(
'username'
,
$history
),
filter_xss
(
$history
->
comment
,
array
(
'a'
,
'em'
,
'strong'
)),
);
...
...
Write
Preview
Supports
Markdown
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