Completed
Pull Request — master (#26)
by Daniel
10:05 queued 08:11
created
blocks/links.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
 
73 73
 		return array(
74 74
 			'title'     => $this->title,
75
-			'content'   => $this->ptemplate->render_view('blitze/sitemaker', 'blocks/' . $this->tpl_name . '.html', $this->tpl_name . '_block'),
75
+			'content'   => $this->ptemplate->render_view('blitze/sitemaker', 'blocks/'.$this->tpl_name.'.html', $this->tpl_name.'_block'),
76 76
 		);
77 77
 	}
78 78
 
Please login to merge, or discard this patch.
services/menus/navigation.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 	{
139 139
 		$row['is_navigable'] = $this->is_navigable($row);
140 140
 		$row['is_expandable'] = ($row['is_navigable'] && !$row['item_target']) ? true : false;
141
-		$row['url_path'] = str_replace('/index.' . $this->php_ext, '/', $row['url_path']);
141
+		$row['url_path'] = str_replace('/index.'.$this->php_ext, '/', $row['url_path']);
142 142
 	}
143 143
 
144 144
 	/**
@@ -177,8 +177,8 @@  discard block
 block discarded – undo
177 177
 	{
178 178
 		sort($row['url_query']);
179 179
 
180
-		$row['url_path'] = ($row['url_path'] === '/') ? '/index.' . $this->php_ext : $row['url_path'];
180
+		$row['url_path'] = ($row['url_path'] === '/') ? '/index.'.$this->php_ext : $row['url_path'];
181 181
 
182
-		return $row['url_path'] . ((sizeof($row['url_query'])) ? '?' . join('&', $row['url_query']) : '');
182
+		return $row['url_path'].((sizeof($row['url_query'])) ? '?'.join('&', $row['url_query']) : '');
183 183
 	}
184 184
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,8 +58,7 @@
 block discarded – undo
58 58
 		if (!$is_navigation)
59 59
 		{
60 60
 			$this->tree->display_list($data['items'], $template, 'tree');
61
-		}
62
-		else
61
+		} else
63 62
 		{
64 63
 			$this->tree->set_params($settings);
65 64
 			$this->tree->display_navlist($data, $template, 'tree');
Please login to merge, or discard this patch.
services/menus/display.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@
 block discarded – undo
121 121
 			$this->find_parents($data, $row['parent_id']);
122 122
 		}
123 123
 	}
124
-	*/
124
+	 */
125 125
 
126 126
 	/**
127 127
 	 * @param array $data
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 	 * @param string $handle
71 71
 	 * @return void
72 72
 	 */
73
-	public function display_navlist(array $data, \phpbb\template\twig\twig &$template, $handle = 'tree')
73
+	public function display_navlist(array $data, \phpbb\template\twig\twig & $template, $handle = 'tree')
74 74
 	{
75 75
 		$this->set_current_item($data);
76 76
 		$this->prepare_items($data['items']);
@@ -85,10 +85,10 @@  discard block
 block discarded – undo
85 85
 				$row['num_kids'] = $this->count_descendants($row);
86 86
 
87 87
 				$template->assign_block_vars($handle, array_change_key_case($row, CASE_UPPER));
88
-				$this->close_open_tags($template, $handle . '.close', abs($prev_depth - $this_depth));
88
+				$this->close_open_tags($template, $handle.'.close', abs($prev_depth - $this_depth));
89 89
 			}
90 90
 
91
-			$this->close_open_tags($template, 'close_' . $handle, ($this_depth - $this->min_depth));
91
+			$this->close_open_tags($template, 'close_'.$handle, ($this_depth - $this->min_depth));
92 92
 		}
93 93
 	}
94 94
 
@@ -156,12 +156,12 @@  discard block
 block discarded – undo
156 156
 	 */
157 157
 	protected function get_current_path()
158 158
 	{
159
-		$curr_page = '/' . ltrim($this->user->page['page_dir'] . '/' . $this->user->page['page_name'], './');
159
+		$curr_page = '/'.ltrim($this->user->page['page_dir'].'/'.$this->user->page['page_name'], './');
160 160
 		$curr_parts = explode('&', $this->user->page['query_string']);
161 161
 
162 162
 		sort($curr_parts);
163 163
 
164
-		return $curr_page . '?' . join('&', $curr_parts);
164
+		return $curr_page.'?'.join('&', $curr_parts);
165 165
 	}
