_node_mass_update_helper

Versions
6 – 7
_node_mass_update_helper($nid, $updates)

Node Mass Update - helper function.

▾ 2 functions call _node_mass_update_helper()

node_mass_update in modules/node/node.admin.inc
Make mass update of nodes, changing all nodes in the $nodes array to update them with the field values in $updates.
_node_mass_update_batch_process in modules/node/node.admin.inc
Node Mass Update Batch operation

Code

modules/node/node.admin.inc, line 378

<?php
function _node_mass_update_helper($nid, $updates) {
  $node = node_load($nid, NULL, TRUE);
  foreach ($updates as $name => $value) {
    $node->$name = $value;
  }
  node_save($node);
  return $node;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.