You are here

commons_documents.install in Drupal Commons 7.3

File

modules/commons/commons_documents/commons_documents.install
View source
<?php

/**
 * Set default polls roles upon enable
 */
function commons_documents_enable() {
  $revert = array(
    'commons_documents' => array(
      'og_features_permission',
    ),
  );
  features_revert($revert);
  $groups = og_get_all_group();
  foreach ($groups as $gid) {
    commons_groups_features_permission_rebuild('commons_documents', $gid);
  }
}

/**
 * Disable summary on Document nodes.
 */
function commons_documents_update_7000() {
  $revert = array(
    'commons_documents' => array(
      'field_instance',
    ),
  );
  features_revert($revert);
  return array();
}

/**
 * Disable default frontpage promotion of Document nodes.
 */
function commons_documents_update_7001() {
  $revert = array(
    'commons_documents' => array(
      'variable',
    ),
  );
  features_revert($revert);
  return array();
}

/**
 * Remove unused view displays.
 */
function commons_documents_update_7002() {
  $revert = array(
    'commons_documents' => array(
      'views_view',
    ),
  );
  features_revert($revert);
  return array();
}

/**
 * Standardize Browsing Widget views.
 */
function commons_documents_update_7003() {
  $revert = array(
    'commons_documents' => array(
      'views_view',
    ),
  );
  features_revert($revert);
  return array();
}

/**
 * Display sticky content at top of lists.
 */
function commons_documents_update_7004() {
  $revert = array(
    'commons_documents' => array(
      'views_view',
    ),
  );
  features_revert($revert);
  return array();
}

/**
 * Add .txt to the list of allowed file extensions.
 */
function commons_documents_update_7005() {
  $revert = array(
    'commons_documents' => array(
      'field_instance',
    ),
  );
  features_revert($revert);
  return array();
}

/**
 * Add links to node teasers in the browsing widget.
 */
function commons_documents_update_7006() {
  $revert = array(
    'commons_documents' => array(
      'views_view',
    ),
  );
  features_revert($revert);
  return array();
}

/**
 * Improve the browsing widget empty text.
 */
function commons_documents_update_7007() {
  $revert = array(
    'commons_documents' => array(
      'views_view',
    ),
  );
  features_revert($revert);
  return array();
}

/**
 * Replace the title attribute with the title field in view displays.
 */
function commons_documents_update_7008() {
  $revert = array(
    'commons_documents' => array(
      'views_view',
    ),
  );
  features_revert($revert);
  return array();
}

/**
 * Reset document og permissions automatically, they were not set before now.
 */
function commons_documents_update_7009() {
  $revert = array(
    'commons_documents' => array(
      'og_features_permission',
    ),
  );
  features_revert($revert);
  $groups = og_get_all_group();
  foreach ($groups as $gid) {
    commons_groups_features_permission_rebuild('commons_documents', $gid);
  }
  return array();
}

/**
 * Standardize browsing widget field weights.
 */
function commons_documents_update_7010() {
  $revert = array(
    'commons_documents' => array(
      'field_instance',
    ),
  );
  features_revert($revert);
  return array();
}

Functions

Namesort descending Description
commons_documents_enable Set default polls roles upon enable
commons_documents_update_7000 Disable summary on Document nodes.
commons_documents_update_7001 Disable default frontpage promotion of Document nodes.
commons_documents_update_7002 Remove unused view displays.
commons_documents_update_7003 Standardize Browsing Widget views.
commons_documents_update_7004 Display sticky content at top of lists.
commons_documents_update_7005 Add .txt to the list of allowed file extensions.
commons_documents_update_7006 Add links to node teasers in the browsing widget.
commons_documents_update_7007 Improve the browsing widget empty text.
commons_documents_update_7008 Replace the title attribute with the title field in view displays.
commons_documents_update_7009 Reset document og permissions automatically, they were not set before now.
commons_documents_update_7010 Standardize browsing widget field weights.