@@ -21,32 +21,32 @@ discard block |
||
21 | 21 | protected $helper; |
22 | 22 | |
23 | 23 | /** |
24 | - * Set the controller helper |
|
25 | - * |
|
26 | - * @param \phpbb\controller\helper $helper |
|
27 | - * @return null |
|
28 | - */ |
|
24 | + * Set the controller helper |
|
25 | + * |
|
26 | + * @param \phpbb\controller\helper $helper |
|
27 | + * @return null |
|
28 | + */ |
|
29 | 29 | public function set_controller_helper(\phpbb\controller\helper $helper) |
30 | 30 | { |
31 | 31 | $this->helper = $helper; |
32 | 32 | } |
33 | 33 | |
34 | 34 | /** |
35 | - * Get notification type name |
|
36 | - * |
|
37 | - * @return string |
|
38 | - */ |
|
35 | + * Get notification type name |
|
36 | + * |
|
37 | + * @return string |
|
38 | + */ |
|
39 | 39 | public function get_type() |
40 | 40 | { |
41 | 41 | return 'ernadoo.phpbbdirectory.notification.type.directory_website_approved'; |
42 | 42 | } |
43 | 43 | |
44 | 44 | /** |
45 | - * Notification option data (for outputting to the user) |
|
46 | - * |
|
47 | - * @var bool|array False if the service should use it's default data |
|
48 | - * Array of data (including keys 'id', 'lang', and 'group') |
|
49 | - */ |
|
45 | + * Notification option data (for outputting to the user) |
|
46 | + * |
|
47 | + * @var bool|array False if the service should use it's default data |
|
48 | + * Array of data (including keys 'id', 'lang', and 'group') |
|
49 | + */ |
|
50 | 50 | public static $notification_option = array( |
51 | 51 | 'id' => 'dir_moderation_queue', |
52 | 52 | 'lang' => 'NOTIFICATION_TYPE_DIR_UCP_MODERATION_QUEUE', |
@@ -54,17 +54,17 @@ discard block |
||
54 | 54 | ); |
55 | 55 | |
56 | 56 | /** |
57 | - * Permission to check for (in find_users_for_notification) |
|
58 | - * |
|
59 | - * @var string Permission name |
|
60 | - */ |
|
57 | + * Permission to check for (in find_users_for_notification) |
|
58 | + * |
|
59 | + * @var string Permission name |
|
60 | + */ |
|
61 | 61 | protected $permission = array('a_', 'm_'); |
62 | 62 | |
63 | 63 | /** |
64 | - * Is available |
|
65 | - * |
|
66 | - * @return bool True/False whether or not this is available to the user |
|
67 | - */ |
|
64 | + * Is available |
|
65 | + * |
|
66 | + * @return bool True/False whether or not this is available to the user |
|
67 | + */ |
|
68 | 68 | public function is_available() |
69 | 69 | { |
70 | 70 | $has_permission = $this->auth->acl_gets($this->permission, true); |
@@ -73,21 +73,21 @@ discard block |
||
73 | 73 | } |
74 | 74 | |
75 | 75 | /** |
76 | - * Get link id |
|
77 | - * |
|
78 | - * @param array $data The data from the link |
|
79 | - * @return int |
|
80 | - */ |
|
76 | + * Get link id |
|
77 | + * |
|
78 | + * @param array $data The data from the link |
|
79 | + * @return int |
|
80 | + */ |
|
81 | 81 | static public function get_item_id($data) |
82 | 82 | { |
83 | 83 | return (int) $data['link_id']; |
84 | 84 | } |
85 | 85 | |
86 | 86 | /** |
87 | - * Get parent id - it's not used |
|
88 | - * |
|
89 | - * @param array $data The data from the link |
|
90 | - */ |
|
87 | + * Get parent id - it's not used |
|
88 | + * |
|
89 | + * @param array $data The data from the link |
|
90 | + */ |
|
91 | 91 | static public function get_item_parent_id($data) |
92 | 92 | { |
93 | 93 | // No parent |
@@ -95,12 +95,12 @@ discard block |
||
95 | 95 | } |
96 | 96 | |
97 | 97 | /** |
98 | - * Find the users who want to receive notifications |
|
99 | - * |
|
100 | - * @param array $data Data from submit link |
|
101 | - * @param array $options Options for finding users for notification |
|
102 | - * @return array |
|
103 | - */ |
|
98 | + * Find the users who want to receive notifications |
|
99 | + * |
|
100 | + * @param array $data Data from submit link |
|
101 | + * @param array $options Options for finding users for notification |
|
102 | + * @return array |
|
103 | + */ |
|
104 | 104 | public function find_users_for_notification($data, $options = array()) |
105 | 105 | { |
106 | 106 | $options = array_merge(array( |
@@ -116,10 +116,10 @@ discard block |
||
116 | 116 | } |
117 | 117 | |
118 | 118 | /** |
119 | - * Get the HTML formatted title of this notification |
|
120 | - * |
|
121 | - * @return string |
|
122 | - */ |
|
119 | + * Get the HTML formatted title of this notification |
|
120 | + * |
|
121 | + * @return string |
|
122 | + */ |
|
123 | 123 | public function get_title() |
124 | 124 | { |
125 | 125 | $link_name = $this->get_data('link_name'); |
@@ -129,20 +129,20 @@ discard block |
||
129 | 129 | } |
130 | 130 | |
131 | 131 | /** |
132 | - * Get email template |
|
133 | - * |
|
134 | - * @return string |
|
135 | - */ |
|
132 | + * Get email template |
|
133 | + * |
|
134 | + * @return string |
|
135 | + */ |
|
136 | 136 | public function get_email_template() |
137 | 137 | { |
138 | 138 | return '@ernadoo_phpbbdirectory/directory_website_approved'; |
139 | 139 | } |
140 | 140 | |
141 | 141 | /** |
142 | - * Get email template variables |
|
143 | - * |
|
144 | - * @return array |
|
145 | - */ |
|
142 | + * Get email template variables |
|
143 | + * |
|
144 | + * @return array |
|
145 | + */ |
|
146 | 146 | public function get_email_template_variables() |
147 | 147 | { |
148 | 148 | return array( |
@@ -151,33 +151,33 @@ discard block |
||
151 | 151 | } |
152 | 152 | |
153 | 153 | /** |
154 | - * Get the url to this item |
|
155 | - * |
|
156 | - * @return string URL |
|
157 | - */ |
|
154 | + * Get the url to this item |
|
155 | + * |
|
156 | + * @return string URL |
|
157 | + */ |
|
158 | 158 | public function get_url() |
159 | 159 | { |
160 | 160 | return $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $this->get_data('cat_id')); |
161 | 161 | } |
162 | 162 | |
163 | 163 | /** |
164 | - * Users needed to query before this notification can be displayed |
|
165 | - * |
|
166 | - * @return array Array of user_ids |
|
167 | - */ |
|
164 | + * Users needed to query before this notification can be displayed |
|
165 | + * |
|
166 | + * @return array Array of user_ids |
|
167 | + */ |
|
168 | 168 | public function users_to_query() |
169 | 169 | { |
170 | 170 | return array(); |
171 | 171 | } |
172 | 172 | |
173 | 173 | /** |
174 | - * Function for preparing the data for insertion in an SQL query |
|
175 | - * (The service handles insertion) |
|
176 | - * |
|
177 | - * @param array $data Data from submit link |
|
178 | - * @param array $pre_create_data Data from pre_create_insert_array() |
|
179 | - * @return array Array of data ready to be inserted into the database |
|
180 | - */ |
|
174 | + * Function for preparing the data for insertion in an SQL query |
|
175 | + * (The service handles insertion) |
|
176 | + * |
|
177 | + * @param array $data Data from submit link |
|
178 | + * @param array $pre_create_data Data from pre_create_insert_array() |
|
179 | + * @return array Array of data ready to be inserted into the database |
|
180 | + */ |
|
181 | 181 | public function create_insert_array($data, $pre_create_data = array()) |
182 | 182 | { |
183 | 183 | $this->set_data('link_name', $data['link_name']); |
@@ -24,11 +24,11 @@ discard block |
||
24 | 24 | protected $watch_table; |
25 | 25 | |
26 | 26 | /** |
27 | - * Set the controller helper |
|
28 | - * |
|
29 | - * @param \phpbb\controller\helper $helper |
|
30 | - * @return null |
|
31 | - */ |
|
27 | + * Set the controller helper |
|
28 | + * |
|
29 | + * @param \phpbb\controller\helper $helper |
|
30 | + * @return null |
|
31 | + */ |
|
32 | 32 | public function set_controller_helper(\phpbb\controller\helper $helper) |
33 | 33 | { |
34 | 34 | $this->helper = $helper; |
@@ -46,21 +46,21 @@ discard block |
||
46 | 46 | } |
47 | 47 | |
48 | 48 | /** |
49 | - * Get notification type name |
|
50 | - * |
|
51 | - * @return string |
|
52 | - */ |
|
49 | + * Get notification type name |
|
50 | + * |
|
51 | + * @return string |
|
52 | + */ |
|
53 | 53 | public function get_type() |
54 | 54 | { |
55 | 55 | return 'ernadoo.phpbbdirectory.notification.type.directory_website'; |
56 | 56 | } |
57 | 57 | |
58 | 58 | /** |
59 | - * Notification option data (for outputting to the user) |
|
60 | - * |
|
61 | - * @var bool|array False if the service should use it's default data |
|
62 | - * Array of data (including keys 'id', 'lang', and 'group') |
|
63 | - */ |
|
59 | + * Notification option data (for outputting to the user) |
|
60 | + * |
|
61 | + * @var bool|array False if the service should use it's default data |
|
62 | + * Array of data (including keys 'id', 'lang', and 'group') |
|
63 | + */ |
|
64 | 64 | public static $notification_option = array( |
65 | 65 | 'lang' => 'NOTIFICATION_TYPE_DIR_UCP_WEBSITE', |
66 | 66 | 'group' => 'NOTIFICATION_DIR_UCP', |
@@ -75,31 +75,31 @@ discard block |
||
75 | 75 | } |
76 | 76 | |
77 | 77 | /** |
78 | - * Is available |
|
79 | - * |
|
80 | - * @return bool True/False whether or not this is available to the user |
|
81 | - */ |
|
78 | + * Is available |
|
79 | + * |
|
80 | + * @return bool True/False whether or not this is available to the user |
|
81 | + */ |
|
82 | 82 | public function is_available() |
83 | 83 | { |
84 | 84 | return true; |
85 | 85 | } |
86 | 86 | |
87 | 87 | /** |
88 | - * Get link id |
|
89 | - * |
|
90 | - * @param array $data The data from the link |
|
91 | - * @return int |
|
92 | - */ |
|
88 | + * Get link id |
|
89 | + * |
|
90 | + * @param array $data The data from the link |
|
91 | + * @return int |
|
92 | + */ |
|
93 | 93 | static public function get_item_id($data) |
94 | 94 | { |
95 | 95 | return (int) $data['link_id']; |
96 | 96 | } |
97 | 97 | |
98 | 98 | /** |
99 | - * Get parent id - it's not used |
|
100 | - * |
|
101 | - * @param array $data The data from the link |
|
102 | - */ |
|
99 | + * Get parent id - it's not used |
|
100 | + * |
|
101 | + * @param array $data The data from the link |
|
102 | + */ |
|
103 | 103 | static public function get_item_parent_id($data) |
104 | 104 | { |
105 | 105 | // No parent |
@@ -107,12 +107,12 @@ discard block |
||
107 | 107 | } |
108 | 108 | |
109 | 109 | /** |
110 | - * Find the users who want to receive notifications |
|
111 | - * |
|
112 | - * @param array $data Data from submit link |
|
113 | - * @param array $options Options for finding users for notification |
|
114 | - * @return array |
|
115 | - */ |
|
110 | + * Find the users who want to receive notifications |
|
111 | + * |
|
112 | + * @param array $data Data from submit link |
|
113 | + * @param array $options Options for finding users for notification |
|
114 | + * @return array |
|
115 | + */ |
|
116 | 116 | public function find_users_for_notification($data, $options = array()) |
117 | 117 | { |
118 | 118 | $options = array_merge(array( |
@@ -144,8 +144,8 @@ discard block |
||
144 | 144 | } |
145 | 145 | |
146 | 146 | /** |
147 | - * Get the user's avatar |
|
148 | - */ |
|
147 | + * Get the user's avatar |
|
148 | + */ |
|
149 | 149 | public function get_avatar() |
150 | 150 | { |
151 | 151 | return $this->user_loader->get_avatar($this->get_data('user_from'), false, true); |
@@ -153,10 +153,10 @@ discard block |
||
153 | 153 | |
154 | 154 | |
155 | 155 | /** |
156 | - * Get the HTML formatted title of this notification |
|
157 | - * |
|
158 | - * @return string |
|
159 | - */ |
|
156 | + * Get the HTML formatted title of this notification |
|
157 | + * |
|
158 | + * @return string |
|
159 | + */ |
|
160 | 160 | |
161 | 161 | public function get_title() |
162 | 162 | { |
@@ -169,20 +169,20 @@ discard block |
||
169 | 169 | |
170 | 170 | |
171 | 171 | /** |
172 | - * Get email template |
|
173 | - * |
|
174 | - * @return string |
|
175 | - */ |
|
172 | + * Get email template |
|
173 | + * |
|
174 | + * @return string |
|
175 | + */ |
|
176 | 176 | public function get_email_template() |
177 | 177 | { |
178 | 178 | return '@ernadoo_phpbbdirectory/directory_website'; |
179 | 179 | } |
180 | 180 | |
181 | 181 | /** |
182 | - * Get email template variables |
|
183 | - * |
|
184 | - * @return array |
|
185 | - */ |
|
182 | + * Get email template variables |
|
183 | + * |
|
184 | + * @return array |
|
185 | + */ |
|
186 | 186 | public function get_email_template_variables() |
187 | 187 | { |
188 | 188 | return array( |
@@ -194,33 +194,33 @@ discard block |
||
194 | 194 | } |
195 | 195 | |
196 | 196 | /** |
197 | - * Get the url to this item |
|
198 | - * |
|
199 | - * @return string URL |
|
200 | - */ |
|
197 | + * Get the url to this item |
|
198 | + * |
|
199 | + * @return string URL |
|
200 | + */ |
|
201 | 201 | public function get_url() |
202 | 202 | { |
203 | 203 | return $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $this->get_data('cat_id')); |
204 | 204 | } |
205 | 205 | |
206 | 206 | /** |
207 | - * Users needed to query before this notification can be displayed |
|
208 | - * |
|
209 | - * @return array Array of user_ids |
|
210 | - */ |
|
207 | + * Users needed to query before this notification can be displayed |
|
208 | + * |
|
209 | + * @return array Array of user_ids |
|
210 | + */ |
|
211 | 211 | public function users_to_query() |
212 | 212 | { |
213 | 213 | return array($this->get_data('user_from')); |
214 | 214 | } |
215 | 215 | |
216 | 216 | /** |
217 | - * Function for preparing the data for insertion in an SQL query |
|
218 | - * (The service handles insertion) |
|
219 | - * |
|
220 | - * @param array $data Data from submit link |
|
221 | - * @param array $pre_create_data Data from pre_create_insert_array() |
|
222 | - * @return array Array of data ready to be inserted into the database |
|
223 | - */ |
|
217 | + * Function for preparing the data for insertion in an SQL query |
|
218 | + * (The service handles insertion) |
|
219 | + * |
|
220 | + * @param array $data Data from submit link |
|
221 | + * @param array $pre_create_data Data from pre_create_insert_array() |
|
222 | + * @return array Array of data ready to be inserted into the database |
|
223 | + */ |
|
224 | 224 | public function create_insert_array($data, $pre_create_data = array()) |
225 | 225 | { |
226 | 226 | $this->set_data('link_name', $data['link_name']); |
@@ -69,19 +69,19 @@ discard block |
||
69 | 69 | private $update; |
70 | 70 | |
71 | 71 | /** |
72 | - * Constructor |
|
73 | - * |
|
74 | - * @param \phpbb\cache\service $cache Cache object |
|
75 | - * @param \phpbb\db\driver\driver_interface $db Database object |
|
76 | - * @param \phpbb\controller\helper $helper Helper object |
|
77 | - * @param \phpbb\language\language $language Language object |
|
78 | - * @param \phpbb\log\log $log Log object |
|
79 | - * @param \phpbb\request\request $request Request object |
|
80 | - * @param \phpbb\template\template $template Template object |
|
81 | - * @param \phpbb\user $user User object |
|
82 | - * @param \ernadoo\phpbbdirectory\core\categorie $categorie PhpBB Directory extension categorie object |
|
83 | - * @param \ernadoo\phpbbdirectory\core\nestedset_category $nestedset_category PhpBB Directory extension nestedset object |
|
84 | - */ |
|
72 | + * Constructor |
|
73 | + * |
|
74 | + * @param \phpbb\cache\service $cache Cache object |
|
75 | + * @param \phpbb\db\driver\driver_interface $db Database object |
|
76 | + * @param \phpbb\controller\helper $helper Helper object |
|
77 | + * @param \phpbb\language\language $language Language object |
|
78 | + * @param \phpbb\log\log $log Log object |
|
79 | + * @param \phpbb\request\request $request Request object |
|
80 | + * @param \phpbb\template\template $template Template object |
|
81 | + * @param \phpbb\user $user User object |
|
82 | + * @param \ernadoo\phpbbdirectory\core\categorie $categorie PhpBB Directory extension categorie object |
|
83 | + * @param \ernadoo\phpbbdirectory\core\nestedset_category $nestedset_category PhpBB Directory extension nestedset object |
|
84 | + */ |
|
85 | 85 | public function __construct(\phpbb\cache\service $cache, \phpbb\db\driver\driver_interface $db, \phpbb\controller\helper $helper, \phpbb\language\language $language, \phpbb\log\log $log, \phpbb\request\request $request, \phpbb\template\template $template, \phpbb\user $user, \ernadoo\phpbbdirectory\core\categorie $categorie, \ernadoo\phpbbdirectory\core\nestedset_category $nestedset_category) |
86 | 86 | { |
87 | 87 | $this->cache = $cache; |
@@ -105,10 +105,10 @@ discard block |
||
105 | 105 | } |
106 | 106 | |
107 | 107 | /** |
108 | - * Initialize defaults data for add page |
|
109 | - * |
|
110 | - * @return null |
|
111 | - */ |
|
108 | + * Initialize defaults data for add page |
|
109 | + * |
|
110 | + * @return null |
|
111 | + */ |
|
112 | 112 | public function action_add() |
113 | 113 | { |
114 | 114 | $this->cat_id = $this->parent_id; |
@@ -143,10 +143,10 @@ discard block |
||
143 | 143 | } |
144 | 144 | |
145 | 145 | /** |
146 | - * Display deleting page |
|
147 | - * |
|
148 | - * @return null |
|
149 | - */ |
|
146 | + * Display deleting page |
|
147 | + * |
|
148 | + * @return null |
|
149 | + */ |
|
150 | 150 | public function action_delete() |
151 | 151 | { |
152 | 152 | if (!$this->cat_id) |
@@ -197,10 +197,10 @@ discard block |
||
197 | 197 | } |
198 | 198 | |
199 | 199 | /** |
200 | - * Initialize data for edit page |
|
201 | - * |
|
202 | - * @return null |
|
203 | - */ |
|
200 | + * Initialize data for edit page |
|
201 | + * |
|
202 | + * @return null |
|
203 | + */ |
|
204 | 204 | public function action_edit() |
205 | 205 | { |
206 | 206 | $row = $this->_get_cat_info($this->cat_id); |
@@ -227,10 +227,10 @@ discard block |
||
227 | 227 | } |
228 | 228 | |
229 | 229 | /** |
230 | - * Move order categories |
|
231 | - * |
|
232 | - * @return null |
|
233 | - */ |
|
230 | + * Move order categories |
|
231 | + * |
|
232 | + * @return null |
|
233 | + */ |
|
234 | 234 | public function action_move() |
235 | 235 | { |
236 | 236 | if (!$this->cat_id) |
@@ -273,10 +273,10 @@ discard block |
||
273 | 273 | } |
274 | 274 | |
275 | 275 | /** |
276 | - * Display progress bar for syncinc categories |
|
277 | - * |
|
278 | - * @return null |
|
279 | - */ |
|
276 | + * Display progress bar for syncinc categories |
|
277 | + * |
|
278 | + * @return null |
|
279 | + */ |
|
280 | 280 | public function action_progress_bar() |
281 | 281 | { |
282 | 282 | $start = $this->request->variable('start', 0); |
@@ -297,10 +297,10 @@ discard block |
||
297 | 297 | } |
298 | 298 | |
299 | 299 | /** |
300 | - * Get link's ID interval for _sync_dir_links() |
|
301 | - * |
|
302 | - * @return null |
|
303 | - */ |
|
300 | + * Get link's ID interval for _sync_dir_links() |
|
301 | + * |
|
302 | + * @return null |
|
303 | + */ |
|
304 | 304 | public function action_sync() |
305 | 305 | { |
306 | 306 | if (!$this->cat_id) |
@@ -382,10 +382,10 @@ discard block |
||
382 | 382 | } |
383 | 383 | |
384 | 384 | /** |
385 | - * Sync category data |
|
386 | - * |
|
387 | - * @return null |
|
388 | - */ |
|
385 | + * Sync category data |
|
386 | + * |
|
387 | + * @return null |
|
388 | + */ |
|
389 | 389 | public function action_sync_cat() |
390 | 390 | { |
391 | 391 | $sql = 'SELECT cat_name |
@@ -409,10 +409,10 @@ discard block |
||
409 | 409 | } |
410 | 410 | |
411 | 411 | /** |
412 | - * Display categories page |
|
413 | - * |
|
414 | - * @return null |
|
415 | - */ |
|
412 | + * Display categories page |
|
413 | + * |
|
414 | + * @return null |
|
415 | + */ |
|
416 | 416 | public function display_cats() |
417 | 417 | { |
418 | 418 | // Default management page |
@@ -506,22 +506,22 @@ discard block |
||
506 | 506 | } |
507 | 507 | |
508 | 508 | /** |
509 | - * Set page url |
|
510 | - * |
|
511 | - * @param string $u_action Custom form action |
|
512 | - * @return null |
|
513 | - * @access public |
|
514 | - */ |
|
509 | + * Set page url |
|
510 | + * |
|
511 | + * @param string $u_action Custom form action |
|
512 | + * @return null |
|
513 | + * @access public |
|
514 | + */ |
|
515 | 515 | public function set_page_url($u_action) |
516 | 516 | { |
517 | 517 | $this->u_action = $u_action; |
518 | 518 | } |
519 | 519 | |
520 | 520 | /** |
521 | - * Update cat table |
|
522 | - * |
|
523 | - * @return null |
|
524 | - */ |
|
521 | + * Update cat table |
|
522 | + * |
|
523 | + * @return null |
|
524 | + */ |
|
525 | 525 | public function update() |
526 | 526 | { |
527 | 527 | if (!check_form_key($this->form_key)) |
@@ -619,13 +619,13 @@ discard block |
||
619 | 619 | } |
620 | 620 | |
621 | 621 | /** |
622 | - * Check route |
|
623 | - * |
|
624 | - * @param string $route Route text |
|
625 | - * @return null |
|
626 | - * @access public |
|
627 | - * @throws \phpbb\pages\exception\unexpected_value |
|
628 | - */ |
|
622 | + * Check route |
|
623 | + * |
|
624 | + * @param string $route Route text |
|
625 | + * @return null |
|
626 | + * @access public |
|
627 | + * @throws \phpbb\pages\exception\unexpected_value |
|
628 | + */ |
|
629 | 629 | private function _check_route($route) |
630 | 630 | { |
631 | 631 | // Route is a required field |
@@ -656,11 +656,11 @@ discard block |
||
656 | 656 | } |
657 | 657 | |
658 | 658 | /** |
659 | - * Display form |
|
660 | - * |
|
661 | - * @param string $parents_list Drop-down list |
|
662 | - * @return null |
|
663 | - */ |
|
659 | + * Display form |
|
660 | + * |
|
661 | + * @param string $parents_list Drop-down list |
|
662 | + * @return null |
|
663 | + */ |
|
664 | 664 | private function _display_cat_form($parents_list) |
665 | 665 | { |
666 | 666 | $dir_cat_desc_data = array( |
@@ -732,11 +732,11 @@ discard block |
||
732 | 732 | } |
733 | 733 | |
734 | 734 | /** |
735 | - * Get category details |
|
736 | - * |
|
737 | - * @param int $cat_id The category ID |
|
738 | - * @return array |
|
739 | - */ |
|
735 | + * Get category details |
|
736 | + * |
|
737 | + * @param int $cat_id The category ID |
|
738 | + * @return array |
|
739 | + */ |
|
740 | 740 | private function _get_cat_info($cat_id) |
741 | 741 | { |
742 | 742 | $sql = 'SELECT cat_id, parent_id, right_id, left_id, cat_desc, cat_desc_uid, cat_desc_options, cat_icon, cat_name, cat_route, display_subcat_list, cat_allow_comments, cat_allow_votes, cat_must_describe, cat_count_all, cat_validate, cat_cron_freq, cat_cron_nb_check, cat_link_back, cat_cron_enable, cat_cron_next |
@@ -755,10 +755,10 @@ discard block |
||
755 | 755 | } |
756 | 756 | |
757 | 757 | /** |
758 | - * Update category data |
|
759 | - * |
|
760 | - * @return array |
|
761 | - */ |
|
758 | + * Update category data |
|
759 | + * |
|
760 | + * @return array |
|
761 | + */ |
|
762 | 762 | private function _update_cat_data() |
763 | 763 | { |
764 | 764 | if (!$this->cat_data['cat_name']) |
@@ -854,14 +854,14 @@ discard block |
||
854 | 854 | } |
855 | 855 | |
856 | 856 | /** |
857 | - * Remove complete category |
|
858 | - * |
|
859 | - * @param string $action_links Action for categories links |
|
860 | - * @param string $action_subcats Action for sub-categories |
|
861 | - * @param int $links_to_id New category ID for links |
|
862 | - * @param int $subcats_to_id New category ID for sub-categories |
|
863 | - * @return array |
|
864 | - */ |
|
857 | + * Remove complete category |
|
858 | + * |
|
859 | + * @param string $action_links Action for categories links |
|
860 | + * @param string $action_subcats Action for sub-categories |
|
861 | + * @param int $links_to_id New category ID for links |
|
862 | + * @param int $subcats_to_id New category ID for sub-categories |
|
863 | + * @return array |
|
864 | + */ |
|
865 | 865 | private function _delete_cat($action_links = 'delete', $action_subcats = 'delete', $links_to_id = 0, $subcats_to_id = 0) |
866 | 866 | { |
867 | 867 | $this->cat_data = $this->_get_cat_info($this->cat_id); |
@@ -978,12 +978,12 @@ discard block |
||
978 | 978 | } |
979 | 979 | |
980 | 980 | /** |
981 | - * Move category content from one to another forum |
|
982 | - * |
|
983 | - * @param int $from_id |
|
984 | - * @param int $to_id |
|
985 | - * @return null |
|
986 | - */ |
|
981 | + * Move category content from one to another forum |
|
982 | + * |
|
983 | + * @param int $from_id |
|
984 | + * @param int $to_id |
|
985 | + * @return null |
|
986 | + */ |
|
987 | 987 | private function _move_cat_content($from_id, $to_id) |
988 | 988 | { |
989 | 989 | $sql = 'UPDATE ' . $this->links_table . ' |
@@ -999,10 +999,10 @@ discard block |
||
999 | 999 | } |
1000 | 1000 | |
1001 | 1001 | /** |
1002 | - * Delete category content |
|
1003 | - * |
|
1004 | - * @return array |
|
1005 | - */ |
|
1002 | + * Delete category content |
|
1003 | + * |
|
1004 | + * @return array |
|
1005 | + */ |
|
1006 | 1006 | private function _delete_cat_content() |
1007 | 1007 | { |
1008 | 1008 | $this->db->sql_transaction('begin'); |
@@ -1061,11 +1061,11 @@ discard block |
||
1061 | 1061 | } |
1062 | 1062 | |
1063 | 1063 | /** |
1064 | - * Update links counter |
|
1065 | - * |
|
1066 | - * @param int $cat_id The category ID |
|
1067 | - * @return null |
|
1068 | - */ |
|
1064 | + * Update links counter |
|
1065 | + * |
|
1066 | + * @param int $cat_id The category ID |
|
1067 | + * @return null |
|
1068 | + */ |
|
1069 | 1069 | private function _sync_dir_cat($cat_id) |
1070 | 1070 | { |
1071 | 1071 | $sql = 'SELECT COUNT(link_id) AS num_links |
@@ -1083,12 +1083,12 @@ discard block |
||
1083 | 1083 | } |
1084 | 1084 | |
1085 | 1085 | /** |
1086 | - * Update link data (note, vote, comment) |
|
1087 | - * |
|
1088 | - * @param int $start |
|
1089 | - * @param int $stop |
|
1090 | - * @return null |
|
1091 | - */ |
|
1086 | + * Update link data (note, vote, comment) |
|
1087 | + * |
|
1088 | + * @param int $start |
|
1089 | + * @param int $stop |
|
1090 | + * @return null |
|
1091 | + */ |
|
1092 | 1092 | private function _sync_dir_links($start, $stop) |
1093 | 1093 | { |
1094 | 1094 | $sql_ary = array( |
@@ -1131,12 +1131,12 @@ discard block |
||
1131 | 1131 | } |
1132 | 1132 | |
1133 | 1133 | /** |
1134 | - * Display icons drop-down list |
|
1135 | - * |
|
1136 | - * @param string $icons_path |
|
1137 | - * @param string $img_selected |
|
1138 | - * @return string |
|
1139 | - */ |
|
1134 | + * Display icons drop-down list |
|
1135 | + * |
|
1136 | + * @param string $icons_path |
|
1137 | + * @param string $img_selected |
|
1138 | + * @return string |
|
1139 | + */ |
|
1140 | 1140 | private function _get_dir_icon_list($icons_path, $img_selected) |
1141 | 1141 | { |
1142 | 1142 | $imglist = filelist($icons_path, ''); |
@@ -17,11 +17,11 @@ discard block |
||
17 | 17 | class ext extends \phpbb\extension\base |
18 | 18 | { |
19 | 19 | /** |
20 | - * Enable extension if requirements are met |
|
21 | - * |
|
22 | - * @return bool |
|
23 | - * @aceess public |
|
24 | - */ |
|
20 | + * Enable extension if requirements are met |
|
21 | + * |
|
22 | + * @return bool |
|
23 | + * @aceess public |
|
24 | + */ |
|
25 | 25 | public function is_enableable() |
26 | 26 | { |
27 | 27 | $php_ini = $this->container->get('php_ini'); |
@@ -42,11 +42,11 @@ discard block |
||
42 | 42 | } |
43 | 43 | |
44 | 44 | /** |
45 | - * Single enable step that installs any included migrations |
|
46 | - * |
|
47 | - * @param mixed $old_state State returned by previous call of this method |
|
48 | - * @return mixed Returns false after last step, otherwise temporary state |
|
49 | - */ |
|
45 | + * Single enable step that installs any included migrations |
|
46 | + * |
|
47 | + * @param mixed $old_state State returned by previous call of this method |
|
48 | + * @return mixed Returns false after last step, otherwise temporary state |
|
49 | + */ |
|
50 | 50 | public function enable_step($old_state) |
51 | 51 | { |
52 | 52 | switch ($old_state) |
@@ -80,11 +80,11 @@ discard block |
||
80 | 80 | } |
81 | 81 | |
82 | 82 | /** |
83 | - * Single disable step that does nothing |
|
84 | - * |
|
85 | - * @param mixed $old_state State returned by previous call of this method |
|
86 | - * @return mixed Returns false after last step, otherwise temporary state |
|
87 | - */ |
|
83 | + * Single disable step that does nothing |
|
84 | + * |
|
85 | + * @param mixed $old_state State returned by previous call of this method |
|
86 | + * @return mixed Returns false after last step, otherwise temporary state |
|
87 | + */ |
|
88 | 88 | public function disable_step($old_state) |
89 | 89 | { |
90 | 90 | switch ($old_state) |
@@ -112,11 +112,11 @@ discard block |
||
112 | 112 | } |
113 | 113 | |
114 | 114 | /** |
115 | - * Single purge step that reverts any included and installed migrations |
|
116 | - * |
|
117 | - * @param mixed $old_state State returned by previous call of this method |
|
118 | - * @return mixed Returns false after last step, otherwise temporary state |
|
119 | - */ |
|
115 | + * Single purge step that reverts any included and installed migrations |
|
116 | + * |
|
117 | + * @param mixed $old_state State returned by previous call of this method |
|
118 | + * @return mixed Returns false after last step, otherwise temporary state |
|
119 | + */ |
|
120 | 120 | public function purge_step($old_state) |
121 | 121 | { |
122 | 122 | switch ($old_state) |
@@ -144,16 +144,16 @@ discard block |
||
144 | 144 | } |
145 | 145 | |
146 | 146 | /** |
147 | - * Notification handler to call notification enable/disable/purge steps |
|
148 | - * |
|
149 | - * @author VSEphpbb (Matt Friedman) |
|
150 | - * @copyright (c) 2014 phpBB Limited <https://www.phpbb.com> |
|
151 | - * @license GNU General Public License, version 2 (GPL-2.0) |
|
152 | - * @param string $step The step (enable, disable, purge) |
|
153 | - * @param array $notification_types The notification type names |
|
154 | - * @return string Return notifications as temporary state |
|
155 | - * @access protected |
|
156 | - */ |
|
147 | + * Notification handler to call notification enable/disable/purge steps |
|
148 | + * |
|
149 | + * @author VSEphpbb (Matt Friedman) |
|
150 | + * @copyright (c) 2014 phpBB Limited <https://www.phpbb.com> |
|
151 | + * @license GNU General Public License, version 2 (GPL-2.0) |
|
152 | + * @param string $step The step (enable, disable, purge) |
|
153 | + * @param array $notification_types The notification type names |
|
154 | + * @return string Return notifications as temporary state |
|
155 | + * @access protected |
|
156 | + */ |
|
157 | 157 | protected function notification_handler($step, $notification_types) |
158 | 158 | { |
159 | 159 | $phpbb_notifications = $this->container->get('notification_manager'); |
@@ -57,23 +57,23 @@ discard block |
||
57 | 57 | protected $php_ext; |
58 | 58 | |
59 | 59 | /** |
60 | - * Constructor |
|
61 | - * |
|
62 | - * @param \phpbb\db\driver\driver_interface $db Database object |
|
63 | - * @param \phpbb\config\config $config Config object |
|
64 | - * @param \phpbb\language\language $language Language object |
|
65 | - * @param \phpbb\template\template $template Template object |
|
66 | - * @param \phpbb\user $user User object |
|
67 | - * @param \phpbb\controller\helper $helper Controller helper object |
|
68 | - * @param \phpbb\request\request $request Request object |
|
69 | - * @param \phpbb\auth\auth $auth Auth object |
|
70 | - * @param \phpbb\notification\manager $notification Notification object |
|
71 | - * @param \phpbb\filesystem\filesystem_interface $filesystem phpBB filesystem helper |
|
72 | - * @param \FastImageSize\FastImageSize $imagesize FastImageSize class |
|
73 | - * @param \phpbb\files\factory $files_factory File classes factory |
|
74 | - * @param string $root_path phpBB root path |
|
75 | - * @param string $php_ext phpEx |
|
76 | - */ |
|
60 | + * Constructor |
|
61 | + * |
|
62 | + * @param \phpbb\db\driver\driver_interface $db Database object |
|
63 | + * @param \phpbb\config\config $config Config object |
|
64 | + * @param \phpbb\language\language $language Language object |
|
65 | + * @param \phpbb\template\template $template Template object |
|
66 | + * @param \phpbb\user $user User object |
|
67 | + * @param \phpbb\controller\helper $helper Controller helper object |
|
68 | + * @param \phpbb\request\request $request Request object |
|
69 | + * @param \phpbb\auth\auth $auth Auth object |
|
70 | + * @param \phpbb\notification\manager $notification Notification object |
|
71 | + * @param \phpbb\filesystem\filesystem_interface $filesystem phpBB filesystem helper |
|
72 | + * @param \FastImageSize\FastImageSize $imagesize FastImageSize class |
|
73 | + * @param \phpbb\files\factory $files_factory File classes factory |
|
74 | + * @param string $root_path phpBB root path |
|
75 | + * @param string $php_ext phpEx |
|
76 | + */ |
|
77 | 77 | public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\config\config $config, \phpbb\language\language $language, \phpbb\template\template $template, \phpbb\user $user, \phpbb\controller\helper $helper, \phpbb\request\request $request, \phpbb\auth\auth $auth, \phpbb\notification\manager $notification, \phpbb\filesystem\filesystem_interface $filesystem, \FastImageSize\FastImageSize $imagesize, \phpbb\files\factory $files_factory, $root_path, $php_ext) |
78 | 78 | { |
79 | 79 | $this->db = $db; |
@@ -93,12 +93,12 @@ discard block |
||
93 | 93 | } |
94 | 94 | |
95 | 95 | /** |
96 | - * Add a link into db |
|
97 | - * |
|
98 | - * @param array $data Contains all data to insert in db |
|
99 | - * @param bool $need_approval Links needs to be approved? |
|
100 | - * @return null |
|
101 | - */ |
|
96 | + * Add a link into db |
|
97 | + * |
|
98 | + * @param array $data Contains all data to insert in db |
|
99 | + * @param bool $need_approval Links needs to be approved? |
|
100 | + * @return null |
|
101 | + */ |
|
102 | 102 | public function add($data, $need_approval) |
103 | 103 | { |
104 | 104 | $notification_data = array(); |
@@ -143,13 +143,13 @@ discard block |
||
143 | 143 | } |
144 | 144 | |
145 | 145 | /** |
146 | - * Edit a link of the db |
|
147 | - * |
|
148 | - * @param array $data Contains all data to edit in db |
|
149 | - * @param int $link_id is link's id, for WHERE clause |
|
150 | - * @param bool $need_approval Links needs to be approved? |
|
151 | - * @return null |
|
152 | - */ |
|
146 | + * Edit a link of the db |
|
147 | + * |
|
148 | + * @param array $data Contains all data to edit in db |
|
149 | + * @param int $link_id is link's id, for WHERE clause |
|
150 | + * @param bool $need_approval Links needs to be approved? |
|
151 | + * @return null |
|
152 | + */ |
|
153 | 153 | public function edit($data, $link_id, $need_approval) |
154 | 154 | { |
155 | 155 | $notification_data = array( |
@@ -201,12 +201,12 @@ discard block |
||
201 | 201 | } |
202 | 202 | |
203 | 203 | /** |
204 | - * Delete a link of the db |
|
205 | - * |
|
206 | - * @param int $cat_id The category ID |
|
207 | - * @param mixed $link_id Link's id, for WHERE clause |
|
208 | - * @return null |
|
209 | - */ |
|
204 | + * Delete a link of the db |
|
205 | + * |
|
206 | + * @param int $cat_id The category ID |
|
207 | + * @param mixed $link_id Link's id, for WHERE clause |
|
208 | + * @return null |
|
209 | + */ |
|
210 | 210 | public function del($cat_id, $link_id) |
211 | 211 | { |
212 | 212 | $this->db->sql_transaction('begin'); |
@@ -279,12 +279,12 @@ discard block |
||
279 | 279 | } |
280 | 280 | |
281 | 281 | /** |
282 | - * Increments link view counter |
|
283 | - * |
|
284 | - * @param int $link_id Link's id, for WHERE clause |
|
285 | - * @return null |
|
286 | - * @throws \phpbb\exception\http_exception |
|
287 | - */ |
|
282 | + * Increments link view counter |
|
283 | + * |
|
284 | + * @param int $link_id Link's id, for WHERE clause |
|
285 | + * @return null |
|
286 | + * @throws \phpbb\exception\http_exception |
|
287 | + */ |
|
288 | 288 | public function view($link_id) |
289 | 289 | { |
290 | 290 | $sql = 'SELECT link_id, link_url |
@@ -308,11 +308,11 @@ discard block |
||
308 | 308 | } |
309 | 309 | |
310 | 310 | /** |
311 | - * Verify that an URL exist before add into db |
|
312 | - * |
|
313 | - * @param string $url The URL to check |
|
314 | - * @return bool True if url is reachable, else false. |
|
315 | - */ |
|
311 | + * Verify that an URL exist before add into db |
|
312 | + * |
|
313 | + * @param string $url The URL to check |
|
314 | + * @return bool True if url is reachable, else false. |
|
315 | + */ |
|
316 | 316 | public function checkurl($url) |
317 | 317 | { |
318 | 318 | $details = parse_url($url); |
@@ -351,11 +351,11 @@ discard block |
||
351 | 351 | } |
352 | 352 | |
353 | 353 | /** |
354 | - * Delete the final '/', if no path |
|
355 | - * |
|
356 | - * @param string $url URL to clean |
|
357 | - * @return string $url The correct string. |
|
358 | - */ |
|
354 | + * Delete the final '/', if no path |
|
355 | + * |
|
356 | + * @param string $url URL to clean |
|
357 | + * @return string $url The correct string. |
|
358 | + */ |
|
359 | 359 | public function clean_url($url) |
360 | 360 | { |
361 | 361 | $details = parse_url($url); |
@@ -368,11 +368,11 @@ discard block |
||
368 | 368 | } |
369 | 369 | |
370 | 370 | /** |
371 | - * Display a flag |
|
372 | - * |
|
373 | - * @param array $data Link's data from db |
|
374 | - * @return string Flag path. |
|
375 | - */ |
|
371 | + * Display a flag |
|
372 | + * |
|
373 | + * @param array $data Link's data from db |
|
374 | + * @return string Flag path. |
|
375 | + */ |
|
376 | 376 | public function display_flag($data) |
377 | 377 | { |
378 | 378 | global $phpbb_extension_manager; |
@@ -390,13 +390,13 @@ discard block |
||
390 | 390 | } |
391 | 391 | |
392 | 392 | /** |
393 | - * Calculate the link's note |
|
394 | - * |
|
395 | - * @param int $total_note Sum of all link's notes |
|
396 | - * @param int $nb_vote Number of votes |
|
397 | - * @param bool $votes_status Votes are enable in this category? |
|
398 | - * @return string $note The calculated note. |
|
399 | - */ |
|
393 | + * Calculate the link's note |
|
394 | + * |
|
395 | + * @param int $total_note Sum of all link's notes |
|
396 | + * @param int $nb_vote Number of votes |
|
397 | + * @param bool $votes_status Votes are enable in this category? |
|
398 | + * @return string $note The calculated note. |
|
399 | + */ |
|
400 | 400 | public function display_note($total_note, $nb_vote, $votes_status) |
401 | 401 | { |
402 | 402 | if (!$votes_status) |
@@ -411,11 +411,11 @@ discard block |
||
411 | 411 | } |
412 | 412 | |
413 | 413 | /** |
414 | - * Display the vote form for auth users |
|
415 | - * |
|
416 | - * @param array $data Link's data from db |
|
417 | - * @return null|string Html combo list or nothing if votes are not available. |
|
418 | - */ |
|
414 | + * Display the vote form for auth users |
|
415 | + * |
|
416 | + * @param array $data Link's data from db |
|
417 | + * @return null|string Html combo list or nothing if votes are not available. |
|
418 | + */ |
|
419 | 419 | public function display_vote($data) |
420 | 420 | { |
421 | 421 | if ($this->user->data['is_registered'] && $this->auth->acl_get('u_vote_dir') && empty($data['vote_user_id'])) |
@@ -432,11 +432,11 @@ discard block |
||
432 | 432 | } |
433 | 433 | |
434 | 434 | /** |
435 | - * Display the RSS icon |
|
436 | - * |
|
437 | - * @param array $data Link's data from db |
|
438 | - * @return null|string RSS feed URL or nothing. |
|
439 | - */ |
|
435 | + * Display the RSS icon |
|
436 | + * |
|
437 | + * @param array $data Link's data from db |
|
438 | + * @return null|string RSS feed URL or nothing. |
|
439 | + */ |
|
440 | 440 | public function display_rss($data) |
441 | 441 | { |
442 | 442 | if ($this->config['dir_activ_rss'] && !empty($data['link_rss'])) |
@@ -446,13 +446,13 @@ discard block |
||
446 | 446 | } |
447 | 447 | |
448 | 448 | /** |
449 | - * Display link's thumb if thumb service enabled. |
|
450 | - * if thumb don't exists in db or if a new service was choosen in acp |
|
451 | - * thumb is research |
|
452 | - * |
|
453 | - * @param array $data Link's data from db |
|
454 | - * @return string|null Thumb or null. |
|
455 | - */ |
|
449 | + * Display link's thumb if thumb service enabled. |
|
450 | + * if thumb don't exists in db or if a new service was choosen in acp |
|
451 | + * thumb is research |
|
452 | + * |
|
453 | + * @param array $data Link's data from db |
|
454 | + * @return string|null Thumb or null. |
|
455 | + */ |
|
456 | 456 | public function display_thumb($data) |
457 | 457 | { |
458 | 458 | if ($this->config['dir_activ_thumb']) |
@@ -473,11 +473,11 @@ discard block |
||
473 | 473 | } |
474 | 474 | |
475 | 475 | /** |
476 | - * Display and resize a banner |
|
477 | - * |
|
478 | - * @param array $data link's data from db |
|
479 | - * @return string $s_banner html code. |
|
480 | - */ |
|
476 | + * Display and resize a banner |
|
477 | + * |
|
478 | + * @param array $data link's data from db |
|
479 | + * @return string $s_banner html code. |
|
480 | + */ |
|
481 | 481 | public function display_bann($data) |
482 | 482 | { |
483 | 483 | if (!empty($data['link_banner'])) |
@@ -515,11 +515,11 @@ discard block |
||
515 | 515 | } |
516 | 516 | |
517 | 517 | /** |
518 | - * Add a vote in db, for a specifi link |
|
519 | - * |
|
520 | - * @param int $link_id Link_id from db |
|
521 | - * @return null |
|
522 | - */ |
|
518 | + * Add a vote in db, for a specifi link |
|
519 | + * |
|
520 | + * @param int $link_id Link_id from db |
|
521 | + * @return null |
|
522 | + */ |
|
523 | 523 | public function add_vote($link_id) |
524 | 524 | { |
525 | 525 | $data = array( |
@@ -563,11 +563,11 @@ discard block |
||
563 | 563 | } |
564 | 564 | |
565 | 565 | /** |
566 | - * Search an appropriate thumb for url |
|
567 | - * |
|
568 | - * @param string $url Link's url |
|
569 | - * @return string The thumb url |
|
570 | - */ |
|
566 | + * Search an appropriate thumb for url |
|
567 | + * |
|
568 | + * @param string $url Link's url |
|
569 | + * @return string The thumb url |
|
570 | + */ |
|
571 | 571 | public function thumb_process($url) |
572 | 572 | { |
573 | 573 | if (!$this->config['dir_activ_thumb']) |
@@ -588,12 +588,12 @@ discard block |
||
588 | 588 | } |
589 | 589 | |
590 | 590 | /** |
591 | - * Check if ascreen thumb exists |
|
592 | - * |
|
593 | - * @param string $protocol The protocol |
|
594 | - * @param string $host The hostname |
|
595 | - * @return bool True if ascreen file exixts, else false |
|
596 | - */ |
|
591 | + * Check if ascreen thumb exists |
|
592 | + * |
|
593 | + * @param string $protocol The protocol |
|
594 | + * @param string $host The hostname |
|
595 | + * @return bool True if ascreen file exixts, else false |
|
596 | + */ |
|
597 | 597 | private function _ascreen_exist($protocol, $host) |
598 | 598 | { |
599 | 599 | if (($thumb_info = $this->imagesize->getImageSize($protocol.'://'.$host.'/ascreen.jpg')) !== false) |
@@ -608,12 +608,12 @@ discard block |
||
608 | 608 | } |
609 | 609 | |
610 | 610 | /** |
611 | - * Primary work on banner, can edit, copy or check a banner |
|
612 | - * |
|
613 | - * @param string $banner The banner's remote url |
|
614 | - * @param array $error The array error, passed by reference |
|
615 | - * @return null |
|
616 | - */ |
|
611 | + * Primary work on banner, can edit, copy or check a banner |
|
612 | + * |
|
613 | + * @param string $banner The banner's remote url |
|
614 | + * @param array $error The array error, passed by reference |
|
615 | + * @return null |
|
616 | + */ |
|
617 | 617 | public function banner_process(&$banner, &$error) |
618 | 618 | { |
619 | 619 | $old_banner = $this->request->variable('old_banner', ''); |
@@ -649,13 +649,13 @@ discard block |
||
649 | 649 | } |
650 | 650 | |
651 | 651 | /** |
652 | - * Copy a remonte banner to server. |
|
653 | - * called by banner_process() |
|
654 | - * |
|
655 | - * @param string $banner The banner's remote url |
|
656 | - * @param array $error The array error, passed by reference |
|
657 | - * @return false|string String if no errors, else false |
|
658 | - */ |
|
652 | + * Copy a remonte banner to server. |
|
653 | + * called by banner_process() |
|
654 | + * |
|
655 | + * @param string $banner The banner's remote url |
|
656 | + * @param array $error The array error, passed by reference |
|
657 | + * @return false|string String if no errors, else false |
|
658 | + */ |
|
659 | 659 | private function _banner_upload($banner, &$error) |
660 | 660 | { |
661 | 661 | /** @var \phpbb\files\upload $upload */ |
@@ -687,13 +687,13 @@ discard block |
||
687 | 687 | } |
688 | 688 | |
689 | 689 | /** |
690 | - * Check than remote banner exists |
|
691 | - * called by banner_process() |
|
692 | - * |
|
693 | - * @param string $banner The banner's remote url |
|
694 | - * @param array $error The array error, passed by reference |
|
695 | - * @return false|string String if no errors, else false |
|
696 | - */ |
|
690 | + * Check than remote banner exists |
|
691 | + * called by banner_process() |
|
692 | + * |
|
693 | + * @param string $banner The banner's remote url |
|
694 | + * @param array $error The array error, passed by reference |
|
695 | + * @return false|string String if no errors, else false |
|
696 | + */ |
|
697 | 697 | private function _banner_remote($banner, &$error) |
698 | 698 | { |
699 | 699 | if (!preg_match('#^(http|https|ftp)://#i', $banner)) |
@@ -801,11 +801,11 @@ discard block |
||
801 | 801 | } |
802 | 802 | |
803 | 803 | /** |
804 | - * Delete a banner from server |
|
805 | - * |
|
806 | - * @param string $file The file's name |
|
807 | - * @return bool True if delete success, else false |
|
808 | - */ |
|
804 | + * Delete a banner from server |
|
805 | + * |
|
806 | + * @param string $file The file's name |
|
807 | + * @return bool True if delete success, else false |
|
808 | + */ |
|
809 | 809 | private function _banner_delete($file) |
810 | 810 | { |
811 | 811 | if (file_exists($this->get_banner_path($file))) |
@@ -818,12 +818,12 @@ discard block |
||
818 | 818 | } |
819 | 819 | |
820 | 820 | /** |
821 | - * List flags |
|
822 | - * |
|
823 | - * @param string $flag_path The flag directory path |
|
824 | - * @param string $value Selected flag |
|
825 | - * @return string $list Html code |
|
826 | - */ |
|
821 | + * List flags |
|
822 | + * |
|
823 | + * @param string $flag_path The flag directory path |
|
824 | + * @param string $value Selected flag |
|
825 | + * @return string $list Html code |
|
826 | + */ |
|
827 | 827 | public function get_dir_flag_list($flag_path, $value) |
828 | 828 | { |
829 | 829 | $list = ''; |
@@ -858,10 +858,10 @@ discard block |
||
858 | 858 | } |
859 | 859 | |
860 | 860 | /** |
861 | - * Display recents links added |
|
862 | - * |
|
863 | - * @return null |
|
864 | - */ |
|
861 | + * Display recents links added |
|
862 | + * |
|
863 | + * @return null |
|
864 | + */ |
|
865 | 865 | public function recents() |
866 | 866 | { |
867 | 867 | if ($this->config['dir_recent_block']) |
@@ -938,13 +938,13 @@ discard block |
||
938 | 938 | } |
939 | 939 | |
940 | 940 | /** |
941 | - * Validate back link |
|
942 | - * |
|
943 | - * @param string $remote_url Page URL contains the backlink |
|
944 | - * @param bool $optional Link back is optional in this category? |
|
945 | - * @param bool $cron This methos is called by con process? |
|
946 | - * @return false|string Either false if validation succeeded or a string which will be used as the error message (with the variable name appended) |
|
947 | - */ |
|
941 | + * Validate back link |
|
942 | + * |
|
943 | + * @param string $remote_url Page URL contains the backlink |
|
944 | + * @param bool $optional Link back is optional in this category? |
|
945 | + * @param bool $cron This methos is called by con process? |
|
946 | + * @return false|string Either false if validation succeeded or a string which will be used as the error message (with the variable name appended) |
|
947 | + */ |
|
948 | 948 | public function validate_link_back($remote_url, $optional, $cron = false) |
949 | 949 | { |
950 | 950 | if (!$cron) |
@@ -26,12 +26,12 @@ discard block |
||
26 | 26 | protected $categories_table; |
27 | 27 | |
28 | 28 | /** |
29 | - * Constructor |
|
30 | - * |
|
31 | - * @param \phpbb\db\driver\driver_interface $db Database connection |
|
32 | - * @param string $categories_table Table name |
|
33 | - * @access public |
|
34 | - */ |
|
29 | + * Constructor |
|
30 | + * |
|
31 | + * @param \phpbb\db\driver\driver_interface $db Database connection |
|
32 | + * @param string $categories_table Table name |
|
33 | + * @access public |
|
34 | + */ |
|
35 | 35 | public function __construct(\phpbb\db\driver\driver_interface $db, $categories_table) |
36 | 36 | { |
37 | 37 | $this->db = $db; |
@@ -39,10 +39,10 @@ discard block |
||
39 | 39 | } |
40 | 40 | |
41 | 41 | /** |
42 | - * {@inheritdoc} |
|
43 | - * |
|
44 | - * @api |
|
45 | - */ |
|
42 | + * {@inheritdoc} |
|
43 | + * |
|
44 | + * @api |
|
45 | + */ |
|
46 | 46 | public function load($resource, $type = null) |
47 | 47 | { |
48 | 48 | $routes = new RouteCollection(); |
@@ -78,10 +78,10 @@ discard block |
||
78 | 78 | } |
79 | 79 | |
80 | 80 | /** |
81 | - * {@inheritdoc} |
|
82 | - * |
|
83 | - * @api |
|
84 | - */ |
|
81 | + * {@inheritdoc} |
|
82 | + * |
|
83 | + * @api |
|
84 | + */ |
|
85 | 85 | public function supports($resource, $type = null) |
86 | 86 | { |
87 | 87 | return $type === 'ernadoo_phpbbdirectory_route'; |
@@ -20,8 +20,8 @@ discard block |
||
20 | 20 | } |
21 | 21 | |
22 | 22 | /** |
23 | - * @inheritDoc |
|
24 | - */ |
|
23 | + * @inheritDoc |
|
24 | + */ |
|
25 | 25 | public function update_schema() |
26 | 26 | { |
27 | 27 | return array( |
@@ -34,8 +34,8 @@ discard block |
||
34 | 34 | } |
35 | 35 | |
36 | 36 | /** |
37 | - * @inheritDoc |
|
38 | - */ |
|
37 | + * @inheritDoc |
|
38 | + */ |
|
39 | 39 | public function update_data() |
40 | 40 | { |
41 | 41 | return array( |
@@ -44,8 +44,8 @@ discard block |
||
44 | 44 | } |
45 | 45 | |
46 | 46 | /** |
47 | - * @inheritDoc |
|
48 | - */ |
|
47 | + * @inheritDoc |
|
48 | + */ |
|
49 | 49 | public function revert_schema() |
50 | 50 | { |
51 | 51 | return array( |
@@ -34,10 +34,10 @@ |
||
34 | 34 | protected $user; |
35 | 35 | |
36 | 36 | /** |
37 | - * Define the extensions to be tested |
|
38 | - * |
|
39 | - * @return array vendor/name of extension(s) to test |
|
40 | - */ |
|
37 | + * Define the extensions to be tested |
|
38 | + * |
|
39 | + * @return array vendor/name of extension(s) to test |
|
40 | + */ |
|
41 | 41 | static protected function setup_extensions() |
42 | 42 | { |
43 | 43 | return array('ernadoo/phpbbdirectory'); |
@@ -22,8 +22,8 @@ discard block |
||
22 | 22 | } |
23 | 23 | |
24 | 24 | /** |
25 | - * Setup test environment |
|
26 | - */ |
|
25 | + * Setup test environment |
|
26 | + */ |
|
27 | 27 | public function setUp() |
28 | 28 | { |
29 | 29 | parent::setUp(); |
@@ -61,10 +61,10 @@ discard block |
||
61 | 61 | } |
62 | 62 | |
63 | 63 | /** |
64 | - * Test data for the test_display_base() function |
|
65 | - * |
|
66 | - * @return array Array of test data |
|
67 | - */ |
|
64 | + * Test data for the test_display_base() function |
|
65 | + * |
|
66 | + * @return array Array of test data |
|
67 | + */ |
|
68 | 68 | public function display_base_data() |
69 | 69 | { |
70 | 70 | return array( |
@@ -73,10 +73,10 @@ discard block |
||
73 | 73 | } |
74 | 74 | |
75 | 75 | /** |
76 | - * Test controller display |
|
77 | - * |
|
78 | - * @dataProvider display_base_data |
|
79 | - */ |
|
76 | + * Test controller display |
|
77 | + * |
|
78 | + * @dataProvider display_base_data |
|
79 | + */ |
|
80 | 80 | public function test_display_base($status_code, $page_content) |
81 | 81 | { |
82 | 82 | $controller = $this->get_controller(); |
@@ -87,9 +87,9 @@ discard block |
||
87 | 87 | } |
88 | 88 | |
89 | 89 | /** |
90 | - * Test base case scenario |
|
91 | - * |
|
92 | - */ |
|
90 | + * Test base case scenario |
|
91 | + * |
|
92 | + */ |
|
93 | 93 | public function test_for_root_categories() |
94 | 94 | { |
95 | 95 | $this->template->expects($this->exactly(2)) |