@@ -157,7 +157,7 @@ |
||
157 | 157 | */ |
158 | 158 | public function get_url() |
159 | 159 | { |
160 | - return $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $this->get_data('cat_id')); |
|
160 | + return $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$this->get_data('cat_id')); |
|
161 | 161 | } |
162 | 162 | |
163 | 163 | /** |
@@ -122,9 +122,9 @@ discard block |
||
122 | 122 | $users = array(); |
123 | 123 | |
124 | 124 | $sql = 'SELECT user_id |
125 | - FROM ' . $this->watch_table . ' |
|
126 | - WHERE cat_id = ' . (int) $data['cat_id'] . ' |
|
127 | - AND notify_status = ' . NOTIFY_YES . ' |
|
125 | + FROM ' . $this->watch_table.' |
|
126 | + WHERE cat_id = ' . (int) $data['cat_id'].' |
|
127 | + AND notify_status = ' . NOTIFY_YES.' |
|
128 | 128 | AND user_id <> ' . (int) $data['user_from']; |
129 | 129 | $result = $this->db->sql_query($sql); |
130 | 130 | while ($row = $this->db->sql_fetchrow($result)) |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | */ |
201 | 201 | public function get_url() |
202 | 202 | { |
203 | - return $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $this->get_data('cat_id')); |
|
203 | + return $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$this->get_data('cat_id')); |
|
204 | 204 | } |
205 | 205 | |
206 | 206 | /** |
@@ -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_user_id |
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); |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | $cat_id = $this->request->variable('id', $cat_id); |
184 | 184 | $submit = $this->request->is_set_post('submit') ? true : false; |
185 | 185 | $refresh = $this->request->is_set_post('refresh_vc') ? true : false; |
186 | - $title = $this->language->lang('DIR_EDIT_SITE'); |
|
186 | + $title = $this->language->lang('DIR_EDIT_SITE'); |
|
187 | 187 | |
188 | 188 | $this->template->assign_block_vars('dir_navlinks', array( |
189 | 189 | 'FORUM_NAME' => $title, |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | else |
204 | 204 | { |
205 | 205 | $sql = 'SELECT link_id, link_uid, 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 |
206 | - FROM ' . $this->links_table . ' |
|
206 | + FROM ' . $this->links_table.' |
|
207 | 207 | WHERE link_id = ' . (int) $link_id; |
208 | 208 | $result = $this->db->sql_query($sql); |
209 | 209 | |
@@ -219,15 +219,15 @@ discard block |
||
219 | 219 | 'old_banner' => $site['link_banner'], |
220 | 220 | ); |
221 | 221 | |
222 | - $site_description = generate_text_for_edit($site['link_description'], $site['link_uid'], $site['link_flags']); |
|
223 | - $site['link_banner'] = (preg_match('/^(http:\/\/|https:\/\/|ftp:\/\/|ftps:\/\/|www\.).+/si', $site['link_banner'])) ? $site['link_banner'] : ''; |
|
222 | + $site_description = generate_text_for_edit($site['link_description'], $site['link_uid'], $site['link_flags']); |
|
223 | + $site['link_banner'] = (preg_match('/^(http:\/\/|https:\/\/|ftp:\/\/|ftps:\/\/|www\.).+/si', $site['link_banner'])) ? $site['link_banner'] : ''; |
|
224 | 224 | |
225 | - $this->url = $site['link_url']; |
|
226 | - $this->site_name = $site['link_name']; |
|
225 | + $this->url = $site['link_url']; |
|
226 | + $this->site_name = $site['link_name']; |
|
227 | 227 | $this->description = $site_description['text']; |
228 | 228 | $this->guest_email = $site['link_guest_email']; |
229 | - $this->rss = $site['link_rss']; |
|
230 | - $this->banner = $site['link_banner']; |
|
229 | + $this->rss = $site['link_rss']; |
|
230 | + $this->banner = $site['link_banner']; |
|
231 | 231 | $this->back = $site['link_back']; |
232 | 232 | $this->flag = $site['link_flag']; |
233 | 233 | } |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | $cat_id = $this->request->variable('id', $cat_id); |
255 | 255 | $submit = $this->request->is_set_post('submit') ? true : false; |
256 | 256 | $refresh = $this->request->is_set_post('refresh_vc') ? true : false; |
257 | - $title = $this->language->lang('DIR_NEW_SITE'); |
|
257 | + $title = $this->language->lang('DIR_NEW_SITE'); |
|
258 | 258 | |
259 | 259 | $this->template->assign_block_vars('dir_navlinks', array( |
260 | 260 | 'FORUM_NAME' => $title, |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | |
319 | 319 | // We check if user had already vot for this website. |
320 | 320 | $sql = 'SELECT vote_link_id |
321 | - FROM ' . $this->votes_table . ' |
|
321 | + FROM ' . $this->votes_table.' |
|
322 | 322 | WHERE ' . $this->db->sql_build_array('SELECT', $data); |
323 | 323 | $result = $this->db->sql_query($sql); |
324 | 324 | $data = $this->db->sql_fetchrow($result); |
@@ -330,9 +330,9 @@ discard block |
||
330 | 330 | |
331 | 331 | $this->link->add_vote($link_id); |
332 | 332 | |
333 | - $meta_info = $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $cat_id); |
|
333 | + $meta_info = $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$cat_id); |
|
334 | 334 | meta_refresh(3, $meta_info); |
335 | - $message = $this->language->lang('DIR_VOTE_OK') . '<br /><br />' . $this->language->lang('DIR_CLICK_RETURN_CAT', '<a href="' . $meta_info . '">', '</a>'); |
|
335 | + $message = $this->language->lang('DIR_VOTE_OK').'<br /><br />'.$this->language->lang('DIR_CLICK_RETURN_CAT', '<a href="'.$meta_info.'">', '</a>'); |
|
336 | 336 | return $this->helper->message($message); |
337 | 337 | } |
338 | 338 | |
@@ -357,18 +357,18 @@ discard block |
||
357 | 357 | return $this->helper->message('FORM_INVALID'); |
358 | 358 | } |
359 | 359 | |
360 | - $this->url = $this->request->variable('url', ''); |
|
361 | - $this->site_name = $this->request->variable('site_name', '', true); |
|
360 | + $this->url = $this->request->variable('url', ''); |
|
361 | + $this->site_name = $this->request->variable('site_name', '', true); |
|
362 | 362 | $this->description = $this->request->variable('description', '', true); |
363 | 363 | $this->guest_email = $this->request->variable('guest_email', ''); |
364 | - $this->rss = $this->request->variable('rss', ''); |
|
365 | - $this->banner = $this->request->variable('banner', ''); |
|
364 | + $this->rss = $this->request->variable('rss', ''); |
|
365 | + $this->banner = $this->request->variable('banner', ''); |
|
366 | 366 | $this->back = $this->request->variable('back', ''); |
367 | 367 | $this->flag = $this->request->variable('flag', ''); |
368 | 368 | |
369 | 369 | if (!function_exists('validate_data')) |
370 | 370 | { |
371 | - include($this->root_path . 'includes/functions_user.' . $this->php_ext); |
|
371 | + include($this->root_path.'includes/functions_user.'.$this->php_ext); |
|
372 | 372 | } |
373 | 373 | |
374 | 374 | // We define variables to check |
@@ -391,17 +391,17 @@ discard block |
||
391 | 391 | 'site_name' => array( |
392 | 392 | array('string', false, 1, 100)), |
393 | 393 | 'website' => array( |
394 | - array('string', false, 12, 255), |
|
395 | - array('match', true, '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i')), |
|
394 | + array('string', false, 12, 255), |
|
395 | + array('match', true, '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i')), |
|
396 | 396 | 'description' => array( |
397 | 397 | array('string', !$this->categorie->data['cat_must_describe'], 1, $this->config['dir_length_describe'])), |
398 | 398 | 'rss' => array( |
399 | 399 | array('string', true, 12, 255), |
400 | - array('match', empty($this->rss), '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i')), |
|
400 | + array('match', empty($this->rss), '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i')), |
|
401 | 401 | 'banner' => array( |
402 | 402 | array('string', true, 5, 255)), |
403 | 403 | 'back' => array( |
404 | - array('string', !$this->categorie->data['cat_link_back'], 12, 255), |
|
404 | + array('string', !$this->categorie->data['cat_link_back'], 12, 255), |
|
405 | 405 | array(array($this->link, 'link_back'), true)), |
406 | 406 | 'cat' => array( |
407 | 407 | array('num', '', 1)) |
@@ -450,8 +450,8 @@ discard block |
||
450 | 450 | // Still no errors?? So let's go! |
451 | 451 | if (!$error) |
452 | 452 | { |
453 | - $this->banner = (!$this->banner && !$this->request->is_set_post('delete_banner')) ? $this->request->variable('old_banner', '') : $this->banner; |
|
454 | - $this->url = $this->link->clean_url($this->url); |
|
453 | + $this->banner = (!$this->banner && !$this->request->is_set_post('delete_banner')) ? $this->request->variable('old_banner', '') : $this->banner; |
|
454 | + $this->url = $this->link->clean_url($this->url); |
|
455 | 455 | |
456 | 456 | $data_edit = array( |
457 | 457 | 'link_user_id' => $this->link_user_id, |
@@ -497,10 +497,10 @@ discard block |
||
497 | 497 | $this->link->add($data_add, $need_approval); |
498 | 498 | } |
499 | 499 | |
500 | - $meta_info = $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $cat_id); |
|
500 | + $meta_info = $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$cat_id); |
|
501 | 501 | meta_refresh(3, $meta_info); |
502 | 502 | $message = ($need_approval) ? $this->language->lang('DIR_'.strtoupper($mode).'_SITE_ACTIVE') : $this->language->lang('DIR_'.strtoupper($mode).'_SITE_OK'); |
503 | - $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>'); |
|
503 | + $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>'); |
|
504 | 504 | return $this->helper->message($message); |
505 | 505 | } |
506 | 506 | else |
@@ -529,7 +529,7 @@ discard block |
||
529 | 529 | { |
530 | 530 | if (!function_exists('file_gc')) |
531 | 531 | { |
532 | - include($this->root_path . 'includes/functions_download.' . $this->php_ext); |
|
532 | + include($this->root_path.'includes/functions_download.'.$this->php_ext); |
|
533 | 533 | } |
534 | 534 | |
535 | 535 | $file_path = $this->get_banner_path($banner_img); |
@@ -584,7 +584,7 @@ discard block |
||
584 | 584 | |
585 | 585 | if (!function_exists('display_custom_bbcodes')) |
586 | 586 | { |
587 | - include($this->root_path . 'includes/functions_display.' . $this->php_ext); |
|
587 | + include($this->root_path.'includes/functions_display.'.$this->php_ext); |
|
588 | 588 | } |
589 | 589 | display_custom_bbcodes(); |
590 | 590 | add_form_key('dir_form'); |
@@ -593,17 +593,17 @@ discard block |
||
593 | 593 | $flag_path = $ext_path.'images/flags/'; |
594 | 594 | |
595 | 595 | $s_guest = (!$this->user->data['is_registered'] || !empty($this->guest_email)); |
596 | - $s_rss = $this->config['dir_activ_rss']; |
|
597 | - $s_banner = $this->config['dir_activ_banner']; |
|
596 | + $s_rss = $this->config['dir_activ_rss']; |
|
597 | + $s_banner = $this->config['dir_activ_banner']; |
|
598 | 598 | $s_back = $this->categorie->data['cat_link_back']; |
599 | 599 | $s_flag = $this->config['dir_activ_flag']; |
600 | 600 | |
601 | 601 | $this->template->assign_vars(array( |
602 | - '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>'), |
|
603 | - 'IMG_STATUS' => ($this->config['allow_bbcode']) ? $this->language->lang('IMAGES_ARE_ON') : $this->language->lang('IMAGES_ARE_OFF'), |
|
602 | + '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>'), |
|
603 | + 'IMG_STATUS' => ($this->config['allow_bbcode']) ? $this->language->lang('IMAGES_ARE_ON') : $this->language->lang('IMAGES_ARE_OFF'), |
|
604 | 604 | 'SMILIES_STATUS' => ($this->config['allow_smilies']) ? $this->language->lang('SMILIES_ARE_ON') : $this->language->lang('SMILIES_ARE_OFF'), |
605 | 605 | 'URL_STATUS' => ($this->config['allow_post_links']) ? $this->language->lang('URL_IS_ON') : $this->language->lang('URL_IS_OFF'), |
606 | - 'FLASH_STATUS' => ($this->config['allow_bbcode'] && $this->config['allow_post_flash']) ? $this->language->lang('FLASH_IS_ON') : $this->language->lang('FLASH_IS_OFF'), |
|
606 | + 'FLASH_STATUS' => ($this->config['allow_bbcode'] && $this->config['allow_post_flash']) ? $this->language->lang('FLASH_IS_ON') : $this->language->lang('FLASH_IS_OFF'), |
|
607 | 607 | |
608 | 608 | 'L_TITLE' => $title, |
609 | 609 | 'L_DIR_DESCRIPTION_EXP' => $this->language->lang('DIR_DESCRIPTION_EXP', $this->config['dir_length_describe']), |
@@ -60,13 +60,13 @@ discard block |
||
60 | 60 | */ |
61 | 61 | 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\cron\manager $cron) |
62 | 62 | { |
63 | - $this->db = $db; |
|
64 | - $this->config = $config; |
|
63 | + $this->db = $db; |
|
64 | + $this->config = $config; |
|
65 | 65 | $this->language = $language; |
66 | 66 | $this->template = $template; |
67 | 67 | $this->user = $user; |
68 | - $this->helper = $helper; |
|
69 | - $this->request = $request; |
|
68 | + $this->helper = $helper; |
|
69 | + $this->request = $request; |
|
70 | 70 | $this->auth = $auth; |
71 | 71 | $this->cron = $cron; |
72 | 72 | } |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | public function make_cat_jumpbox() |
91 | 91 | { |
92 | 92 | $sql = 'SELECT cat_id, cat_name, parent_id, left_id, right_id |
93 | - FROM ' . $this->categories_table . ' |
|
93 | + FROM ' . $this->categories_table.' |
|
94 | 94 | ORDER BY left_id ASC'; |
95 | 95 | $result = $this->db->sql_query($sql, 600); |
96 | 96 | |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | 'FORUM_ID' => $row['cat_id'], |
120 | 120 | 'FORUM_NAME' => $row['cat_name'], |
121 | 121 | 'S_FORUM_COUNT' => $iteration, |
122 | - 'LINK' => $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $row['cat_id']), |
|
122 | + 'LINK' => $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$row['cat_id']), |
|
123 | 123 | )); |
124 | 124 | |
125 | 125 | for ($i = 0; $i < $padding; $i++) |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | |
152 | 152 | // This query is identical to the jumpbox one |
153 | 153 | $sql = 'SELECT cat_id, cat_name, parent_id, left_id, right_id |
154 | - FROM ' . $this->categories_table . ' |
|
154 | + FROM ' . $this->categories_table.' |
|
155 | 155 | ORDER BY left_id ASC'; |
156 | 156 | $result = $this->db->sql_query($sql, 600); |
157 | 157 | |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | } |
182 | 182 | |
183 | 183 | $selected = (($row['cat_id'] == $select_id) ? ' selected="selected"' : ''); |
184 | - $cat_list .= '<option value="' . $row['cat_id'] . '"' . (($disabled) ? ' disabled="disabled" class="disabled-option"' : $selected) . '>' . $padding . $row['cat_name'] . '</option>'; |
|
184 | + $cat_list .= '<option value="'.$row['cat_id'].'"'.(($disabled) ? ' disabled="disabled" class="disabled-option"' : $selected).'>'.$padding.$row['cat_name'].'</option>'; |
|
185 | 185 | } |
186 | 186 | $this->db->sql_freeresult($result); |
187 | 187 | unset($padding_store); |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | */ |
197 | 197 | public function display() |
198 | 198 | { |
199 | - $cat_rows = $subcats = array(); |
|
199 | + $cat_rows = $subcats = array(); |
|
200 | 200 | $parent_id = $visible_cats = 0; |
201 | 201 | |
202 | 202 | $sql_array = array( |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | else |
215 | 215 | { |
216 | 216 | $root_data = $this->data; |
217 | - $sql_where = 'left_id > ' . $root_data['left_id'] . ' AND left_id < ' . $root_data['right_id']; |
|
217 | + $sql_where = 'left_id > '.$root_data['left_id'].' AND left_id < '.$root_data['right_id']; |
|
218 | 218 | } |
219 | 219 | |
220 | 220 | $sql = $this->db->sql_build_query('SELECT', array( |
@@ -261,12 +261,12 @@ discard block |
||
261 | 261 | { |
262 | 262 | foreach ($subcats[$dir_cat_id] as $subcat_id => $subcat_row) |
263 | 263 | { |
264 | - $row['cat_links'] = ($row['cat_count_all']) ? ($row['cat_links']+$subcat_row['links']) : $row['cat_links']; |
|
264 | + $row['cat_links'] = ($row['cat_count_all']) ? ($row['cat_links'] + $subcat_row['links']) : $row['cat_links']; |
|
265 | 265 | |
266 | 266 | if ($subcat_row['display'] && $subcat_row['parent_id'] == $dir_cat_id) |
267 | 267 | { |
268 | 268 | $subcats_list[] = array( |
269 | - 'link' => $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $subcat_id), |
|
269 | + 'link' => $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$subcat_id), |
|
270 | 270 | 'name' => $subcat_row['name'], |
271 | 271 | 'links' => $subcat_row['links'] |
272 | 272 | ); |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | 'CAT_LINKS' => $row['cat_links'], |
285 | 285 | 'CAT_IMG' => $this->get_img_path('icons', $row['cat_icon']), |
286 | 286 | |
287 | - 'U_CAT' => $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $row['cat_id']), |
|
287 | + 'U_CAT' => $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$row['cat_id']), |
|
288 | 288 | )); |
289 | 289 | |
290 | 290 | // Assign subcats loop for style authors |
@@ -316,7 +316,7 @@ discard block |
||
316 | 316 | if ($task->is_ready()) |
317 | 317 | { |
318 | 318 | $url = $task->get_url(); |
319 | - $this->template->assign_var('RUN_CRON_TASK', '<img src="' . $url . '" width="1" height="1" alt="" />'); |
|
319 | + $this->template->assign_var('RUN_CRON_TASK', '<img src="'.$url.'" width="1" height="1" alt="" />'); |
|
320 | 320 | } |
321 | 321 | } |
322 | 322 | } |
@@ -338,10 +338,10 @@ discard block |
||
338 | 338 | 'LEFT_JOIN' => array( |
339 | 339 | array( |
340 | 340 | 'FROM' => array($this->watch_table => 'w'), |
341 | - 'ON' => 'c.cat_id = w.cat_id AND w.user_id = ' . (int) $this->user->data['user_id'] |
|
341 | + 'ON' => 'c.cat_id = w.cat_id AND w.user_id = '.(int) $this->user->data['user_id'] |
|
342 | 342 | ), |
343 | 343 | ), |
344 | - 'WHERE' => 'c.cat_id = ' . (int) $cat_id |
|
344 | + 'WHERE' => 'c.cat_id = '.(int) $cat_id |
|
345 | 345 | ); |
346 | 346 | $sql = $this->db->sql_build_query('SELECT', $sql_array); |
347 | 347 | $result = $this->db->sql_query($sql); |
@@ -378,8 +378,8 @@ discard block |
||
378 | 378 | $this->template->assign_block_vars('dir_navlinks', array( |
379 | 379 | 'FORUM_NAME' => $parent_data['cat_name'], |
380 | 380 | 'FORUM_ID' => $parent_cat_id, |
381 | - 'MICRODATA' => $microdata_attr . '="' . $parent_cat_id . '"', |
|
382 | - 'U_VIEW_FORUM' => $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $parent_cat_id), |
|
381 | + 'MICRODATA' => $microdata_attr.'="'.$parent_cat_id.'"', |
|
382 | + 'U_VIEW_FORUM' => $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$parent_cat_id), |
|
383 | 383 | )); |
384 | 384 | } |
385 | 385 | } |
@@ -387,8 +387,8 @@ discard block |
||
387 | 387 | $this->template->assign_block_vars('dir_navlinks', array( |
388 | 388 | 'FORUM_NAME' => $dir_cat_data['cat_name'], |
389 | 389 | 'FORUM_ID' => $dir_cat_data['cat_id'], |
390 | - 'MICRODATA' => $microdata_attr . '="' . $dir_cat_data['cat_id'] . '"', |
|
391 | - 'U_VIEW_FORUM' => $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $dir_cat_data['cat_id']), |
|
390 | + 'MICRODATA' => $microdata_attr.'="'.$dir_cat_data['cat_id'].'"', |
|
391 | + 'U_VIEW_FORUM' => $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$dir_cat_data['cat_id']), |
|
392 | 392 | )); |
393 | 393 | |
394 | 394 | return; |
@@ -444,17 +444,17 @@ discard block |
||
444 | 444 | { |
445 | 445 | if ($mode == 'unwatch') |
446 | 446 | { |
447 | - $sql = 'DELETE FROM ' . $this->watch_table . " |
|
447 | + $sql = 'DELETE FROM '.$this->watch_table." |
|
448 | 448 | WHERE cat_id = $cat_id |
449 | 449 | AND user_id = $user_id"; |
450 | 450 | $this->db->sql_query($sql); |
451 | 451 | |
452 | - $redirect_url = $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $cat_id); |
|
452 | + $redirect_url = $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$cat_id); |
|
453 | 453 | $message = $this->language->lang('DIR_NOT_WATCHING_CAT'); |
454 | 454 | |
455 | 455 | if (!$this->request->is_ajax()) |
456 | 456 | { |
457 | - $message .= '<br /><br />' . $this->language->lang('DIR_CLICK_RETURN_CAT', '<a href="' . $redirect_url . '">', '</a>'); |
|
457 | + $message .= '<br /><br />'.$this->language->lang('DIR_CLICK_RETURN_CAT', '<a href="'.$redirect_url.'">', '</a>'); |
|
458 | 458 | } |
459 | 459 | |
460 | 460 | meta_refresh(3, $redirect_url); |
@@ -466,8 +466,8 @@ discard block |
||
466 | 466 | |
467 | 467 | if ($notify_status != NOTIFY_YES) |
468 | 468 | { |
469 | - $sql = 'UPDATE ' . $this->watch_table . ' |
|
470 | - SET notify_status = ' . NOTIFY_YES . " |
|
469 | + $sql = 'UPDATE '.$this->watch_table.' |
|
470 | + SET notify_status = ' . NOTIFY_YES." |
|
471 | 471 | WHERE cat_id = $cat_id |
472 | 472 | AND user_id = $user_id"; |
473 | 473 | $this->db->sql_query($sql); |
@@ -478,16 +478,16 @@ discard block |
||
478 | 478 | { |
479 | 479 | if ($mode == 'watch') |
480 | 480 | { |
481 | - $sql = 'INSERT INTO ' . $this->watch_table . " (user_id, cat_id, notify_status) |
|
482 | - VALUES ($user_id, $cat_id, " . NOTIFY_YES . ')'; |
|
481 | + $sql = 'INSERT INTO '.$this->watch_table." (user_id, cat_id, notify_status) |
|
482 | + VALUES ($user_id, $cat_id, ".NOTIFY_YES.')'; |
|
483 | 483 | $this->db->sql_query($sql); |
484 | 484 | |
485 | - $redirect_url = $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $cat_id); |
|
485 | + $redirect_url = $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$cat_id); |
|
486 | 486 | $message = $this->language->lang('DIR_ARE_WATCHING_CAT'); |
487 | 487 | |
488 | 488 | if (!$this->request->is_ajax()) |
489 | 489 | { |
490 | - $message .= '<br /><br />' . $this->language->lang('DIR_CLICK_RETURN_CAT', '<a href="' . $redirect_url . '">', '</a>'); |
|
490 | + $message .= '<br /><br />'.$this->language->lang('DIR_CLICK_RETURN_CAT', '<a href="'.$redirect_url.'">', '</a>'); |
|
491 | 491 | } |
492 | 492 | |
493 | 493 | meta_refresh(3, $redirect_url); |
@@ -507,10 +507,10 @@ discard block |
||
507 | 507 | |
508 | 508 | if ($can_watch) |
509 | 509 | { |
510 | - $s_watching['link'] = $this->helper->route('ernadoo_phpbbdirectory_suscribe_controller', array('cat_id' => $cat_id, 'mode' => (($is_watching) ? 'unwatch' : 'watch'))); |
|
510 | + $s_watching['link'] = $this->helper->route('ernadoo_phpbbdirectory_suscribe_controller', array('cat_id' => $cat_id, 'mode' => (($is_watching) ? 'unwatch' : 'watch'))); |
|
511 | 511 | $s_watching['link_toggle'] = $this->helper->route('ernadoo_phpbbdirectory_suscribe_controller', array('cat_id' => $cat_id, 'mode' => ((!$is_watching) ? 'unwatch' : 'watch'))); |
512 | - $s_watching['title'] = $this->language->lang((($is_watching) ? 'DIR_STOP' : 'DIR_START') . '_WATCHING_CAT'); |
|
513 | - $s_watching['title_toggle'] = $this->language->lang(((!$is_watching) ? 'DIR_STOP' : 'DIR_START') . '_WATCHING_CAT'); |
|
512 | + $s_watching['title'] = $this->language->lang((($is_watching) ? 'DIR_STOP' : 'DIR_START').'_WATCHING_CAT'); |
|
513 | + $s_watching['title_toggle'] = $this->language->lang(((!$is_watching) ? 'DIR_STOP' : 'DIR_START').'_WATCHING_CAT'); |
|
514 | 514 | $s_watching['is_watching'] = $is_watching; |
515 | 515 | } |
516 | 516 | |
@@ -530,7 +530,7 @@ discard block |
||
530 | 530 | $categories_table = $phpbb_container->getParameter('tables.dir.categories'); |
531 | 531 | |
532 | 532 | $sql = 'SELECT cat_name |
533 | - FROM ' . $categories_table . ' |
|
533 | + FROM ' . $categories_table.' |
|
534 | 534 | WHERE cat_id = ' . (int) $cat_id; |
535 | 535 | $result = $db->sql_query($sql); |
536 | 536 | $row = $db->sql_fetchrow($result); |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | { |
29 | 29 | return array( |
30 | 30 | 'add_columns' => array( |
31 | - $this->table_prefix . 'directory_cats' => array( |
|
31 | + $this->table_prefix.'directory_cats' => array( |
|
32 | 32 | 'cat_route' => array('VCHAR', '', 'after' => 'cat_name'), |
33 | 33 | ) |
34 | 34 | ), |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | { |
53 | 53 | return array( |
54 | 54 | 'drop_columns' => array( |
55 | - $this->table_prefix . 'directory_cats' => array( |
|
55 | + $this->table_prefix.'directory_cats' => array( |
|
56 | 56 | 'cat_route', |
57 | 57 | ), |
58 | 58 | ), |
@@ -63,13 +63,13 @@ discard block |
||
63 | 63 | { |
64 | 64 | $slug = new \E1379\SpeakingUrl\SpeakingUrl(); |
65 | 65 | |
66 | - $sql = 'SELECT cat_id, cat_name FROM ' . $this->table_prefix . 'directory_cats'; |
|
66 | + $sql = 'SELECT cat_id, cat_name FROM '.$this->table_prefix.'directory_cats'; |
|
67 | 67 | $result = $this->db->sql_query($sql); |
68 | 68 | |
69 | 69 | while ($row = $this->db->sql_fetchrow($result)) |
70 | 70 | { |
71 | - $sql = 'UPDATE ' . $this->table_prefix . 'directory_cats' . ' |
|
72 | - SET cat_route = "' . (string) $slug->getSlug($row['cat_name'], array('lang' => $this->config['default_lang'], 'symbols' => true)). '" |
|
71 | + $sql = 'UPDATE '.$this->table_prefix.'directory_cats'.' |
|
72 | + SET cat_route = "' . (string) $slug->getSlug($row['cat_name'], array('lang' => $this->config['default_lang'], 'symbols' => true)).'" |
|
73 | 73 | WHERE cat_id = ' . (int) $row['cat_id']; |
74 | 74 | $this->db->sql_query($sql); |
75 | 75 | } |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | return false; |
33 | 33 | } |
34 | 34 | |
35 | - if (!file_exists($this->extension_path. 'vendor/autoload.php')) |
|
35 | + if (!file_exists($this->extension_path.'vendor/autoload.php')) |
|
36 | 36 | { |
37 | 37 | return false; |
38 | 38 | } |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | if (!class_exists('\E1379\SpeakingUrl\SpeakingUrl')) |
70 | 70 | { |
71 | 71 | // When migration is executed, phpBB doesn't know yet extension dependencies, so we need to manually include autoload file |
72 | - require($this->extension_path. 'vendor/autoload.php'); |
|
72 | + require($this->extension_path.'vendor/autoload.php'); |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | // Run parent enable step method |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | |
161 | 161 | foreach ($notification_types as $notification_type) |
162 | 162 | { |
163 | - call_user_func(array($phpbb_notifications, $step . '_notifications'), $notification_type); |
|
163 | + call_user_func(array($phpbb_notifications, $step.'_notifications'), $notification_type); |
|
164 | 164 | } |
165 | 165 | |
166 | 166 | return 'notifications'; |
@@ -51,12 +51,12 @@ discard block |
||
51 | 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 | - $this->config = $config; |
|
54 | + $this->config = $config; |
|
55 | 55 | $this->language = $language; |
56 | - $this->log = $log; |
|
56 | + $this->log = $log; |
|
57 | 57 | $this->template = $template; |
58 | - $this->user = $user; |
|
59 | - $this->request = $request; |
|
58 | + $this->user = $user; |
|
59 | + $this->request = $request; |
|
60 | 60 | |
61 | 61 | $this->_generate_config(); |
62 | 62 | } |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | } |
96 | 96 | else if ($vars['explain']) |
97 | 97 | { |
98 | - $l_explain = $this->language->lang($vars['lang'] . '_EXPLAIN'); |
|
98 | + $l_explain = $this->language->lang($vars['lang'].'_EXPLAIN'); |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | $this->template->assign_block_vars('options', array( |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | */ |
118 | 118 | public function process() |
119 | 119 | { |
120 | - $submit = ($this->request->is_set_post('submit')) ? true : false; |
|
120 | + $submit = ($this->request->is_set_post('submit')) ? true : false; |
|
121 | 121 | |
122 | 122 | $this->new_config = $this->config; |
123 | 123 | $cfg_array = ($this->request->is_set('config')) ? $this->request->variable('config', array('' => ''), true) : $this->new_config; |
@@ -158,12 +158,12 @@ discard block |
||
158 | 158 | { |
159 | 159 | $this->log->add('admin', $this->user->data['user_id'], $this->user->ip, 'DIR_CONFIG_SETTINGS'); |
160 | 160 | |
161 | - trigger_error($this->language->lang('CONFIG_UPDATED') . adm_back_link($this->u_action)); |
|
161 | + trigger_error($this->language->lang('CONFIG_UPDATED').adm_back_link($this->u_action)); |
|
162 | 162 | } |
163 | 163 | |
164 | 164 | $this->template->assign_vars(array( |
165 | 165 | 'L_TITLE' => $this->language->lang($this->display_vars['title']), |
166 | - 'L_TITLE_EXPLAIN' => $this->language->lang($this->display_vars['title'] . '_EXPLAIN'), |
|
166 | + 'L_TITLE_EXPLAIN' => $this->language->lang($this->display_vars['title'].'_EXPLAIN'), |
|
167 | 167 | |
168 | 168 | 'S_ERROR' => (sizeof($error)) ? true : false, |
169 | 169 | 'ERROR_MSG' => implode('<br />', $error), |
@@ -199,44 +199,44 @@ discard block |
||
199 | 199 | 'dir_banner_width' => '', |
200 | 200 | 'dir_banner_height' => '', |
201 | 201 | |
202 | - 'dir_mail' => array('lang' => 'DIR_MAIL_VALIDATION', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), |
|
203 | - 'dir_activ_checkurl' => array('lang' => 'DIR_ACTIVE_CHECK', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), |
|
204 | - 'dir_activ_flag' => array('lang' => 'DIR_ACTIV_FLAG', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), |
|
205 | - 'dir_activ_rss' => array('lang' => 'DIR_ACTIV_RSS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), |
|
206 | - 'dir_show' => array('lang' => 'DIR_SHOW', 'validate' => 'int:1:9999', 'type' => 'number:1:9999', 'explain' => false), |
|
207 | - 'dir_length_describe' => array('lang' => 'DIR_MAX_DESC', 'validate' => 'int:1:999', 'type' => 'number:1:999', 'explain' => false), |
|
208 | - 'dir_new_time' => array('lang' => 'DIR_NEW_TIME', 'validate' => 'int:1:999', 'type' => 'number:1:999', 'explain' => true), |
|
209 | - 'dir_default_order' => array('lang' => 'DIR_DEFAULT_ORDER', 'validate' => 'string', 'type' => 'select', 'explain' => false, 'method' => 'get_order_list', 'params' => array('{CONFIG_VALUE}')), |
|
202 | + 'dir_mail' => array('lang' => 'DIR_MAIL_VALIDATION', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), |
|
203 | + 'dir_activ_checkurl' => array('lang' => 'DIR_ACTIVE_CHECK', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), |
|
204 | + 'dir_activ_flag' => array('lang' => 'DIR_ACTIV_FLAG', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), |
|
205 | + 'dir_activ_rss' => array('lang' => 'DIR_ACTIV_RSS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), |
|
206 | + 'dir_show' => array('lang' => 'DIR_SHOW', 'validate' => 'int:1:9999', 'type' => 'number:1:9999', 'explain' => false), |
|
207 | + 'dir_length_describe' => array('lang' => 'DIR_MAX_DESC', 'validate' => 'int:1:999', 'type' => 'number:1:999', 'explain' => false), |
|
208 | + 'dir_new_time' => array('lang' => 'DIR_NEW_TIME', 'validate' => 'int:1:999', 'type' => 'number:1:999', 'explain' => true), |
|
209 | + 'dir_default_order' => array('lang' => 'DIR_DEFAULT_ORDER', 'validate' => 'string', 'type' => 'select', 'explain' => false, 'method' => 'get_order_list', 'params' => array('{CONFIG_VALUE}')), |
|
210 | 210 | |
211 | 211 | 'legend2' => 'DIR_RECENT_GUEST', |
212 | - 'dir_recent_block' => array('lang' => 'DIR_RECENT_ENABLE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), |
|
213 | - 'dir_recent_rows' => array('lang' => 'DIR_RECENT_ROWS', 'validate' => 'int:1:999', 'type' => 'number:1:999', 'explain' => false), |
|
214 | - 'dir_recent_columns' => array('lang' => 'DIR_RECENT_COLUMNS', 'validate' => 'int:1:999', 'type' => 'number:1:999', 'explain' => false), |
|
215 | - 'dir_recent_exclude' => array('lang' => 'DIR_RECENT_EXCLUDE', 'validate' => 'string', 'type' => 'text:6:99', 'explain' => true), |
|
212 | + 'dir_recent_block' => array('lang' => 'DIR_RECENT_ENABLE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), |
|
213 | + 'dir_recent_rows' => array('lang' => 'DIR_RECENT_ROWS', 'validate' => 'int:1:999', 'type' => 'number:1:999', 'explain' => false), |
|
214 | + 'dir_recent_columns' => array('lang' => 'DIR_RECENT_COLUMNS', 'validate' => 'int:1:999', 'type' => 'number:1:999', 'explain' => false), |
|
215 | + 'dir_recent_exclude' => array('lang' => 'DIR_RECENT_EXCLUDE', 'validate' => 'string', 'type' => 'text:6:99', 'explain' => true), |
|
216 | 216 | |
217 | 217 | 'legend3' => 'DIR_ADD_GUEST', |
218 | - 'dir_visual_confirm' => array('lang' => 'DIR_VISUAL_CONFIRM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), |
|
219 | - 'dir_visual_confirm_max_attempts' => array('lang' => 'DIR_MAX_ADD_ATTEMPTS', 'validate' => 'int:0:9999', 'type' => 'number:0:9999', 'explain' => true), |
|
218 | + 'dir_visual_confirm' => array('lang' => 'DIR_VISUAL_CONFIRM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), |
|
219 | + 'dir_visual_confirm_max_attempts' => array('lang' => 'DIR_MAX_ADD_ATTEMPTS', 'validate' => 'int:0:9999', 'type' => 'number:0:9999', 'explain' => true), |
|
220 | 220 | |
221 | 221 | 'legend4' => 'DIR_THUMB_PARAM', |
222 | - 'dir_activ_thumb' => array('lang' => 'DIR_ACTIVE_THUMB', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), |
|
223 | - 'dir_activ_thumb_remote' => array('lang' => 'DIR_ACTIVE_THUMB_REMOTE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), |
|
224 | - 'dir_thumb_service' => array('lang' => 'DIR_THUMB_SERVICE', 'validate' => 'string', 'type' => 'select', 'explain' => true, 'method' => 'get_thumb_service_list', 'params' => array('{CONFIG_VALUE}')), |
|
225 | - 'dir_thumb_service_reverse' => array('lang' => 'DIR_THUMB_SERVICE_REVERSE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), |
|
222 | + 'dir_activ_thumb' => array('lang' => 'DIR_ACTIVE_THUMB', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), |
|
223 | + 'dir_activ_thumb_remote' => array('lang' => 'DIR_ACTIVE_THUMB_REMOTE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), |
|
224 | + 'dir_thumb_service' => array('lang' => 'DIR_THUMB_SERVICE', 'validate' => 'string', 'type' => 'select', 'explain' => true, 'method' => 'get_thumb_service_list', 'params' => array('{CONFIG_VALUE}')), |
|
225 | + 'dir_thumb_service_reverse' => array('lang' => 'DIR_THUMB_SERVICE_REVERSE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), |
|
226 | 226 | |
227 | 227 | 'legend5' => 'DIR_COMM_PARAM', |
228 | - 'dir_allow_bbcode' => array('lang' => 'DIR_ALLOW_BBCODE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), |
|
229 | - 'dir_allow_flash' => array('lang' => 'DIR_ALLOW_FLASH', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), |
|
230 | - 'dir_allow_links' => array('lang' => 'DIR_ALLOW_LINKS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), |
|
231 | - 'dir_allow_smilies' => array('lang' => 'DIR_ALLOW_SMILIES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), |
|
232 | - 'dir_length_comments' => array('lang' => 'DIR_LENGTH_COMMENTS', 'validate' => 'int:1:999', 'type' => 'number:1:999', 'explain' => true), |
|
233 | - 'dir_comments_per_page' => array('lang' => 'DIR_COMM_PER_PAGE', 'validate' => 'int:1:9999', 'type' => 'number:1:9999', 'explain' => false), |
|
228 | + 'dir_allow_bbcode' => array('lang' => 'DIR_ALLOW_BBCODE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), |
|
229 | + 'dir_allow_flash' => array('lang' => 'DIR_ALLOW_FLASH', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), |
|
230 | + 'dir_allow_links' => array('lang' => 'DIR_ALLOW_LINKS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), |
|
231 | + 'dir_allow_smilies' => array('lang' => 'DIR_ALLOW_SMILIES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), |
|
232 | + 'dir_length_comments' => array('lang' => 'DIR_LENGTH_COMMENTS', 'validate' => 'int:1:999', 'type' => 'number:1:999', 'explain' => true), |
|
233 | + 'dir_comments_per_page' => array('lang' => 'DIR_COMM_PER_PAGE', 'validate' => 'int:1:9999', 'type' => 'number:1:9999', 'explain' => false), |
|
234 | 234 | |
235 | 235 | 'legend6' => 'DIR_BANN_PARAM', |
236 | - 'dir_activ_banner' => array('lang' => 'DIR_ACTIV_BANNER', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), |
|
237 | - 'dir_banner' => array('lang' => 'DIR_MAX_BANN', 'validate' => 'int:0', 'type' => 'dimension:0', 'explain' => true, 'append' => ' ' . $this->user->lang['PIXEL']), |
|
238 | - 'dir_banner_filesize' => array('lang' => 'DIR_MAX_SIZE', 'validate' => 'string', 'type' => 'custom', 'method' => 'max_filesize', 'explain' => true), |
|
239 | - 'dir_storage_banner' => array('lang' => 'DIR_STORAGE_BANNER', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), |
|
236 | + 'dir_activ_banner' => array('lang' => 'DIR_ACTIV_BANNER', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false), |
|
237 | + 'dir_banner' => array('lang' => 'DIR_MAX_BANN', 'validate' => 'int:0', 'type' => 'dimension:0', 'explain' => true, 'append' => ' '.$this->user->lang['PIXEL']), |
|
238 | + 'dir_banner_filesize' => array('lang' => 'DIR_MAX_SIZE', 'validate' => 'string', 'type' => 'custom', 'method' => 'max_filesize', 'explain' => true), |
|
239 | + 'dir_storage_banner' => array('lang' => 'DIR_STORAGE_BANNER', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), |
|
240 | 240 | ) |
241 | 241 | ); |
242 | 242 | } |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | { |
38 | 38 | return array( |
39 | 39 | 'drop_columns' => array( |
40 | - $this->table_prefix . 'directory_links' => array( |
|
40 | + $this->table_prefix.'directory_links' => array( |
|
41 | 41 | 'link_pagerank', |
42 | 42 | ), |
43 | 43 | ), |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | { |
49 | 49 | return array( |
50 | 50 | 'add_columns' => array( |
51 | - $this->table_prefix . 'directory_links' => array( |
|
51 | + $this->table_prefix.'directory_links' => array( |
|
52 | 52 | 'link_pagerank' => array('CHAR:2', ''), |
53 | 53 | ), |
54 | 54 | ), |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | */ |
35 | 35 | public function __construct(\phpbb\db\driver\driver_interface $db, $categories_table) |
36 | 36 | { |
37 | - $this->db = $db; |
|
37 | + $this->db = $db; |
|
38 | 38 | $this->categories_table = $categories_table; |
39 | 39 | } |
40 | 40 | |
@@ -67,10 +67,10 @@ discard block |
||
67 | 67 | while ($row = $this->db->sql_fetchrow($result)) |
68 | 68 | { |
69 | 69 | $defaults['cat_id'] = $row['cat_id']; |
70 | - $path = 'directory/' . $row['cat_route'] . '/{page}/{sort_days}/{sort_key}/{sort_dir}'; |
|
70 | + $path = 'directory/'.$row['cat_route'].'/{page}/{sort_days}/{sort_key}/{sort_dir}'; |
|
71 | 71 | |
72 | 72 | $route = new Route($path, $defaults, $requirements); |
73 | - $routes->add('ernadoo_phpbbdirectory_dynamic_route_' . $row['cat_id'], $route); |
|
73 | + $routes->add('ernadoo_phpbbdirectory_dynamic_route_'.$row['cat_id'], $route); |
|
74 | 74 | } |
75 | 75 | $this->db->sql_freeresult(); |
76 | 76 |