You are here

public function StateFlow::set_principle_revision in State Machine 7.2

Same name and namespace in other branches
  1. 6 modules/state_flow/plugins/state_flow.inc \StateFlow::set_principle_revision()
  2. 7 modules/state_flow/plugins/state_flow.inc \StateFlow::set_principle_revision()
1 call to StateFlow::set_principle_revision()
StateFlow::on_enter_published in modules/state_flow/plugins/state_flow.inc

File

modules/state_flow/plugins/state_flow.inc, line 331

Class

StateFlow

Code

public function set_principle_revision() {
  $nid = $this->object->nid;
  $vid = $this
    ->get_latest_revision($nid);
  $result = db_update('node_revision_states')
    ->fields(array(
    'status' => 0,
  ))
    ->condition('nid', $nid)
    ->condition('vid', $vid, '!=')
    ->execute();
}