166 166
 
167 167
 	/**
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 
204 204
 			$is_current_item = $this->is_current_item($row);
205 205
 			$is_parent = $this->is_parent_of_current_item($row);
206
-			$this_depth	= $this->parental_depth[$row['parent_id']] + 1;
206
+			$this_depth = $this->parental_depth[$row['parent_id']] + 1;
207 207
 			$leaf = $this->get_leaf_node($row, $is_current_item, $is_parent);
208 208
 
209 209
 			$this->parental_depth[$row[$this->pk]] = $this_depth;
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
 	 * @param int $repeat
285 285
 	 * @return void
286 286
 	 */
287
-	protected function close_open_tags(\phpbb\template\twig\twig &$template, $handle, $repeat)
287
+	protected function close_open_tags(\phpbb\template\twig\twig & $template, $handle, $repeat)
288 288
 	{
289 289
 		for ($i = 0; $i < $repeat; $i++)
290 290
 		{
Please login to merge, or discard this patch.
event/startpage.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -120,13 +120,13 @@
 block discarded – undo
120 120
 	 */
121 121
 	public function set_startpage()
122 122
 	{
123
-		if ($this->user->page['page_name'] == 'index.' . $this->php_ext && !$this->is_startpage && ($controller_object = $this->get_startpage_controller()) !== false)
123
+		if ($this->user->page['page_name'] == 'index.'.$this->php_ext && !$this->is_startpage && ($controller_object = $this->get_startpage_controller()) !== false)
124 124
 		{
125 125
 			$method = $this->config['sitemaker_startpage_method'];
126 126
 			$this->is_startpage = true;
127 127
 
128 128
 			$controller_dir = explode('\\', get_class($controller_object));
129
-			$controller_style_dir = 'ext/' . $controller_dir[0] . '/' . $controller_dir[1] . '/styles';
129
+			$controller_style_dir = 'ext/'.$controller_dir[0].'/'.$controller_dir[1].'/styles';
130 130
 			$this->template->set_style(array($controller_style_dir, 'styles'));
131 131
 
132 132
 			$arguments = explode('/', $this->config['sitemaker_startpage_params']);
Please login to merge, or discard this patch.
event/listener.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -68,9 +68,9 @@  discard block
 block discarded – undo
68 68
 	public function load_permission_language(\phpbb\event\data $event)
69 69
 	{
70 70
 		$permissions = $event['permissions'];
71
-		$permissions['a_sm_settings']	= array('lang' => 'ACL_A_SM_SETTINGS', 'cat' => 'misc');
72
-		$permissions['a_sm_manage_blocks']	= array('lang' => 'ACL_A_SM_MANAGE_BLOCKS', 'cat' => 'misc');
73
-		$permissions['a_sm_manage_menus']	= array('lang' => 'ACL_A_SM_MANAGE_MENUS', 'cat' => 'misc');
71
+		$permissions['a_sm_settings'] = array('lang' => 'ACL_A_SM_SETTINGS', 'cat' => 'misc');
72
+		$permissions['a_sm_manage_blocks'] = array('lang' => 'ACL_A_SM_MANAGE_BLOCKS', 'cat' => 'misc');
73
+		$permissions['a_sm_manage_menus'] = array('lang' => 'ACL_A_SM_MANAGE_MENUS', 'cat' => 'misc');
74 74
 		$event['permissions'] = $permissions;
75 75
 	}
76 76
 
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 	 */
80 80
 	public function add_viewonline_location(\phpbb\event\data $event)
81 81
 	{
82
-		if ($event['on_page'][1] == 'app' && strrpos($event['row']['session_page'], 'app.' . $this->php_ext . '/forum') === 0)
82
+		if ($event['on_page'][1] == 'app' && strrpos($event['row']['session_page'], 'app.'.$this->php_ext.'/forum') === 0)
83 83
 		{
84 84
 			$event['location'] = $this->translator->lang('FORUM_INDEX');
85 85
 			$event['location_url'] = $this->phpbb_container->get('controller.helper')->route('blitze_sitemaker_forum');
Please login to merge, or discard this patch.
services/forum/query_builder.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 			$this->store['sql_array']['SELECT'][] = 'ws.notify_status';
166 166
 			$this->store['sql_array']['LEFT_JOIN'][] = array(
167 167
 				'FROM'	=> array($keys[$type]['table'] => 'ws'),
168
-				'ON'	=> $keys[$type]['cond'] . ' AND ws.user_id = ' . (int) $this->user->data['user_id'],
168
+				'ON'	=> $keys[$type]['cond'].' AND ws.user_id = '.(int) $this->user->data['user_id'],
169 169
 			);
170 170
 		}
171 171
 
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 			$this->store['sql_array']['SELECT'][] = 'bm.topic_id as bookmarked';
185 185
 			$this->store['sql_array']['LEFT_JOIN'][] = array(
186 186
 				'FROM'	=> array(BOOKMARKS_TABLE => 'bm'),
187
-				'ON'	=> 'bm.user_id = ' . (int) $this->user->data['user_id'] . ' AND t.topic_id = bm.topic_id'
187
+				'ON'	=> 'bm.user_id = '.(int) $this->user->data['user_id'].' AND t.topic_id = bm.topic_id'
188 188
 			);
189 189
 		}
190 190
 
@@ -205,12 +205,12 @@  discard block
 block discarded – undo
205 205
 			$this->store['sql_array']['SELECT'][] = 'tt.mark_time, ft.mark_time as forum_mark_time';
206 206
 			$this->store['sql_array']['LEFT_JOIN'][] = array(
207 207
 				'FROM'	=> array(TOPICS_TRACK_TABLE => 'tt'),
208
-				'ON'	=> 'tt.user_id = ' . (int) $this->user->data['user_id'] . ' AND t.topic_id = tt.topic_id'
208
+				'ON'	=> 'tt.user_id = '.(int) $this->user->data['user_id'].' AND t.topic_id = tt.topic_id'
209 209
 			);
210 210
 
211 211
 			$this->store['sql_array']['LEFT_JOIN'][] = array(
212 212
 				'FROM'	=> array(FORUMS_TRACK_TABLE => 'ft'),
213
-				'ON'	=> 'ft.user_id = ' . (int) $this->user->data['user_id'] . ' AND t.forum_id = ft.forum_id'
213
+				'ON'	=> 'ft.user_id = '.(int) $this->user->data['user_id'].' AND t.forum_id = ft.forum_id'
214 214
 			);
215 215
 		}
216 216
 
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
 	{
230 230
 		if ($unix_start_time && $unix_stop_time)
231 231
 		{
232
-			$this->store['sql_array']['WHERE'][] = (($mode == 'topic') ? 't.topic_time' : 'p.post_time') . " BETWEEN $unix_start_time AND $unix_stop_time";
232
+			$this->store['sql_array']['WHERE'][] = (($mode == 'topic') ? 't.topic_time' : 'p.post_time')." BETWEEN $unix_start_time AND $unix_stop_time";
233 233
 		}
234 234
 
235 235
 		return $this;
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
 	 */
269 269
 	public function set_sorting($sort_key, $sort_dir = 'DESC')
270 270
 	{
271
-		$this->store['sql_array']['ORDER_BY'] = $sort_key . ' ' . $sort_dir;
271
+		$this->store['sql_array']['ORDER_BY'] = $sort_key.' '.$sort_dir;
272 272
 
273 273
 		return $this;
274 274
 	}
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
 	{
337 337
 		if (!empty($column_id))
338 338
 		{
339
-			$this->store['sql_array']['WHERE'][] = (is_array($column_id)) ? $this->db->sql_in_set($column, $column_id) : $column . ' = ' . (int) $column_id;
339
+			$this->store['sql_array']['WHERE'][] = (is_array($column_id)) ? $this->db->sql_in_set($column, $column_id) : $column.' = '.(int) $column_id;
340 340
 		}
341 341
 	}
342 342
 
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
 	{
349 349
 		if ($check_visibility)
350 350
 		{
351
-			$this->store['sql_array']['WHERE'][] = 't.topic_time <= ' . $this->time();
351
+			$this->store['sql_array']['WHERE'][] = 't.topic_time <= '.$this->time();
352 352
 			$this->store['sql_array']['WHERE'][] = $this->content_visibility->get_global_visibility_sql('topic', $this->ex_fid_ary, 't.');
353 353
 		}
354 354
 	}
Please login to merge, or discard this patch.
services/blocks/admin_bar.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -106,13 +106,13 @@  discard block
 block discarded – undo
106 106
 	public function set_javascript_data($route, $style_id)
107 107
 	{
108 108
 		$board_url = generate_board_url();
109
-		$ajax_url = $board_url . ((!$this->config['enable_mod_rewrite']) ? '/app.' . $this->php_ext : '');
109
+		$ajax_url = $board_url.((!$this->config['enable_mod_rewrite']) ? '/app.'.$this->php_ext : '');
110 110
 
111 111
 		$is_default_route = $u_default_route = false;
112 112
 		if ($this->config['sitemaker_default_layout'])
113 113
 		{
114 114
 			$is_default_route = ($this->config['sitemaker_default_layout'] === $route) ? true : false;
115
-			$u_default_route .= $board_url . '/' . $this->config['sitemaker_default_layout'];
115
+			$u_default_route .= $board_url.'/'.$this->config['sitemaker_default_layout'];
116 116
 			$u_default_route = reapply_sid($u_default_route);
117 117
 		}
118 118
 
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 			'UA_SCRIPT_PATH'	=> $this->user->page['root_script_path'],
129 129
 			'UA_WEB_ROOT_PATH'	=> $this->util->get_web_path(),
130 130
 			'UA_FILEMANAGER'	=> $this->can_use_filemanager(),
131
-			'UA_RF_ACCESS_KEY'	=> sha1($this->user->data['user_form_salt'] . 'filemanager'),
131
+			'UA_RF_ACCESS_KEY'	=> sha1($this->user->data['user_form_salt'].'filemanager'),
132 132
 
133 133
 			'U_VIEW_DEFAULT'	=> $u_default_route,
134 134
 		));
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 			list($controller_service, $controller_method) = explode(':', $controller);
164 164
 			$controller_params	= $symfony_request->attributes->get('_route_params');
165 165
 			$controller_object	= $this->phpbb_container->get($controller_service);
166
-			$controller_class	= get_class($controller_object);
166
+			$controller_class = get_class($controller_object);
167 167
 
168 168
 			$r = new \ReflectionMethod($controller_class, $controller_method);
169 169
 			$class_params = $r->getParameters();
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 				'CONTROLLER_METHOD'	=> $controller_method,
177 177
 				'CONTROLLER_PARAMS'	=> $controller_arguments,
178 178
 				'S_IS_STARTPAGE'	=> $this->is_startpage($controller_service, $controller_arguments),
179
-				'UA_EXTENSION'		=> $namespace . '/' . $extension,
179
+				'UA_EXTENSION'		=> $namespace.'/'.$extension,
180 180
 			));
181 181
 		}
