Unnamed
public text v1 · immutable$result = db_query("SELECT n.nid FROM {node} n WHERE n.type = 'story'");
while ($row = db_fetch_object($result)) {
$node = node_load(array('nid' => $row->nid));
foreach ($node->taxonomy as $tid => $tag) {
if ($tag->vid == 3) {
$node->taxonomy[$tid]->vid = 5;
$items[] = "updating tag $tag->name(tid: $tid) for $node->title";
}
}
node_save($node);
}
$output .= theme('item_list', $items);
print theme('page', $output);