Completed
Pull Request — development (#2528)
by Thorsten
15:29
created
sources/controllers/ProfileOptions.controller.php 1 patch
Spacing   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -140,11 +140,11 @@  discard block
 block discarded – undo
140 140
 
141 141
 			// Make the changes.
142 142
 			$user_profile[$this->_memID]['buddy_list'] = implode(',', $buddiesArray);
143
-			require_once(SUBSDIR . '/Members.subs.php');
143
+			require_once(SUBSDIR.'/Members.subs.php');
144 144
 			updateMemberData($this->_memID, array('buddy_list' => $user_profile[$this->_memID]['buddy_list']));
145 145
 
146 146
 			// Redirect off the page because we don't like all this ugly query stuff to stick in the history.
147
-			redirectexit('action=profile;area=lists;sa=buddies;u=' . $this->_memID);
147
+			redirectexit('action=profile;area=lists;sa=buddies;u='.$this->_memID);
148 148
 		}
149 149
 		// Or adding a new one
150 150
 		elseif (isset($this->_req->post->new_buddy))
@@ -169,17 +169,17 @@  discard block
 block discarded – undo
169 169
 			if (!empty($new_buddies))
170 170
 			{
171 171
 				// Now find out the id_member of the buddy.
172
-				require_once(SUBSDIR . '/ProfileOptions.subs.php');
172
+				require_once(SUBSDIR.'/ProfileOptions.subs.php');
173 173
 				$buddiesArray = getBuddiesID($new_buddies);
174 174
 
175 175
 				// Now update the current users buddy list.
176 176
 				$user_profile[$this->_memID]['buddy_list'] = implode(',', $buddiesArray);
177
-				require_once(SUBSDIR . '/Members.subs.php');
177
+				require_once(SUBSDIR.'/Members.subs.php');
178 178
 				updateMemberData($this->_memID, array('buddy_list' => $user_profile[$this->_memID]['buddy_list']));
179 179
 			}
180 180
 
181 181
 			// Back to the buddy list!
182
-			redirectexit('action=profile;area=lists;sa=buddies;u=' . $this->_memID);
182
+			redirectexit('action=profile;area=lists;sa=buddies;u='.$this->_memID);
183 183
 		}
184 184
 
185 185
 		// Get all the users "buddies"...
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 
188 188
 		if (!empty($buddiesArray))
189 189
 		{
190
-			require_once(SUBSDIR . '/Members.subs.php');
190
+			require_once(SUBSDIR.'/Members.subs.php');
191 191
 			$result = getBasicMemberData($buddiesArray, array('sort' => 'real_name', 'limit' => substr_count($user_profile[$this->_memID]['buddy_list'], ',') + 1));
192 192
 			foreach ($result as $row)
193 193
 				$buddies[] = $row['id_member'];
@@ -246,11 +246,11 @@  discard block
 block discarded – undo
246 246
 
247 247
 			// Make the changes.
248 248
 			$user_profile[$this->_memID]['pm_ignore_list'] = implode(',', $ignoreArray);
249
-			require_once(SUBSDIR . '/Members.subs.php');
249
+			require_once(SUBSDIR.'/Members.subs.php');
250 250
 			updateMemberData($this->_memID, array('pm_ignore_list' => $user_profile[$this->_memID]['pm_ignore_list']));
251 251
 
252 252
 			// Redirect off the page because we don't like all this ugly query stuff to stick in the history.
253
-			redirectexit('action=profile;area=lists;sa=ignore;u=' . $this->_memID);
253
+			redirectexit('action=profile;area=lists;sa=ignore;u='.$this->_memID);
254 254
 		}
255 255
 		elseif (isset($this->_req->post->new_ignore))
256 256
 		{
@@ -272,17 +272,17 @@  discard block
 block discarded – undo
272 272
 			if (!empty($new_entries))
273 273
 			{
274 274
 				// Now find out the id_member for the members in question.
275
-				require_once(SUBSDIR . '/ProfileOptions.subs.php');
275
+				require_once(SUBSDIR.'/ProfileOptions.subs.php');
276 276
 				$ignoreArray = getBuddiesID($new_entries, false);
277 277
 
278 278
 				// Now update the current users buddy list.
279 279
 				$user_profile[$this->_memID]['pm_ignore_list'] = implode(',', $ignoreArray);
280
-				require_once(SUBSDIR . '/Members.subs.php');
280
+				require_once(SUBSDIR.'/Members.subs.php');
281 281
 				updateMemberData($this->_memID, array('pm_ignore_list' => $user_profile[$this->_memID]['pm_ignore_list']));
282 282
 			}
283 283
 
284 284
 			// Back to the list of pitiful people!
285
-			redirectexit('action=profile;area=lists;sa=ignore;u=' . $this->_memID);
285
+			redirectexit('action=profile;area=lists;sa=ignore;u='.$this->_memID);
286 286
 		}
287 287
 
288 288
 		// Initialise the list of members we're ignoring.
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
 
291 291
 		if (!empty($ignoreArray))
