Revize 1919
Přidáno uživatelem Ondřej Fibich před více než 11 roky(ů)
freenetis/branches/1.1/application/models/messages_ip_addresses.php | ||
---|---|---|
*/
|
||
public function add_redirection_to_ip_address ($message_id, $ip_address_id, $comment)
|
||
{
|
||
return $this->db->insert('messages_ip_addresses', array
|
||
(
|
||
'message_id' => $message_id,
|
||
'ip_address_id' => $ip_address_id,
|
||
'user_id' => Session::instance()->get('user_id'),
|
||
'comment' => $comment,
|
||
'datetime' => date('Y-m-d H:i:s')
|
||
))->count();
|
||
// check for wrong redirection (#541)
|
||
if (trim(ORM::factory('message', $message_id)->text) != '')
|
||
{
|
||
return $this->db->insert('messages_ip_addresses', array
|
||
(
|
||
'message_id' => $message_id,
|
||
'ip_address_id' => $ip_address_id,
|
||
'user_id' => Session::instance()->get('user_id'),
|
||
'comment' => $comment,
|
||
'datetime' => date('Y-m-d H:i:s')
|
||
))->count();
|
||
}
|
||
|
||
return NULL;
|
||
}
|
||
|
||
}
|
freenetis/branches/1.1/application/models/message.php | ||
---|---|---|
throw new Exception('Wrong args');
|
||
}
|
||
|
||
// empty message
|
||
if (trim($message->text) == '')
|
||
{
|
||
return 0;
|
||
}
|
||
|
||
// preparations
|
||
$datetime = date('Y-m-d H:i:s');
|
||
$user_id = (intval($user_id)) ? intval($user_id) : 'NULL';
|
freenetis/branches/1.1/application/controllers/messages.php | ||
---|---|---|
}
|
||
// set vars
|
||
$message->email_text = empty($email_text) ? NULL : $email_text;
|
||
$message->sms_text = $sms_text;
|
||
$message->sms_text = @$sms_text;
|
||
|
||
if (Settings::get('sms_enabled'))
|
||
{
|
freenetis/branches/1.1/application/controllers/redirect.php | ||
---|---|---|
{
|
||
// IP address can be manually redirected only to user message,
|
||
// interrupted membership message, debtor message, payment notice message
|
||
if ($message->type == Message_Model::USER_MESSAGE ||
|
||
$message->type == Message_Model::INTERRUPTED_MEMBERSHIP_MESSAGE ||
|
||
$message->type == Message_Model::DEBTOR_MESSAGE ||
|
||
$message->type == Message_Model::PAYMENT_NOTICE_MESSAGE)
|
||
if (Message_Model::can_be_activate_directly($message->type) &&
|
||
trim($message->text) != '')
|
||
{
|
||
$message_array[$message->id] = __(''.$message->name);
|
||
}
|
||
... | ... | |
{
|
||
// IP address can be manually redirected only to user message,
|
||
// interrupted membership message, debtor message, payment notice message
|
||
if ($message->type == Message_Model::USER_MESSAGE ||
|
||
$message->type == Message_Model::INTERRUPTED_MEMBERSHIP_MESSAGE ||
|
||
$message->type == Message_Model::DEBTOR_MESSAGE ||
|
||
$message->type == Message_Model::PAYMENT_NOTICE_MESSAGE)
|
||
if (Message_Model::can_be_activate_directly($message->type) &&
|
||
trim($message->text) != '')
|
||
{
|
||
$message_array[$message->id] = __(''.$message->name);
|
||
}
|
freenetis/branches/1.1/application/views/ip_addresses/show.php | ||
---|---|---|
$links[] = html::anchor('ip_addresses/edit/'.$ip_address->id, __('Edit'), array('class' => 'popup_link'));
|
||
if (!$ip_address->member_id && $this->acl_check_delete('Devices_Controller', 'ip_address'))
|
||
$links[] = html::anchor('ip_addresses/delete/'.$ip_address->id, __('Delete'));
|
||
if ($this->acl_check_new('Messages_Controller', 'ip_address'))
|
||
if (Settings::get('redirection_enabled') && $this->acl_check_new('Messages_Controller', 'ip_address'))
|
||
$links[] = html::anchor('redirect/activate_to_ip_address/'.$ip_address->id, __('Activate redirection'));
|
||
if ($this->acl_check_view('Messages_Controller', 'ip_address'))
|
||
if (Settings::get('redirection_enabled') && $this->acl_check_view('Messages_Controller', 'ip_address'))
|
||
$links[] = html::anchor(url::base().'redirection/?ip_address='.$ip_address->ip_address, __('Redirection preview'));
|
||
|
||
echo implode(' | ', $links);
|
Také k dispozici: Unified diff
Opravy:
fixes #541: Prazdne zprava u aktivace presmerovani IP adresy