You are here

function book_admin_overview in Drupal 4

Same name and namespace in other branches
  1. 5 modules/book/book.module \book_admin_overview()
  2. 6 modules/book/book.admin.inc \book_admin_overview()
  3. 7 modules/book/book.admin.inc \book_admin_overview()

Returns an administrative overview of all books.

1 call to book_admin_overview()
book_admin in modules/book.module
Menu callback; displays the book administration page.

File

modules/book.module, line 988
Allows users to collaboratively author a book.

Code

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/node/book/{$book->nid}"),
    );
  }
  $headers = array(
    t('Book'),
    t('Operations'),
  );
  return theme('table', $headers, $rows);
}