Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 1943

Přidáno uživatelem Ondřej Fibich před více než 11 roky(ů)

Opravy:
- fixes #585: V aktivaci uzivatelske zpravy se nebere v potaz bila listina u presmerovani

Zobrazit rozdíly:

freenetis/branches/1.1/application/models/ip_address.php
}
/**
* Gets all IP addresses of members selected by given whitelist condition.
*
* @author Ondřej Fibich
* @param boolean $ignore_whitelisted Ignore whitelisted IP addresses?
* @return Mysql_Result
*/
public function get_ip_addresses_for_user_redirection($ignore_whitelisted = FALSE)
{
$wl = "";
if (!$ignore_whitelisted)
{
$wl = "AND mw.id IS NULL";
}
return $this->db->query("
SELECT DISTINCT ip.id
FROM ip_addresses ip
LEFT JOIN ifaces i ON i.id = ip.iface_id
LEFT JOIN devices d ON d.id = i.device_id
LEFT JOIN users u ON u.id = d.user_id
LEFT JOIN members_whitelists mw ON
mw.member_id = IFNULL(ip.member_id, u.member_id) AND
mw.since <= CURDATE() AND mw.until >= CURDATE()
WHERE IFNULL(ip.member_id, u.member_id) <> 1 $wl
");
}
/**
* Function gets all ip address of interfaces of devices of users of given member.
*
* @param integer $member_id
freenetis/branches/1.1/application/models/message.php
// redirection
if ($redirection == Notifications_Controller::ACTIVATE)
{
// find IP addresses of debtors
$ips = $ip_model->find_all();
// find IP addresses
$ips = $ip_model->get_ip_addresses_for_user_redirection(
$message->ignore_whitelist
);
// activate redirection for finded IP addresses
$s['ip_count'] = self::activate_redirection($message, $ips, $user_id);
}
......
// send emails
if ($email == Notifications_Controller::ACTIVATE)
{
// find email addresses of debtors
// find email addresses
$emails = $uc_model->get_all_contacts_by_type(
Contact_Model::TYPE_EMAIL, $message->ignore_whitelist
);
......
if (Settings::get('sms_enabled') &&
$sms == Notifications_Controller::ACTIVATE)
{
// find phone numbers of debtors
// find phone numbers
$smss = $uc_model->get_all_contacts_by_type(
Contact_Model::TYPE_PHONE, $message->ignore_whitelist
);

Také k dispozici: Unified diff