Skip to content

Commit e52f9b6

Browse files
committed
Issue #31: Prevent published content from being labeled as Draft.
1 parent 403f689 commit e52f9b6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

content_moderation.module

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -991,9 +991,11 @@ function content_moderation_form_node_form_alter(&$form, $form_state) {
991991
// Set a moderation state even if there is not one defined.
992992
if (isset($form['#node']->content_moderation['current']->state)) {
993993
$moderation_state = $form['#node']->content_moderation['current']->state;
994+
$current_label = t('@state (Current)', array('@state' => content_moderation_state_label($moderation_state)));
994995
}
995996
else {
996997
$moderation_state = content_moderation_state_none();
998+
$current_label = content_moderation_state_label($moderation_state);
997999
}
9981000

9991001
// Store the current moderation state.
@@ -1011,7 +1013,7 @@ function content_moderation_form_node_form_alter(&$form, $form_state) {
10111013
// Get all the states *this* user can access. If there aren't any, this user
10121014
// can not change the moderation state.
10131015
if ($states = content_moderation_states_next($moderation_state, $user, $form['#node'])) {
1014-
$states[$moderation_state] = t('@state (Current)', array('@state' => content_moderation_state_label($moderation_state)));
1016+
$states[$moderation_state] = $current_label;
10151017
$states_sorted = array();
10161018
foreach (array_keys(content_moderation_states()) as $state) {
10171019
if (array_key_exists($state, $states)) {

0 commit comments

Comments
 (0)