@@ -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; |
@@ -87,19 +87,19 @@ discard block |
||
| 87 | 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 | - $this->db = $db; |
|
| 91 | - $this->config = $config; |
|
| 90 | + $this->db = $db; |
|
| 91 | + $this->config = $config; |
|
| 92 | 92 | $this->language = $language; |
| 93 | 93 | $this->template = $template; |
| 94 | 94 | $this->user = $user; |
| 95 | - $this->helper = $helper; |
|
| 96 | - $this->request = $request; |
|
| 95 | + $this->helper = $helper; |
|
| 96 | + $this->request = $request; |
|
| 97 | 97 | $this->auth = $auth; |
| 98 | - $this->captcha_factory = $captcha_factory; |
|
| 98 | + $this->captcha_factory = $captcha_factory; |
|
| 99 | 99 | $this->categorie = $categorie; |
| 100 | 100 | $this->link = $link; |
| 101 | 101 | $this->root_path = $root_path; |
| 102 | - $this->php_ext = $php_ext; |
|
| 102 | + $this->php_ext = $php_ext; |
|
| 103 | 103 | |
| 104 | 104 | $language->add_lang('directory', 'ernadoo/phpbbdirectory'); |
| 105 | 105 | |
@@ -119,12 +119,12 @@ discard block |
||
| 119 | 119 | { |
| 120 | 120 | if ($this->request->is_set_post('cancel')) |
| 121 | 121 | { |
| 122 | - $redirect = $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $cat_id); |
|
| 122 | + $redirect = $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$cat_id); |
|
| 123 | 123 | redirect($redirect); |
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | $sql = 'SELECT link_user_id |
| 127 | - FROM ' . $this->links_table . ' |
|
| 127 | + FROM ' . $this->links_table.' |
|
| 128 | 128 | WHERE link_id = ' . (int) $link_id; |
| 129 | 129 | $result = $this->db->sql_query($sql); |
| 130 | 130 | $link_data = $this->db->sql_fetchrow($result); |
@@ -145,9 +145,9 @@ discard block |
||
| 145 | 145 | { |
| 146 | 146 | $this->link->del($cat_id, $link_id); |
| 147 | 147 | |
| 148 | - $meta_info = $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $cat_id); |
|
| 148 | + $meta_info = $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$cat_id); |
|
| 149 | 149 | meta_refresh(3, $meta_info); |
| 150 | - $message = $this->language->lang('DIR_DELETE_OK') . '<br /><br />' . $this->language->lang('DIR_CLICK_RETURN_DIR', '<a href="' . $this->helper->route('ernadoo_phpbbdirectory_base_controller') . '">', '</a>') . '<br /><br />' . $this->language->lang('DIR_CLICK_RETURN_CAT', '<a href="' . $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $cat_id) . '">', '</a>'); |
|
| 150 | + $message = $this->language->lang('DIR_DELETE_OK').'<br /><br />'.$this->language->lang('DIR_CLICK_RETURN_DIR', '<a href="'.$this->helper->route('ernadoo_phpbbdirectory_base_controller').'">', '</a>').'<br /><br />'.$this->language->lang('DIR_CLICK_RETURN_CAT', '<a href="'.$this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$cat_id).'">', '</a>'); |
|
| 151 | 151 | return $this->helper->message($message); |
| 152 | 152 | } |
| 153 | 153 | else |
@@ -167,7 +167,7 @@ discard block |
||
| 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 |
| 170 | - FROM ' . $this->links_table . ' |
|
| 170 | + FROM ' . $this->links_table.' |
|
| 171 | 171 | WHERE link_id = ' . (int) $link_id; |
| 172 | 172 | $result = $this->db->sql_query($sql); |
| 173 | 173 | $link_data = $this->db->sql_fetchrow($result); |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | $cat_id = $this->request->variable('id', $cat_id); |
| 188 | 188 | $submit = $this->request->is_set_post('submit') ? true : false; |
| 189 | 189 | $refresh = $this->request->is_set_post('refresh_vc') ? true : false; |
| 190 | - $title = $this->language->lang('DIR_EDIT_SITE'); |
|
| 190 | + $title = $this->language->lang('DIR_EDIT_SITE'); |
|
| 191 | 191 | |
| 192 | 192 | $this->template->assign_block_vars('dir_navlinks', array( |
| 193 | 193 | 'FORUM_NAME' => $title, |
@@ -211,15 +211,15 @@ discard block |
||
| 211 | 211 | 'old_banner' => $link_data['link_banner'], |
| 212 | 212 | ); |
| 213 | 213 | |
| 214 | - $site_description = generate_text_for_edit($link_data['link_description'], $link_data['link_uid'], $link_data['link_flags']); |
|
| 215 | - $link_data['link_banner'] = (preg_match('/^(http:\/\/|https:\/\/|ftp:\/\/|ftps:\/\/|www\.).+/si', $link_data['link_banner'])) ? $link_data['link_banner'] : ''; |
|
| 214 | + $site_description = generate_text_for_edit($link_data['link_description'], $link_data['link_uid'], $link_data['link_flags']); |
|
| 215 | + $link_data['link_banner'] = (preg_match('/^(http:\/\/|https:\/\/|ftp:\/\/|ftps:\/\/|www\.).+/si', $link_data['link_banner'])) ? $link_data['link_banner'] : ''; |
|
| 216 | 216 | |
| 217 | - $this->url = $link_data['link_url']; |
|
| 218 | - $this->site_name = $link_data['link_name']; |
|
| 217 | + $this->url = $link_data['link_url']; |
|
| 218 | + $this->site_name = $link_data['link_name']; |
|
| 219 | 219 | $this->description = $site_description['text']; |
| 220 | 220 | $this->guest_email = $link_data['link_guest_email']; |
| 221 | - $this->rss = $link_data['link_rss']; |
|
| 222 | - $this->banner = $link_data['link_banner']; |
|
| 221 | + $this->rss = $link_data['link_rss']; |
|
| 222 | + $this->banner = $link_data['link_banner']; |
|
| 223 | 223 | $this->back = $link_data['link_back']; |
| 224 | 224 | $this->flag = $link_data['link_flag']; |
| 225 | 225 | } |
@@ -246,7 +246,7 @@ discard block |
||
| 246 | 246 | $cat_id = $this->request->variable('id', $cat_id); |
| 247 | 247 | $submit = $this->request->is_set_post('submit') ? true : false; |
| 248 | 248 | $refresh = $this->request->is_set_post('refresh_vc') ? true : false; |
| 249 | - $title = $this->language->lang('DIR_NEW_SITE'); |
|
| 249 | + $title = $this->language->lang('DIR_NEW_SITE'); |
|
| 250 | 250 | |
| 251 | 251 | $this->template->assign_block_vars('dir_navlinks', array( |
| 252 | 252 | 'FORUM_NAME' => $title, |
@@ -310,7 +310,7 @@ discard block |
||
| 310 | 310 | |
| 311 | 311 | // We check if user had already vot for this website. |
| 312 | 312 | $sql = 'SELECT vote_link_id |
| 313 | - FROM ' . $this->votes_table . ' |
|
| 313 | + FROM ' . $this->votes_table.' |
|
| 314 | 314 | WHERE ' . $this->db->sql_build_array('SELECT', $data); |
| 315 | 315 | $result = $this->db->sql_query($sql); |
| 316 | 316 | $data = $this->db->sql_fetchrow($result); |
@@ -322,9 +322,9 @@ discard block |
||
| 322 | 322 | |
| 323 | 323 | $this->link->add_vote($link_id); |
| 324 | 324 | |
| 325 | - $meta_info = $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $cat_id); |
|
| 325 | + $meta_info = $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$cat_id); |
|
| 326 | 326 | meta_refresh(3, $meta_info); |
| 327 | - $message = $this->language->lang('DIR_VOTE_OK') . '<br /><br />' . $this->language->lang('DIR_CLICK_RETURN_CAT', '<a href="' . $meta_info . '">', '</a>'); |
|
| 327 | + $message = $this->language->lang('DIR_VOTE_OK').'<br /><br />'.$this->language->lang('DIR_CLICK_RETURN_CAT', '<a href="'.$meta_info.'">', '</a>'); |
|
| 328 | 328 | return $this->helper->message($message); |
| 329 | 329 | } |
| 330 | 330 | |
@@ -349,18 +349,18 @@ discard block |
||
| 349 | 349 | return $this->helper->message('FORM_INVALID'); |
| 350 | 350 | } |
| 351 | 351 | |
| 352 | - $this->url = $this->request->variable('url', ''); |
|
| 353 | - $this->site_name = $this->request->variable('site_name', '', true); |
|
| 352 | + $this->url = $this->request->variable('url', ''); |
|
| 353 | + $this->site_name = $this->request->variable('site_name', '', true); |
|
| 354 | 354 | $this->description = $this->request->variable('description', '', true); |
| 355 | 355 | $this->guest_email = $this->request->variable('guest_email', ''); |
| 356 | - $this->rss = $this->request->variable('rss', ''); |
|
| 357 | - $this->banner = $this->request->variable('banner', ''); |
|
| 356 | + $this->rss = $this->request->variable('rss', ''); |
|
| 357 | + $this->banner = $this->request->variable('banner', ''); |
|
| 358 | 358 | $this->back = $this->request->variable('back', ''); |
| 359 | 359 | $this->flag = $this->request->variable('flag', ''); |
| 360 | 360 | |
| 361 | 361 | if (!function_exists('validate_data')) |
| 362 | 362 | { |
| 363 | - include($this->root_path . 'includes/functions_user.' . $this->php_ext); |
|
| 363 | + include($this->root_path.'includes/functions_user.'.$this->php_ext); |
|
| 364 | 364 | } |
| 365 | 365 | |
| 366 | 366 | // We define variables to check |
@@ -383,17 +383,17 @@ discard block |
||
| 383 | 383 | 'site_name' => array( |
| 384 | 384 | array('string', false, 1, 100)), |
| 385 | 385 | 'website' => array( |
| 386 | - array('string', false, 12, 255), |
|
| 387 | - array('match', true, '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i')), |
|
| 386 | + array('string', false, 12, 255), |
|
| 387 | + array('match', true, '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i')), |
|
| 388 | 388 | 'description' => array( |
| 389 | 389 | array('string', !$this->categorie->data['cat_must_describe'], 1, $this->config['dir_length_describe'])), |
| 390 | 390 | 'rss' => array( |
| 391 | 391 | array('string', true, 12, 255), |
| 392 | - array('match', empty($this->rss), '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i')), |
|
| 392 | + array('match', empty($this->rss), '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i')), |
|
| 393 | 393 | 'banner' => array( |
| 394 | 394 | array('string', true, 5, 255)), |
| 395 | 395 | 'back' => array( |
| 396 | - array('string', !$this->categorie->data['cat_link_back'], 12, 255), |
|
| 396 | + array('string', !$this->categorie->data['cat_link_back'], 12, 255), |
|
| 397 | 397 | array(array($this->link, 'link_back'), true)), |
| 398 | 398 | 'cat' => array( |
| 399 | 399 | array('num', '', 1)) |
@@ -439,8 +439,8 @@ discard block |
||
| 439 | 439 | // Still no errors?? So let's go! |
| 440 | 440 | if (!$error) |
| 441 | 441 | { |
| 442 | - $this->banner = (!$this->banner && !$this->request->is_set_post('delete_banner')) ? $this->request->variable('old_banner', '') : $this->banner; |
|
| 443 | - $this->url = $this->link->clean_url($this->url); |
|
| 442 | + $this->banner = (!$this->banner && !$this->request->is_set_post('delete_banner')) ? $this->request->variable('old_banner', '') : $this->banner; |
|
| 443 | + $this->url = $this->link->clean_url($this->url); |
|
| 444 | 444 | |
| 445 | 445 | $data_edit = array( |
| 446 | 446 | 'link_user_id' => $this->link_user_id, |
@@ -485,10 +485,10 @@ discard block |
||
| 485 | 485 | $this->link->add($data_add, $need_approval); |
| 486 | 486 | } |
| 487 | 487 | |
| 488 | - $meta_info = $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $cat_id); |
|
| 488 | + $meta_info = $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$cat_id); |
|
| 489 | 489 | meta_refresh(3, $meta_info); |
| 490 | 490 | $message = ($need_approval) ? $this->language->lang('DIR_'.strtoupper($mode).'_SITE_ACTIVE') : $this->language->lang('DIR_'.strtoupper($mode).'_SITE_OK'); |
| 491 | - $message = $message . '<br /><br />' . $this->language->lang('DIR_CLICK_RETURN_DIR', '<a href="' . $this->helper->route('ernadoo_phpbbdirectory_base_controller') . '">', '</a>') . '<br /><br />' . $this->language->lang('DIR_CLICK_RETURN_CAT', '<a href="' . $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $cat_id) . '">', '</a>'); |
|
| 491 | + $message = $message.'<br /><br />'.$this->language->lang('DIR_CLICK_RETURN_DIR', '<a href="'.$this->helper->route('ernadoo_phpbbdirectory_base_controller').'">', '</a>').'<br /><br />'.$this->language->lang('DIR_CLICK_RETURN_CAT', '<a href="'.$this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$cat_id).'">', '</a>'); |
|
| 492 | 492 | return $this->helper->message($message); |
| 493 | 493 | } |
| 494 | 494 | else |
@@ -517,7 +517,7 @@ discard block |
||
| 517 | 517 | { |
| 518 | 518 | if (!function_exists('file_gc')) |
| 519 | 519 | { |
| 520 | - include($this->root_path . 'includes/functions_download.' . $this->php_ext); |
|
| 520 | + include($this->root_path.'includes/functions_download.'.$this->php_ext); |
|
| 521 | 521 | } |
| 522 | 522 | |
| 523 | 523 | $file_path = $this->get_banner_path($banner_img); |
@@ -572,7 +572,7 @@ discard block |
||
| 572 | 572 | |
| 573 | 573 | if (!function_exists('display_custom_bbcodes')) |
| 574 | 574 | { |
| 575 | - include($this->root_path . 'includes/functions_display.' . $this->php_ext); |
|
| 575 | + include($this->root_path.'includes/functions_display.'.$this->php_ext); |
|
| 576 | 576 | } |
| 577 | 577 | display_custom_bbcodes(); |
| 578 | 578 | add_form_key('dir_form'); |
@@ -581,17 +581,17 @@ discard block |
||
| 581 | 581 | $flag_path = $ext_path.'images/flags/'; |
| 582 | 582 | |
| 583 | 583 | $s_guest = (!$this->user->data['is_registered'] || !empty($this->guest_email)); |
| 584 | - $s_rss = $this->config['dir_activ_rss']; |
|
| 585 | - $s_banner = $this->config['dir_activ_banner']; |
|
| 584 | + $s_rss = $this->config['dir_activ_rss']; |
|
| 585 | + $s_banner = $this->config['dir_activ_banner']; |
|
| 586 | 586 | $s_back = $this->categorie->data['cat_link_back']; |
| 587 | 587 | $s_flag = $this->config['dir_activ_flag']; |
| 588 | 588 | |
| 589 | 589 | $this->template->assign_vars(array( |
| 590 | - 'BBCODE_STATUS' => ($this->config['allow_bbcode']) ? $this->language->lang('BBCODE_IS_ON', '<a href="' . append_sid($this->root_path."faq.$this->php_ext", 'mode=bbcode') . '">', '</a>') : $this->language->lang('BBCODE_IS_OFF', '<a href="' . append_sid($this->root_path."faq.$this->php_ext", 'mode=bbcode') . '">', '</a>'), |
|
| 591 | - 'IMG_STATUS' => ($this->config['allow_bbcode']) ? $this->language->lang('IMAGES_ARE_ON') : $this->language->lang('IMAGES_ARE_OFF'), |
|
| 590 | + 'BBCODE_STATUS' => ($this->config['allow_bbcode']) ? $this->language->lang('BBCODE_IS_ON', '<a href="'.append_sid($this->root_path."faq.$this->php_ext", 'mode=bbcode').'">', '</a>') : $this->language->lang('BBCODE_IS_OFF', '<a href="'.append_sid($this->root_path."faq.$this->php_ext", 'mode=bbcode').'">', '</a>'), |
|
| 591 | + 'IMG_STATUS' => ($this->config['allow_bbcode']) ? $this->language->lang('IMAGES_ARE_ON') : $this->language->lang('IMAGES_ARE_OFF'), |
|
| 592 | 592 | 'SMILIES_STATUS' => ($this->config['allow_smilies']) ? $this->language->lang('SMILIES_ARE_ON') : $this->language->lang('SMILIES_ARE_OFF'), |
| 593 | 593 | 'URL_STATUS' => ($this->config['allow_post_links']) ? $this->language->lang('URL_IS_ON') : $this->language->lang('URL_IS_OFF'), |
| 594 | - 'FLASH_STATUS' => ($this->config['allow_bbcode'] && $this->config['allow_post_flash']) ? $this->language->lang('FLASH_IS_ON') : $this->language->lang('FLASH_IS_OFF'), |
|
| 594 | + 'FLASH_STATUS' => ($this->config['allow_bbcode'] && $this->config['allow_post_flash']) ? $this->language->lang('FLASH_IS_ON') : $this->language->lang('FLASH_IS_OFF'), |
|
| 595 | 595 | |
| 596 | 596 | 'L_TITLE' => $title, |
| 597 | 597 | 'L_DIR_DESCRIPTION_EXP' => $this->language->lang('DIR_DESCRIPTION_EXP', $this->config['dir_length_describe']), |