aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/c13y_upgrade/initialize.inc.php
diff options
context:
space:
mode:
authorrub <rub@piwigo.org>2008-11-05 22:57:32 +0000
committerrub <rub@piwigo.org>2008-11-05 22:57:32 +0000
commit4a90b522325410cc866f2fad64ce6871a0f655fa (patch)
tree42263857814eb8e4a41c2dc30a30a5a53da8146f /plugins/c13y_upgrade/initialize.inc.php
parent6c2d9cbf33c34cb467142511a215c36881c6c57c (diff)
c13y_upgrade is deactivated by him self.
de/es/it translations must be reviewed. git-svn-id: http://piwigo.org/svn/trunk@2829 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'plugins/c13y_upgrade/initialize.inc.php')
-rw-r--r--plugins/c13y_upgrade/initialize.inc.php46
1 files changed, 10 insertions, 36 deletions
diff --git a/plugins/c13y_upgrade/initialize.inc.php b/plugins/c13y_upgrade/initialize.inc.php
index 4926da638..29cb11f13 100644
--- a/plugins/c13y_upgrade/initialize.inc.php
+++ b/plugins/c13y_upgrade/initialize.inc.php
@@ -34,7 +34,7 @@ function c13y_upgrade($c13y)
load_language('plugin.lang', dirname(__FILE__).'/');
- $can_be_deactivate = true;
+ $to_deactivate = true;
/* Check user with same e-mail */
$query = '
@@ -52,7 +52,7 @@ limit 0,1
if (mysql_fetch_array(pwg_query($query)))
{
- $can_be_deactivate = false;
+ $to_deactivate = false;
$c13y->add_anomaly(
l10n('c13y_dbl_email_user'),
null,
@@ -82,7 +82,7 @@ where
$result = pwg_query($query);
while ($row = mysql_fetch_assoc($result))
{
- $can_be_deactivate = false;
+ $to_deactivate = false;
$uninstall_msg_link =
'<a href="'.
@@ -98,45 +98,19 @@ where
$uninstall_msg_link);
}
- /* Check if this plugin must deactivate */
- if ($can_be_deactivate)
+ /* Check if this plugin must be deactivate */
+ if ($to_deactivate)
{
- $deactivate_msg_link =
- '<a href="'.
- PHPWG_ROOT_PATH.
- 'admin.php?page=plugins_list&amp;plugin=c13y_upgrade&amp;action=deactivate'.
- '" onclick="window.open(this.href, \'\'); return false;">'.
- l10n('c13y_upgrade_deactivate').'</a>';
-
- $c13y->add_anomaly(
- l10n('c13y_upgrade_no_anomaly'),
- 'c13y_upgrade_correction',
- 'deactivate_plugin',
- $deactivate_msg_link
- );
- }
-}
-
-function c13y_upgrade_correction($action)
-{
- $result = false;
-
- switch ($action)
- {
- case 'deactivate_plugin':
- {
- $query = '
+ $query = '
REPLACE INTO '.PLUGINS_TABLE.'
(id, state)
VALUES (\'c13y_upgrade\', \'inactive\')
;';
- pwg_query($query);
- $result = true;
- }
- break;
- }
+ pwg_query($query);
- return $result;
+ global $page;
+ $page['infos'][] = l10n('c13y_upgrade_no_anomaly');
+ }
}
?>