| 1 |
<?php |
<?php |
| 2 |
// $Id: workflow.pages.inc,v 1.2 2008/10/29 03:13:55 jvandyk Exp $ |
// $Id: workflow.pages.inc,v 1.2.2.1 2009/10/23 15:02:38 jvandyk Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 45 |
} |
} |
| 46 |
else { |
else { |
| 47 |
// Regular state. |
// Regular state. |
| 48 |
$state_name = $states[$history->sid]; |
$state_name = check_plain(t($states[$history->sid])); |
| 49 |
} |
} |
| 50 |
|
|
| 51 |
if (isset($deleted_states[$history->old_sid])) { |
if (isset($deleted_states[$history->old_sid])) { |
| 53 |
$footer_needed = TRUE; |
$footer_needed = TRUE; |
| 54 |
} |
} |
| 55 |
else { |
else { |
| 56 |
$old_state_name = $states[$history->old_sid]; |
$old_state_name = check_plain(t($states[$history->old_sid])); |
| 57 |
} |
} |
| 58 |
$rows[] = theme('workflow_history_table_row', $history, $old_state_name, $state_name); |
$rows[] = theme('workflow_history_table_row', $history, $old_state_name, $state_name); |
| 59 |
} |
} |
| 64 |
|
|
| 65 |
/* |
/* |
| 66 |
* Theme one workflow history table row. |
* Theme one workflow history table row. |
| 67 |
|
* |
| 68 |
|
* $old_state_name and $state_name must be run through check_plain(t()) prior |
| 69 |
|
* to calling this theme function. |
| 70 |
*/ |
*/ |
| 71 |
function theme_workflow_history_table_row($history, $old_state_name, $state_name) { |
function theme_workflow_history_table_row($history, $old_state_name, $state_name) { |
| 72 |
return array( |
return array( |
| 73 |
format_date($history->stamp), |
format_date($history->stamp), |
| 74 |
check_plain(t($old_state_name)), |
$old_state_name, |
| 75 |
check_plain(t($state_name)), |
$state_name, |
| 76 |
theme('username', $history), |
theme('username', $history), |
| 77 |
filter_xss($history->comment, array('a', 'em', 'strong')), |
filter_xss($history->comment, array('a', 'em', 'strong')), |
| 78 |
); |
); |