| 1 |
<?php
|
| 2 |
// $Id: jquery_update.install,v 1.4 2008/12/16 01:02:30 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_uninstall().
|
| 29 |
*/
|
| 30 |
function jquery_update_uninstall() {
|
| 31 |
variable_del('jquery_update_replace');
|
| 32 |
variable_del('jquery_update_compression_type');
|
| 33 |
}
|
| 34 |
|
| 35 |
/**
|
| 36 |
* The packed version of jQuery is no longer distributed. If that is the chosen
|
| 37 |
* version update to minified.
|
| 38 |
*/
|
| 39 |
function jquery_update_update_7000() {
|
| 40 |
if (variable_get('jquery_update_compression_type', 'min') == 'pack') {
|
| 41 |
variable_set('jquery_update_compression_type', 'min');
|
| 42 |
}
|
| 43 |
}
|