? acl-get_acl_by_nid.patch
Index: acl.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/acl/acl.module,v
retrieving revision 1.20.2.1
diff -u -p -r1.20.2.1 acl.module
--- acl.module	18 Feb 2010 14:40:38 -0000	1.20.2.1
+++ acl.module	12 Apr 2010 08:06:08 -0000
@@ -85,6 +85,18 @@ function acl_node_clear_acls($nid, $modu
 }
 
 /**
+ * Gets the ids of acls by nid
+ */
+function acl_get_ids_by_nid($module, $nid) {
+  $result = db_query("SELECT acl_id FROM {acl_node} WHERE module = '%s' AND 'nid = %d", $module, $nid);
+  $return = array();
+  while ($row = db_fetch_object($result)) {
+    $return[$row->acl_id] = $row->acl_id;
+  }
+  return (empty($return) ? NULL : $return);
+}
+
+/**
  * Gets the id of an acl
  */
 function acl_get_id_by_name($module, $name) {
