non security modules update
This commit is contained in:
@@ -101,4 +101,24 @@ function imce_update_7001(&$sandbox) {
|
||||
db_drop_table('imce_files');
|
||||
return t('Migrated IMCE files.');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fixes misconfigurations where anonymous user is given User-1 profile
|
||||
*/
|
||||
function imce_update_7002() {
|
||||
$roles = variable_get('imce_roles_profiles', array());
|
||||
$rid = DRUPAL_ANONYMOUS_RID;
|
||||
if (!empty($roles[$rid])) {
|
||||
$update = FALSE;
|
||||
foreach ($roles[$rid] as $key => $value) {
|
||||
if ($value == 1 && substr($key, -4) == '_pid') {
|
||||
$roles[$rid][$key] = '0';
|
||||
$update = TRUE;
|
||||
}
|
||||
}
|
||||
if ($update) {
|
||||
variable_set('imce_roles_profiles', $roles);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user