From: Stéphane Jacob Date: Sun, 10 May 2009 22:16:35 +0000 (+0200) Subject: Adds email_backup reminder. X-Git-Tag: xorg/0.10.1~73 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=3c47e985c1d86730de08ada85ea6642bc0d8faef;p=platal.git Adds email_backup reminder. --- diff --git a/include/reminder/email_backup.inc.php b/include/reminder/email_backup.inc.php new file mode 100644 index 0000000..53eb021 --- /dev/null +++ b/include/reminder/email_backup.inc.php @@ -0,0 +1,60 @@ +activate(); + + $this->UpdateOnYes(); + } + + if ($action == 'dismiss') { + $this->UpdateOnDismiss(); + } + + if ($action == 'no') { + $this->UpdateOnNo(); + } + } + + protected function GetDisplayText() + { + return "Tu peux bénéficier d'une sauvegarde des emails. Cela permet + d'avoir un accès de secours aux 30 derniers jours d'emails reçus + sur ton adresse Polytechnique.org."; + } + + public static function IsCandidate(User &$user) + { + require_once 'emails.inc.php'; + $storage = new EmailStorage($user, 'imap'); + return $storage->active; + } +} + +// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: +?> diff --git a/upgrade/0.10.1/00_inscription.sql b/upgrade/0.10.1/00_inscription.sql index 4534770..4eed42d 100644 --- a/upgrade/0.10.1/00_inscription.sql +++ b/upgrade/0.10.1/00_inscription.sql @@ -17,6 +17,7 @@ INSERT INTO reminder_type (name, weight, remind_delay_yes, remind_delay_no, rem ('profile_update', 90, 0, 0, 2), ('nl', 80, 0, 365, 7), ('promotion_ml', 70, 0, 365, 7), + ('email_backup', 60, 0, 365, 7), ('ax_letter', 50, 0, 365, 14); DROP TABLE IF EXISTS reminder;