X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fevents.php;h=96885f81f7fb1ef30ed948fe13a7b5fb5075ebc6;hb=bf517dafc122edf6ccd86847f0626cfd0df9f340;hp=3601aef07a7f372e96a53d390f2ba31fba14fca8;hpb=d0e45ced64bd5bbe80bf127281fe0030800193f0;p=platal.git diff --git a/modules/events.php b/modules/events.php index 3601aef..96885f8 100644 --- a/modules/events.php +++ b/modules/events.php @@ -37,6 +37,26 @@ class EventsModule extends PLModule function get_tips($exclude = null) { + global $globals; + // Add a new special tip when changing plat/al version + if ($globals->version != S::v('last_version') && is_null($exclude)) { + XDB::execute('UPDATE auth_user_quick + SET last_version = {?} + WHERE user_id = {?}', + $globals->version, S::i('uid')); + return array('id' => 0, + 'titre' => 'Bienvenue sur la nouvelle version du site !', + 'text' => 'Le site a été mis à jour depuis ta dernière visite vers la version ' . $globals->version + . '. Nous t\'invitons à en découvrir les nouveautés en te rendant sur ' + . 'nos forums ou en consultant ' + . 'la liste exhaustive des modifications', + 'priorite' => 255, + 'promo_min' => 0, + 'promo_max' => 0, + 'state' => 'active', + 'special' => true); + } + $exclude = is_null($exclude) ? '' : ' AND id != ' . $exclude . ' '; $priority = rand(0, 510); do {