From: Stéphane Jacob Date: Mon, 9 Apr 2012 16:00:12 +0000 (+0200) Subject: Fixes reactivation of broken and suspended emails (Closes #1597). X-Git-Tag: xorg/1.1.5~19 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=468a27eb3d72b30bb84a244eb4d02ab9fb36610b;p=platal.git Fixes reactivation of broken and suspended emails (Closes #1597). Signed-off-by: Stéphane Jacob --- diff --git a/ChangeLog b/ChangeLog index c31fb50..76c6dbe 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,7 @@ Bug/Wish: - #1608: Displays proper url in auth-group-x login -JAC * Email: + - #1597: Fixes reactivation of broken and suspended emails -JAC - #1601: Displays errors and warnings when adding people to ML -JAC * Search: diff --git a/include/emails.inc.php b/include/emails.inc.php index 4da4657..505f290 100644 --- a/include/emails.inc.php +++ b/include/emails.inc.php @@ -541,7 +541,7 @@ class Email // Activates the email address as a redirection. public function activate() { - if ($this->inactive) { + if (!$this->active) { if (in_array($this->type, self::get_allowed_storages($this->user))) { self::activate_storage($this->user, $this->type, $this->action); } else { @@ -551,6 +551,8 @@ class Email $this->user->id(), $this->email); } S::logger()->log('email_on', $this->email . ($this->user->id() != S::v('uid') ? "(admin on {$this->user->login()})" : '')); + $this->disabled = false; + $this->broken = false; $this->inactive = false; $this->active = true; }