@@ -18,31 +18,31 @@ discard block |
||
18 | 18 | class directory_website_in_queue extends \phpbb\notification\type\base |
19 | 19 | { |
20 | 20 | /** |
21 | - * Get notification type name |
|
22 | - * |
|
23 | - * @return string |
|
24 | - */ |
|
21 | + * Get notification type name |
|
22 | + * |
|
23 | + * @return string |
|
24 | + */ |
|
25 | 25 | public function get_type() |
26 | 26 | { |
27 | 27 | return 'ernadoo.phpbbdirectory.notification.type.directory_website_in_queue'; |
28 | 28 | } |
29 | 29 | |
30 | 30 | /** |
31 | - * Notification option data (for outputting to the user) |
|
32 | - * |
|
33 | - * @var bool|array False if the service should use it's default data |
|
34 | - * Array of data (including keys 'id', 'lang', and 'group') |
|
35 | - */ |
|
31 | + * Notification option data (for outputting to the user) |
|
32 | + * |
|
33 | + * @var bool|array False if the service should use it's default data |
|
34 | + * Array of data (including keys 'id', 'lang', and 'group') |
|
35 | + */ |
|
36 | 36 | public static $notification_option = array( |
37 | 37 | 'lang' => 'NOTIFICATION_TYPE_DIR_UCP_IN_MODERATION_QUEUE', |
38 | 38 | 'group' => 'NOTIFICATION_DIR_UCP', |
39 | 39 | ); |
40 | 40 | |
41 | 41 | /** |
42 | - * Permission to check for (in find_users_for_notification) |
|
43 | - * |
|
44 | - * @var string Permission name |
|
45 | - */ |
|
42 | + * Permission to check for (in find_users_for_notification) |
|
43 | + * |
|
44 | + * @var string Permission name |
|
45 | + */ |
|
46 | 46 | protected $permission = 'a_'; |
47 | 47 | |
48 | 48 | /** @var \phpbb\user_loader */ |
@@ -54,10 +54,10 @@ discard block |
||
54 | 54 | } |
55 | 55 | |
56 | 56 | /** |
57 | - * Is available |
|
58 | - * |
|
59 | - * @return bool True/False whether or not this is available to the user |
|
60 | - */ |
|
57 | + * Is available |
|
58 | + * |
|
59 | + * @return bool True/False whether or not this is available to the user |
|
60 | + */ |
|
61 | 61 | public function is_available() |
62 | 62 | { |
63 | 63 | $has_permission = $this->auth->acl_get($this->permission, true); |
@@ -66,21 +66,21 @@ discard block |
||
66 | 66 | } |
67 | 67 | |
68 | 68 | /** |
69 | - * Get link id |
|
70 | - * |
|
71 | - * @param array $data The data from the link |
|
72 | - * @return int |
|
73 | - */ |
|
69 | + * Get link id |
|
70 | + * |
|
71 | + * @param array $data The data from the link |
|
72 | + * @return int |
|
73 | + */ |
|
74 | 74 | static public function get_item_id($data) |
75 | 75 | { |
76 | 76 | return (int) $data['link_id']; |
77 | 77 | } |
78 | 78 | |
79 | 79 | /** |
80 | - * Get parent id - it's not used |
|
81 | - * |
|
82 | - * @param array $data The data from the link |
|
83 | - */ |
|
80 | + * Get parent id - it's not used |
|
81 | + * |
|
82 | + * @param array $data The data from the link |
|
83 | + */ |
|
84 | 84 | static public function get_item_parent_id($data) |
85 | 85 | { |
86 | 86 | // No parent |
@@ -88,12 +88,12 @@ discard block |
||
88 | 88 | } |
89 | 89 | |
90 | 90 | /** |
91 | - * Find the users who want to receive notifications |
|
92 | - * |
|
93 | - * @param array $data Data from submit link |
|
94 | - * @param array $options Options for finding users for notification |
|
95 | - * @return array |
|
96 | - */ |
|
91 | + * Find the users who want to receive notifications |
|
92 | + * |
|
93 | + * @param array $data Data from submit link |
|
94 | + * @param array $options Options for finding users for notification |
|
95 | + * @return array |
|
96 | + */ |
|
97 | 97 | public function find_users_for_notification($data, $options = array()) |
98 | 98 | { |
99 | 99 | $options = array_merge(array( |
@@ -113,18 +113,18 @@ discard block |
||
113 | 113 | } |
114 | 114 | |
115 | 115 | /** |
116 | - * Get the user's avatar |
|
117 | - */ |
|
116 | + * Get the user's avatar |
|
117 | + */ |
|
118 | 118 | public function get_avatar() |
119 | 119 | { |
120 | 120 | return $this->user_loader->get_avatar($this->get_data('user_from'), false, true); |
121 | 121 | } |
122 | 122 | |
123 | 123 | /** |
124 | - * Get the HTML formatted title of this notification |
|
125 | - * |
|
126 | - * @return string |
|
127 | - */ |
|
124 | + * Get the HTML formatted title of this notification |
|
125 | + * |
|
126 | + * @return string |
|
127 | + */ |
|
128 | 128 | public function get_title() |
129 | 129 | { |
130 | 130 | $link_name = $this->get_data('link_name'); |
@@ -134,30 +134,30 @@ discard block |
||
134 | 134 | } |
135 | 135 | |
136 | 136 | /** |
137 | - * Get email template |
|
138 | - * |
|
139 | - * @return string |
|
140 | - */ |
|
137 | + * Get email template |
|
138 | + * |
|
139 | + * @return string |
|
140 | + */ |
|
141 | 141 | public function get_email_template() |
142 | 142 | { |
143 | 143 | return '@ernadoo_phpbbdirectory/directory_website_in_queue'; |
144 | 144 | } |
145 | 145 | |
146 | 146 | /** |
147 | - * Get email template variables |
|
148 | - * |
|
149 | - * @return array |
|
150 | - */ |
|
147 | + * Get email template variables |
|
148 | + * |
|
149 | + * @return array |
|
150 | + */ |
|
151 | 151 | public function get_email_template_variables() |
152 | 152 | { |
153 | 153 | return array(); |
154 | 154 | } |
155 | 155 | |
156 | 156 | /** |
157 | - * Get the url to this item |
|
158 | - * |
|
159 | - * @return string URL |
|
160 | - */ |
|
157 | + * Get the url to this item |
|
158 | + * |
|
159 | + * @return string URL |
|
160 | + */ |
|
161 | 161 | public function get_url() |
162 | 162 | { |
163 | 163 | global $phpbb_admin_path; |
@@ -166,23 +166,23 @@ discard block |
||
166 | 166 | } |
167 | 167 | |
168 | 168 | /** |
169 | - * Users needed to query before this notification can be displayed |
|
170 | - * |
|
171 | - * @return array Array of user_ids |
|
172 | - */ |
|
169 | + * Users needed to query before this notification can be displayed |
|
170 | + * |
|
171 | + * @return array Array of user_ids |
|
172 | + */ |
|
173 | 173 | public function users_to_query() |
174 | 174 | { |
175 | 175 | return array($this->get_data('user_from')); |
176 | 176 | } |
177 | 177 | |
178 | 178 | /** |
179 | - * Function for preparing the data for insertion in an SQL query |
|
180 | - * (The service handles insertion) |
|
181 | - * |
|
182 | - * @param array $data Data from submit link |
|
183 | - * @param array $pre_create_data Data from pre_create_insert_array() |
|
184 | - * @return array Array of data ready to be inserted into the database |
|
185 | - */ |
|
179 | + * Function for preparing the data for insertion in an SQL query |
|
180 | + * (The service handles insertion) |
|
181 | + * |
|
182 | + * @param array $data Data from submit link |
|
183 | + * @param array $pre_create_data Data from pre_create_insert_array() |
|
184 | + * @return array Array of data ready to be inserted into the database |
|
185 | + */ |
|
186 | 186 | public function create_insert_array($data, $pre_create_data = array()) |
187 | 187 | { |
188 | 188 | $this->set_data('user_from', $data['user_from']); |
@@ -16,32 +16,32 @@ |
||
16 | 16 | protected $db; |
17 | 17 | |
18 | 18 | /** |
19 | - * Constructor |
|
20 | - * |
|
21 | - * @param \phpbb\db\driver\driver_interface $db |
|
22 | - */ |
|
19 | + * Constructor |
|
20 | + * |
|
21 | + * @param \phpbb\db\driver\driver_interface $db |
|
22 | + */ |
|
23 | 23 | public function __construct(\phpbb\db\driver\driver_interface $db) |
24 | 24 | { |
25 | 25 | $this->db = $db; |
26 | 26 | } |
27 | 27 | |
28 | 28 | /** |
29 | - * Performs a search on keywords depending on display specific params. You have to run split_keywords() first |
|
30 | - * |
|
31 | - * @param array $keywords_ary contains each words to search |
|
32 | - * @param string $fields contains either titleonly (link titles should be searched), desconly (only description bodies should be searched) |
|
33 | - * @param string $terms is either 'all' (use query as entered, words without prefix should default to "have to be in field") or 'any' (ignore search query parts and just return all posts that contain any of the specified words) |
|
34 | - * @param array $sort_by_sql contains SQL code for the ORDER BY part of a query |
|
35 | - * @param string $sort_key is the key of $sort_by_sql for the selected sorting |
|
36 | - * @param string $sort_dir is either a or d representing ASC and DESC |
|
37 | - * @param string $sort_days specifies the maximum amount of days a post may be old |
|
38 | - * @param array $ex_cid_ary specifies an array of category ids which should not be searched |
|
39 | - * @param int $cat_id is set to 0 or a topic id, if it is not 0 then only posts in this topic should be searched |
|
40 | - * @param array &$id_ary passed by reference, to be filled with ids for the page specified by $start and $per_page, should be ordered |
|
41 | - * @param int $start indicates the first index of the page |
|
42 | - * @param int $per_page number of ids each page is supposed to contain |
|
43 | - * @return int total number of results |
|
44 | - */ |
|
29 | + * Performs a search on keywords depending on display specific params. You have to run split_keywords() first |
|
30 | + * |
|
31 | + * @param array $keywords_ary contains each words to search |
|
32 | + * @param string $fields contains either titleonly (link titles should be searched), desconly (only description bodies should be searched) |
|
33 | + * @param string $terms is either 'all' (use query as entered, words without prefix should default to "have to be in field") or 'any' (ignore search query parts and just return all posts that contain any of the specified words) |
|
34 | + * @param array $sort_by_sql contains SQL code for the ORDER BY part of a query |
|
35 | + * @param string $sort_key is the key of $sort_by_sql for the selected sorting |
|
36 | + * @param string $sort_dir is either a or d representing ASC and DESC |
|
37 | + * @param string $sort_days specifies the maximum amount of days a post may be old |
|
38 | + * @param array $ex_cid_ary specifies an array of category ids which should not be searched |
|
39 | + * @param int $cat_id is set to 0 or a topic id, if it is not 0 then only posts in this topic should be searched |
|
40 | + * @param array &$id_ary passed by reference, to be filled with ids for the page specified by $start and $per_page, should be ordered |
|
41 | + * @param int $start indicates the first index of the page |
|
42 | + * @param int $per_page number of ids each page is supposed to contain |
|
43 | + * @return int total number of results |
|
44 | + */ |
|
45 | 45 | public function keyword_search($keywords_ary, $fields, $terms, $sort_by_sql, $sort_key, $sort_dir, $sort_days, $ex_cid_ary, $cat_id, &$id_ary, $start, $per_page) |
46 | 46 | { |
47 | 47 | $matches = array(); |
@@ -67,20 +67,20 @@ discard block |
||
67 | 67 | $match_search_query = ''; |
68 | 68 | foreach ($matches as $match) |
69 | 69 | { |
70 | - $match_search_query .= (($match_search_query) ? ' OR ' : '') . 'LOWER('. $match . ') '; |
|
71 | - $match_search_query .= $this->db->sql_like_expression(str_replace('*', $this->db->get_any_char(), $this->db->get_any_char() . strtolower($word) . $this->db->get_any_char())); |
|
70 | + $match_search_query .= (($match_search_query) ? ' OR ' : '').'LOWER('.$match.') '; |
|
71 | + $match_search_query .= $this->db->sql_like_expression(str_replace('*', $this->db->get_any_char(), $this->db->get_any_char().strtolower($word).$this->db->get_any_char())); |
|
72 | 72 | } |
73 | - $search_query .= ((!$search_query) ? '' : (($terms == 'all') ? ' AND ' : ' OR ')) . '(' . $match_search_query . ')'; |
|
73 | + $search_query .= ((!$search_query) ? '' : (($terms == 'all') ? ' AND ' : ' OR ')).'('.$match_search_query.')'; |
|
74 | 74 | } |
75 | 75 | $direction = (($sort_dir == 'd') ? 'DESC' : 'ASC'); |
76 | 76 | |
77 | 77 | if (is_array($sort_by_sql[$sort_key])) |
78 | 78 | { |
79 | - $sql_sort_order = implode(' ' . $direction . ', ', $sort_by_sql[$sort_key]) . ' ' . $direction; |
|
79 | + $sql_sort_order = implode(' '.$direction.', ', $sort_by_sql[$sort_key]).' '.$direction; |
|
80 | 80 | } |
81 | 81 | else |
82 | 82 | { |
83 | - $sql_sort_order = $sort_by_sql[$sort_key] . ' ' . $direction; |
|
83 | + $sql_sort_order = $sort_by_sql[$sort_key].' '.$direction; |
|
84 | 84 | } |
85 | 85 | |
86 | 86 | $sql_array = array( |
@@ -88,10 +88,10 @@ discard block |
||
88 | 88 | 'FROM' => array( |
89 | 89 | DIR_LINK_TABLE => 'l'), |
90 | 90 | 'WHERE' => 'l.link_active = 1 |
91 | - ' . (($search_query) ? 'AND (' . $search_query . ')' : '') . ' |
|
92 | - ' . (sizeof($ex_cid_ary) ? ' AND ' . $this->db->sql_in_set('l.link_cat', $ex_cid_ary, true) : '') . ' |
|
93 | - ' . (($cat_id) ? ' AND ' . $this->db->sql_in_set('l.link_cat', $cat_id) : '') . ' |
|
94 | - ' . (($sort_days) ? ' AND l.link_time >= ' . (time() - ($sort_days * 86400)) : ''), |
|
91 | + ' . (($search_query) ? 'AND ('.$search_query.')' : '').' |
|
92 | + ' . (sizeof($ex_cid_ary) ? ' AND '.$this->db->sql_in_set('l.link_cat', $ex_cid_ary, true) : '').' |
|
93 | + ' . (($cat_id) ? ' AND '.$this->db->sql_in_set('l.link_cat', $cat_id) : '').' |
|
94 | + ' . (($sort_days) ? ' AND l.link_time >= '.(time() - ($sort_days * 86400)) : ''), |
|
95 | 95 | 'ORDER_BY' => $sql_sort_order |
96 | 96 | ); |
97 | 97 |
@@ -13,11 +13,11 @@ |
||
13 | 13 | class nestedset_category extends \phpbb\tree\nestedset |
14 | 14 | { |
15 | 15 | /** |
16 | - * Construct |
|
17 | - * |
|
18 | - * @param \phpbb\db\driver\driver_interface $db Database connection |
|
19 | - * @param \phpbb\lock\db $lock Lock class used to lock the table when moving forums around |
|
20 | - */ |
|
16 | + * Construct |
|
17 | + * |
|
18 | + * @param \phpbb\db\driver\driver_interface $db Database connection |
|
19 | + * @param \phpbb\lock\db $lock Lock class used to lock the table when moving forums around |
|
20 | + */ |
|
21 | 21 | public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\lock\db $lock) |
22 | 22 | { |
23 | 23 | parent::__construct( |
@@ -21,32 +21,32 @@ discard block |
||
21 | 21 | protected $helper; |
22 | 22 | |
23 | 23 | /** |
24 | - * Set the controller helper |
|
25 | - * |
|
26 | - * @param \phpbb\controller\helper $helper |
|
27 | - * @return null |
|
28 | - */ |
|
24 | + * Set the controller helper |
|
25 | + * |
|
26 | + * @param \phpbb\controller\helper $helper |
|
27 | + * @return null |
|
28 | + */ |
|
29 | 29 | public function set_controller_helper(\phpbb\controller\helper $helper) |
30 | 30 | { |
31 | 31 | $this->helper = $helper; |
32 | 32 | } |
33 | 33 | |
34 | 34 | /** |
35 | - * Get notification type name |
|
36 | - * |
|
37 | - * @return string |
|
38 | - */ |
|
35 | + * Get notification type name |
|
36 | + * |
|
37 | + * @return string |
|
38 | + */ |
|
39 | 39 | public function get_type() |
40 | 40 | { |
41 | 41 | return 'ernadoo.phpbbdirectory.notification.type.directory_website'; |
42 | 42 | } |
43 | 43 | |
44 | 44 | /** |
45 | - * Notification option data (for outputting to the user) |
|
46 | - * |
|
47 | - * @var bool|array False if the service should use it's default data |
|
48 | - * Array of data (including keys 'id', 'lang', and 'group') |
|
49 | - */ |
|
45 | + * Notification option data (for outputting to the user) |
|
46 | + * |
|
47 | + * @var bool|array False if the service should use it's default data |
|
48 | + * Array of data (including keys 'id', 'lang', and 'group') |
|
49 | + */ |
|
50 | 50 | public static $notification_option = array( |
51 | 51 | 'lang' => 'NOTIFICATION_TYPE_DIR_UCP_WEBSITE', |
52 | 52 | 'group' => 'NOTIFICATION_DIR_UCP', |
@@ -61,31 +61,31 @@ discard block |
||
61 | 61 | } |
62 | 62 | |
63 | 63 | /** |
64 | - * Is available |
|
65 | - * |
|
66 | - * @return bool True/False whether or not this is available to the user |
|
67 | - */ |
|
64 | + * Is available |
|
65 | + * |
|
66 | + * @return bool True/False whether or not this is available to the user |
|
67 | + */ |
|
68 | 68 | public function is_available() |
69 | 69 | { |
70 | 70 | return true; |
71 | 71 | } |
72 | 72 | |
73 | 73 | /** |
74 | - * Get link id |
|
75 | - * |
|
76 | - * @param array $data The data from the link |
|
77 | - * @return int |
|
78 | - */ |
|
74 | + * Get link id |
|
75 | + * |
|
76 | + * @param array $data The data from the link |
|
77 | + * @return int |
|
78 | + */ |
|
79 | 79 | static public function get_item_id($data) |
80 | 80 | { |
81 | 81 | return (int) $data['link_id']; |
82 | 82 | } |
83 | 83 | |
84 | 84 | /** |
85 | - * Get parent id - it's not used |
|
86 | - * |
|
87 | - * @param array $data The data from the link |
|
88 | - */ |
|
85 | + * Get parent id - it's not used |
|
86 | + * |
|
87 | + * @param array $data The data from the link |
|
88 | + */ |
|
89 | 89 | static public function get_item_parent_id($data) |
90 | 90 | { |
91 | 91 | // No parent |
@@ -93,12 +93,12 @@ discard block |
||
93 | 93 | } |
94 | 94 | |
95 | 95 | /** |
96 | - * Find the users who want to receive notifications |
|
97 | - * |
|
98 | - * @param array $data Data from submit link |
|
99 | - * @param array $options Options for finding users for notification |
|
100 | - * @return array |
|
101 | - */ |
|
96 | + * Find the users who want to receive notifications |
|
97 | + * |
|
98 | + * @param array $data Data from submit link |
|
99 | + * @param array $options Options for finding users for notification |
|
100 | + * @return array |
|
101 | + */ |
|
102 | 102 | public function find_users_for_notification($data, $options = array()) |
103 | 103 | { |
104 | 104 | $options = array_merge(array( |
@@ -130,8 +130,8 @@ discard block |
||
130 | 130 | } |
131 | 131 | |
132 | 132 | /** |
133 | - * Get the user's avatar |
|
134 | - */ |
|
133 | + * Get the user's avatar |
|
134 | + */ |
|
135 | 135 | public function get_avatar() |
136 | 136 | { |
137 | 137 | return $this->user_loader->get_avatar($this->get_data('user_from'), false, true); |
@@ -139,10 +139,10 @@ discard block |
||
139 | 139 | |
140 | 140 | |
141 | 141 | /** |
142 | - * Get the HTML formatted title of this notification |
|
143 | - * |
|
144 | - * @return string |
|
145 | - */ |
|
142 | + * Get the HTML formatted title of this notification |
|
143 | + * |
|
144 | + * @return string |
|
145 | + */ |
|
146 | 146 | |
147 | 147 | public function get_title() |
148 | 148 | { |
@@ -155,20 +155,20 @@ discard block |
||
155 | 155 | |
156 | 156 | |
157 | 157 | /** |
158 | - * Get email template |
|
159 | - * |
|
160 | - * @return string |
|
161 | - */ |
|
158 | + * Get email template |
|
159 | + * |
|
160 | + * @return string |
|
161 | + */ |
|
162 | 162 | public function get_email_template() |
163 | 163 | { |
164 | 164 | return '@ernadoo_phpbbdirectory/directory_website'; |
165 | 165 | } |
166 | 166 | |
167 | 167 | /** |
168 | - * Get email template variables |
|
169 | - * |
|
170 | - * @return array |
|
171 | - */ |
|
168 | + * Get email template variables |
|
169 | + * |
|
170 | + * @return array |
|
171 | + */ |
|
172 | 172 | public function get_email_template_variables() |
173 | 173 | { |
174 | 174 | return array( |
@@ -180,33 +180,33 @@ discard block |
||
180 | 180 | } |
181 | 181 | |
182 | 182 | /** |
183 | - * Get the url to this item |
|
184 | - * |
|
185 | - * @return string URL |
|
186 | - */ |
|
183 | + * Get the url to this item |
|
184 | + * |
|
185 | + * @return string URL |
|
186 | + */ |
|
187 | 187 | public function get_url() |
188 | 188 | { |
189 | 189 | return $this->helper->route('ernadoo_phpbbdirectory_page_controller', array('cat_id' => (int) $this->get_data('cat_id'))); |
190 | 190 | } |
191 | 191 | |
192 | 192 | /** |
193 | - * Users needed to query before this notification can be displayed |
|
194 | - * |
|
195 | - * @return array Array of user_ids |
|
196 | - */ |
|
193 | + * Users needed to query before this notification can be displayed |
|
194 | + * |
|
195 | + * @return array Array of user_ids |
|
196 | + */ |
|
197 | 197 | public function users_to_query() |
198 | 198 | { |
199 | 199 | return array($this->get_data('user_from')); |
200 | 200 | } |
201 | 201 | |
202 | 202 | /** |
203 | - * Function for preparing the data for insertion in an SQL query |
|
204 | - * (The service handles insertion) |
|
205 | - * |
|
206 | - * @param array $data Data from submit link |
|
207 | - * @param array $pre_create_data Data from pre_create_insert_array() |
|
208 | - * @return array Array of data ready to be inserted into the database |
|
209 | - */ |
|
203 | + * Function for preparing the data for insertion in an SQL query |
|
204 | + * (The service handles insertion) |
|
205 | + * |
|
206 | + * @param array $data Data from submit link |
|
207 | + * @param array $pre_create_data Data from pre_create_insert_array() |
|
208 | + * @return array Array of data ready to be inserted into the database |
|
209 | + */ |
|
210 | 210 | public function create_insert_array($data, $pre_create_data = array()) |
211 | 211 | { |
212 | 212 | $this->set_data('link_name', $data['link_name']); |
@@ -108,9 +108,9 @@ |
||
108 | 108 | $users = array(); |
109 | 109 | |
110 | 110 | $sql = 'SELECT user_id |
111 | - FROM ' . DIR_WATCH_TABLE . ' |
|
112 | - WHERE cat_id = ' . (int) $data['cat_id'] . ' |
|
113 | - AND notify_status = ' . NOTIFY_YES . ' |
|
111 | + FROM ' . DIR_WATCH_TABLE.' |
|
112 | + WHERE cat_id = ' . (int) $data['cat_id'].' |
|
113 | + AND notify_status = ' . NOTIFY_YES.' |
|
114 | 114 | AND user_id <> ' . (int) $data['user_from']; |
115 | 115 | $result = $this->db->sql_query($sql); |
116 | 116 | while ($row = $this->db->sql_fetchrow($result)) |
@@ -21,32 +21,32 @@ discard block |
||
21 | 21 | protected $helper; |
22 | 22 | |
23 | 23 | /** |
24 | - * Set the controller helper |
|
25 | - * |
|
26 | - * @param \phpbb\controller\helper $helper |
|
27 | - * @return null |
|
28 | - */ |
|
24 | + * Set the controller helper |
|
25 | + * |
|
26 | + * @param \phpbb\controller\helper $helper |
|
27 | + * @return null |
|
28 | + */ |
|
29 | 29 | public function set_controller_helper(\phpbb\controller\helper $helper) |
30 | 30 | { |
31 | 31 | $this->helper = $helper; |
32 | 32 | } |
33 | 33 | |
34 | 34 | /** |
35 | - * Get notification type name |
|
36 | - * |
|
37 | - * @return string |
|
38 | - */ |
|
35 | + * Get notification type name |
|
36 | + * |
|
37 | + * @return string |
|
38 | + */ |
|
39 | 39 | public function get_type() |
40 | 40 | { |
41 | 41 | return 'ernadoo.phpbbdirectory.notification.type.directory_website_approved'; |
42 | 42 | } |
43 | 43 | |
44 | 44 | /** |
45 | - * Notification option data (for outputting to the user) |
|
46 | - * |
|
47 | - * @var bool|array False if the service should use it's default data |
|
48 | - * Array of data (including keys 'id', 'lang', and 'group') |
|
49 | - */ |
|
45 | + * Notification option data (for outputting to the user) |
|
46 | + * |
|
47 | + * @var bool|array False if the service should use it's default data |
|
48 | + * Array of data (including keys 'id', 'lang', and 'group') |
|
49 | + */ |
|
50 | 50 | public static $notification_option = array( |
51 | 51 | 'id' => 'dir_moderation_queue', |
52 | 52 | 'lang' => 'NOTIFICATION_TYPE_DIR_UCP_MODERATION_QUEUE', |
@@ -54,17 +54,17 @@ discard block |
||
54 | 54 | ); |
55 | 55 | |
56 | 56 | /** |
57 | - * Permission to check for (in find_users_for_notification) |
|
58 | - * |
|
59 | - * @var string Permission name |
|
60 | - */ |
|
57 | + * Permission to check for (in find_users_for_notification) |
|
58 | + * |
|
59 | + * @var string Permission name |
|
60 | + */ |
|
61 | 61 | protected $permission = array('a_', 'm_'); |
62 | 62 | |
63 | 63 | /** |
64 | - * Is available |
|
65 | - * |
|
66 | - * @return bool True/False whether or not this is available to the user |
|
67 | - */ |
|
64 | + * Is available |
|
65 | + * |
|
66 | + * @return bool True/False whether or not this is available to the user |
|
67 | + */ |
|
68 | 68 | public function is_available() |
69 | 69 | { |
70 | 70 | $has_permission = $this->auth->acl_gets($this->permission, true); |
@@ -73,21 +73,21 @@ discard block |
||
73 | 73 | } |
74 | 74 | |
75 | 75 | /** |
76 | - * Get link id |
|
77 | - * |
|
78 | - * @param array $data The data from the link |
|
79 | - * @return int |
|
80 | - */ |
|
76 | + * Get link id |
|
77 | + * |
|
78 | + * @param array $data The data from the link |
|
79 | + * @return int |
|
80 | + */ |
|
81 | 81 | static public function get_item_id($data) |
82 | 82 | { |
83 | 83 | return (int) $data['link_id']; |
84 | 84 | } |
85 | 85 | |
86 | 86 | /** |
87 | - * Get parent id - it's not used |
|
88 | - * |
|
89 | - * @param array $data The data from the link |
|
90 | - */ |
|
87 | + * Get parent id - it's not used |
|
88 | + * |
|
89 | + * @param array $data The data from the link |
|
90 | + */ |
|
91 | 91 | static public function get_item_parent_id($data) |
92 | 92 | { |
93 | 93 | // No parent |
@@ -95,12 +95,12 @@ discard block |
||
95 | 95 | } |
96 | 96 | |
97 | 97 | /** |
98 | - * Find the users who want to receive notifications |
|
99 | - * |
|
100 | - * @param array $data Data from submit link |
|
101 | - * @param array $options Options for finding users for notification |
|
102 | - * @return array |
|
103 | - */ |
|
98 | + * Find the users who want to receive notifications |
|
99 | + * |
|
100 | + * @param array $data Data from submit link |
|
101 | + * @param array $options Options for finding users for notification |
|
102 | + * @return array |
|
103 | + */ |
|
104 | 104 | public function find_users_for_notification($data, $options = array()) |
105 | 105 | { |
106 | 106 | $options = array_merge(array( |
@@ -116,10 +116,10 @@ discard block |
||
116 | 116 | } |
117 | 117 | |
118 | 118 | /** |
119 | - * Get the HTML formatted title of this notification |
|
120 | - * |
|
121 | - * @return string |
|
122 | - */ |
|
119 | + * Get the HTML formatted title of this notification |
|
120 | + * |
|
121 | + * @return string |
|
122 | + */ |
|
123 | 123 | public function get_title() |
124 | 124 | { |
125 | 125 | $link_name = $this->get_data('link_name'); |
@@ -129,20 +129,20 @@ discard block |
||
129 | 129 | } |
130 | 130 | |
131 | 131 | /** |
132 | - * Get email template |
|
133 | - * |
|
134 | - * @return string |
|
135 | - */ |
|
132 | + * Get email template |
|
133 | + * |
|
134 | + * @return string |
|
135 | + */ |
|
136 | 136 | public function get_email_template() |
137 | 137 | { |
138 | 138 | return '@ernadoo_phpbbdirectory/directory_website_approved'; |
139 | 139 | } |
140 | 140 | |
141 | 141 | /** |
142 | - * Get email template variables |
|
143 | - * |
|
144 | - * @return array |
|
145 | - */ |
|
142 | + * Get email template variables |
|
143 | + * |
|
144 | + * @return array |
|
145 | + */ |
|
146 | 146 | public function get_email_template_variables() |
147 | 147 | { |
148 | 148 | return array( |
@@ -151,33 +151,33 @@ discard block |
||
151 | 151 | } |
152 | 152 | |
153 | 153 | /** |
154 | - * Get the url to this item |
|
155 | - * |
|
156 | - * @return string URL |
|
157 | - */ |
|
154 | + * Get the url to this item |
|
155 | + * |
|
156 | + * @return string URL |
|
157 | + */ |
|
158 | 158 | public function get_url() |
159 | 159 | { |
160 | 160 | return $this->helper->route('ernadoo_phpbbdirectory_page_controller', array('cat_id' => (int) $this->get_data('cat_id'))); |
161 | 161 | } |
162 | 162 | |
163 | 163 | /** |
164 | - * Users needed to query before this notification can be displayed |
|
165 | - * |
|
166 | - * @return array Array of user_ids |
|
167 | - */ |
|
164 | + * Users needed to query before this notification can be displayed |
|
165 | + * |
|
166 | + * @return array Array of user_ids |
|
167 | + */ |
|
168 | 168 | public function users_to_query() |
169 | 169 | { |
170 | 170 | return array(); |
171 | 171 | } |
172 | 172 | |
173 | 173 | /** |
174 | - * Function for preparing the data for insertion in an SQL query |
|
175 | - * (The service handles insertion) |
|
176 | - * |
|
177 | - * @param array $data Data from submit link |
|
178 | - * @param array $pre_create_data Data from pre_create_insert_array() |
|
179 | - * @return array Array of data ready to be inserted into the database |
|
180 | - */ |
|
174 | + * Function for preparing the data for insertion in an SQL query |
|
175 | + * (The service handles insertion) |
|
176 | + * |
|
177 | + * @param array $data Data from submit link |
|
178 | + * @param array $pre_create_data Data from pre_create_insert_array() |
|
179 | + * @return array Array of data ready to be inserted into the database |
|
180 | + */ |
|
181 | 181 | public function create_insert_array($data, $pre_create_data = array()) |
182 | 182 | { |
183 | 183 | $this->set_data('link_name', $data['link_name']); |
@@ -13,8 +13,8 @@ discard block |
||
13 | 13 | class v2_0_0 extends \phpbb\db\migration\container_aware_migration |
14 | 14 | { |
15 | 15 | /** |
16 | - * @inheritDoc |
|
17 | - */ |
|
16 | + * @inheritDoc |
|
17 | + */ |
|
18 | 18 | static public function depends_on() |
19 | 19 | { |
20 | 20 | return array( |
@@ -23,8 +23,8 @@ discard block |
||
23 | 23 | } |
24 | 24 | |
25 | 25 | /** |
26 | - * @inheritDoc |
|
27 | - */ |
|
26 | + * @inheritDoc |
|
27 | + */ |
|
28 | 28 | public function update_data() |
29 | 29 | { |
30 | 30 | return array( |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | { |
46 | 46 | $default_reparser = new $fast_reparsers[0][0]( |
47 | 47 | $this->db, |
48 | - $this->container->getParameter('core.table_prefix') . $fast_reparsers[0][1]); |
|
48 | + $this->container->getParameter('core.table_prefix').$fast_reparsers[0][1]); |
|
49 | 49 | |
50 | 50 | $resume_data = array( |
51 | 51 | 'reparser' => 0, |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | { |
61 | 61 | $reparser = new $fast_reparsers[$resume_data['reparser']][0]( |
62 | 62 | $this->db, |
63 | - $this->container->getParameter('core.table_prefix') . $fast_reparsers[$resume_data['reparser']][1] |
|
63 | + $this->container->getParameter('core.table_prefix').$fast_reparsers[$resume_data['reparser']][1] |
|
64 | 64 | ); |
65 | 65 | |
66 | 66 | // New reparser |
@@ -13,8 +13,8 @@ |
||
13 | 13 | class comment_text extends \phpbb\textreparser\row_based_plugin |
14 | 14 | { |
15 | 15 | /** |
16 | - * {@inheritdoc} |
|
17 | - */ |
|
16 | + * {@inheritdoc} |
|
17 | + */ |
|
18 | 18 | public function get_columns() |
19 | 19 | { |
20 | 20 | return array( |
@@ -47,19 +47,19 @@ discard block |
||
47 | 47 | public $data = array(); |
48 | 48 | |
49 | 49 | /** |
50 | - * Constructor |
|
51 | - * |
|
52 | - * @param \phpbb\db\driver\driver_interface $db Database object |
|
53 | - * @param \phpbb\config\config $config Config object |
|
54 | - * @param \phpbb\language\language $language Language object |
|
55 | - * @param \phpbb\template\template $template Template object |
|
56 | - * @param \phpbb\user $user User object |
|
57 | - * @param \phpbb\controller\helper $helper Controller helper object |
|
58 | - * @param \phpbb\request\request $request Request object |
|
59 | - * @param \phpbb\auth\auth $auth Auth object |
|
60 | - * @param \phpbb\cron\manager $cron Cron object |
|
61 | - * @param \ernadoo\phpbbdirectory\core\helper $dir_helper PhpBB Directory extension helper object |
|
62 | - */ |
|
50 | + * Constructor |
|
51 | + * |
|
52 | + * @param \phpbb\db\driver\driver_interface $db Database object |
|
53 | + * @param \phpbb\config\config $config Config object |
|
54 | + * @param \phpbb\language\language $language Language object |
|
55 | + * @param \phpbb\template\template $template Template object |
|
56 | + * @param \phpbb\user $user User object |
|
57 | + * @param \phpbb\controller\helper $helper Controller helper object |
|
58 | + * @param \phpbb\request\request $request Request object |
|
59 | + * @param \phpbb\auth\auth $auth Auth object |
|
60 | + * @param \phpbb\cron\manager $cron Cron object |
|
61 | + * @param \ernadoo\phpbbdirectory\core\helper $dir_helper PhpBB Directory extension helper object |
|
62 | + */ |
|
63 | 63 | public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\config\config $config, \phpbb\language\language $language, \phpbb\template\template $template, \phpbb\user $user, \phpbb\controller\helper $helper, \phpbb\request\request $request, \phpbb\auth\auth $auth, \phpbb\cron\manager $cron, \ernadoo\phpbbdirectory\core\helper $dir_helper) |
64 | 64 | { |
65 | 65 | $this->db = $db; |
@@ -75,21 +75,21 @@ discard block |
||
75 | 75 | } |
76 | 76 | |
77 | 77 | /** |
78 | - * Function for get approval setting |
|
79 | - * used in edit mode for test the setting of new category's link |
|
80 | - * |
|
81 | - * @return bool |
|
82 | - */ |
|
78 | + * Function for get approval setting |
|
79 | + * used in edit mode for test the setting of new category's link |
|
80 | + * |
|
81 | + * @return bool |
|
82 | + */ |
|
83 | 83 | public function need_approval() |
84 | 84 | { |
85 | 85 | return (bool) $this->data['cat_validate']; |
86 | 86 | } |
87 | 87 | |
88 | 88 | /** |
89 | - * Generate Jumpbox |
|
90 | - * |
|
91 | - * @return null |
|
92 | - */ |
|
89 | + * Generate Jumpbox |
|
90 | + * |
|
91 | + * @return null |
|
92 | + */ |
|
93 | 93 | public function make_cat_jumpbox() |
94 | 94 | { |
95 | 95 | $sql = 'SELECT cat_id, cat_name, parent_id, left_id, right_id |
@@ -142,12 +142,12 @@ discard block |
||
142 | 142 | } |
143 | 143 | |
144 | 144 | /** |
145 | - * Generate a list of directory's categories |
|
146 | - * |
|
147 | - * @param int $select_id Selected category |
|
148 | - * @param array $ignore_id Array of ignored categories |
|
149 | - * @return string $cat_list html code |
|
150 | - */ |
|
145 | + * Generate a list of directory's categories |
|
146 | + * |
|
147 | + * @param int $select_id Selected category |
|
148 | + * @param array $ignore_id Array of ignored categories |
|
149 | + * @return string $cat_list html code |
|
150 | + */ |
|
151 | 151 | public function make_cat_select($select_id = 0, $ignore_id = array()) |
152 | 152 | { |
153 | 153 | $ignore_id = is_array($ignore_id) ? $ignore_id : array($ignore_id); |
@@ -193,10 +193,10 @@ discard block |
||
193 | 193 | } |
194 | 194 | |
195 | 195 | /** |
196 | - * Display cat or subcat |
|
197 | - * |
|
198 | - * @return null |
|
199 | - */ |
|
196 | + * Display cat or subcat |
|
197 | + * |
|
198 | + * @return null |
|
199 | + */ |
|
200 | 200 | public function display() |
201 | 201 | { |
202 | 202 | $cat_rows = $subcats = array(); |
@@ -325,11 +325,11 @@ discard block |
||
325 | 325 | } |
326 | 326 | |
327 | 327 | /** |
328 | - * Get informations about a cat or subcat |
|
329 | - * |
|
330 | - * @param int $cat_id The category ID |
|
331 | - * @return null|false |
|
332 | - */ |
|
328 | + * Get informations about a cat or subcat |
|
329 | + * |
|
330 | + * @param int $cat_id The category ID |
|
331 | + * @return null|false |
|
332 | + */ |
|
333 | 333 | public function get($cat_id = 0) |
334 | 334 | { |
335 | 335 | if ($cat_id) |
@@ -357,11 +357,11 @@ discard block |
||
357 | 357 | } |
358 | 358 | |
359 | 359 | /** |
360 | - * Create category navigation links for given category, create parent |
|
361 | - * list if currently null, assign basic category info to template |
|
362 | - * |
|
363 | - * @param array $dir_cat_data |
|
364 | - */ |
|
360 | + * Create category navigation links for given category, create parent |
|
361 | + * list if currently null, assign basic category info to template |
|
362 | + * |
|
363 | + * @param array $dir_cat_data |
|
364 | + */ |
|
365 | 365 | public function generate_dir_nav(&$dir_cat_data) |
366 | 366 | { |
367 | 367 | global $phpbb_container; |
@@ -398,12 +398,12 @@ discard block |
||
398 | 398 | } |
399 | 399 | |
400 | 400 | /** |
401 | - * Return good key language |
|
402 | - * |
|
403 | - * @param bool $validate True if approbation needed before publication |
|
404 | - * @return string Information about approval, depends on user auth level |
|
405 | - * @throws \phpbb\exception\runtime_exception |
|
406 | - */ |
|
401 | + * Return good key language |
|
402 | + * |
|
403 | + * @param bool $validate True if approbation needed before publication |
|
404 | + * @return string Information about approval, depends on user auth level |
|
405 | + * @throws \phpbb\exception\runtime_exception |
|
406 | + */ |
|
407 | 407 | public function dir_submit_type($validate) |
408 | 408 | { |
409 | 409 | if ($validate && !$this->auth->acl_get('a_')) |
@@ -427,15 +427,15 @@ discard block |
||
427 | 427 | } |
428 | 428 | |
429 | 429 | /** |
430 | - * Category watching common code |
|
431 | - * |
|
432 | - * @param string $mode Watch or unwatch a category |
|
433 | - * @param array $s_watching An empty array, passed by reference |
|
434 | - * @param int $user_id The user ID |
|
435 | - * @param int $cat_id The category ID |
|
436 | - * @param string $notify_status User is watching the category? |
|
437 | - * @return null|string |
|
438 | - */ |
|
430 | + * Category watching common code |
|
431 | + * |
|
432 | + * @param string $mode Watch or unwatch a category |
|
433 | + * @param array $s_watching An empty array, passed by reference |
|
434 | + * @param int $user_id The user ID |
|
435 | + * @param int $cat_id The category ID |
|
436 | + * @param string $notify_status User is watching the category? |
|
437 | + * @return null|string |
|
438 | + */ |
|
439 | 439 | public function watch_categorie($mode, &$s_watching, $user_id, $cat_id, $notify_status) |
440 | 440 | { |
441 | 441 | // Is user watching this thread? |
@@ -521,11 +521,11 @@ discard block |
||
521 | 521 | } |
522 | 522 | |
523 | 523 | /** |
524 | - * Return Category name |
|
525 | - * |
|
526 | - * @param int $cat_id The category ID |
|
527 | - * @return string The category name |
|
528 | - */ |
|
524 | + * Return Category name |
|
525 | + * |
|
526 | + * @param int $cat_id The category ID |
|
527 | + * @return string The category name |
|
528 | + */ |
|
529 | 529 | static public function getname($cat_id) |
530 | 530 | { |
531 | 531 | global $db; |
@@ -62,16 +62,16 @@ discard block |
||
62 | 62 | */ |
63 | 63 | public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\config\config $config, \phpbb\language\language $language, \phpbb\template\template $template, \phpbb\user $user, \phpbb\controller\helper $helper, \phpbb\request\request $request, \phpbb\auth\auth $auth, \phpbb\cron\manager $cron, \ernadoo\phpbbdirectory\core\helper $dir_helper) |
64 | 64 | { |
65 | - $this->db = $db; |
|
66 | - $this->config = $config; |
|
65 | + $this->db = $db; |
|
66 | + $this->config = $config; |
|
67 | 67 | $this->language = $language; |
68 | 68 | $this->template = $template; |
69 | 69 | $this->user = $user; |
70 | - $this->helper = $helper; |
|
71 | - $this->request = $request; |
|
70 | + $this->helper = $helper; |
|
71 | + $this->request = $request; |
|
72 | 72 | $this->auth = $auth; |
73 | 73 | $this->cron = $cron; |
74 | - $this->dir_helper = $dir_helper; |
|
74 | + $this->dir_helper = $dir_helper; |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | /** |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | public function make_cat_jumpbox() |
94 | 94 | { |
95 | 95 | $sql = 'SELECT cat_id, cat_name, parent_id, left_id, right_id |
96 | - FROM ' . DIR_CAT_TABLE . ' |
|
96 | + FROM ' . DIR_CAT_TABLE.' |
|
97 | 97 | ORDER BY left_id ASC'; |
98 | 98 | $result = $this->db->sql_query($sql, 600); |
99 | 99 | |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | |
155 | 155 | // This query is identical to the jumpbox one |
156 | 156 | $sql = 'SELECT cat_id, cat_name, parent_id, left_id, right_id |
157 | - FROM ' . DIR_CAT_TABLE . ' |
|
157 | + FROM ' . DIR_CAT_TABLE.' |
|
158 | 158 | ORDER BY left_id ASC'; |
159 | 159 | $result = $this->db->sql_query($sql, 600); |
160 | 160 | |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | } |
185 | 185 | |
186 | 186 | $selected = (($row['cat_id'] == $select_id) ? ' selected="selected"' : ''); |
187 | - $cat_list .= '<option value="' . $row['cat_id'] . '"' . (($disabled) ? ' disabled="disabled" class="disabled-option"' : $selected) . '>' . $padding . $row['cat_name'] . '</option>'; |
|
187 | + $cat_list .= '<option value="'.$row['cat_id'].'"'.(($disabled) ? ' disabled="disabled" class="disabled-option"' : $selected).'>'.$padding.$row['cat_name'].'</option>'; |
|
188 | 188 | } |
189 | 189 | $this->db->sql_freeresult($result); |
190 | 190 | unset($padding_store); |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | */ |
200 | 200 | public function display() |
201 | 201 | { |
202 | - $cat_rows = $subcats = array(); |
|
202 | + $cat_rows = $subcats = array(); |
|
203 | 203 | $parent_id = $visible_cats = 0; |
204 | 204 | |
205 | 205 | $sql_array = array( |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | else |
218 | 218 | { |
219 | 219 | $root_data = $this->data; |
220 | - $sql_where = 'left_id > ' . $root_data['left_id'] . ' AND left_id < ' . $root_data['right_id']; |
|
220 | + $sql_where = 'left_id > '.$root_data['left_id'].' AND left_id < '.$root_data['right_id']; |
|
221 | 221 | } |
222 | 222 | |
223 | 223 | $sql = $this->db->sql_build_query('SELECT', array( |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | { |
265 | 265 | foreach ($subcats[$dir_cat_id] as $subcat_id => $subcat_row) |
266 | 266 | { |
267 | - $row['cat_links'] = ($row['cat_count_all']) ? ($row['cat_links']+$subcat_row['links']) : $row['cat_links']; |
|
267 | + $row['cat_links'] = ($row['cat_count_all']) ? ($row['cat_links'] + $subcat_row['links']) : $row['cat_links']; |
|
268 | 268 | |
269 | 269 | if ($subcat_row['display'] && $subcat_row['parent_id'] == $dir_cat_id) |
270 | 270 | { |
@@ -319,7 +319,7 @@ discard block |
||
319 | 319 | if ($task->is_ready()) |
320 | 320 | { |
321 | 321 | $url = $task->get_url(); |
322 | - $this->template->assign_var('RUN_CRON_TASK', '<img src="' . $url . '" width="1" height="1" alt="" />'); |
|
322 | + $this->template->assign_var('RUN_CRON_TASK', '<img src="'.$url.'" width="1" height="1" alt="" />'); |
|
323 | 323 | } |
324 | 324 | } |
325 | 325 | } |
@@ -341,10 +341,10 @@ discard block |
||
341 | 341 | 'LEFT_JOIN' => array( |
342 | 342 | array( |
343 | 343 | 'FROM' => array(DIR_WATCH_TABLE => 'w'), |
344 | - 'ON' => 'c.cat_id = w.cat_id AND w.user_id = ' . (int) $this->user->data['user_id'] |
|
344 | + 'ON' => 'c.cat_id = w.cat_id AND w.user_id = '.(int) $this->user->data['user_id'] |
|
345 | 345 | ), |
346 | 346 | ), |
347 | - 'WHERE' => 'c.cat_id = ' . (int) $cat_id |
|
347 | + 'WHERE' => 'c.cat_id = '.(int) $cat_id |
|
348 | 348 | ); |
349 | 349 | $sql = $this->db->sql_build_query('SELECT', $sql_array); |
350 | 350 | $result = $this->db->sql_query($sql); |
@@ -381,7 +381,7 @@ discard block |
||
381 | 381 | $this->template->assign_block_vars('dir_navlinks', array( |
382 | 382 | 'FORUM_NAME' => $parent_data['cat_name'], |
383 | 383 | 'FORUM_ID' => $parent_cat_id, |
384 | - 'MICRODATA' => $microdata_attr . '="' . $parent_cat_id . '"', |
|
384 | + 'MICRODATA' => $microdata_attr.'="'.$parent_cat_id.'"', |
|
385 | 385 | 'U_VIEW_FORUM' => $this->helper->route('ernadoo_phpbbdirectory_page_controller', array('cat_id' => (int) $parent_cat_id)), |
386 | 386 | )); |
387 | 387 | } |
@@ -390,7 +390,7 @@ discard block |
||
390 | 390 | $this->template->assign_block_vars('dir_navlinks', array( |
391 | 391 | 'FORUM_NAME' => $dir_cat_data['cat_name'], |
392 | 392 | 'FORUM_ID' => $dir_cat_data['cat_id'], |
393 | - 'MICRODATA' => $microdata_attr . '="' . $dir_cat_data['cat_id'] . '"', |
|
393 | + 'MICRODATA' => $microdata_attr.'="'.$dir_cat_data['cat_id'].'"', |
|
394 | 394 | 'U_VIEW_FORUM' => $this->helper->route('ernadoo_phpbbdirectory_page_controller', array('cat_id' => (int) $dir_cat_data['cat_id'])), |
395 | 395 | )); |
396 | 396 | |
@@ -447,7 +447,7 @@ discard block |
||
447 | 447 | { |
448 | 448 | if ($mode == 'unwatch') |
449 | 449 | { |
450 | - $sql = 'DELETE FROM ' . DIR_WATCH_TABLE . " |
|
450 | + $sql = 'DELETE FROM '.DIR_WATCH_TABLE." |
|
451 | 451 | WHERE cat_id = $cat_id |
452 | 452 | AND user_id = $user_id"; |
453 | 453 | $this->db->sql_query($sql); |
@@ -457,7 +457,7 @@ discard block |
||
457 | 457 | |
458 | 458 | if (!$this->request->is_ajax()) |
459 | 459 | { |
460 | - $message .= '<br /><br />' . $this->language->lang('DIR_CLICK_RETURN_CAT', '<a href="' . $redirect_url . '">', '</a>'); |
|
460 | + $message .= '<br /><br />'.$this->language->lang('DIR_CLICK_RETURN_CAT', '<a href="'.$redirect_url.'">', '</a>'); |
|
461 | 461 | } |
462 | 462 | |
463 | 463 | meta_refresh(3, $redirect_url); |
@@ -469,8 +469,8 @@ discard block |
||
469 | 469 | |
470 | 470 | if ($notify_status != NOTIFY_YES) |
471 | 471 | { |
472 | - $sql = 'UPDATE ' . DIR_WATCH_TABLE . ' |
|
473 | - SET notify_status = ' . NOTIFY_YES . " |
|
472 | + $sql = 'UPDATE '.DIR_WATCH_TABLE.' |
|
473 | + SET notify_status = ' . NOTIFY_YES." |
|
474 | 474 | WHERE cat_id = $cat_id |
475 | 475 | AND user_id = $user_id"; |
476 | 476 | $this->db->sql_query($sql); |
@@ -481,8 +481,8 @@ discard block |
||
481 | 481 | { |
482 | 482 | if ($mode == 'watch') |
483 | 483 | { |
484 | - $sql = 'INSERT INTO ' . DIR_WATCH_TABLE . " (user_id, cat_id, notify_status) |
|
485 | - VALUES ($user_id, $cat_id, " . NOTIFY_YES . ')'; |
|
484 | + $sql = 'INSERT INTO '.DIR_WATCH_TABLE." (user_id, cat_id, notify_status) |
|
485 | + VALUES ($user_id, $cat_id, ".NOTIFY_YES.')'; |
|
486 | 486 | $this->db->sql_query($sql); |
487 | 487 | |
488 | 488 | $redirect_url = $this->helper->route('ernadoo_phpbbdirectory_page_controller', array('cat_id' => (int) $cat_id)); |
@@ -490,7 +490,7 @@ discard block |
||
490 | 490 | |
491 | 491 | if (!$this->request->is_ajax()) |
492 | 492 | { |
493 | - $message .= '<br /><br />' . $this->language->lang('DIR_CLICK_RETURN_CAT', '<a href="' . $redirect_url . '">', '</a>'); |
|
493 | + $message .= '<br /><br />'.$this->language->lang('DIR_CLICK_RETURN_CAT', '<a href="'.$redirect_url.'">', '</a>'); |
|
494 | 494 | } |
495 | 495 | |
496 | 496 | meta_refresh(3, $redirect_url); |
@@ -510,10 +510,10 @@ discard block |
||
510 | 510 | |
511 | 511 | if ($can_watch) |
512 | 512 | { |
513 | - $s_watching['link'] = $this->helper->route('ernadoo_phpbbdirectory_suscribe_controller', array('cat_id' => $cat_id, 'mode' => (($is_watching) ? 'unwatch' : 'watch'))); |
|
513 | + $s_watching['link'] = $this->helper->route('ernadoo_phpbbdirectory_suscribe_controller', array('cat_id' => $cat_id, 'mode' => (($is_watching) ? 'unwatch' : 'watch'))); |
|
514 | 514 | $s_watching['link_toggle'] = $this->helper->route('ernadoo_phpbbdirectory_suscribe_controller', array('cat_id' => $cat_id, 'mode' => ((!$is_watching) ? 'unwatch' : 'watch'))); |
515 | - $s_watching['title'] = $this->language->lang((($is_watching) ? 'DIR_STOP' : 'DIR_START') . '_WATCHING_CAT'); |
|
516 | - $s_watching['title_toggle'] = $this->language->lang(((!$is_watching) ? 'DIR_STOP' : 'DIR_START') . '_WATCHING_CAT'); |
|
515 | + $s_watching['title'] = $this->language->lang((($is_watching) ? 'DIR_STOP' : 'DIR_START').'_WATCHING_CAT'); |
|
516 | + $s_watching['title_toggle'] = $this->language->lang(((!$is_watching) ? 'DIR_STOP' : 'DIR_START').'_WATCHING_CAT'); |
|
517 | 517 | $s_watching['is_watching'] = $is_watching; |
518 | 518 | } |
519 | 519 | |
@@ -531,7 +531,7 @@ discard block |
||
531 | 531 | global $db; |
532 | 532 | |
533 | 533 | $sql = 'SELECT cat_name |
534 | - FROM ' . DIR_CAT_TABLE . ' |
|
534 | + FROM ' . DIR_CAT_TABLE.' |
|
535 | 535 | WHERE cat_id = ' . (int) $cat_id; |
536 | 536 | $result = $db->sql_query($sql); |
537 | 537 | $row = $db->sql_fetchrow($result); |
@@ -13,8 +13,8 @@ |
||
13 | 13 | class comment_text extends \phpbb\textreparser\row_based_plugin |
14 | 14 | { |
15 | 15 | /** |
16 | - * {@inheritdoc} |
|
17 | - */ |
|
16 | + * {@inheritdoc} |
|
17 | + */ |
|
18 | 18 | public function get_columns() |
19 | 19 | { |
20 | 20 | return array( |