summaryrefslogtreecommitdiff
path: root/modules/book.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2001-03-31 17:56:12 +0000
committerDries Buytaert <dries@buytaert.net>2001-03-31 17:56:12 +0000
commit6ca6e831b6593a04c017cbb8687a47247bf9559f (patch)
treefa3c6e7e25eeab401f42d94efffe94fc2dd3d20e /modules/book.module
parent74fe7990d2f05089bf699236e2191c41cdcdf8b1 (diff)
downloadbrdo-6ca6e831b6593a04c017cbb8687a47247bf9559f.tar.gz
brdo-6ca6e831b6593a04c017cbb8687a47247bf9559f.tar.bz2
- fixed bug in section.module: id -> nid
- fixed bug in book.module: not 100% yet
Diffstat (limited to 'modules/book.module')
-rw-r--r--modules/book.module4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/book.module b/modules/book.module
index 59c1b35d4..6c42604a2 100644
--- a/modules/book.module
+++ b/modules/book.module
@@ -95,9 +95,11 @@ function book_form($edit = array()) {
$output .= format_username(($edit[userid] ? $edit[userid] : $user->userid)) ."<P>\n";
if ($edit[pid]) {
+ print "parent: $edit[parent]<BR>";
$node = node_get_object("nid", $edit[pid]);
$output .= "<B>". t("Parent") .":</B><BR>\n";
$output .= "<A HREF=\"node.php?id=$node->id\">". check_output($node->title) ."</A><P>\n";
+ $output .= "<INPUT TYPE=\"hidden\" NAME=\"edit[parent]\" VALUE=\"$edit[parent]\">\n";
$output .= "<SMALL><I>". t("The parent subject or category the new page belongs in.") ."</I></SMALL><P>\n";
}
else {
@@ -155,7 +157,7 @@ function book_form($edit = array()) {
}
function book_save($edit) {
- node_save(array_diff(array_merge($edit, array(nid => $edit[nid], type => "book")), array(userid => $edit[userid])));
+ $id = node_save(array_diff(array_merge($edit, array(nid => $edit[nid], type => "book")), array(userid => $edit[userid])));
}
function book_delete($id) {