From ea960a5563416318ec4bfc9da81af3d2e0f7ed85 Mon Sep 17 00:00:00 2001 From: rub Date: Wed, 13 Feb 2008 20:13:12 +0000 Subject: 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 --- plugins/c13y_upgrade/initialize.inc.php | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'plugins/c13y_upgrade') 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 = ''. l10n('c13y_upgrade_deactivate').''; - $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) -- cgit v1.2.3