@@ -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; |