/* Crypt file if option is enabled. */
$crypted = false;
$crypt_key = '';
- if ($crypt == true && extension_loaded('mcrypt'))
+ if ($crypt == true && !(extension_loaded('mcrypt') == true))
+ error_log ("PHP extension mcrypt not loaded, won't encrypt in Jirafeau");
+ if ($crypt == true && extension_loaded('mcrypt') == true)
{
$crypt_key = jirafeau_encrypt_file ($file['tmp_name'], $file['tmp_name']);
if (strlen($crypt_key) > 0)
$crypted = false;
$crypt_key = '';
- if ($crypt == true && extension_loaded('mcrypt'))
+ if ($crypt == true && extension_loaded('mcrypt') == true)
{
$crypt_key = jirafeau_encrypt_file ($p, $p);
if (strlen($crypt_key) > 0)
jirafeau_encrypt_file ($fp_src, $fp_dst)
{
$fs = filesize ($fp_src);
- if ($fs === false || $fs == 0 || !extension_loaded('mcrypt'))
+ if ($fs === false || $fs == 0 || !(extension_loaded('mcrypt') == true))
return '';
/* Prepare module. */
jirafeau_decrypt_file ($fp_src, $fp_dst, $k)
{
$fs = filesize ($fp_src);
- if ($fs === false || $fs == 0 || !extension_loaded('mcrypt'))
+ if ($fs === false || $fs == 0 || !(extension_loaded('mcrypt') == true))
return false;
/* Init module */
forEach ($cfg['upload_password'] as $p)
if ($password == $p)
return true;
- error_log("password not found $password");
return false;
}