Completed
Pull Request — master (#26)
by Daniel
21:33 queued 11:11
created
services/users/userlist.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,11 +45,11 @@
 block discarded – undo
45 45
 			$curr_key = (int) array_search($settings['current_user'], $userlist);
46 46
 
47 47
 			// Remove the invalid user from the list
48
-			$new_list = str_replace($settings['current_user'] . ',', '', $settings['userlist'] . ',');
48
+			$new_list = str_replace($settings['current_user'].',', '', $settings['userlist'].',');
49 49
 			$new_list = trim($new_list, ',');
50 50
 
51 51
 			$new_userlist = self::_get_userlist($new_list);
52
-			$current_user =& $new_userlist[$curr_key - 1];
52
+			$current_user = & $new_userlist[$curr_key - 1];
53 53
 			$settings['current_user'] = (int) $current_user;
54 54
 			$settings['userlist'] = trim($new_list);
55 55
 			$settings['last_changed'] = 0;
Please login to merge, or discard this patch.
services/users/contacts.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 	 */
97 97
 	protected function get_email_url(array $row)
98 98
 	{
99
-		return ($this->email_form_allowed) ? append_sid("{$this->phpbb_root_path}memberlist.{$this->php_ext}", 'mode=email&u=' . $row['user_id']) : (($this->mailto_allowed) ? 'mailto:' . $row['user_email'] : '');
99
+		return ($this->email_form_allowed) ? append_sid("{$this->phpbb_root_path}memberlist.{$this->php_ext}", 'mode=email&u='.$row['user_id']) : (($this->mailto_allowed) ? 'mailto:'.$row['user_email'] : '');
100 100
 	}
101 101
 
102 102
 	/**
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 			$jabber = array(
128 128
 				'ID'		=> 'jabber',
129 129
 				'NAME' 		=> $this->translator->lang('JABBER'),
130
-				'U_CONTACT'	=> append_sid("{$this->phpbb_root_path}memberlist.{$this->php_ext}", 'mode=contact&action=jabber&u=' . $row['user_id']),
130
+				'U_CONTACT'	=> append_sid("{$this->phpbb_root_path}memberlist.{$this->php_ext}", 'mode=contact&action=jabber&u='.$row['user_id']),
131 131
 			);
132 132
 		}
133 133
 
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
 			$pm = array(
157 157
 				'ID'		=> 'pm',
158 158
 				'NAME' 		=> $this->translator->lang('SEND_PRIVATE_MESSAGE'),
159
-				'U_CONTACT'	=> append_sid("{$this->phpbb_root_path}ucp.{$this->php_ext}", 'i=pm&mode=compose&u=' . $row['user_id']),
159
+				'U_CONTACT'	=> append_sid("{$this->phpbb_root_path}ucp.{$this->php_ext}", 'i=pm&mode=compose&u='.$row['user_id']),
160 160
 			);
161 161
 		}
162 162
 
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
 	{
220 220
 		if (!function_exists('phpbb_get_banned_user_ids'))
221 221
 		{
222
-			include($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext);
222
+			include($this->phpbb_root_path.'includes/functions_user.'.$this->php_ext);
223 223
 		}
224 224
 
225 225
 		return phpbb_get_banned_user_ids($user_ids, false);
Please login to merge, or discard this patch.
blocks/featured_member.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 	private function change_user()
148 148
 	{
149 149
 		$change = false;
150
-		if ($this->settings['rotation'] == 'pageload' || $this->settings['last_changed'] < strtotime('-1 ' . self::$rotations[$this->settings['rotation']]))
150
+		if ($this->settings['rotation'] == 'pageload' || $this->settings['last_changed'] < strtotime('-1 '.self::$rotations[$this->settings['rotation']]))
151 151
 		{
152 152
 			$this->settings['last_changed'] = time();
153 153
 			$change = true;
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
 	 */
163 163
 	private function get_settings(array $bdata)
164 164
 	{
165
-		$cached_settings = $this->cache->get('pt_block_data_' . $bdata['bid']);
165
+		$cached_settings = $this->cache->get('pt_block_data_'.$bdata['bid']);
166 166
 		$settings = ($cached_settings && $cached_settings['hash'] === $bdata['hash']) ? $cached_settings : $bdata['settings'];
167 167
 		$settings['hash'] = $bdata['hash'];
168 168
 
@@ -182,8 +182,8 @@  discard block
 block discarded – undo
182 182
 			$sql_data = array(
183 183
 				'settings'	=> json_encode($settings)
184 184
 			);
185
-			$this->db->sql_query('UPDATE ' . $this->blocks_table . ' SET ' . $this->db->sql_build_array('UPDATE', $sql_data) . ' WHERE bid = ' . (int) $bid);
186
-			$this->cache->put('pt_block_data_' . $bid, $this->settings);
185
+			$this->db->sql_query('UPDATE '.$this->blocks_table.' SET '.$this->db->sql_build_array('UPDATE', $sql_data).' WHERE bid = '.(int) $bid);
186
+			$this->cache->put('pt_block_data_'.$bid, $this->settings);
187 187
 		}
188 188
 	}
