Adds checks for mcrypt module for RINO2

- check for module on install
- check for module when RINO2 is enabled in admin
- check for module when RINO2 is used in communications
This commit is contained in:
Fabrixxm 2015-09-22 09:50:24 +02:00
parent 303a59f1d0
commit 554948c22a
4 changed files with 20 additions and 2 deletions

View file

@ -137,6 +137,8 @@ function dfrn_notify_post(&$a) {
$rino = get_config('system','rino_encrypt');
$rino = intval($rino);
// use RINO1 if mcrypt isn't installed and RINO2 was selected
if ($rino==2 and !function_exists('mcrypt_create_iv')) $rino=1;
logger("Local rino version: ". $rino, LOGGER_DEBUG);
@ -307,7 +309,9 @@ function dfrn_notify_content(&$a) {
$rino = get_config('system','rino_encrypt');
$rino = intval($rino);
// use RINO1 if mcrypt isn't installed and RINO2 was selected
if ($rino==2 and !function_exists('mcrypt_create_iv')) $rino=1;
logger("Local rino version: ". $rino, LOGGER_DEBUG);
// if requested rino is lower than enabled local rino, lower local rino version