function _node_gallery_set_imagecache_permissions in Node Gallery 6
Same name and namespace in other branches
- 6.2 node_gallery.install \_node_gallery_set_imagecache_permissions()
2 calls to _node_gallery_set_imagecache_permissions()
- node_gallery_install in ./
node_gallery.install - Implementation of hook_install()
- node_gallery_update_6100 in ./
node_gallery.install - Implementation of hook_update_N() Directly installing the default imagecache presets
File
- ./
node_gallery.install, line 283 - Node gallery install file.
Code
function _node_gallery_set_imagecache_permissions() {
$query = db_query("SELECT rid, perm FROM {permission} ORDER BY rid");
while ($role = db_fetch_object($query)) {
$role->perm .= ', view imagecache node-gallery-cover, view imagecache node-gallery-thumbnail, view imagecache node-gallery-display';
update_sql("UPDATE {permission} SET perm = '{$role->perm}' WHERE rid = {$role->rid}");
}
}