aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/c13y_upgrade
diff options
context:
space:
mode:
authorrub <rub@piwigo.org>2008-02-13 20:13:12 +0000
committerrub <rub@piwigo.org>2008-02-13 20:13:12 +0000
commitea960a5563416318ec4bfc9da81af3d2e0f7ed85 (patch)
tree786a888a6b3385d4b1711f9d5eb66c20a3386ab1 /plugins/c13y_upgrade
parent42b184eed3c3e33fc2476c986a8eb06a766bb4b8 (diff)
Resolved issue 0000792: Admin "intro" : Integrity control bypass
Some sentences must be re-write ;-) git-svn-id: http://piwigo.org/svn/trunk@2208 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'plugins/c13y_upgrade')
-rw-r--r--plugins/c13y_upgrade/initialize.inc.php17
1 files changed, 8 insertions, 9 deletions
diff --git a/plugins/c13y_upgrade/initialize.inc.php b/plugins/c13y_upgrade/initialize.inc.php
index 7cb3f7191..7f0accc43 100644
--- a/plugins/c13y_upgrade/initialize.inc.php
+++ b/plugins/c13y_upgrade/initialize.inc.php
@@ -2,7 +2,7 @@
// +-----------------------------------------------------------------------+
// | PhpWebGallery - a PHP based picture gallery |
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
-// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
+// | Copyright (C) 2003-2008 PhpWebGallery Team - http://phpwebgallery.net |
// +-----------------------------------------------------------------------+
// | file : $Id$
// | last update : $Date$
@@ -29,15 +29,15 @@ if (!defined('PHPWG_ROOT_PATH'))
die('Hacking attempt!');
}
-add_event_handler('get_check_integrity', 'c13y_upgrade');
+add_event_handler('list_check_integrity', 'c13y_upgrade');
-function c13y_upgrade($c13y_array)
+function c13y_upgrade()
{
global $conf;
load_language('plugin.lang', dirname(__FILE__).'/');
- $result = array();
+ $can_be_deactivate = true;
/* Check user with same e-mail */
$query = '
@@ -51,7 +51,8 @@ limit 0,1
if (mysql_fetch_array(pwg_query($query)))
{
- $result[] = get_c13y(
+ $can_be_deactivate = false;
+ add_c13y(
l10n('c13y_exif_dbl_email_user'),
null,
null,
@@ -60,7 +61,7 @@ limit 0,1
/* Check if this plugin must deactivate */
- if (count($result) === 0)
+ if ($can_be_deactivate)
{
$deactivate_msg_link =
'<a href="'.
@@ -69,15 +70,13 @@ limit 0,1
'" onclick="window.open(this.href, \'\'); return false;">'.
l10n('c13y_upgrade_deactivate').'</a>';
- $result[] = get_c13y(
+ add_c13y(
l10n('c13y_upgrade_no_anomaly'),
'c13y_upgrade_correction',
'deactivate_plugin',
$deactivate_msg_link
);
}
-
- return array_merge($c13y_array, $result);
}
function c13y_upgrade_correction($action)