The branch, master has been updated
via 4aa470e27e354c30865d6c78eec4de7653759859 (commit)
via e0c7147806d2d4ec9c7f5f0d26e95dd1be67940e (commit)
via 568a0e03deed56b53379fe27468840c2e525c0e7 (commit)
from 83850004da19238eeaf338293b66b80177d7c3d3 (commit)
- Log -----------------------------------------------------------------
commit 4aa470e27e354c30865d6c78eec4de7653759859
Author: Michal Čihař <mcihar(a)suse.cz>
Date: Wed Jun 22 11:03:38 2011 +0200
Indentation fixes
commit e0c7147806d2d4ec9c7f5f0d26e95dd1be67940e
Author: Michal Čihař <mcihar(a)suse.cz>
Date: Wed Jun 22 11:02:13 2011 +0200
This is a fatal error rather than place for warning
It is not necessary to translate as this really should not happen.
commit 568a0e03deed56b53379fe27468840c2e525c0e7
Author: Michal Čihař <mcihar(a)suse.cz>
Date: Wed Jun 22 11:00:45 2011 +0200
Show mcrypt waring only on main page and not on every page
-----------------------------------------------------------------------
Summary of changes:
libraries/auth/cookie.auth.lib.php | 14 +++++---------
main.php | 7 +++++++
2 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/libraries/auth/cookie.auth.lib.php b/libraries/auth/cookie.auth.lib.php
index 23b6ff0..8660ff0 100644
--- a/libraries/auth/cookie.auth.lib.php
+++ b/libraries/auth/cookie.auth.lib.php
@@ -28,13 +28,12 @@ if (function_exists('mcrypt_encrypt')) {
* further decryption. I don't think necessary to have one iv
* per server so I don't put the server number in the cookie name.
*/
- if (empty($_COOKIE['pma_mcrypt_iv'])
- || false === ($iv = base64_decode($_COOKIE['pma_mcrypt_iv'], true))) {
+ if (empty($_COOKIE['pma_mcrypt_iv']) || false === ($iv = base64_decode($_COOKIE['pma_mcrypt_iv'], true))) {
srand((double) microtime() * 1000000);
- $td = mcrypt_module_open(MCRYPT_BLOWFISH, '', MCRYPT_MODE_CBC, '');
- if ($td === false) {
- PMA_warnMissingExtension('mcrypt');
- }
+ $td = mcrypt_module_open(MCRYPT_BLOWFISH, '', MCRYPT_MODE_CBC, '');
+ if ($td === false) {
+ die('Failed to use Blowfish from mcrypt!');
+ }
$iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($td), MCRYPT_RAND);
$GLOBALS['PMA_Config']->setCookie('pma_mcrypt_iv', base64_encode($iv));
}
@@ -75,9 +74,6 @@ if (function_exists('mcrypt_encrypt')) {
} else {
require_once './libraries/blowfish.php';
- if (!$GLOBALS['cfg']['McryptDisableWarning']) {
- PMA_warnMissingExtension('mcrypt');
- }
}
/**
diff --git a/main.php b/main.php
index c508bd0..fecb0d7 100644
--- a/main.php
+++ b/main.php
@@ -342,6 +342,13 @@ if ($cfg['SuhosinDisableWarning'] == false && @ini_get('suhosin.request.max_valu
}
/**
+ * Warning about mcrypt.
+ */
+if (!$GLOBALS['cfg']['McryptDisableWarning']) {
+ PMA_warnMissingExtension('mcrypt');
+}
+
+/**
* Warning about incomplete translations.
*
* The data file is created while creating release by ./scripts/remove-incomplete-mo
hooks/post-receive
--
phpMyAdmin