Pathologic was missing because of a .git folder inside.
[yaffs-website] / web / modules / contrib / superfish / superfish.install
1 <?php
2
3 /**
4  * @file
5  * Install, update and uninstall functions for the Superfish module.
6  */
7
8 /**
9  * Implements hook_enable().
10  */
11 function superfish_install() {
12   if (superfish_library_check()) {
13     drupal_set_message(t('In order to use Superfish, go to the <a href="@block">Block layout</a> page and use any of the "Place block" buttons to create a Superfish block.', ['@block' => 'structure/block']));
14   }
15   else {
16     drupal_set_message(t('Superfish library is missing. Please refer to the <a href="@documentation">plugin documentation</a> for how you can fix this issue; Once done, go to the <a href="@block">Block layout</a> page and use any of the "Place block" buttons to create a Superfish block.', ['@documentation' => 'http://drupal.org/node/1125896', '@block' => 'structure/block']), 'warning');
17   }
18 }
19
20 /**
21  * Implements hook_requirements().
22  */
23 function superfish_requirements($phase) {
24   $requirements = [];
25   if ($phase == 'runtime') {
26     $requirements['superfish']['title'] = t('Superfish library');
27
28     if (superfish_library_check()) {
29       $requirements['superfish']['value'] = t('Installed at @location', ['@location' => superfish_library_path()]);
30       $requirements['superfish']['severity'] = REQUIREMENT_OK;
31     }
32     else {
33       $requirements['superfish']['value'] = t('Not installed');
34       $requirements['superfish']['severity'] = REQUIREMENT_ERROR;
35       $requirements['superfish']['description'] = t('Please download the Superfish library from :url.', [':url' => 'http://drupal.org/project/superfish']);
36     }
37
38     // Check the uploaded Superfish library version.
39     if (($version = superfish_library_version()) && $version != '2.0') {
40       $requirements['superfish']['value'] = t('Not supported');
41       $requirements['superfish']['severity'] = REQUIREMENT_ERROR;
42       $requirements['superfish']['description'] = t('The Superfish library requires an update. You can find the update instructions on :url.', [':url' => 'http://drupal.org/project/superfish']);
43     }
44   }
45   return $requirements;
46 }