@@ -180,14 +180,14 @@ |
||
180 | 180 | } |
181 | 181 | |
182 | 182 | /** |
183 | - * Copies attributes permissions from one forum to others |
|
184 | - * |
|
185 | - * @param int $src_forum_id The source forum we want to copy permissions from |
|
186 | - * @param array $dest_forum_ids The destination forum(s) we want to copy to |
|
187 | - * @param bool $clear_dest_perms True if destination permissions should be deleted |
|
188 | - * |
|
189 | - * @return bool False on error |
|
190 | - */ |
|
183 | + * Copies attributes permissions from one forum to others |
|
184 | + * |
|
185 | + * @param int $src_forum_id The source forum we want to copy permissions from |
|
186 | + * @param array $dest_forum_ids The destination forum(s) we want to copy to |
|
187 | + * @param bool $clear_dest_perms True if destination permissions should be deleted |
|
188 | + * |
|
189 | + * @return bool False on error |
|
190 | + */ |
|
191 | 191 | private function _copy_attribute_permissions($src_forum_id, $dest_forum_ids, $clear_dest_perms) |
192 | 192 | { |
193 | 193 | // Only one forum id specified |
@@ -23,11 +23,11 @@ |
||
23 | 23 | protected $qte; |
24 | 24 | |
25 | 25 | /** |
26 | - * Constructor |
|
27 | - * |
|
28 | - * @param \phpbb\request\request $request Request object |
|
29 | - * @param \ernadoo\qte\qte $qte QTE object |
|
30 | - */ |
|
26 | + * Constructor |
|
27 | + * |
|
28 | + * @param \phpbb\request\request $request Request object |
|
29 | + * @param \ernadoo\qte\qte $qte QTE object |
|
30 | + */ |
|
31 | 31 | public function __construct(\phpbb\request\request $request, \ernadoo\qte\qte $qte) |
32 | 32 | { |
33 | 33 | $this->request = $request; |
@@ -525,15 +525,15 @@ |
||
525 | 525 | } |
526 | 526 | |
527 | 527 | /** |
528 | - * Permission Copy |
|
529 | - * |
|
530 | - * Copy a permission (auth) option |
|
531 | - * |
|
532 | - * @param string $auth_option The name of the permission (auth) option |
|
533 | - * @param int $copy_from If set, contains the id of the permission from which to copy the new one. |
|
534 | - * @param bool $clear_dest_perms True if destination permissions should be deleted |
|
535 | - * @return null |
|
536 | - */ |
|
528 | + * Permission Copy |
|
529 | + * |
|
530 | + * Copy a permission (auth) option |
|
531 | + * |
|
532 | + * @param string $auth_option The name of the permission (auth) option |
|
533 | + * @param int $copy_from If set, contains the id of the permission from which to copy the new one. |
|
534 | + * @param bool $clear_dest_perms True if destination permissions should be deleted |
|
535 | + * @return null |
|
536 | + */ |
|
537 | 537 | private function _copy_permission($auth_option, $copy_from, $clear_dest_perms = true) |
538 | 538 | { |
539 | 539 | global $db, $phpbb_root_path, $phpEx; |
@@ -54,19 +54,19 @@ discard block |
||
54 | 54 | private $_name = array(); |
55 | 55 | |
56 | 56 | /** |
57 | - * Constructor |
|
58 | - * |
|
59 | - * @param \phpbb\request\request $request Request object |
|
60 | - * @param \phpbb\cache\driver\driver_interface $cache Cache object |
|
61 | - * @param \phpbb\db\driver\driver_interface $db Database object |
|
62 | - * @param \phpbb\template\template $template Template object |
|
63 | - * @param \phpbb\user $user User object |
|
64 | - * @param \phpbb\log\log $log Log object |
|
65 | - * @param \phpbb\auth\auth $auth Auth object |
|
66 | - * @param string $root_path phpBB root path |
|
67 | - * @param string $php_ext phpEx |
|
68 | - * @param string $table_prefix Prefix tables |
|
69 | - */ |
|
57 | + * Constructor |
|
58 | + * |
|
59 | + * @param \phpbb\request\request $request Request object |
|
60 | + * @param \phpbb\cache\driver\driver_interface $cache Cache object |
|
61 | + * @param \phpbb\db\driver\driver_interface $db Database object |
|
62 | + * @param \phpbb\template\template $template Template object |
|
63 | + * @param \phpbb\user $user User object |
|
64 | + * @param \phpbb\log\log $log Log object |
|
65 | + * @param \phpbb\auth\auth $auth Auth object |
|
66 | + * @param string $root_path phpBB root path |
|
67 | + * @param string $php_ext phpEx |
|
68 | + * @param string $table_prefix Prefix tables |
|
69 | + */ |
|
70 | 70 | public function __construct(\phpbb\request\request $request, \phpbb\cache\driver\driver_interface $cache, \phpbb\db\driver\driver_interface $db, \phpbb\template\template $template, \phpbb\user $user, \phpbb\log\log $log, \phpbb\auth\auth $auth, $root_path, $php_ext, $table_prefix) |
71 | 71 | { |
72 | 72 | $this->request = $request; |
@@ -86,12 +86,12 @@ discard block |
||
86 | 86 | } |
87 | 87 | |
88 | 88 | /** |
89 | - * Get topic attributes username |
|
90 | - * |
|
91 | - * @param array $topic_list Topic ids |
|
92 | - * |
|
93 | - * @return null |
|
94 | - */ |
|
89 | + * Get topic attributes username |
|
90 | + * |
|
91 | + * @param array $topic_list Topic ids |
|
92 | + * |
|
93 | + * @return null |
|
94 | + */ |
|
95 | 95 | public function get_users_by_topic_id($topic_list) |
96 | 96 | { |
97 | 97 | if (!empty($topic_list)) |
@@ -116,24 +116,24 @@ discard block |
||
116 | 116 | } |
117 | 117 | |
118 | 118 | /** |
119 | - * Get attribute name |
|
120 | - * |
|
121 | - * @param int $attr_id The attribute id |
|
122 | - * |
|
123 | - * @return string |
|
124 | - */ |
|
119 | + * Get attribute name |
|
120 | + * |
|
121 | + * @param int $attr_id The attribute id |
|
122 | + * |
|
123 | + * @return string |
|
124 | + */ |
|
125 | 125 | public function get_attr_name_by_id($attr_id) |
126 | 126 | { |
127 | 127 | return $this->_attr[$attr_id]['attr_name']; |
128 | 128 | } |
129 | 129 | |
130 | 130 | /** |
131 | - * Get attribute author |
|
132 | - * |
|
133 | - * @param int $user_id User id |
|
134 | - * |
|
135 | - * @return string |
|
136 | - */ |
|
131 | + * Get attribute author |
|
132 | + * |
|
133 | + * @param int $user_id User id |
|
134 | + * |
|
135 | + * @return string |
|
136 | + */ |
|
137 | 137 | public function get_users_by_user_id($user_id) |
138 | 138 | { |
139 | 139 | if (!isset($this->_name[$user_id])) |
@@ -156,16 +156,16 @@ discard block |
||
156 | 156 | } |
157 | 157 | |
158 | 158 | /** |
159 | - * Generate a list of attributes based on permissions |
|
160 | - * |
|
161 | - * @param int $forum_id Forum id |
|
162 | - * @param int $author_id Topic author id |
|
163 | - * @param int $attribute_id Current attribute id |
|
164 | - * @param string $viewtopic_url Topic's url |
|
165 | - * @param string $mode Post mode |
|
166 | - * |
|
167 | - * @return null |
|
168 | - */ |
|
159 | + * Generate a list of attributes based on permissions |
|
160 | + * |
|
161 | + * @param int $forum_id Forum id |
|
162 | + * @param int $author_id Topic author id |
|
163 | + * @param int $attribute_id Current attribute id |
|
164 | + * @param string $viewtopic_url Topic's url |
|
165 | + * @param string $mode Post mode |
|
166 | + * |
|
167 | + * @return null |
|
168 | + */ |
|
169 | 169 | public function attr_select($forum_id, $author_id = 0, $attribute_id = 0, $viewtopic_url = '', $mode = '') |
170 | 170 | { |
171 | 171 | $show_select = false; |
@@ -215,10 +215,10 @@ discard block |
||
215 | 215 | } |
216 | 216 | |
217 | 217 | /** |
218 | - * Generate a list of all attributes for search page |
|
219 | - * |
|
220 | - * @return null |
|
221 | - */ |
|
218 | + * Generate a list of all attributes for search page |
|
219 | + * |
|
220 | + * @return null |
|
221 | + */ |
|
222 | 222 | public function attr_search() |
223 | 223 | { |
224 | 224 | foreach ($this->_attr as $attr) |
@@ -238,13 +238,13 @@ discard block |
||
238 | 238 | } |
239 | 239 | |
240 | 240 | /** |
241 | - * Generate a list of attributes for viewforum page |
|
242 | - * |
|
243 | - * @param int $forum_id Forum id |
|
244 | - * @param int $attribute_id Current attribute id |
|
245 | - * |
|
246 | - * @return null |
|
247 | - */ |
|
241 | + * Generate a list of attributes for viewforum page |
|
242 | + * |
|
243 | + * @param int $forum_id Forum id |
|
244 | + * @param int $attribute_id Current attribute id |
|
245 | + * |
|
246 | + * @return null |
|
247 | + */ |
|
248 | 248 | public function attr_sort($forum_id = 0, $attribute_id = 0) |
249 | 249 | { |
250 | 250 | foreach ($this->_attr as $attr) |
@@ -271,13 +271,13 @@ discard block |
||
271 | 271 | } |
272 | 272 | |
273 | 273 | /** |
274 | - * Generate a default attribute list for a forum |
|
275 | - * |
|
276 | - * @param int $forum_id Forum id |
|
277 | - * @param int $attribute_id Current attribute id |
|
278 | - * |
|
279 | - * @return null |
|
280 | - */ |
|
274 | + * Generate a default attribute list for a forum |
|
275 | + * |
|
276 | + * @param int $forum_id Forum id |
|
277 | + * @param int $attribute_id Current attribute id |
|
278 | + * |
|
279 | + * @return null |
|
280 | + */ |
|
281 | 281 | public function attr_default($forum_id = 0, $attribute_id = 0) |
282 | 282 | { |
283 | 283 | foreach ($this->_attr as $attr) |
@@ -304,14 +304,14 @@ discard block |
||
304 | 304 | } |
305 | 305 | |
306 | 306 | /** |
307 | - * Generate attribute for topic title |
|
308 | - * |
|
309 | - * @param int $attribute_id Current attribute id |
|
310 | - * @param int $user_id Current attribute user id |
|
311 | - * @param int $timestamp Attribute timestamp |
|
312 | - * |
|
313 | - * @return string Attribute html code |
|
314 | - */ |
|
307 | + * Generate attribute for topic title |
|
308 | + * |
|
309 | + * @param int $attribute_id Current attribute id |
|
310 | + * @param int $user_id Current attribute user id |
|
311 | + * @param int $timestamp Attribute timestamp |
|
312 | + * |
|
313 | + * @return string Attribute html code |
|
314 | + */ |
|
315 | 315 | public function attr_display($attribute_id = 0, $user_id = 0, $timestamp = 0) |
316 | 316 | { |
317 | 317 | if (empty($attribute_id) || empty($user_id) || empty($timestamp)) |
@@ -341,14 +341,14 @@ discard block |
||
341 | 341 | } |
342 | 342 | |
343 | 343 | /** |
344 | - * Generate attribute for page title |
|
345 | - * |
|
346 | - * @param int $attribute_id Current attribute id |
|
347 | - * @param int $user_id Current attribute user id |
|
348 | - * @param int $timestamp Attribute timestamp |
|
349 | - * |
|
350 | - * @return string attribute html code |
|
351 | - */ |
|
344 | + * Generate attribute for page title |
|
345 | + * |
|
346 | + * @param int $attribute_id Current attribute id |
|
347 | + * @param int $user_id Current attribute user id |
|
348 | + * @param int $timestamp Attribute timestamp |
|
349 | + * |
|
350 | + * @return string attribute html code |
|
351 | + */ |
|
352 | 352 | public function attr_title($attribute_id = 0, $user_id = 0, $timestamp = 0) |
353 | 353 | { |
354 | 354 | if (empty($attribute_id) || empty($user_id) || empty($timestamp)) |
@@ -375,17 +375,17 @@ discard block |
||
375 | 375 | |
376 | 376 | |
377 | 377 | /** |
378 | - * Change topic attribute |
|
379 | - * |
|
380 | - * @param int $attribute_id New attribute id |
|
381 | - * @param int $topic_id The id of the topic |
|
382 | - * @param int $forum_id The id of the forum |
|
383 | - * @param int $topic_attribute Current attribute id |
|
384 | - * @param int $author_id Topic author id |
|
385 | - * @param string $viewtopic_url URL to the topic page |
|
386 | - * |
|
387 | - * @return null |
|
388 | - */ |
|
378 | + * Change topic attribute |
|
379 | + * |
|
380 | + * @param int $attribute_id New attribute id |
|
381 | + * @param int $topic_id The id of the topic |
|
382 | + * @param int $forum_id The id of the forum |
|
383 | + * @param int $topic_attribute Current attribute id |
|
384 | + * @param int $author_id Topic author id |
|
385 | + * @param string $viewtopic_url URL to the topic page |
|
386 | + * |
|
387 | + * @return null |
|
388 | + */ |
|
389 | 389 | public function attr_apply($attribute_id = 0, $topic_id = 0, $forum_id = 0, $topic_attribute = 0, $author_id = 0, $viewtopic_url = '') |
390 | 390 | { |
391 | 391 | if (empty($topic_id) || empty($forum_id) || empty($attribute_id)) |
@@ -458,14 +458,14 @@ discard block |
||
458 | 458 | } |
459 | 459 | |
460 | 460 | /** |
461 | - * Change topic attribute in mcp |
|
462 | - * |
|
463 | - * @param int $attribute_id New attribute id |
|
464 | - * @param int $forum_id The id of the forum |
|
465 | - * @param array $topic_ids Topics ids |
|
466 | - * |
|
467 | - * @return null |
|
468 | - */ |
|
461 | + * Change topic attribute in mcp |
|
462 | + * |
|
463 | + * @param int $attribute_id New attribute id |
|
464 | + * @param int $forum_id The id of the forum |
|
465 | + * @param array $topic_ids Topics ids |
|
466 | + * |
|
467 | + * @return null |
|
468 | + */ |
|
469 | 469 | public function mcp_attr_apply($attribute_id = 0, $forum_id = 0, $topic_ids = array()) |
470 | 470 | { |
471 | 471 | $can_edit = $this->auth->acl_get('m_qte_attr_edit', $forum_id); |
@@ -551,10 +551,10 @@ discard block |
||
551 | 551 | } |
552 | 552 | |
553 | 553 | /** |
554 | - * Getter... |
|
555 | - * |
|
556 | - * @return array |
|
557 | - */ |
|
554 | + * Getter... |
|
555 | + * |
|
556 | + * @return array |
|
557 | + */ |
|
558 | 558 | public function getAttr() |
559 | 559 | { |
560 | 560 | return $this->_attr; |
@@ -567,12 +567,12 @@ discard block |
||
567 | 567 | } |
568 | 568 | |
569 | 569 | /** |
570 | - * Build class and style attribute |
|
571 | - * |
|
572 | - * @param string $a_name Attribute name |
|
573 | - * @param string $a_colour Attribute color |
|
574 | - * @return string html code |
|
575 | - */ |
|
570 | + * Build class and style attribute |
|
571 | + * |
|
572 | + * @param string $a_name Attribute name |
|
573 | + * @param string $a_colour Attribute color |
|
574 | + * @return string html code |
|
575 | + */ |
|
576 | 576 | public function attr_colour($a_name, $a_colour) |
577 | 577 | { |
578 | 578 | if ($a_name != $this->user->lang($a_name)) |
@@ -584,10 +584,10 @@ discard block |
||
584 | 584 | } |
585 | 585 | |
586 | 586 | /** |
587 | - * Get attributes from database |
|
588 | - * |
|
589 | - * @return null |
|
590 | - */ |
|
587 | + * Get attributes from database |
|
588 | + * |
|
589 | + * @return null |
|
590 | + */ |
|
591 | 591 | private function _get_attributes() |
592 | 592 | { |
593 | 593 | if (($this->_attr = $this->cache->get('_attr')) === false) |