/[drupal]/contributions/modules/workflow/workflow.module
ViewVC logotype

Diff of /contributions/modules/workflow/workflow.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.63, Fri Aug 1 02:29:46 2008 UTC revision 1.64, Fri Aug 1 03:33:11 2008 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: workflow.module,v 1.62 2008/07/31 22:22:52 jvandyk Exp $  // $Id: workflow.module,v 1.63 2008/08/01 02:29:46 jvandyk Exp $
3    
4  define('WORKFLOW_CREATION', 1);  define('WORKFLOW_CREATION', 1);
5  define('WORKFLOW_CREATION_DEFAULT_WEIGHT', -50);  define('WORKFLOW_CREATION_DEFAULT_WEIGHT', -50);
# Line 556  function workflow_form_alter(&$form, $fo Line 556  function workflow_form_alter(&$form, $fo
556      $choices = workflow_field_choices($node);      $choices = workflow_field_choices($node);
557      $wid = workflow_get_workflow_for_type($node->type);      $wid = workflow_get_workflow_for_type($node->type);
558      $states = workflow_get_states($wid);      $states = workflow_get_states($wid);
559      $current = workflow_node_current_state($node);      // If this is a preview, the current state should come from
560        // the form values, not the node, as the user may have changed
561        // the state.
562        $current = isset($form_state['values']['workflow']) ? $form_state['values']['workflow'] : workflow_node_current_state($node);
563      $min = $states[$current] == t('(creation)') ? 1 : 2;      $min = $states[$current] == t('(creation)') ? 1 : 2;
564      // Stop if user has no new target state(s) to choose.      // Stop if user has no new target state(s) to choose.
565      if (count($choices) < $min) {      if (count($choices) < $min) {
# Line 1127  function workflow_edit_form($form_state, Line 1130  function workflow_edit_form($form_state,
1130    $form['permissions'] = array(    $form['permissions'] = array(
1131      '#type' => 'fieldset',      '#type' => 'fieldset',
1132      '#title' => t('Permissions Summary'),      '#title' => t('Permissions Summary'),
1133        '#collapsible' => TRUE,
1134    );    );
1135    $form['permissions']['summary'] = array(    $form['permissions']['summary'] = array(
1136      '#value' => workflow_permissions($workflow->wid),      '#value' => workflow_permissions($workflow->wid),

Legend:
Removed from v.1.63  
changed lines
  Added in v.1.64

  ViewVC Help
Powered by ViewVC 1.1.2