projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Properly orders list members.
[platal.git]
/
include
/
reminder
/
promotion_ml.inc.php
diff --git
a/include/reminder/promotion_ml.inc.php
b/include/reminder/promotion_ml.inc.php
index
8176320
..
c311e13
100644
(file)
--- a/
include/reminder/promotion_ml.inc.php
+++ b/
include/reminder/promotion_ml.inc.php
@@
-60,7
+60,7
@@
class ReminderPromotionMl extends Reminder
return "Inscription à la liste de diffusion de ta promotion";
}
return "Inscription à la liste de diffusion de ta promotion";
}
- public static function IsCandidate(User
&
$user, $candidate)
+ public static function IsCandidate(User $user, $candidate)
{
$profile = $user->profile();
if (!$profile) {
{
$profile = $user->profile();
if (!$profile) {
@@
-79,7
+79,16
@@
class ReminderPromotionMl extends Reminder
if ($mlCount) {
Reminder::MarkCandidateAsAccepted($user->id(), $candidate);
}
if ($mlCount) {
Reminder::MarkCandidateAsAccepted($user->id(), $candidate);
}
- return ($mlCount == 0);
+ if ($mlCount == 0) {
+ $mmlist = new MMList($user);
+ try {
+ $mmlist->get_members_limit('promo' + $user->profile()->yearPromo(),
+ 0, 0);
+ } catch (Exception $e) {
+ return false;
+ }
+ }
+ return false;
}
}
}
}