[ Index ]

PHP Cross Reference of Drupal 6 (gatewave)

title

Body

[close]

/sites/all/modules/jquery_update/ -> jquery_update.install (source)

   1  <?php
   2  // $Id: jquery_update.install,v 1.3.4.1 2009/04/23 18:15:57 mfer Exp $
   3  
   4  /**
   5   * @file
   6   * Install file for jQuery Update.
   7   */
   8  
   9  /**
  10   * Implementation of hook_requirements().
  11   */
  12  function jquery_update_requirements($phase) {
  13    $requirements = array();
  14    $t = get_t();
  15  
  16    if ($phase == 'runtime') {
  17      $requirements['jquery_update'] = array(
  18        'title' => $t('jQuery Update'),
  19        'severity' => REQUIREMENT_OK,
  20        'value' => jquery_update_get_version(),
  21      );
  22    }
  23  
  24    return $requirements;
  25  }
  26  
  27  /**
  28   * Implementation of hook_install().
  29   */
  30  function jquery_update_install() {
  31    // Set the module's weight high so that it runs after other modules.
  32    db_query("UPDATE {system} SET weight = 99 WHERE name = 'jquery_update' and type = 'module'");
  33  }
  34  
  35  /**
  36   * Set module's weight high so that it runs after other modules.
  37   */
  38  function jquery_update_update_6100() {
  39    $ret = array();
  40  
  41    $ret[] = update_sql("UPDATE {system} SET weight = 99 WHERE name = 'jquery_update' and type = 'module'");
  42  
  43    return $ret;
  44  }
  45  
  46  /**
  47   * The packed version of jQuery is no longer distributed. If that is the chosen
  48   * version update to minified.
  49   */
  50  function jquery_update_update_6200() {
  51    if (variable_get('jquery_update_compression_type', 'min') == 'pack') {
  52      variable_set('jquery_update_compression_type', 'min');
  53    }
  54  }
  55  
  56  /**
  57   * Implementation of hook_uninstall().
  58   */
  59  function jquery_update_uninstall() {
  60    variable_del('jquery_update_replace');
  61    variable_del('jquery_update_compression_type');
  62  }


Generated: Thu Mar 24 11:18:33 2011 Cross-referenced by PHPXref 0.7