Revize 2bd3da8a
Přidáno uživatelem Ondřej Fibich před téměř 6 roky(ů)
application/models/message.php | ||
---|---|---|
* when the end membership begins
|
||
*/
|
||
const FORMER_MEMBER_MESSAGE = 19;
|
||
|
||
/**
|
||
* content of page for big debtors, this redirection can be set in system
|
||
*/
|
||
const BIG_DEBTOR_MESSAGE = 20;
|
||
|
||
/**
|
||
* content of e-mail for contact verification
|
||
... | ... | |
self::UNKNOWN_DEVICE_MESSAGE => 'Unknown device',
|
||
self::INTERRUPTED_MEMBERSHIP_MESSAGE => 'Interrupted membership message',
|
||
self::DEBTOR_MESSAGE => 'Debtor message',
|
||
self::BIG_DEBTOR_MESSAGE => 'Big debtor message',
|
||
self::PAYMENT_NOTICE_MESSAGE => 'Payment notice',
|
||
self::UNALLOWED_CONNECTING_PLACE_MESSAGE => 'Unallowed connecting place',
|
||
self::RECEIVED_PAYMENT_NOTICE_MESSAGE => 'Received payment notice',
|
||
... | ... | |
$type == self::USER_MESSAGE ||
|
||
$type == self::INTERRUPTED_MEMBERSHIP_MESSAGE ||
|
||
$type == self::DEBTOR_MESSAGE ||
|
||
$type == self::BIG_DEBTOR_MESSAGE ||
|
||
$type == self::PAYMENT_NOTICE_MESSAGE ||
|
||
$type == self::UNALLOWED_CONNECTING_PLACE_MESSAGE ||
|
||
$type == self::INTERRUPTED_MEMBERSHIP_BEGIN_NOTIFY_MESSAGE ||
|
||
... | ... | |
$type == self::INTERRUPTED_MEMBERSHIP_END_NOTIFY_MESSAGE
|
||
);
|
||
}
|
||
|
||
/**
|
||
* Check if message is from finance module.
|
||
*
|
||
* @author Ondřej Fibich
|
||
* @param integer $type Type of message
|
||
* @return boolean
|
||
*/
|
||
public static function is_finance_message($type)
|
||
{
|
||
return (
|
||
$type == self::BIG_DEBTOR_MESSAGE ||
|
||
$type == self::DEBTOR_MESSAGE ||
|
||
$type == self::PAYMENT_NOTICE_MESSAGE
|
||
);
|
||
}
|
||
|
||
/**
|
||
* Check if message contains redirection content.
|
||
... | ... | |
return (
|
||
$type == self::USER_MESSAGE ||
|
||
$type == self::DEBTOR_MESSAGE ||
|
||
$type == self::BIG_DEBTOR_MESSAGE ||
|
||
$type == self::PAYMENT_NOTICE_MESSAGE ||
|
||
$type == self::RECEIVED_PAYMENT_NOTICE_MESSAGE ||
|
||
$type == self::APPLICANT_APPROVE_MEMBERSHIP ||
|
||
... | ... | |
return (
|
||
$type == self::USER_MESSAGE ||
|
||
$type == self::DEBTOR_MESSAGE ||
|
||
$type == self::BIG_DEBTOR_MESSAGE ||
|
||
$type == self::PAYMENT_NOTICE_MESSAGE ||
|
||
$type == self::RECEIVED_PAYMENT_NOTICE_MESSAGE ||
|
||
$type == self::CONNECTION_REQUEST_APPROVE ||
|
||
... | ... | |
{
|
||
return (
|
||
$type == self::DEBTOR_MESSAGE ||
|
||
$type == self::BIG_DEBTOR_MESSAGE ||
|
||
$type == self::PAYMENT_NOTICE_MESSAGE
|
||
);
|
||
}
|
||
... | ... | |
{
|
||
$where[] = "m.type <> " . intval(self::PAYMENT_NOTICE_MESSAGE);
|
||
$where[] = "m.type <> " . intval(self::DEBTOR_MESSAGE);
|
||
$where[] = "m.type <> " . intval(self::BIG_DEBTOR_MESSAGE);
|
||
$where[] = "m.type <> " . intval(self::RECEIVED_PAYMENT_NOTICE_MESSAGE);
|
||
}
|
||
else if (!is_numeric(Settings::get('big_debtor_boundary')))
|
||
{
|
||
$where[] = "m.type <> " . intval(self::BIG_DEBTOR_MESSAGE);
|
||
}
|
||
|
||
if (!Settings::get('membership_interrupt_enabled'))
|
||
{
|
Také k dispozici: Unified diff
Fixes #1096: Big debtor message + notification auto activation e-mail report [develop]