189 189
 
@@ -235,8 +235,8 @@  discard block
 block discarded – undo
235 235
 		$rotation = $this->settings['rotation'];
236 236
 
237 237
 		$this->ptemplate->assign_vars(array(
238
-			'QTYPE_EXPLAIN'		=> ($query_type == 'posts' || $query_type == 'recent') ? $this->translator->lang('QTYPE_' . strtoupper($query_type)) : '',
239
-			'TITLE_EXPLAIN'		=> ($rotation != 'pageload') ? $this->translator->lang(strtoupper($rotation) . '_MEMBER') : '',
238
+			'QTYPE_EXPLAIN'		=> ($query_type == 'posts' || $query_type == 'recent') ? $this->translator->lang('QTYPE_'.strtoupper($query_type)) : '',
239
+			'TITLE_EXPLAIN'		=> ($rotation != 'pageload') ? $this->translator->lang(strtoupper($rotation).'_MEMBER') : '',
240 240
 		));
241 241
 	}
242 242
 
Please login to merge, or discard this patch.
blocks/whois.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 
69 69
 		if (!empty($data['.'][0]['TOTAL_USERS_ONLINE']))
70 70
 		{
71
-			$l_online_users	= $data['.'][0]['TOTAL_USERS_ONLINE'];
71
+			$l_online_users = $data['.'][0]['TOTAL_USERS_ONLINE'];
72 72
 			$online_userlist = $data['.'][0]['LOGGED_IN_USER_LIST'];
73 73
 			$l_online_record = $data['.'][0]['RECORD_USERS'];
74 74
 		}
@@ -105,6 +105,6 @@  discard block
 block discarded – undo
105 105
 	 */
106 106
 	private function get_viewonline_url()
107 107
 	{
108
-		return ($this->auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel')) ? append_sid("{$this->phpbb_root_path}viewonline." . $this->php_ext) : '';
108
+		return ($this->auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel')) ? append_sid("{$this->phpbb_root_path}viewonline.".$this->php_ext) : '';
109 109
 	}
110 110
 }
Please login to merge, or discard this patch.
blocks/wordgraph.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -109,8 +109,8 @@  discard block
 block discarded – undo
109 109
 			$this->ptemplate->assign_block_vars('wordgraph', array(
110 110
 				'WORD'			=> $this->show_word($word, $words_array[$word], $settings['show_word_count']),
111 111
 				'WORD_SIZE'		=> $settings['min_word_size'] + (($words_array[$word] - $params['min_count']) * $params['size_step']),
112
-				'WORD_COLOR'	=> $r . $g . $b,
113
-				'WORD_URL'		=> append_sid("{$this->phpbb_root_path}search.$this->php_ext", 'keywords=' . urlencode($word)),
112
+				'WORD_COLOR'	=> $r.$g.$b,
113
+				'WORD_URL'		=> append_sid("{$this->phpbb_root_path}search.$this->php_ext", 'keywords='.urlencode($word)),
114 114
 			));
115 115
 		}
116 116
 	}
@@ -187,8 +187,8 @@  discard block
 block discarded – undo
187 187
 				AND m.word_id = l.word_id
188 188
 				AND m.post_id = p.post_id
189 189
 				AND t.topic_id = p.topic_id
190
-				AND t.topic_time <= ' . time() . '
191
-				AND ' . $this->content_visibility->get_global_visibility_sql('topic', array_keys($this->auth->acl_getf('!f_read', true)), 't.') .
190
+				AND t.topic_time <= ' . time().'
191
+				AND ' . $this->content_visibility->get_global_visibility_sql('topic', array_keys($this->auth->acl_getf('!f_read', true)), 't.').
192 192
 				$sql_where,
193 193
 			'GROUP_BY'	=> 'l.word_text, l.word_count',
194 194
 			'ORDER_BY'	=> 'l.word_count DESC'
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
 		if ($exclude_words)
206 206
 		{
207 207
 			$exclude_words = array_filter(explode(',', str_replace(' ', '', strtolower($exclude_words))));
208
-			$sql_where = (sizeof($exclude_words)) ? ' AND ' . $this->db->sql_in_set('l.word_text', $exclude_words, true) : '';
208
+			$sql_where = (sizeof($exclude_words)) ? ' AND '.$this->db->sql_in_set('l.word_text', $exclude_words, true) : '';
209 209
 		}