292 292
 		{
293
-			require_once(SUBSDIR . '/Members.subs.php');
293
+			require_once(SUBSDIR.'/Members.subs.php');
294 294
 			$result = getBasicMemberData($ignoreArray, array('sort' => 'real_name', 'limit' => substr_count($user_profile[$this->_memID]['pm_ignore_list'], ',') + 1));
295 295
 			foreach ($result as $row)
296 296
 				$ignored[] = $row['id_member'];
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
 				if (secret)
348 348
 				{
349 349
 					var qrcode = new QRCode("qrcode", {
350
-						text: "otpauth://totp/' . $context['forum_name'] . '?secret=" + secret,
350
+						text: "otpauth://totp/' . $context['forum_name'].'?secret=" + secret,
351 351
 						width: 80,
352 352
 						height: 80,
353 353
 						colorDark : "#000000",
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
 					}
374 374
 
375 375
 					var qrcode = new QRCode("qrcode", {
376
-						text: "otpauth://totp/' . $context['forum_name'] . '?secret=" + text,
376
+						text: "otpauth://totp/' . $context['forum_name'].'?secret=" + text,
377 377
 						width: 80,
378 378
 						height: 80,
379 379
 						colorDark: "#000000",
@@ -507,12 +507,12 @@  discard block
 block discarded – undo
507 507
 				// Is it valid?
508 508
 				else
509 509
 				{
510
-					require_once(SUBSDIR . '/Auth.subs.php');
510
+					require_once(SUBSDIR.'/Auth.subs.php');
511 511
 					$passwordErrors = validatePassword($this->_req->post->passwrd1, $cur_profile['member_name'], array($cur_profile['real_name'], $cur_profile['email_address']));
512 512
 
513 513
 					// Were there errors?
514 514
 					if ($passwordErrors != null)
515
-						$post_errors[] = 'password_' . $passwordErrors;
515
+						$post_errors[] = 'password_'.$passwordErrors;
516 516
 				}
517 517
 
518 518
 				if (empty($post_errors))
@@ -521,20 +521,20 @@  discard block
 block discarded – undo
521 521
 					call_integration_hook('integrate_reset_pass', array($cur_profile['member_name'], $cur_profile['member_name'], $this->_req->post->passwrd1));
522 522
 
523 523
 					// Go then.
524
-					require_once(SUBSDIR . '/Auth.subs.php');
524
+					require_once(SUBSDIR.'/Auth.subs.php');
525 525
 					$new_pass = $this->_req->post->passwrd1;
526 526
 					$passwd = validateLoginPassword($new_pass, '', $cur_profile['member_name'], true);
527 527
 
528 528
 					// Do the important bits.
529
-					require_once(SUBSDIR . '/Members.subs.php');
529
+					require_once(SUBSDIR.'/Members.subs.php');
530 530
 					updateMemberData($this->_memID, array('openid_uri' => '', 'passwd' => $passwd));
531 531
 					if ($context['user']['is_owner'])
532 532
 					{
533
-						setLoginCookie(60 * $modSettings['cookieTime'], $this->_memID, hash('sha256', $new_pass . $cur_profile['password_salt']));
533
+						setLoginCookie(60 * $modSettings['cookieTime'], $this->_memID, hash('sha256', $new_pass.$cur_profile['password_salt']));
534 534
 						redirectexit('action=profile;area=authentication;updated');
535 535
 					}
536 536
 					else
537
-						redirectexit('action=profile;u=' . $this->_memID);
537
+						redirectexit('action=profile;u='.$this->_memID);
538 538
 				}
539 539
 
540 540
 				return true;
@@ -542,8 +542,8 @@  discard block
 block discarded – undo
542 542
 			// Not right yet!
543 543
 			elseif ($this->_req->post->authenticate === 'openid' && !empty($this->_req->post->openid_identifier))
544 544
 			{
545
-				require_once(SUBSDIR . '/OpenID.subs.php');
546
-				require_once(SUBSDIR . '/Members.subs.php');
545
+				require_once(SUBSDIR.'/OpenID.subs.php');
546
+				require_once(SUBSDIR.'/Members.subs.php');
547 547
 
548 548
 				$openID = new OpenID();
549 549
 				$this->_req->post->openid_identifier = $openID->canonize($this->_req->post->openid_identifier);
@@ -581,9 +581,9 @@  discard block
 block discarded – undo
581 581
 		loadTemplate('ProfileOptions');
582 582
 
583 583
 		// Going to need this for the list.
584
-		require_once(SUBSDIR . '/Boards.subs.php');
585
-		require_once(SUBSDIR . '/Topic.subs.php');
586
-		require_once(SUBSDIR . '/Profile.subs.php');
584
+		require_once(SUBSDIR.'/Boards.subs.php');
585
+		require_once(SUBSDIR.'/Topic.subs.php');
586
+		require_once(SUBSDIR.'/Profile.subs.php');
587 587
 
588 588
 		$context['mention_types'] = getMemberNotificationsProfile($this->_memID);
589 589
 
@@ -591,9 +591,9 @@  discard block
 block discarded – undo
591 591
 		$listOptions = array(
592 592
 			'id' => 'board_notification_list',
593 593
 			'width' => '100%',
594
-			'no_items_label' => $txt['notifications_boards_none'] . '<br /><br />' . $txt['notifications_boards_howto'],
594
+			'no_items_label' => $txt['notifications_boards_none'].'<br /><br />'.$txt['notifications_boards_howto'],
595 595
 			'no_items_align' => 'left',
596
-			'base_href' => $scripturl . '?action=profile;u=' . $this->_memID . ';area=notification',
596
+			'base_href' => $scripturl.'?action=profile;u='.$this->_memID.';area=notification',
597 597
 			'default_sort_col' => 'board_name',
598 598
 			'get_items' => array(
599 599
 				'function' => array($this, 'list_getBoardNotifications'),
@@ -608,13 +608,13 @@  discard block
 block discarded – undo
608 608
 						'class' => 'lefttext',
609 609
 					),
610 610
 					'data' => array(
611
-						'function' => function ($board) {
611
+						'function' => function($board) {
612 612
 							global $txt;
613 613
 
614 614
 							$link = $board['link'];
615 615
 
616 616
 							if ($board['new'])
617
-								$link .= ' <a href="' . $board['href'] . '"><span class="new_posts">' . $txt['new'] . '</span></a>';
617
+								$link .= ' <a href="'.$board['href'].'"><span class="new_posts">'.$txt['new'].'</span></a>';
618 618
 
619 619
 							return $link;
620 620
 						},
@@ -643,7 +643,7 @@  discard block
 block discarded – undo
643 643
 				),
644 644
 			),
645 645
 			'form' => array(
646
-				'href' => $scripturl . '?action=profile;area=notification',
646
+				'href' => $scripturl.'?action=profile;area=notification',
647 647
 				'include_sort' => true,
648 648
 				'include_start' => true,
649 649
 				'hidden_fields' => array(
@@ -658,12 +658,12 @@  discard block
 block discarded – undo
658 658
 					'class' => 'submitbutton',
659 659
 					'position' => 'bottom_of_list',
660 660
 					'value' => '
661
-						<input type="submit" name="edit_notify_boards" value="' . $txt['notifications_boards_update'] . '" />
661
+						<input type="submit" name="edit_notify_boards" value="' . $txt['notifications_boards_update'].'" />
662 662
 						<input type="hidden" name="save" value="save" />',
663 663
 				),
664 664
 				array(
665 665
 					'position' => 'after_title',
666
-					'value' => getBoardNotificationsCount($this->_memID) == 0 ? $txt['notifications_boards_none'] . '<br />' . $txt['notifications_boards_howto'] : $txt['notifications_boards_current'],
666
+					'value' => getBoardNotificationsCount($this->_memID) == 0 ? $txt['notifications_boards_none'].'<br />'.$txt['notifications_boards_howto'] : $txt['notifications_boards_current'],
667 667
 				),
668 668
 			),
669 669
 		);
@@ -676,9 +676,9 @@  discard block
 block discarded – undo
676 676
 			'id' => 'topic_notification_list',
677 677
 			'width' => '100%',
678 678
 			'items_per_page' => $modSettings['defaultMaxMessages'],
679
-			'no_items_label' => $txt['notifications_topics_none'] . '<br /><br />' . $txt['notifications_topics_howto'],
679
+			'no_items_label' => $txt['notifications_topics_none'].'<br /><br />'.$txt['notifications_topics_howto'],
680 680
 			'no_items_align' => 'left',
681
-			'base_href' => $scripturl . '?action=profile;u=' . $this->_memID . ';area=notification',
681
+			'base_href' => $scripturl.'?action=profile;u='.$this->_memID.';area=notification',
682 682
 			'default_sort_col' => 'last_post',
683 683
 			'get_items' => array(
684 684
 				'function' => array($this, 'list_getTopicNotifications'),
@@ -699,15 +699,15 @@  discard block
 block discarded – undo
699 699
 						'class' => 'lefttext',
700 700
 					),
701 701
 					'data' => array(
702
-						'function' => function ($topic) {
702
+						'function' => function($topic) {
703 703
 							global $txt;
704 704
 
705 705
 							$link = $topic['link'];
706 706
 
707 707
 							if ($topic['new'])
708
-								$link .= ' <a href="' . $topic['new_href'] . '"><span class="new_posts">' . $txt['new'] . '</span></a>';
708
+								$link .= ' <a href="'.$topic['new_href'].'"><span class="new_posts">'.$txt['new'].'</span></a>';
709 709
 
710
-							$link .= '<br /><span class="smalltext"><em>' . $txt['in'] . ' ' . $topic['board_link'] . '</em></span>';
710
+							$link .= '<br /><span class="smalltext"><em>'.$txt['in'].' '.$topic['board_link'].'</em></span>';
711 711
 
712 712
 							return $link;
713 713
 						},
@@ -737,7 +737,7 @@  discard block
 block discarded – undo
737 737
 					),
738 738
 					'data' => array(
739 739
 						'sprintf' => array(
740
-							'format' => '<span class="smalltext">%1$s<br />' . $txt['by'] . ' %2$s</span>',
740
+							'format' => '<span class="smalltext">%1$s<br />'.$txt['by'].' %2$s</span>',
741 741
 							'params' => array(
742 742
 								'updated' => false,
743 743
 								'poster_updated_link' => false,
@@ -767,7 +767,7 @@  discard block
 block discarded – undo
767 767
 				),
768 768
 			),
769 769
 			'form' => array(
770
-				'href' => $scripturl . '?action=profile;area=notification',
770
+				'href' => $scripturl.'?action=profile;area=notification',
771 771
 				'include_sort' => true,
772 772
 				'include_start' => true,
773 773
 				'hidden_fields' => array(
@@ -782,7 +782,7 @@  discard block
 block discarded – undo
782 782
 					'class' => 'submitbutton',
783 783
 					'position' => 'bottom_of_list',
784 784
 					'value' => '
785
-						<input type="submit" name="edit_notify_topics" value="' . $txt['notifications_update'] . '" />
785
+						<input type="submit" name="edit_notify_topics" value="' . $txt['notifications_update'].'" />
786 786
 						<input type="hidden" name="save" value="save" />',
787 787
 				),
788 788
 			),
@@ -862,7 +862,7 @@  discard block
 block discarded – undo
862 862
 		loadTemplate('ProfileOptions');
863 863
 
864 864
 		$context['sub_template'] = 'ignoreboards';
865
-		require_once(SUBSDIR . '/Boards.subs.php');
865
+		require_once(SUBSDIR.'/Boards.subs.php');
866 866
 		$context += getBoardList(array('not_redirection' => true, 'ignore' => !empty($cur_profile['ignore_boards']) ? explode(',', $cur_profile['ignore_boards']) : array()));
867 867
 
868 868
 		// Include a list of boards per category for easy toggling.
@@ -892,7 +892,7 @@  discard block
 block discarded – undo
892 892
 		$context['can_manage_membergroups'] = allowedTo('manage_membergroups');
893 893
 		$context['can_manage_protected'] = allowedTo('admin_forum');
894 894
 		$context['can_edit_primary'] = $context['can_manage_protected'];
895
-		$context['update_message'] = isset($this->_req->query->msg) && isset($txt['group_membership_msg_' . $this->_req->query->msg]) ? $txt['group_membership_msg_' . $this->_req->query->msg] : '';
895
+		$context['update_message'] = isset($this->_req->query->msg) && isset($txt['group_membership_msg_'.$this->_req->query->msg]) ? $txt['group_membership_msg_'.$this->_req->query->msg] : '';
896 896
 
897 897
 		// Get all the groups this user is a member of.
898 898
 		$groups = explode(',', $curMember['additional_groups']);
@@ -906,7 +906,7 @@  discard block
 block discarded – undo
906 906
 		$groups = array_map('intval', $groups);
907 907
 
908 908
 		// Get all the membergroups they can join.
909
-		require_once(SUBSDIR . '/ProfileOptions.subs.php');
909
+		require_once(SUBSDIR.'/ProfileOptions.subs.php');
910 910
 		$context['groups'] = loadMembergroupsJoin($groups, $this->_memID);
911 911
 
912 912
 		// Add registered members on the end.
@@ -954,7 +954,7 @@  discard block
 block discarded – undo
954 954
 		// GID may be from a link or a form
955 955
 		checkSession(isset($this->_req->query->gid) ? 'get' : 'post');
956 956
 
957
-		require_once(SUBSDIR . '/Membergroups.subs.php');
957
+		require_once(SUBSDIR.'/Membergroups.subs.php');
958 958
 
959 959
 		$old_profile = &$user_profile[$this->_memID];
960 960
 		$context['can_manage_membergroups'] = allowedTo('manage_membergroups');
@@ -1021,7 +1021,7 @@  discard block
 block discarded – undo
1021 1021
 			Errors::instance()->fatal_lang_error('no_access', false);
1022 1022
 
1023 1023
 		// Final security check, don't allow users to promote themselves to admin.
1024
-		require_once(SUBSDIR . '/ProfileOptions.subs.php');
1024
+		require_once(SUBSDIR.'/ProfileOptions.subs.php');
1025 1025
 		if ($context['can_manage_membergroups'] && !allowedTo('admin_forum'))
1026 1026
 		{
1027 1027
 			$disallow = checkMembergroupChange($group_id);
@@ -1036,22 +1036,22 @@  discard block
 block discarded – undo
1036 1036
 				Errors::instance()->fatal_lang_error('profile_error_already_requested_group');
1037 1037
 
1038 1038
 			// Send an email to all group moderators etc.
1039
-			require_once(SUBSDIR . '/Mail.subs.php');
1039
+			require_once(SUBSDIR.'/Mail.subs.php');
1040 1040
 
1041 1041
 			// Do we have any group moderators?
1042
-			require_once(SUBSDIR . '/Membergroups.subs.php');
1042
+			require_once(SUBSDIR.'/Membergroups.subs.php');
1043 1043
 			$moderators = array_keys(getGroupModerators($group_id));
1044 1044
 
1045 1045
 			// Otherwise this is the backup!
1046 1046
 			if (empty($moderators))
1047 1047
 			{
1048
-				require_once(SUBSDIR . '/Members.subs.php');
1048
+				require_once(SUBSDIR.'/Members.subs.php');
1049 1049
 				$moderators = membersAllowedTo('manage_membergroups');
1050 1050
 			}
1051 1051
 
1052 1052
 			if (!empty($moderators))
1053 1053
 			{
1054
-				require_once(SUBSDIR . '/Members.subs.php');
1054
+				require_once(SUBSDIR.'/Members.subs.php');
1055 1055
 				$members = getBasicMemberData($moderators, array('preferences' => true, 'sort' => 'lngfile'));
1056 1056
 
1057 1057
 				foreach ($members as $member)
@@ -1072,7 +1072,7 @@  discard block
 block discarded – undo
1072 1072
 						'APPYNAME' => $old_profile['member_name'],
1073 1073
 						'GROUPNAME' => $group_name,
1074 1074
 						'REASON' => $this->_req->post->reason,
1075
-						'MODLINK' => $scripturl . '?action=moderate;area=groups;sa=requests',
1075
+						'MODLINK' => $scripturl.'?action=moderate;area=groups;sa=requests',
1076 1076
 					);
1077 1077
 
1078 1078
 					$emaildata = loadEmailTemplate('request_membership', $replacements, empty($member['lngfile']) || empty($modSettings['userLanguage']) ? $language : $member['lngfile']);
@@ -1132,7 +1132,7 @@  discard block
 block discarded – undo
1132 1132
 		else
1133 1133
 			updateSettings(array('settings_updated' => time()));
1134 1134
 
1135
-		require_once(SUBSDIR . '/Members.subs.php');
1135
+		require_once(SUBSDIR.'/Members.subs.php');
1136 1136
 		updateMemberData($this->_memID, array('id_group' => $newPrimary, 'additional_groups' => $addGroups));
1137 1137
 
1138 1138
 		return $changeType;
@@ -1160,7 +1160,7 @@  discard block
 block discarded – undo
1160 1160
 		}
1161 1161
 		else
1162 1162
 		{
1163
-			require_once(SUBSDIR . '/Themes.subs.php');
1163
+			require_once(SUBSDIR.'/Themes.subs.php');
1164 1164
 			$context['member']['options'] = loadThemeOptionsInto(array(1, (int) $cur_profile['id_theme']), array(-1, $this->_memID), $context['member']['options']);
1165 1165
 
1166 1166
 			if (isset($this->_req->post->options))
Please login to merge, or discard this patch.
sources/controllers/Auth.controller.php 1 patch
Spacing   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 
74 74
 		// Add the login chain to the link tree.
75 75
 		$context['linktree'][] = array(
76
-			'url' => $scripturl . '?action=login',
76
+			'url' => $scripturl.'?action=login',
77 77
 			'name' => $txt['login'],
78 78
 		);
79 79
 
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 		global $txt, $scripturl, $user_info, $user_settings, $modSettings, $context, $sc;
106 106
 
107 107
 		// Load cookie authentication and all stuff.
108
-		require_once(SUBSDIR . '/Auth.subs.php');
108
+		require_once(SUBSDIR.'/Auth.subs.php');
109 109
 
110 110
 		// Beyond this point you are assumed to be a guest trying to login.
111 111
 		if (!$user_info['is_guest'])
@@ -146,14 +146,14 @@  discard block
 block discarded – undo
146 146
 
147 147
 		// Add the login chain to the link tree.
148 148
 		$context['linktree'][] = array(
149
-			'url' => $scripturl . '?action=login',
149
+			'url' => $scripturl.'?action=login',
150 150
 			'name' => $txt['login'],
151 151
 		);
152 152
 
153 153
 		// This is an OpenID login. Let's validate...
154 154
 		if (!empty($_POST['openid_identifier']) && !empty($modSettings['enableOpenID']))
155 155
 		{
156
-			require_once(SUBSDIR . '/OpenID.subs.php');
156
+			require_once(SUBSDIR.'/OpenID.subs.php');
157 157
 			$open_id = new OpenID();
158 158
 
159 159
 			if (($open_id->validate($_POST['openid_identifier'])) !== 'no_data')
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 		$user_settings = loadExistingMember($_POST['user']);
211 211
 
212 212
 		// User using 2FA for login? Let's validate the token...
213
-		if (!empty($modSettings['enableOTP']) &&!empty($user_settings['enable_otp']) && empty($_POST['otp_token']))
213
+		if (!empty($modSettings['enableOTP']) && !empty($user_settings['enable_otp']) && empty($_POST['otp_token']))
214 214
 		{
215 215
 			$context['login_errors'] = array($txt['otp_required']);
216 216
 			return false;
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 
219 219
 		if (!empty($_POST['otp_token']))
220 220
 		{
221
-			require_once(EXTDIR . '/GoogleAuthenticator.php');
221
+			require_once(EXTDIR.'/GoogleAuthenticator.php');
222 222
 			$ga = New GoogleAuthenticator();
223 223
 
224 224
 			$ga->GetCode($user_settings['otp_secret']);
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
 				$valid_password = true;
257 257
 			}
258 258
 			// Maybe is an old SHA-1 and needs upgrading if the db string is an actual 40 hexchar SHA-1
259
-			elseif (preg_match('/^[0-9a-f]{40}$/i', $user_settings['passwd']) && isset($_POST['old_hash_passwrd']) && $_POST['old_hash_passwrd'] === hash('sha1', $user_settings['passwd'] . $sc))
259
+			elseif (preg_match('/^[0-9a-f]{40}$/i', $user_settings['passwd']) && isset($_POST['old_hash_passwrd']) && $_POST['old_hash_passwrd'] === hash('sha1', $user_settings['passwd'].$sc))
260 260
 			{
261 261
 				// Old password passed, turn off hashing and ask for it again so we can update the db to something more secure.
262 262
 				$context['login_errors'] = array($txt['login_hash_error']);
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
 					redirectexit('action=reminder');
279 279
 				else
280 280
 				{
281
-					Errors::instance()->log_error($txt['incorrect_password'] . ' - <span class="remove">' . $user_settings['member_name'] . '</span>', 'user');
281
+					Errors::instance()->log_error($txt['incorrect_password'].' - <span class="remove">'.$user_settings['member_name'].'</span>', 'user');
282 282
 
283 283
 					// Wrong password, lets enable plain text responses in case form hashing is causing problems
284 284
 					$context['disable_login_hashing'] = true;
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
 				$user_settings['password_salt'] = $tokenizer->generate_hash(4);
315 315
 
316 316
 				// Update the password hash and set up the salt.
317
-				require_once(SUBSDIR . '/Members.subs.php');
317
+				require_once(SUBSDIR.'/Members.subs.php');
318 318
 				updateMemberData($user_settings['id_member'], array('passwd' => $user_settings['passwd'], 'password_salt' => $user_settings['password_salt'], 'passwd_flood' => ''));
319 319
 			}
320 320
 			// Okay, they for sure didn't enter the password!
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
 				else
331 331
 				{
332 332
 					// Log an error so we know that it didn't go well in the error log.
333
-					Errors::instance()->log_error($txt['incorrect_password'] . ' - <span class="remove">' . $user_settings['member_name'] . '</span>', 'user');
333
+					Errors::instance()->log_error($txt['incorrect_password'].' - <span class="remove">'.$user_settings['member_name'].'</span>', 'user');
334 334
 
335 335
 					$context['login_errors'] = array($txt['incorrect_password']);
336 336
 					return false;
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
 			validatePasswordFlood($user_settings['id_member'], $user_settings['passwd_flood'], true);
344 344
 
345 345
 			// If we got here then we can reset the flood counter.
346
-			require_once(SUBSDIR . '/Members.subs.php');
346
+			require_once(SUBSDIR.'/Members.subs.php');
347 347
 			updateMemberData($user_settings['id_member'], array('passwd_flood' => ''));
348 348
 		}
349 349
 
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
 		// Let's track the last used one-time password.
359 359
 		if (!empty($_POST['otp_token']))
360 360
 		{
361
-			require_once(SUBSDIR . '/Members.subs.php');
361
+			require_once(SUBSDIR.'/Members.subs.php');
362 362
 			updateMemberData($user_settings['id_member'], array('otp_used' => $_POST['otp_token']));
363 363
 		}
364 364
 		// Check their activation status.
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
 		if (!$internal)
388 388
 			checkSession('get');
389 389
 
390
-		require_once(SUBSDIR . '/Auth.subs.php');
390
+		require_once(SUBSDIR.'/Auth.subs.php');
391 391
 
392 392
 		if (isset($_SESSION['pack_ftp']))
393 393
 			$_SESSION['pack_ftp'] = null;
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
 			call_integration_hook('integrate_logout', array($user_settings['member_name']));
407 407
 
408 408
 			// If you log out, you aren't online anymore :P.
409
-			require_once(SUBSDIR . '/Logging.subs.php');
409
+			require_once(SUBSDIR.'/Logging.subs.php');
410 410
 			logOnline($user_info['id'], false);
411 411
 		}
412 412
 
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
 		$types = array('admin', 'moderate');
415 415
 		call_integration_hook('integrate_validateSession', array(&$types));
416 416
 		foreach ($types as $type)
417
-			unset($_SESSION[$type . '_time']);
417
+			unset($_SESSION[$type.'_time']);
418 418
 
419 419
 		$_SESSION['log_time'] = 0;
420 420
 
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
 		if (!empty($user_info['id']))
427 427
 		{
428 428
 			$tokenizer = new Token_Hash();
429
-			require_once(SUBSDIR . '/Members.subs.php');
429
+			require_once(SUBSDIR.'/Members.subs.php');
430 430
 			updateMemberData($user_info['id'], array('password_salt' => $tokenizer->generate_hash(4)));
431 431
 		}
432 432
 
@@ -572,7 +572,7 @@  discard block
 block discarded – undo
572 572
 			$other_passwords[] = md5($_POST['passwrd']);
573 573
 			$other_passwords[] = sha1($_POST['passwrd']);
574 574
 			$other_passwords[] = md5_hmac($_POST['passwrd'], strtolower($user_settings['member_name']));
575
-			$other_passwords[] = md5($_POST['passwrd'] . strtolower($user_settings['member_name']));
575
+			$other_passwords[] = md5($_POST['passwrd'].strtolower($user_settings['member_name']));
576 576
 			$other_passwords[] = md5(md5($_POST['passwrd']));
577 577
 			$other_passwords[] = $_POST['passwrd'];
578 578
 
@@ -602,29 +602,29 @@  discard block
 block discarded – undo
602 602
 		elseif (!empty($modSettings['enable_password_conversion']) && $pw_strlen === 32)
603 603
 		{
604 604
 			// vBulletin 3 style hashing?  Let's welcome them with open arms \o/.
605
-			$other_passwords[] = md5(md5($_POST['passwrd']) . stripslashes($user_settings['password_salt']));
605
+			$other_passwords[] = md5(md5($_POST['passwrd']).stripslashes($user_settings['password_salt']));
606 606
 
607 607
 			// Hmm.. p'raps it's Invision 2 style?
608
-			$other_passwords[] = md5(md5($user_settings['password_salt']) . md5($_POST['passwrd']));
608
+			$other_passwords[] = md5(md5($user_settings['password_salt']).md5($_POST['passwrd']));
609 609
 
610 610
 			// Some common md5 ones.
611
-			$other_passwords[] = md5($user_settings['password_salt'] . $_POST['passwrd']);
612
-			$other_passwords[] = md5($_POST['passwrd'] . $user_settings['password_salt']);
611
+			$other_passwords[] = md5($user_settings['password_salt'].$_POST['passwrd']);
612
+			$other_passwords[] = md5($_POST['passwrd'].$user_settings['password_salt']);
613 613
 		}
614 614
 		// The hash is 40 characters, lets try some SHA-1 style auth
615 615
 		elseif ($pw_strlen === 40)
616 616
 		{
617 617
 			// Maybe they are using a hash from before our password upgrade
618
-			$other_passwords[] = sha1(strtolower($user_settings['member_name']) . un_htmlspecialchars($_POST['passwrd']));
619
-			$other_passwords[] = sha1($user_settings['passwd'] . $sc);
618
+			$other_passwords[] = sha1(strtolower($user_settings['member_name']).un_htmlspecialchars($_POST['passwrd']));
619
+			$other_passwords[] = sha1($user_settings['passwd'].$sc);
620 620
 
621 621
 			if (!empty($modSettings['enable_password_conversion']))
622 622
 			{
623 623
 				// BurningBoard3 style of hashing.
624
-				$other_passwords[] = sha1($user_settings['password_salt'] . sha1($user_settings['password_salt'] . sha1($_POST['passwrd'])));
624
+				$other_passwords[] = sha1($user_settings['password_salt'].sha1($user_settings['password_salt'].sha1($_POST['passwrd'])));
625 625
 
626 626
 				// PunBB 1.4 and later
627
-				$other_passwords[] = sha1($user_settings['password_salt'] . sha1($_POST['passwrd']));
627
+				$other_passwords[] = sha1($user_settings['password_salt'].sha1($_POST['passwrd']));
628 628
 			}
629 629
 
630 630
 			// Perhaps we converted from a non UTF-8 db and have a valid password being hashed differently.
@@ -632,11 +632,11 @@  discard block
 block discarded – undo
632 632
 			{
633 633
 				// Try iconv first, for no particular reason.
634 634
 				if (function_exists('iconv'))
635
-					$other_passwords['iconv'] = sha1(strtolower(iconv('UTF-8', $modSettings['previousCharacterSet'], $user_settings['member_name'])) . un_htmlspecialchars(iconv('UTF-8', $modSettings['previousCharacterSet'], $_POST['passwrd'])));
635
+					$other_passwords['iconv'] = sha1(strtolower(iconv('UTF-8', $modSettings['previousCharacterSet'], $user_settings['member_name'])).un_htmlspecialchars(iconv('UTF-8', $modSettings['previousCharacterSet'], $_POST['passwrd'])));
636 636
 
637 637
 				// Say it aint so, iconv failed!
638 638
 				if (empty($other_passwords['iconv']) && function_exists('mb_convert_encoding'))
639
-					$other_passwords[] = sha1(strtolower(mb_convert_encoding($user_settings['member_name'], 'UTF-8', $modSettings['previousCharacterSet'])) . un_htmlspecialchars(mb_convert_encoding($_POST['passwrd'], 'UTF-8', $modSettings['previousCharacterSet'])));
639
+					$other_passwords[] = sha1(strtolower(mb_convert_encoding($user_settings['member_name'], 'UTF-8', $modSettings['previousCharacterSet'])).un_htmlspecialchars(mb_convert_encoding($_POST['passwrd'], 'UTF-8', $modSettings['previousCharacterSet'])));
640 640
 			}
641 641
 		}
642 642
 		// SHA-256 will be 64 characters long, lets check some of these possibilities
@@ -646,18 +646,18 @@  discard block
 block discarded – undo
646 646
 			$other_passwords[] = hash_hmac('sha256', $_POST['passwrd'], $user_settings['password_salt']);
647 647
 
648 648
 			// Plain SHA-256?
649
-			$other_passwords[] = hash('sha256', $_POST['passwrd'] . $user_settings['password_salt']);
649
+			$other_passwords[] = hash('sha256', $_POST['passwrd'].$user_settings['password_salt']);
650 650
 
651 651
 			// Xenforo?
652
-			$other_passwords[] = sha1(sha1($_POST['passwrd']) . $user_settings['password_salt']);
653
-			$other_passwords[] = hash('sha256', (hash('sha256', ($_POST['passwrd']) . $user_settings['password_salt'])));
652
+			$other_passwords[] = sha1(sha1($_POST['passwrd']).$user_settings['password_salt']);
653
+			$other_passwords[] = hash('sha256', (hash('sha256', ($_POST['passwrd']).$user_settings['password_salt'])));
654 654
 		}
655 655
 
656 656
 		// ElkArte's sha1 function can give a funny result on Linux (Not our fault!). If we've now got the real one let the old one be valid!
657 657
 		if (stripos(PHP_OS, 'win') !== 0)
658 658
 		{
659
-			require_once(SUBSDIR . '/Compat.subs.php');
660
-			$other_passwords[] = sha1_smf(strtolower($user_settings['member_name']) . un_htmlspecialchars($_POST['passwrd']));
659
+			require_once(SUBSDIR.'/Compat.subs.php');
660
+			$other_passwords[] = sha1_smf(strtolower($user_settings['member_name']).un_htmlspecialchars($_POST['passwrd']));
661 661
 		}
662 662
 
663 663
 		// Allows mods to easily extend the $other_passwords array
@@ -695,7 +695,7 @@  discard block
 block discarded – undo
695 695
 	// Check if the account is activated - COPPA first...
696 696
 	if ($activation_status == 5)
697 697
 	{
698
-		$context['login_errors'][] = $txt['coppa_no_concent'] . ' <a href="' . $scripturl . '?action=register;sa=coppa;member=' . $user_settings['id_member'] . '">' . $txt['coppa_need_more_details'] . '</a>';
698
+		$context['login_errors'][] = $txt['coppa_no_concent'].' <a href="'.$scripturl.'?action=register;sa=coppa;member='.$user_settings['id_member'].'">'.$txt['coppa_need_more_details'].'</a>';
699 699
 		return false;
700 700
 	}
701 701
 	// Awaiting approval still?
@@ -706,7 +706,7 @@  discard block
 block discarded – undo
706 706
 	{
707 707
 		if (isset($_REQUEST['undelete']))
708 708
 		{
709
-			require_once(SUBSDIR . '/Members.subs.php');
709
+			require_once(SUBSDIR.'/Members.subs.php');
710 710
 			updateMemberData($user_settings['id_member'], array('is_activated' => 1));
711 711
 			updateSettings(array('unapprovedMembers' => ($modSettings['unapprovedMembers'] > 0 ? $modSettings['unapprovedMembers'] - 1 : 0)));
712 712
 		}
@@ -721,9 +721,9 @@  discard block
 block discarded – undo
721 721
 	// Standard activation?
722 722
 	elseif ($activation_status != 1)
723 723
 	{
724
-		Errors::instance()->log_error($txt['activate_not_completed1'] . ' - <span class="remove">' . $user_settings['member_name'] . '</span>', false);
724
+		Errors::instance()->log_error($txt['activate_not_completed1'].' - <span class="remove">'.$user_settings['member_name'].'</span>', false);
725 725
 
726
-		$context['login_errors'][] = $txt['activate_not_completed1'] . ' <a href="' . $scripturl . '?action=register;sa=activate;resend;u=' . $user_settings['id_member'] . '">' . $txt['activate_not_completed2'] . '</a>';
726
+		$context['login_errors'][] = $txt['activate_not_completed1'].' <a href="'.$scripturl.'?action=register;sa=activate;resend;u='.$user_settings['id_member'].'">'.$txt['activate_not_completed2'].'</a>';
727 727
 		return false;
728 728
 	}
729 729
 	return true;
@@ -742,7 +742,7 @@  discard block
 block discarded – undo
742 742
 	global $user_info, $user_settings, $maintenance, $modSettings, $context;
743 743
 
744 744
 	// Load authentication stuffs.
745
-	require_once(SUBSDIR . '/Auth.subs.php');
745
+	require_once(SUBSDIR.'/Auth.subs.php');
746 746
 
747 747
 	// Call login integration functions.
748 748
 	call_integration_hook('integrate_login', array($user_settings['member_name'], isset($_POST['hash_passwrd']) && strlen($_POST['hash_passwrd']) == 64 ? $_POST['hash_passwrd'] : null, $modSettings['cookieTime']));
@@ -751,7 +751,7 @@  discard block
 block discarded – undo
751 751
 	$user_info['id'] = $user_settings['id_member'];
752 752
 
753 753
 	// Bam!  Cookie set.  A session too, just in case.
754
-	setLoginCookie(60 * $modSettings['cookieTime'], $user_settings['id_member'], hash('sha256', ($user_settings['passwd'] . $user_settings['password_salt'])));
754
+	setLoginCookie(60 * $modSettings['cookieTime'], $user_settings['id_member'], hash('sha256', ($user_settings['passwd'].$user_settings['password_salt'])));
755 755
 
756 756
 	// Reset the login threshold.
757 757
 	if (isset($_SESSION['failed_login']))
@@ -787,12 +787,12 @@  discard block
 block discarded – undo
787 787
 	$req = request();
788 788
 
789 789
 	// You've logged in, haven't you?
790
-	require_once(SUBSDIR . '/Members.subs.php');
790
+	require_once(SUBSDIR.'/Members.subs.php');
791 791
 	updateMemberData($user_info['id'], array('last_login' => time(), 'member_ip' => $user_info['ip'], 'member_ip2' => $req->ban_ip()));
792 792
 
793 793
 	// Get rid of the online entry for that old guest....
794
-	require_once(SUBSDIR . '/Logging.subs.php');
795
-	deleteOnline('ip' . $user_info['ip']);
794
+	require_once(SUBSDIR.'/Logging.subs.php');
795
+	deleteOnline('ip'.$user_info['ip']);
796 796
 	$_SESSION['log_time'] = 0;
797 797
 
798 798
 	// Log this entry, only if we have it enabled.
@@ -801,9 +801,9 @@  discard block
 block discarded – undo
801 801
 
802 802
 	// Just log you back out if it's in maintenance mode and you AREN'T an admin.
803 803
 	if (empty($maintenance) || allowedTo('admin_forum'))
804
-		redirectexit('action=auth;sa=check;member=' . $user_info['id'], detectServer()->is('needs_login_fix'));
804
+		redirectexit('action=auth;sa=check;member='.$user_info['id'], detectServer()->is('needs_login_fix'));
805 805
 	else
806
-		redirectexit('action=logout;' . $context['session_var'] . '=' . $context['session_id'], detectServer()->is('needs_login_fix'));
806
+		redirectexit('action=logout;'.$context['session_var'].'='.$context['session_id'], detectServer()->is('needs_login_fix'));
807 807
 }
808 808
 
809 809
 /**
@@ -817,7 +817,7 @@  discard block
 block discarded – undo
817 817
 function md5_hmac($data, $key)
818 818
 {
819 819
 	$key = str_pad(strlen($key) <= 64 ? $key : pack('H*', md5($key)), 64, chr(0x00));
820
-	return md5(($key ^ str_repeat(chr(0x5c), 64)) . pack('H*', md5(($key ^ str_repeat(chr(0x36), 64)) . $data)));
820
+	return md5(($key ^ str_repeat(chr(0x5c), 64)).pack('H*', md5(($key ^ str_repeat(chr(0x36), 64)).$data)));
821 821
 }
822 822
 
823 823
 /**
@@ -842,9 +842,9 @@  discard block
 block discarded – undo
842 842
 	$count = 1 << $strpos;
843 843
 	$salt = substr($passwd_hash, 4, 8);
844 844
 
845
-	$hash = md5($salt . $passwd, true);
845
+	$hash = md5($salt.$passwd, true);
846 846
 	for (; $count != 0; --$count)
847
-		$hash = md5($hash . $passwd, true);
847
+		$hash = md5($hash.$passwd, true);
848 848
 
849 849
 	$output = substr($passwd_hash, 0, 12);
850 850
 	$i = 0;
Please login to merge, or discard this patch.
themes/default/Theme.php 1 patch
Spacing   +104 added lines, -104 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 		if (empty($context['no_last_modified']))
62 62
 		{
63 63
 			header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
64
-			header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
64
+			header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
65 65
 
66 66
 			if ($this->headerSent('Content-Type') === false)
67 67
 			{
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 
97 97
 		foreach (\Template_Layers::getInstance()->prepareContext() as $layer)
98 98
 		{
99
-			loadSubTemplate($layer . '_above', 'ignore');
99
+			loadSubTemplate($layer.'_above', 'ignore');
100 100
 		}
101 101
 
102 102
 		if (isset($settings['use_default_images']) && $settings['use_default_images'] == 'defaults' && isset($settings['default_template']))
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 
172 172
 		foreach (\Template_Layers::getInstance()->reverseLayers() as $layer)
173 173
 		{
174
-			loadSubTemplate($layer . '_below', 'ignore');
174
+			loadSubTemplate($layer.'_below', 'ignore');
175 175
 		}
176 176
 	}
177 177
 
@@ -193,28 +193,28 @@  discard block
 block discarded – undo
193 193
 			// Only getting the files from the CDN?
194 194
 			case 'cdn':
195 195
 				echo '
196
-	<script src="https://ajax.googleapis.com/ajax/libs/jquery/' . $jquery_version . '/jquery.min.js" id="jquery"></script>',
196
+	<script src="https://ajax.googleapis.com/ajax/libs/jquery/' . $jquery_version.'/jquery.min.js" id="jquery"></script>',
197 197
 				(!empty($modSettings['jquery_include_ui']) ? '
198
-	<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/' . $jqueryui_version . '/jquery-ui.min.js" id="jqueryui"></script>' : '');
198
+	<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/' . $jqueryui_version.'/jquery-ui.min.js" id="jqueryui"></script>' : '');
199 199
 				break;
200 200
 			// Just use the local file
201 201
 			case 'local':
202 202
 				echo '
203
-	<script src="', $settings['default_theme_url'], '/scripts/jquery-' . $jquery_version . '.min.js" id="jquery"></script>',
203
+	<script src="', $settings['default_theme_url'], '/scripts/jquery-'.$jquery_version.'.min.js" id="jquery"></script>',
204 204
 				(!empty($modSettings['jquery_include_ui']) ? '
205
-	<script src="' . $settings['default_theme_url'] . '/scripts/jquery-ui-' . $jqueryui_version . '.min.js" id="jqueryui"></script>' : '');
205
+	<script src="' . $settings['default_theme_url'].'/scripts/jquery-ui-'.$jqueryui_version.'.min.js" id="jqueryui"></script>' : '');
206 206
 				break;
207 207
 			// CDN with local fallback
208 208
 			case 'auto':
209 209
 				echo '
210
-	<script src="https://ajax.googleapis.com/ajax/libs/jquery/' . $jquery_version . '/jquery.min.js" id="jquery"></script>',
210
+	<script src="https://ajax.googleapis.com/ajax/libs/jquery/' . $jquery_version.'/jquery.min.js" id="jquery"></script>',
211 211
 				(!empty($modSettings['jquery_include_ui']) ? '
212
-	<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/' . $jqueryui_version . '/jquery-ui.min.js" id="jqueryui"></script>' : '');
212
+	<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/' . $jqueryui_version.'/jquery-ui.min.js" id="jqueryui"></script>' : '');
213 213
 				echo '
214 214
 	<script><!-- // --><![CDATA[
215
-		window.jQuery || document.write(\'<script src="', $settings['default_theme_url'], '/scripts/jquery-' . $jquery_version . '.min.js"><\/script>\');',
215
+		window.jQuery || document.write(\'<script src="', $settings['default_theme_url'], '/scripts/jquery-'.$jquery_version.'.min.js"><\/script>\');',
216 216
 				(!empty($modSettings['jquery_include_ui']) ? '
217
-		window.jQuery.ui || document.write(\'<script src="' . $settings['default_theme_url'] . '/scripts/jquery-ui-' . $jqueryui_version . '.min.js"><\/script>\')' : ''), '
217
+		window.jQuery.ui || document.write(\'<script src="' . $settings['default_theme_url'].'/scripts/jquery-ui-'.$jqueryui_version.'.min.js"><\/script>\')' : ''), '
218 218
 	// ]]></script>';
219 219
 				break;
220 220
 		}
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 		// Combine and minify javascript source files to save bandwidth and requests
236 236
 		if (!empty($modSettings['minify_css_js']))
237 237
 		{
238
-			$combiner = new \Site_Combiner(CACHEDIR, $boardurl . '/cache');
238
+			$combiner = new \Site_Combiner(CACHEDIR, $boardurl.'/cache');
239 239
 			$combine_name = $combiner->site_js_combine($this->js_files, $do_deferred);
240 240
 
241 241
 			call_integration_hook('post_javascript_combine', array(&$combine_name, $combiner));
@@ -305,10 +305,10 @@  discard block
 block discarded – undo
305 305
 		if (!empty($this->js_vars) && !$do_deferred)
306 306
 		{
307 307
 			foreach ($this->js_vars as $var => $value)
308
-				$js_vars[] = $var . ' = ' . $value;
308
+				$js_vars[] = $var.' = '.$value;
309 309
 
310 310
 			// Newlines and tabs are here to make it look nice in the page source view, stripped if minimized though
311
-			$this->js_inline['standard'][] = 'var ' . implode(",\n\t\t\t", $js_vars) . ';';
311
+			$this->js_inline['standard'][] = 'var '.implode(",\n\t\t\t", $js_vars).';';
312 312
 		}
313 313
 
314 314
 		// Inline JavaScript - Actually useful some times!
@@ -360,7 +360,7 @@  discard block
 block discarded – undo
360 360
 		{
361 361
 			if (!empty($modSettings['minify_css_js']))
362 362
 			{
363
-				$combiner = new \Site_Combiner(CACHEDIR, $boardurl . '/cache');
363
+				$combiner = new \Site_Combiner(CACHEDIR, $boardurl.'/cache');
364 364
 				$combine_name = $combiner->site_css_combine($this->css_files);
365 365
 
366 366
 				call_integration_hook('post_css_combine', array(&$combine_name, $combiner));
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
 		{
397 397
 			if (!empty($this->css_rules['all']))
398 398
 			{
399
-				$style_tag .=  '
399
+				$style_tag .= '
400 400
 	' . $this->css_rules['all'];
401 401
 			}
402 402
 			if (!empty($this->css_rules['media']))
@@ -404,8 +404,8 @@  discard block
 block discarded – undo
404 404
 				foreach ($this->css_rules['media'] as $key => $val)
405 405
 				{
406 406
 					$style_tag .= '
407
-	@media ' . $key . '{
408
-		' . $val . '
407
+	@media ' . $key.'{
408
+		' . $val.'
409 409
 	}';
410 410
 				}
411 411
 			}
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
 		if (!empty($style_tag))
415 415
 		{
416 416
 			echo '
417
-	<style>' . $style_tag . '
417
+	<style>' . $style_tag.'
418 418
 	</style>';
419 419
 		}
420 420
 	}
@@ -490,12 +490,12 @@  discard block
 block discarded – undo
490 490
 		{
491 491
 			addInlineJavascript('
492 492
 			var oEmbedtext = ({
493
-				preview_image : ' . JavaScriptEscape($txt['preview_image']) . ',
494
-				ctp_video : ' . JavaScriptEscape($txt['ctp_video']) . ',
495
-				hide_video : ' . JavaScriptEscape($txt['hide_video']) . ',
496
-				youtube : ' . JavaScriptEscape($txt['youtube']) . ',
497
-				vimeo : ' . JavaScriptEscape($txt['vimeo']) . ',
498
-				dailymotion : ' . JavaScriptEscape($txt['dailymotion']) . '
493
+				preview_image : ' . JavaScriptEscape($txt['preview_image']).',
494
+				ctp_video : ' . JavaScriptEscape($txt['ctp_video']).',
495
+				hide_video : ' . JavaScriptEscape($txt['hide_video']).',
496
+				youtube : ' . JavaScriptEscape($txt['youtube']).',
497
+				vimeo : ' . JavaScriptEscape($txt['vimeo']).',
498
+				dailymotion : ' . JavaScriptEscape($txt['dailymotion']).'
499 499
 			});', true);
500 500
 
501 501
 			loadJavascriptFile('elk_jquery_embed.js', array('defer' => true));
@@ -534,7 +534,7 @@  discard block
 block discarded – undo
534 534
 		function elkAutoTask()
535 535
 		{
536 536
 			var tempImage = new Image();
537
-			tempImage.src = elk_scripturl + "?scheduled=' . $type . ';ts=' . $ts . '";
537
+			tempImage.src = elk_scripturl + "?scheduled=' . $type.';ts='.$ts.'";
538 538
 		}
539 539
 		window.setTimeout("elkAutoTask();", 1);', true);
540 540
 		}
@@ -552,20 +552,20 @@  discard block
 block discarded – undo
552 552
 		{
553 553
 			addInlineJavascript('
554 554
 			var oRttime = ({
555
-				referenceTime : ' . forum_time() * 1000 . ',
556
-				now : ' . JavaScriptEscape($txt['rt_now']) . ',
557
-				minute : ' . JavaScriptEscape($txt['rt_minute']) . ',
558
-				minutes : ' . JavaScriptEscape($txt['rt_minutes']) . ',
559
-				hour : ' . JavaScriptEscape($txt['rt_hour']) . ',
560
-				hours : ' . JavaScriptEscape($txt['rt_hours']) . ',
561
-				day : ' . JavaScriptEscape($txt['rt_day']) . ',
562
-				days : ' . JavaScriptEscape($txt['rt_days']) . ',
563
-				week : ' . JavaScriptEscape($txt['rt_week']) . ',
564
-				weeks : ' . JavaScriptEscape($txt['rt_weeks']) . ',
565
-				month : ' . JavaScriptEscape($txt['rt_month']) . ',
566
-				months : ' . JavaScriptEscape($txt['rt_months']) . ',
567
-				year : ' . JavaScriptEscape($txt['rt_year']) . ',
568
-				years : ' . JavaScriptEscape($txt['rt_years']) . ',
555
+				referenceTime : ' . forum_time() * 1000.',
556
+				now : ' . JavaScriptEscape($txt['rt_now']).',
557
+				minute : ' . JavaScriptEscape($txt['rt_minute']).',
558
+				minutes : ' . JavaScriptEscape($txt['rt_minutes']).',
559
+				hour : ' . JavaScriptEscape($txt['rt_hour']).',
560
+				hours : ' . JavaScriptEscape($txt['rt_hours']).',
561
+				day : ' . JavaScriptEscape($txt['rt_day']).',
562
+				days : ' . JavaScriptEscape($txt['rt_days']).',
563
+				week : ' . JavaScriptEscape($txt['rt_week']).',
564
+				weeks : ' . JavaScriptEscape($txt['rt_weeks']).',
565
+				month : ' . JavaScriptEscape($txt['rt_month']).',
566
+				months : ' . JavaScriptEscape($txt['rt_months']).',
567
+				year : ' . JavaScriptEscape($txt['rt_year']).',
568
+				years : ' . JavaScriptEscape($txt['rt_years']).',
569 569
 			});
570 570
 			updateRelativeTime();', true);
571 571
 
@@ -694,8 +694,8 @@  discard block
 block discarded – undo
694 694
 			addInlineJavascript('
695 695
 			$(document).ready(function(){
696 696
 				new smc_Popup({
697
-					heading: ' . JavaScriptEscape($txt['show_personal_messages_heading']) . ',
698
-					content: ' . JavaScriptEscape(sprintf($txt['show_personal_messages'], $context['user']['unread_messages'], $scripturl . '?action=pm')) . ',
697
+					heading: ' . JavaScriptEscape($txt['show_personal_messages_heading']).',
698
+					content: ' . JavaScriptEscape(sprintf($txt['show_personal_messages'], $context['user']['unread_messages'], $scripturl.'?action=pm')).',
699 699
 					icon: elk_images_url + \'/im_sm_newmsg.png\'
700 700
 				});
701 701
 			});', true);
@@ -705,8 +705,8 @@  discard block
 block discarded – undo
705 705
 		$context['common_stats']['latest_member'] = array(
706 706
 			'id' => $modSettings['latestMember'],
707 707
 			'name' => $modSettings['latestRealName'],
708
-			'href' => $scripturl . '?action=profile;u=' . $modSettings['latestMember'],
709
-			'link' => '<a href="' . $scripturl . '?action=profile;u=' . $modSettings['latestMember'] . '">' . $modSettings['latestRealName'] . '</a>',
708
+			'href' => $scripturl.'?action=profile;u='.$modSettings['latestMember'],
709
+			'link' => '<a href="'.$scripturl.'?action=profile;u='.$modSettings['latestMember'].'">'.$modSettings['latestRealName'].'</a>',
710 710
 		);
711 711
 
712 712
 		$context['common_stats'] = array(
@@ -720,7 +720,7 @@  discard block
 block discarded – undo
720 720
 
721 721
 		if (empty($settings['theme_version']))
722 722
 		{
723
-			addJavascriptVar(array('elk_scripturl' => '\'' . $scripturl . '\''));
723
+			addJavascriptVar(array('elk_scripturl' => '\''.$scripturl.'\''));
724 724
 		}
725 725
 
726 726
 		if (!isset($context['page_title']))
@@ -729,17 +729,17 @@  discard block
 block discarded – undo
729 729
 		}
730 730
 
731 731
 		// Set some specific vars.
732
-		$context['page_title_html_safe'] = \Util::htmlspecialchars(un_htmlspecialchars($context['page_title'])) . (!empty($context['current_page']) ? ' - ' . $txt['page'] . ' ' . ($context['current_page'] + 1) : '');
732
+		$context['page_title_html_safe'] = \Util::htmlspecialchars(un_htmlspecialchars($context['page_title'])).(!empty($context['current_page']) ? ' - '.$txt['page'].' '.($context['current_page'] + 1) : '');
733 733
 
734 734
 		// Load a custom CSS file?
735
-		if (file_exists($settings['theme_dir'] . '/css/custom.css'))
735
+		if (file_exists($settings['theme_dir'].'/css/custom.css'))
736 736
 		{
737 737
 			loadCSSFile('custom.css');
738 738
 		}
739 739
 
740
-		if (!empty($context['theme_variant']) && file_exists($settings['theme_dir'] . '/css/' . $context['theme_variant'] . '/custom' . $context['theme_variant'] . '.css'))
740
+		if (!empty($context['theme_variant']) && file_exists($settings['theme_dir'].'/css/'.$context['theme_variant'].'/custom'.$context['theme_variant'].'.css'))
741 741
 		{
742
-			loadCSSFile($context['theme_variant'] . '/custom' . $context['theme_variant'] . '.css');
742
+			loadCSSFile($context['theme_variant'].'/custom'.$context['theme_variant'].'.css');
743 743
 		}
744 744
 
745 745
 		// Since it's nice to have avatars all of the same size, and in some cases the size detection may fail,
@@ -751,8 +751,8 @@  discard block
 block discarded – undo
751 751
 		{
752 752
 			theme()->addCSSRules('
753 753
 		.avatarresize {' . (!empty($modSettings['avatar_max_width']) ? '
754
-			max-width:' . $modSettings['avatar_max_width'] . 'px;' : '') . (!empty($modSettings['avatar_max_height']) ? '
755
-			max-height:' . $modSettings['avatar_max_height'] . 'px;' : '') . '
754
+			max-width:' . $modSettings['avatar_max_width'].'px;' : '').(!empty($modSettings['avatar_max_height']) ? '
755
+			max-height:' . $modSettings['avatar_max_height'].'px;' : '').'
756 756
 		}');
757 757
 		}
758 758
 
@@ -760,7 +760,7 @@  discard block
 block discarded – undo
760 760
 		if (!empty($settings['forum_width']))
761 761
 		{
762 762
 			theme()->addCSSRules('
763
-		.wrapper {width: ' . $settings['forum_width'] . ';}');
763
+		.wrapper {width: ' . $settings['forum_width'].';}');
764 764
 		}
765 765
 	}
766 766
 
@@ -797,7 +797,7 @@  discard block
 block discarded – undo
797 797
 		if ($context['allow_moderation_center'])
798 798
 		{
799 799
 			// Get the numbers for the menu ...
800
-			require_once(SUBSDIR . '/Moderation.subs.php');
800
+			require_once(SUBSDIR.'/Moderation.subs.php');
801 801
 			$menu_count = loadModeratorMenuCounts();
802 802
 		}
803 803
 
@@ -805,10 +805,10 @@  discard block
 block discarded – undo
805 805
 		$menu_count['mentions'] = $context['user']['mentions'];
806 806
 
807 807
 		// All the buttons we can possible want and then some, try pulling the final list of buttons from cache first.
808
-		if (($menu_buttons = cache_get_data('menu_buttons-' . implode('_', $user_info['groups']) . '-' . $user_info['language'], $cacheTime)) === null || time() - $cacheTime <= $modSettings['settings_updated'])
808
+		if (($menu_buttons = cache_get_data('menu_buttons-'.implode('_', $user_info['groups']).'-'.$user_info['language'], $cacheTime)) === null || time() - $cacheTime <= $modSettings['settings_updated'])
809 809
 		{
810 810
 			// Start things up: this is what we know by default
811
-			require_once(SUBSDIR . '/Menu.subs.php');
811
+			require_once(SUBSDIR.'/Menu.subs.php');
812 812
 			$buttons = array(
813 813
 				'home' => array(
814 814
 					'title' => $txt['community'],
@@ -818,37 +818,37 @@  discard block
 block discarded – undo
818 818
 					'sub_buttons' => array(
819 819
 						'help' => array(
820 820
 							'title' => $txt['help'],
821
-							'href' => $scripturl . '?action=help',
821
+							'href' => $scripturl.'?action=help',
822 822
 							'show' => true,
823 823
 						),
824 824
 						'search' => array(
825 825
 							'title' => $txt['search'],
826
-							'href' => $scripturl . '?action=search',
826
+							'href' => $scripturl.'?action=search',
827 827
 							'show' => $context['allow_search'],
828 828
 						),
829 829
 						'calendar' => array(
830 830
 							'title' => $txt['calendar'],
831
-							'href' => $scripturl . '?action=calendar',
831
+							'href' => $scripturl.'?action=calendar',
832 832
 							'show' => $context['allow_calendar'],
833 833
 						),
834 834
 						'memberlist' => array(
835 835
 							'title' => $txt['members_title'],
836
-							'href' => $scripturl . '?action=memberlist',
836
+							'href' => $scripturl.'?action=memberlist',
837 837
 							'show' => $context['allow_memberlist'],
838 838
 						),
839 839
 						'recent' => array(
840 840
 							'title' => $txt['recent_posts'],
841
-							'href' => $scripturl . '?action=recent',
841
+							'href' => $scripturl.'?action=recent',
842 842
 							'show' => true,
843 843
 						),
844 844
 						'like_stats' => array(
845 845
 							'title' => $txt['like_post_stats'],
846
-							'href' => $scripturl . '?action=likes;sa=likestats',
846
+							'href' => $scripturl.'?action=likes;sa=likestats',
847 847
 							'show' => allowedTo('like_posts_stats'),
848 848
 						),
849 849
 						'contact' => array(
850 850
 							'title' => $txt['contact'],
851
-							'href' => $scripturl . '?action=register;sa=contact',
851
+							'href' => $scripturl.'?action=register;sa=contact',
852 852
 							'show' => $user_info['is_guest'] && !empty($modSettings['enable_contactform']) && $modSettings['enable_contactform'] == 'menu',
853 853
 						),
854 854
 					),
@@ -862,68 +862,68 @@  discard block
 block discarded – undo
862 862
 				$buttons['admin'] = array(
863 863
 					'title' => $context['current_action'] !== 'moderate' ? $txt['admin'] : $txt['moderate'],
864 864
 					'counter' => 'grand_total',
865
-					'href' => $scripturl . '?action=admin',
865
+					'href' => $scripturl.'?action=admin',
866 866
 					'data-icon' => 'cog',
867 867
 					'show' => true,
868 868
 					'sub_buttons' => array(
869 869
 						'admin_center' => array(
870 870
 							'title' => $txt['admin_center'],
871
-							'href' => $scripturl . '?action=admin',
871
+							'href' => $scripturl.'?action=admin',
872 872
 							'show' => $context['allow_admin'],
873 873
 						),
874 874
 						'featuresettings' => array(
875 875
 							'title' => $txt['modSettings_title'],
876
-							'href' => $scripturl . '?action=admin;area=featuresettings',
876
+							'href' => $scripturl.'?action=admin;area=featuresettings',
877 877
 							'show' => allowedTo('admin_forum'),
878 878
 						),
879 879
 						'packages' => array(
880 880
 							'title' => $txt['package'],
881
-							'href' => $scripturl . '?action=admin;area=packages',
881
+							'href' => $scripturl.'?action=admin;area=packages',
882 882
 							'show' => allowedTo('admin_forum'),
883 883
 						),
884 884
 						'permissions' => array(
885 885
 							'title' => $txt['edit_permissions'],
886
-							'href' => $scripturl . '?action=admin;area=permissions',
886
+							'href' => $scripturl.'?action=admin;area=permissions',
887 887
 							'show' => allowedTo('manage_permissions'),
888 888
 						),
889 889
 						'errorlog' => array(
890 890
 							'title' => $txt['errlog'],
891
-							'href' => $scripturl . '?action=admin;area=logs;sa=errorlog;desc',
891
+							'href' => $scripturl.'?action=admin;area=logs;sa=errorlog;desc',
892 892
 							'show' => allowedTo('admin_forum') && !empty($modSettings['enableErrorLogging']),
893 893
 						),
894 894
 						'moderate_sub' => array(
895 895
 							'title' => $txt['moderate'],
896 896
 							'counter' => 'grand_total',
897
-							'href' => $scripturl . '?action=moderate',
897
+							'href' => $scripturl.'?action=moderate',
898 898
 							'show' => $context['allow_moderation_center'],
899 899
 							'sub_buttons' => array(
900 900
 								'reports' => array(
901 901
 									'title' => $txt['mc_reported_posts'],
902 902
 									'counter' => 'reports',
903
-									'href' => $scripturl . '?action=moderate;area=reports',
903
+									'href' => $scripturl.'?action=moderate;area=reports',
904 904
 									'show' => !empty($user_info['mod_cache']) && $user_info['mod_cache']['bq'] != '0=1',
905 905
 								),
906 906
 								'modlog' => array(
907 907
 									'title' => $txt['modlog_view'],
908
-									'href' => $scripturl . '?action=moderate;area=modlog',
908
+									'href' => $scripturl.'?action=moderate;area=modlog',
909 909
 									'show' => !empty($modSettings['modlog_enabled']) && !empty($user_info['mod_cache']) && $user_info['mod_cache']['bq'] != '0=1',
910 910
 								),
911 911
 								'attachments' => array(
912 912
 									'title' => $txt['mc_unapproved_attachments'],
913 913
 									'counter' => 'attachments',
914
-									'href' => $scripturl . '?action=moderate;area=attachmod;sa=attachments',
914
+									'href' => $scripturl.'?action=moderate;area=attachmod;sa=attachments',
915 915
 									'show' => $modSettings['postmod_active'] && !empty($user_info['mod_cache']['ap']),
916 916
 								),
917 917
 								'poststopics' => array(
918 918
 									'title' => $txt['mc_unapproved_poststopics'],
919 919
 									'counter' => 'postmod',
920
-									'href' => $scripturl . '?action=moderate;area=postmod;sa=posts',
920
+									'href' => $scripturl.'?action=moderate;area=postmod;sa=posts',
921 921
 									'show' => $modSettings['postmod_active'] && !empty($user_info['mod_cache']['ap']),
922 922
 								),
923 923
 								'postbyemail' => array(
924 924
 									'title' => $txt['mc_emailerror'],
925 925
 									'counter' => 'emailmod',
926
-									'href' => $scripturl . '?action=admin;area=maillist;sa=emaillist',
926
+									'href' => $scripturl.'?action=admin;area=maillist;sa=emaillist',
927 927
 									'show' => !empty($modSettings['maillist_enabled']) && allowedTo('approve_emails'),
928 928
 								),
929 929
 							),
@@ -936,37 +936,37 @@  discard block
 block discarded – undo
936 936
 				$buttons['admin'] = array(
937 937
 					'title' => $txt['moderate'],
938 938
 					'counter' => 'grand_total',
939
-					'href' => $scripturl . '?action=moderate',
939
+					'href' => $scripturl.'?action=moderate',
940 940
 					'data-icon' => 'cog',
941 941
 					'show' => $context['allow_moderation_center'],
942 942
 					'sub_buttons' => array(
943 943
 						'reports' => array(
944 944
 							'title' => $txt['mc_reported_posts'],
945 945
 							'counter' => 'reports',
946
-							'href' => $scripturl . '?action=moderate;area=reports',
946
+							'href' => $scripturl.'?action=moderate;area=reports',
947 947
 							'show' => !empty($user_info['mod_cache']) && $user_info['mod_cache']['bq'] != '0=1',
948 948
 						),
949 949
 						'modlog' => array(
950 950
 							'title' => $txt['modlog_view'],
951
-							'href' => $scripturl . '?action=moderate;area=modlog',
951
+							'href' => $scripturl.'?action=moderate;area=modlog',
952 952
 							'show' => !empty($modSettings['modlog_enabled']) && !empty($user_info['mod_cache']) && $user_info['mod_cache']['bq'] != '0=1',
953 953
 						),
954 954
 						'attachments' => array(
955 955
 							'title' => $txt['mc_unapproved_attachments'],
956 956
 							'counter' => 'attachments',
957
-							'href' => $scripturl . '?action=moderate;area=attachmod;sa=attachments',
957
+							'href' => $scripturl.'?action=moderate;area=attachmod;sa=attachments',
958 958
 							'show' => $modSettings['postmod_active'] && !empty($user_info['mod_cache']['ap']),
959 959
 						),
960 960
 						'poststopics' => array(
961 961
 							'title' => $txt['mc_unapproved_poststopics'],
962 962
 							'counter' => 'postmod',
963
-							'href' => $scripturl . '?action=moderate;area=postmod;sa=posts',
963
+							'href' => $scripturl.'?action=moderate;area=postmod;sa=posts',
964 964
 							'show' => $modSettings['postmod_active'] && !empty($user_info['mod_cache']['ap']),
965 965
 						),
966 966
 						'postbyemail' => array(
967 967
 							'title' => $txt['mc_emailerror'],
968 968
 							'counter' => 'emailmod',
969
-							'href' => $scripturl . '?action=admin;area=maillist;sa=emaillist',
969
+							'href' => $scripturl.'?action=admin;area=maillist;sa=emaillist',
970 970
 							'show' => !empty($modSettings['maillist_enabled']) && allowedTo('approve_emails'),
971 971
 						),
972 972
 					),
@@ -978,40 +978,40 @@  discard block
 block discarded – undo
978 978
 				theme()->addCSSRules('
979 979
 	.i-account:before {
980 980
 		content: "";
981
-		background-image: url("' . $user_info['avatar']['href'] . '");
981
+		background-image: url("' . $user_info['avatar']['href'].'");
982 982
 	}');
983 983
 			}
984 984
 
985 985
 			$buttons += array(
986 986
 				'profile' => array(
987 987
 					'title' => !empty($modSettings['displayMemberNames']) ? $user_info['name'] : $txt['account_short'],
988
-					'href' => $scripturl . '?action=profile',
988
+					'href' => $scripturl.'?action=profile',
989 989
 					'data-icon' => 'account',
990 990
 					'show' => $context['allow_edit_profile'],
991 991
 					'sub_buttons' => array(
992 992
 						'account' => array(
993 993
 							'title' => $txt['account'],
994
-							'href' => $scripturl . '?action=profile;area=account',
994
+							'href' => $scripturl.'?action=profile;area=account',
995 995
 							'show' => allowedTo(array('profile_identity_any', 'profile_identity_own', 'manage_membergroups')),
996 996
 						),
997 997
 						'drafts' => array(
998 998
 							'title' => $txt['mydrafts'],
999
-							'href' => $scripturl . '?action=profile;area=showdrafts',
999
+							'href' => $scripturl.'?action=profile;area=showdrafts',
1000 1000
 							'show' => !empty($modSettings['drafts_enabled']) && !empty($modSettings['drafts_post_enabled']) && allowedTo('post_draft'),
1001 1001
 						),
1002 1002
 						'forumprofile' => array(
1003 1003
 							'title' => $txt['forumprofile'],
1004
-							'href' => $scripturl . '?action=profile;area=forumprofile',
1004
+							'href' => $scripturl.'?action=profile;area=forumprofile',
1005 1005
 							'show' => allowedTo(array('profile_extra_any', 'profile_extra_own')),
1006 1006
 						),
1007 1007
 						'theme' => array(
1008 1008
 							'title' => $txt['theme'],
1009
-							'href' => $scripturl . '?action=profile;area=theme',
1009
+							'href' => $scripturl.'?action=profile;area=theme',
1010 1010
 							'show' => allowedTo(array('profile_extra_any', 'profile_extra_own', 'profile_extra_any')),
1011 1011
 						),
1012 1012
 						'logout' => array(
1013 1013
 							'title' => $txt['logout'],
1014
-							'href' => $scripturl . '?action=logout',
1014
+							'href' => $scripturl.'?action=logout',
1015 1015
 							'show' => !$user_info['is_guest'],
1016 1016
 						),
1017 1017
 					),
@@ -1021,18 +1021,18 @@  discard block
 block discarded – undo
1021 1021
 				'pm' => array(
1022 1022
 					'title' => $txt['pm_short'],
1023 1023
 					'counter' => 'unread_messages',
1024
-					'href' => $scripturl . '?action=pm',
1024
+					'href' => $scripturl.'?action=pm',
1025 1025
 					'data-icon' => ($context['user']['unread_messages'] ? 'envelope' : 'envelope-blank'),
1026 1026
 					'show' => $context['allow_pm'],
1027 1027
 					'sub_buttons' => array(
1028 1028
 						'pm_read' => array(
1029 1029
 							'title' => $txt['pm_menu_read'],
1030
-							'href' => $scripturl . '?action=pm',
1030
+							'href' => $scripturl.'?action=pm',
1031 1031
 							'show' => allowedTo('pm_read'),
1032 1032
 						),
1033 1033
 						'pm_send' => array(
1034 1034
 							'title' => $txt['pm_menu_send'],
1035
-							'href' => $scripturl . '?action=pm;sa=send',
1035
+							'href' => $scripturl.'?action=pm;sa=send',
1036 1036
 							'show' => allowedTo('pm_send'),
1037 1037
 						),
1038 1038
 					),
@@ -1040,7 +1040,7 @@  discard block
 block discarded – undo
1040 1040
 				'mentions' => array(
1041 1041
 					'title' => $txt['mention'],
1042 1042
 					'counter' => 'mentions',
1043
-					'href' => $scripturl . '?action=mentions',
1043
+					'href' => $scripturl.'?action=mentions',
1044 1044
 					'data-icon' => ($context['user']['mentions'] ? 'bell' : 'bell-blank'),
1045 1045
 					'show' => !$user_info['is_guest'] && !empty($modSettings['mentions_enabled']),
1046 1046
 				),
@@ -1049,7 +1049,7 @@  discard block
 block discarded – undo
1049 1049
 				// of old unread posts, and they wont be reached from this button.
1050 1050
 				'unread' => array(
1051 1051
 					'title' => $txt['view_unread_category'],
1052
-					'href' => $scripturl . '?action=unread',
1052
+					'href' => $scripturl.'?action=unread',
1053 1053
 					'data-icon' => 'comments',
1054 1054
 					'show' => !$user_info['is_guest'],
1055 1055
 				),
@@ -1058,20 +1058,20 @@  discard block
 block discarded – undo
1058 1058
 				// that the user has never posted in and doesn't care about.
1059 1059
 				'unreadreplies' => array(
1060 1060
 					'title' => $txt['view_replies_category'],
1061
-					'href' => $scripturl . '?action=unreadreplies',
1061
+					'href' => $scripturl.'?action=unreadreplies',
1062 1062
 					'data-icon' => 'comments-blank',
1063 1063
 					'show' => !$user_info['is_guest'],
1064 1064
 				),
1065 1065
 				'login' => array(
1066 1066
 					'title' => $txt['login'],
1067
-					'href' => $scripturl . '?action=login',
1067
+					'href' => $scripturl.'?action=login',
1068 1068
 					'data-icon' => 'sign-in',
1069 1069
 					'show' => $user_info['is_guest'],
1070 1070
 				),
1071 1071
 
1072 1072
 				'register' => array(
1073 1073
 					'title' => $txt['register'],
1074
-					'href' => $scripturl . '?action=register',
1074
+					'href' => $scripturl.'?action=register',
1075 1075
 					'data-icon' => 'register',
1076 1076
 					'show' => $user_info['is_guest'] && $context['can_register'],
1077 1077
 				),
@@ -1096,7 +1096,7 @@  discard block
 block discarded – undo
1096 1096
 
1097 1097
 					if (isset($button['counter']) && !empty($menu_count[$button['counter']]))
1098 1098
 					{
1099
-						$button['alttitle'] = $button['title'] . ' [' . $menu_count[$button['counter']] . ']';
1099
+						$button['alttitle'] = $button['title'].' ['.$menu_count[$button['counter']].']';
1100 1100
 						if (!empty($settings['menu_numeric_notice'][0]))
1101 1101
 						{
1102 1102
 							$button['title'] .= sprintf($settings['menu_numeric_notice'][0], $menu_count[$button['counter']]);
@@ -1115,7 +1115,7 @@  discard block
 block discarded – undo
1115 1115
 							}
1116 1116
 							elseif (isset($subbutton['counter']) && !empty($menu_count[$subbutton['counter']]))
1117 1117
 							{
1118
-								$button['sub_buttons'][$key]['alttitle'] = $subbutton['title'] . ' [' . $menu_count[$subbutton['counter']] . ']';
1118
+								$button['sub_buttons'][$key]['alttitle'] = $subbutton['title'].' ['.$menu_count[$subbutton['counter']].']';
1119 1119
 								if (!empty($settings['menu_numeric_notice'][1]))
1120 1120
 								{
1121 1121
 									$button['sub_buttons'][$key]['title'] .= sprintf($settings['menu_numeric_notice'][1], $menu_count[$subbutton['counter']]);
@@ -1133,7 +1133,7 @@  discard block
 block discarded – undo
1133 1133
 										}
1134 1134
 										elseif (isset($subbutton2['counter']) && !empty($menu_count[$subbutton2['counter']]))
1135 1135
 										{
1136
-											$button['sub_buttons'][$key]['sub_buttons'][$key2]['alttitle'] = $subbutton2['title'] . ' [' . $menu_count[$subbutton2['counter']] . ']';
1136
+											$button['sub_buttons'][$key]['sub_buttons'][$key2]['alttitle'] = $subbutton2['title'].' ['.$menu_count[$subbutton2['counter']].']';
1137 1137
 											if (!empty($settings['menu_numeric_notice'][2]))
1138 1138
 											{
1139 1139
 												$button['sub_buttons'][$key]['sub_buttons'][$key2]['title'] .= sprintf($settings['menu_numeric_notice'][2], $menu_count[$subbutton2['counter']]);
@@ -1152,13 +1152,13 @@  discard block
 block discarded – undo
1152 1152
 
1153 1153
 			if (!empty($modSettings['cache_enable']) && $modSettings['cache_enable'] >= 2)
1154 1154
 			{
1155
-				cache_put_data('menu_buttons-' . implode('_', $user_info['groups']) . '-' . $user_info['language'], $menu_buttons, $cacheTime);
1155
+				cache_put_data('menu_buttons-'.implode('_', $user_info['groups']).'-'.$user_info['language'], $menu_buttons, $cacheTime);
1156 1156
 			}
1157 1157
 		}
1158 1158
 
1159 1159
 		if (!empty($menu_buttons['profile']['sub_buttons']['logout']))
1160 1160
 		{
1161
-			$menu_buttons['profile']['sub_buttons']['logout']['href'] .= ';' . $context['session_var'] . '=' . $context['session_id'];
1161
+			$menu_buttons['profile']['sub_buttons']['logout']['href'] .= ';'.$context['session_var'].'='.$context['session_id'];
1162 1162
 		}
1163 1163
 
1164 1164
 		$context['menu_buttons'] = $menu_buttons;
@@ -1220,7 +1220,7 @@  discard block
 block discarded – undo
1220 1220
 				'elk_default_theme_url' => JavaScriptEscape($settings['default_theme_url']),
1221 1221
 				'elk_images_url' => JavaScriptEscape($settings['images_url']),
1222 1222
 				'elk_smiley_url' => JavaScriptEscape($modSettings['smileys_url']),
1223
-				'elk_scripturl' => '\'' . $scripturl . '\'',
1223
+				'elk_scripturl' => '\''.$scripturl.'\'',
1224 1224
 				'elk_iso_case_folding' => detectServer()->is('iso_case_folding') ? 'true' : 'false',
1225 1225
 				'elk_charset' => '"UTF-8"',
1226 1226
 				'elk_session_id' => JavaScriptEscape($context['session_id']),
@@ -1350,13 +1350,13 @@  discard block
 block discarded – undo
1350 1350
 		}
1351 1351
 
1352 1352
 		// Do this to keep things easier in the templates.
1353
-		$context['theme_variant'] = '_' . $context['theme_variant'];
1354
-		$context['theme_variant_url'] = $context['theme_variant'] . '/';
1353
+		$context['theme_variant'] = '_'.$context['theme_variant'];
1354
+		$context['theme_variant_url'] = $context['theme_variant'].'/';
1355 1355
 
1356 1356
 		// The most efficient way of writing multi themes is to use a master index.css plus variant.css files.
1357 1357
 		if (!empty($context['theme_variant']))
1358 1358
 		{
1359
-			loadCSSFile($context['theme_variant'] . '/index' . $context['theme_variant'] . '.css');
1359
+			loadCSSFile($context['theme_variant'].'/index'.$context['theme_variant'].'.css');
1360 1360
 		}
1361 1361
 	}
1362 1362
 }
1363 1363
\ No newline at end of file
Please login to merge, or discard this patch.