Completed
Push — development ( 3c253d...e0eb69 )
by Thorsten
19s
created
sources/admin/ManageRegistration.controller.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 			// Generate a password
142 142
 			if (empty($this->_req->post->password) || !is_string($this->_req->post->password) || trim($this->_req->post->password) === '')
143 143
 			{
144
-				require_once(SUBSDIR . '/Auth.subs.php');
144
+				require_once(SUBSDIR.'/Auth.subs.php');
145 145
 				mt_srand(time() + 1277);
146 146
 				$password = generateValidationCode();
147 147
 			}
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 				'auth_method' => 'password',
168 168
 			);
169 169
 
170
-			require_once(SUBSDIR . '/Members.subs.php');
170
+			require_once(SUBSDIR.'/Members.subs.php');
171 171
 			$reg_errors = Error_Context::context('register', 0);
172 172
 			$memberID = registerMember($regOptions, 'register');
173 173
 
@@ -182,8 +182,8 @@  discard block
 block discarded – undo
182 182
 				$context['new_member'] = array(
183 183
 					'id' => $memberID,
184 184
 					'name' => $this->_req->post->user,
185
-					'href' => $scripturl . '?action=profile;u=' . $memberID,
186
-					'link' => '<a href="' . $scripturl . '?action=profile;u=' . $memberID . '">' . $this->_req->post->user . '</a>',
185
+					'href' => $scripturl.'?action=profile;u='.$memberID,
186
+					'link' => '<a href="'.$scripturl.'?action=profile;u='.$memberID.'">'.$this->_req->post->user.'</a>',
187 187
 				);
188 188
 				$context['registration_done'] = sprintf($txt['admin_register_done'], $context['new_member']['link']);
189 189
 			}
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 		// Load the assignable member groups.
193 193
 		if (allowedTo('manage_membergroups'))
194 194
 		{
195
-			require_once(SUBSDIR . '/Membergroups.subs.php');
195
+			require_once(SUBSDIR.'/Membergroups.subs.php');
196 196
 			if (allowedTo('admin_forum'))
197 197
 				$includes = array('admin', 'globalmod', 'member');
198 198
 			else
@@ -244,13 +244,13 @@  discard block
 block discarded – undo
244 244
 		// Try to figure out if we have more agreements.
245 245
 		foreach ($languages as $lang)
246 246
 		{
247
-			if (file_exists(BOARDDIR . '/agreement.' . $lang['filename'] . '.txt'))
247
+			if (file_exists(BOARDDIR.'/agreement.'.$lang['filename'].'.txt'))
248 248
 			{
249
-				$context['editable_agreements']['.' . $lang['filename']] = $lang['name'];
249
+				$context['editable_agreements']['.'.$lang['filename']] = $lang['name'];
250 250
 
251 251
 				// Are we editing this?
252
-				if (isset($this->_req->post->agree_lang) && $this->_req->post->agree_lang == '.' . $lang['filename'])
253
-					$context['current_agreement'] = '.' . $lang['filename'];
252
+				if (isset($this->_req->post->agree_lang) && $this->_req->post->agree_lang == '.'.$lang['filename'])
253
+					$context['current_agreement'] = '.'.$lang['filename'];
254 254
 			}
255 255
 		}
256 256
 
@@ -260,15 +260,15 @@  discard block
 block discarded – undo
260 260
 			validateToken('admin-rega');
261 261
 
262 262
 			// Off it goes to the agreement file.
263
-			$fp = fopen(BOARDDIR . '/agreement' . $context['current_agreement'] . '.txt', 'w');
263
+			$fp = fopen(BOARDDIR.'/agreement'.$context['current_agreement'].'.txt', 'w');
264 264
 			fwrite($fp, str_replace("\r", '', $this->_req->post->agreement));
265 265
 			fclose($fp);
266 266
 
267 267
 			updateSettings(array('requireAgreement' => !empty($this->_req->post->requireAgreement), 'checkboxAgreement' => !empty($this->_req->post->checkboxAgreement)));
268 268
 		}
269 269
 
270
-		$context['agreement'] = file_exists(BOARDDIR . '/agreement' . $context['current_agreement'] . '.txt') ? htmlspecialchars(file_get_contents(BOARDDIR . '/agreement' . $context['current_agreement'] . '.txt'), ENT_COMPAT, 'UTF-8') : '';
271
-		$context['warning'] = is_writable(BOARDDIR . '/agreement' . $context['current_agreement'] . '.txt') ? '' : $txt['agreement_not_writable'];
270
+		$context['agreement'] = file_exists(BOARDDIR.'/agreement'.$context['current_agreement'].'.txt') ? htmlspecialchars(file_get_contents(BOARDDIR.'/agreement'.$context['current_agreement'].'.txt'), ENT_COMPAT, 'UTF-8') : '';
271
+		$context['warning'] = is_writable(BOARDDIR.'/agreement'.$context['current_agreement'].'.txt') ? '' : $txt['agreement_not_writable'];
272 272
 		$context['require_agreement'] = !empty($modSettings['requireAgreement']);
273 273
 		$context['checkbox_agreement'] = !empty($modSettings['checkboxAgreement']);
274 274
 
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
 			redirectexit('action=admin;area=regcenter;sa=settings');
359 359
 		}
360 360
 
361
-		$context['post_url'] = $scripturl . '?action=admin;area=regcenter;save;sa=settings';
361
+		$context['post_url'] = $scripturl.'?action=admin;area=regcenter;save;sa=settings';
362 362
 		$context['settings_title'] = $txt['settings'];
363 363
 
364 364
 		// Define some javascript for COPPA.
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
 			checkCoppa();', true);
377 377
 
378 378
 		// Turn the postal address into something suitable for a textbox.
379
-		$modSettings['coppaPost'] = !empty($modSettings['coppaPost']) ? preg_replace('~<br ?/?' . '>~', "\n", $modSettings['coppaPost']) : '';
379
+		$modSettings['coppaPost'] = !empty($modSettings['coppaPost']) ? preg_replace('~<br ?/?'.'>~', "\n", $modSettings['coppaPost']) : '';
380 380
 
381 381
 		Settings_Form::prepare_db($config_vars);
382 382
 	}
Please login to merge, or discard this patch.