if ($overlap !== true) { if ($overlap === false) { $error_detected[] = _T("An error occured checking overlaping fees :("); } else { //method directly return erro message $error_detected[] = $overlap; } } else { } } $new = false; if ($contrib->id == '') { $new = true; } if (count($error_detected) == 0) { $store = $contrib->store(); if ($store === true) { //contribution has been stored :) if ($new) { //if an external script has been configured, we call it if ($preferences->pref_new_contrib_script) { $es = new Galette\IO\ExternalScript($preferences); $res = $contrib->executePostScript($es); if ($res !== true) { //send admin a mail with all details if ($preferences->pref_mail_method > GaletteMail::METHOD_DISABLED) { $mail = new GaletteMail(); $mail->setSubject(_T("Post contribution script failed")); /** TODO: only super-admin is contacted here. We should send * a message to all admins, or propose them a chekbox if * they don't want to get bored