Commit 4847cb22 authored by Dries's avatar Dries

- node_save returns the $nid --> can come in very handy one day :)

parent 2da4122d
......@@ -56,6 +56,8 @@ function node_save($node) {
if ($n->pid && ($node[status] == $status[posted])) db_query("UPDATE node SET status = '$status[expired]' WHERE nid = '$n->pid'");
watchdog("special", "node: modified '$n->title'");
return $node[nid];
}
else {
$duplicate = node_get_object("title", $node[title]);
......@@ -116,8 +118,9 @@ function node_save($node) {
watchdog("warning", "node: added '$node[title]' - failed");
}
}
}
return $nid;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment