@@ -55,9 +55,9 @@ discard block |
||
| 55 | 55 | { |
| 56 | 56 | if ($full) |
| 57 | 57 | { |
| 58 | - return generate_board_url() . '/' . $this->title_to_url($forum_name) . '-f' . $forum_id . '/' . $this->title_to_url($topic_title) . '-t' . $topic_id . ($start ? '-s' . $start : '') . '.html'; |
|
| 58 | + return generate_board_url().'/'.$this->title_to_url($forum_name).'-f'.$forum_id.'/'.$this->title_to_url($topic_title).'-t'.$topic_id.($start ? '-s'.$start : '').'.html'; |
|
| 59 | 59 | } |
| 60 | - return $this->phpbb_root_path . $this->title_to_url($forum_name) . '-f' . $forum_id . '/' . $this->title_to_url($topic_title) . '-t' . $topic_id . ($start ? '-s' . $start : '') . '.html'; |
|
| 60 | + return $this->phpbb_root_path.$this->title_to_url($forum_name).'-f'.$forum_id.'/'.$this->title_to_url($topic_title).'-t'.$topic_id.($start ? '-s'.$start : '').'.html'; |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | /** |
@@ -74,9 +74,9 @@ discard block |
||
| 74 | 74 | { |
| 75 | 75 | if ($full) |
| 76 | 76 | { |
| 77 | - return generate_board_url() . '/' . $this->title_to_url($forum_name) . '-f' . $forum_id . '/' . ($start ? 'index-s' . $start . '.html' : ''); |
|
| 77 | + return generate_board_url().'/'.$this->title_to_url($forum_name).'-f'.$forum_id.'/'.($start ? 'index-s'.$start.'.html' : ''); |
|
| 78 | 78 | } |
| 79 | - return $this->phpbb_root_path . $this->title_to_url($forum_name) . '-f' . $forum_id . '/' . ($start ? 'index-s' . $start . '.html' : ''); |
|
| 79 | + return $this->phpbb_root_path.$this->title_to_url($forum_name).'-f'.$forum_id.'/'.($start ? 'index-s'.$start.'.html' : ''); |
|
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | /** |
@@ -95,12 +95,12 @@ discard block |
||
| 95 | 95 | { |
| 96 | 96 | for ($j = 0; $j < $replies + 1; $j += $per_page) |
| 97 | 97 | { |
| 98 | - $last_post_link = $url . '-s' . $j . '.html'; |
|
| 98 | + $last_post_link = $url.'-s'.$j.'.html'; |
|
| 99 | 99 | } |
| 100 | 100 | } |
| 101 | 101 | else |
| 102 | 102 | { |
| 103 | - $last_post_link = $url . '.html'; |
|
| 103 | + $last_post_link = $url.'.html'; |
|
| 104 | 104 | } |
| 105 | 105 | return $last_post_link; |
| 106 | 106 | } |
@@ -139,9 +139,9 @@ discard block |
||
| 139 | 139 | { |
| 140 | 140 | if (!$this->auth->acl_get('m_approve', $forum_id)) |
| 141 | 141 | { |
| 142 | - return (int) $data[$mode . '_approved']; |
|
| 142 | + return (int) $data[$mode.'_approved']; |
|
| 143 | 143 | } |
| 144 | 144 | |
| 145 | - return (int) $data[$mode . '_approved'] + (int) $data[$mode . '_unapproved'] + (int) $data[$mode . '_softdeleted']; |
|
| 145 | + return (int) $data[$mode.'_approved'] + (int) $data[$mode.'_unapproved'] + (int) $data[$mode.'_softdeleted']; |
|
| 146 | 146 | } |
| 147 | 147 | } |
@@ -97,8 +97,7 @@ |
||
| 97 | 97 | { |
| 98 | 98 | $last_post_link = $url . '-s' . $j . '.html'; |
| 99 | 99 | } |
| 100 | - } |
|
| 101 | - else |
|
| 100 | + } else |
|
| 102 | 101 | { |
| 103 | 102 | $last_post_link = $url . '.html'; |
| 104 | 103 | } |
@@ -71,8 +71,7 @@ |
||
| 71 | 71 | if (isset($row['topic_id'])) |
| 72 | 72 | { |
| 73 | 73 | $url_data[$id]['url'] = $this->base->generate_topic_link($row['forum_id'], $row['forum_name'], $row['topic_id'], $row['topic_title'], $data['start'], true); |
| 74 | - } |
|
| 75 | - else if (isset($row['forum_id'])) |
|
| 74 | + } else if (isset($row['forum_id'])) |
|
| 76 | 75 | { |
| 77 | 76 | $url_data[$id]['url'] = $this->base->generate_forum_link($row['forum_id'], $row['forum_name'], $data['start'], true); |
| 78 | 77 | } |
@@ -53,9 +53,9 @@ discard block |
||
| 53 | 53 | $tpl_ary = $event['tpl_ary']; |
| 54 | 54 | $u_view_topic = $this->base->generate_topic_link($event['row']['forum_id'], $event['row']['forum_name'], $event['row']['topic_id'], $event['row']['topic_title']); |
| 55 | 55 | $tpl_ary['U_VIEW_TOPIC'] = append_sid($u_view_topic); |
| 56 | - $tpl_ary['U_LAST_POST'] = append_sid($this->base->generate_lastpost_link($tpl_ary['REPLIES'], $u_view_topic) . '#p' . $event['row']['topic_last_post_id']); |
|
| 56 | + $tpl_ary['U_LAST_POST'] = append_sid($this->base->generate_lastpost_link($tpl_ary['REPLIES'], $u_view_topic).'#p'.$event['row']['topic_last_post_id']); |
|
| 57 | 57 | $tpl_ary['U_VIEW_FORUM'] = append_sid($this->base->generate_forum_link($event['row']['forum_id'], $event['row']['forum_name'])); |
| 58 | - $tpl_ary['U_NEWEST_POST'] = $u_view_topic . '?view=unread#unread'; |
|
| 58 | + $tpl_ary['U_NEWEST_POST'] = $u_view_topic.'?view=unread#unread'; |
|
| 59 | 59 | |
| 60 | 60 | $event['tpl_ary'] = $tpl_ary; |
| 61 | 61 | } |
@@ -75,14 +75,14 @@ discard block |
||
| 75 | 75 | return; |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | - $url_data =$event['url_data'] ; |
|
| 78 | + $url_data = $event['url_data']; |
|
| 79 | 79 | |
| 80 | 80 | foreach ($url_data as $id => $data) |
| 81 | 81 | { |
| 82 | 82 | $row = $data['row']; |
| 83 | 83 | if (isset($row['topic_id'])) |
| 84 | 84 | { |
| 85 | - $url_data[$id]['url'] = $this->base->generate_topic_link($row['forum_id'], $row['forum_name'], $row['topic_id'], $row['topic_title'], $data['start'], true); |
|
| 85 | + $url_data[$id]['url'] = $this->base->generate_topic_link($row['forum_id'], $row['forum_name'], $row['topic_id'], $row['topic_title'], $data['start'], true); |
|
| 86 | 86 | } |
| 87 | 87 | else if (isset($row['forum_id'])) |
| 88 | 88 | { |
@@ -108,10 +108,10 @@ discard block |
||
| 108 | 108 | $this->topic_id = $event['row']['topic_id']; |
| 109 | 109 | |
| 110 | 110 | $topic_row = $event['topic_row']; |
| 111 | - $u_view_topic= $this->base->generate_topic_link($this->forum_id, $this->forum_title, $this->topic_id, $this->topic_title); |
|
| 111 | + $u_view_topic = $this->base->generate_topic_link($this->forum_id, $this->forum_title, $this->topic_id, $this->topic_title); |
|
| 112 | 112 | $topic_row['U_VIEW_TOPIC'] = append_sid($u_view_topic); |
| 113 | 113 | $topic_row['U_VIEW_FORUM'] = append_sid($this->base->generate_forum_link($this->forum_id, $this->forum_title)); |
| 114 | - $topic_row['U_LAST_POST'] = append_sid($this->base->generate_lastpost_link($topic_row['TOPIC_REPLIES'], $u_view_topic) . '#p' . $event['row']['topic_last_post_id']); |
|
| 114 | + $topic_row['U_LAST_POST'] = append_sid($this->base->generate_lastpost_link($topic_row['TOPIC_REPLIES'], $u_view_topic).'#p'.$event['row']['topic_last_post_id']); |
|
| 115 | 115 | $event['topic_row'] = $topic_row; |
| 116 | 116 | } |
| 117 | 117 | |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | $tpl_ary = $event['tpl_ary']; |
| 143 | 143 | $replies = $this->base->get_count('topic_posts', $event['row'], $event['row']['forum_id']) - 1; |
| 144 | 144 | $u_view_topic = $this->base->generate_topic_link($event['row']['forum_id'], $event['row']['forum_name'], $event['row']['topic_id'], $event['row']['topic_title']); |
| 145 | - $tpl_ary['U_TOPIC'] = append_sid($this->base->generate_lastpost_link($replies, $u_view_topic) . '#p' . $event['row']['topic_last_post_id']); |
|
| 145 | + $tpl_ary['U_TOPIC'] = append_sid($this->base->generate_lastpost_link($replies, $u_view_topic).'#p'.$event['row']['topic_last_post_id']); |
|
| 146 | 146 | $event['tpl_ary'] = $tpl_ary; |
| 147 | 147 | } |
| 148 | 148 | } |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | $this->admin_login(); |
| 13 | 13 | $this->add_lang('acp/extensions'); |
| 14 | 14 | // Load the Pages extension details |
| 15 | - $crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=details&ext_name=tas2580%2Fseourls&sid=' . $this->sid); |
|
| 15 | + $crawler = self::request('GET', 'adm/index.php?i=acp_extensions&mode=main&action=details&ext_name=tas2580%2Fseourls&sid='.$this->sid); |
|
| 16 | 16 | // Assert extension is up to date |
| 17 | 17 | $this->assertGreaterThan(0, $crawler->filter('.successbox')->count()); |
| 18 | 18 | $this->assertContains($this->lang('UP_TO_DATE', 'SEO URLs'), $crawler->text()); |
@@ -256,8 +256,7 @@ |
||
| 256 | 256 | if (!empty($this->topic_data) && isset($param['f']) && isset($param['t'])) |
| 257 | 257 | { |
| 258 | 258 | $event['generate_page_link_override'] = append_sid($this->base->generate_topic_link($this->topic_data['forum_id'], $this->topic_data['forum_name'], $this->topic_data['topic_id'], $this->topic_data['topic_title'], $start)); |
| 259 | - } |
|
| 260 | - else if (!empty($this->forum_data) && isset($param['f'])) |
|
| 259 | + } else if (!empty($this->forum_data) && isset($param['f'])) |
|
| 261 | 260 | { |
| 262 | 261 | $event['generate_page_link_override'] = append_sid($this->base->generate_forum_link($this->forum_data['forum_id'], $this->forum_data['forum_name'], $start)); |
| 263 | 262 | } |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | 'core.display_forums_modify_forum_rows' => 'display_forums_modify_forum_rows', |
| 76 | 76 | 'core.display_forums_modify_category_template_vars' => 'display_forums_modify_category_template_vars', |
| 77 | 77 | 'core.generate_forum_nav' => 'generate_forum_nav', |
| 78 | - 'core.make_jumpbox_modify_tpl_ary' => 'make_jumpbox_modify_tpl_ary', // Not in phpBB |
|
| 78 | + 'core.make_jumpbox_modify_tpl_ary' => 'make_jumpbox_modify_tpl_ary', // Not in phpBB |
|
| 79 | 79 | 'core.memberlist_view_profile' => 'memberlist_view_profile', |
| 80 | 80 | 'core.pagination_generate_page_link' => 'pagination_generate_page_link', |
| 81 | 81 | 'core.search_modify_tpl_ary' => 'search_modify_tpl_ary', |
@@ -98,9 +98,9 @@ discard block |
||
| 98 | 98 | */ |
| 99 | 99 | public function append_sid($event) |
| 100 | 100 | { |
| 101 | - if ($this->in_viewtopic && preg_match('#./../viewtopic.' . $this->php_ext . '#', $event['url'])) |
|
| 101 | + if ($this->in_viewtopic && preg_match('#./../viewtopic.'.$this->php_ext.'#', $event['url'])) |
|
| 102 | 102 | { |
| 103 | - $url = '../viewtopic.' . $this->php_ext ; |
|
| 103 | + $url = '../viewtopic.'.$this->php_ext; |
|
| 104 | 104 | $event['url'] = $url; |
| 105 | 105 | } |
| 106 | 106 | if (isset($event['params']['redirect'])) |
@@ -141,9 +141,9 @@ discard block |
||
| 141 | 141 | $forum_rows = $event['forum_rows']; |
| 142 | 142 | if ($event['row']['forum_last_post_time'] == $forum_rows[$event['parent_id']]['forum_last_post_time']) |
| 143 | 143 | { |
| 144 | - $forum_rows[$event['parent_id']]['forum_name_last_post'] =$event['row']['forum_name']; |
|
| 145 | - $forum_rows[$event['parent_id']]['topic_id_last_post'] =$event['row']['topic_id']; |
|
| 146 | - $forum_rows[$event['parent_id']]['topic_title_last_post'] =$event['row']['topic_title']; |
|
| 144 | + $forum_rows[$event['parent_id']]['forum_name_last_post'] = $event['row']['forum_name']; |
|
| 145 | + $forum_rows[$event['parent_id']]['topic_id_last_post'] = $event['row']['topic_id']; |
|
| 146 | + $forum_rows[$event['parent_id']]['topic_title_last_post'] = $event['row']['topic_title']; |
|
| 147 | 147 | $event['forum_rows'] = $forum_rows; |
| 148 | 148 | } |
| 149 | 149 | } |
@@ -172,14 +172,14 @@ discard block |
||
| 172 | 172 | |
| 173 | 173 | // Update the image source in forums |
| 174 | 174 | $img = $this->path_helper->update_web_root_path($forum_row['FORUM_IMAGE_SRC']); |
| 175 | - $forum_row['FORUM_IMAGE'] = preg_replace('#img src=\"(.*)\" alt#', 'img src="' . $img . '" alt', $forum_row['FORUM_IMAGE']); |
|
| 175 | + $forum_row['FORUM_IMAGE'] = preg_replace('#img src=\"(.*)\" alt#', 'img src="'.$img.'" alt', $forum_row['FORUM_IMAGE']); |
|
| 176 | 176 | |
| 177 | 177 | // Rewrite links to topics, posts and forums |
| 178 | 178 | $replies = $this->base->get_count('topic_posts', $event['row'], $event['row']['forum_id']) - 1; |
| 179 | 179 | $url = $this->base->generate_topic_link($event['row']['forum_id_last_post'], $event['row']['forum_name_last_post'], $event['row']['topic_id_last_post'], $event['row']['topic_title_last_post']); |
| 180 | - $forum_row['U_LAST_POST'] = append_sid($this->base->generate_lastpost_link($replies, $url) . '#p' . $event['row']['forum_last_post_id']); |
|
| 180 | + $forum_row['U_LAST_POST'] = append_sid($this->base->generate_lastpost_link($replies, $url).'#p'.$event['row']['forum_last_post_id']); |
|
| 181 | 181 | $forum_row['U_VIEWFORUM'] = append_sid($this->base->generate_forum_link($forum_row['FORUM_ID'], $forum_row['FORUM_NAME'])); |
| 182 | - $forum_row['U_NEWEST_POST'] = $url . '?view=unread#unread'; |
|
| 182 | + $forum_row['U_NEWEST_POST'] = $url.'?view=unread#unread'; |
|
| 183 | 183 | |
| 184 | 184 | $event['subforums_row'] = $subforums_row; |
| 185 | 185 | $event['forum_row'] = $forum_row; |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | |
| 216 | 216 | foreach ($navlinks_parents as $id => $data) |
| 217 | 217 | { |
| 218 | - $navlinks_parents[$id]['U_VIEW_FORUM'] = append_sid($this->base->generate_forum_link($data['FORUM_ID'] , $data['FORUM_NAME'])); |
|
| 218 | + $navlinks_parents[$id]['U_VIEW_FORUM'] = append_sid($this->base->generate_forum_link($data['FORUM_ID'], $data['FORUM_NAME'])); |
|
| 219 | 219 | } |
| 220 | 220 | |
| 221 | 221 | $navlinks['U_VIEW_FORUM'] = append_sid($this->base->generate_forum_link($forum_data['forum_id'], $forum_data['forum_name'])); |
@@ -230,7 +230,7 @@ discard block |
||
| 230 | 230 | $row = $event['row']; |
| 231 | 231 | foreach ($tpl_ary as $id => $data) |
| 232 | 232 | { |
| 233 | - $tpl_ary[$id]['LINK'] = append_sid($this->base->generate_forum_link($row['forum_id'], $row['forum_name'])); |
|
| 233 | + $tpl_ary[$id]['LINK'] = append_sid($this->base->generate_forum_link($row['forum_id'], $row['forum_name'])); |
|
| 234 | 234 | } |
| 235 | 235 | |
| 236 | 236 | $event['tpl_ary'] = $tpl_ary; |
@@ -293,10 +293,10 @@ discard block |
||
| 293 | 293 | $u_view_topic = $this->base->generate_topic_link($event['row']['forum_id'], $event['row']['forum_name'], $event['row']['topic_id'], $event['row']['topic_title']); |
| 294 | 294 | |
| 295 | 295 | $tpl_ary = $event['tpl_ary']; |
| 296 | - $tpl_ary['U_LAST_POST'] = append_sid($this->base->generate_lastpost_link($replies, $u_view_topic) . '#p' . $event['row']['topic_last_post_id']); |
|
| 296 | + $tpl_ary['U_LAST_POST'] = append_sid($this->base->generate_lastpost_link($replies, $u_view_topic).'#p'.$event['row']['topic_last_post_id']); |
|
| 297 | 297 | $tpl_ary['U_VIEW_TOPIC'] = append_sid($u_view_topic); |
| 298 | 298 | $tpl_ary['U_VIEW_FORUM'] = append_sid($this->base->generate_forum_link($event['row']['forum_id'], $event['row']['forum_name'])); |
| 299 | - $tpl_ary['U_NEWEST_POST'] = $u_view_topic . '?view=unread#unread'; |
|
| 299 | + $tpl_ary['U_NEWEST_POST'] = $u_view_topic.'?view=unread#unread'; |
|
| 300 | 300 | |
| 301 | 301 | $event['tpl_ary'] = $tpl_ary; |
| 302 | 302 | } |
@@ -323,8 +323,8 @@ discard block |
||
| 323 | 323 | $u_view_topic = $this->base->generate_topic_link($topic_row['FORUM_ID'], $topic_row['FORUM_NAME'], $topic_row['TOPIC_ID'], $topic_row['TOPIC_TITLE']); |
| 324 | 324 | $topic_row['U_VIEW_TOPIC'] = append_sid($u_view_topic); |
| 325 | 325 | $topic_row['U_VIEW_FORUM'] = append_sid($this->base->generate_forum_link($topic_row['FORUM_ID'], $topic_row['FORUM_NAME'])); |
| 326 | - $topic_row['U_LAST_POST'] = append_sid($this->base->generate_lastpost_link($event['topic_row']['REPLIES'], $u_view_topic) . '#p' . $event['row']['topic_last_post_id']); |
|
| 327 | - $topic_row['U_NEWEST_POST'] = $u_view_topic . '?view=unread#unread'; |
|
| 326 | + $topic_row['U_LAST_POST'] = append_sid($this->base->generate_lastpost_link($event['topic_row']['REPLIES'], $u_view_topic).'#p'.$event['row']['topic_last_post_id']); |
|
| 327 | + $topic_row['U_NEWEST_POST'] = $u_view_topic.'?view=unread#unread'; |
|
| 328 | 328 | |
| 329 | 329 | $event['topic_row'] = $topic_row; |
| 330 | 330 | } |
@@ -362,9 +362,9 @@ discard block |
||
| 362 | 362 | { |
| 363 | 363 | $data = $event['topic_data']; |
| 364 | 364 | $this->template->assign_vars(array( |
| 365 | - 'U_VIEW_TOPIC' => append_sid($this->base->generate_topic_link($event['forum_id'] , $data['forum_name'], $event['topic_id'], $data['topic_title'], $event['start'])), |
|
| 366 | - 'U_VIEW_FORUM' => append_sid($this->base->generate_forum_link($event['forum_id'] , $data['forum_name'])), |
|
| 367 | - 'S_POLL_ACTION' => append_sid($this->base->generate_topic_link($event['forum_id'] , $data['forum_name'], $event['topic_id'], $data['topic_title'], $event['start'])), |
|
| 365 | + 'U_VIEW_TOPIC' => append_sid($this->base->generate_topic_link($event['forum_id'], $data['forum_name'], $event['topic_id'], $data['topic_title'], $event['start'])), |
|
| 366 | + 'U_VIEW_FORUM' => append_sid($this->base->generate_forum_link($event['forum_id'], $data['forum_name'])), |
|
| 367 | + 'S_POLL_ACTION' => append_sid($this->base->generate_topic_link($event['forum_id'], $data['forum_name'], $event['topic_id'], $data['topic_title'], $event['start'])), |
|
| 368 | 368 | )); |
| 369 | 369 | } |
| 370 | 370 | |
@@ -419,7 +419,7 @@ discard block |
||
| 419 | 419 | $row = $event['post_row']; |
| 420 | 420 | $start = $this->request->variable('start', 0); |
| 421 | 421 | $data = $event['topic_data']; |
| 422 | - $row['U_MINI_POST'] = append_sid($this->base->generate_topic_link($data['forum_id'], $data['forum_name'], $data['topic_id'], $data['topic_title'], $start) . '#p' . $event['row']['post_id']); |
|
| 422 | + $row['U_MINI_POST'] = append_sid($this->base->generate_topic_link($data['forum_id'], $data['forum_name'], $data['topic_id'], $data['topic_title'], $start).'#p'.$event['row']['post_id']); |
|
| 423 | 423 | $event['post_row'] = $row; |
| 424 | 424 | } |
| 425 | 425 | } |