Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 1987

Přidáno uživatelem Michal Kliment před více než 11 roky(ů)

Opravy:
- #36 a #615: spatne uvedene preruseni clenstvi (jeste zbyva merge do 1.0)

Zobrazit rozdíly:

freenetis/branches/1.1/application/models/member.php
switch ($type)
{
case Message_Model::INTERRUPTED_MEMBERSHIP_MESSAGE:
$where = "WHERE mf.id IS NOT NULL";
$where = "WHERE mi.id IS NOT NULL";
$order_by = 'whitelisted ASC, interrupt DESC';
break;
case Message_Model::DEBTOR_MESSAGE:
$where = "WHERE mf.id IS NULL "
$where = "WHERE mi.id IS NULL "
. " AND m.type <> " . intval(Member_Model::TYPE_APPLICANT)
. " AND a.balance < ".intval(Settings::get('debtor_boundary'))
." AND DATEDIFF(CURDATE(), m.entrance_date) >= ".intval(Settings::get('initial_debtor_immunity'));
......
break;
case Message_Model::PAYMENT_NOTICE_MESSAGE:
$where = "WHERE mf.id IS NULL "
$where = "WHERE mi.id IS NULL "
. " AND m.type <> " . intval(Member_Model::TYPE_APPLICANT)
. " AND a.balance < ".intval(Settings::get('payment_notice_boundary'))."
AND
......
m.*, m.id AS member_id, m.name AS member_name,
a.id AS aid, a.balance, a.comments_thread_id AS a_comments_thread_id,
a_comment, w.whitelisted,
IF(mf.id IS NOT NULL, 1,0) AS interrupt,
IFNULL(mi.id, 0) AS interrupt,
1 AS redirection, 1 AS email, 1 AS sms
FROM
(
......
JOIN users u ON c.user_id = u.id
GROUP BY comments_thread_id
) c ON c.comments_thread_id = a.comments_thread_id
LEFT JOIN membership_interrupts mip ON mip.member_id = m.id
LEFT JOIN members_fees mf ON mip.members_fee_id = mf.id
AND mf.activation_date <= CURDATE()
AND mf.deactivation_date >= CURDATE()
LEFT JOIN
(
SELECT mi.id, mi.member_id
FROM membership_interrupts mi
JOIN members_fees mf ON mi.members_fee_id = mf.id
AND mf.activation_date <= CURDATE()
AND mf.deactivation_date >= CURDATE()
) mi ON mi.member_id = m.id
LEFT JOIN
(
SELECT m2.id AS member_id, IF(mw.member_id IS NULL, 0, 2 - mw.permanent) AS whitelisted
FROM members m2
LEFT JOIN members_whitelists mw ON mw.member_id = m2.id

Také k dispozici: Unified diff