diff options
author | rub <rub@piwigo.org> | 2008-02-27 20:25:18 +0000 |
---|---|---|
committer | rub <rub@piwigo.org> | 2008-02-27 20:25:18 +0000 |
commit | bf4012291a878c3f22fa318595e2ca7881c2978a (patch) | |
tree | 52d142b93c7c224e281b44a7530a30b77aaba348 /plugins/c13y_upgrade/initialize.inc.php | |
parent | 98d4b284e047f1fcb991935e689192c47fca457c (diff) |
Resolved issue 0000807: New slideshow features
git-svn-id: http://piwigo.org/svn/trunk@2218 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | plugins/c13y_upgrade/initialize.inc.php | 53 |
1 files changed, 47 insertions, 6 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&plugin='.$row['id'].'&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)
|