You are here

function _change_weight in Weight 5

1 string reference to '_change_weight'
weight_menu in ./weight.module
Implementation of hook_menu().

File

./weight.module, line 405

Code

function _change_weight($nid, $weight) {

  // Doing it this way preserves the revision information.
  $node = node_load($nid);
  $node->node_weight = $weight;
  node_submit($node);
  node_save($node);
}