210 210
 
211 211
 		return $sql_where;
@@ -219,6 +219,6 @@  discard block
 block discarded – undo
219 219
 	 */
220 220
 	private function show_word($word, $count, $show_count)
221 221
 	{
222
-		return censor_text(($show_count) ? $word . '(' . $count . ')' : $word);
222
+		return censor_text(($show_count) ? $word.'('.$count.')' : $word);
223 223
 	}
224 224
 }
Please login to merge, or discard this patch.
blocks/birthday.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 	 */
50 50
 	public function display(array $bdata, $edit_mode = false)
51 51
 	{
52
-		if (($content = $this->cache->get('pt_block_data_' . $bdata['bid'])) === false)
52
+		if (($content = $this->cache->get('pt_block_data_'.$bdata['bid'])) === false)
53 53
 		{
54 54
 			$content = '';
55 55
 			if ($this->find_birthday_users())
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 				$content = $this->ptemplate->render_view('blitze/sitemaker', 'blocks/birthday.html', 'birthday_block');
58 58
 
59 59
 				// we only check birthdays every hour, may make this an admin choice
60
-				$this->cache->put('pt_block_data_' . $bdata['bid'], $content, 3600);
60
+				$this->cache->put('pt_block_data_'.$bdata['bid'], $content, 3600);
61 61
 			}
62 62
 		}
63 63
 
@@ -78,12 +78,12 @@  discard block
 block discarded – undo
78 78
 		$leap_year_birthdays = $this->adjust_leap_year($now, $time);
79 79
 
80 80
 		$sql = 'SELECT u.user_id, u.username, u.user_colour, u.user_birthday 
81
-				FROM ' . USERS_TABLE . ' u
82
-				LEFT JOIN ' . BANLIST_TABLE . " b ON (u.user_id = b.ban_userid)
81
+				FROM ' . USERS_TABLE.' u
82
+				LEFT JOIN ' . BANLIST_TABLE." b ON (u.user_id = b.ban_userid)
83 83
 				WHERE (b.ban_id IS NULL
84 84
 					OR b.ban_exclude = 1)
85
-					AND (u.user_birthday " . $this->db->sql_like_expression(sprintf('%2d-%2d-', $now['mday'], $now['mon']) . $this->db->get_any_char()) . " $leap_year_birthdays)
86
-					AND u.user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ')
85
+					AND (u.user_birthday " . $this->db->sql_like_expression(sprintf('%2d-%2d-', $now['mday'], $now['mon']).$this->db->get_any_char())." $leap_year_birthdays)
86
+					AND u.user_type IN (".USER_NORMAL.', '.USER_FOUNDER.')
87 87
 				ORDER BY u.username ASC';
88 88
 		$result = $this->db->sql_query($sql);
89 89
 
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 		$leap_year_birthdays = '';
114 114
 		if ($now['mday'] == 28 && $now['mon'] == 2 && !$time->format('L'))
115 115
 		{
116
-			$leap_year_birthdays = ' OR u.user_birthday ' . $this->db->sql_like_expression(sprintf('%2d-%2d-', 29, 2) . $this->db->get_any_char());
116
+			$leap_year_birthdays = ' OR u.user_birthday '.$this->db->sql_like_expression(sprintf('%2d-%2d-', 29, 2).$this->db->get_any_char());
117 117
 		}
118 118
 
119 119
 		return $leap_year_birthdays;
Please login to merge, or discard this patch.
acp/menu_module.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@
 block discarded – undo
112 112
 			'ICON_PICKER'	=> $this->icon->picker(),
113 113
 			'T_PATH'		=> $this->phpbb_root_path,
114 114
 			'UA_MENU_ID'	=> $menu_id,
115
-			'UA_AJAX_URL'   => $this->controller_helper->route('blitze_sitemaker_menus_admin', array(), true, '') . '/',
115
+			'UA_AJAX_URL'   => $this->controller_helper->route('blitze_sitemaker_menus_admin', array(), true, '').'/',
116 116
 		));
117 117
 
118 118
 		$this->tpl_name = 'acp_menu';
Please login to merge, or discard this patch.
services/util.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 	 */
104 104
 	public function get_default_avatar()
105 105
 	{
106
-		return '<img src="' . $this->get_theme_path() . '/images/no_avatar.gif" alt="" />';
106
+		return '<img src="'.$this->get_theme_path().'/images/no_avatar.gif" alt="" />';
107 107
 	}
108 108
 
