function twitter_update_6514 in Twitter 6.5
Add the new "administer twitter" permission to all roles that have the "administer site configuration" permission.
File
- ./
twitter.install, line 1097 - Install, update and uninstall functions for the twitter module.
Code
function twitter_update_6514() {
$ret = array();
$result = db_query("SELECT rid\n FROM {permission}\n WHERE perm = 'administer site configuration'");
while ($row = db_fetch_object($result)) {
$record = new StdClass();
$record->rid = $row->rid;
$record->perm = 'administer twitter';
$record->tid = 0;
drupal_write_record('permission', $record);
}
// Also reload the menus so the new permission is adopted.
menu_rebuild();
return $ret;
}