summaryrefslogtreecommitdiff
path: root/modules/book.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/book.module')
-rw-r--r--modules/book.module22
1 files changed, 2 insertions, 20 deletions
diff --git a/modules/book.module b/modules/book.module
index 04b0eb280..d5e5c0f93 100644
--- a/modules/book.module
+++ b/modules/book.module
@@ -154,10 +154,6 @@ function book_save($edit) {
node_save(array_diff(array_merge($edit, array(nid => $edit[nid], type => "book")), array(userid => $edit[userid])));
}
-function book_delete($id) {
- return ($node = node_del("nid", $id) ? "book page has been deleted" : "failed to delete book page: change status to 'dumped' first");
-}
-
function book_tree($parent = "") {
global $PHP_SELF, $status;
@@ -166,7 +162,7 @@ function book_tree($parent = "") {
$output .= "<UL>";
while ($node = db_fetch_object($result)) {
$output .= "<LI><A HREF=\"node.php?id=$node->nid\">". check_output($node->title) ."</A>";
- if ($PHP_SELF == "/admin.php") $output .= " <SMALL>(weight: $node->weight/$node->parent, status: $node->status) (<A HREF=\"admin.php?mod=book&op=edit&id=$node->nid\">edit</A>, <A HREF=\"admin.php?mod=book&op=delete&id=$node->nid\">delete</A>)</SMALL>\n";
+ if ($PHP_SELF == "/admin.php") $output .= " <SMALL>(weight: $node->weight/$node->parent, status: $node->status) (<A HREF=\"admin.php?mod=book&op=edit&id=$node->nid\">edit</A>)</SMALL>\n";
if ($node->pid) $output .= book_tree($node->pid);
$output .= book_tree($node->nid);
}
@@ -175,17 +171,7 @@ function book_tree($parent = "") {
}
function book_list() {
- global $status;
-
- $result = db_query("SELECT n.*, b.* FROM node n LEFT JOIN book b ON n.nid = b.nid AND n.lid = b.lid WHERE n.type = 'book' AND n.status != '$status[expired]' ORDER BY n.timestamp DESC");
-
- $output .= "<TABLE BORDER=\"1\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n";
- $output .= " <TR><TH>node</TH><TH>status</TH><TH>date</TH><TH COLSPAN=\"3\">operations</TH></TR>\n";
- while ($node = db_fetch_object($result)) {
- $output .= " <TR><TD><A HREF=\"node.php?id=$node->nid\">". check_output($node->title) ."</A></TD><TD>$node->status</TD><TD>". format_date($node->timestamp, "small") ."</TD><TD><A HREF=\"node.php?id=$node->nid\">view</A></TD><TD><A HREF=\"admin.php?mod=book&op=edit&id=$node->nid\">edit</A></TD><TD><A HREF=\"admin.php?mod=book&op=delete&id=$node->nid\">delete</A></TD>";
- }
- $output .= "</TABLE>\n";
- return $output;
+ return node_overview("type = 'book'");
}
function book_admin() {
@@ -197,10 +183,6 @@ function book_admin() {
case "add":
print book_form();
break;
- case "delete":
- print book_delete($id);
- print book_tree();
- break;
case "list":
print book_list();
break;