Revision 2b3c8cc1
Added by Assos Assos about 9 years ago
drupal7/sites/all/modules/media/modules/media_wysiwyg/media_wysiwyg.install | ||
---|---|---|
18 | 18 |
variable_del('media_wysiwyg_wysiwyg_allowed_attributes'); |
19 | 19 |
variable_del('media_wysiwyg_wysiwyg_browser_plugins'); |
20 | 20 |
} |
21 |
|
|
22 |
/** |
|
23 |
* Implements hook_update_dependencies(). |
|
24 |
*/ |
|
25 |
function media_wysiwyg_update_dependencies() { |
|
26 |
// Ensure the "access media browser" permission is granted to users before |
|
27 |
// using it to grant the "use media wysiwyg" permission. |
|
28 |
$dependencies['media_wysiwyg'][7201] = array( |
|
29 |
'media' => 7226, |
|
30 |
); |
|
31 |
} |
|
32 |
|
|
33 |
/** |
|
34 |
* Grant existing user access to new media wysiwyg permission. |
|
35 |
*/ |
|
36 |
function media_wysiwyg_update_7201() { |
|
37 |
$roles = user_roles(TRUE, 'access media browser'); |
|
38 |
foreach ($roles as $rid => $role) { |
|
39 |
user_role_grant_permissions($rid, array('use media wysiwyg')); |
|
40 |
} |
|
41 |
|
|
42 |
return t('Use Media WYSIWYG permission was granted to: @roles.', array( |
|
43 |
'@roles' => check_plain(implode(', ', $roles)), |
|
44 |
)); |
|
45 |
} |
|
46 |
|
|
47 |
/** |
|
48 |
* Use the legacy file entity rendering method for existing sites. |
|
49 |
* |
|
50 |
* Existing sites can change this setting at admin/config/media/browser. |
|
51 |
*/ |
|
52 |
function media_wysiwyg_update_7202() { |
|
53 |
variable_set('media_wysiwyg_default_render', 'field_attach'); |
|
54 |
} |
Also available in: Unified diff
Weekly update of contrib modules