Index: /extensions/UserAdvManager/trunk/changelog.txt.php
===================================================================
--- /extensions/UserAdvManager/trunk/changelog.txt.php (revision 17506)
+++ /extensions/UserAdvManager/trunk/changelog.txt.php (revision 17507)
@@ -320,4 +320,8 @@
Update lv_LV, thanks to : agrisans
Update el_GR, thanks to : bas_alba
+
+-- 2.40.4 : Bug 2658 fixed - Compatibility check between UAM's "email exclusion" option and Piwigo's "Mail address is mandatory for all users" to avoid configuration conflicts.
+ Update el_GR, thanks to : bas_alba
+ Update lv_LV, thanks to : agrisans
*/
?>
Index: /extensions/UserAdvManager/trunk/include/functions.inc.php
===================================================================
--- /extensions/UserAdvManager/trunk/include/functions.inc.php (revision 17506)
+++ /extensions/UserAdvManager/trunk/include/functions.inc.php (revision 17507)
@@ -25,4 +25,22 @@
return $menu;
+}
+
+
+/**
+ * Triggered on loc_begin_admin_page
+ *
+ * Check options compatibility
+ */
+function UAM_check_compat()
+{
+ global $conf, $page;
+
+ // Check mandatory email address for email exclusion
+ $conf_UAM = unserialize($conf['UserAdvManager']);
+ if (!$conf['obligatory_user_mail_address'] and $conf_UAM[10] = 'true')
+ {
+ array_push($page['warnings'], l10n('UAM_mail_exclusion_error'));
+ }
}
Index: /extensions/UserAdvManager/trunk/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/UserAdvManager/trunk/language/en_UK/plugin.lang.php (revision 17506)
+++ /extensions/UserAdvManager/trunk/language/en_UK/plugin.lang.php (revision 17507)
@@ -420,3 +420,10 @@
$lang['UAM_Default_AdminValidationMail_Subject'] = '[username] - Registration validated on [mygallery]';
// --------- End: New or revised $lang ---- from version 2.40
+
+
+// --------- Starting below: New or revised $lang ---- from version 2.40.4
+$lang['UAM_mail_exclusion_error'] = 'The Piwigo\'s option "The email address is mandatory for all users" has been disabled while the UserAdvancedManager\'s (UAM) plugin option "Exclusion of mail domains" remained active. This combination is illogical and not compatible!
+Please, Reactivate the Piwigo\'s option "The email address is mandatory for all users" to be able then to disable UAM\'s option "Exclusion of mail domains" if that\'s what you want.
+Note: This message will disappear after you have made the necessary correction and reloaded the admin page.
';
+// --------- End: New or revised $lang ---- from version 2.40.4
?>
Index: /extensions/UserAdvManager/trunk/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/UserAdvManager/trunk/language/fr_FR/plugin.lang.php (revision 17506)
+++ /extensions/UserAdvManager/trunk/language/fr_FR/plugin.lang.php (revision 17507)
@@ -425,3 +425,10 @@
$lang['UAM_Default_AdminValidationMail_Subject'] = '[username] - Inscription validée sur [mygallery]';
// --------- End: New or revised $lang ---- from version 2.40
+
+
+// --------- Starting below: New or revised $lang ---- from version 2.40.4
+$lang['UAM_mail_exclusion_error'] = 'L\'option de Piwigo "L\'adresse mail est obligatoire pour tous les utilisateurs" a été désactivée alors que l\'option du plugin UserAdvancedManager (UAM) "Exclusion des domaines de messagerie" est resté active. Cette combinaison est illogique et non compatible!
+Veuillez réactivez l\'option de Piwigo "L\'adresse mail est obligatoire pour tous les utilisateurs" pour pouvoir désactiver ensuite l\'option UAM "Exclusion des domaines de messagerie" si c\'est ce que vous souhaitez.
+Note : Ce message disparaitra après que vous ayez effectué la correction nécessaire et rechargé la page d\'administration.
';
+// --------- End: New or revised $lang ---- from version 2.40.4
?>
Index: /extensions/UserAdvManager/trunk/main.inc.php
===================================================================
--- /extensions/UserAdvManager/trunk/main.inc.php (revision 17506)
+++ /extensions/UserAdvManager/trunk/main.inc.php (revision 17507)
@@ -2,5 +2,5 @@
/*
Plugin Name: UserAdvManager
-Version: 2.40.3
+Version: auto
Description: Renforcer la gestion des utilisateurs - Enforce users management
Plugin URI: http://piwigo.org/ext/extension_view.php?eid=216
@@ -258,3 +258,8 @@
}
}
+
+
+// Check options compatibilité between UAM and Piwigo at admin page load
+// ---------------------------------------------------------------------
+add_event_handler('loc_begin_admin_page', 'UAM_check_compat');
?>