@@ -144,7 +144,7 @@ |
||
144 | 144 | * @copyright (c) 2014 phpBB Limited <https://www.phpbb.com> |
145 | 145 | * @license GNU General Public License, version 2 (GPL-2.0) |
146 | 146 | * @param string $step The step (enable, disable, purge) |
147 | - * @param array $notification_types The notification type names |
|
147 | + * @param string[] $notification_types The notification type names |
|
148 | 148 | * @return string Return notifications as temporary state |
149 | 149 | * @access protected |
150 | 150 | */ |
@@ -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 | $config = $this->container->get('config'); |
@@ -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) |
@@ -74,11 +74,11 @@ discard block |
||
74 | 74 | } |
75 | 75 | |
76 | 76 | /** |
77 | - * Single disable step that does nothing |
|
78 | - * |
|
79 | - * @param mixed $old_state State returned by previous call of this method |
|
80 | - * @return mixed Returns false after last step, otherwise temporary state |
|
81 | - */ |
|
77 | + * Single disable step that does nothing |
|
78 | + * |
|
79 | + * @param mixed $old_state State returned by previous call of this method |
|
80 | + * @return mixed Returns false after last step, otherwise temporary state |
|
81 | + */ |
|
82 | 82 | public function disable_step($old_state) |
83 | 83 | { |
84 | 84 | switch ($old_state) |
@@ -106,11 +106,11 @@ discard block |
||
106 | 106 | } |
107 | 107 | |
108 | 108 | /** |
109 | - * Single purge step that reverts any included and installed migrations |
|
110 | - * |
|
111 | - * @param mixed $old_state State returned by previous call of this method |
|
112 | - * @return mixed Returns false after last step, otherwise temporary state |
|
113 | - */ |
|
109 | + * Single purge step that reverts any included and installed migrations |
|
110 | + * |
|
111 | + * @param mixed $old_state State returned by previous call of this method |
|
112 | + * @return mixed Returns false after last step, otherwise temporary state |
|
113 | + */ |
|
114 | 114 | public function purge_step($old_state) |
115 | 115 | { |
116 | 116 | switch ($old_state) |
@@ -138,16 +138,16 @@ discard block |
||
138 | 138 | } |
139 | 139 | |
140 | 140 | /** |
141 | - * Notification handler to call notification enable/disable/purge steps |
|
142 | - * |
|
143 | - * @author VSEphpbb (Matt Friedman) |
|
144 | - * @copyright (c) 2014 phpBB Limited <https://www.phpbb.com> |
|
145 | - * @license GNU General Public License, version 2 (GPL-2.0) |
|
146 | - * @param string $step The step (enable, disable, purge) |
|
147 | - * @param array $notification_types The notification type names |
|
148 | - * @return string Return notifications as temporary state |
|
149 | - * @access protected |
|
150 | - */ |
|
141 | + * Notification handler to call notification enable/disable/purge steps |
|
142 | + * |
|
143 | + * @author VSEphpbb (Matt Friedman) |
|
144 | + * @copyright (c) 2014 phpBB Limited <https://www.phpbb.com> |
|
145 | + * @license GNU General Public License, version 2 (GPL-2.0) |
|
146 | + * @param string $step The step (enable, disable, purge) |
|
147 | + * @param array $notification_types The notification type names |
|
148 | + * @return string Return notifications as temporary state |
|
149 | + * @access protected |
|
150 | + */ |
|
151 | 151 | protected function notification_handler($step, $notification_types) |
152 | 152 | { |
153 | 153 | $phpbb_notifications = $this->container->get('notification_manager'); |
@@ -18,11 +18,11 @@ |
||
18 | 18 | 'filename' => '\ernadoo\phpbbdirectory\acp\phpbbdirectory_module', |
19 | 19 | 'title' => 'ACP_DIRECTORY', |
20 | 20 | 'modes' => array( |
21 | - '' => array('title' => 'ACP_DIRECTORY', 'auth' => 'ext_ernadoo/phpbbdirectory', 'cat' => array('')), |
|
22 | - 'main' => array('title' => 'ACP_DIRECTORY_MAIN', 'auth' => 'ext_ernadoo/phpbbdirectory', 'cat' => array('ACP_DIRECTORY')), |
|
23 | - 'settings' => array('title' => 'ACP_DIRECTORY_SETTINGS', 'auth' => 'ext_ernadoo/phpbbdirectory', 'cat' => array('ACP_DIRECTORY')), |
|
24 | - 'cat' => array('title' => 'ACP_DIRECTORY_CATS', 'auth' => 'ext_ernadoo/phpbbdirectory', 'cat' => array('ACP_DIRECTORY')), |
|
25 | - 'val' => array('title' => 'ACP_DIRECTORY_VAL', 'auth' => 'ext_ernadoo/phpbbdirectory', 'cat' => array('ACP_DIRECTORY')), |
|
21 | + '' => array('title' => 'ACP_DIRECTORY', 'auth' => 'ext_ernadoo/phpbbdirectory', 'cat' => array('')), |
|
22 | + 'main' => array('title' => 'ACP_DIRECTORY_MAIN', 'auth' => 'ext_ernadoo/phpbbdirectory', 'cat' => array('ACP_DIRECTORY')), |
|
23 | + 'settings' => array('title' => 'ACP_DIRECTORY_SETTINGS', 'auth' => 'ext_ernadoo/phpbbdirectory', 'cat' => array('ACP_DIRECTORY')), |
|
24 | + 'cat' => array('title' => 'ACP_DIRECTORY_CATS', 'auth' => 'ext_ernadoo/phpbbdirectory', 'cat' => array('ACP_DIRECTORY')), |
|
25 | + 'val' => array('title' => 'ACP_DIRECTORY_VAL', 'auth' => 'ext_ernadoo/phpbbdirectory', 'cat' => array('ACP_DIRECTORY')), |
|
26 | 26 | ), |
27 | 27 | ); |
28 | 28 | } |
@@ -15,10 +15,10 @@ discard block |
||
15 | 15 | public $u_action; |
16 | 16 | |
17 | 17 | /** |
18 | - * |
|
19 | - * @param int $id |
|
20 | - * @param string $mode |
|
21 | - */ |
|
18 | + * |
|
19 | + * @param int $id |
|
20 | + * @param string $mode |
|
21 | + */ |
|
22 | 22 | public function main($id, $mode) |
23 | 23 | { |
24 | 24 | global $request, $phpbb_container; |
@@ -183,11 +183,11 @@ discard block |
||
183 | 183 | } |
184 | 184 | |
185 | 185 | /** |
186 | - * Display thumb services available |
|
187 | - * |
|
188 | - * @param string $url_selected |
|
189 | - * @return string |
|
190 | - */ |
|
186 | + * Display thumb services available |
|
187 | + * |
|
188 | + * @param string $url_selected |
|
189 | + * @return string |
|
190 | + */ |
|
191 | 191 | public function get_thumb_service_list($url_selected) |
192 | 192 | { |
193 | 193 | $thumbshot = array( |
@@ -207,11 +207,11 @@ discard block |
||
207 | 207 | } |
208 | 208 | |
209 | 209 | /** |
210 | - * Display order drop-down list |
|
211 | - * |
|
212 | - * @param string $order_selected |
|
213 | - * @return string |
|
214 | - */ |
|
210 | + * Display order drop-down list |
|
211 | + * |
|
212 | + * @param string $order_selected |
|
213 | + * @return string |
|
214 | + */ |
|
215 | 215 | public function get_order_list($order_selected) |
216 | 216 | { |
217 | 217 | global $user; |
@@ -86,24 +86,24 @@ discard block |
||
86 | 86 | */ |
87 | 87 | 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\helper $dir_helper, \ernadoo\phpbbdirectory\core\nestedset_category $nestedset_category) |
88 | 88 | { |
89 | - $this->cache = $cache; |
|
90 | - $this->db = $db; |
|
91 | - $this->helper = $helper; |
|
89 | + $this->cache = $cache; |
|
90 | + $this->db = $db; |
|
91 | + $this->helper = $helper; |
|
92 | 92 | $this->language = $language; |
93 | 93 | $this->phpbb_log = $log; |
94 | - $this->request = $request; |
|
94 | + $this->request = $request; |
|
95 | 95 | $this->template = $template; |
96 | - $this->user = $user; |
|
96 | + $this->user = $user; |
|
97 | 97 | $this->categorie = $categorie; |
98 | - $this->dir_helper = $dir_helper; |
|
99 | - $this->nestedset_category = $nestedset_category; |
|
98 | + $this->dir_helper = $dir_helper; |
|
99 | + $this->nestedset_category = $nestedset_category; |
|
100 | 100 | |
101 | 101 | $this->form_key = 'acp_dir_cat'; |
102 | 102 | add_form_key($this->form_key); |
103 | 103 | |
104 | 104 | $this->action = $this->request->variable('action', ''); |
105 | 105 | $this->cat_id = $request->variable('c', 0); |
106 | - $this->parent_id = $request->variable('parent_id', 0); |
|
106 | + $this->parent_id = $request->variable('parent_id', 0); |
|
107 | 107 | $this->update = ($this->request->is_set_post('update')) ? true : false; |
108 | 108 | } |
109 | 109 | |
@@ -538,10 +538,10 @@ discard block |
||
538 | 538 | switch ($this->action) |
539 | 539 | { |
540 | 540 | case 'delete': |
541 | - $action_subcats = $this->request->variable('action_subcats', ''); |
|
542 | - $subcats_to_id = $this->request->variable('subcats_to_id', 0); |
|
543 | - $action_links = $this->request->variable('action_links', ''); |
|
544 | - $links_to_id = $this->request->variable('links_to_id', 0); |
|
541 | + $action_subcats = $this->request->variable('action_subcats', ''); |
|
542 | + $subcats_to_id = $this->request->variable('subcats_to_id', 0); |
|
543 | + $action_links = $this->request->variable('action_links', ''); |
|
544 | + $links_to_id = $this->request->variable('links_to_id', 0); |
|
545 | 545 | |
546 | 546 | try |
547 | 547 | { |
@@ -765,7 +765,7 @@ discard block |
||
765 | 765 | { |
766 | 766 | if ($cat_data_sql['cat_cron_enable']) |
767 | 767 | { |
768 | - $cat_data_sql['cat_cron_next'] = time() + $cat_data_sql['cat_cron_freq']*86400; |
|
768 | + $cat_data_sql['cat_cron_next'] = time() + $cat_data_sql['cat_cron_freq'] * 86400; |
|
769 | 769 | } |
770 | 770 | |
771 | 771 | $this->cat_data = $this->nestedset_category->insert($cat_data_sql); |
@@ -788,7 +788,7 @@ discard block |
||
788 | 788 | |
789 | 789 | if ($cat_data_sql['cat_cron_enable'] && ($row['cat_cron_freq'] != $cat_data_sql['cat_cron_freq'] || !$row['cat_cron_enable'])) |
790 | 790 | { |
791 | - $cat_data_sql['cat_cron_next'] = time() + $cat_data_sql['cat_cron_freq']*86400; |
|
791 | + $cat_data_sql['cat_cron_next'] = time() + $cat_data_sql['cat_cron_freq'] * 86400; |
|
792 | 792 | } |
793 | 793 | |
794 | 794 | if ($row['cat_name'] != $cat_data_sql['cat_name']) |
@@ -67,19 +67,19 @@ discard block |
||
67 | 67 | private $update; |
68 | 68 | |
69 | 69 | /** |
70 | - * Constructor |
|
71 | - * |
|
72 | - * @param \phpbb\cache\service $cache Cache object |
|
73 | - * @param \phpbb\db\driver\driver_interface $db Database object |
|
74 | - * @param \phpbb\controller\helper $helper Helper object |
|
75 | - * @param \phpbb\log\log $log Log object |
|
76 | - * @param \phpbb\request\request $request Request object |
|
77 | - * @param \phpbb\template\template $template Template object |
|
78 | - * @param \phpbb\user $user User object |
|
79 | - * @param \ernadoo\phpbbdirectory\core\categorie $categorie PhpBB Directory extension categorie object |
|
80 | - * @param \ernadoo\phpbbdirectory\core\helper $dir_helper PhpBB Directory extension helper object |
|
81 | - * @param \ernadoo\phpbbdirectory\core\nestedset_category $nestedset_category PhpBB Directory extension nestedset object |
|
82 | - */ |
|
70 | + * Constructor |
|
71 | + * |
|
72 | + * @param \phpbb\cache\service $cache Cache object |
|
73 | + * @param \phpbb\db\driver\driver_interface $db Database object |
|
74 | + * @param \phpbb\controller\helper $helper Helper object |
|
75 | + * @param \phpbb\log\log $log Log object |
|
76 | + * @param \phpbb\request\request $request Request object |
|
77 | + * @param \phpbb\template\template $template Template object |
|
78 | + * @param \phpbb\user $user User object |
|
79 | + * @param \ernadoo\phpbbdirectory\core\categorie $categorie PhpBB Directory extension categorie object |
|
80 | + * @param \ernadoo\phpbbdirectory\core\helper $dir_helper PhpBB Directory extension helper object |
|
81 | + * @param \ernadoo\phpbbdirectory\core\nestedset_category $nestedset_category PhpBB Directory extension nestedset object |
|
82 | + */ |
|
83 | 83 | public function __construct(\phpbb\cache\service $cache, \phpbb\db\driver\driver_interface $db, \phpbb\controller\helper $helper, \phpbb\log\log $log, \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\nestedset_category $nestedset_category) |
84 | 84 | { |
85 | 85 | $this->cache = $cache; |
@@ -103,10 +103,10 @@ discard block |
||
103 | 103 | } |
104 | 104 | |
105 | 105 | /** |
106 | - * Initialize defaults data for add page |
|
107 | - * |
|
108 | - * @return null |
|
109 | - */ |
|
106 | + * Initialize defaults data for add page |
|
107 | + * |
|
108 | + * @return null |
|
109 | + */ |
|
110 | 110 | public function action_add() |
111 | 111 | { |
112 | 112 | $this->cat_id = $this->parent_id; |
@@ -140,10 +140,10 @@ discard block |
||
140 | 140 | } |
141 | 141 | |
142 | 142 | /** |
143 | - * Display deleting page |
|
144 | - * |
|
145 | - * @return null |
|
146 | - */ |
|
143 | + * Display deleting page |
|
144 | + * |
|
145 | + * @return null |
|
146 | + */ |
|
147 | 147 | public function action_delete() |
148 | 148 | { |
149 | 149 | if (!$this->cat_id) |
@@ -194,10 +194,10 @@ discard block |
||
194 | 194 | } |
195 | 195 | |
196 | 196 | /** |
197 | - * Initialize data for edit page |
|
198 | - * |
|
199 | - * @return null |
|
200 | - */ |
|
197 | + * Initialize data for edit page |
|
198 | + * |
|
199 | + * @return null |
|
200 | + */ |
|
201 | 201 | public function action_edit() |
202 | 202 | { |
203 | 203 | $row = $this->_get_cat_info($this->cat_id); |
@@ -224,10 +224,10 @@ discard block |
||
224 | 224 | } |
225 | 225 | |
226 | 226 | /** |
227 | - * Move order categories |
|
228 | - * |
|
229 | - * @return null |
|
230 | - */ |
|
227 | + * Move order categories |
|
228 | + * |
|
229 | + * @return null |
|
230 | + */ |
|
231 | 231 | public function action_move() |
232 | 232 | { |
233 | 233 | if (!$this->cat_id) |
@@ -270,10 +270,10 @@ discard block |
||
270 | 270 | } |
271 | 271 | |
272 | 272 | /** |
273 | - * Display progress bar for syncinc categories |
|
274 | - * |
|
275 | - * @return null |
|
276 | - */ |
|
273 | + * Display progress bar for syncinc categories |
|
274 | + * |
|
275 | + * @return null |
|
276 | + */ |
|
277 | 277 | public function action_progress_bar() |
278 | 278 | { |
279 | 279 | $start = $this->request->variable('start', 0); |
@@ -294,10 +294,10 @@ discard block |
||
294 | 294 | } |
295 | 295 | |
296 | 296 | /** |
297 | - * Get link's ID interval for _sync_dir_links() |
|
298 | - * |
|
299 | - * @return null |
|
300 | - */ |
|
297 | + * Get link's ID interval for _sync_dir_links() |
|
298 | + * |
|
299 | + * @return null |
|
300 | + */ |
|
301 | 301 | public function action_sync() |
302 | 302 | { |
303 | 303 | if (!$this->cat_id) |
@@ -381,10 +381,10 @@ discard block |
||
381 | 381 | } |
382 | 382 | |
383 | 383 | /** |
384 | - * Sync category data |
|
385 | - * |
|
386 | - * @return null |
|
387 | - */ |
|
384 | + * Sync category data |
|
385 | + * |
|
386 | + * @return null |
|
387 | + */ |
|
388 | 388 | public function action_sync_cat() |
389 | 389 | { |
390 | 390 | $sql = 'SELECT cat_name |
@@ -408,10 +408,10 @@ discard block |
||
408 | 408 | } |
409 | 409 | |
410 | 410 | /** |
411 | - * Display categories page |
|
412 | - * |
|
413 | - * @return null |
|
414 | - */ |
|
411 | + * Display categories page |
|
412 | + * |
|
413 | + * @return null |
|
414 | + */ |
|
415 | 415 | public function display_cats() |
416 | 416 | { |
417 | 417 | // 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)) |
@@ -615,11 +615,11 @@ discard block |
||
615 | 615 | } |
616 | 616 | |
617 | 617 | /** |
618 | - * Display form |
|
619 | - * |
|
620 | - * @param string $parents_list Drop-down list |
|
621 | - * @return null |
|
622 | - */ |
|
618 | + * Display form |
|
619 | + * |
|
620 | + * @param string $parents_list Drop-down list |
|
621 | + * @return null |
|
622 | + */ |
|
623 | 623 | private function _display_cat_form($parents_list) |
624 | 624 | { |
625 | 625 | $dir_cat_desc_data = array( |
@@ -689,11 +689,11 @@ discard block |
||
689 | 689 | } |
690 | 690 | |
691 | 691 | /** |
692 | - * Get category details |
|
693 | - * |
|
694 | - * @param int $cat_id The category ID |
|
695 | - * @return array |
|
696 | - */ |
|
692 | + * Get category details |
|
693 | + * |
|
694 | + * @param int $cat_id The category ID |
|
695 | + * @return array |
|
696 | + */ |
|
697 | 697 | private function _get_cat_info($cat_id) |
698 | 698 | { |
699 | 699 | $sql = 'SELECT cat_id, parent_id, right_id, left_id, cat_desc, cat_desc_uid, cat_desc_options, cat_icon, cat_name, 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 |
@@ -712,10 +712,10 @@ discard block |
||
712 | 712 | } |
713 | 713 | |
714 | 714 | /** |
715 | - * Update category data |
|
716 | - * |
|
717 | - * @return array |
|
718 | - */ |
|
715 | + * Update category data |
|
716 | + * |
|
717 | + * @return array |
|
718 | + */ |
|
719 | 719 | private function _update_cat_data() |
720 | 720 | { |
721 | 721 | if (!$this->cat_data['cat_name']) |
@@ -809,14 +809,14 @@ discard block |
||
809 | 809 | } |
810 | 810 | |
811 | 811 | /** |
812 | - * Remove complete category |
|
813 | - * |
|
814 | - * @param string $action_links Action for categories links |
|
815 | - * @param string $action_subcats Action for sub-categories |
|
816 | - * @param int $links_to_id New category ID for links |
|
817 | - * @param int $subcats_to_id New category ID for sub-categories |
|
818 | - * @return array |
|
819 | - */ |
|
812 | + * Remove complete category |
|
813 | + * |
|
814 | + * @param string $action_links Action for categories links |
|
815 | + * @param string $action_subcats Action for sub-categories |
|
816 | + * @param int $links_to_id New category ID for links |
|
817 | + * @param int $subcats_to_id New category ID for sub-categories |
|
818 | + * @return array |
|
819 | + */ |
|
820 | 820 | private function _delete_cat($action_links = 'delete', $action_subcats = 'delete', $links_to_id = 0, $subcats_to_id = 0) |
821 | 821 | { |
822 | 822 | $this->cat_data = $this->_get_cat_info($this->cat_id); |
@@ -933,12 +933,12 @@ discard block |
||
933 | 933 | } |
934 | 934 | |
935 | 935 | /** |
936 | - * Move category content from one to another forum |
|
937 | - * |
|
938 | - * @param int $from_id |
|
939 | - * @param int $to_id |
|
940 | - * @return null |
|
941 | - */ |
|
936 | + * Move category content from one to another forum |
|
937 | + * |
|
938 | + * @param int $from_id |
|
939 | + * @param int $to_id |
|
940 | + * @return null |
|
941 | + */ |
|
942 | 942 | private function _move_cat_content($from_id, $to_id) |
943 | 943 | { |
944 | 944 | $sql = 'UPDATE ' . DIR_LINK_TABLE . ' |
@@ -954,10 +954,10 @@ discard block |
||
954 | 954 | } |
955 | 955 | |
956 | 956 | /** |
957 | - * Delete category content |
|
958 | - * |
|
959 | - * @return array |
|
960 | - */ |
|
957 | + * Delete category content |
|
958 | + * |
|
959 | + * @return array |
|
960 | + */ |
|
961 | 961 | private function _delete_cat_content() |
962 | 962 | { |
963 | 963 | $this->db->sql_transaction('begin'); |
@@ -1016,11 +1016,11 @@ discard block |
||
1016 | 1016 | } |
1017 | 1017 | |
1018 | 1018 | /** |
1019 | - * Update links counter |
|
1020 | - * |
|
1021 | - * @param int $cat_id The category ID |
|
1022 | - * @return null |
|
1023 | - */ |
|
1019 | + * Update links counter |
|
1020 | + * |
|
1021 | + * @param int $cat_id The category ID |
|
1022 | + * @return null |
|
1023 | + */ |
|
1024 | 1024 | private function _sync_dir_cat($cat_id) |
1025 | 1025 | { |
1026 | 1026 | $sql = 'SELECT COUNT(link_id) AS num_links |
@@ -1038,12 +1038,12 @@ discard block |
||
1038 | 1038 | } |
1039 | 1039 | |
1040 | 1040 | /** |
1041 | - * Update link data (note, vote, comment) |
|
1042 | - * |
|
1043 | - * @param int $start |
|
1044 | - * @param int $stop |
|
1045 | - * @return null |
|
1046 | - */ |
|
1041 | + * Update link data (note, vote, comment) |
|
1042 | + * |
|
1043 | + * @param int $start |
|
1044 | + * @param int $stop |
|
1045 | + * @return null |
|
1046 | + */ |
|
1047 | 1047 | private function _sync_dir_links($start, $stop) |
1048 | 1048 | { |
1049 | 1049 | $sql_ary = array( |
@@ -1086,12 +1086,12 @@ discard block |
||
1086 | 1086 | } |
1087 | 1087 | |
1088 | 1088 | /** |
1089 | - * Display icons drop-down list |
|
1090 | - * |
|
1091 | - * @param string $icons_path |
|
1092 | - * @param string $img_selected |
|
1093 | - * @return string |
|
1094 | - */ |
|
1089 | + * Display icons drop-down list |
|
1090 | + * |
|
1091 | + * @param string $icons_path |
|
1092 | + * @param string $img_selected |
|
1093 | + * @return string |
|
1094 | + */ |
|
1095 | 1095 | private function _get_dir_icon_list($icons_path, $img_selected) |
1096 | 1096 | { |
1097 | 1097 | $imglist = filelist($icons_path, ''); |
@@ -22,11 +22,11 @@ discard block |
||
22 | 22 | private $ext_name = 'ernadoo/phpbbdirectory'; |
23 | 23 | |
24 | 24 | /** |
25 | - * Constructor |
|
26 | - * |
|
27 | - * @param \phpbb\extension\manager $phpbb_extension_manager Extension manager helper |
|
28 | - * @param \phpbb\path_helper $path_helper Controller path helper object |
|
29 | - */ |
|
25 | + * Constructor |
|
26 | + * |
|
27 | + * @param \phpbb\extension\manager $phpbb_extension_manager Extension manager helper |
|
28 | + * @param \phpbb\path_helper $path_helper Controller path helper object |
|
29 | + */ |
|
30 | 30 | public function __construct(\phpbb\extension\manager $phpbb_extension_manager, \phpbb\path_helper $path_helper) |
31 | 31 | { |
32 | 32 | $this->extension_manager = $phpbb_extension_manager; |
@@ -34,48 +34,48 @@ discard block |
||
34 | 34 | } |
35 | 35 | |
36 | 36 | /** |
37 | - * Return ext name |
|
38 | - * |
|
39 | - * @param bool $web_root_path Whether the path should be relative to web root |
|
40 | - * @return string Path to an extension |
|
41 | - */ |
|
37 | + * Return ext name |
|
38 | + * |
|
39 | + * @param bool $web_root_path Whether the path should be relative to web root |
|
40 | + * @return string Path to an extension |
|
41 | + */ |
|
42 | 42 | public function get_ext_name($web_root_path = false) |
43 | 43 | { |
44 | 44 | return (($web_root_path) ? $this->path_helper->get_web_root_path() : '') . $this->extension_manager->get_extension_path($this->ext_name); |
45 | 45 | } |
46 | 46 | |
47 | 47 | /** |
48 | - * Return path to resource image |
|
49 | - * |
|
50 | - * @param string $type is ressource type (flags|icons) |
|
51 | - * @param string $image is the resource to display |
|
52 | - * @return string The relative path to ressource |
|
53 | - */ |
|
48 | + * Return path to resource image |
|
49 | + * |
|
50 | + * @param string $type is ressource type (flags|icons) |
|
51 | + * @param string $image is the resource to display |
|
52 | + * @return string The relative path to ressource |
|
53 | + */ |
|
54 | 54 | public function get_img_path($type, $image = '') |
55 | 55 | { |
56 | 56 | return $this->get_ext_name(true) . 'images/' . $type . '/' . $image; |
57 | 57 | } |
58 | 58 | |
59 | 59 | /** |
60 | - * Return path to banner |
|
61 | - * |
|
62 | - * @param string $banner is the physical name |
|
63 | - * @return string The relative path to banner |
|
64 | - */ |
|
60 | + * Return path to banner |
|
61 | + * |
|
62 | + * @param string $banner is the physical name |
|
63 | + * @return string The relative path to banner |
|
64 | + */ |
|
65 | 65 | public function get_banner_path($banner = '') |
66 | 66 | { |
67 | 67 | return 'files/' . $this->get_ext_name() . 'banners/' . $banner; |
68 | 68 | } |
69 | 69 | |
70 | 70 | /** |
71 | - * Return array entries that match the pattern |
|
72 | - * |
|
73 | - * @link http://php.net/manual/fr/function.preg-grep.php#95787 |
|
74 | - * |
|
75 | - * @param string $pattern The pattern to search for |
|
76 | - * @param array $input The input array |
|
77 | - * @return array $vals Returns an array indexed using the keys from the input array |
|
78 | - */ |
|
71 | + * Return array entries that match the pattern |
|
72 | + * |
|
73 | + * @link http://php.net/manual/fr/function.preg-grep.php#95787 |
|
74 | + * |
|
75 | + * @param string $pattern The pattern to search for |
|
76 | + * @param array $input The input array |
|
77 | + * @return array $vals Returns an array indexed using the keys from the input array |
|
78 | + */ |
|
79 | 79 | public function preg_grep_keys($pattern, $input) |
80 | 80 | { |
81 | 81 | $keys = preg_grep($pattern, array_keys($input)); |
@@ -29,8 +29,8 @@ |
||
29 | 29 | */ |
30 | 30 | public function __construct(\phpbb\extension\manager $phpbb_extension_manager, \phpbb\path_helper $path_helper) |
31 | 31 | { |
32 | - $this->extension_manager = $phpbb_extension_manager; |
|
33 | - $this->path_helper = $path_helper; |
|
32 | + $this->extension_manager = $phpbb_extension_manager; |
|
33 | + $this->path_helper = $path_helper; |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | /** |
@@ -28,13 +28,13 @@ discard block |
||
28 | 28 | private $cat_data; |
29 | 29 | |
30 | 30 | /** |
31 | - * Constructor. |
|
32 | - * |
|
33 | - * @param \phpbb\db\driver\driver_interface $db Database object |
|
34 | - * @param \phpbb\config\config $config Config object |
|
35 | - * @param \ernadoo\phpbbdirectory\core\link $directory_cron PhpBB Directory extension link object |
|
36 | - * @param string $php_ext phpEx |
|
37 | - */ |
|
31 | + * Constructor. |
|
32 | + * |
|
33 | + * @param \phpbb\db\driver\driver_interface $db Database object |
|
34 | + * @param \phpbb\config\config $config Config object |
|
35 | + * @param \ernadoo\phpbbdirectory\core\link $directory_cron PhpBB Directory extension link object |
|
36 | + * @param string $php_ext phpEx |
|
37 | + */ |
|
38 | 38 | public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\config\config $config, \ernadoo\phpbbdirectory\core\link $directory_cron, $php_ext) |
39 | 39 | { |
40 | 40 | $this->db = $db; |
@@ -44,66 +44,66 @@ discard block |
||
44 | 44 | } |
45 | 45 | |
46 | 46 | /** |
47 | - * Manually set categorie data. |
|
48 | - * |
|
49 | - * @param array $cat_data Information about a category to be pruned. |
|
50 | - */ |
|
47 | + * Manually set categorie data. |
|
48 | + * |
|
49 | + * @param array $cat_data Information about a category to be pruned. |
|
50 | + */ |
|
51 | 51 | public function set_categorie_data($cat_data) |
52 | 52 | { |
53 | 53 | $this->cat_data = $cat_data; |
54 | 54 | } |
55 | 55 | |
56 | 56 | /** |
57 | - * Runs this cron task. |
|
58 | - * |
|
59 | - * @return null |
|
60 | - */ |
|
57 | + * Runs this cron task. |
|
58 | + * |
|
59 | + * @return null |
|
60 | + */ |
|
61 | 61 | public function run() |
62 | 62 | { |
63 | 63 | $this->dir_cron->auto_check($this->cat_data); |
64 | 64 | } |
65 | 65 | |
66 | 66 | /** |
67 | - * Returns whether this cron task can run, given current board configuration. |
|
68 | - * |
|
69 | - * @return bool |
|
70 | - */ |
|
67 | + * Returns whether this cron task can run, given current board configuration. |
|
68 | + * |
|
69 | + * @return bool |
|
70 | + */ |
|
71 | 71 | public function is_runnable() |
72 | 72 | { |
73 | 73 | return !$this->config['use_system_cron'] && !empty($this->cat_data); |
74 | 74 | } |
75 | 75 | |
76 | 76 | /** |
77 | - * Returns whether this cron task should run now, because enough time |
|
78 | - * has passed since it was last run. |
|
79 | - * |
|
80 | - * @return bool |
|
81 | - */ |
|
77 | + * Returns whether this cron task should run now, because enough time |
|
78 | + * has passed since it was last run. |
|
79 | + * |
|
80 | + * @return bool |
|
81 | + */ |
|
82 | 82 | public function should_run() |
83 | 83 | { |
84 | 84 | return $this->cat_data['cat_cron_enable'] && $this->cat_data['cat_cron_next'] < time(); |
85 | 85 | } |
86 | 86 | |
87 | 87 | /** |
88 | - * Returns parameters of this cron task as an array. |
|
89 | - * The array has one key, c, whose value is id of the category to be pruned. |
|
90 | - * |
|
91 | - * @return array |
|
92 | - */ |
|
88 | + * Returns parameters of this cron task as an array. |
|
89 | + * The array has one key, c, whose value is id of the category to be pruned. |
|
90 | + * |
|
91 | + * @return array |
|
92 | + */ |
|
93 | 93 | public function get_parameters() |
94 | 94 | { |
95 | 95 | return array('c' => $this->cat_data['cat_id']); |
96 | 96 | } |
97 | 97 | |
98 | 98 | /** |
99 | - * Parses parameters found in $request, which is an instance of |
|
100 | - * \phpbb\request\request_interface. |
|
101 | - * |
|
102 | - * It is expected to have a key f whose value is id of the forum to be pruned. |
|
103 | - * |
|
104 | - * @param \phpbb\request\request_interface $request Request object. |
|
105 | - * @return null |
|
106 | - */ |
|
99 | + * Parses parameters found in $request, which is an instance of |
|
100 | + * \phpbb\request\request_interface. |
|
101 | + * |
|
102 | + * It is expected to have a key f whose value is id of the forum to be pruned. |
|
103 | + * |
|
104 | + * @param \phpbb\request\request_interface $request Request object. |
|
105 | + * @return null |
|
106 | + */ |
|
107 | 107 | public function parse_parameters(\phpbb\request\request_interface $request) |
108 | 108 | { |
109 | 109 | $this->cat_data = array(); |
@@ -37,8 +37,8 @@ |
||
37 | 37 | */ |
38 | 38 | public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\config\config $config, \ernadoo\phpbbdirectory\core\link $directory_cron, $php_ext) |
39 | 39 | { |
40 | - $this->db = $db; |
|
41 | - $this->config = $config; |
|
40 | + $this->db = $db; |
|
41 | + $this->config = $config; |
|
42 | 42 | $this->dir_cron = $directory_cron; |
43 | 43 | $this->php_ext = $php_ext; |
44 | 44 | } |
@@ -5,9 +5,9 @@ |
||
5 | 5 | * |
6 | 6 | * @copyright (c) 2014 ErnadoO <http://www.phpbb-services.com> |
7 | 7 | * @license GNU General Public License, version 2 (GPL-2.0) |
8 | - * Dutch translation by Dutch Translators (https://github.com/dutch-translators) |
|
9 | - * |
|
10 | - */ |
|
8 | + * Dutch translation by Dutch Translators (https://github.com/dutch-translators) |
|
9 | + * |
|
10 | + */ |
|
11 | 11 | |
12 | 12 | /** |
13 | 13 | * DO NOT CHANGE |
@@ -16,11 +16,11 @@ discard block |
||
16 | 16 | class convert_module extends \phpbb\db\migration\migration |
17 | 17 | { |
18 | 18 | /** |
19 | - * Skip this migration if an ACP_DIRECTORY module does not exist |
|
20 | - * |
|
21 | - * @return bool True if table does not exist |
|
22 | - * @access public |
|
23 | - */ |
|
19 | + * Skip this migration if an ACP_DIRECTORY module does not exist |
|
20 | + * |
|
21 | + * @return bool True if table does not exist |
|
22 | + * @access public |
|
23 | + */ |
|
24 | 24 | public function effectively_installed() |
25 | 25 | { |
26 | 26 | $sql = 'SELECT module_id |
@@ -37,11 +37,11 @@ discard block |
||
37 | 37 | } |
38 | 38 | |
39 | 39 | /** |
40 | - * Add or update data in the database |
|
41 | - * |
|
42 | - * @return array Array of table data |
|
43 | - * @access public |
|
44 | - */ |
|
40 | + * Add or update data in the database |
|
41 | + * |
|
42 | + * @return array Array of table data |
|
43 | + * @access public |
|
44 | + */ |
|
45 | 45 | public function update_data() |
46 | 46 | { |
47 | 47 | return array( |
@@ -56,7 +56,7 @@ |
||
56 | 56 | 'module_auth' => 'ext_ernadoo/phpbbdirectory' |
57 | 57 | ); |
58 | 58 | |
59 | - $sql = 'UPDATE ' . $this->table_prefix . 'modules |
|
59 | + $sql = 'UPDATE ' . $this->table_prefix . 'modules |
|
60 | 60 | SET ' . $this->db->sql_build_array('UPDATE', $module_data) . " |
61 | 61 | WHERE module_basename = 'acp_directory' |
62 | 62 | AND module_mode IN ('main', 'settings', 'cat', 'val')"; |
@@ -16,11 +16,11 @@ discard block |
||
16 | 16 | class convert_notifications extends \phpbb\db\migration\migration |
17 | 17 | { |
18 | 18 | /** |
19 | - * Skip this migration if phpbb_directory_notifications table does not exist |
|
20 | - * |
|
21 | - * @return bool True if table does not exist |
|
22 | - * @access public |
|
23 | - */ |
|
19 | + * Skip this migration if phpbb_directory_notifications table does not exist |
|
20 | + * |
|
21 | + * @return bool True if table does not exist |
|
22 | + * @access public |
|
23 | + */ |
|
24 | 24 | public function effectively_installed() |
25 | 25 | { |
26 | 26 | return !$this->db_tools->sql_table_exists($this->table_prefix . 'directory_notifications'); |
@@ -34,11 +34,11 @@ discard block |
||
34 | 34 | } |
35 | 35 | |
36 | 36 | /** |
37 | - * Add or update data in the database |
|
38 | - * |
|
39 | - * @return array Array of table data |
|
40 | - * @access public |
|
41 | - */ |
|
37 | + * Add or update data in the database |
|
38 | + * |
|
39 | + * @return array Array of table data |
|
40 | + * @access public |
|
41 | + */ |
|
42 | 42 | public function update_data() |
43 | 43 | { |
44 | 44 | return array( |
@@ -47,10 +47,10 @@ discard block |
||
47 | 47 | } |
48 | 48 | |
49 | 49 | /** |
50 | - * Copy category track from 3.0.x table |
|
51 | - * |
|
52 | - * @return null |
|
53 | - */ |
|
50 | + * Copy category track from 3.0.x table |
|
51 | + * |
|
52 | + * @return null |
|
53 | + */ |
|
54 | 54 | public function copy_from_notifications() |
55 | 55 | { |
56 | 56 | $sql = 'SELECT n_user_id, n_cat_id |