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

Diff of /contributions/modules/shazamgallery/shazamgallery.module

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

revision 1.23 by ber, Thu Mar 23 19:32:25 2006 UTC revision 1.24 by ber, Tue May 2 15:15:19 2006 UTC
# Line 72  function shazamgallery_menu($may_cache) Line 72  function shazamgallery_menu($may_cache)
72                       'access' => user_access('access content'),                       'access' => user_access('access content'),
73                       'type' => MENU_SUGGESTED_ITEM,                       'type' => MENU_SUGGESTED_ITEM,
74                       'callback' => 'shazamgallery_fetch');                       'callback' => 'shazamgallery_fetch');
75        $items[] = array('path' => 'node/add/gallery', 'title' => t('gallery'),
76                         'access' => user_access('create gallery'));
77    }    }
78    return $items;    return $items;
79  }  }
# Line 84  function shazamgallery_node_info() { Line 86  function shazamgallery_node_info() {
86  }  }
87    
88  /**  /**
89     * Implementation of hook_access().
90     */
91    function shazamgallery_access($op, $node) {
92      global $user;
93    
94      if ($op == 'create') {
95        return user_access('create gallery');
96      }
97    
98      if ($op == 'update') {
99        if (($node->uid == $user->uid && user_access('edit own gallery'))) {
100          return TRUE;
101        }
102        else {
103           // do nothing. node-access() will determine further access
104        }
105      }
106    }
107    
108    
109    /**
110   * Implementation of hook_form   * Implementation of hook_form
111   */   */
112  function shazamgallery_form(&$node, &$param) {  function shazamgallery_form(&$node, &$param) {

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.24

  ViewVC Help
Powered by ViewVC 1.1.3