Completed
Pull Request — master (#36)
by
unknown
02:31
created
event/listener.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
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.pagination_generate_page_link'					=> 'pagination_generate_page_link',
80 80
 			'core.search_modify_tpl_ary'							=> 'search_modify_tpl_ary',
81 81
 			'core.viewforum_modify_topicrow'						=> 'viewforum_modify_topicrow',
@@ -97,9 +97,9 @@  discard block
 block discarded – undo
97 97
 	 */
98 98
 	public function append_sid($event)
99 99
 	{
100
-		if ($this->in_viewtopic && preg_match('#./../viewtopic.' . $this->php_ext  . '#', $event['url']))
100
+		if ($this->in_viewtopic && preg_match('#./../viewtopic.'.$this->php_ext.'#', $event['url']))
101 101
 		{
102
-			$url = '../viewtopic.' . $this->php_ext ;
102
+			$url = '../viewtopic.'.$this->php_ext;
103 103
 			$event['url'] = $url;
104 104
 		}
105 105
 		if (isset($event['params']['redirect']))
@@ -140,9 +140,9 @@  discard block
 block discarded – undo
140 140
 		$forum_rows = $event['forum_rows'];
141 141
 		if ($event['row']['forum_last_post_time'] == $forum_rows[$event['parent_id']]['forum_last_post_time'])
142 142
 		{
143
-			$forum_rows[$event['parent_id']]['forum_name_last_post'] =$event['row']['forum_name'];
144
-			$forum_rows[$event['parent_id']]['topic_id_last_post'] =$event['row']['topic_id'];
145
-			$forum_rows[$event['parent_id']]['topic_title_last_post'] =$event['row']['topic_title'];
143
+			$forum_rows[$event['parent_id']]['forum_name_last_post'] = $event['row']['forum_name'];
144
+			$forum_rows[$event['parent_id']]['topic_id_last_post'] = $event['row']['topic_id'];
145
+			$forum_rows[$event['parent_id']]['topic_title_last_post'] = $event['row']['topic_title'];
146 146
 			$event['forum_rows'] = $forum_rows;
147 147
 		}
148 148
 	}
@@ -171,14 +171,14 @@  discard block
 block discarded – undo
171 171
 
172 172
 		// Update the image source in forums
173 173
 		$img = $this->path_helper->update_web_root_path($forum_row['FORUM_IMAGE_SRC']);
174
-		$forum_row['FORUM_IMAGE'] = preg_replace('#img src=\"(.*)\" alt#', 'img src="' . $img . '" alt', $forum_row['FORUM_IMAGE']);
174
+		$forum_row['FORUM_IMAGE'] = preg_replace('#img src=\"(.*)\" alt#', 'img src="'.$img.'" alt', $forum_row['FORUM_IMAGE']);
175 175
 
176 176
 		// Rewrite links to topics, posts and forums
177 177
 		$replies = $this->base->get_count('topic_posts', $event['row'], $event['row']['forum_id']) - 1;
178 178
 		$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']);
179
-		$forum_row['U_LAST_POST'] = append_sid($this->base->generate_lastpost_link($replies, $url) . '#p' . $event['row']['forum_last_post_id']);
179
+		$forum_row['U_LAST_POST'] = append_sid($this->base->generate_lastpost_link($replies, $url).'#p'.$event['row']['forum_last_post_id']);
180 180
 		$forum_row['U_VIEWFORUM'] = append_sid($this->base->generate_forum_link($forum_row['FORUM_ID'], $forum_row['FORUM_NAME']));
181
-		$forum_row['U_NEWEST_POST'] = append_sid($this->base->generate_lastpost_link($replies, $url) . '#unread');
181
+		$forum_row['U_NEWEST_POST'] = append_sid($this->base->generate_lastpost_link($replies, $url).'#unread');
182 182
 
183 183
 		$event['subforums_row'] = $subforums_row;
184 184
 		$event['forum_row'] = $forum_row;
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 
215 215
 		foreach ($navlinks_parents as $id => $data)
216 216
 		{
217
-			$navlinks_parents[$id]['U_VIEW_FORUM'] = append_sid($this->base->generate_forum_link($data['FORUM_ID'] , $data['FORUM_NAME']));
217
+			$navlinks_parents[$id]['U_VIEW_FORUM'] = append_sid($this->base->generate_forum_link($data['FORUM_ID'], $data['FORUM_NAME']));
218 218
 		}
219 219
 
220 220
 		$navlinks['U_VIEW_FORUM'] = append_sid($this->base->generate_forum_link($forum_data['forum_id'], $forum_data['forum_name']));
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
 		$row = $event['row'];
230 230
 		foreach ($tpl_ary as $id => $data)
231 231
 		{
232
-			$tpl_ary[$id]['LINK']	 = append_sid($this->base->generate_forum_link($row['forum_id'], $row['forum_name']));
232
+			$tpl_ary[$id]['LINK'] = append_sid($this->base->generate_forum_link($row['forum_id'], $row['forum_name']));
233 233
 		}
234 234
 
235 235
 		$event['tpl_ary'] = $tpl_ary;
@@ -276,10 +276,10 @@  discard block
 block discarded – undo
276 276
 		$u_view_topic = $this->base->generate_topic_link($event['row']['forum_id'], $event['row']['forum_name'], $event['row']['topic_id'], $event['row']['topic_title']);
277 277
 
278 278
 		$tpl_ary = $event['tpl_ary'];
279
-		$tpl_ary['U_LAST_POST'] = append_sid($this->base->generate_lastpost_link($replies, $u_view_topic) . '#p' . $event['row']['topic_last_post_id']);
279
+		$tpl_ary['U_LAST_POST'] = append_sid($this->base->generate_lastpost_link($replies, $u_view_topic).'#p'.$event['row']['topic_last_post_id']);
280 280
 		$tpl_ary['U_VIEW_TOPIC'] = append_sid($u_view_topic);
281 281
 		$tpl_ary['U_VIEW_FORUM'] = append_sid($this->base->generate_forum_link($event['row']['forum_id'], $event['row']['forum_name']));
282
-		$tpl_ary['U_NEWEST_POST'] = append_sid($this->base->generate_lastpost_link($replies, $u_view_topic) . '#unread');
282
+		$tpl_ary['U_NEWEST_POST'] = append_sid($this->base->generate_lastpost_link($replies, $u_view_topic).'#unread');
283 283
 
284 284
 		$event['tpl_ary'] = $tpl_ary;
285 285
 	}
