Completed
Push — master ( 1d69ce...704f89 )
by Erwan
02:44
created
notification/type/directory_website.php 2 patches
Indentation   +57 added lines, -57 removed lines patch added patch discarded remove patch
@@ -18,21 +18,21 @@  discard block
 block discarded – undo
18 18
 class directory_website 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';
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_WEBSITE',
38 38
 		'group'	=> 'NOTIFICATION_DIR_UCP',
@@ -47,31 +47,31 @@  discard block
 block discarded – undo
47 47
 	}
48 48
 
49 49
 	/**
50
-	* Is available
51
-	*
52
-	* @return bool True/False whether or not this is available to the user
53
-	*/
50
+	 * Is available
51
+	 *
52
+	 * @return bool True/False whether or not this is available to the user
53
+	 */
54 54
 	public function is_available()
55 55
 	{
56 56
 		return true;
57 57
 	}
58 58
 
59 59
 	/**
60
-	* Get link id
61
-	*
62
-	* @param array $data The data from the link
63
-	* @return int
64
-	*/
60
+	 * Get link id
61
+	 *
62
+	 * @param array $data The data from the link
63
+	 * @return int
64
+	 */
65 65
 	static public function get_item_id($data)
66 66
 	{
67 67
 		return (int) $data['link_id'];
68 68
 	}
69 69
 
70 70
 	/**
71
-	* Get parent id - it's not used
72
-	*
73
-	* @param array $data The data from the link
74
-	*/
71
+	 * Get parent id - it's not used
72
+	 *
73
+	 * @param array $data The data from the link
74
+	 */
75 75
 	static public function get_item_parent_id($data)
76 76
 	{
77 77
 		// No parent
@@ -79,12 +79,12 @@  discard block
 block discarded – undo
79 79
 	}
80 80
 
81 81
 	/**
82
-	* Find the users who want to receive notifications
83
-	*
84
-	* @param	array	$data		Data from submit link
85
-	* @param	array	$options	Options for finding users for notification
86
-	* @return	array
87
-	*/
82
+	 * Find the users who want to receive notifications
83
+	 *
84
+	 * @param	array	$data		Data from submit link
85
+	 * @param	array	$options	Options for finding users for notification
86
+	 * @return	array
87
+	 */
88 88
 	public function find_users_for_notification($data, $options = array())
