Completed
Push — master ( ddd9e2...bce480 )
by Tobias
02:50
created
event/base.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -55,9 +55,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
event/extensions.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  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 58
 
59 59
 		$event['tpl_ary'] = $tpl_ary;
@@ -74,14 +74,14 @@  discard block
 block discarded – undo
74 74
 			return;
75 75
 		}
76 76
 
77
-		$url_data =$event['url_data'] ;
77
+		$url_data = $event['url_data'];
78 78
 
79 79
 		foreach ($url_data as $id => $data)
80 80
 		{
81 81
 			$row = $data['row'];
82 82
 			if (isset($row['topic_id']))
83 83
 			{
84
-				$url_data[$id]['url'] = $this->base->generate_topic_link($row['forum_id'], $row['forum_name'], $row['topic_id'], $row['topic_title'],  $data['start'], true);
84
+				$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 85
 			}
86 86
 			else if (isset($row['forum_id']))
87 87
 			{
@@ -107,10 +107,10 @@  discard block
 block discarded – undo
107 107
 		$this->topic_id = $event['row']['topic_id'];
108 108
 
109 109
 		$topic_row = $event['topic_row'];
110
-		$u_view_topic= $this->base->generate_topic_link($this->forum_id, $this->forum_title, $this->topic_id, $this->topic_title);
110
+		$u_view_topic = $this->base->generate_topic_link($this->forum_id, $this->forum_title, $this->topic_id, $this->topic_title);
111 111
 		$topic_row['U_VIEW_TOPIC'] = append_sid($u_view_topic);
112 112
 		$topic_row['U_VIEW_FORUM'] = append_sid($this->base->generate_forum_link($this->forum_id, $this->forum_title));
113
-		$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']);
113
+		$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 114
 		$event['topic_row'] = $topic_row;
115 115
 	}
116 116
 
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 		$tpl_ary = $event['tpl_ary'];
142 142
 		$replies = $this->base->get_count('topic_posts', $event['row'], $event['row']['forum_id']) - 1;
143 143
 		$u_view_topic = $this->base->generate_topic_link($event['row']['forum_id'], $event['row']['forum_name'], $event['row']['topic_id'], $event['row']['topic_title']);
144
-		$tpl_ary['U_TOPIC'] = append_sid($this->base->generate_lastpost_link($replies, $u_view_topic) . '#p' . $event['row']['topic_last_post_id']);
144
+		$tpl_ary['U_TOPIC'] = append_sid($this->base->generate_lastpost_link($replies, $u_view_topic).'#p'.$event['row']['topic_last_post_id']);
145 145
 		$event['tpl_ary'] = $tpl_ary;
146 146
 	}
147 147
 }
Please login to merge, or discard this patch.
event/listener.php 1 patch
Spacing   +15 added lines, -15 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 = $this->phpbb_root_path . 'viewtopic.' . $this->php_ext ;
102
+			$url = $this->phpbb_root_path.'viewtopic.'.$this->php_ext;
103 103
 			$event['url'] = $url;
104 104
 		}
105 105
 	}
@@ -134,9 +134,9 @@  discard block
 block discarded – undo
134 134
 		$forum_rows = $event['forum_rows'];
135 135
 		if ($event['row']['forum_last_post_time'] == $forum_rows[$event['parent_id']]['forum_last_post_time'])
136 136
 		{
137
-			$forum_rows[$event['parent_id']]['forum_name_last_post'] =$event['row']['forum_name'];
138
-			$forum_rows[$event['parent_id']]['topic_id_last_post'] =$event['row']['topic_id'];
139
-			$forum_rows[$event['parent_id']]['topic_title_last_post'] =$event['row']['topic_title'];
137
+			$forum_rows[$event['parent_id']]['forum_name_last_post'] = $event['row']['forum_name'];
138
+			$forum_rows[$event['parent_id']]['topic_id_last_post'] = $event['row']['topic_id'];
139
+			$forum_rows[$event['parent_id']]['topic_title_last_post'] = $event['row']['topic_title'];
140 140
 			$event['forum_rows'] = $forum_rows;
141 141
 		}
142 142
 	}
@@ -165,12 +165,12 @@  discard block
 block discarded – undo
165 165
 
166 166
 		// Update the image source in forums
167 167
 		$img = $this->path_helper->update_web_root_path($forum_row['FORUM_IMAGE_SRC']);
168
-		$forum_row['FORUM_IMAGE'] = preg_replace('#img src=\"(.*)\" alt#', 'img src="' . $img . '" alt', $forum_row['FORUM_IMAGE']);
168
+		$forum_row['FORUM_IMAGE'] = preg_replace('#img src=\"(.*)\" alt#', 'img src="'.$img.'" alt', $forum_row['FORUM_IMAGE']);
169 169
 
