Commit b10bf82d authored by frjo's avatar frjo
Browse files

Fixes to install requirements.

parent 2d61ec76
......@@ -5,7 +5,6 @@
* Install, update and uninstall functions for the colorbox module.
*/
use Drupal\Core\Url;
use Drupal\Component\Utility\Unicode;
/**
......@@ -24,7 +23,11 @@ function colorbox_requirements($phase) {
'title' => t('Colorbox plugin'),
'value' => t('@e: At least @a', array('@e' => $error_type, '@a' => COLORBOX_MIN_PLUGIN_VERSION)),
'severity' => REQUIREMENT_ERROR,
'description' => t('!error You need to download the !colorbox, extract the archive and place the colorbox directory in the %path directory on your server.', array('!error' => $error_message, '!colorbox' => \Drupal::l(t('Colorbox plugin'), Url::fromUri($library['download url'])), '%path' => 'sites/all/libraries')),
'description' => t('!error You need to download the <a href="!colorbox_link">Colorbox plugin</a>, extract the archive and place the colorbox directory in the %path directory on your server.', array(
'!error' => $error_message,
'!colorbox_link' => $library['download url'],
'%path' => 'libraries',
)),
);
}
elseif (version_compare($library['version'], COLORBOX_MIN_PLUGIN_VERSION, '>=')) {
......@@ -39,7 +42,10 @@ function colorbox_requirements($phase) {
'title' => t('Colorbox plugin'),
'value' => t('At least @a', array('@a' => COLORBOX_MIN_PLUGIN_VERSION)),
'severity' => REQUIREMENT_ERROR,
'description' => t('You need to download a later version of the !colorbox and replace the old version located in the %path directory on your server.', array('!colorbox' => \Drupal::l(t('Colorbox plugin'), Url::fromUri($library['download url'])), '%path' => $library['library path'])),
'description' => t('You need to download a later version of the <a href="!colorbox_link">Colorbox plugin</a> and replace the old version located in the %path directory on your server.', array(
'!colorbox_link' => $library['download url'],
'%path' => $library['library path']
)),
);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment