function taxonomy_access_fix_update_role_permissions in Taxonomy access fix 7.2
Update the role_permission table with the new vocabulary machine name.
Parameters
string $original: The $original machine_name
string $updated: The updated machine_name
Return value
bool The UpdateQuery result if applicable
2 calls to taxonomy_access_fix_update_role_permissions()
- taxonomy_access_fix_taxonomy_vocabulary_update in ./
taxonomy_access_fix.module - Implements hook_taxonomy_vocabulary_update().
- taxonomy_access_fix_update_7201 in ./
taxonomy_access_fix.install - Permissions use the vocabulary machine name instead of vocabulary id.
File
- ./
taxonomy_access_fix.module, line 205 - This file contains all hooks and callbacks for extra/improved Taxonomy permissions.
Code
function taxonomy_access_fix_update_role_permissions($original, $updated) {
if ($original == $updated) {
return FALSE;
}
return db_update('role_permission')
->condition('module', 'taxonomy_access_fix', '=')
->condition('permission', 'add terms in ' . $original, '=')
->fields(array(
'permission' => 'add terms in ' . $updated,
))
->execute();
}