182 182
 	}
@@ -211,11 +211,11 @@  discard block
 block discarded – undo
211 211
 	{
212 212
 		$routes_ary = $this->get_routes();
213 213
 
214
-		$options = '<option value="">' . $this->translator->lang('SELECT') . '</option>';
214
+		$options = '<option value="">'.$this->translator->lang('SELECT').'</option>';
215 215
 		foreach ($routes_ary as $route)
216 216
 		{
217 217
 			$selected = ($route == $current_route) ? ' selected="selected"' : '';
218
-			$options .= '<option value="' . $route . '"' . $selected . '>' . $route . '</option>';
218
+			$options .= '<option value="'.$route.'"'.$selected.'>'.$route.'</option>';
219 219
 		}
220 220
 
221 221
 		return $options;
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
 		$options = '';
233 233
 		foreach ($ex_positions as $position)
234 234
 		{
235
-			$options .= '<option value="' . $position . '" selected="selected">' . $position . '</option>';
235
+			$options .= '<option value="'.$position.'" selected="selected">'.$position.'</option>';
236 236
 		}
237 237
 
238 238
 		return $options;
Please login to merge, or discard this patch.
acp/settings_module.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 		$this->mapper_factory = $phpbb_container->get('blitze.sitemaker.mapper.factory');
84 84
 		$this->trigger_errors = $trigger_errors;
85 85
 
86
-		$this->filemanager_config_file = $this->phpbb_root_path . 'ext/blitze/sitemaker/styles/all/theme/vendor/ResponsiveFilemanager/filemanager/config/config.' . $this->php_ext;
86
+		$this->filemanager_config_file = $this->phpbb_root_path.'ext/blitze/sitemaker/styles/all/theme/vendor/ResponsiveFilemanager/filemanager/config/config.'.$this->php_ext;
87 87
 	}
