aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/c13y_upgrade
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/c13y_upgrade')
-rw-r--r--plugins/c13y_upgrade/initialize.inc.php53
-rw-r--r--plugins/c13y_upgrade/language/en_UK/plugin.lang.php9
-rw-r--r--plugins/c13y_upgrade/language/es_ES/plugin.lang.php8
-rw-r--r--plugins/c13y_upgrade/language/fr_FR/plugin.lang.php8
4 files changed, 63 insertions, 15 deletions
diff --git a/plugins/c13y_upgrade/initialize.inc.php b/plugins/c13y_upgrade/initialize.inc.php
index 7f0accc43..24de4d9cf 100644
--- a/plugins/c13y_upgrade/initialize.inc.php
+++ b/plugins/c13y_upgrade/initialize.inc.php
@@ -41,10 +41,14 @@ function c13y_upgrade()
/* Check user with same e-mail */
$query = '
-select count(*)
-from '.USERS_TABLE.'
-where '.$conf['user_fields']['email'].' is not null
-group by upper('.$conf['user_fields']['email'].')
+select
+ count(*)
+from
+ '.USERS_TABLE.'
+where
+ '.$conf['user_fields']['email'].' is not null
+group by
+ upper('.$conf['user_fields']['email'].')
having count(*) > 1
limit 0,1
;';
@@ -53,12 +57,49 @@ limit 0,1
{
$can_be_deactivate = false;
add_c13y(
- l10n('c13y_exif_dbl_email_user'),
+ l10n('c13y_dbl_email_user'),
null,
null,
- l10n('c13y_exif_correction_dbl_email_user'));
+ l10n('c13y_correction_dbl_email_user'));
}
+ /* Check plugin included in Piwigo sources */
+ $included_plugins = array('dew');
+ $query = '
+select
+ id
+from
+ '.PLUGINS_TABLE.'
+where
+ id in ('.
+ implode(
+ ',',
+ array_map(
+ create_function('$s', 'return "\'".$s."\'";'),
+ $included_plugins
+ )
+ )
+ .')
+;';
+
+ $result = pwg_query($query);
+ while ($row = mysql_fetch_assoc($result))
+ {
+ $can_be_deactivate = false;
+
+ $uninstall_msg_link =
+ '<a href="'.
+ PHPWG_ROOT_PATH.
+ 'admin.php?page=plugins&amp;plugin='.$row['id'].'&amp;action=uninstall'.
+ '" onclick="window.open(this.href, \'\'); return false;">'.
+ sprintf(l10n('c13y_correction_obsolete_plugin'), $row['id']).'</a>';
+
+ add_c13y(
+ l10n('c13y_obsolete_plugin'),
+ null,
+ null,
+ $uninstall_msg_link);
+ }
/* Check if this plugin must deactivate */
if ($can_be_deactivate)
diff --git a/plugins/c13y_upgrade/language/en_UK/plugin.lang.php b/plugins/c13y_upgrade/language/en_UK/plugin.lang.php
index d8db86284..90a712369 100644
--- a/plugins/c13y_upgrade/language/en_UK/plugin.lang.php
+++ b/plugins/c13y_upgrade/language/en_UK/plugin.lang.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$
@@ -27,6 +27,9 @@
// --------- Starting below: New or revised $lang ---- from Butterfly (1.8)
$lang['c13y_upgrade_no_anomaly'] = 'No anomaly detected after application upgrade';
$lang['c13y_upgrade_deactivate'] = 'You can deactivate "Check upgrades" plugin';
-$lang['c13y_exif_dbl_email_user'] = 'Users with same email address';
-$lang['c13y_exif_correction_dbl_email_user'] = 'Delete duplicate users';
+$lang['c13y_dbl_email_user'] = 'Users with same email address';
+$lang['c13y_correction_dbl_email_user'] = 'Delete duplicate users';
+$lang['c13y_obsolete_plugin'] = 'Obsolete plugin';
+$lang['c13y_correction_obsolete_plugin'] = '"%s" plugin has been included in this application version and you must uninstall it.';
+
?>
diff --git a/plugins/c13y_upgrade/language/es_ES/plugin.lang.php b/plugins/c13y_upgrade/language/es_ES/plugin.lang.php
index ebe427afe..45e5d5c5e 100644
--- a/plugins/c13y_upgrade/language/es_ES/plugin.lang.php
+++ b/plugins/c13y_upgrade/language/es_ES/plugin.lang.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$
@@ -27,7 +27,9 @@
// --------- Starting below: New or revised $lang ---- from Butterfly (1.8)
$lang['c13y_upgrade_no_anomaly'] = 'Ninguna anomalía detectada después de la puesta al día de la aplicación';
$lang['c13y_upgrade_deactivate'] = 'Usted puede desactivar el plugin Check upgrades';
-$lang['c13y_exif_dbl_email_user'] = 'Utilizadores con la misma dirección e-mail';
-$lang['c13y_exif_correction_dbl_email_user'] = 'Suprima a los utilizadores en duplicado';
+$lang['c13y_dbl_email_user'] = 'Utilizadores con la misma dirección e-mail';
+$lang['c13y_correction_dbl_email_user'] = 'Suprima a los utilizadores en duplicado';
+/* TODO */ $lang['c13y_obsolete_plugin'] = 'Obsolete plugin';
+/* TODO */ $lang['c13y_correction_obsolete_plugin'] = '"%s" plugin has been included in this application version and you must uninstall it.';
?>
diff --git a/plugins/c13y_upgrade/language/fr_FR/plugin.lang.php b/plugins/c13y_upgrade/language/fr_FR/plugin.lang.php
index 512b8f5e6..bacf03e71 100644
--- a/plugins/c13y_upgrade/language/fr_FR/plugin.lang.php
+++ b/plugins/c13y_upgrade/language/fr_FR/plugin.lang.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$
@@ -27,7 +27,9 @@
// --------- Starting below: New or revised $lang ---- from Butterfly (1.8)
$lang['c13y_upgrade_no_anomaly'] = 'Pas d\'anomalie détectée après la mise à jour de l\'application';
$lang['c13y_upgrade_deactivate'] = 'Vous pouvez désactiver le plugin "Check upgrades"';
-$lang['c13y_exif_dbl_email_user'] = 'Utilisateurs avec la même adresse email';
-$lang['c13y_exif_correction_dbl_email_user'] = 'Supprimez les utilisateurs en double';
+$lang['c13y_dbl_email_user'] = 'Utilisateurs avec la même adresse email';
+$lang['c13y_correction_dbl_email_user'] = 'Supprimez les utilisateurs en double';
+$lang['c13y_obsolete_plugin'] = 'Plugin obsolète';
+$lang['c13y_correction_obsolete_plugin'] = 'Le plugin "%s" a été inclus dans cette version de l\'application et vous devez le désinstaller.';
?>