You are here

function imce_unzip_install in IMCE unzip 7

Same name and namespace in other branches
  1. 6 imce_unzip.install \imce_unzip_install()

Implements hook_install().

File

./imce_unzip.install, line 11
Install, update and uninstall functions for the IMCE_unzip module.

Code

function imce_unzip_install() {

  // Update profiles. add unzip settings.
  $profiles = variable_get('imce_profiles', array());
  foreach ($profiles as $i => $profile) {
    foreach ($profile['directories'] as $j => $directory) {
      $profiles[$i]['directories'][$j]['unzip'] = $i == 1 ? 1 : 0;
    }
  }
  variable_set('imce_profiles', $profiles);

  // Register custom content function.
  $funcs = variable_get('imce_custom_content', array());
  $funcs['imce_unzip_content'] = 1;
  variable_set('imce_custom_content', $funcs);

  // Register custom profile process.
  $funcs = variable_get('imce_custom_process', array());
  $funcs['imce_unzip_process_profile'] = 1;
  variable_set('imce_custom_process', $funcs);
}