groups/modules/commons/commons_content_moderation/commons_content_moderation.install
Marton Kiss de51d9b4f0 Upgrade commons modules to upstream version
Upgrade the commons modules to version 3.15, see release notes
here: https://www.drupal.org/node/2292227

The upgrade contains the following custom patches:
- 0001-utility-links-block-install-theme.patch

Change-Id: Ia3f385d56171d3ea0983fb2c39916dd176e0af6d
2014-07-21 15:34:31 +02:00

51 lines
1.3 KiB
Plaintext

<?php
/**
* Change content moderation views permission.
*/
function commons_content_moderation_update_7001() {
$revert = array(
'commons_content_moderation' => array('views_view'),
);
features_revert($revert);
return array();
}
/**
* Clear views cache to have content moderation view use new permission.
*/
function commons_content_moderation_update_7002() {
cache_clear_all('*', 'cache_views', TRUE);
}
/**
* Replace the title attribute with the title field in view displays.
*/
function commons_content_moderation_update_7003() {
$revert = array(
'commons_content_moderation' => array('views_view'),
);
features_revert($revert);
return array();
}
/**
* Delete any copies of the Flag Abuse default flags stored in the database in
* order to allow alterations to take effect.
*/
function commons_content_moderation_update_7004() {
// The Flag module automatically copies module-provided default flags into the
// database for performance reasons.
// Delete the Flag Abuse default flags from the database in order to have the
// default flag alterations take effect.
foreach (array('abuse_user', 'abuse_comment', 'abuse_node', 'abuse_whitelist_comment', 'abuse_whitelist_node', 'abuse_whitelist_user') as $abuse_flag) {
$flag = flag_get_flag($abuse_flag);
if($flag) {
$flag->delete();
}
}
return array();
}