@@ -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)) |
@@ -611,13 +611,13 @@ discard block |
||
611 | 611 | } |
612 | 612 | |
613 | 613 | /** |
614 | - * Check route |
|
615 | - * |
|
616 | - * @param string $route Route text |
|
617 | - * @return null |
|
618 | - * @access public |
|
619 | - * @throws \phpbb\pages\exception\unexpected_value |
|
620 | - */ |
|
614 | + * Check route |
|
615 | + * |
|
616 | + * @param string $route Route text |
|
617 | + * @return null |
|
618 | + * @access public |
|
619 | + * @throws \phpbb\pages\exception\unexpected_value |
|
620 | + */ |
|
621 | 621 | private function _check_route($route) |
622 | 622 | { |
623 | 623 | // Route is a required field |
@@ -648,11 +648,11 @@ discard block |
||
648 | 648 | } |
649 | 649 | |
650 | 650 | /** |
651 | - * Display form |
|
652 | - * |
|
653 | - * @param string $parents_list Drop-down list |
|
654 | - * @return null |
|
655 | - */ |
|
651 | + * Display form |
|
652 | + * |
|
653 | + * @param string $parents_list Drop-down list |
|
654 | + * @return null |
|
655 | + */ |
|
656 | 656 | private function _display_cat_form($parents_list) |
657 | 657 | { |
658 | 658 | $dir_cat_desc_data = array( |
@@ -724,11 +724,11 @@ discard block |
||
724 | 724 | } |
725 | 725 | |
726 | 726 | /** |
727 | - * Get category details |
|
728 | - * |
|
729 | - * @param int $cat_id The category ID |
|
730 | - * @return array |
|
731 | - */ |
|
727 | + * Get category details |
|
728 | + * |
|
729 | + * @param int $cat_id The category ID |
|
730 | + * @return array |
|
731 | + */ |
|
732 | 732 | private function _get_cat_info($cat_id) |
733 | 733 | { |
734 | 734 | $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 |
@@ -747,10 +747,10 @@ discard block |
||
747 | 747 | } |
748 | 748 | |
749 | 749 | /** |
750 | - * Update category data |
|
751 | - * |
|
752 | - * @return array |
|
753 | - */ |
|
750 | + * Update category data |
|
751 | + * |
|
752 | + * @return array |
|
753 | + */ |
|
754 | 754 | private function _update_cat_data() |
755 | 755 | { |
756 | 756 | if (!$this->cat_data['cat_name']) |
@@ -846,14 +846,14 @@ discard block |
||
846 | 846 | } |
847 | 847 | |
848 | 848 | /** |
849 | - * Remove complete category |
|
850 | - * |
|
851 | - * @param string $action_links Action for categories links |
|
852 | - * @param string $action_subcats Action for sub-categories |
|
853 | - * @param int $links_to_id New category ID for links |
|
854 | - * @param int $subcats_to_id New category ID for sub-categories |
|
855 | - * @return array|null |
|
856 | - */ |
|
849 | + * Remove complete category |
|
850 | + * |
|
851 | + * @param string $action_links Action for categories links |
|
852 | + * @param string $action_subcats Action for sub-categories |
|
853 | + * @param int $links_to_id New category ID for links |
|
854 | + * @param int $subcats_to_id New category ID for sub-categories |
|
855 | + * @return array|null |
|
856 | + */ |
|
857 | 857 | private function _delete_cat($action_links = 'delete', $action_subcats = 'delete', $links_to_id = 0, $subcats_to_id = 0) |
858 | 858 | { |
859 | 859 | $this->cat_data = $this->_get_cat_info($this->cat_id); |
@@ -968,12 +968,12 @@ discard block |
||
968 | 968 | } |
969 | 969 | |
970 | 970 | /** |
971 | - * Move category content from one to another forum |
|
972 | - * |
|
973 | - * @param int $from_id |
|
974 | - * @param int $to_id |
|
975 | - * @return null |
|
976 | - */ |
|
971 | + * Move category content from one to another forum |
|
972 | + * |
|
973 | + * @param int $from_id |
|
974 | + * @param int $to_id |
|
975 | + * @return null |
|
976 | + */ |
|
977 | 977 | private function _move_cat_content($from_id, $to_id) |
978 | 978 | { |
979 | 979 | $sql = 'UPDATE ' . $this->links_table . ' |
@@ -989,10 +989,10 @@ discard block |
||
989 | 989 | } |
990 | 990 | |
991 | 991 | /** |
992 | - * Delete category content |
|
993 | - * |
|
994 | - * @return null |
|
995 | - */ |
|
992 | + * Delete category content |
|
993 | + * |
|
994 | + * @return null |
|
995 | + */ |
|
996 | 996 | private function _delete_cat_content() |
997 | 997 | { |
998 | 998 | $this->db->sql_transaction('begin'); |
@@ -1049,11 +1049,11 @@ discard block |
||
1049 | 1049 | } |
1050 | 1050 | |
1051 | 1051 | /** |
1052 | - * Update links counter |
|
1053 | - * |
|
1054 | - * @param int $cat_id The category ID |
|
1055 | - * @return null |
|
1056 | - */ |
|
1052 | + * Update links counter |
|
1053 | + * |
|
1054 | + * @param int $cat_id The category ID |
|
1055 | + * @return null |
|
1056 | + */ |
|
1057 | 1057 | private function _sync_dir_cat($cat_id) |
1058 | 1058 | { |
1059 | 1059 | $sql = 'SELECT COUNT(link_id) AS num_links |
@@ -1071,12 +1071,12 @@ discard block |
||
1071 | 1071 | } |
1072 | 1072 | |
1073 | 1073 | /** |
1074 | - * Update link data (note, vote, comment) |
|
1075 | - * |
|
1076 | - * @param int $start |
|
1077 | - * @param int $stop |
|
1078 | - * @return null |
|
1079 | - */ |
|
1074 | + * Update link data (note, vote, comment) |
|
1075 | + * |
|
1076 | + * @param int $start |
|
1077 | + * @param int $stop |
|
1078 | + * @return null |
|
1079 | + */ |
|
1080 | 1080 | private function _sync_dir_links($start, $stop) |
1081 | 1081 | { |
1082 | 1082 | $sql_ary = array( |
@@ -1119,12 +1119,12 @@ discard block |
||
1119 | 1119 | } |
1120 | 1120 | |
1121 | 1121 | /** |
1122 | - * Display icons drop-down list |
|
1123 | - * |
|
1124 | - * @param string $icons_path |
|
1125 | - * @param string $img_selected |
|
1126 | - * @return string |
|
1127 | - */ |
|
1122 | + * Display icons drop-down list |
|
1123 | + * |
|
1124 | + * @param string $icons_path |
|
1125 | + * @param string $img_selected |
|
1126 | + * @return string |
|
1127 | + */ |
|
1128 | 1128 | private function _get_dir_icon_list($icons_path, $img_selected) |
1129 | 1129 | { |
1130 | 1130 | $imglist = filelist($icons_path, ''); |