Having problems installing Drupal? See the Installation Guide for more information.

Problems with book.module

I have a site that uses Drupal 4.3.0, I have given authenicated users "maintain books" access but they don't have "access admin pages" access. This used to work well (or nobody complained about it when I was using 4.2.0) until I upgraded.

The problem was that the book.module admin pages appear in the navigation menu for authenicated user and when they clicked on them they'd get an access denied error because they don't have the "access admin pages" right.

I looked through the book.module code and found the following in the book_link function:

if ($type == "system") {
  if (user_access("maintain books")) {
    menu("node/add/book", t("book page"), "book_page", 0);
    menu("admin/node/book", t("books"), "book_admin", 4);
    menu("admin/node/book/orphan", t("orphan pages"), "book_admin_orphan", 8);
    menu("admin/node/book/help", t("help"), "book_help", 9);

    $result = db_query("SELECT n.nid, n.title FROM {node} n INNER JOIN {book} b ON n.nid = b.nid WHERE b.parent = 0 ORDER BY b.weight, n.title");
    while ($book = db_fetch_object($result)) {
      menu("admin/node/book/$book->nid", t("'%title' book", array("%title" => $book->title)), "book_admin");
    }
  }
}

The problem was that people with "maintain books" gets to see the admin pages for it, so I went and changed the if statement to this and it seems to work fine.

if ((user_access("maintain books")) && (user_access("access administration pages"))) {

Now people with maintain books can't see the admin pages for the books, any better solutions or did I do something seriously wrong?

how to modify xtemplate to fixed width?

can anyone help me?
thx!

error in title

i use multibyte char in my drupal, but all thread in frontpage have a error show of title:
the first char is what i cannot recognized char,but it is ok on content admin page,why?

where do the frontpage title was formated?

How can i log in?

i have a trouble,
i installed drupal-4.3.0 at /var/www/html/drupal-4.3.0,but i can not log in enven i enter the right password.it went to a url like "http://drupal.linkqhd.com/?q=node&PHPSESSID=8f534d37640e9dd5a246d7dab475...",and showed "Access denied",i have double checked the line of $base_url = "http://drupal.linkqhd.com" in "conf.php" and the lines"
NameVirtualHost 192.168.2.110

A error occured after locales module was active

this error is on admin page,the homepage is ok

warning: Wrong datatype for first argument in call to array_key_exists in d:\server\dup\modules\locale.module on line 343.

Adding topic icons

Hi all,

I'd like to know what's the correct way to publish topic icons, so depending upon the taxonomy of a story, appear a different icon.

http://www.kerneltrap.com/ is a good site to show what I want to do.

Thank you very much.

Pages

Subscribe with RSS Subscribe to RSS - Installing Drupal