89 89
 	{
90 90
 		$options = array_merge(array(
@@ -118,8 +118,8 @@  discard block
 block discarded – undo
118 118
 	}
119 119
 
120 120
 	/**
121
-	* Get the user's avatar
122
-	*/
121
+	 * Get the user's avatar
122
+	 */
123 123
 	public function get_avatar()
124 124
 	{
125 125
 		return $this->user_loader->get_avatar($this->get_data('user_from'), false, true);
@@ -127,10 +127,10 @@  discard block
 block discarded – undo
127 127
 
128 128
 
129 129
 	/**
130
-	* Get the HTML formatted title of this notification
131
-	*
132
-	* @return string
133
-	*/
130
+	 * Get the HTML formatted title of this notification
131
+	 *
132
+	 * @return string
133
+	 */
134 134
 
135 135
 	public function get_title()
136 136
 	{
@@ -143,20 +143,20 @@  discard block
 block discarded – undo
143 143
 
144 144
 
145 145
 	/**
146
-	* Get email template
147
-	*
148
-	* @return string
149
-	*/
146
+	 * Get email template
147
+	 *
148
+	 * @return string
149
+	 */
150 150
 	public function get_email_template()
151 151
 	{
152 152
 		return '@ernadoo_phpbbdirectory/directory_website';
153 153
 	}
154 154
 
155 155
 	/**
156
-	* Get email template variables
157
-	*
158
-	* @return array
159
-	*/
156
+	 * Get email template variables
157
+	 *
158
+	 * @return array
159
+	 */
160 160
 	public function get_email_template_variables()
161 161
 	{
162 162
 		return array(
@@ -168,33 +168,33 @@  discard block
 block discarded – undo
168 168
 	}
169 169
 
170 170
 	/**
171
-	* Get the url to this item
172
-	*
173
-	* @return string URL
174
-	*/
171
+	 * Get the url to this item
172
+	 *
173
+	 * @return string URL
174
+	 */
175 175
 	public function get_url()
176 176
 	{
177 177
 		return append_sid($this->phpbb_root_path . 'directory/categorie/' .  (int) $this->get_data('cat_id'));
178 178
 	}
179 179
 
180 180
 	/**
181
-	* Users needed to query before this notification can be displayed
182
-	*
183
-	* @return array Array of user_ids
184
-	*/
181
+	 * Users needed to query before this notification can be displayed
182
+	 *
183
+	 * @return array Array of user_ids
184
+	 */
185 185
 	public function users_to_query()
186 186
 	{
187 187
 		return array($this->get_data('user_from'));
188 188
 	}
189 189
 
190 190
 	/**
191
-	* Function for preparing the data for insertion in an SQL query
192
-	* (The service handles insertion)
193
-	*
194
-	* @param	array	$data				Data from submit link
195
-	* @param	array	$pre_create_data	Data from pre_create_insert_array()
196
-	* @return	array						Array of data ready to be inserted into the database
197
-	*/
191
+	 * Function for preparing the data for insertion in an SQL query
192
+	 * (The service handles insertion)
193
+	 *
194
+	 * @param	array	$data				Data from submit link
195
+	 * @param	array	$pre_create_data	Data from pre_create_insert_array()
196
+	 * @return	array						Array of data ready to be inserted into the database
197
+	 */
198 198
 	public function create_insert_array($data, $pre_create_data = array())
199 199
 	{
200 200
 		$this->set_data('link_name', $data['link_name']);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@
 block discarded – undo
144 144
 	*/
145 145
 	public function get_url()
146 146
 	{
147
-		return append_sid($this->phpbb_root_path . 'directory/categorie/' .  (int) $this->get_data('cat_id'));
147
+		return append_sid($this->phpbb_root_path . 'directory/categorie/' . (int) $this->get_data('cat_id'));
148 148
 	}
149 149
 
150 150
 	/**
Please login to merge, or discard this patch.
notification/type/directory_website_approved.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@
 block discarded – undo
144 144
 	*/
145 145
 	public function get_url()
146 146
 	{
147
-		return append_sid($this->phpbb_root_path . 'directory/categorie/' .  (int) $this->get_data('cat_id'));
147
+		return append_sid($this->phpbb_root_path . 'directory/categorie/' . (int) $this->get_data('cat_id'));
148 148
 	}
149 149
 
150 150
 	/**
Please login to merge, or discard this patch.
Indentation   +59 added lines, -59 removed lines patch added patch discarded remove patch
@@ -18,21 +18,21 @@  discard block
 block discarded – undo
18 18
 class directory_website_disapproved 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_disapproved';
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
 		'id'	=> 'dir_moderation_queue',
38 38
 		'lang'	=> 'NOTIFICATION_TYPE_DIR_UCP_MODERATION_QUEUE',
@@ -40,17 +40,17 @@  discard block
 block discarded – undo
40 40
 	);
41 41
 
42 42
 	/**
43
-	* Permission to check for (in find_users_for_notification)
44
-	*
45
-	* @var string Permission name
46
-	*/
43
+	 * Permission to check for (in find_users_for_notification)
44
+	 *
45
+	 * @var string Permission name
46
+	 */
47 47
 	protected $permission = array('a_', 'm_');
48 48
 
49 49
 	/**
50
-	* Is available
51
-	*
52
-	* @return bool True/False whether or not this is available to the user
53
-	*/
50
+	 * Is available
51
+	 *
52
+	 * @return bool True/False whether or not this is available to the user
53
+	 */
54 54
 	public function is_available()
55 55
 	{
56 56
 		$has_permission = $this->auth->acl_gets($this->permission, true);
@@ -59,21 +59,21 @@  discard block
 block discarded – undo
59 59
 	}
60 60
 
61 61
 	/**
62
-	* Get link id
63
-	*
64
-	* @param array $data The data from the link
65
-	* @return int
66
-	*/
62
+	 * Get link id
63
+	 *
64
+	 * @param array $data The data from the link
65
+	 * @return int
66
+	 */
67 67
 	static public function get_item_id($data)
68 68
 	{
69 69
 		return (int) $data['link_id'];
70 70
 	}
71 71
 
72 72
 	/**
73
-	* Get parent id - it's not used
74
-	*
75
-	* @param array $data The data from the link
76
-	*/
73
+	 * Get parent id - it's not used
74
+	 *
75
+	 * @param array $data The data from the link
76
+	 */
77 77
 	static public function get_item_parent_id($data)
78 78
 	{
79 79
 		// No parent
@@ -81,12 +81,12 @@  discard block
 block discarded – undo
81 81
 	}
82 82
 
83 83
 	/**
84
-	* Find the users who want to receive notifications
85
-	*
86
-	* @param	array	$data		Data from submit link
87
-	* @param	array	$options	Options for finding users for notification
88
-	* @return	array
89
-	*/
84
+	 * Find the users who want to receive notifications
85
+	 *
86
+	 * @param	array	$data		Data from submit link
87
+	 * @param	array	$options	Options for finding users for notification
88
+	 * @return	array
89
+	 */
90 90
 	public function find_users_for_notification($data, $options = array())
91 91
 	{
92 92
 		$options = array_merge(array(
@@ -103,10 +103,10 @@  discard block
 block discarded – undo
103 103
 	}
104 104
 
105 105
 	/**
106
-	* Get the HTML formatted title of this notification
107
-	*
108
-	* @return string
109
-	*/
106
+	 * Get the HTML formatted title of this notification
107
+	 *
108
+	 * @return string
109
+	 */
110 110
 	public function get_title()
111 111
 	{
112 112
 		$link_name = $this->get_data('link_name');
@@ -116,20 +116,20 @@  discard block
 block discarded – undo
116 116
 	}
117 117
 
118 118
 	/**
119
-	* Get email template
120
-	*
121
-	* @return string
122
-	*/
119
+	 * Get email template
120
+	 *
121
+	 * @return string
122
+	 */
123 123
 	public function get_email_template()
124 124
 	{
125 125
 		return '@ernadoo_phpbbdirectory/directory_website_disapproved';
126 126
 	}
127 127
 
128 128
 	/**
129
-	* Get email template variables
130
-	*
131
-	* @return array
132
-	*/
129
+	 * Get email template variables
130
+	 *
131
+	 * @return array
132
+	 */
133 133
 	public function get_email_template_variables()
134 134
 	{
135 135
 		return array(
@@ -138,33 +138,33 @@  discard block
 block discarded – undo
138 138
 	}
139 139
 
140 140
 	/**
141
-	* Get the url to this item
142
-	*
143
-	* @return string URL
144
-	*/
141
+	 * Get the url to this item
142
+	 *
143
+	 * @return string URL
144
+	 */
145 145
 	public function get_url()
146 146
 	{
147 147
 		return '';
148 148
 	}
149 149
 
150 150
 	/**
151
-	* Users needed to query before this notification can be displayed
152
-	*
153
-	* @return array Array of user_ids
154
-	*/
151
+	 * Users needed to query before this notification can be displayed
152
+	 *
153
+	 * @return array Array of user_ids
154
+	 */
155 155
 	public function users_to_query()
156 156
 	{
157 157
 		return array();
158 158
 	}
159 159
 
160 160
 	/**
161
-	* Function for preparing the data for insertion in an SQL query
162
-	* (The service handles insertion)
163
-	*
164
-	* @param	array	$data				Data from submit link
165
-	* @param	array	$pre_create_data	Data from pre_create_insert_array()
166
-	* @return	array						Array of data ready to be inserted into the database
167
-	*/
161
+	 * Function for preparing the data for insertion in an SQL query
162
+	 * (The service handles insertion)
163
+	 *
164
+	 * @param	array	$data				Data from submit link
165
+	 * @param	array	$pre_create_data	Data from pre_create_insert_array()
166
+	 * @return	array						Array of data ready to be inserted into the database
167
+	 */
168 168
 	public function create_insert_array($data, $pre_create_data = array())
169 169
 	{
170 170
 		$this->set_data('link_name', $data['link_name']);
Please login to merge, or discard this patch.
notification/type/directory_website_disapproved.php 1 patch
Indentation   +59 added lines, -59 removed lines patch added patch discarded remove patch
@@ -18,21 +18,21 @@  discard block
 block discarded – undo
18 18
 class directory_website_disapproved 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_disapproved';
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
 		'id'	=> 'dir_moderation_queue',
38 38
 		'lang'	=> 'NOTIFICATION_TYPE_DIR_UCP_MODERATION_QUEUE',
@@ -40,17 +40,17 @@  discard block
 block discarded – undo
40 40
 	);
41 41
 
42 42
 	/**
43
-	* Permission to check for (in find_users_for_notification)
44
-	*
45
-	* @var string Permission name
46
-	*/
43
+	 * Permission to check for (in find_users_for_notification)
44
+	 *
45
+	 * @var string Permission name
46
+	 */
47 47
 	protected $permission = array('a_', 'm_');
48 48
 
49 49
 	/**
50
-	* Is available
51
-	*
52
-	* @return bool True/False whether or not this is available to the user
53
-	*/
50
+	 * Is available
51
+	 *
52
+	 * @return bool True/False whether or not this is available to the user
53
+	 */
54 54
 	public function is_available()
55 55
 	{
56 56
 		$has_permission = $this->auth->acl_gets($this->permission, true);
@@ -59,21 +59,21 @@  discard block
 block discarded – undo
59 59
 	}
60 60
 
61 61
 	/**
62
-	* Get link id
63
-	*
64
-	* @param array $data The data from the link
65
-	* @return int
66
-	*/
62
+	 * Get link id
63
+	 *
64
+	 * @param array $data The data from the link
65
+	 * @return int
66
+	 */
67 67
 	static public function get_item_id($data)
68 68
 	{
69 69
 		return (int) $data['link_id'];
70 70
 	}
71 71
 
72 72
 	/**
73
-	* Get parent id - it's not used
74
-	*
75
-	* @param array $data The data from the link
76
-	*/
73
+	 * Get parent id - it's not used
74
+	 *
75
+	 * @param array $data The data from the link
76
+	 */
77 77
 	static public function get_item_parent_id($data)
78 78
 	{
79 79
 		// No parent
@@ -81,12 +81,12 @@  discard block
 block discarded – undo
81 81
 	}
82 82
 
83 83
 	/**
84
-	* Find the users who want to receive notifications
85
-	*
86
-	* @param	array	$data		Data from submit link
87
-	* @param	array	$options	Options for finding users for notification
88
-	* @return	array
89
-	*/
84
+	 * Find the users who want to receive notifications
85
+	 *
86
+	 * @param	array	$data		Data from submit link
87
+	 * @param	array	$options	Options for finding users for notification
88
+	 * @return	array
89
+	 */
90 90
 	public function find_users_for_notification($data, $options = array())
91 91
 	{
92 92
 		$options = array_merge(array(
@@ -103,10 +103,10 @@  discard block
 block discarded – undo
103 103
 	}
104 104
 
105 105
 	/**
106
-	* Get the HTML formatted title of this notification
107
-	*
108
-	* @return string
109
-	*/
106
+	 * Get the HTML formatted title of this notification
107
+	 *
108
+	 * @return string
109
+	 */
110 110
 	public function get_title()
111 111
 	{
112 112
 		$link_name = $this->get_data('link_name');
@@ -116,20 +116,20 @@  discard block
 block discarded – undo
116 116
 	}
117 117
 
118 118
 	/**
119
-	* Get email template
120
-	*
121
-	* @return string
122
-	*/
119
+	 * Get email template
120
+	 *
121
+	 * @return string
122
+	 */
123 123
 	public function get_email_template()
124 124
 	{
125 125
 		return '@ernadoo_phpbbdirectory/directory_website_disapproved';
126 126
 	}
127 127
 
128 128
 	/**
129
-	* Get email template variables
130
-	*
131
-	* @return array
132
-	*/
129
+	 * Get email template variables
130
+	 *
131
+	 * @return array
132
+	 */
133 133
 	public function get_email_template_variables()
134 134
 	{
135 135
 		return array(
@@ -138,33 +138,33 @@  discard block
 block discarded – undo
138 138
 	}
139 139
 
140 140
 	/**
141
-	* Get the url to this item
142
-	*
143
-	* @return string URL
144
-	*/
141
+	 * Get the url to this item
142
+	 *
143
+	 * @return string URL
144
+	 */
145 145
 	public function get_url()
146 146
 	{
147 147
 		return '';
148 148
 	}
149 149
 
150 150
 	/**
151
-	* Users needed to query before this notification can be displayed
152
-	*
153
-	* @return array Array of user_ids
154
-	*/
151
+	 * Users needed to query before this notification can be displayed
152
+	 *
153
+	 * @return array Array of user_ids
154
+	 */
155 155
 	public function users_to_query()
156 156
 	{
157 157
 		return array();
158 158
 	}
159 159
 
160 160
 	/**
161
-	* Function for preparing the data for insertion in an SQL query
162
-	* (The service handles insertion)
163
-	*
164
-	* @param	array	$data				Data from submit link
165
-	* @param	array	$pre_create_data	Data from pre_create_insert_array()
166
-	* @return	array						Array of data ready to be inserted into the database
167
-	*/
161
+	 * Function for preparing the data for insertion in an SQL query
162
+	 * (The service handles insertion)
163
+	 *
164
+	 * @param	array	$data				Data from submit link
165
+	 * @param	array	$pre_create_data	Data from pre_create_insert_array()
166
+	 * @return	array						Array of data ready to be inserted into the database
167
+	 */
168 168
 	public function create_insert_array($data, $pre_create_data = array())
169 169
 	{
170 170
 		$this->set_data('link_name', $data['link_name']);
Please login to merge, or discard this patch.
notification/type/directory_website_error_cron.php 1 patch
Indentation   +61 added lines, -61 removed lines patch added patch discarded remove patch
@@ -18,52 +18,52 @@  discard block
 block discarded – undo
18 18
 class directory_website_error_cron 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_error_cron';
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_ERROR_CHECK',
38 38
 		'group'	=> 'NOTIFICATION_DIR_UCP',
39 39
 	);
40 40
 
41 41
 	/**
42
-	* Is available
43
-	*
44
-	* @return bool True/False whether or not this is available to the user
45
-	*/
42
+	 * Is available
43
+	 *
44
+	 * @return bool True/False whether or not this is available to the user
45
+	 */
46 46
 	public function is_available()
47 47
 	{
48 48
 		return true;
49 49
 	}
50 50
 
51 51
 	/**
52
-	* Get link id
53
-	*
54
-	* @param array $data The data from the link
55
-	* @return int
56
-	*/
52
+	 * Get link id
53
+	 *
54
+	 * @param array $data The data from the link
55
+	 * @return int
56
+	 */
57 57
 	static public function get_item_id($data)
58 58
 	{
59 59
 		return (int) $data['link_id'];
60 60
 	}
61 61
 
62 62
 	/**
63
-	* Get parent id - it's not used
64
-	*
65
-	* @param array $data The data from the link
66
-	*/
63
+	 * Get parent id - it's not used
64
+	 *
65
+	 * @param array $data The data from the link
66
+	 */
67 67
 	static public function get_item_parent_id($data)
68 68
 	{
69 69
 		// No parent
@@ -71,12 +71,12 @@  discard block
 block discarded – undo
71 71
 	}
72 72
 
73 73
 	/**
74
-	* Find the users who want to receive notifications
75
-	*
76
-	* @param	array	$data		Data from submit link
77
-	* @param	array	$options	Options for finding users for notification
78
-	* @return	array
79
-	*/
74
+	 * Find the users who want to receive notifications
75
+	 *
76
+	 * @param	array	$data		Data from submit link
77
+	 * @param	array	$options	Options for finding users for notification
78
+	 * @return	array
79
+	 */
80 80
 	public function find_users_for_notification($data, $options = array())
81 81
 	{
82 82
 		$users = array();
@@ -104,10 +104,10 @@  discard block
 block discarded – undo
104 104
 	}
105 105
 
106 106
 	/**
107
-	* Get the HTML formatted title of this notification
108
-	*
109
-	* @return string
110
-	*/
107
+	 * Get the HTML formatted title of this notification
108
+	 *
109
+	 * @return string
110
+	 */
111 111
 	public function get_title()
112 112
 	{
113 113
 		$link_name = $this->get_data('link_name');
@@ -117,20 +117,20 @@  discard block
 block discarded – undo
117 117
 	}
118 118
 
119 119
 	/**
120
-	* Get email template
121
-	*
122
-	* @return string
123
-	*/
120
+	 * Get email template
121
+	 *
122
+	 * @return string
123
+	 */
124 124
 	public function get_email_template()
125 125
 	{
126 126
 		return '@ernadoo_phpbbdirectory/directory_website_error_cron';
127 127
 	}
128 128
 
129 129
 	/**
130
-	* Get email template variables
131
-	*
132
-	* @return array
133
-	*/
130
+	 * Get email template variables
131
+	 *
132
+	 * @return array
133
+	 */
134 134
 	public function get_email_template_variables()
135 135
 	{
136 136
 		return array(
@@ -142,33 +142,33 @@  discard block
 block discarded – undo
142 142
 	}
143 143
 
144 144
 	/**
145
-	* Get the url to this item
146
-	*
147
-	* @return string URL
148
-	*/
145
+	 * Get the url to this item
146
+	 *
147
+	 * @return string URL
148
+	 */
149 149
 	public function get_url()
150 150
 	{
151 151
 		return '';
152 152
 	}
153 153
 
154 154
 	/**
155
-	* Users needed to query before this notification can be displayed
156
-	*
157
-	* @return array Array of user_ids
158
-	*/
155
+	 * Users needed to query before this notification can be displayed
156
+	 *
157
+	 * @return array Array of user_ids
158
+	 */
159 159
 	public function users_to_query()
160 160
 	{
161 161
 		return array();
162 162
 	}
163 163
 
164 164
 	/**
165
-	* Function for preparing the data for insertion in an SQL query
166
-	* (The service handles insertion)
167
-	*
168
-	* @param	array	$data				Data from submit link
169
-	* @param	array	$pre_create_data	Data from pre_create_insert_array()
170
-	* @return	array						Array of data ready to be inserted into the database
171
-	*/
165
+	 * Function for preparing the data for insertion in an SQL query
166
+	 * (The service handles insertion)
167
+	 *
168
+	 * @param	array	$data				Data from submit link
169
+	 * @param	array	$pre_create_data	Data from pre_create_insert_array()
170
+	 * @return	array						Array of data ready to be inserted into the database
171
+	 */
172 172
 	public function create_insert_array($data, $pre_create_data = array())
173 173
 	{
174 174
 		$this->set_data('link_name', $data['link_name']);
@@ -182,12 +182,12 @@  discard block
 block discarded – undo
182 182
 	}
183 183
 
184 184
 	/**
185
-	* Function for preparing the data for update in an SQL query
186
-	* (The service handles insertion)
187
-	*
188
-	* @param array $type_data Data unique to this notification type
189
-	* @return array Array of data ready to be updated in the database
190
-	*/
185
+	 * Function for preparing the data for update in an SQL query
186
+	 * (The service handles insertion)
187
+	 *
188
+	 * @param array $type_data Data unique to this notification type
189
+	 * @return array Array of data ready to be updated in the database
190
+	 */
191 191
 	public function create_update_array($type_data)
192 192
 	{
193 193
 		$data = $this->create_insert_array($type_data);
Please login to merge, or discard this patch.
notification/type/directory_website_in_queue.php 1 patch
Indentation   +61 added lines, -61 removed lines patch added patch discarded remove patch
@@ -18,31 +18,31 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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']);
Please login to merge, or discard this patch.
search/fulltext_directory.php 2 patches
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -16,32 +16,32 @@
 block discarded – undo
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();
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
 			$match_search_query = '';
68 68
 			foreach ($matches as $match)
69 69
 			{
70
-				$match_search_query .= (($match_search_query) ? ' OR ' : '') . 'LOWER('. $match . ') ';
70
+				$match_search_query .= (($match_search_query) ? ' OR ' : '') . 'LOWER(' . $match . ') ';
71 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 73
 			$search_query .= ((!$search_query) ? '' : (($terms == 'all') ? ' AND ' : ' OR ')) . '(' . $match_search_query . ')';
Please login to merge, or discard this patch.
controller/acp/main.php 2 patches
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -31,14 +31,14 @@  discard block
 block discarded – undo
31 31
 	protected $u_action;
32 32
 
33 33
 	/**
34
-	* Constructor
35
-	*
36
-	* @param \phpbb\db\driver\driver_interface 		$db			Database object
37
-	* @param \phpbb\request\request					$request	Request object
38
-	* @param \phpbb\template\template				$template	Template object
39
-	* @param \phpbb\user							$user		User object
40
-	* @param \ernadoo\phpbbdirectory\core\helper	$dir_helper	PhpBB Directory extension helper object
41
-	*/
34
+	 * Constructor
35
+	 *
36
+	 * @param \phpbb\db\driver\driver_interface 		$db			Database object
37
+	 * @param \phpbb\request\request					$request	Request object
38
+	 * @param \phpbb\template\template				$template	Template object
39
+	 * @param \phpbb\user							$user		User object
40
+	 * @param \ernadoo\phpbbdirectory\core\helper	$dir_helper	PhpBB Directory extension helper object
41
+	 */
42 42
 	public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\request\request $request, \phpbb\template\template $template, \phpbb\user $user, \ernadoo\phpbbdirectory\core\helper $dir_helper)
43 43
 	{
44 44
 		$this->db			= $db;
@@ -49,11 +49,11 @@  discard block
 block discarded – undo
49 49
 	}
50 50
 
51 51
 	/**
52
-	* Display confirm box
53
-	*
54
-	* @param	string $action Requested action
55
-	* @return	null
56
-	*/
52
+	 * Display confirm box
53
+	 *
54
+	 * @param	string $action Requested action
55
+	 * @return	null
56
+	 */
57 57
 	public function display_confirm($action)
58 58
 	{
59 59
 		switch ($action)
@@ -91,10 +91,10 @@  discard block
 block discarded – undo
91 91
 	}
92 92
 
93 93
 	/**
94
-	* Display phpBB Directory statistics
95
-	*
96
-	* @return null
97
-	*/
94
+	 * Display phpBB Directory statistics
95
+	 *
96
+	 * @return null
97
+	 */
98 98
 	public function display_stats()
99 99
 	{
100 100
 		// Count number of categories
@@ -181,11 +181,11 @@  discard block
 block discarded – undo
181 181
 	}
182 182
 
183 183
 	/**
184
-	* Execute action requested
185
-	*
186
-	* @param	string $action Requested action
187
-	* @return	null
188
-	*/
184
+	 * Execute action requested
185
+	 *
186
+	 * @param	string $action Requested action
187
+	 * @return	null
188
+	 */
189 189
 	public function exec_action($action)
190 190
 	{
191 191
 		switch ($action)
@@ -260,23 +260,23 @@  discard block
 block discarded – undo
260 260
 	}
261 261
 
262 262
 	/**
263
-	* Set page url
264
-	*
265
-	* @param	string $u_action Custom form action
266
-	* @return	null
267
-	* @access	public
268
-	*/
263
+	 * Set page url
264
+	 *
265
+	 * @param	string $u_action Custom form action
266
+	 * @return	null
267
+	 * @access	public
268
+	 */
269 269
 	public function set_page_url($u_action)
270 270
 	{
271 271
 		$this->u_action = $u_action;
272 272
 	}
273 273
 
274 274
 	/**
275
-	* Get orphan banners
276
-	*
277
-	* @param	bool		$delete	True if we want to delete banners, else false
278
-	* @return	null|int	Number of orphan files, else null
279
-	*/
275
+	 * Get orphan banners
276
+	 *
277
+	 * @param	bool		$delete	True if we want to delete banners, else false
278
+	 * @return	null|int	Number of orphan files, else null
279
+	 */
280 280
 	private function _orphan_files($delete = false)
281 281
 	{
282 282
 		$banner_path = $this->dir_helper->get_banner_path();
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -41,11 +41,11 @@  discard block
 block discarded – undo
41 41
 	*/
42 42
 	public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\request\request $request, \phpbb\template\template $template, \phpbb\user $user, \ernadoo\phpbbdirectory\core\helper $dir_helper)
43 43
 	{
44
-		$this->db			= $db;
45
-		$this->template		= $template;
46
-		$this->user			= $user;
47
-		$this->request		= $request;
48
-		$this->dir_helper	= $dir_helper;
44
+		$this->db = $db;
45
+		$this->template = $template;
46
+		$this->user = $user;
47
+		$this->request = $request;
48
+		$this->dir_helper = $dir_helper;
49 49
 	}
50 50
 
51 51
 	/**
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 			'U_ACTION'			=> $this->u_action,
171 171
 
172 172
 			'TOTAL_CATS'		=> $total_cats,
173
-			'TOTAL_LINKS'		=> $total_links-$waiting_links,
173
+			'TOTAL_LINKS'		=> $total_links - $waiting_links,
174 174
 			'WAITING_LINKS'		=> $waiting_links,
175 175
 			'TOTAL_COMMENTS'	=> $total_comments,
176 176
 			'TOTAL_VOTES'		=> $total_votes,
Please login to merge, or discard this patch.
controller/acp/settings.php 2 patches
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -37,14 +37,14 @@  discard block
 block discarded – undo
37 37
 	private $display_vars;
38 38
 
39 39
 	/**
40
-	* Constructor
41
-	*
42
-	* @param \phpbb\config\config		$config		Config object
43
-	* @param \phpbb\log\log				$log		Log object
44
-	* @param \phpbb\request\request		$request	Request object
45
-	* @param \phpbb\template\template	$template	Template object
46
-	* @param \phpbb\user				$user		User object
47
-	*/
40
+	 * Constructor
41
+	 *
42
+	 * @param \phpbb\config\config		$config		Config object
43
+	 * @param \phpbb\log\log				$log		Log object
44
+	 * @param \phpbb\request\request		$request	Request object
45
+	 * @param \phpbb\template\template	$template	Template object
46
+	 * @param \phpbb\user				$user		User object
47
+	 */
48 48
 	public function __construct(\phpbb\config\config $config, \phpbb\log\log $log, \phpbb\request\request $request, \phpbb\template\template $template, \phpbb\user $user)
49 49
 	{
50 50
 		$this->config	= $config;
@@ -57,10 +57,10 @@  discard block
 block discarded – undo
57 57
 	}
58 58
 
59 59
 	/**
60
-	* Display config page
61
-	*
62
-	* @return null
63
-	*/
60
+	 * Display config page
61
+	 *
62
+	 * @return null
63
+	 */
64 64
 	public function display_config()
65 65
 	{
66 66
 		// Output relevant page
@@ -106,10 +106,10 @@  discard block
 block discarded – undo
106 106
 	}
107 107
 
108 108
 	/**
109
-	* Validate config vars and update config table if needed
110
-	*
111
-	* @return null
112
-	*/
109
+	 * Validate config vars and update config table if needed
110
+	 *
111
+	 * @return null
112
+	 */
113 113
 	public function process()
114 114
 	{
115 115
 		$submit	= ($this->request->is_set_post('submit')) ? true : false;
@@ -162,22 +162,22 @@  discard block
 block discarded – undo
162 162
 	}
163 163
 
164 164
 	/**
165
-	* Set page url
166
-	*
167
-	* @param	string $u_action Custom form action
168
-	* @return	null
169
-	* @access	public
170
-	*/
165
+	 * Set page url
166
+	 *
167
+	 * @param	string $u_action Custom form action
168
+	 * @return	null
169
+	 * @access	public
170
+	 */
171 171
 	public function set_page_url($u_action)
172 172
 	{
173 173
 		$this->u_action = $u_action;
174 174
 	}
175 175
 
176 176
 	/**
177
-	* Build config matrice
178
-	*
179
-	* @return null
180
-	*/
177
+	 * Build config matrice
178
+	 *
179
+	 * @return null
180
+	 */
181 181
 	private function _generate_config()
182 182
 	{
183 183
 		$this->display_vars = array(
Please login to merge, or discard this patch.
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -47,11 +47,11 @@  discard block
 block discarded – undo
47 47
 	*/
48 48
 	public function __construct(\phpbb\config\config $config, \phpbb\log\log $log, \phpbb\request\request $request, \phpbb\template\template $template, \phpbb\user $user)
49 49
 	{
50
-		$this->config	= $config;
51
-		$this->log		= $log;
52
-		$this->template	= $template;
53
-		$this->user		= $user;
54
-		$this->request	= $request;
50
+		$this->config = $config;
51
+		$this->log = $log;
52
+		$this->template = $template;
53
+		$this->user = $user;
54
+		$this->request = $request;
55 55
 
56 56
 		$this->_generate_config();
57 57
 	}
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 	*/
113 113
 	public function process()
114 114
 	{
115
-		$submit	= ($this->request->is_set_post('submit')) ? true : false;
115
+		$submit = ($this->request->is_set_post('submit')) ? true : false;
116 116
 
117 117
 		$this->new_config = $this->config;
118 118
 		$cfg_array = ($this->request->is_set('config')) ? $this->request->variable('config', array('' => ''), true) : $this->new_config;
@@ -194,45 +194,45 @@  discard block
 block discarded – undo
194 194
 				'dir_banner_width'					=> '',
195 195
 				'dir_banner_height'					=> '',
196 196
 
197
-				'dir_mail'							=> array('lang' => 'DIR_MAIL_VALIDATION',	'validate' => 'bool',		'type' => 'radio:yes_no',	'explain' => false),
198
-				'dir_activ_checkurl'				=> array('lang' => 'DIR_ACTIVE_CHECK',		'validate' => 'bool',		'type' => 'radio:yes_no',	'explain' => true),
199
-				'dir_activ_flag'					=> array('lang' => 'DIR_ACTIV_FLAG',		'validate' => 'bool',		'type' => 'radio:yes_no',	'explain' => false),
200
-				'dir_activ_rss'						=> array('lang' => 'DIR_ACTIV_RSS',			'validate' => 'bool',		'type' => 'radio:yes_no',	'explain' => true),
201
-				'dir_activ_pagerank'				=> array('lang' => 'DIR_ACTIV_PAGERANK',	'validate' => 'bool',		'type' => 'radio:yes_no',	'explain' => true),
202
-				'dir_show'							=> array('lang' => 'DIR_SHOW',				'validate' => 'int:1:9999', 'type' => 'number:1:9999',	'explain' => false),
203
-				'dir_length_describe'				=> array('lang' => 'DIR_MAX_DESC',			'validate' => 'int:1:999',	'type' => 'number:1:999',	'explain' => false),
204
-				'dir_new_time'						=> array('lang' => 'DIR_NEW_TIME',			'validate' => 'int:1:999', 	'type' => 'number:1:999',	'explain' => true),
205
-				'dir_default_order'					=> array('lang' => 'DIR_DEFAULT_ORDER',		'validate' => 'string', 	'type' => 'select',			'explain' => true, 'method' => 'get_order_list', 'params' => array('{CONFIG_VALUE}')),
197
+				'dir_mail'							=> array('lang' => 'DIR_MAIL_VALIDATION', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
198
+				'dir_activ_checkurl'				=> array('lang' => 'DIR_ACTIVE_CHECK', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
199
+				'dir_activ_flag'					=> array('lang' => 'DIR_ACTIV_FLAG', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
200
+				'dir_activ_rss'						=> array('lang' => 'DIR_ACTIV_RSS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
201
+				'dir_activ_pagerank'				=> array('lang' => 'DIR_ACTIV_PAGERANK', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
202
+				'dir_show'							=> array('lang' => 'DIR_SHOW', 'validate' => 'int:1:9999', 'type' => 'number:1:9999', 'explain' => false),
203
+				'dir_length_describe'				=> array('lang' => 'DIR_MAX_DESC', 'validate' => 'int:1:999', 'type' => 'number:1:999', 'explain' => false),
204
+				'dir_new_time'						=> array('lang' => 'DIR_NEW_TIME', 'validate' => 'int:1:999', 'type' => 'number:1:999', 'explain' => true),
205
+				'dir_default_order'					=> array('lang' => 'DIR_DEFAULT_ORDER', 'validate' => 'string', 'type' => 'select', 'explain' => true, 'method' => 'get_order_list', 'params' => array('{CONFIG_VALUE}')),
206 206
 
207 207
 				'legend2'							=> 'DIR_RECENT_GUEST',
208
-				'dir_recent_block'					=> array('lang' => 'DIR_RECENT_ENABLE',		'validate' => 'bool',		'type' => 'radio:yes_no',	'explain' => true),
209
-				'dir_recent_rows'					=> array('lang' => 'DIR_RECENT_ROWS',		'validate' => 'int:1:999',	'type' => 'number:1:999',	'explain' => false),
210
-				'dir_recent_columns'				=> array('lang' => 'DIR_RECENT_COLUMNS',	'validate' => 'int:1:999',	'type' => 'number:1:999',	'explain' => false),
211
-				'dir_recent_exclude'				=> array('lang' => 'DIR_RECENT_EXCLUDE',	'validate' => 'string',		'type' => 'text:6:99',		'explain' => true),
208
+				'dir_recent_block'					=> array('lang' => 'DIR_RECENT_ENABLE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
209
+				'dir_recent_rows'					=> array('lang' => 'DIR_RECENT_ROWS', 'validate' => 'int:1:999', 'type' => 'number:1:999', 'explain' => false),
210
+				'dir_recent_columns'				=> array('lang' => 'DIR_RECENT_COLUMNS', 'validate' => 'int:1:999', 'type' => 'number:1:999', 'explain' => false),
211
+				'dir_recent_exclude'				=> array('lang' => 'DIR_RECENT_EXCLUDE', 'validate' => 'string', 'type' => 'text:6:99', 'explain' => true),
212 212
 
213 213
 				'legend3'							=> 'DIR_ADD_GUEST',
214
-				'dir_visual_confirm'				=> array('lang' => 'DIR_VISUAL_CONFIRM',	'validate' => 'bool',		'type' => 'radio:yes_no',	'explain' => true),
215
-				'dir_visual_confirm_max_attempts'	=> array('lang' => 'DIR_MAX_ADD_ATTEMPTS',	'validate' => 'int:0:9999',	'type' => 'number:0:9999',	'explain' => true),
214
+				'dir_visual_confirm'				=> array('lang' => 'DIR_VISUAL_CONFIRM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
215
+				'dir_visual_confirm_max_attempts'	=> array('lang' => 'DIR_MAX_ADD_ATTEMPTS', 'validate' => 'int:0:9999', 'type' => 'number:0:9999', 'explain' => true),
216 216
 
217 217
 				'legend4'							=> 'DIR_THUMB_PARAM',
218
-				'dir_activ_thumb'					=> array('lang' => 'DIR_ACTIVE_THUMB',			'validate' => 'bool',	'type' => 'radio:yes_no',	'explain' => false),
219
-				'dir_activ_thumb_remote'			=> array('lang' => 'DIR_ACTIVE_THUMB_REMOTE',	'validate' => 'bool',	'type' => 'radio:yes_no',	'explain' => true),
220
-				'dir_thumb_service'					=> array('lang' => 'DIR_THUMB_SERVICE',			'validate' => 'string', 'type' => 'select',			'explain' => true, 'method' => 'get_thumb_service_list', 'params' => array('{CONFIG_VALUE}')),
221
-				'dir_thumb_service_reverse'			=> array('lang' => 'DIR_THUMB_SERVICE_REVERSE',	'validate' => 'bool',	'type' => 'radio:yes_no',	'explain' => true),
218
+				'dir_activ_thumb'					=> array('lang' => 'DIR_ACTIVE_THUMB', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
219
+				'dir_activ_thumb_remote'			=> array('lang' => 'DIR_ACTIVE_THUMB_REMOTE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
220
+				'dir_thumb_service'					=> array('lang' => 'DIR_THUMB_SERVICE', 'validate' => 'string', 'type' => 'select', 'explain' => true, 'method' => 'get_thumb_service_list', 'params' => array('{CONFIG_VALUE}')),
221
+				'dir_thumb_service_reverse'			=> array('lang' => 'DIR_THUMB_SERVICE_REVERSE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
222 222
 
223 223
 				'legend5'							=> 'DIR_COMM_PARAM',
224
-				'dir_allow_bbcode'					=> array('lang' => 'DIR_ALLOW_BBCODE',		'validate' => 'bool',		'type' => 'radio:yes_no',	'explain' => false),
225
-				'dir_allow_flash'					=> array('lang' => 'DIR_ALLOW_FLASH',		'validate' => 'bool',		'type' => 'radio:yes_no',	'explain' => false),
226
-				'dir_allow_links'					=> array('lang' => 'DIR_ALLOW_LINKS',		'validate' => 'bool',		'type' => 'radio:yes_no',	'explain' => false),
227
-				'dir_allow_smilies'					=> array('lang' => 'DIR_ALLOW_SMILIES',		'validate' => 'bool',		'type' => 'radio:yes_no',	'explain' => false),
228
-				'dir_length_comments'				=> array('lang' => 'DIR_LENGTH_COMMENTS',	'validate' => 'int:1:999',	'type' => 'number:1:999',	'explain' => true),
229
-				'dir_comments_per_page'				=> array('lang' => 'DIR_COMM_PER_PAGE',		'validate' => 'int:1:9999',	'type' => 'number:1:9999',	'explain' => false),
224
+				'dir_allow_bbcode'					=> array('lang' => 'DIR_ALLOW_BBCODE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
225
+				'dir_allow_flash'					=> array('lang' => 'DIR_ALLOW_FLASH', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
226
+				'dir_allow_links'					=> array('lang' => 'DIR_ALLOW_LINKS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
227
+				'dir_allow_smilies'					=> array('lang' => 'DIR_ALLOW_SMILIES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
228
+				'dir_length_comments'				=> array('lang' => 'DIR_LENGTH_COMMENTS', 'validate' => 'int:1:999', 'type' => 'number:1:999', 'explain' => true),
229
+				'dir_comments_per_page'				=> array('lang' => 'DIR_COMM_PER_PAGE', 'validate' => 'int:1:9999', 'type' => 'number:1:9999', 'explain' => false),
230 230
 
231 231
 				'legend6'							=> 'DIR_BANN_PARAM',
232
-				'dir_activ_banner'					=> array('lang' => 'DIR_ACTIV_BANNER',		'validate' => 'bool',	'type' => 'radio:yes_no',	'explain' => false),
233
-				'dir_banner'						=> array('lang' => 'DIR_MAX_BANN',			'validate' => 'int:0',	'type' => 'dimension:0',	'explain' => true, 'append' => ' ' . $this->user->lang['PIXEL']),
234
-				'dir_banner_filesize'				=> array('lang' => 'DIR_MAX_SIZE',			'validate' => 'string',	'type' => 'custom', 'method' => 'max_filesize', 'explain' => true),
235
-				'dir_storage_banner'				=> array('lang' => 'DIR_STORAGE_BANNER',	'validate' => 'bool',	'type' => 'radio:yes_no',	'explain' => true),
232
+				'dir_activ_banner'					=> array('lang' => 'DIR_ACTIV_BANNER', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
233
+				'dir_banner'						=> array('lang' => 'DIR_MAX_BANN', 'validate' => 'int:0', 'type' => 'dimension:0', 'explain' => true, 'append' => ' ' . $this->user->lang['PIXEL']),
234
+				'dir_banner_filesize'				=> array('lang' => 'DIR_MAX_SIZE', 'validate' => 'string', 'type' => 'custom', 'method' => 'max_filesize', 'explain' => true),
235
+				'dir_storage_banner'				=> array('lang' => 'DIR_STORAGE_BANNER', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
236 236
 			)
237 237
 		);
238 238
 	}
Please login to merge, or discard this patch.
controller/acp/validation.php 2 patches
Indentation   +58 added lines, -58 removed lines patch added patch discarded remove patch
@@ -67,22 +67,22 @@  discard block
 block discarded – undo
67 67
 	private $links_data;
68 68
 
69 69
 	/**
70
-	* Constructor
71
-	*
72
-	* @param \phpbb\config\config								$config				Config object
73
-	* @param \phpbb\db\driver\driver_interface 					$db					Database object
74
-	* @param \phpbb\pagination									$pagination			Pagination object
75
-	* @param \phpbb\log\log										$log				Log object
76
-	* @param \phpbb\notification\manager						$notification		Notification object
77
-	* @param \phpbb\request\request								$request			Request object
78
-	* @param \phpbb\template\template							$template			Template object
79
-	* @param \phpbb\user										$user				User object
80
-	* @param \ernadoo\phpbbdirectory\core\categorie				$categorie			PhpBB Directory extension categorie object
81
-	* @param \ernadoo\phpbbdirectory\core\helper				$dir_helper			PhpBB Directory extension helper object
82
-	* @param \ernadoo\phpbbdirectory\core\link					$link				PhpBB Directory extension link object
83
-	* @param string												$root_path			phpBB root path
84
-	* @param string												$php_ext   			phpEx
85
-	*/
70
+	 * Constructor
71
+	 *
72
+	 * @param \phpbb\config\config								$config				Config object
73
+	 * @param \phpbb\db\driver\driver_interface 					$db					Database object
74
+	 * @param \phpbb\pagination									$pagination			Pagination object
75
+	 * @param \phpbb\log\log										$log				Log object
76
+	 * @param \phpbb\notification\manager						$notification		Notification object
77
+	 * @param \phpbb\request\request								$request			Request object
78
+	 * @param \phpbb\template\template							$template			Template object
79
+	 * @param \phpbb\user										$user				User object
80
+	 * @param \ernadoo\phpbbdirectory\core\categorie				$categorie			PhpBB Directory extension categorie object
81
+	 * @param \ernadoo\phpbbdirectory\core\helper				$dir_helper			PhpBB Directory extension helper object
82
+	 * @param \ernadoo\phpbbdirectory\core\link					$link				PhpBB Directory extension link object
83
+	 * @param string												$root_path			phpBB root path
84
+	 * @param string												$php_ext   			phpEx
85
+	 */
86 86
 	public function __construct(\phpbb\config\config $config, \phpbb\db\driver\driver_interface $db, \phpbb\pagination $pagination, \phpbb\log\log $log, \phpbb\notification\manager $notification, \phpbb\request\request $request, \phpbb\template\template $template, \phpbb\user $user, \ernadoo\phpbbdirectory\core\categorie $categorie, \ernadoo\phpbbdirectory\core\helper $dir_helper, \ernadoo\phpbbdirectory\core\link $link, $root_path, $php_ext)
87 87
 	{
88 88
 		$this->config		= $config;
@@ -103,11 +103,11 @@  discard block
 block discarded – undo
103 103
 	}
104 104
 
105 105
 	/**
106
-	* Display confirm box
107
-	*
108
-	* @param	array $mark Website selected for (dis)approval
109
-	* @return	null
110
-	*/
106
+	 * Display confirm box
107
+	 *
108
+	 * @param	array $mark Website selected for (dis)approval
109
+	 * @return	null
110
+	 */
111 111
 	public function display_confirm($mark)
112 112
 	{
113 113
 		$s_hidden_fields = array(
@@ -119,10 +119,10 @@  discard block
 block discarded – undo
119 119
 	}
120 120
 
121 121
 	/**
122
-	* Display website list for (dis)approval
123
-	*
124
-	* @return null
125
-	*/
122
+	 * Display website list for (dis)approval
123
+	 *
124
+	 * @return null
125
+	 */
126 126
 	public function display_websites()
127 127
 	{
128 128
 		global $phpbb_admin_path;
@@ -226,11 +226,11 @@  discard block
 block discarded – undo
226 226
 	}
227 227
 
228 228
 	/**
229
-	* Get link's information and call appropriate action
230
-	*
231
-	* @param	array $mark Website selected for (dis)approval
232
-	* @return	null
233
-	*/
229
+	 * Get link's information and call appropriate action
230
+	 *
231
+	 * @param	array $mark Website selected for (dis)approval
232
+	 * @return	null
233
+	 */
234 234
 	public function exec_action($mark)
235 235
 	{
236 236
 		$this->_get_infos_links($mark);
@@ -253,10 +253,10 @@  discard block
 block discarded – undo
253 253
 	}
254 254
 
255 255
 	/**
256
-	* Notify users which had submitted their websites
257
-	*
258
-	* @return null
259
-	*/
256
+	 * Notify users which had submitted their websites
257
+	 *
258
+	 * @return null
259
+	 */
260 260
 	public function notifiy_submiters()
261 261
 	{
262 262
 		if (!class_exists('messenger'))
@@ -300,22 +300,22 @@  discard block
 block discarded – undo
300 300
 	}
301 301
 
302 302
 	/**
303
-	* Set page url
304
-	*
305
-	* @param	string $u_action Custom form action
306
-	* @return	null
307
-	* @access	public
308
-	*/
303
+	 * Set page url
304
+	 *
305
+	 * @param	string $u_action Custom form action
306
+	 * @return	null
307
+	 * @access	public
308
+	 */
309 309
 	public function set_page_url($u_action)
310 310
 	{
311 311
 		$this->u_action = $u_action;
312 312
 	}
313 313
 
314 314
 	/**
315
-	* Approve action
316
-	*
317
-	* @return null
318
-	*/
315
+	 * Approve action
316
+	 *
317
+	 * @return null
318
+	 */
319 319
 	private function _action_approved()
320 320
 	{
321 321
 		foreach ($this->links_data as $row)
@@ -344,10 +344,10 @@  discard block
 block discarded – undo
344 344
 	}
345 345
 
346 346
 	/**
347
-	* Disapprove action
348
-	*
349
-	* @return null
350
-	*/
347
+	 * Disapprove action
348
+	 *
349
+	 * @return null
350
+	 */
351 351
 	private function _action_disapproved()
352 352
 	{
353 353
 		foreach ($this->links_data as $row)
@@ -368,11 +368,11 @@  discard block
 block discarded – undo
368 368
 	}
369 369
 
370 370
 	/**
371
-	* Get informations about links selected
372
-	*
373
-	* @param	$mark Website selected for (dis)approval
374
-	* @return	null
375
-	*/
371
+	 * Get informations about links selected
372
+	 *
373
+	 * @param	$mark Website selected for (dis)approval
374
+	 * @return	null
375
+	 */
376 376
 	private function _get_infos_links($mark)
377 377
 	{
378 378
 		$sql_array = array(
@@ -407,11 +407,11 @@  discard block
 block discarded – undo
407 407
 	}
408 408
 
409 409
 	/**
410
-	* Notify users which watch categories
411
-	*
412
-	* @param	$row Informations about website
413
-	* @return	null
414
-	*/
410
+	 * Notify users which watch categories
411
+	 *
412
+	 * @param	$row Informations about website
413
+	 * @return	null
414
+	 */
415 415
 	private function _notify_suscribers($row)
416 416
 	{
417 417
 		$notification_data = array(
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -85,21 +85,21 @@  discard block
 block discarded – undo
85 85
 	*/
86 86
 	public function __construct(\phpbb\config\config $config, \phpbb\db\driver\driver_interface $db, \phpbb\pagination $pagination, \phpbb\log\log $log, \phpbb\notification\manager $notification, \phpbb\request\request $request, \phpbb\template\template $template, \phpbb\user $user, \ernadoo\phpbbdirectory\core\categorie $categorie, \ernadoo\phpbbdirectory\core\helper $dir_helper, \ernadoo\phpbbdirectory\core\link $link, $root_path, $php_ext)
87 87
 	{
88
-		$this->config		= $config;
89
-		$this->db			= $db;
90
-		$this->pagination	= $pagination;
88
+		$this->config = $config;
89
+		$this->db = $db;
90
+		$this->pagination = $pagination;
91 91
 		$this->phpbb_log	= $log;
92
-		$this->notification	= $notification;
93
-		$this->request		= $request;
92
+		$this->notification = $notification;
93
+		$this->request = $request;
94 94
 		$this->template		= $template;
95 95
 		$this->user			= $user;
96 96
 		$this->categorie	= $categorie;
97
-		$this->dir_helper	= $dir_helper;
97
+		$this->dir_helper = $dir_helper;
98 98
 		$this->link			= $link;
99 99
 		$this->root_path	= $root_path;
100
-		$this->php_ext		= $php_ext;
100
+		$this->php_ext = $php_ext;
101 101
 
102
-		$this->action		= $this->request->variable('action', '');
102
+		$this->action = $this->request->variable('action', '');
103 103
 	}
104 104
 
105 105
 	/**
@@ -128,14 +128,14 @@  discard block
 block discarded – undo
128 128
 		global $phpbb_admin_path;
129 129
 
130 130
 		// Sort keys
131
-		$sort_days	= $this->request->variable('st', 0);
131
+		$sort_days = $this->request->variable('st', 0);
132 132
 		$sort_key	= $this->request->variable('sk', 't');
133 133
 		$sort_dir	= $this->request->variable('sd', 'd');
134 134
 
135 135
 		// Number of entries to display
136 136
 		$per_page = $this->request->variable('links_per_page', (int) $this->config['dir_show']);
137 137
 
138
-		$start	= $this->request->variable('start', 0);
138
+		$start = $this->request->variable('start', 0);
139 139
 
140 140
 		// Categorie ordering options
141 141
 		$limit_days		= array(0 => $this->user->lang['SEE_ALL'], 1 => $this->user->lang['1_DAY'], 7 => $this->user->lang['7_DAYS'], 14 => $this->user->lang['2_WEEKS'], 30 => $this->user->lang['1_MONTH'], 90 => $this->user->lang['3_MONTHS'], 180 => $this->user->lang['6_MONTHS'], 365 => $this->user->lang['1_YEAR']);
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
 				'LINK_URL'			=> $row['link_url'],
200 200
 				'LINK_NAME'			=> $row['link_name'],
201 201
 				'LINK_DESC'			=> generate_text_for_display($row['link_description'], $row['link_uid'], $row['link_bitfield'], $row['link_flags']),
202
-				'L_DIR_USER_PROP'	=> $this->user->lang('DIR_USER_PROP', get_username_string('full', $row['link_user_id'], $username, $row['user_colour'], false, append_sid("{$phpbb_admin_path}index.$this->php_ext", 'i=users&amp;mode=overview')), '<select name=c'.$row['link_id'].'>'.$this->categorie->make_cat_select((int) $row['link_cat']).'</select>', $this->user->format_date($row['link_time'])),
202
+				'L_DIR_USER_PROP'	=> $this->user->lang('DIR_USER_PROP', get_username_string('full', $row['link_user_id'], $username, $row['user_colour'], false, append_sid("{$phpbb_admin_path}index.$this->php_ext", 'i=users&amp;mode=overview')), '<select name=c' . $row['link_id'] . '>' . $this->categorie->make_cat_select((int) $row['link_cat']) . '</select>', $this->user->format_date($row['link_time'])),
203 203
 				'BANNER'			=> $s_banner,
204 204
 				'LINK_ID'			=> $row['link_id'],
205 205
 
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
 			{
275 275
 				$username = $email = $row['link_guest_email'];
276 276
 
277
-				$messenger->template('@ernadoo_phpbbdirectory/directory_website_'.$this->action, $row['user_lang']);
277
+				$messenger->template('@ernadoo_phpbbdirectory/directory_website_' . $this->action, $row['user_lang']);
278 278
 				$messenger->to($email, $username);
279 279
 
280 280
 				$messenger->assign_vars(array(
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
 					'cat_id'			=> (int) $row['link_cat'],
295 295
 				);
296 296
 
297
-				$this->notification->add_notifications('ernadoo.phpbbdirectory.notification.type.directory_website_'.$this->action, $notification_data);
297
+				$this->notification->add_notifications('ernadoo.phpbbdirectory.notification.type.directory_website_' . $this->action, $notification_data);
298 298
 			}
299 299
 		}
300 300
 	}
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
 		foreach ($this->cat_data as $cat_id => $count)
338 338
 		{
339 339
 			$sql = 'UPDATE ' . DIR_CAT_TABLE . '
340
-							SET cat_links = cat_links + '.$count.'
340
+							SET cat_links = cat_links + '.$count . '
341 341
 							WHERE cat_id = ' . (int) $cat_id;
342 342
 			$this->db->sql_query($sql);
343 343
 		}
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
 
397 397
 		while ($row = $this->db->sql_fetchrow($result))
398 398
 		{
399
-			$row['link_cat'] = $this->request->variable('c'.$row['link_id'], (int) $row['cat_id']);
399
+			$row['link_cat'] = $this->request->variable('c' . $row['link_id'], (int) $row['cat_id']);
400 400
 
401 401
 			$this->links_data[] = $row;
402 402
 
Please login to merge, or discard this patch.