web/drupal/modules/imce/imce.install
branchdrupal
changeset 74 0ff3ba646492
equal deleted inserted replaced
73:fcf75e232c5b 74:0ff3ba646492
       
     1 <?php
       
     2 // $Id: imce.install,v 1.2.2.2 2008/04/17 23:38:24 ufku Exp $
       
     3 
       
     4 /**
       
     5  * Implementation of hook_install().
       
     6  */
       
     7 function imce_install() {
       
     8   include_once './'. drupal_get_path('module', 'imce') .'/inc/core_profiles.inc';
       
     9   imce_install_profiles();
       
    10 }
       
    11 
       
    12 /**
       
    13  * Implementation of hook_uninstall().
       
    14  */
       
    15 function imce_uninstall() {
       
    16   variable_del('imce_profiles');
       
    17   variable_del('imce_roles_profiles');
       
    18   variable_del('imce_settings_textarea');
       
    19   variable_del('imce_settings_absurl');
       
    20   variable_del('imce_settings_replace');
       
    21   variable_del('imce_custom_content');
       
    22   variable_del('imce_custom_process');
       
    23   variable_del('imce_custom_scan');
       
    24 }
       
    25 
       
    26 /**
       
    27  * Update from 5.x to 6.x.
       
    28  */
       
    29 function imce_update_6000() {
       
    30   imce_install();
       
    31   return array();
       
    32 }
       
    33 
       
    34 /**
       
    35  * New option: total user quota.
       
    36  */
       
    37 function imce_update_6001() {
       
    38   $profiles = variable_get('imce_profiles', array());
       
    39   foreach ($profiles as $id => $profile) {
       
    40     $profiles[$id]['tuquota'] = 0;
       
    41   }
       
    42   variable_set('imce_profiles', $profiles);
       
    43   return array();
       
    44 }