/[drupal]/contributions/modules/booktree/booktree.module
ViewVC logotype

Diff of /contributions/modules/booktree/booktree.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.5.2.1, Wed Jun 10 17:41:19 2009 UTC revision 1.5.2.2, Sat Jul 4 16:09:16 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: booktree.module,v 1.10 2007/09/30 20:48:24 uccio Exp $  // $Id: booktree.module,v 1.5.2.1 2009/06/10 17:41:19 heine Exp $
3    
4    
5  function booktree_help($section) {  function booktree_help($section) {
# Line 28  function booktree_menu($may_cache) { Line 28  function booktree_menu($may_cache) {
28        'access' => user_access('access booktree'));        'access' => user_access('access booktree'));
29    
30      $items[] = array('path' => 'admin/settings/booktree',      $items[] = array('path' => 'admin/settings/booktree',
31        'title' => t('Settings of BookTree'),        'title' => t('BookTree'),
32        'type' => MENU_NORMAL_ITEM,        'type' => MENU_NORMAL_ITEM,
33            'description' => t('Manage the tree-view of book.'),        'description' => t('Manage the tree-view of book.'),
34            'callback' => 'drupal_get_form',        'callback' => 'drupal_get_form',
35        'callback arguments' => array('booktree_configure'),        'callback arguments' => array('booktree_configure'),
36        'access' => user_access('administer site configuration'),        'access' => user_access('administer site configuration'),
37        'weight' => 2,  
38      );      );
39          }          }
40          else {          else {
# Line 112  function booktree_indice() { Line 112  function booktree_indice() {
112  function booktree_mostra_figli( $nid,$tit,$ricursione,$maxricursione,$trimval,$booktree_start ) {  function booktree_mostra_figli( $nid,$tit,$ricursione,$maxricursione,$trimval,$booktree_start ) {
113          if ($ricursione<$maxricursione)          if ($ricursione<$maxricursione)
114                  {                  {
115                  $children = db_query(db_rewrite_sql('SELECT distinct n.nid, b.weight, n.title FROM {node} n INNER JOIN {book} b ON n.nid = b.nid and n.vid = b.vid WHERE b.parent = %d ORDER BY b.weight, n.title'), $nid);                  $sql = 'SELECT distinct n.nid, b.weight, n.title
116                FROM {node} n
117                  INNER JOIN {book} b ON n.nid = b.nid and n.vid = b.vid
118                WHERE b.parent = %d  AND status = 1
119                ORDER BY b.weight, n.title';
120        $children = db_query(db_rewrite_sql($sql), $nid);
121      if ($nid != $booktree_start) {      if ($nid != $booktree_start) {
122                    $content .= "<li class=\"booktree\">" . l(truncate_utf8($tit, $trimval, TRUE, TRUE),'node/'.$nid , $attributes = array(), $query = NULL, $fragment = NULL, $absolute = FALSE, $html = FALSE ) ."</li>";                    $content .= "<li class=\"booktree\">" . l(truncate_utf8($tit, $trimval, TRUE, TRUE),'node/'.$nid , $attributes = array(), $query = NULL, $fragment = NULL, $absolute = FALSE, $html = FALSE ) ."</li>";
123                    }                    }

Legend:
Removed from v.1.5.2.1  
changed lines
  Added in v.1.5.2.2

  ViewVC Help
Powered by ViewVC 1.1.2