function _domain_taxonomy_store_grants in Domain Taxonomy 6
Same name and namespace in other branches
- 7.3 domain_taxonomy.module \_domain_taxonomy_store_grants()
- 7 domain_taxonomy.module \_domain_taxonomy_store_grants()
1 call to _domain_taxonomy_store_grants()
File
- ./
domain_taxonomy.module, line 319
Code
function _domain_taxonomy_store_grants($tid, $grants = array()) {
if ($tid > 0 && !empty($grants)) {
db_query("DELETE FROM {domain_taxonomy_access} WHERE tid = %d", $tid);
foreach ($grants as $grant) {
db_query("INSERT INTO {domain_taxonomy_access} (tid, gid, realm, grant_view, grant_update, grant_delete) VALUES (%d, %d, '%s', %d, %d, %d)", $tid, $grant['gid'], $grant['realm'], $grant['grant_view'], $grant['grant_update'], $grant['grant_delete']);
}
}
}