Completed
Push — master ( 4c9094...d7a03e )
by Erwan
02:56
created
qte.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -680,7 +680,7 @@  discard block
 block discarded – undo
680 680
 	* Generate list of groups
681 681
 	*
682 682
 	* @param int	$group_ids		The default groups id to mark as selected
683
-	* @param array	$exclude_ids	The group ids to exclude from the list, false (default) if you whish to exclude no id
683
+	* @param boolean	$exclude_ids	The group ids to exclude from the list, false (default) if you whish to exclude no id
684 684
 	* @param bool	$manage_founder If set to false (default) all groups are returned, if 0 only those groups returned not being managed by founders only, if 1 only those groups returned managed by founders only.
685 685
 	*
686 686
 	* @return string The list of options.
@@ -776,7 +776,7 @@  discard block
 block discarded – undo
776 776
 	*
777 777
 	* @param	array	$user_groups	User's groups
778 778
 	* @param	array	$hide_attr		Groups which can't delete attribute in a forum
779
-	* @return	bool
779
+	* @return	boolean|null
780 780
 	*/
781 781
 	private function _check_auth_remove_attr(&$user_groups, $hide_attr)
782 782
 	{
Please login to merge, or discard this patch.
Indentation   +131 added lines, -131 removed lines patch added patch discarded remove patch
@@ -54,19 +54,19 @@  discard block
 block discarded – undo
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\config\config					$config				Config object
62
-	* @param \phpbb\db\driver\driver_interface 		$db					Database object
63
-	* @param \phpbb\template\template				$template			Template object
64
-	* @param \phpbb\user							$user				User object
65
-	* @param \phpbb\log\log							$log				Log 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\config\config					$config				Config object
62
+	 * @param \phpbb\db\driver\driver_interface 		$db					Database object
63
+	 * @param \phpbb\template\template				$template			Template object
64
+	 * @param \phpbb\user							$user				User object
65
+	 * @param \phpbb\log\log							$log				Log 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\config\config $config, \phpbb\db\driver\driver_interface $db, \phpbb\template\template $template, \phpbb\user $user, \phpbb\log\log $log, $root_path, $php_ext, $table_prefix)
71 71
 	{
72 72
 		$this->request		= $request;
@@ -85,12 +85,12 @@  discard block
 block discarded – undo
85 85
 	}
86 86
 
87 87
 	/**
88
-	* Get topic attributes username
89
-	*
90
-	* @param	array	$topic_list	Topic ids
91
-	*
92
-	* @return	null
93
-	*/
88
+	 * Get topic attributes username
89
+	 *
90
+	 * @param	array	$topic_list	Topic ids
91
+	 *
92
+	 * @return	null
93
+	 */
94 94
 	public function get_users_by_topic_id($topic_list)
95 95
 	{
96 96
 		if (!empty($topic_list))
@@ -115,24 +115,24 @@  discard block
 block discarded – undo
115 115
 	}
116 116
 
117 117
 	/**
118
-	* Get attribute name
119
-	*
120
-	* @param	int		$attr_id	The attribute id
121
-	*
122
-	* @return	string
123
-	*/
118
+	 * Get attribute name
119
+	 *
120
+	 * @param	int		$attr_id	The attribute id
121
+	 *
122
+	 * @return	string
123
+	 */
124 124
 	public function get_attr_name_by_id($attr_id)
125 125
 	{
126 126
 		return $this->_attr[$attr_id]['attr_name'];
127 127
 	}
128 128
 
129 129
 	/**
130
-	* Get attribute author
131
-	*
132
-	* @param	int		$user_id	User id
133
-	*
134
-	* @return	string
135
-	*/
130
+	 * Get attribute author
131
+	 *
132
+	 * @param	int		$user_id	User id
133
+	 *
134
+	 * @return	string
135
+	 */
136 136
 	public function get_users_by_user_id($user_id)
137 137
 	{
138 138
 		$sql = 'SELECT user_id, username, user_colour
@@ -153,16 +153,16 @@  discard block
 block discarded – undo
153 153
 	}
154 154
 
