Completed
Push — master ( 987ed7...df4c3b )
by Tobias
02:41
created
event/listener.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 			'core.display_forums_modify_template_vars'		=> 'display_forums_modify_template_vars',
75 75
 			'core.display_forums_modify_forum_rows'			=> 'display_forums_modify_forum_rows',
76 76
 			'core.generate_forum_nav'						=> 'generate_forum_nav',
77
-			'core.make_jumpbox_modify_tpl_ary'				=> 'make_jumpbox_modify_tpl_ary',				// Not in phpBB
77
+			'core.make_jumpbox_modify_tpl_ary'				=> 'make_jumpbox_modify_tpl_ary', // Not in phpBB
78 78
 			'core.pagination_generate_page_link'			=> 'pagination_generate_page_link',
79 79
 			'core.search_modify_tpl_ary'					=> 'search_modify_tpl_ary',
80 80
 			'core.viewforum_modify_topicrow'				=> 'viewforum_modify_topicrow',
@@ -96,9 +96,9 @@  discard block
 block discarded – undo
96 96
 	 */
97 97
 	public function append_sid($event)
98 98
 	{
99
-		if ($this->in_viewtopic && preg_match('#./../viewtopic.' . $this->php_ext  . '#', $event['url']))
99
+		if ($this->in_viewtopic && preg_match('#./../viewtopic.'.$this->php_ext.'#', $event['url']))
100 100
 		{
101
-			$url = $this->phpbb_root_path . 'viewtopic.' . $this->php_ext ;
101
+			$url = $this->phpbb_root_path.'viewtopic.'.$this->php_ext;
102 102
 			$event['url'] = $url;
103 103
 		}
104 104
 	}
@@ -133,9 +133,9 @@  discard block
 block discarded – undo
133 133
 		$forum_rows = $event['forum_rows'];
134 134
 		if ($event['row']['forum_last_post_time'] == $forum_rows[$event['parent_id']]['forum_last_post_time'])
135 135
 		{
136
-			$forum_rows[$event['parent_id']]['forum_name_last_post'] =$event['row']['forum_name'];
137
-			$forum_rows[$event['parent_id']]['topic_id_last_post'] =$event['row']['topic_id'];
138
-			$forum_rows[$event['parent_id']]['topic_title_last_post'] =$event['row']['topic_title'];
136
+			$forum_rows[$event['parent_id']]['forum_name_last_post'] = $event['row']['forum_name'];
137
+			$forum_rows[$event['parent_id']]['topic_id_last_post'] = $event['row']['topic_id'];
138
+			$forum_rows[$event['parent_id']]['topic_title_last_post'] = $event['row']['topic_title'];
139 139
 			$event['forum_rows'] = $forum_rows;
140 140
 		}
141 141
 	}
@@ -164,12 +164,12 @@  discard block
 block discarded – undo
164 164
 
165 165
 		// Update the image source in forums
166 166
 		$img = $this->path_helper->update_web_root_path($forum_row['FORUM_IMAGE_SRC']);
167
-		$forum_row['FORUM_IMAGE'] = preg_replace('#img src=\"(.*)\" alt#', 'img src="' . $img . '" alt', $forum_row['FORUM_IMAGE']);
167
+		$forum_row['FORUM_IMAGE'] = preg_replace('#img src=\"(.*)\" alt#', 'img src="'.$img.'" alt', $forum_row['FORUM_IMAGE']);
168 168
 
169 169
 		// Rewrite links to topics, posts and forums
170 170
 		$replies = $this->base->get_count('topic_posts', $event['row'], $event['row']['forum_id']) - 1;
171 171
 		$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']);
172
-		$forum_row['U_LAST_POST'] = append_sid($this->base->generate_lastpost_link($replies, $url) . '#p' . $event['row']['forum_last_post_id']);
172
+		$forum_row['U_LAST_POST'] = append_sid($this->base->generate_lastpost_link($replies, $url).'#p'.$event['row']['forum_last_post_id']);
173 173
 		$forum_row['U_VIEWFORUM'] = append_sid($this->base->generate_forum_link($forum_row['FORUM_ID'], $forum_row['FORUM_NAME']));
