Skip to content

Commit 8def5f5

Browse files
committed
Error for misssing libraries
1 parent 5623e6b commit 8def5f5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

client_side_file_crypto.module

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,13 @@ function client_side_file_crypto_page_attachments(&$page) {
4646
$page['#attached']['drupalSettings']['client_side_file_crypto']['nodeid'] = $nid;
4747
$page['#attached']['drupalSettings']['client_side_file_crypto']['baseURL'] = $base_url;
4848
$page['#attached']['drupalSettings']['client_side_file_crypto']['routeName'] = $routeName;
49+
if(!file_exists('libraries/client_side_file_crypto/jsencrypt.js')){
50+
drupal_set_message(t('jsencrypt.js library not in place, please follow instructions on the module page <a href="https://www.drupal.org/project/client_side_file_crypto/">here.</a>'),'error');
51+
}
52+
if(!file_exists('libraries/client_side_file_crypto/cryptojs.js')){
53+
drupal_set_message(t('cryptojs.js library not in place, please follow instructions on the module page <a href="https://www.drupal.org/project/client_side_file_crypto/">here.</a>'),'error');
54+
}
55+
4956
}
5057

5158
/**

0 commit comments

Comments
 (0)