unl.install 1.64 KB
Newer Older
1
2
<?php

3
function unl_install() {
4
  variable_set('site_404', 'unl-404');
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

// Update blocks to have correct titles, to correspond to a profile/theme update.
function unl_update_7109() {
  db_update('block')
    ->condition('title', '')
    ->condition('region', 'leftcollinks')
    ->fields(array('title' => 'Related Links'))
    ->execute();
  db_update('block')
    ->condition('title', '')
    ->condition('region', 'contactinfo')
    ->fields(array('title' => 'Contact Us'))
    ->execute();
  db_update('block')
    ->condition('title', '')
    ->condition('region', 'optionalfooter')
    ->fields(array('title' => '<none>'))
    ->execute();
  db_update('block')
    ->condition('title', '')
    ->condition('region', 'footercontent')
    ->fields(array('title' => '<none>'))
    ->execute();
}
30

31
32
33
34
35
36
37
38
39
40
/**
 * Add the hard-coded white list as the default whitelist.
 */
function unl_update_7112() {
  $modules = array(
    'aggregator', 'blog', 'book', 'comment', 'translation', 'dashboard', 'forum', 'help', 'list', 'locale', 'number', 'taxonomy', 'trigger', // Core on this line, Contrib below
    'action_email_role', 'context', 'context_layouts', 'context_ui', 'features', 'unl_news', 'imce', 'imce_mkdir', 'imce_rename', 'menu_block', 'menu_block_export',
    'form_builder', 'form_builder_webform_ui', 'webform', 'webform_alt_ui',
    'workbench', 'workbench_access', 'workbench_files', 'workbench_media', 'workbench_moderation'
  );
Tim Steiner's avatar
Tim Steiner committed
41
  variable_set('unl_module_whitelist', $modules);
42
}
43
44
45
46
47
48
49
50
51

/**
 * If site does not have custom 404 set, set it to the central UNL page.
 */
function unl_update_7113() {
  if (!variable_get('site_404')) {
    variable_set('site_404', 'unl-404');
  }
}