88 88
 
89 89
 	/**
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 			$this->save_filemanager_settings();
103 103
 			$this->save_config_settings();
104 104
 
105
-			$this->trigger_error($this->translator->lang('SETTINGS_SAVED') . adm_back_link($this->u_action));
105
+			$this->trigger_error($this->translator->lang('SETTINGS_SAVED').adm_back_link($this->u_action));
106 106
 		}
107 107
 
108 108
 		add_form_key($form_key);
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 	{
140 140
 		$style_prefs = (array) json_decode($this->config_text->get('sm_layout_prefs'), true);
141 141
 
142
-		$result = $this->db->sql_query('SELECT style_id, style_name FROM ' . STYLES_TABLE);
142
+		$result = $this->db->sql_query('SELECT style_id, style_name FROM '.STYLES_TABLE);
143 143
 
144 144
 		$styles = array();
145 145
 		while ($row = $this->db->sql_fetchrow($result))
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
 			$path = dirname($path);
218 218
 			$name = basename($path);
219 219
 
220
-			$layouts[$name] = $this->phpbb_root_path . $path . '/';
220
+			$layouts[$name] = $this->phpbb_root_path.$path.'/';
221 221
 		}
222 222
 		ksort($layouts);
223 223
 
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
 	protected function type_cast_filemanager_config_value($curr_val, &$value)
281 281
 	{
282 282
 		$type = gettype($curr_val);
283
-		switch($type)
283
+		switch ($type)
284 284
 		{
285 285
 			case 'string':
286 286
 				$value = "'$value'";
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
 			$id = $entity->get_menu_id();
308 308
 			$name = $entity->get_menu_name();
309 309
 			$selected = ($id == $this->config['sm_navbar_menu']) ? ' selected="selected"' : '';
310
-			$options .= '<option value="' . $id . '"' . $selected . '>' . $name . '</option>';
310
+			$options .= '<option value="'.$id.'"'.$selected.'>'.$name.'</option>';
311 311
 		}
312 312
 
313 313
 		return $options;
Please login to merge, or discard this patch.
controller/upload.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 		}
70 70
 		else
71 71
 		{
72
-			$this->set_file_permissions($upload_dir . $file->get('realname'));
72
+			$this->set_file_permissions($upload_dir.$file->get('realname'));
73 73
 			$json_data['location'] = $file->get('realname');
74 74
 		}
75 75
 
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 	 * @param \phpbb\files\filespec $file
90 90
 	 * @return void
91 91
 	 */
92
-	protected function set_filename(\phpbb\files\filespec &$file)
92
+	protected function set_filename(\phpbb\files\filespec & $file)
93 93
 	{
94 94
 		$mode = 'real';
95 95
 		$prefix = '';
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 	 */
109 109
 	protected function get_file()
110 110
 	{
111
-		$upload_dir = $this->phpbb_root_path . 'images/sitemaker_uploads/source/';
111
+		$upload_dir = $this->phpbb_root_path.'images/sitemaker_uploads/source/';
112 112
 
113 113
 		$file = $this->files_factory->get('files.upload')
114 114
 			->set_disallowed_content(array())
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,8 +66,7 @@
 block discarded – undo
66 66
 		{
67 67
 			$file->remove();
68 68
 			$json_data['message'] = implode('<br />', $file->error);
69
-		}
70
-		else
69
+		} else
71 70
 		{
72 71
 			$this->set_file_permissions($upload_dir . $file->get('realname'));
73 72
 			$json_data['location'] = $file->get('realname');
Please login to merge, or discard this patch.