@@ -40,15 +40,15 @@ discard block |
||
| 40 | 40 | private $display_vars; |
| 41 | 41 | |
| 42 | 42 | /** |
| 43 | - * Constructor |
|
| 44 | - * |
|
| 45 | - * @param \phpbb\config\config $config Config object |
|
| 46 | - * @param \phpbb\language\language $language Language object |
|
| 47 | - * @param \phpbb\log\log $log Log object |
|
| 48 | - * @param \phpbb\request\request $request Request object |
|
| 49 | - * @param \phpbb\template\template $template Template object |
|
| 50 | - * @param \phpbb\user $user User object |
|
| 51 | - */ |
|
| 43 | + * Constructor |
|
| 44 | + * |
|
| 45 | + * @param \phpbb\config\config $config Config object |
|
| 46 | + * @param \phpbb\language\language $language Language object |
|
| 47 | + * @param \phpbb\log\log $log Log object |
|
| 48 | + * @param \phpbb\request\request $request Request object |
|
| 49 | + * @param \phpbb\template\template $template Template object |
|
| 50 | + * @param \phpbb\user $user User object |
|
| 51 | + */ |
|
| 52 | 52 | public function __construct(\phpbb\config\config $config, \phpbb\language\language $language, \phpbb\log\log $log, \phpbb\request\request $request, \phpbb\template\template $template, \phpbb\user $user) |
| 53 | 53 | { |
| 54 | 54 | $this->config = $config; |
@@ -62,10 +62,10 @@ discard block |
||
| 62 | 62 | } |
| 63 | 63 | |
| 64 | 64 | /** |
| 65 | - * Display config page |
|
| 66 | - * |
|
| 67 | - * @return null |
|
| 68 | - */ |
|
| 65 | + * Display config page |
|
| 66 | + * |
|
| 67 | + * @return null |
|
| 68 | + */ |
|
| 69 | 69 | public function display_config() |
| 70 | 70 | { |
| 71 | 71 | // Output relevant page |
@@ -111,10 +111,10 @@ discard block |
||
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | /** |
| 114 | - * Validate config vars and update config table if needed |
|
| 115 | - * |
|
| 116 | - * @return null |
|
| 117 | - */ |
|
| 114 | + * Validate config vars and update config table if needed |
|
| 115 | + * |
|
| 116 | + * @return null |
|
| 117 | + */ |
|
| 118 | 118 | public function process() |
| 119 | 119 | { |
| 120 | 120 | $submit = ($this->request->is_set_post('submit')) ? true : false; |
@@ -167,22 +167,22 @@ discard block |
||
| 167 | 167 | } |
| 168 | 168 | |
| 169 | 169 | /** |
| 170 | - * Set page url |
|
| 171 | - * |
|
| 172 | - * @param string $u_action Custom form action |
|
| 173 | - * @return null |
|
| 174 | - * @access public |
|
| 175 | - */ |
|
| 170 | + * Set page url |
|
| 171 | + * |
|
| 172 | + * @param string $u_action Custom form action |
|
| 173 | + * @return null |
|
| 174 | + * @access public |
|
| 175 | + */ |
|
| 176 | 176 | public function set_page_url($u_action) |
| 177 | 177 | { |
| 178 | 178 | $this->u_action = $u_action; |
| 179 | 179 | } |
| 180 | 180 | |
| 181 | 181 | /** |
| 182 | - * Build config matrice |
|
| 183 | - * |
|
| 184 | - * @return null |
|
| 185 | - */ |
|
| 182 | + * Build config matrice |
|
| 183 | + * |
|
| 184 | + * @return null |
|
| 185 | + */ |
|
| 186 | 186 | private function _generate_config() |
| 187 | 187 | { |
| 188 | 188 | $this->display_vars = array( |
@@ -46,20 +46,20 @@ discard block |
||
| 46 | 46 | protected $link; |
| 47 | 47 | |
| 48 | 48 | /** |
| 49 | - * Constructor |
|
| 50 | - * |
|
| 51 | - * @param \phpbb\db\driver\driver_interface $db Database object |
|
| 52 | - * @param \phpbb\config\config $config Config object |
|
| 53 | - * @param \phpbb\language\language $language Language object |
|
| 54 | - * @param \phpbb\template\template $template Template object |
|
| 55 | - * @param \phpbb\user $user User object |
|
| 56 | - * @param \phpbb\controller\helper $helper Controller helper object |
|
| 57 | - * @param \phpbb\request\request $request Request object |
|
| 58 | - * @param \phpbb\auth\auth $auth Auth object |
|
| 59 | - * @param \phpbb\pagination $pagination Pagination object |
|
| 60 | - * @param \ernadoo\phpbbdirectory\core\categorie $categorie PhpBB Directory extension categorie object |
|
| 61 | - * @param \ernadoo\phpbbdirectory\core\link $link PhpBB Directory extension link object |
|
| 62 | - */ |
|
| 49 | + * Constructor |
|
| 50 | + * |
|
| 51 | + * @param \phpbb\db\driver\driver_interface $db Database object |
|
| 52 | + * @param \phpbb\config\config $config Config object |
|
| 53 | + * @param \phpbb\language\language $language Language object |
|
| 54 | + * @param \phpbb\template\template $template Template object |
|
| 55 | + * @param \phpbb\user $user User object |
|
| 56 | + * @param \phpbb\controller\helper $helper Controller helper object |
|
| 57 | + * @param \phpbb\request\request $request Request object |
|
| 58 | + * @param \phpbb\auth\auth $auth Auth object |
|
| 59 | + * @param \phpbb\pagination $pagination Pagination object |
|
| 60 | + * @param \ernadoo\phpbbdirectory\core\categorie $categorie PhpBB Directory extension categorie object |
|
| 61 | + * @param \ernadoo\phpbbdirectory\core\link $link PhpBB Directory extension link object |
|
| 62 | + */ |
|
| 63 | 63 | 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) |
| 64 | 64 | { |
| 65 | 65 | $this->db = $db; |
@@ -83,10 +83,10 @@ discard block |
||
| 83 | 83 | } |
| 84 | 84 | |
| 85 | 85 | /** |
| 86 | - * Base controller to be accessed with the URL /directory |
|
| 87 | - * |
|
| 88 | - * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object |
|
| 89 | - */ |
|
| 86 | + * Base controller to be accessed with the URL /directory |
|
| 87 | + * |
|
| 88 | + * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object |
|
| 89 | + */ |
|
| 90 | 90 | public function base() |
| 91 | 91 | { |
| 92 | 92 | $this->categorie->display(); |
@@ -96,17 +96,17 @@ discard block |
||
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | /** |
| 99 | - * View controller for display a category |
|
| 100 | - * |
|
| 101 | - * @param int $cat_id The category ID |
|
| 102 | - * @param int $page Page number taken from the URL |
|
| 103 | - * @param int $sort_days Specifies the maximum amount of days a link may be old |
|
| 104 | - * @param string $sort_key is the key of $sort_by_sql for the selected sorting: a|t|r|s|v|p |
|
| 105 | - * @param string $sort_dir is either a or d representing ASC and DESC (ascending|descending) |
|
| 106 | - * @param string $mode watch|unwatch |
|
| 107 | - * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object |
|
| 108 | - * @throws \phpbb\exception\http_exception |
|
| 109 | - */ |
|
| 99 | + * View controller for display a category |
|
| 100 | + * |
|
| 101 | + * @param int $cat_id The category ID |
|
| 102 | + * @param int $page Page number taken from the URL |
|
| 103 | + * @param int $sort_days Specifies the maximum amount of days a link may be old |
|
| 104 | + * @param string $sort_key is the key of $sort_by_sql for the selected sorting: a|t|r|s|v|p |
|
| 105 | + * @param string $sort_dir is either a or d representing ASC and DESC (ascending|descending) |
|
| 106 | + * @param string $mode watch|unwatch |
|
| 107 | + * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object |
|
| 108 | + * @throws \phpbb\exception\http_exception |
|
| 109 | + */ |
|
| 110 | 110 | public function view($cat_id, $page, $sort_days, $sort_key, $sort_dir, $mode = '') |
| 111 | 111 | { |
| 112 | 112 | if (false === $this->categorie->get($cat_id)) |
@@ -366,11 +366,11 @@ discard block |
||
| 366 | 366 | } |
| 367 | 367 | |
| 368 | 368 | /** |
| 369 | - * date controller for return a date |
|
| 370 | - * |
|
| 371 | - * @return \phpbb\json_response A Json Response |
|
| 372 | - * @throws \phpbb\exception\http_exception |
|
| 373 | - */ |
|
| 369 | + * date controller for return a date |
|
| 370 | + * |
|
| 371 | + * @return \phpbb\json_response A Json Response |
|
| 372 | + * @throws \phpbb\exception\http_exception |
|
| 373 | + */ |
|
| 374 | 374 | public function return_date() |
| 375 | 375 | { |
| 376 | 376 | if (!$this->request->is_ajax()) |
@@ -59,23 +59,23 @@ discard block |
||
| 59 | 59 | protected $php_ext; |
| 60 | 60 | |
| 61 | 61 | /** |
| 62 | - * Constructor |
|
| 63 | - * |
|
| 64 | - * @param \phpbb\db\driver\driver_interface $db Database object |
|
| 65 | - * @param \phpbb\config\config $config Config object |
|
| 66 | - * @param \phpbb\language\language $language Language object |
|
| 67 | - * @param \phpbb\template\template $template Template object |
|
| 68 | - * @param \phpbb\user $user User object |
|
| 69 | - * @param \phpbb\controller\helper $helper Controller helper object |
|
| 70 | - * @param \phpbb\request\request $request Request object |
|
| 71 | - * @param \phpbb\auth\auth $auth Auth object |
|
| 72 | - * @param \phpbb\pagination $pagination Pagination object |
|
| 73 | - * @param \phpbb\captcha\factory $captcha_factory Captcha object |
|
| 74 | - * @param \ernadoo\phpbbdirectory\core\categorie $categorie PhpBB Directory extension categorie object |
|
| 75 | - * @param \ernadoo\phpbbdirectory\core\comment $comment PhpBB Directory extension comment object |
|
| 76 | - * @param string $root_path phpBB root path |
|
| 77 | - * @param string $php_ext phpEx |
|
| 78 | - */ |
|
| 62 | + * Constructor |
|
| 63 | + * |
|
| 64 | + * @param \phpbb\db\driver\driver_interface $db Database object |
|
| 65 | + * @param \phpbb\config\config $config Config object |
|
| 66 | + * @param \phpbb\language\language $language Language object |
|
| 67 | + * @param \phpbb\template\template $template Template object |
|
| 68 | + * @param \phpbb\user $user User object |
|
| 69 | + * @param \phpbb\controller\helper $helper Controller helper object |
|
| 70 | + * @param \phpbb\request\request $request Request object |
|
| 71 | + * @param \phpbb\auth\auth $auth Auth object |
|
| 72 | + * @param \phpbb\pagination $pagination Pagination object |
|
| 73 | + * @param \phpbb\captcha\factory $captcha_factory Captcha object |
|
| 74 | + * @param \ernadoo\phpbbdirectory\core\categorie $categorie PhpBB Directory extension categorie object |
|
| 75 | + * @param \ernadoo\phpbbdirectory\core\comment $comment PhpBB Directory extension comment object |
|
| 76 | + * @param string $root_path phpBB root path |
|
| 77 | + * @param string $php_ext phpEx |
|
| 78 | + */ |
|
| 79 | 79 | 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, \phpbb\captcha\factory $captcha_factory, \ernadoo\phpbbdirectory\core\categorie $categorie, \ernadoo\phpbbdirectory\core\comment $comment, $root_path, $php_ext) |
| 80 | 80 | { |
| 81 | 81 | $this->db = $db; |
@@ -111,13 +111,13 @@ discard block |
||
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | /** |
| 114 | - * Populate form when an error occurred |
|
| 115 | - * |
|
| 116 | - * @param int $link_id The link ID |
|
| 117 | - * @param int $comment_id The comment ID |
|
| 118 | - * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object |
|
| 119 | - * @throws \phpbb\exception\http_exception |
|
| 120 | - */ |
|
| 114 | + * Populate form when an error occurred |
|
| 115 | + * |
|
| 116 | + * @param int $link_id The link ID |
|
| 117 | + * @param int $comment_id The comment ID |
|
| 118 | + * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object |
|
| 119 | + * @throws \phpbb\exception\http_exception |
|
| 120 | + */ |
|
| 121 | 121 | public function delete_comment($link_id, $comment_id) |
| 122 | 122 | { |
| 123 | 123 | $this->_check_comments_enable($link_id); |
@@ -156,13 +156,13 @@ discard block |
||
| 156 | 156 | } |
| 157 | 157 | |
| 158 | 158 | /** |
| 159 | - * Edit a comment |
|
| 160 | - * |
|
| 161 | - * @param int $link_id The category ID |
|
| 162 | - * @param int $comment_id The comment ID |
|
| 163 | - * @return null|\Symfony\Component\HttpFoundation\Response A Symfony Response object |
|
| 164 | - * @throws \phpbb\exception\http_exception |
|
| 165 | - */ |
|
| 159 | + * Edit a comment |
|
| 160 | + * |
|
| 161 | + * @param int $link_id The category ID |
|
| 162 | + * @param int $comment_id The comment ID |
|
| 163 | + * @return null|\Symfony\Component\HttpFoundation\Response A Symfony Response object |
|
| 164 | + * @throws \phpbb\exception\http_exception |
|
| 165 | + */ |
|
| 166 | 166 | public function edit_comment($link_id, $comment_id) |
| 167 | 167 | { |
| 168 | 168 | $this->_check_comments_enable($link_id); |
@@ -193,12 +193,12 @@ discard block |
||
| 193 | 193 | } |
| 194 | 194 | |
| 195 | 195 | /** |
| 196 | - * Post a new comment |
|
| 197 | - * |
|
| 198 | - * @param int $link_id The category ID |
|
| 199 | - * @return null |
|
| 200 | - * @throws \phpbb\exception\http_exception |
|
| 201 | - */ |
|
| 196 | + * Post a new comment |
|
| 197 | + * |
|
| 198 | + * @param int $link_id The category ID |
|
| 199 | + * @return null |
|
| 200 | + * @throws \phpbb\exception\http_exception |
|
| 201 | + */ |
|
| 202 | 202 | public function new_comment($link_id) |
| 203 | 203 | { |
| 204 | 204 | $this->_check_comments_enable($link_id); |
@@ -224,14 +224,14 @@ discard block |
||
| 224 | 224 | } |
| 225 | 225 | |
| 226 | 226 | /** |
| 227 | - * Display popup comment |
|
| 228 | - * |
|
| 229 | - * @param int $link_id The category ID |
|
| 230 | - * @param int $page Page number taken from the URL |
|
| 231 | - * @param string $mode add|edit |
|
| 232 | - * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object |
|
| 233 | - * @throws \phpbb\exception\http_exception |
|
| 234 | - */ |
|
| 227 | + * Display popup comment |
|
| 228 | + * |
|
| 229 | + * @param int $link_id The category ID |
|
| 230 | + * @param int $page Page number taken from the URL |
|
| 231 | + * @param string $mode add|edit |
|
| 232 | + * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object |
|
| 233 | + * @throws \phpbb\exception\http_exception |
|
| 234 | + */ |
|
| 235 | 235 | public function view($link_id, $page, $mode = 'new') |
| 236 | 236 | { |
| 237 | 237 | $this->_check_comments_enable($link_id); |
@@ -324,13 +324,13 @@ discard block |
||
| 324 | 324 | } |
| 325 | 325 | |
| 326 | 326 | /** |
| 327 | - * Routine |
|
| 328 | - * |
|
| 329 | - * @param int $link_id The link ID |
|
| 330 | - * @param int $comment_id The comment ID |
|
| 331 | - * @param string $mode new|edit |
|
| 332 | - * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object |
|
| 333 | - */ |
|
| 327 | + * Routine |
|
| 328 | + * |
|
| 329 | + * @param int $link_id The link ID |
|
| 330 | + * @param int $comment_id The comment ID |
|
| 331 | + * @param string $mode new|edit |
|
| 332 | + * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object |
|
| 333 | + */ |
|
| 334 | 334 | private function _data_processing($link_id, $comment_id = 0, $mode = 'new') |
| 335 | 335 | { |
| 336 | 336 | if (!check_form_key('dir_form_comment')) |
@@ -418,12 +418,12 @@ discard block |
||
| 418 | 418 | } |
| 419 | 419 | |
| 420 | 420 | /** |
| 421 | - * Check if comments are enable in a category |
|
| 422 | - * |
|
| 423 | - * @param int $link_id The link ID |
|
| 424 | - * @return null Retun null if comments are allowed, http_exception if not |
|
| 425 | - * @throws \phpbb\exception\http_exception |
|
| 426 | - */ |
|
| 421 | + * Check if comments are enable in a category |
|
| 422 | + * |
|
| 423 | + * @param int $link_id The link ID |
|
| 424 | + * @return null Retun null if comments are allowed, http_exception if not |
|
| 425 | + * @throws \phpbb\exception\http_exception |
|
| 426 | + */ |
|
| 427 | 427 | private function _check_comments_enable($link_id) |
| 428 | 428 | { |
| 429 | 429 | $sql = 'SELECT link_cat |
@@ -449,12 +449,12 @@ discard block |
||
| 449 | 449 | } |
| 450 | 450 | |
| 451 | 451 | /** |
| 452 | - * Populate form when an error occurred |
|
| 453 | - * |
|
| 454 | - * @param int $link_id The link ID |
|
| 455 | - * @param string $mode add|edit |
|
| 456 | - * @return null |
|
| 457 | - */ |
|
| 452 | + * Populate form when an error occurred |
|
| 453 | + * |
|
| 454 | + * @param int $link_id The link ID |
|
| 455 | + * @param string $mode add|edit |
|
| 456 | + * @return null |
|
| 457 | + */ |
|
| 458 | 458 | private function _populate_form($link_id, $mode) |
| 459 | 459 | { |
| 460 | 460 | if (!$this->user->data['is_registered'] && $this->config['dir_visual_confirm'] && $mode != 'edit') |
@@ -50,21 +50,21 @@ 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\search\fulltext_directory $search PhpBB Directory extension search object |
|
| 65 | - * @param \ernadoo\phpbbdirectory\core\categorie $categorie PhpBB Directory extension categorie object |
|
| 66 | - * @param \ernadoo\phpbbdirectory\core\link $link PhpBB Directory extension link object |
|
| 67 | - */ |
|
| 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\search\fulltext_directory $search PhpBB Directory extension search object |
|
| 65 | + * @param \ernadoo\phpbbdirectory\core\categorie $categorie PhpBB Directory extension categorie object |
|
| 66 | + * @param \ernadoo\phpbbdirectory\core\link $link PhpBB Directory extension link object |
|
| 67 | + */ |
|
| 68 | 68 | 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\search\fulltext_directory $search, \ernadoo\phpbbdirectory\core\categorie $categorie, \ernadoo\phpbbdirectory\core\link $link) |
| 69 | 69 | { |
| 70 | 70 | $this->db = $db; |
@@ -90,12 +90,12 @@ discard block |
||
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | /** |
| 93 | - * Search controller |
|
| 94 | - * |
|
| 95 | - * @param int $page Page number taken from the URL |
|
| 96 | - * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object |
|
| 97 | - * @throws \phpbb\exception\http_exception |
|
| 98 | - */ |
|
| 93 | + * Search controller |
|
| 94 | + * |
|
| 95 | + * @param int $page Page number taken from the URL |
|
| 96 | + * @return \Symfony\Component\HttpFoundation\Response A Symfony Response object |
|
| 97 | + * @throws \phpbb\exception\http_exception |
|
| 98 | + */ |
|
| 99 | 99 | public function main($page) |
| 100 | 100 | { |
| 101 | 101 | if (!$this->auth->acl_get('u_search_dir')) |
@@ -319,11 +319,11 @@ discard block |
||
| 319 | 319 | } |
| 320 | 320 | |
| 321 | 321 | /** |
| 322 | - * |
|
| 323 | - * @param array $search_category |
|
| 324 | - * @param bool $search_child |
|
| 325 | - * @return array Categories to exclude from search |
|
| 326 | - */ |
|
| 322 | + * |
|
| 323 | + * @param array $search_category |
|
| 324 | + * @param bool $search_child |
|
| 325 | + * @return array Categories to exclude from search |
|
| 326 | + */ |
|
| 327 | 327 | private function _get_exclude_categories(&$search_category, $search_child) |
| 328 | 328 | { |
| 329 | 329 | $sql = 'SELECT cat_id, parent_id, right_id |
@@ -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'); |
@@ -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( |
@@ -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 |
@@ -259,10 +259,10 @@ discard block |
||
| 259 | 259 | } |
| 260 | 260 | |
| 261 | 261 | /** |
| 262 | - * Create directories for banners/icons uploaded |
|
| 263 | - * |
|
| 264 | - * @return null |
|
| 265 | - */ |
|
| 262 | + * Create directories for banners/icons uploaded |
|
| 263 | + * |
|
| 264 | + * @return null |
|
| 265 | + */ |
|
| 266 | 266 | public function create_directories() |
| 267 | 267 | { |
| 268 | 268 | $directories = array( |
@@ -281,10 +281,10 @@ discard block |
||
| 281 | 281 | } |
| 282 | 282 | |
| 283 | 283 | /** |
| 284 | - * Remove directories for banners/icons uploaded |
|
| 285 | - * |
|
| 286 | - * @return null |
|
| 287 | - */ |
|
| 284 | + * Remove directories for banners/icons uploaded |
|
| 285 | + * |
|
| 286 | + * @return null |
|
| 287 | + */ |
|
| 288 | 288 | public function remove_directories() |
| 289 | 289 | { |
| 290 | 290 | $dir = $this->phpbb_root_path . 'files/ext/ernadoo/phpbbdirectory/'; |
@@ -293,15 +293,15 @@ discard block |
||
| 293 | 293 | } |
| 294 | 294 | |
| 295 | 295 | /** |
| 296 | - * Attempts to remove recursively the directory named by dirname. |
|
| 297 | - * |
|
| 298 | - * @author Mehdi Kabab <http://pioupioum.fr> |
|
| 299 | - * @copyright Copyright (C) 2009 Mehdi Kabab |
|
| 300 | - * @license http://www.gnu.org/licenses/gpl.html GNU GPL version 3 or later |
|
| 301 | - * |
|
| 302 | - * @param string $dirname Path to the directory. |
|
| 303 | - * @return null |
|
| 304 | - */ |
|
| 296 | + * Attempts to remove recursively the directory named by dirname. |
|
| 297 | + * |
|
| 298 | + * @author Mehdi Kabab <http://pioupioum.fr> |
|
| 299 | + * @copyright Copyright (C) 2009 Mehdi Kabab |
|
| 300 | + * @license http://www.gnu.org/licenses/gpl.html GNU GPL version 3 or later |
|
| 301 | + * |
|
| 302 | + * @param string $dirname Path to the directory. |
|
| 303 | + * @return null |
|
| 304 | + */ |
|
| 305 | 305 | private function _recursive_rmdir($dirname) |
| 306 | 306 | { |
| 307 | 307 | if (is_dir($dirname) && !is_link($dirname)) |
@@ -18,21 +18,21 @@ discard block |
||
| 18 | 18 | class directory_website_disapproved extends \phpbb\notification\type\base |
| 19 | 19 | { |
| 20 | 20 | /** |
| 21 | - * Get notification type name |
|
| 22 | - * |
|
| 23 | - * @return string |
|
| 24 | - */ |
|
| 21 | + * Get notification type name |
|
| 22 | + * |
|
| 23 | + * @return string |
|
| 24 | + */ |
|
| 25 | 25 | public function get_type() |
| 26 | 26 | { |
| 27 | 27 | return 'ernadoo.phpbbdirectory.notification.type.directory_website_disapproved'; |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | /** |
| 31 | - * Notification option data (for outputting to the user) |
|
| 32 | - * |
|
| 33 | - * @var bool|array False if the service should use it's default data |
|
| 34 | - * Array of data (including keys 'id', 'lang', and 'group') |
|
| 35 | - */ |
|
| 31 | + * Notification option data (for outputting to the user) |
|
| 32 | + * |
|
| 33 | + * @var bool|array False if the service should use it's default data |
|
| 34 | + * Array of data (including keys 'id', 'lang', and 'group') |
|
| 35 | + */ |
|
| 36 | 36 | public static $notification_option = array( |
| 37 | 37 | 'id' => 'dir_moderation_queue', |
| 38 | 38 | 'lang' => 'NOTIFICATION_TYPE_DIR_UCP_MODERATION_QUEUE', |
@@ -40,17 +40,17 @@ discard block |
||
| 40 | 40 | ); |
| 41 | 41 | |
| 42 | 42 | /** |
| 43 | - * Permission to check for (in find_users_for_notification) |
|
| 44 | - * |
|
| 45 | - * @var string Permission name |
|
| 46 | - */ |
|
| 43 | + * Permission to check for (in find_users_for_notification) |
|
| 44 | + * |
|
| 45 | + * @var string Permission name |
|
| 46 | + */ |
|
| 47 | 47 | protected $permission = array('a_', 'm_'); |
| 48 | 48 | |
| 49 | 49 | /** |
| 50 | - * Is available |
|
| 51 | - * |
|
| 52 | - * @return bool True/False whether or not this is available to the user |
|
| 53 | - */ |
|
| 50 | + * Is available |
|
| 51 | + * |
|
| 52 | + * @return bool True/False whether or not this is available to the user |
|
| 53 | + */ |
|
| 54 | 54 | public function is_available() |
| 55 | 55 | { |
| 56 | 56 | $has_permission = $this->auth->acl_gets($this->permission, true); |
@@ -59,21 +59,21 @@ discard block |
||
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | /** |
| 62 | - * Get link id |
|
| 63 | - * |
|
| 64 | - * @param array $data The data from the link |
|
| 65 | - * @return int |
|
| 66 | - */ |
|
| 62 | + * Get link id |
|
| 63 | + * |
|
| 64 | + * @param array $data The data from the link |
|
| 65 | + * @return int |
|
| 66 | + */ |
|
| 67 | 67 | static public function get_item_id($data) |
| 68 | 68 | { |
| 69 | 69 | return (int) $data['link_id']; |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | /** |
| 73 | - * Get parent id - it's not used |
|
| 74 | - * |
|
| 75 | - * @param array $data The data from the link |
|
| 76 | - */ |
|
| 73 | + * Get parent id - it's not used |
|
| 74 | + * |
|
| 75 | + * @param array $data The data from the link |
|
| 76 | + */ |
|
| 77 | 77 | static public function get_item_parent_id($data) |
| 78 | 78 | { |
| 79 | 79 | // No parent |
@@ -81,12 +81,12 @@ discard block |
||
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | /** |
| 84 | - * Find the users who want to receive notifications |
|
| 85 | - * |
|
| 86 | - * @param array $data Data from submit link |
|
| 87 | - * @param array $options Options for finding users for notification |
|
| 88 | - * @return array |
|
| 89 | - */ |
|
| 84 | + * Find the users who want to receive notifications |
|
| 85 | + * |
|
| 86 | + * @param array $data Data from submit link |
|
| 87 | + * @param array $options Options for finding users for notification |
|
| 88 | + * @return array |
|
| 89 | + */ |
|
| 90 | 90 | public function find_users_for_notification($data, $options = array()) |
| 91 | 91 | { |
| 92 | 92 | $options = array_merge(array( |
@@ -103,10 +103,10 @@ discard block |
||
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | /** |
| 106 | - * Get the HTML formatted title of this notification |
|
| 107 | - * |
|
| 108 | - * @return string |
|
| 109 | - */ |
|
| 106 | + * Get the HTML formatted title of this notification |
|
| 107 | + * |
|
| 108 | + * @return string |
|
| 109 | + */ |
|
| 110 | 110 | public function get_title() |
| 111 | 111 | { |
| 112 | 112 | $link_name = $this->get_data('link_name'); |
@@ -116,20 +116,20 @@ discard block |
||
| 116 | 116 | } |
| 117 | 117 | |
| 118 | 118 | /** |
| 119 | - * Get email template |
|
| 120 | - * |
|
| 121 | - * @return string |
|
| 122 | - */ |
|
| 119 | + * Get email template |
|
| 120 | + * |
|
| 121 | + * @return string |
|
| 122 | + */ |
|
| 123 | 123 | public function get_email_template() |
| 124 | 124 | { |
| 125 | 125 | return '@ernadoo_phpbbdirectory/directory_website_disapproved'; |
| 126 | 126 | } |
| 127 | 127 | |
| 128 | 128 | /** |
| 129 | - * Get email template variables |
|
| 130 | - * |
|
| 131 | - * @return array |
|
| 132 | - */ |
|
| 129 | + * Get email template variables |
|
| 130 | + * |
|
| 131 | + * @return array |
|
| 132 | + */ |
|
| 133 | 133 | public function get_email_template_variables() |
| 134 | 134 | { |
| 135 | 135 | return array( |
@@ -138,33 +138,33 @@ discard block |
||
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | /** |
| 141 | - * Get the url to this item |
|
| 142 | - * |
|
| 143 | - * @return string URL |
|
| 144 | - */ |
|
| 141 | + * Get the url to this item |
|
| 142 | + * |
|
| 143 | + * @return string URL |
|
| 144 | + */ |
|
| 145 | 145 | public function get_url() |
| 146 | 146 | { |
| 147 | 147 | return ''; |
| 148 | 148 | } |
| 149 | 149 | |
| 150 | 150 | /** |
| 151 | - * Users needed to query before this notification can be displayed |
|
| 152 | - * |
|
| 153 | - * @return array Array of user_ids |
|
| 154 | - */ |
|
| 151 | + * Users needed to query before this notification can be displayed |
|
| 152 | + * |
|
| 153 | + * @return array Array of user_ids |
|
| 154 | + */ |
|
| 155 | 155 | public function users_to_query() |
| 156 | 156 | { |
| 157 | 157 | return array(); |
| 158 | 158 | } |
| 159 | 159 | |
| 160 | 160 | /** |
| 161 | - * Function for preparing the data for insertion in an SQL query |
|
| 162 | - * (The service handles insertion) |
|
| 163 | - * |
|
| 164 | - * @param array $data Data from submit link |
|
| 165 | - * @param array $pre_create_data Data from pre_create_insert_array() |
|
| 166 | - * @return array Array of data ready to be inserted into the database |
|
| 167 | - */ |
|
| 161 | + * Function for preparing the data for insertion in an SQL query |
|
| 162 | + * (The service handles insertion) |
|
| 163 | + * |
|
| 164 | + * @param array $data Data from submit link |
|
| 165 | + * @param array $pre_create_data Data from pre_create_insert_array() |
|
| 166 | + * @return array Array of data ready to be inserted into the database |
|
| 167 | + */ |
|
| 168 | 168 | public function create_insert_array($data, $pre_create_data = array()) |
| 169 | 169 | { |
| 170 | 170 | $this->set_data('link_name', $data['link_name']); |