X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=web%2Fmodules%2Fcontrib%2Fsuperfish%2Fsuperfish.install;fp=web%2Fmodules%2Fcontrib%2Fsuperfish%2Fsuperfish.install;h=dcdfb92c0b93a5b309450d6aa19573e6326c53a7;hb=eba34333e3c89f208d2f72fa91351ad019a71583;hp=76a34233e80bbb706a52eba1b5f6e3763d43e912;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/web/modules/contrib/superfish/superfish.install b/web/modules/contrib/superfish/superfish.install index 76a34233e..dcdfb92c0 100644 --- a/web/modules/contrib/superfish/superfish.install +++ b/web/modules/contrib/superfish/superfish.install @@ -5,16 +5,15 @@ * Install, update and uninstall functions for the Superfish module. */ -use Drupal\Core\Language\Language; - /** * Implements hook_enable(). */ function superfish_install() { - if (superfish_library_check()){ - drupal_set_message(t('In order to use Superfish, go to the Block layout page and use any of the "Place block" buttons to create a Superfish block.', array('@block' => 'structure/block'))); - } else { - drupal_set_message(t('Superfish library is missing. Please refer to the plugin documentation for how you can fix this issue; Once done, go to the Block layout page and use any of the "Place block" buttons to create a Superfish block.', array('@documentation' => 'http://drupal.org/node/1125896', '@block' => 'structure/block')), 'warning'); + if (superfish_library_check()) { + drupal_set_message(t('In order to use Superfish, go to the Block layout page and use any of the "Place block" buttons to create a Superfish block.', ['@block' => 'structure/block'])); + } + else { + drupal_set_message(t('Superfish library is missing. Please refer to the plugin documentation for how you can fix this issue; Once done, go to the Block layout page and use any of the "Place block" buttons to create a Superfish block.', ['@documentation' => 'http://drupal.org/node/1125896', '@block' => 'structure/block']), 'warning'); } } @@ -22,25 +21,25 @@ function superfish_install() { * Implements hook_requirements(). */ function superfish_requirements($phase) { - $requirements = array(); + $requirements = []; if ($phase == 'runtime') { $requirements['superfish']['title'] = t('Superfish library'); if (superfish_library_check()) { - $requirements['superfish']['value'] = t('Installed at @location', array('@location' => superfish_library_path())); + $requirements['superfish']['value'] = t('Installed at @location', ['@location' => superfish_library_path()]); $requirements['superfish']['severity'] = REQUIREMENT_OK; } else { $requirements['superfish']['value'] = t('Not installed'); $requirements['superfish']['severity'] = REQUIREMENT_ERROR; - $requirements['superfish']['description'] = t('Please download the Superfish library from :url.', array(':url' => 'http://drupal.org/project/superfish')); + $requirements['superfish']['description'] = t('Please download the Superfish library from :url.', [':url' => 'http://drupal.org/project/superfish']); } // Check the uploaded Superfish library version. if (($version = superfish_library_version()) && $version != '2.0') { $requirements['superfish']['value'] = t('Not supported'); $requirements['superfish']['severity'] = REQUIREMENT_ERROR; - $requirements['superfish']['description'] = t('The Superfish library requires an update. You can find the update instructions on :url.', array(':url' => 'http://drupal.org/project/superfish')); + $requirements['superfish']['description'] = t('The Superfish library requires an update. You can find the update instructions on :url.', [':url' => 'http://drupal.org/project/superfish']); } } return $requirements;