170 170
 		// Rewrite links to topics, posts and forums
171 171
 		$replies = $this->base->get_count('topic_posts', $event['row'], $event['row']['forum_id']) - 1;
172 172
 		$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']);
173
-		$forum_row['U_LAST_POST'] = append_sid($this->base->generate_lastpost_link($replies, $url) . '#p' . $event['row']['forum_last_post_id']);
173
+		$forum_row['U_LAST_POST'] = append_sid($this->base->generate_lastpost_link($replies, $url).'#p'.$event['row']['forum_last_post_id']);
174 174
 		$forum_row['U_VIEWFORUM'] = append_sid($this->base->generate_forum_link($forum_row['FORUM_ID'], $forum_row['FORUM_NAME']));
175 175
 
176 176
 		$event['subforums_row'] = $subforums_row;
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
 
208 208
 		foreach ($navlinks_parents as $id => $data)
209 209
 		{
210
-			$navlinks_parents[$id]['U_VIEW_FORUM'] = append_sid($this->base->generate_forum_link($data['FORUM_ID'] , $data['FORUM_NAME']));
210
+			$navlinks_parents[$id]['U_VIEW_FORUM'] = append_sid($this->base->generate_forum_link($data['FORUM_ID'], $data['FORUM_NAME']));
211 211
 		}
212 212
 
213 213
 		$navlinks['U_VIEW_FORUM'] = append_sid($this->base->generate_forum_link($forum_data['forum_id'], $forum_data['forum_name']));
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
 		$row = $event['row'];
223 223
 		foreach ($tpl_ary as $id => $data)
224 224
 		{
225
-			$tpl_ary[$id]['LINK']	 = append_sid($this->base->generate_forum_link($row['forum_id'], $row['forum_name']));
225
+			$tpl_ary[$id]['LINK'] = append_sid($this->base->generate_forum_link($row['forum_id'], $row['forum_name']));
226 226
 		}
227 227
 
228 228
 		$event['tpl_ary'] = $tpl_ary;
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
 		$u_view_topic = $this->base->generate_topic_link($event['row']['forum_id'], $event['row']['forum_name'], $event['row']['topic_id'], $event['row']['topic_title']);
270 270
 
271 271
 		$tpl_ary = $event['tpl_ary'];
272
-		$tpl_ary['U_LAST_POST'] = append_sid($this->base->generate_lastpost_link($replies, $u_view_topic) . '#p' . $event['row']['topic_last_post_id']);
272
+		$tpl_ary['U_LAST_POST'] = append_sid($this->base->generate_lastpost_link($replies, $u_view_topic).'#p'.$event['row']['topic_last_post_id']);
273 273
 		$tpl_ary['U_VIEW_TOPIC'] = append_sid($u_view_topic);
274 274
 		$tpl_ary['U_VIEW_FORUM'] = append_sid($this->base->generate_forum_link($event['row']['forum_id'], $event['row']['forum_name']));
275 275
 
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
 		$u_view_topic = $this->base->generate_topic_link($this->forum_id, $this->forum_title, $this->topic_id, $this->topic_title);
295 295
 		$topic_row['U_VIEW_TOPIC'] = append_sid($u_view_topic);
296 296
 		$topic_row['U_VIEW_FORUM'] = append_sid($this->base->generate_forum_link($this->forum_id, $this->forum_title));
297
-		$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']);
297
+		$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']);
298 298
 
299 299
 		$event['topic_row'] = $topic_row;
300 300
 	}
@@ -326,8 +326,8 @@  discard block
 block discarded – undo
326 326
 	{
327 327
 		$data = $event['topic_data'];
328 328
 		$this->template->assign_vars(array(
329
-			'U_VIEW_TOPIC'		=> append_sid($this->base->generate_topic_link($event['forum_id'] , $data['forum_name'], $event['topic_id'], $data['topic_title'], $event['start'])),
330
-			'U_VIEW_FORUM'	=> append_sid($this->base->generate_forum_link($event['forum_id'] , $data['forum_name'])),
329
+			'U_VIEW_TOPIC'		=> append_sid($this->base->generate_topic_link($event['forum_id'], $data['forum_name'], $event['topic_id'], $data['topic_title'], $event['start'])),
330
+			'U_VIEW_FORUM'	=> append_sid($this->base->generate_forum_link($event['forum_id'], $data['forum_name'])),
331 331
 		));
332 332
 	}
333 333
 
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
 		$row = $event['post_row'];
380 380
 		$start = $this->request->variable('start', 0);
381 381
 		$data = $event['topic_data'];
382
-		$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']);
382
+		$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']);
383 383
 		$event['post_row'] = $row;
384 384
 	}
385 385
 }
Please login to merge, or discard this patch.