155 155
 	/**
156
-	* Generate a list of attributes based on permissions
157
-	*
158
-	* @param	int		$forum_id		Forum id
159
-	* @param	int		$author_id		Topic author id
160
-	* @param	int		$attribute_id	Current attribute id
161
-	* @param	array	$hide_attr		Groups which can't delete attribute in this forum
162
-	* @param	string	$viewtopic_url	Topic's url
163
-	*
164
-	* @return	null
165
-	*/
156
+	 * Generate a list of attributes based on permissions
157
+	 *
158
+	 * @param	int		$forum_id		Forum id
159
+	 * @param	int		$author_id		Topic author id
160
+	 * @param	int		$attribute_id	Current attribute id
161
+	 * @param	array	$hide_attr		Groups which can't delete attribute in this forum
162
+	 * @param	string	$viewtopic_url	Topic's url
163
+	 *
164
+	 * @return	null
165
+	 */
166 166
 	public function attr_select($forum_id = 0, $author_id = 0, $attribute_id = 0, $hide_attr = array(), $viewtopic_url = '')
167 167
 	{
168 168
 		// load language
@@ -233,10 +233,10 @@  discard block
 block discarded – undo
233 233
 	}
234 234
 
235 235
 	/**
236
-	* Generate a list of all attributes for search page
237
-	*
238
-	* @return	null
239
-	*/
236
+	 * Generate a list of all attributes for search page
237
+	 *
238
+	 * @return	null
239
+	 */
240 240
 	public function attr_search()
241 241
 	{
242 242
 		// load language
@@ -286,13 +286,13 @@  discard block
 block discarded – undo
286 286
 	}
287 287
 
288 288
 	/**
289
-	* Generate a list of attributes for viewforum page
290
-	*
291
-	* @param	int		$forum_id		Forum id
292
-	* @param	int		$attribute_id	Current attribute id
293
-	*
294
-	* @return	null
295
-	*/
289
+	 * Generate a list of attributes for viewforum page
290
+	 *
291
+	 * @param	int		$forum_id		Forum id
292
+	 * @param	int		$attribute_id	Current attribute id
293
+	 *
294
+	 * @return	null
295
+	 */
296 296
 	public function attr_sort($forum_id = 0, $attribute_id = 0)
297 297
 	{
298 298
 		// load language
@@ -349,13 +349,13 @@  discard block
 block discarded – undo
349 349
 	}
350 350
 
351 351
 	/**
352
-	* Generate a default attribute list for a forum
353
-	*
354
-	* @param	int		$forum_id		Forum id
355
-	* @param	int		$attribute_id	Current attribute id
356
-	*
357
-	* @return	null
358
-	*/
352
+	 * Generate a default attribute list for a forum
353
+	 *
354
+	 * @param	int		$forum_id		Forum id
355
+	 * @param	int		$attribute_id	Current attribute id
356
+	 *
357
+	 * @return	null
358
+	 */
359 359
 	public function attr_default($forum_id = 0, $attribute_id = 0)
360 360
 	{
361 361
 		// load language
@@ -412,14 +412,14 @@  discard block
 block discarded – undo
412 412
 	}
413 413
 
414 414
 	/**
415
-	* Generate attribute for topic title
416
-	*
417
-	* @param	int		$attribute_id	Current attribute id
418
-	* @param	int		$user_id		Current attribute user id
419
-	* @param	int		$timestamp		Attribute timestamp
420
-	*
421
-	* @return	string					Attribute html code
422
-	*/
415
+	 * Generate attribute for topic title
416
+	 *
417
+	 * @param	int		$attribute_id	Current attribute id
418
+	 * @param	int		$user_id		Current attribute user id
419
+	 * @param	int		$timestamp		Attribute timestamp
420
+	 *
421
+	 * @return	string					Attribute html code
422
+	 */
423 423
 	public function attr_display($attribute_id = 0, $user_id = 0, $timestamp = 0)
424 424
 	{
425 425
 		if (empty($attribute_id) || empty($user_id) || empty($timestamp))
@@ -449,14 +449,14 @@  discard block
 block discarded – undo
449 449
 	}