174 174
 
175 175
 		$event['subforums_row'] = $subforums_row;
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
 
192 192
 		foreach ($navlinks_parents as $id => $data)
193 193
 		{
194
-			$navlinks_parents[$id]['U_VIEW_FORUM'] = append_sid($this->base->generate_forum_link($data['FORUM_ID'] , $data['FORUM_NAME']));
194
+			$navlinks_parents[$id]['U_VIEW_FORUM'] = append_sid($this->base->generate_forum_link($data['FORUM_ID'], $data['FORUM_NAME']));
195 195
 		}
196 196
 
197 197
 		$navlinks['U_VIEW_FORUM'] = append_sid($this->base->generate_forum_link($forum_data['forum_id'], $forum_data['forum_name']));
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 		$row = $event['row'];
207 207
 		foreach ($tpl_ary as $id => $data)
208 208
 		{
209
-			$tpl_ary[$id]['LINK']	 = append_sid($this->base->generate_forum_link($row['forum_id'], $row['forum_name']));
209
+			$tpl_ary[$id]['LINK'] = append_sid($this->base->generate_forum_link($row['forum_id'], $row['forum_name']));
210 210
 		}
211 211
 
212 212
 		$event['tpl_ary'] = $tpl_ary;
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
 		$u_view_topic = $this->base->generate_topic_link($event['row']['forum_id'], $event['row']['forum_name'], $event['row']['topic_id'], $event['row']['topic_title']);
254 254
 
255 255
 		$tpl_ary = $event['tpl_ary'];
256
-		$tpl_ary['U_LAST_POST'] = append_sid($this->base->generate_lastpost_link($replies, $u_view_topic) . '#p' . $event['row']['topic_last_post_id']);
256
+		$tpl_ary['U_LAST_POST'] = append_sid($this->base->generate_lastpost_link($replies, $u_view_topic).'#p'.$event['row']['topic_last_post_id']);
257 257
 		$tpl_ary['U_VIEW_TOPIC'] = append_sid($u_view_topic);
258 258
 		$tpl_ary['U_VIEW_FORUM'] = append_sid($this->base->generate_forum_link($event['row']['forum_id'], $event['row']['forum_name']));
259 259
 
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
 		$u_view_topic = $this->base->generate_topic_link($this->forum_id, $this->forum_title, $this->topic_id, $this->topic_title);
279 279
 		$topic_row['U_VIEW_TOPIC'] = append_sid($u_view_topic);
280 280
 		$topic_row['U_VIEW_FORUM'] = append_sid($this->base->generate_forum_link($this->forum_id, $this->forum_title));
281
-		$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']);
281
+		$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']);
282 282
 
283 283
 		$event['topic_row'] = $topic_row;
284 284
 	}
@@ -310,8 +310,8 @@  discard block
 block discarded – undo
310 310
 	{
311 311
 		$data = $event['topic_data'];
312 312
 		$this->template->assign_vars(array(
313
-			'U_VIEW_TOPIC'		=> append_sid($this->base->generate_topic_link($event['forum_id'] , $data['forum_name'], $event['topic_id'], $data['topic_title'], $event['start'])),
314
-			'U_VIEW_FORUM'	=> append_sid($this->base->generate_forum_link($event['forum_id'] , $data['forum_name'])),
313
+			'U_VIEW_TOPIC'		=> append_sid($this->base->generate_topic_link($event['forum_id'], $data['forum_name'], $event['topic_id'], $data['topic_title'], $event['start'])),
314
+			'U_VIEW_FORUM'	=> append_sid($this->base->generate_forum_link($event['forum_id'], $data['forum_name'])),
315 315
 		));
316 316
 	}
317 317
 
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
 		$row = $event['post_row'];
364 364
 		$start = $this->request->variable('start', 0);
365 365
 		$data = $event['topic_data'];
366
-		$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']);
366
+		$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']);
367 367
 		$event['post_row'] = $row;
368 368
 	}
369 369
 }
Please login to merge, or discard this patch.