book_admin_overview

Versions
4.7 – 7
book_admin_overview()

Returns an administrative overview of all books.

▾ 1 function calls book_admin_overview()

book_admin in modules/book/book.module
Menu callback; displays the book administration page.

Code

modules/book/book.module, line 968

<?php
function book_admin_overview() {
  $result = db_query(db_rewrite_sql('SELECT n.nid, n.title, b.weight FROM {node} n INNER JOIN {book} b ON n.vid = b.vid WHERE b.parent = 0 ORDER BY b.weight, n.title'));
  while ($book = db_fetch_object($result)) {
    $rows[] = array(l($book->title, "node/$book->nid"), l(t('outline'), "admin/content/book/$book->nid"));
  }
  $headers = array(t('Book'), t('Operations'));

  return theme('table', $headers, $rows);
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.