Fixes #4075 - this is janky and should be revisited

This commit is contained in:
snipe 2017-09-29 16:09:24 -07:00
parent 878bde67ac
commit e37503c734
2 changed files with 7 additions and 5 deletions

View file

@ -41,10 +41,12 @@ class CheckinNotification extends Notification
$notifyBy[] = 'slack';
}
$item = $this->params['item'];
if ((method_exists($item, 'requireAcceptance') && ($item->requireAcceptance()=='1'))
|| (method_exists($item, 'getEula') && ($item->getEula()))
) {
$notifyBy[] = 'mail';
if (class_basename(get_class($this->params['item']))=='Asset') {
if ((method_exists($item, 'requireAcceptance') && ($item->requireAcceptance() == '1'))
|| (method_exists($item, 'getEula') && ($item->getEula()))
) {
$notifyBy[] = 'mail';
}
}
return $notifyBy;
}

View file

@ -44,7 +44,7 @@ class CheckoutNotification extends Notification
}
$item = $this->params['item'];
if (class_basename(get_class($this->params['item']))!='License') {
if (class_basename(get_class($this->params['item']))=='Asset') {
$notifyBy[] = 'mail';
}
// if ((method_exists($item, 'requireAcceptance') && ($item->requireAcceptance()=='1'))