projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Defaultly uses the address given by the user; allows bigger differences between the...
[platal.git]
/
modules
/
lists.php
diff --git
a/modules/lists.php
b/modules/lists.php
index
d50eeb2
..
1ebf75f
100644
(file)
--- a/
modules/lists.php
+++ b/
modules/lists.php
@@
-112,7
+112,7
@@
class ListsModule extends PLModule
if ($promo >= 1900 and $promo < 2100) {
$this->client->subscribe("promo$promo");
} else {
if ($promo >= 1900 and $promo < 2100) {
$this->client->subscribe("promo$promo");
} else {
- $page->trig
Success
("promo incorrecte, il faut une promo sur 4 chiffres.");
+ $page->trig
Error
("promo incorrecte, il faut une promo sur 4 chiffres.");
}
}
}
}
@@
-169,14
+169,20
@@
class ListsModule extends PLModule
$page->changeTpl('lists/create.tpl');
$page->changeTpl('lists/create.tpl');
- $user_promo = S::
i('promo'
);
+ $user_promo = S::
user()->profile()->yearPromo(
);
$year = date('Y');
$month = date('m');
$year = date('Y');
$month = date('m');
+ // scolar year starts in september
+ $scolarmonth = ($year - $user_promo) * 12 + ($month - 8);
$young_promo = $very_young_promo = 0;
$young_promo = $very_young_promo = 0;
- if ((($year > $user_promo) && ($month > 3)) && ($year < $user_promo + 5)) {
+ // binet are accessible only in april in the first year and until
+ // march of the 5th year
+ if ($scolarmonth >= 8 && $scolarmonth < 56) {
$young_promo = 1;
}
$young_promo = 1;
}
- if ((($year > $user_promo) && ($month > 7)) && (($year < $user_promo + 1) && ($month < 8))) {
+ // PSC aliases are accesible only between september and june of the second
+ // year of scolarity
+ if ($scolarmonth >= 12 && $scolarmonth < 22) {
$very_young_promo = 1;
}
$page->assign('young_promo', $young_promo);
$very_young_promo = 1;
}
$page->assign('young_promo', $young_promo);
@@
-582,8
+588,7
@@
class ListsModule extends PLModule
{
global $list_unregistered, $globals;
{
global $list_unregistered, $globals;
- /* TODO: fixes this call to a removed function. */
- $users = get_not_registered_user($login, true);
+ $users = User::getPendingAccounts($login, true);
if ($users && $users->total()) {
if (!isset($list_unregistered)) {
$list_unregistered = array();
if ($users && $users->total()) {
if (!isset($list_unregistered)) {
$list_unregistered = array();