-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmod.threadedcomments.php
76 lines (55 loc) · 1.5 KB
/
mod.threadedcomments.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?php
/*
=====================================================
Threaded Comments
-----------------------------------------------------
http://www.intoeetive.com/
-----------------------------------------------------
Copyright (c) 2011-2016 Yuri Salimovskiy
=====================================================
*/
if ( ! defined('BASEPATH'))
{
exit('Invalid file request');
}
class Threadedcomments {
var $return_data = '';
var $settings = array();
/** ----------------------------------------
/** Constructor
/** ----------------------------------------*/
function __construct()
{
ee()->lang->loadfile('comment');
ee()->lang->loadfile('threadedcomments');
}
public function delete_thread_notification()
{
if ( ! $id = ee()->input->get_post('id') OR
! $hash = ee()->input->get_post('hash'))
{
return FALSE;
}
if ( ! is_numeric($id))
{
return FALSE;
}
ee()->lang->loadfile('comment');
ee()->load->library('subscription');
ee()->subscription->init('threadedcomments', array('subscription_id' => $id), TRUE);
ee()->subscription->unsubscribe('', $hash);
$data = array(
'title' => lang('cmt_notification_removal'),
'heading' => lang('thank_you'),
'content' => lang('cmt_you_have_been_removed'),
'redirect' => '',
'link' => array(
ee()->config->item('site_url'),
stripslashes(ee()->config->item('site_name'))
)
);
ee()->output->show_message($data);
}
}
/* END */
?>