diff options
author | Dries Buytaert <dries@buytaert.net> | 2004-02-15 20:09:46 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2004-02-15 20:09:46 +0000 |
commit | 4b0b2d02eecaa27e3162a0fad9d31bb08f4df53b (patch) | |
tree | cf369f7370c1be045e3d48e7a9beb26d1d0f3714 /modules/book.module | |
parent | ae5136e51b87b414c737f4726c367c18db79fc49 (diff) | |
download | brdo-4b0b2d02eecaa27e3162a0fad9d31bb08f4df53b.tar.gz brdo-4b0b2d02eecaa27e3162a0fad9d31bb08f4df53b.tar.bz2 |
- Patch by Steven: removed redundant permission checks. These are no longer
required thanks to the new 404 handling.
Diffstat (limited to 'modules/book.module')
-rw-r--r-- | modules/book.module | 45 |
1 files changed, 20 insertions, 25 deletions
diff --git a/modules/book.module b/modules/book.module index 92abb07db..7ef8b4019 100644 --- a/modules/book.module +++ b/modules/book.module @@ -841,33 +841,28 @@ function book_admin() { $op = $_POST["op"]; $edit = $_POST["edit"]; - if (user_access("administer nodes")) { - if (empty($op)) { - $op = arg(3); - } - - switch ($op) { - case t("Edit book outline"): - case t("Add to book outline"): - case t("Remove from book outline"): - case t("Update book outline"): - $output = book_node_link(); - break; - case "orphan": - $output = book_admin_orphan(); - break; - case t("Save book pages"): - drupal_set_message(book_admin_save(arg(3), $edit)); - // fall through: - default: - $output .= book_admin_view(arg(3)); - break; - } - print theme("page", $output); + if (empty($op)) { + $op = arg(3); } - else { - print theme("page", message_access()); + + switch ($op) { + case t("Edit book outline"): + case t("Add to book outline"): + case t("Remove from book outline"): + case t("Update book outline"): + $output = book_node_link(); + break; + case "orphan": + $output = book_admin_orphan(); + break; + case t("Save book pages"): + drupal_set_message(book_admin_save(arg(3), $edit)); + // fall through: + default: + $output .= book_admin_view(arg(3)); + break; } + print theme("page", $output); } function book_help($section = "admin/help#book") { |