Email notify-on-fave moved to Profile_prefs (run upgrade.php)

This commit is contained in:
Mikael Nordfeldth
2014-07-13 17:13:05 +02:00
parent b46b588522
commit 0a20abf1d8
7 changed files with 73 additions and 27 deletions

View File

@@ -38,12 +38,10 @@ class FavCommand extends Command
$other = User::getKV('id', $notice->profile_id);
if ($other && $other->id != $this->user->id) {
if ($other->email && $other->emailnotifyfav) {
require_once INSTALLDIR.'/lib/mail.php';
if ($other && $other->id != $this->user->id && !empty($other->email)) {
require_once INSTALLDIR.'/lib/mail.php';
mail_notify_fave($other, $this->user->getProfile(), $notice);
}
mail_notify_fave($other, $this->user->getProfile(), $notice);
}
Fave::blowCacheForProfileId($this->user->id);