@@ -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, ''); |
@@ -50,20 +50,20 @@ discard block |
||
| 50 | 50 | protected $link; |
| 51 | 51 | |
| 52 | 52 | /** |
| 53 | - * Constructor |
|
| 54 | - * |
|
| 55 | - * @param \phpbb\db\driver\driver_interface $db Database object |
|
| 56 | - * @param \phpbb\config\config $config Config object |
|
| 57 | - * @param \phpbb\language\language $language Language object |
|
| 58 | - * @param \phpbb\template\template $template Template object |
|
| 59 | - * @param \phpbb\user $user User object |
|
| 60 | - * @param \phpbb\controller\helper $helper Controller helper object |
|
| 61 | - * @param \phpbb\request\request $request Request object |
|
| 62 | - * @param \phpbb\auth\auth $auth Auth object |
|
| 63 | - * @param \phpbb\pagination $pagination Pagination object |
|
| 64 | - * @param \ernadoo\phpbbdirectory\core\categorie $categorie PhpBB Directory extension categorie object |
|
| 65 | - * @param \ernadoo\phpbbdirectory\core\link $link PhpBB Directory extension link object |
|
| 66 | - */ |
|
| 53 | + * Constructor |
|
| 54 | + * |
|
| 55 | + * @param \phpbb\db\driver\driver_interface $db Database object |
|
| 56 | + * @param \phpbb\config\config $config Config object |
|
| 57 | + * @param \phpbb\language\language $language Language object |
|
| 58 | + * @param \phpbb\template\template $template Template object |
|
| 59 | + * @param \phpbb\user $user User object |
|
| 60 | + * @param \phpbb\controller\helper $helper Controller helper object |
|
| 61 | + * @param \phpbb\request\request $request Request object |
|
| 62 | + * @param \phpbb\auth\auth $auth Auth object |
|
| 63 | + * @param \phpbb\pagination $pagination Pagination object |
|
| 64 | + * @param \ernadoo\phpbbdirectory\core\categorie $categorie PhpBB Directory extension categorie object |
|
| 65 | + * @param \ernadoo\phpbbdirectory\core\link $link PhpBB Directory extension link object |
|
| 66 | + */ |
|
| 67 | 67 | 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\pagination $pagination, \ernadoo\phpbbdirectory\core\categorie $categorie, \ernadoo\phpbbdirectory\core\link $link) |
| 68 | 68 | { |
| 69 | 69 | $this->db = $db; |
@@ -86,10 +86,10 @@ discard block |
||
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | /** |
| 89 | - * Base controller to be accessed with the URL /directory |
|
| 90 | - * |
|
| 91 | - * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object |
|
| 92 | - */ |
|
| 89 | + * Base controller to be accessed with the URL /directory |
|
| 90 | + * |
|
| 91 | + * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object |
|
| 92 | + */ |
|
| 93 | 93 | public function base() |
| 94 | 94 | { |
| 95 | 95 | $this->categorie->display(); |
@@ -99,15 +99,15 @@ discard block |
||
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | /** |
| 102 | - * Legacy view controller for display a category |
|
| 103 | - * Used with /directory/categorie/{cat_id} |
|
| 104 | - * @deprecated 2.0.0 No longer used since dynamic routing. |
|
| 105 | - * |
|
| 106 | - * @param int $cat_id The category ID |
|
| 107 | - * @param int $page Page number taken from the URL |
|
| 108 | - * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object |
|
| 109 | - * @throws \phpbb\exception\http_exception |
|
| 110 | - */ |
|
| 102 | + * Legacy view controller for display a category |
|
| 103 | + * Used with /directory/categorie/{cat_id} |
|
| 104 | + * @deprecated 2.0.0 No longer used since dynamic routing. |
|
| 105 | + * |
|
| 106 | + * @param int $cat_id The category ID |
|
| 107 | + * @param int $page Page number taken from the URL |
|
| 108 | + * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object |
|
| 109 | + * @throws \phpbb\exception\http_exception |
|
| 110 | + */ |
|
| 111 | 111 | public function view($cat_id, $page) |
| 112 | 112 | { |
| 113 | 113 | if (false === $this->categorie->get($cat_id)) |
@@ -121,17 +121,17 @@ discard block |
||
| 121 | 121 | } |
| 122 | 122 | |
| 123 | 123 | /** |
| 124 | - * View controller for display a category |
|
| 125 | - * |
|
| 126 | - * @param int $cat_id The category ID |
|
| 127 | - * @param int $page Page number taken from the URL |
|
| 128 | - * @param int $sort_days Specifies the maximum amount of days a link may be old |
|
| 129 | - * @param string $sort_key is the key of $sort_by_sql for the selected sorting: a|t|r|s|v|p |
|
| 130 | - * @param string $sort_dir is either a or d representing ASC and DESC (ascending|descending) |
|
| 131 | - * @param string $mode watch|unwatch |
|
| 132 | - * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object |
|
| 133 | - * @throws \phpbb\exception\http_exception |
|
| 134 | - */ |
|
| 124 | + * View controller for display a category |
|
| 125 | + * |
|
| 126 | + * @param int $cat_id The category ID |
|
| 127 | + * @param int $page Page number taken from the URL |
|
| 128 | + * @param int $sort_days Specifies the maximum amount of days a link may be old |
|
| 129 | + * @param string $sort_key is the key of $sort_by_sql for the selected sorting: a|t|r|s|v|p |
|
| 130 | + * @param string $sort_dir is either a or d representing ASC and DESC (ascending|descending) |
|
| 131 | + * @param string $mode watch|unwatch |
|
| 132 | + * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object |
|
| 133 | + * @throws \phpbb\exception\http_exception |
|
| 134 | + */ |
|
| 135 | 135 | public function view_route($cat_id, $page = 1, $sort_days = 0, $sort_key = '', $sort_dir = '', $mode = '') |
| 136 | 136 | { |
| 137 | 137 | if (false === $this->categorie->get($cat_id)) |
@@ -386,11 +386,11 @@ discard block |
||
| 386 | 386 | } |
| 387 | 387 | |
| 388 | 388 | /** |
| 389 | - * date controller for return a date |
|
| 390 | - * |
|
| 391 | - * @return \phpbb\json_response A Json Response |
|
| 392 | - * @throws \phpbb\exception\http_exception |
|
| 393 | - */ |
|
| 389 | + * date controller for return a date |
|
| 390 | + * |
|
| 391 | + * @return \phpbb\json_response A Json Response |
|
| 392 | + * @throws \phpbb\exception\http_exception |
|
| 393 | + */ |
|
| 394 | 394 | public function return_date() |
| 395 | 395 | { |
| 396 | 396 | if (!$this->request->is_ajax()) |
@@ -407,11 +407,11 @@ discard block |
||
| 407 | 407 | } |
| 408 | 408 | |
| 409 | 409 | /** |
| 410 | - * slug controller for return a slugify category name |
|
| 411 | - * |
|
| 412 | - * @return \phpbb\json_response A Json Response |
|
| 413 | - * @throws \phpbb\exception\http_exception |
|
| 414 | - */ |
|
| 410 | + * slug controller for return a slugify category name |
|
| 411 | + * |
|
| 412 | + * @return \phpbb\json_response A Json Response |
|
| 413 | + * @throws \phpbb\exception\http_exception |
|
| 414 | + */ |
|
| 415 | 415 | public function return_slug() |
| 416 | 416 | { |
| 417 | 417 | if (!$this->request->is_ajax()) |
@@ -69,22 +69,22 @@ discard block |
||
| 69 | 69 | protected $php_ext; |
| 70 | 70 | |
| 71 | 71 | /** |
| 72 | - * Constructor |
|
| 73 | - * |
|
| 74 | - * @param \phpbb\db\driver\driver_interface $db Database object |
|
| 75 | - * @param \phpbb\config\config $config Config object |
|
| 76 | - * @param \phpbb\language\language $language Language object |
|
| 77 | - * @param \phpbb\template\template $template Template object |
|
| 78 | - * @param \phpbb\user $user User object |
|
| 79 | - * @param \phpbb\controller\helper $helper Controller helper object |
|
| 80 | - * @param \phpbb\request\request $request Request object |
|
| 81 | - * @param \phpbb\auth\auth $auth Auth object |
|
| 82 | - * @param \phpbb\captcha\factory $captcha_factory Captcha object |
|
| 83 | - * @param \ernadoo\phpbbdirectory\core\categorie $categorie PhpBB Directory extension categorie object |
|
| 84 | - * @param \ernadoo\phpbbdirectory\core\link $link PhpBB Directory extension link object |
|
| 85 | - * @param string $root_path phpBB root path |
|
| 86 | - * @param string $php_ext phpEx |
|
| 87 | - */ |
|
| 72 | + * Constructor |
|
| 73 | + * |
|
| 74 | + * @param \phpbb\db\driver\driver_interface $db Database object |
|
| 75 | + * @param \phpbb\config\config $config Config object |
|
| 76 | + * @param \phpbb\language\language $language Language object |
|
| 77 | + * @param \phpbb\template\template $template Template object |
|
| 78 | + * @param \phpbb\user $user User object |
|
| 79 | + * @param \phpbb\controller\helper $helper Controller helper object |
|
| 80 | + * @param \phpbb\request\request $request Request object |
|
| 81 | + * @param \phpbb\auth\auth $auth Auth object |
|
| 82 | + * @param \phpbb\captcha\factory $captcha_factory Captcha object |
|
| 83 | + * @param \ernadoo\phpbbdirectory\core\categorie $categorie PhpBB Directory extension categorie object |
|
| 84 | + * @param \ernadoo\phpbbdirectory\core\link $link PhpBB Directory extension link object |
|
| 85 | + * @param string $root_path phpBB root path |
|
| 86 | + * @param string $php_ext phpEx |
|
| 87 | + */ |
|
| 88 | 88 | 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\captcha\factory $captcha_factory, \ernadoo\phpbbdirectory\core\categorie $categorie, \ernadoo\phpbbdirectory\core\link $link, $root_path, $php_ext) |
| 89 | 89 | { |
| 90 | 90 | $this->db = $db; |
@@ -109,12 +109,12 @@ discard block |
||
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | /** |
| 112 | - * Delete a link |
|
| 113 | - * |
|
| 114 | - * @param int $cat_id The category ID |
|
| 115 | - * @param int $link_id The link ID |
|
| 116 | - * @return null|\Symfony\Component\HttpFoundation\Response A Symfony Response object |
|
| 117 | - */ |
|
| 112 | + * Delete a link |
|
| 113 | + * |
|
| 114 | + * @param int $cat_id The category ID |
|
| 115 | + * @param int $link_id The link ID |
|
| 116 | + * @return null|\Symfony\Component\HttpFoundation\Response A Symfony Response object |
|
| 117 | + */ |
|
| 118 | 118 | public function delete_link($cat_id, $link_id) |
| 119 | 119 | { |
| 120 | 120 | if ($this->request->is_set_post('cancel')) |
@@ -157,13 +157,13 @@ discard block |
||
| 157 | 157 | } |
| 158 | 158 | |
| 159 | 159 | /** |
| 160 | - * Edit a link |
|
| 161 | - * |
|
| 162 | - * @param int $cat_id The category ID |
|
| 163 | - * @param int $link_id The link ID |
|
| 164 | - * @return null|\Symfony\Component\HttpFoundation\Response A Symfony Response object |
|
| 165 | - * @throws \phpbb\exception\http_exception |
|
| 166 | - */ |
|
| 160 | + * Edit a link |
|
| 161 | + * |
|
| 162 | + * @param int $cat_id The category ID |
|
| 163 | + * @param int $link_id The link ID |
|
| 164 | + * @return null|\Symfony\Component\HttpFoundation\Response A Symfony Response object |
|
| 165 | + * @throws \phpbb\exception\http_exception |
|
| 166 | + */ |
|
| 167 | 167 | public function edit_link($cat_id, $link_id) |
| 168 | 168 | { |
| 169 | 169 | $sql = 'SELECT link_id, link_uid, link_user_id, link_flags, link_bitfield, link_cat, link_url, link_description, link_guest_email, link_name, link_rss, link_back, link_banner, link_flag, link_cat, link_time |
@@ -230,12 +230,12 @@ discard block |
||
| 230 | 230 | } |
| 231 | 231 | |
| 232 | 232 | /** |
| 233 | - * Display add form |
|
| 234 | - * |
|
| 235 | - * @param int $cat_id The category ID |
|
| 236 | - * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object |
|
| 237 | - * @throws \phpbb\exception\http_exception |
|
| 238 | - */ |
|
| 233 | + * Display add form |
|
| 234 | + * |
|
| 235 | + * @param int $cat_id The category ID |
|
| 236 | + * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object |
|
| 237 | + * @throws \phpbb\exception\http_exception |
|
| 238 | + */ |
|
| 239 | 239 | public function new_link($cat_id) |
| 240 | 240 | { |
| 241 | 241 | if (!$this->auth->acl_get('u_submit_dir')) |
@@ -277,23 +277,23 @@ discard block |
||
| 277 | 277 | } |
| 278 | 278 | |
| 279 | 279 | /** |
| 280 | - * View link controller |
|
| 281 | - * |
|
| 282 | - * @param int $link_id The link ID |
|
| 283 | - * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object |
|
| 284 | - */ |
|
| 280 | + * View link controller |
|
| 281 | + * |
|
| 282 | + * @param int $link_id The link ID |
|
| 283 | + * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object |
|
| 284 | + */ |
|
| 285 | 285 | public function view_link($link_id) |
| 286 | 286 | { |
| 287 | 287 | return $this->link->view($link_id); |
| 288 | 288 | } |
| 289 | 289 | |
| 290 | 290 | /** |
| 291 | - * Vote for a link |
|
| 292 | - * |
|
| 293 | - * @param int $cat_id The category ID |
|
| 294 | - * @param int $link_id The link ID |
|
| 295 | - * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object |
|
| 296 | - */ |
|
| 291 | + * Vote for a link |
|
| 292 | + * |
|
| 293 | + * @param int $cat_id The category ID |
|
| 294 | + * @param int $link_id The link ID |
|
| 295 | + * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object |
|
| 296 | + */ |
|
| 297 | 297 | public function vote_link($cat_id, $link_id) |
| 298 | 298 | { |
| 299 | 299 | $this->categorie->get($cat_id); |
@@ -329,14 +329,14 @@ discard block |
||
| 329 | 329 | } |
| 330 | 330 | |
| 331 | 331 | /** |
| 332 | - * Routine |
|
| 333 | - * |
|
| 334 | - * @param int $cat_id The category ID |
|
| 335 | - * @param int $link_id The link ID |
|
| 336 | - * @param string $mode add|edit |
|
| 337 | - * @return null|\Symfony\Component\HttpFoundation\Response A Symfony Response object |
|
| 338 | - * @throws \phpbb\exception\http_exception |
|
| 339 | - */ |
|
| 332 | + * Routine |
|
| 333 | + * |
|
| 334 | + * @param int $cat_id The category ID |
|
| 335 | + * @param int $link_id The link ID |
|
| 336 | + * @param string $mode add|edit |
|
| 337 | + * @return null|\Symfony\Component\HttpFoundation\Response A Symfony Response object |
|
| 338 | + * @throws \phpbb\exception\http_exception |
|
| 339 | + */ |
|
| 340 | 340 | private function _data_processing($cat_id, $link_id = 0, $mode = 'new') |
| 341 | 341 | { |
| 342 | 342 | if (($mode == 'edit' && !$this->auth->acl_get('m_edit_dir') && !$this->auth->acl_get('u_edit_dir')) || ($mode == 'new' && !$this->auth->acl_get('u_submit_dir'))) |
@@ -426,8 +426,8 @@ discard block |
||
| 426 | 426 | if (!$error) |
| 427 | 427 | { |
| 428 | 428 | /** |
| 429 | - * No errrors, we execute heavy tasks wich need a valid url |
|
| 430 | - */ |
|
| 429 | + * No errrors, we execute heavy tasks wich need a valid url |
|
| 430 | + */ |
|
| 431 | 431 | |
| 432 | 432 | // Banner |
| 433 | 433 | $this->link->banner_process($this->banner, $error); |
@@ -508,11 +508,11 @@ discard block |
||
| 508 | 508 | } |
| 509 | 509 | |
| 510 | 510 | /** |
| 511 | - * Display a banner |
|
| 512 | - * |
|
| 513 | - * @param string $banner_img Path to banner file |
|
| 514 | - * @return Response object |
|
| 515 | - */ |
|
| 511 | + * Display a banner |
|
| 512 | + * |
|
| 513 | + * @param string $banner_img Path to banner file |
|
| 514 | + * @return Response object |
|
| 515 | + */ |
|
| 516 | 516 | public function return_banner($banner_img) |
| 517 | 517 | { |
| 518 | 518 | if (!function_exists('file_gc')) |
@@ -546,13 +546,13 @@ discard block |
||
| 546 | 546 | } |
| 547 | 547 | |
| 548 | 548 | /** |
| 549 | - * Populate form when an error occurred |
|
| 550 | - * |
|
| 551 | - * @param int $cat_id The category ID |
|
| 552 | - * @param string $mode add|edit |
|
| 553 | - * @param string $title Page title (depends of $mode) |
|
| 554 | - * @return null |
|
| 555 | - */ |
|
| 549 | + * Populate form when an error occurred |
|
| 550 | + * |
|
| 551 | + * @param int $cat_id The category ID |
|
| 552 | + * @param string $mode add|edit |
|
| 553 | + * @param string $title Page title (depends of $mode) |
|
| 554 | + * @return null |
|
| 555 | + */ |
|
| 556 | 556 | private function _populate_form($cat_id, $mode, $title) |
| 557 | 557 | { |
| 558 | 558 | global $phpbb_extension_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,12 +515,12 @@ 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 | - * @param int $note Note submeted |
|
| 522 | - * @return null |
|
| 523 | - */ |
|
| 518 | + * Add a vote in db, for a specifi link |
|
| 519 | + * |
|
| 520 | + * @param int $link_id Link_id from db |
|
| 521 | + * @param int $note Note submeted |
|
| 522 | + * @return null |
|
| 523 | + */ |
|
| 524 | 524 | public function add_vote($link_id, $note) |
| 525 | 525 | { |
| 526 | 526 | $data = array( |
@@ -564,11 +564,11 @@ discard block |
||
| 564 | 564 | } |
| 565 | 565 | |
| 566 | 566 | /** |
| 567 | - * Search an appropriate thumb for url |
|
| 568 | - * |
|
| 569 | - * @param string $url Link's url |
|
| 570 | - * @return string The thumb url |
|
| 571 | - */ |
|
| 567 | + * Search an appropriate thumb for url |
|
| 568 | + * |
|
| 569 | + * @param string $url Link's url |
|
| 570 | + * @return string The thumb url |
|
| 571 | + */ |
|
| 572 | 572 | public function thumb_process($url) |
| 573 | 573 | { |
| 574 | 574 | if (!$this->config['dir_activ_thumb']) |
@@ -589,12 +589,12 @@ discard block |
||
| 589 | 589 | } |
| 590 | 590 | |
| 591 | 591 | /** |
| 592 | - * Check if ascreen thumb exists |
|
| 593 | - * |
|
| 594 | - * @param string $protocol The protocol |
|
| 595 | - * @param string $host The hostname |
|
| 596 | - * @return bool True if ascreen file exixts, else false |
|
| 597 | - */ |
|
| 592 | + * Check if ascreen thumb exists |
|
| 593 | + * |
|
| 594 | + * @param string $protocol The protocol |
|
| 595 | + * @param string $host The hostname |
|
| 596 | + * @return bool True if ascreen file exixts, else false |
|
| 597 | + */ |
|
| 598 | 598 | private function _ascreen_exist($protocol, $host) |
| 599 | 599 | { |
| 600 | 600 | if (($thumb_info = $this->imagesize->getImageSize($protocol.'://'.$host.'/ascreen.jpg')) !== false) |
@@ -609,12 +609,12 @@ discard block |
||
| 609 | 609 | } |
| 610 | 610 | |
| 611 | 611 | /** |
| 612 | - * Primary work on banner, can edit, copy or check a banner |
|
| 613 | - * |
|
| 614 | - * @param string $banner The banner's remote url |
|
| 615 | - * @param array $error The array error, passed by reference |
|
| 616 | - * @return null |
|
| 617 | - */ |
|
| 612 | + * Primary work on banner, can edit, copy or check a banner |
|
| 613 | + * |
|
| 614 | + * @param string $banner The banner's remote url |
|
| 615 | + * @param array $error The array error, passed by reference |
|
| 616 | + * @return null |
|
| 617 | + */ |
|
| 618 | 618 | public function banner_process(&$banner, &$error) |
| 619 | 619 | { |
| 620 | 620 | $old_banner = $this->request->variable('old_banner', ''); |
@@ -650,13 +650,13 @@ discard block |
||
| 650 | 650 | } |
| 651 | 651 | |
| 652 | 652 | /** |
| 653 | - * Copy a remonte banner to server. |
|
| 654 | - * called by banner_process() |
|
| 655 | - * |
|
| 656 | - * @param string $banner The banner's remote url |
|
| 657 | - * @param array $error The array error, passed by reference |
|
| 658 | - * @return false|string String if no errors, else false |
|
| 659 | - */ |
|
| 653 | + * Copy a remonte banner to server. |
|
| 654 | + * called by banner_process() |
|
| 655 | + * |
|
| 656 | + * @param string $banner The banner's remote url |
|
| 657 | + * @param array $error The array error, passed by reference |
|
| 658 | + * @return false|string String if no errors, else false |
|
| 659 | + */ |
|
| 660 | 660 | private function _banner_upload($banner, &$error) |
| 661 | 661 | { |
| 662 | 662 | /** @var \phpbb\files\upload $upload */ |
@@ -688,13 +688,13 @@ discard block |
||
| 688 | 688 | } |
| 689 | 689 | |
| 690 | 690 | /** |
| 691 | - * Check than remote banner exists |
|
| 692 | - * called by banner_process() |
|
| 693 | - * |
|
| 694 | - * @param string $banner The banner's remote url |
|
| 695 | - * @param array $error The array error, passed by reference |
|
| 696 | - * @return false|string String if no errors, else false |
|
| 697 | - */ |
|
| 691 | + * Check than remote banner exists |
|
| 692 | + * called by banner_process() |
|
| 693 | + * |
|
| 694 | + * @param string $banner The banner's remote url |
|
| 695 | + * @param array $error The array error, passed by reference |
|
| 696 | + * @return false|string String if no errors, else false |
|
| 697 | + */ |
|
| 698 | 698 | private function _banner_remote($banner, &$error) |
| 699 | 699 | { |
| 700 | 700 | if (!preg_match('#^(http|https|ftp)://#i', $banner)) |
@@ -802,11 +802,11 @@ discard block |
||
| 802 | 802 | } |
| 803 | 803 | |
| 804 | 804 | /** |
| 805 | - * Delete a banner from server |
|
| 806 | - * |
|
| 807 | - * @param string $file The file's name |
|
| 808 | - * @return bool True if delete success, else false |
|
| 809 | - */ |
|
| 805 | + * Delete a banner from server |
|
| 806 | + * |
|
| 807 | + * @param string $file The file's name |
|
| 808 | + * @return bool True if delete success, else false |
|
| 809 | + */ |
|
| 810 | 810 | private function _banner_delete($file) |
| 811 | 811 | { |
| 812 | 812 | if (file_exists($this->get_banner_path($file))) |
@@ -819,12 +819,12 @@ discard block |
||
| 819 | 819 | } |
| 820 | 820 | |
| 821 | 821 | /** |
| 822 | - * List flags |
|
| 823 | - * |
|
| 824 | - * @param string $flag_path The flag directory path |
|
| 825 | - * @param string $value Selected flag |
|
| 826 | - * @return string $list Html code |
|
| 827 | - */ |
|
| 822 | + * List flags |
|
| 823 | + * |
|
| 824 | + * @param string $flag_path The flag directory path |
|
| 825 | + * @param string $value Selected flag |
|
| 826 | + * @return string $list Html code |
|
| 827 | + */ |
|
| 828 | 828 | public function get_dir_flag_list($flag_path, $value) |
| 829 | 829 | { |
| 830 | 830 | $list = ''; |
@@ -859,10 +859,10 @@ discard block |
||
| 859 | 859 | } |
| 860 | 860 | |
| 861 | 861 | /** |
| 862 | - * Display recents links added |
|
| 863 | - * |
|
| 864 | - * @return null |
|
| 865 | - */ |
|
| 862 | + * Display recents links added |
|
| 863 | + * |
|
| 864 | + * @return null |
|
| 865 | + */ |
|
| 866 | 866 | public function recents() |
| 867 | 867 | { |
| 868 | 868 | if ($this->config['dir_recent_block']) |
@@ -939,13 +939,13 @@ discard block |
||
| 939 | 939 | } |
| 940 | 940 | |
| 941 | 941 | /** |
| 942 | - * Validate back link |
|
| 943 | - * |
|
| 944 | - * @param string $remote_url Page URL contains the backlink |
|
| 945 | - * @param bool $optional Link back is optional in this category? |
|
| 946 | - * @param bool $cron This methos is called by con process? |
|
| 947 | - * @return false|string Either false if validation succeeded or a string which will be used as the error message (with the variable name appended) |
|
| 948 | - */ |
|
| 942 | + * Validate back link |
|
| 943 | + * |
|
| 944 | + * @param string $remote_url Page URL contains the backlink |
|
| 945 | + * @param bool $optional Link back is optional in this category? |
|
| 946 | + * @param bool $cron This methos is called by con process? |
|
| 947 | + * @return false|string Either false if validation succeeded or a string which will be used as the error message (with the variable name appended) |
|
| 948 | + */ |
|
| 949 | 949 | public function validate_link_back($remote_url, $optional, $cron = false) |
| 950 | 950 | { |
| 951 | 951 | if (!$cron) |