-
Notifications
You must be signed in to change notification settings - Fork 1
/
xautoload.install
35 lines (30 loc) · 1021 Bytes
/
xautoload.install
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
// Due to https://www.drupal.org/node/2228825, it can happen that
// xautoload.module is not included yet, so xautoload() would not work.
require_once __DIR__ . '/xautoload.module';
/**
* Implements hook_install()
*/
function xautoload_install() {
// Set module weight for xautoload to run before other modules.
// This has to work in unit tests!
xautoload()->system->installSetModuleWeight(-90);
}
/**
* Implements hook_uninstall()
*/
function xautoload_uninstall() {
variable_del(XAUTOLOAD_VARNAME_CACHE_TYPES);
variable_del(XAUTOLOAD_VARNAME_CACHE_LAZY);
variable_del(XAUTOLOAD_VARNAME_REPLACE_CORE);
variable_del(XAUTOLOAD_VARNAME_CACHE_PREFIX);
// The following variable is a leftover from previous versions.
variable_del('xautoload_cache_mode');
}
/**
* Implements hook_update_N()
*/
function xautoload_update_7000() {
// Set module weight for xautoload to run before other modules.
db_query("UPDATE {system} SET weight = -90 WHERE name = 'xautoload' AND type = 'module'");
}