109 109
 	/**
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 	public function get_theme_path()
114 114
 	{
115 115
 		$web_path = $this->get_web_path();
116
-		return "{$web_path}styles/" . rawurlencode($this->user->style['style_path']) . '/theme';
116
+		return "{$web_path}styles/".rawurlencode($this->user->style['style_path']).'/theme';
117 117
 	}
118 118
 
119 119
 	/**
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 	public function get_web_path()
124 124
 	{
125 125
 		// Determine board url - we may need it later
126
-		$board_url = generate_board_url() . '/';
126
+		$board_url = generate_board_url().'/';
127 127
 
128 128
 		$corrected_path = $this->path_helper->get_web_root_path();
129 129
 		return (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? $board_url : $corrected_path;
Please login to merge, or discard this patch.
services/tree/display.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 	{
80 80
 		$sql = "SELECT *
81 81
 			FROM $this->items_table
82
-			WHERE $this->pk = " . (int) $node_id ;
82
+			WHERE $this->pk = ".(int) $node_id;
83 83
 		$result = $this->db->sql_query($sql);
84 84
 		$row = $this->db->sql_fetchrow($result);
85 85
 		$this->db->sql_freeresult($result);
@@ -108,8 +108,8 @@  discard block
 block discarded – undo
108 108
 					$this->items_table => 'i'
109 109
 				),
110 110
 				'WHERE'		=> array(
111
-					'i.depth ' . (($max_depth) ? " BETWEEN $start AND " . ($start + $max_depth) : ' >= ' . $start),
112
-					(($this->sql_where) ? 'i.' . $this->sql_where : ''),
111
+					'i.depth '.(($max_depth) ? " BETWEEN $start AND ".($start + $max_depth) : ' >= '.$start),
112
+					(($this->sql_where) ? 'i.'.$this->sql_where : ''),
113 113
 				),
114 114
 				'ORDER_BY'	=> 'i.left_id ASC',
115 115
 			),
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 	 * @param \phpbb\template\twig\twig $template
156 156
 	 * @param string $handle
157 157
 	 */
158
-	public function display_list(array $data, \phpbb\template\twig\twig &$template, $handle = 'tree')
158
+	public function display_list(array $data, \phpbb\template\twig\twig & $template, $handle = 'tree')
159 159
 	{
160 160
 		$prev_depth = 0;
161 161
 		$parental_depth = array(0 => -1);
@@ -164,10 +164,10 @@  discard block
 block discarded – undo
164 164
 		for ($i = 0, $size = sizeof($data); $i < $size; $i++)
165 165
 		{
166 166
 			$row 		= $data[$i];
167
-			$this_depth	= $parental_depth[$row['parent_id']] + 1;
168
-			$repeat		= abs($prev_depth - $this_depth);
167
+			$this_depth = $parental_depth[$row['parent_id']] + 1;
168
+			$repeat = abs($prev_depth - $this_depth);
169 169
 
170
-			$tpl_data	= array(
170
+			$tpl_data = array(
171 171
 				'PREV_DEPTH'	=> $prev_depth,
172 172
 				'THIS_DEPTH'	=> $this_depth,
173 173
 				'NUM_KIDS'		=> $this->count_descendants($row),
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 
178 178
 			for ($j = 0; $j < $repeat; $j++)
179 179
 			{
180
-				$template->assign_block_vars($handle . '.close', array());
180
+				$template->assign_block_vars($handle.'.close', array());
181 181
 			}
182 182
 
183 183
 			$prev_depth = $this_depth;
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 
187 187
 		for ($i = 0; $i < $prev_depth; $i++)
188 188
 		{
189
-			$template->assign_block_vars('close_' . $handle, array());
189
+			$template->assign_block_vars('close_'.$handle, array());
190 190
 		}
191 191
 	}
192 192
 
@@ -225,10 +225,10 @@  discard block
 block discarded – undo
225 225
 			}
226 226
 
227 227
 			$right = $row['right_id'];
228
-			$title = $padding . '&#x251c;&#x2500; ' . $row[$title_column];
228
+			$title = $padding.'&#x251c;&#x2500; '.$row[$title_column];
229 229
 			$selected = (in_array($row[$this->pk], $selected_ids)) ? ' selected="selected' : '';
230 230
 
231
-			$return_options .= '<option value="' . $row[$this->pk] . '"' . $selected . '>' . $title . '</option>';
231
+			$return_options .= '<option value="'.$row[$this->pk].'"'.$selected.'>'.$title.'</option>';
232 232
 			$return_data[$row[$this->pk]] = $title;
233 233
 		}
234 234
 
Please login to merge, or discard this patch.