@@ -44,18 +44,18 @@ discard block |
||
| 44 | 44 | public $data = array(); |
| 45 | 45 | |
| 46 | 46 | /** |
| 47 | - * Constructor |
|
| 48 | - * |
|
| 49 | - * @param \phpbb\db\driver\driver_interface $db Database object |
|
| 50 | - * @param \phpbb\config\config $config Config object |
|
| 51 | - * @param \phpbb\template\template $template Template object |
|
| 52 | - * @param \phpbb\user $user User object |
|
| 53 | - * @param \phpbb\controller\helper $helper Controller helper object |
|
| 54 | - * @param \phpbb\request\request $request Request object |
|
| 55 | - * @param \phpbb\auth\auth $auth Auth object |
|
| 56 | - * @param \phpbb\cron\manager $cron Cron object |
|
| 57 | - * @param \ernadoo\phpbbdirectory\core\helper $dir_helper PhpBB Directory extension helper object |
|
| 58 | - */ |
|
| 47 | + * Constructor |
|
| 48 | + * |
|
| 49 | + * @param \phpbb\db\driver\driver_interface $db Database object |
|
| 50 | + * @param \phpbb\config\config $config Config object |
|
| 51 | + * @param \phpbb\template\template $template Template object |
|
| 52 | + * @param \phpbb\user $user User object |
|
| 53 | + * @param \phpbb\controller\helper $helper Controller helper object |
|
| 54 | + * @param \phpbb\request\request $request Request object |
|
| 55 | + * @param \phpbb\auth\auth $auth Auth object |
|
| 56 | + * @param \phpbb\cron\manager $cron Cron object |
|
| 57 | + * @param \ernadoo\phpbbdirectory\core\helper $dir_helper PhpBB Directory extension helper object |
|
| 58 | + */ |
|
| 59 | 59 | public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\config\config $config, \phpbb\template\template $template, \phpbb\user $user, \phpbb\controller\helper $helper, \phpbb\request\request $request, \phpbb\auth\auth $auth, \phpbb\cron\manager $cron, \ernadoo\phpbbdirectory\core\helper $dir_helper) |
| 60 | 60 | { |
| 61 | 61 | $this->db = $db; |
@@ -70,21 +70,21 @@ discard block |
||
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | /** |
| 73 | - * Function for get approval setting |
|
| 74 | - * used in edit mode for test the setting of new category's link |
|
| 75 | - * |
|
| 76 | - * @return bool |
|
| 77 | - */ |
|
| 73 | + * Function for get approval setting |
|
| 74 | + * used in edit mode for test the setting of new category's link |
|
| 75 | + * |
|
| 76 | + * @return bool |
|
| 77 | + */ |
|
| 78 | 78 | public function need_approval() |
| 79 | 79 | { |
| 80 | 80 | return (bool) $this->data['cat_validate']; |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | /** |
| 84 | - * Generate Jumpbox |
|
| 85 | - * |
|
| 86 | - * @return null |
|
| 87 | - */ |
|
| 84 | + * Generate Jumpbox |
|
| 85 | + * |
|
| 86 | + * @return null |
|
| 87 | + */ |
|
| 88 | 88 | public function make_cat_jumpbox() |
| 89 | 89 | { |
| 90 | 90 | $sql = 'SELECT cat_id, cat_name, parent_id, left_id, right_id |
@@ -137,12 +137,12 @@ discard block |
||
| 137 | 137 | } |
| 138 | 138 | |
| 139 | 139 | /** |
| 140 | - * Generate a list of directory's categories |
|
| 141 | - * |
|
| 142 | - * @param int $select_id Selected category |
|
| 143 | - * @param array $ignore_id Array of ignored categories |
|
| 144 | - * @return string $cat_list html code |
|
| 145 | - */ |
|
| 140 | + * Generate a list of directory's categories |
|
| 141 | + * |
|
| 142 | + * @param int $select_id Selected category |
|
| 143 | + * @param array $ignore_id Array of ignored categories |
|
| 144 | + * @return string $cat_list html code |
|
| 145 | + */ |
|
| 146 | 146 | public function make_cat_select($select_id = 0, $ignore_id = array()) |
| 147 | 147 | { |
| 148 | 148 | $ignore_id = is_array($ignore_id) ? $ignore_id : array($ignore_id); |
@@ -188,10 +188,10 @@ discard block |
||
| 188 | 188 | } |
| 189 | 189 | |
| 190 | 190 | /** |
| 191 | - * Display cat or subcat |
|
| 192 | - * |
|
| 193 | - * @return null |
|
| 194 | - */ |
|
| 191 | + * Display cat or subcat |
|
| 192 | + * |
|
| 193 | + * @return null |
|
| 194 | + */ |
|
| 195 | 195 | public function display() |
| 196 | 196 | { |
| 197 | 197 | $cat_rows = $subcats = array(); |
@@ -320,11 +320,11 @@ discard block |
||
| 320 | 320 | } |
| 321 | 321 | |
| 322 | 322 | /** |
| 323 | - * Get informations about a cat or subcat |
|
| 324 | - * |
|
| 325 | - * @param int $cat_id The category ID |
|
| 326 | - * @return null|false |
|
| 327 | - */ |
|
| 323 | + * Get informations about a cat or subcat |
|
| 324 | + * |
|
| 325 | + * @param int $cat_id The category ID |
|
| 326 | + * @return null|false |
|
| 327 | + */ |
|
| 328 | 328 | public function get($cat_id = 0) |
| 329 | 329 | { |
| 330 | 330 | if ($cat_id) |
@@ -352,11 +352,11 @@ discard block |
||
| 352 | 352 | } |
| 353 | 353 | |
| 354 | 354 | /** |
| 355 | - * Create category navigation links for given category, create parent |
|
| 356 | - * list if currently null, assign basic category info to template |
|
| 357 | - * |
|
| 358 | - * @param array $dir_cat_data |
|
| 359 | - */ |
|
| 355 | + * Create category navigation links for given category, create parent |
|
| 356 | + * list if currently null, assign basic category info to template |
|
| 357 | + * |
|
| 358 | + * @param array $dir_cat_data |
|
| 359 | + */ |
|
| 360 | 360 | public function generate_dir_nav(&$dir_cat_data) |
| 361 | 361 | { |
| 362 | 362 | global $phpbb_container; |
@@ -393,12 +393,12 @@ discard block |
||
| 393 | 393 | } |
| 394 | 394 | |
| 395 | 395 | /** |
| 396 | - * Return good key language |
|
| 397 | - * |
|
| 398 | - * @param bool $validate True if approbation needed before publication |
|
| 399 | - * @return string Information about approval, depends on user auth level |
|
| 400 | - * @throws \phpbb\exception\runtime_exception |
|
| 401 | - */ |
|
| 396 | + * Return good key language |
|
| 397 | + * |
|
| 398 | + * @param bool $validate True if approbation needed before publication |
|
| 399 | + * @return string Information about approval, depends on user auth level |
|
| 400 | + * @throws \phpbb\exception\runtime_exception |
|
| 401 | + */ |
|
| 402 | 402 | public function dir_submit_type($validate) |
| 403 | 403 | { |
| 404 | 404 | if ($validate && !$this->auth->acl_get('a_')) |
@@ -422,15 +422,15 @@ discard block |
||
| 422 | 422 | } |
| 423 | 423 | |
| 424 | 424 | /** |
| 425 | - * Category watching common code |
|
| 426 | - * |
|
| 427 | - * @param string $mode Watch or unwatch a category |
|
| 428 | - * @param array $s_watching An empty array, passed by reference |
|
| 429 | - * @param int $user_id The user ID |
|
| 430 | - * @param int $cat_id The category ID |
|
| 431 | - * @param string $notify_status User is watching the category? |
|
| 432 | - * @return null|string |
|
| 433 | - */ |
|
| 425 | + * Category watching common code |
|
| 426 | + * |
|
| 427 | + * @param string $mode Watch or unwatch a category |
|
| 428 | + * @param array $s_watching An empty array, passed by reference |
|
| 429 | + * @param int $user_id The user ID |
|
| 430 | + * @param int $cat_id The category ID |
|
| 431 | + * @param string $notify_status User is watching the category? |
|
| 432 | + * @return null|string |
|
| 433 | + */ |
|
| 434 | 434 | public function watch_categorie($mode, &$s_watching, $user_id, $cat_id, $notify_status) |
| 435 | 435 | { |
| 436 | 436 | // Is user watching this thread? |
@@ -516,11 +516,11 @@ discard block |
||
| 516 | 516 | } |
| 517 | 517 | |
| 518 | 518 | /** |
| 519 | - * Return Category name |
|
| 520 | - * |
|
| 521 | - * @param int $cat_id The category ID |
|
| 522 | - * @return string The category name |
|
| 523 | - */ |
|
| 519 | + * Return Category name |
|
| 520 | + * |
|
| 521 | + * @param int $cat_id The category ID |
|
| 522 | + * @return string The category name |
|
| 523 | + */ |
|
| 524 | 524 | static public function getname($cat_id) |
| 525 | 525 | { |
| 526 | 526 | global $db; |