You are here

imce.install in IMCE 6

Same filename and directory in other branches
  1. 8.2 imce.install
  2. 8 imce.install
  3. 6.2 imce.install
  4. 7 imce.install

File

imce.install
View source
<?php

/**
 * Implementation of hook_install().
 */
function imce_install() {
  include_once './' . drupal_get_path('module', 'imce') . '/inc/core_profiles.inc';
  imce_install_profiles();
}

/**
 * Implementation of hook_uninstall().
 */
function imce_uninstall() {
  variable_del('imce_profiles');
  variable_del('imce_roles_profiles');
  variable_del('imce_settings_textarea');
  variable_del('imce_settings_absurl');
  variable_del('imce_settings_replace');
  variable_del('imce_settings_disable_private');
  variable_del('imce_custom_content');
  variable_del('imce_custom_process');
  variable_del('imce_custom_scan');
}

/**
 * Update from 5.x to 6.x.
 */
function imce_update_6000() {
  imce_install();
  return array();
}

/**
 * New option: total user quota.
 */
function imce_update_6001() {
  $profiles = variable_get('imce_profiles', array());
  foreach ($profiles as $id => $profile) {
    $profiles[$id]['tuquota'] = 0;
  }
  variable_set('imce_profiles', $profiles);
  return array();
}

/**
 * Make file browser tab optional in user profiles.
 */
function imce_update_6002() {
  $profiles = variable_get('imce_profiles', array());
  foreach ($profiles as $id => $profile) {
    $profiles[$id]['usertab'] = isset($profiles[$id]['usertab']) ? $profiles[$id]['usertab'] : 1;
  }
  variable_set('imce_profiles', $profiles);
  return array(
    array(
      'success' => TRUE,
      'query' => 'File browser tab in user profiles was made optional.',
    ),
  );
}

Functions

Namesort descending Description
imce_install Implementation of hook_install().
imce_uninstall Implementation of hook_uninstall().
imce_update_6000 Update from 5.x to 6.x.
imce_update_6001 New option: total user quota.
imce_update_6002 Make file browser tab optional in user profiles.