summaryrefslogtreecommitdiff
path: root/sites/all/modules/ckeditor_link/ckeditor_link.install
blob: 1cfc46ac0ffca04a4e3bc2d2948cb45ea218b809 (plain)
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php

/**
 * @file
 * Written by Henri MEDOT <henri.medot[AT]absyx[DOT]fr>
 * http://www.absyx.fr
 */

/**
 * Implementation of hook_install().
 */
function ckeditor_link_install() {
  db_update('system')
    ->fields(array('weight' => 1))
    ->condition('name', 'ckeditor_link')
    ->execute();
}

/**
 * Implementation of hook_uninstall().
 */
function ckeditor_link_uninstall() {
  db_query("DELETE FROM {variable} WHERE name LIKE 'ckeditor_link_%%'");
}

/**
 * Implementation of hook_requirements().
 */
function ckeditor_link_requirements($phase) {
  $requirements = array();

  if (($phase == 'runtime') && !variable_get('clean_url', 0)) {
    $requirements['ckeditor_link_clean_url'] = array(
      'title' => t('CKEditor Link'),
      'value' => t('Clean URLs are disabled.'),
      'description' => t('<em>CKEditor Link</em> requires <a href="@url">Clean URLs</a> to be enabled in order to function properly.', array('@url' => url('admin/config/search/clean-urls'))),
      'severity' => REQUIREMENT_ERROR,
    );
  }

  return $requirements;
}

/**
 * Expose strings to potx.
 */
function _ckeditor_link_potx() {
  t('Internal path');
}