Merge pull request #73 from mareksapota-fb/master

Pull request for differential revision D1021
This commit is contained in:
Evan Priestley
2011-10-19 14:57:15 -07:00

View File

@@ -178,10 +178,12 @@ class PhabricatorMetaMTAMail extends PhabricatorMetaMTADAO {
* @return this * @return this
*/ */
public function saveAndSend() { public function saveAndSend() {
$ret = $this->save(); $ret = null;
if (PhabricatorEnv::getEnvConfig('metamta.send-immediately')) { if (PhabricatorEnv::getEnvConfig('metamta.send-immediately')) {
$this->sendNow(); $ret = $this->sendNow();
} else {
$ret = $this->save();
} }
return $ret; return $ret;
@@ -343,8 +345,7 @@ class PhabricatorMetaMTAMail extends PhabricatorMetaMTADAO {
} catch (Exception $ex) { } catch (Exception $ex) {
$this->setStatus(self::STATUS_FAIL); $this->setStatus(self::STATUS_FAIL);
$this->setMessage($ex->getMessage()); $this->setMessage($ex->getMessage());
$this->save(); return $this->save();
return;
} }
if ($this->getRetryCount() < $this->getSimulatedFailureCount()) { if ($this->getRetryCount() < $this->getSimulatedFailureCount()) {
@@ -373,7 +374,7 @@ class PhabricatorMetaMTAMail extends PhabricatorMetaMTADAO {
$this->setStatus(self::STATUS_SENT); $this->setStatus(self::STATUS_SENT);
} }
$this->save(); return $this->save();
} }
public static function getReadableStatus($status_code) { public static function getReadableStatus($status_code) {