projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote branch 'origin/xorg/maint' into xorg/master
[platal.git]
/
include
/
reminder
/
email_backup.inc.php
diff --git
a/include/reminder/email_backup.inc.php
b/include/reminder/email_backup.inc.php
index
cdf266e
..
6336b8b
100644
(file)
--- a/
include/reminder/email_backup.inc.php
+++ b/
include/reminder/email_backup.inc.php
@@
-1,6
+1,6
@@
<?php
/***************************************************************************
<?php
/***************************************************************************
- * Copyright (C) 2003-20
09
Polytechnique.org *
+ * Copyright (C) 2003-20
11
Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
@@
-25,9
+25,7
@@
class ReminderEmailBackup extends Reminder
{
if ($action == 'yes') {
require_once 'emails.inc.php';
{
if ($action == 'yes') {
require_once 'emails.inc.php';
- $storage = new EmailStorage($this->user, 'imap');
- $storage->activate();
-
+ Email::activate_storage($this->user, 'imap');
$this->UpdateOnYes();
}
$this->UpdateOnYes();
}
@@
-50,15
+48,23
@@
class ReminderEmailBackup extends Reminder
{
return 'Sauvegarde de tes emails';
}
{
return 'Sauvegarde de tes emails';
}
+ public function info()
+ {
+ return 'Xorg/IMAP';
+ }
- public static function IsCandidate(User
&
$user, $candidate)
+ public static function IsCandidate(User $user, $candidate)
{
{
+ if (!$user->checkPerms(User::PERM_MAIL)) {
+ return false;
+ }
+
require_once 'emails.inc.php';
require_once 'emails.inc.php';
- $
storage = new EmailS
torage($user, 'imap');
- if ($
storage->
active) {
+ $
active = Email::is_active_s
torage($user, 'imap');
+ if ($active) {
Reminder::MarkCandidateAsAccepted($user->id(), $candidate);
}
Reminder::MarkCandidateAsAccepted($user->id(), $candidate);
}
- return !$
storage->
active;
+ return !$active;
}
}
}
}