You are here

function _weight_change in Weight 7

Same name and namespace in other branches
  1. 6 weight.module \_weight_change()

Ajax callback for weight manager page.

1 string reference to '_weight_change'
weight_menu in ./weight.module
Implements hook_menu().

File

./weight.module, line 300
This module uses the sticky column of the node table to add weighting to nodes.

Code

function _weight_change($nid, $weight) {

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