@@ -302,8 +302,8 @@  discard block
 block discarded – undo
302 302
 		$u_view_topic = $this->base->generate_topic_link($this->forum_id, $this->forum_title, $this->topic_id, $this->topic_title);
303 303
 		$topic_row['U_VIEW_TOPIC'] = append_sid($u_view_topic);
304 304
 		$topic_row['U_VIEW_FORUM'] = append_sid($this->base->generate_forum_link($this->forum_id, $this->forum_title));
305
-		$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']);
306
-		$topic_row['U_NEWEST_POST'] = append_sid($this->base->generate_lastpost_link($event['topic_row']['REPLIES'], $u_view_topic) . '#unread');
305
+		$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']);
306
+		$topic_row['U_NEWEST_POST'] = append_sid($this->base->generate_lastpost_link($event['topic_row']['REPLIES'], $u_view_topic).'#unread');
307 307
 
308 308
 		$event['topic_row'] = $topic_row;
309 309
 	}
@@ -335,9 +335,9 @@  discard block
 block discarded – undo
335 335
 	{
336 336
 		$data = $event['topic_data'];
337 337
 		$this->template->assign_vars(array(
338
-			'U_VIEW_TOPIC'		=> append_sid($this->base->generate_topic_link($event['forum_id'] , $data['forum_name'], $event['topic_id'], $data['topic_title'], $event['start'])),
339
-			'U_VIEW_FORUM'		=> append_sid($this->base->generate_forum_link($event['forum_id'] , $data['forum_name'])),
340
-			'S_POLL_ACTION'		=> append_sid($this->base->generate_topic_link($event['forum_id'] , $data['forum_name'], $event['topic_id'], $data['topic_title'], $event['start'])),
338
+			'U_VIEW_TOPIC'		=> append_sid($this->base->generate_topic_link($event['forum_id'], $data['forum_name'], $event['topic_id'], $data['topic_title'], $event['start'])),
339
+			'U_VIEW_FORUM'		=> append_sid($this->base->generate_forum_link($event['forum_id'], $data['forum_name'])),
340
+			'S_POLL_ACTION'		=> append_sid($this->base->generate_topic_link($event['forum_id'], $data['forum_name'], $event['topic_id'], $data['topic_title'], $event['start'])),
341 341
 		));
342 342
 	}
343 343
 
@@ -389,7 +389,7 @@  discard block
 block discarded – undo
389 389
 		$row = $event['post_row'];
390 390
 		$start = $this->request->variable('start', 0);
391 391
 		$data = $event['topic_data'];
392
-		$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']);
392
+		$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']);
393 393
 		$event['post_row'] = $row;
394 394
 	}
395 395
 }
Please login to merge, or discard this patch.
event/extensions.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -53,9 +53,9 @@  discard block
 block discarded – undo
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'] = append_sid($this->base->generate_lastpost_link($tpl_ary['REPLIES'], $u_view_topic) . '#unread');
58
+		$tpl_ary['U_NEWEST_POST'] = append_sid($this->base->generate_lastpost_link($tpl_ary['REPLIES'], $u_view_topic).'#unread');
59 59
 
60 60
 		$event['tpl_ary'] = $tpl_ary;
61 61
 	}
@@ -75,14 +75,14 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.