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

Diff of /contributions/modules/acl/acl.module

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

revision 1.19, Fri Feb 20 21:46:00 2009 UTC revision 1.20, Sun Oct 18 23:37:41 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: acl.module,v 1.18 2009/01/27 01:17:33 salvis Exp $  // $Id: acl.module,v 1.19 2009/02/20 21:46:00 salvis Exp $
3    
4  /**  /**
5   * @file acl.module   * @file
6     * An API module providing by-user access control lists.
7   *   *
8   * This module handles ACLs on behalf of other modules. The two main reasons   * This module handles ACLs on behalf of other modules. The two main reasons
9   * to do this are so that modules using ACLs can share them with each   * to do this are so that modules using ACLs can share them with each
# Line 79  function acl_node_clear_acls($nid, $modu Line 80  function acl_node_clear_acls($nid, $modu
80      $acls[] = $o->acl_id;      $acls[] = $o->acl_id;
81    }    }
82    if ($acls) {    if ($acls) {
83      db_query("DELETE FROM {acl_node} WHERE nid = %d AND acl_id in (%s)", $nid,      db_query("DELETE FROM {acl_node} WHERE nid = %d AND acl_id IN (". db_placeholders($acls) .")", array_merge(array($nid), $acls));
       implode(',', $acls));  
84    }    }
85  }  }
86    
# Line 153  function acl_node_grants($account, $op) Line 153  function acl_node_grants($account, $op)
153  }  }
154    
155  /**  /**
156   * Implementation of hook_nodeapi   * Implementation of hook_nodeapi().
157   */   */
158  function acl_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) {  function acl_nodeapi(&$node, $op, $teaser = NULL, $page = NULL) {
159    switch ($op) {    switch ($op) {
# Line 164  function acl_nodeapi(&$node, $op, $tease Line 164  function acl_nodeapi(&$node, $op, $tease
164  }  }
165    
166  /**  /**
167   * Implementation of hook_user   * Implementation of hook_user().
168   */   */
169  function acl_user($op, &$edit, &$account, $category = NULL) {  function acl_user($op, &$edit, &$account, $category = NULL) {
170    switch ($op) {    switch ($op) {
# Line 175  function acl_user($op, &$edit, &$account Line 175  function acl_user($op, &$edit, &$account
175  }  }
176    
177  /**  /**
178   * Implementation of hook_node_access_explain   * Implementation of hook_node_access_explain().
179   */   */
180  function acl_node_access_explain($row) {  function acl_node_access_explain($row) {
181    static $interpretations = array();    static $interpretations = array();

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20

  ViewVC Help
Powered by ViewVC 1.1.2