450 450
 
451 451
 	/**
452
-	* Generate attribute for page title
453
-	*
454
-	* @param	int		$attribute_id	Current attribute id
455
-	* @param	int		$user_id		Current attribute user id
456
-	* @param	int		$timestamp		Attribute timestamp
457
-	*
458
-	* @return	string					attribute html code
459
-	*/
452
+	 * Generate attribute for page title
453
+	 *
454
+	 * @param	int		$attribute_id	Current attribute id
455
+	 * @param	int		$user_id		Current attribute user id
456
+	 * @param	int		$timestamp		Attribute timestamp
457
+	 *
458
+	 * @return	string					attribute html code
459
+	 */
460 460
 	public function attr_title($attribute_id = 0, $user_id = 0, $timestamp = 0)
461 461
 	{
462 462
 		if (empty($attribute_id) || empty($user_id) || empty($timestamp))
@@ -485,16 +485,16 @@  discard block
 block discarded – undo
485 485
 
486 486
 
487 487
 	/**
488
-	* Change topic attribute
489
-	*
490
-	* @param	int		$attribute_id		New attribute id
491
-	* @param	int		$topic_id			The id of the topic
492
-	* @param	int		$forum_id			The id of the forum
493
-	* @param	int		$topic_attribute	Current attribute id
494
-	* @param	array	$hide_attr			Groups which can't delete attribute in this forum
495
-	*
496
-	* @return	null
497
-	*/
488
+	 * Change topic attribute
489
+	 *
490
+	 * @param	int		$attribute_id		New attribute id
491
+	 * @param	int		$topic_id			The id of the topic
492
+	 * @param	int		$forum_id			The id of the forum
493
+	 * @param	int		$topic_attribute	Current attribute id
494
+	 * @param	array	$hide_attr			Groups which can't delete attribute in this forum
495
+	 *
496
+	 * @return	null
497
+	 */
498 498
 	public function attr_apply($attribute_id = 0, $topic_id = 0, $forum_id = 0, $topic_attribute = 0, $hide_attr = array())
499 499
 	{
500 500
 		if (empty($topic_id) || empty($forum_id) || empty($attribute_id))
@@ -573,13 +573,13 @@  discard block
 block discarded – undo
573 573
 	}
574 574
 
575 575
 	/**
576
-	* Change topic attribute in mcp
577
-	*
578
-	* @param	int		$attribute_id		New attribute id
579
-	* @param	array	$topic_ids			Topics ids
580
-	*
581
-	* @return	null
582
-	*/
576
+	 * Change topic attribute in mcp
577
+	 *
578
+	 * @param	int		$attribute_id		New attribute id
579
+	 * @param	array	$topic_ids			Topics ids
580
+	 *
581
+	 * @return	null
582
+	 */
583 583
 	public function mcp_attr_apply($attribute_id = 0, $topic_ids = array())
584 584
 	{
585 585
 		// load language
@@ -667,24 +667,24 @@  discard block
 block discarded – undo
667 667
 	}
668 668
 
669 669
 	/**
670
-	* Getter...
671
-	*
672
-	* @return	array
673
-	*/
670
+	 * Getter...
671
+	 *
672
+	 * @return	array
673
+	 */
674 674
 	public function getAttr()
675 675
 	{
676 676
 		return $this->_attr;
677 677
 	}
678 678
 
679 679
 	/**
680
-	* Generate list of groups
681
-	*
682
-	* @param int	$group_ids		The default groups id to mark as selected
683
-	* @param array	$exclude_ids	The group ids to exclude from the list, false (default) if you whish to exclude no id
684
-	* @param bool	$manage_founder If set to false (default) all groups are returned, if 0 only those groups returned not being managed by founders only, if 1 only those groups returned managed by founders only.
685
-	*
686
-	* @return string The list of options.
687
-	*/
680
+	 * Generate list of groups
681
+	 *
682
+	 * @param int	$group_ids		The default groups id to mark as selected
683
+	 * @param array	$exclude_ids	The group ids to exclude from the list, false (default) if you whish to exclude no id
684
+	 * @param bool	$manage_founder If set to false (default) all groups are returned, if 0 only those groups returned not being managed by founders only, if 1 only those groups returned managed by founders only.
685
+	 *
686
+	 * @return string The list of options.
687
+	 */
688 688
 	public function qte_group_select($group_ids, $exclude_ids = array(), $manage_founder = false)
689 689
 	{
690 690
 		$exclude_sql = ($exclude_ids !== false && sizeof($exclude_ids)) ? 'WHERE ' . $this->db->sql_in_set('group_id', array_map('intval', $exclude_ids), true) : '';
@@ -711,9 +711,9 @@  discard block
 block discarded – undo
711 711
 	}
712 712
 
713 713
 	/**
714
-	* borrowed from "Categories Hierarchy" : used to check if a language key exists
715
-	* @todo delete
716
-	*/
714
+	 * borrowed from "Categories Hierarchy" : used to check if a language key exists
715
+	 * @todo delete
716
+	 */
717 717
 	public function attr_lng_key($key)
718 718
 	{
719 719
 		// load language
@@ -729,12 +729,12 @@  discard block
 block discarded – undo
729 729
 	}
730 730
 
731 731
 	/**
732
-	* Build class and style attribute
733
-	*
734
-	* @param	string	$a_name			Attribute name
735
-	* @param	string	$a_colour		Attribute color
736
-	* @return	string					html code
737
-	*/
732
+	 * Build class and style attribute
733
+	 *
734
+	 * @param	string	$a_name			Attribute name
735
+	 * @param	string	$a_colour		Attribute color
736
+	 * @return	string					html code
737
+	 */
738 738
 	public function attr_colour($a_name, $a_colour)
739 739
 	{
740 740
 		$a_name = preg_replace("#[^a-z0-9 _-]#", '', strtolower($a_name));
@@ -747,14 +747,14 @@  discard block
 block discarded – undo
747 747
 	}
748 748
 
749 749
 	/**
750
-	* Check if user can apply an attribute
751
-	*
752
-	* @param	array	$attr_auth		Forum auth
753
-	* @param	int		$forum_id		Forum id
754
-	* @param	array	$user_groups	User's groups
755
-	* @param	int		$author_id		Topic author id
756
-	* @return	bool
757
-	*/
750
+	 * Check if user can apply an attribute
751
+	 *
752
+	 * @param	array	$attr_auth		Forum auth
753
+	 * @param	int		$forum_id		Forum id
754
+	 * @param	array	$user_groups	User's groups
755
+	 * @param	int		$author_id		Topic author id
756
+	 * @return	bool
757
+	 */
758 758
 	private function _check_auth_attribute($attr_auth, $forum_id, $user_groups, $author_id)
759 759
 	{
760 760
 		$forum_ids = $attr_auth['forums_ids'];
@@ -772,12 +772,12 @@  discard block
 block discarded – undo
772 772
 	}
773 773
 
774 774
 	/**
775
-	* Check if user can delete an attribute
776
-	*
777
-	* @param	array	$user_groups	User's groups
778
-	* @param	array	$hide_attr		Groups which can't delete attribute in a forum
779
-	* @return	bool
780
-	*/
775
+	 * Check if user can delete an attribute
776
+	 *
777
+	 * @param	array	$user_groups	User's groups
778
+	 * @param	array	$hide_attr		Groups which can't delete attribute in a forum
779
+	 * @return	bool
780
+	 */
781 781
 	private function _check_auth_remove_attr(&$user_groups, $hide_attr)
782 782
 	{
783 783
 		// include that file !
@@ -806,10 +806,10 @@  discard block
 block discarded – undo
806 806
 	}
807 807
 
808 808
 	/**
809
-	* Get attributes from database
810
-	*
811
-	* @return	null
812
-	*/
809
+	 * Get attributes from database
810
+	 *
811
+	 * @return	null
812
+	 */
813 813
 	private function _get_attributes()
814 814
 	{
815 815
 		if (($this->_attr = $this->cache->get('_attr')) === false)
Please login to merge, or discard this patch.