Skip to content

Commit

Permalink
Error for misssing libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
tameeshB committed Aug 25, 2017
1 parent 5623e6b commit 8def5f5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions client_side_file_crypto.module
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ function client_side_file_crypto_page_attachments(&$page) {
$page['#attached']['drupalSettings']['client_side_file_crypto']['nodeid'] = $nid;
$page['#attached']['drupalSettings']['client_side_file_crypto']['baseURL'] = $base_url;
$page['#attached']['drupalSettings']['client_side_file_crypto']['routeName'] = $routeName;
if(!file_exists('libraries/client_side_file_crypto/jsencrypt.js')){
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');
}
if(!file_exists('libraries/client_side_file_crypto/cryptojs.js')){
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');
}

}

/**
Expand Down

0 comments on commit 8def5f5

Please sign in to comment.