Completed
Branch release-2.1 (3c29ac)
by Mathias
08:54
created
Sources/ManageBoards.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -842,7 +842,7 @@
 block discarded – undo
842 842
 	require_once($sourcedir . '/Subs-Boards.php');
843 843
 	sortBoards($recycle_boards);
844 844
 
845
-        $recycle_boards = array('') + $recycle_boards;
845
+		$recycle_boards = array('') + $recycle_boards;
846 846
 
847 847
 	// Here and the board settings...
848 848
 	$config_vars = array(
Please login to merge, or discard this patch.
Braces   +145 added lines, -112 removed lines patch added patch discarded remove patch
@@ -13,8 +13,9 @@  discard block
 block discarded – undo
13 13
  * @version 2.1 Beta 3
14 14
  */
15 15
 
16
-if (!defined('SMF'))
16
+if (!defined('SMF')) {
17 17
 	die('No direct access...');
18
+}
18 19
 
19 20
 /**
20 21
  * The main dispatcher; doesn't do anything, just delegates.
@@ -92,18 +93,19 @@  discard block
 block discarded – undo
92 93
 		checkSession('get');
93 94
 		validateToken('admin-bm-' . (int) $_REQUEST['src_board'], 'request');
94 95
 
95
-		if ($_REQUEST['move_to'] === 'top')
96
-			$boardOptions = array(
96
+		if ($_REQUEST['move_to'] === 'top') {
97
+					$boardOptions = array(
97 98
 				'move_to' => $_REQUEST['move_to'],
98 99
 				'target_category' => (int) $_REQUEST['target_cat'],
99 100
 				'move_first_child' => true,
100 101
 			);
101
-		else
102
-			$boardOptions = array(
102
+		} else {
103
+					$boardOptions = array(
103 104
 				'move_to' => $_REQUEST['move_to'],
104 105
 				'target_board' => (int) $_REQUEST['target_board'],
105 106
 				'move_first_child' => true,
106 107
 			);
108
+		}
107 109
 		modifyBoard((int) $_REQUEST['src_board'], $boardOptions);
108 110
 	}
109 111
 
@@ -148,15 +150,16 @@  discard block
 block discarded – undo
148 150
 			$security = $context['session_var'] . '=' . $context['session_id'] . ';' . $context['admin-bm-' . $context['move_board'] . '_token_var'] . '=' . $context['admin-bm-' . $context['move_board'] . '_token'];
149 151
 			foreach ($boardList[$catid] as $boardid)
150 152
 			{
151
-				if (!isset($context['categories'][$catid]['move_link']))
152
-					$context['categories'][$catid]['move_link'] = array(
153
+				if (!isset($context['categories'][$catid]['move_link'])) {
154
+									$context['categories'][$catid]['move_link'] = array(
153 155
 						'child_level' => 0,
154 156
 						'label' => $txt['mboards_order_before'] . ' \'' . $smcFunc['htmlspecialchars']($boards[$boardid]['name']) . '\'',
155 157
 						'href' => $scripturl . '?action=admin;area=manageboards;sa=move;src_board=' . $context['move_board'] . ';target_board=' . $boardid . ';move_to=before;' . $security,
156 158
 					);
159
+				}
157 160
 
158
-				if (!$context['categories'][$catid]['boards'][$boardid]['move'])
159
-				$context['categories'][$catid]['boards'][$boardid]['move_links'] = array(
161
+				if (!$context['categories'][$catid]['boards'][$boardid]['move']) {
162
+								$context['categories'][$catid]['boards'][$boardid]['move_links'] = array(
160 163
 					array(
161 164
 						'child_level' => $boards[$boardid]['level'],
162 165
 						'label' => $txt['mboards_order_after'] . '\'' . $smcFunc['htmlspecialchars']($boards[$boardid]['name']) . '\'',
@@ -170,34 +173,39 @@  discard block
 block discarded – undo
170 173
 						'class' => 'here',
171 174
 					),
172 175
 				);
176
+				}
173 177
 
174 178
 				$difference = $boards[$boardid]['level'] - $prev_child_level;
175
-				if ($difference == 1)
176
-					array_push($stack, !empty($context['categories'][$catid]['boards'][$prev_board]['move_links']) ? array_shift($context['categories'][$catid]['boards'][$prev_board]['move_links']) : null);
177
-				elseif ($difference < 0)
179
+				if ($difference == 1) {
180
+									array_push($stack, !empty($context['categories'][$catid]['boards'][$prev_board]['move_links']) ? array_shift($context['categories'][$catid]['boards'][$prev_board]['move_links']) : null);
181
+				} elseif ($difference < 0)
178 182
 				{
179
-					if (empty($context['categories'][$catid]['boards'][$prev_board]['move_links']))
180
-						$context['categories'][$catid]['boards'][$prev_board]['move_links'] = array();
181
-					for ($i = 0; $i < -$difference; $i++)
182
-						if (($temp = array_pop($stack)) != null)
183
+					if (empty($context['categories'][$catid]['boards'][$prev_board]['move_links'])) {
184
+											$context['categories'][$catid]['boards'][$prev_board]['move_links'] = array();
185
+					}
186
+					for ($i = 0; $i < -$difference; $i++) {
187
+											if (($temp = array_pop($stack)) != null)
183 188
 							array_unshift($context['categories'][$catid]['boards'][$prev_board]['move_links'], $temp);
189
+					}
184 190
 				}
185 191
 
186 192
 				$prev_board = $boardid;
187 193
 				$prev_child_level = $boards[$boardid]['level'];
188 194
 
189 195
 			}
190
-			if (!empty($stack) && !empty($context['categories'][$catid]['boards'][$prev_board]['move_links']))
191
-				$context['categories'][$catid]['boards'][$prev_board]['move_links'] = array_merge($stack, $context['categories'][$catid]['boards'][$prev_board]['move_links']);
192
-			elseif (!empty($stack))
193
-				$context['categories'][$catid]['boards'][$prev_board]['move_links'] = $stack;
196
+			if (!empty($stack) && !empty($context['categories'][$catid]['boards'][$prev_board]['move_links'])) {
197
+							$context['categories'][$catid]['boards'][$prev_board]['move_links'] = array_merge($stack, $context['categories'][$catid]['boards'][$prev_board]['move_links']);
198
+			} elseif (!empty($stack)) {
199
+							$context['categories'][$catid]['boards'][$prev_board]['move_links'] = $stack;
200
+			}
194 201
 
195
-			if (empty($boardList[$catid]))
196
-				$context['categories'][$catid]['move_link'] = array(
202
+			if (empty($boardList[$catid])) {
203
+							$context['categories'][$catid]['move_link'] = array(
197 204
 					'child_level' => 0,
198 205
 					'label' => $txt['mboards_order_before'] . ' \'' . $smcFunc['htmlspecialchars']($tree['node']['name']) . '\'',
199 206
 					'href' => $scripturl . '?action=admin;area=manageboards;sa=move;src_board=' . $context['move_board'] . ';target_cat=' . $catid . ';move_to=top;' . $security,
200 207
 				);
208
+			}
201 209
 		}
202 210
 	}
203 211
 
@@ -253,9 +261,9 @@  discard block
 block discarded – undo
253 261
 		);
254 262
 	}
255 263
 	// Category doesn't exist, man... sorry.
256
-	elseif (!isset($cat_tree[$_REQUEST['cat']]))
257
-		redirectexit('action=admin;area=manageboards');
258
-	else
264
+	elseif (!isset($cat_tree[$_REQUEST['cat']])) {
265
+			redirectexit('action=admin;area=manageboards');
266
+	} else
259 267
 	{
260 268
 		$context['category'] = array(
261 269
 			'id' => $_REQUEST['cat'],
@@ -267,30 +275,31 @@  discard block
 block discarded – undo
267 275
 			'is_empty' => empty($cat_tree[$_REQUEST['cat']]['children'])
268 276
 		);
269 277
 
270
-		foreach ($boardList[$_REQUEST['cat']] as $child_board)
271
-			$context['category']['children'][] = str_repeat('-', $boards[$child_board]['level']) . ' ' . $boards[$child_board]['name'];
278
+		foreach ($boardList[$_REQUEST['cat']] as $child_board) {
279
+					$context['category']['children'][] = str_repeat('-', $boards[$child_board]['level']) . ' ' . $boards[$child_board]['name'];
280
+		}
272 281
 	}
273 282
 
274 283
 	$prevCat = 0;
275 284
 	foreach ($cat_tree as $catid => $tree)
276 285
 	{
277
-		if ($catid == $_REQUEST['cat'] && $prevCat > 0)
278
-			$context['category_order'][$prevCat]['selected'] = true;
279
-		elseif ($catid != $_REQUEST['cat'])
280
-			$context['category_order'][$catid] = array(
286
+		if ($catid == $_REQUEST['cat'] && $prevCat > 0) {
287
+					$context['category_order'][$prevCat]['selected'] = true;
288
+		} elseif ($catid != $_REQUEST['cat']) {
289
+					$context['category_order'][$catid] = array(
281 290
 				'id' => $catid,
282 291
 				'name' => $txt['mboards_order_after'] . $tree['node']['name'],
283 292
 				'selected' => false,
284 293
 				'true_name' => $tree['node']['name']
285 294
 			);
295
+		}
286 296
 		$prevCat = $catid;
287 297
 	}
288 298
 	if (!isset($_REQUEST['delete']))
289 299
 	{
290 300
 		$context['sub_template'] = 'modify_category';
291 301
 		$context['page_title'] = $_REQUEST['sa'] == 'newcat' ? $txt['mboards_new_cat_name'] : $txt['catEdit'];
292
-	}
293
-	else
302
+	} else
294 303
 	{
295 304
 		$context['sub_template'] = 'confirm_category_delete';
296 305
 		$context['page_title'] = $txt['mboards_delete_cat'];
@@ -327,8 +336,9 @@  discard block
 block discarded – undo
327 336
 	{
328 337
 		$catOptions = array();
329 338
 
330
-		if (isset($_POST['cat_order']))
331
-			$catOptions['move_after'] = (int) $_POST['cat_order'];
339
+		if (isset($_POST['cat_order'])) {
340
+					$catOptions['move_after'] = (int) $_POST['cat_order'];
341
+		}
332 342
 
333 343
 		// Change "This & That" to "This &amp; That" but don't change "&cent" to "&amp;cent;"...
334 344
 		$catOptions['cat_name'] = parse_bbc($smcFunc['htmlspecialchars']($_POST['cat_name']), false, '', $context['description_allowed_tags']);
@@ -336,10 +346,11 @@  discard block
 block discarded – undo
336 346
 
337 347
 		$catOptions['is_collapsible'] = isset($_POST['collapse']);
338 348
 
339
-		if (isset($_POST['add']))
340
-			createCategory($catOptions);
341
-		else
342
-			modifyCategory($_POST['cat'], $catOptions);
349
+		if (isset($_POST['add'])) {
350
+					createCategory($catOptions);
351
+		} else {
352
+					modifyCategory($_POST['cat'], $catOptions);
353
+		}
343 354
 	}
344 355
 	// If they want to delete - first give them confirmation.
345 356
 	elseif (isset($_POST['delete']) && !isset($_POST['confirmation']) && !isset($_POST['empty']))
@@ -353,13 +364,14 @@  discard block
 block discarded – undo
353 364
 		// First off - check if we are moving all the current boards first - before we start deleting!
354 365
 		if (isset($_POST['delete_action']) && $_POST['delete_action'] == 1)
355 366
 		{
356
-			if (empty($_POST['cat_to']))
357
-				fatal_lang_error('mboards_delete_error');
367
+			if (empty($_POST['cat_to'])) {
368
+							fatal_lang_error('mboards_delete_error');
369
+			}
358 370
 
359 371
 			deleteCategories(array($_POST['cat']), (int) $_POST['cat_to']);
372
+		} else {
373
+					deleteCategories(array($_POST['cat']));
360 374
 		}
361
-		else
362
-			deleteCategories(array($_POST['cat']));
363 375
 	}
364 376
 
365 377
 	redirectexit('action=admin;area=manageboards');
@@ -404,8 +416,9 @@  discard block
 block discarded – undo
404 416
 	if ($_REQUEST['sa'] == 'newboard')
405 417
 	{
406 418
 		// Category doesn't exist, man... sorry.
407
-		if (empty($_REQUEST['cat']))
408
-			redirectexit('action=admin;area=manageboards');
419
+		if (empty($_REQUEST['cat'])) {
420
+					redirectexit('action=admin;area=manageboards');
421
+		}
409 422
 
410 423
 		// Some things that need to be setup for a new board.
411 424
 		$curBoard = array(
@@ -429,8 +442,7 @@  discard block
 block discarded – undo
429 442
 			'category' => (int) $_REQUEST['cat'],
430 443
 			'no_children' => true,
431 444
 		);
432
-	}
433
-	else
445
+	} else
434 446
 	{
435 447
 		// Just some easy shortcuts.
436 448
 		$curBoard = &$boards[$_REQUEST['boardid']];
@@ -478,8 +490,9 @@  discard block
 block discarded – undo
478 490
 	);
479 491
 	while ($row = $smcFunc['db_fetch_assoc']($request))
480 492
 	{
481
-		if ($_REQUEST['sa'] == 'newboard' && $row['min_posts'] == -1)
482
-			$curBoard['member_groups'][] = $row['id_group'];
493
+		if ($_REQUEST['sa'] == 'newboard' && $row['min_posts'] == -1) {
494
+					$curBoard['member_groups'][] = $row['id_group'];
495
+		}
483 496
 
484 497
 		$context['groups'][(int) $row['id_group']] = array(
485 498
 			'id' => $row['id_group'],
@@ -492,8 +505,9 @@  discard block
 block discarded – undo
492 505
 	$smcFunc['db_free_result']($request);
493 506
 
494 507
 	// Category doesn't exist, man... sorry.
495
-	if (!isset($boardList[$curBoard['category']]))
496
-		redirectexit('action=admin;area=manageboards');
508
+	if (!isset($boardList[$curBoard['category']])) {
509
+			redirectexit('action=admin;area=manageboards');
510
+	}
497 511
 
498 512
 	foreach ($boardList[$curBoard['category']] as $boardid)
499 513
 	{
@@ -507,8 +521,7 @@  discard block
 block discarded – undo
507 521
 				'is_child' => false,
508 522
 				'selected' => true
509 523
 			);
510
-		}
511
-		else
524
+		} else
512 525
 		{
513 526
 			$context['board_order'][] = array(
514 527
 				'id' => $boardid,
@@ -525,19 +538,21 @@  discard block
 block discarded – undo
525 538
 		$context['can_move_children'] = false;
526 539
 		$context['children'] = $boards[$_REQUEST['boardid']]['tree']['children'];
527 540
 
528
-		foreach ($context['board_order'] as $lBoard)
529
-			if ($lBoard['is_child'] == false && $lBoard['selected'] == false)
541
+		foreach ($context['board_order'] as $lBoard) {
542
+					if ($lBoard['is_child'] == false && $lBoard['selected'] == false)
530 543
 				$context['can_move_children'] = true;
544
+		}
531 545
 	}
532 546
 
533 547
 	// Get other available categories.
534 548
 	$context['categories'] = array();
535
-	foreach ($cat_tree as $catID => $tree)
536
-		$context['categories'][] = array(
549
+	foreach ($cat_tree as $catID => $tree) {
550
+			$context['categories'][] = array(
537 551
 			'id' => $catID == $curBoard['category'] ? 0 : $catID,
538 552
 			'name' => $tree['node']['name'],
539 553
 			'selected' => $catID == $curBoard['category']
540 554
 		);
555
+	}
541 556
 
542 557
 	$request = $smcFunc['db_query']('', '
543 558
 		SELECT mem.id_member, mem.real_name
@@ -549,14 +564,16 @@  discard block
 block discarded – undo
549 564
 		)
550 565
 	);
551 566
 	$context['board']['moderators'] = array();
552
-	while ($row = $smcFunc['db_fetch_assoc']($request))
553
-		$context['board']['moderators'][$row['id_member']] = $row['real_name'];
567
+	while ($row = $smcFunc['db_fetch_assoc']($request)) {
568
+			$context['board']['moderators'][$row['id_member']] = $row['real_name'];
569
+	}
554 570
 	$smcFunc['db_free_result']($request);
555 571
 
556 572
 	$context['board']['moderator_list'] = empty($context['board']['moderators']) ? '' : '&quot;' . implode('&quot;, &quot;', $context['board']['moderators']) . '&quot;';
557 573
 
558
-	if (!empty($context['board']['moderators']))
559
-		list ($context['board']['last_moderator_id']) = array_slice(array_keys($context['board']['moderators']), -1);
574
+	if (!empty($context['board']['moderators'])) {
575
+			list ($context['board']['last_moderator_id']) = array_slice(array_keys($context['board']['moderators']), -1);
576
+	}
560 577
 
561 578
 	// Get all the groups assigned as moderators
562 579
 	$request = $smcFunc['db_query']('', '
@@ -568,14 +585,16 @@  discard block
 block discarded – undo
568 585
 		)
569 586
 	);
570 587
 	$context['board']['moderator_groups'] = array();
571
-	while ($row = $smcFunc['db_fetch_assoc']($request))
572
-		$context['board']['moderator_groups'][$row['id_group']] = $context['groups'][$row['id_group']]['name'];
588
+	while ($row = $smcFunc['db_fetch_assoc']($request)) {
589
+			$context['board']['moderator_groups'][$row['id_group']] = $context['groups'][$row['id_group']]['name'];
590
+	}
573 591
 	$smcFunc['db_free_result']($request);
574 592
 
575 593
 	$context['board']['moderator_groups_list'] = empty($context['board']['moderator_groups']) ? '' : '&quot;' . implode('&quot;, &qout;', $context['board']['moderator_groups']) . '&quot;';
576 594
 
577
-	if (!empty($context['board']['moderator_groups']))
578
-		list ($context['board']['last_moderator_group_id']) = array_slice(array_keys($context['board']['moderator_groups']), -1);
595
+	if (!empty($context['board']['moderator_groups'])) {
596
+			list ($context['board']['last_moderator_group_id']) = array_slice(array_keys($context['board']['moderator_groups']), -1);
597
+	}
579 598
 
580 599
 	// Get all the themes...
581 600
 	$request = $smcFunc['db_query']('', '
@@ -587,8 +606,9 @@  discard block
 block discarded – undo
587 606
 		)
588 607
 	);
589 608
 	$context['themes'] = array();
590
-	while ($row = $smcFunc['db_fetch_assoc']($request))
591
-		$context['themes'][] = $row;
609
+	while ($row = $smcFunc['db_fetch_assoc']($request)) {
610
+			$context['themes'][] = $row;
611
+	}
592 612
 	$smcFunc['db_free_result']($request);
593 613
 
594 614
 	if (!isset($_REQUEST['delete']))
@@ -596,8 +616,7 @@  discard block
 block discarded – undo
596 616
 		$context['sub_template'] = 'modify_board';
597 617
 		$context['page_title'] = $txt['boardsEdit'];
598 618
 		loadJavaScriptFile('suggest.js', array('defer' => false), 'smf_suggest');
599
-	}
600
-	else
619
+	} else
601 620
 	{
602 621
 		$context['sub_template'] = 'confirm_board_delete';
603 622
 		$context['page_title'] = $txt['mboards_delete_board'];
@@ -641,8 +660,9 @@  discard block
 block discarded – undo
641 660
 		// Change the boardorder of this board?
642 661
 		elseif (!empty($_POST['placement']) && !empty($_POST['board_order']))
643 662
 		{
644
-			if (!in_array($_POST['placement'], array('before', 'after', 'child')))
645
-				fatal_lang_error('mangled_post', false);
663
+			if (!in_array($_POST['placement'], array('before', 'after', 'child'))) {
664
+							fatal_lang_error('mangled_post', false);
665
+			}
646 666
 
647 667
 			$boardOptions['move_to'] = $_POST['placement'];
648 668
 			$boardOptions['target_board'] = (int) $_POST['board_order'];
@@ -655,13 +675,14 @@  discard block
 block discarded – undo
655 675
 		$boardOptions['access_groups'] = array();
656 676
 		$boardOptions['deny_groups'] = array();
657 677
 
658
-		if (!empty($_POST['groups']))
659
-			foreach ($_POST['groups'] as $group => $action)
678
+		if (!empty($_POST['groups'])) {
679
+					foreach ($_POST['groups'] as $group => $action)
660 680
 			{
661 681
 				if ($action == 'allow')
662 682
 					$boardOptions['access_groups'][] = (int) $group;
663
-				elseif ($action == 'deny')
664
-					$boardOptions['deny_groups'][] = (int) $group;
683
+		} elseif ($action == 'deny') {
684
+									$boardOptions['deny_groups'][] = (int) $group;
685
+				}
665 686
 			}
666 687
 
667 688
 		// People with manage-boards are special.
@@ -673,8 +694,9 @@  discard block
 block discarded – undo
673 694
 		// Secondly, make sure those with super cow powers (like apt-get, or in this case manage boards) are upgraded.
674 695
 		$boardOptions['access_groups'] = array_unique(array_merge($boardOptions['access_groups'], $board_managers));
675 696
 
676
-		if (strlen(implode(',', $boardOptions['access_groups'])) > 255 || strlen(implode(',', $boardOptions['deny_groups'])) > 255)
677
-			fatal_lang_error('too_many_groups', false);
697
+		if (strlen(implode(',', $boardOptions['access_groups'])) > 255 || strlen(implode(',', $boardOptions['deny_groups'])) > 255) {
698
+					fatal_lang_error('too_many_groups', false);
699
+		}
678 700
 
679 701
 		// Do not allow HTML tags. Parse the string.
680 702
 		$boardOptions['board_name'] = parse_bbc($smcFunc['htmlspecialchars']($_POST['board_name']), false, '', $context['description_allowed_tags']);
@@ -685,8 +707,9 @@  discard block
 block discarded – undo
685 707
 		if (isset($_POST['moderator_list']) && is_array($_POST['moderator_list']))
686 708
 		{
687 709
 			$moderators = array();
688
-			foreach ($_POST['moderator_list'] as $moderator)
689
-				$moderators[(int) $moderator] = (int) $moderator;
710
+			foreach ($_POST['moderator_list'] as $moderator) {
711
+							$moderators[(int) $moderator] = (int) $moderator;
712
+			}
690 713
 			$boardOptions['moderators'] = $moderators;
691 714
 		}
692 715
 
@@ -695,8 +718,9 @@  discard block
 block discarded – undo
695 718
 		if (isset($_POST['moderator_group_list']) && is_array($_POST['moderator_group_list']))
696 719
 		{
697 720
 			$moderator_groups = array();
698
-			foreach ($_POST['moderator_group_list'] as $moderator_group)
699
-				$moderator_groups[(int) $moderator_group] = (int) $moderator_group;
721
+			foreach ($_POST['moderator_group_list'] as $moderator_group) {
722
+							$moderator_groups[(int) $moderator_group] = (int) $moderator_group;
723
+			}
700 724
 			$boardOptions['moderator_groups'] = $moderator_groups;
701 725
 		}
702 726
 
@@ -722,56 +746,62 @@  discard block
 block discarded – undo
722 746
 			$smcFunc['db_free_result']($request);
723 747
 
724 748
 			// If we're turning redirection on check the board doesn't have posts in it - if it does don't make it a redirection board.
725
-			if ($boardOptions['redirect'] && empty($oldRedirect) && $numPosts)
726
-				unset($boardOptions['redirect']);
749
+			if ($boardOptions['redirect'] && empty($oldRedirect) && $numPosts) {
750
+							unset($boardOptions['redirect']);
751
+			}
727 752
 			// Reset the redirection count when switching on/off.
728
-			elseif (empty($boardOptions['redirect']) != empty($oldRedirect))
729
-				$boardOptions['num_posts'] = 0;
753
+			elseif (empty($boardOptions['redirect']) != empty($oldRedirect)) {
754
+							$boardOptions['num_posts'] = 0;
755
+			}
730 756
 			// Resetting the count?
731
-			elseif ($boardOptions['redirect'] && !empty($_POST['reset_redirect']))
732
-				$boardOptions['num_posts'] = 0;
757
+			elseif ($boardOptions['redirect'] && !empty($_POST['reset_redirect'])) {
758
+							$boardOptions['num_posts'] = 0;
759
+			}
733 760
 		}
734 761
 
735 762
 		// Create a new board...
736 763
 		if (isset($_POST['add']))
737 764
 		{
738 765
 			// New boards by default go to the bottom of the category.
739
-			if (empty($_POST['new_cat']))
740
-				$boardOptions['target_category'] = (int) $_POST['cur_cat'];
741
-			if (!isset($boardOptions['move_to']))
742
-				$boardOptions['move_to'] = 'bottom';
766
+			if (empty($_POST['new_cat'])) {
767
+							$boardOptions['target_category'] = (int) $_POST['cur_cat'];
768
+			}
769
+			if (!isset($boardOptions['move_to'])) {
770
+							$boardOptions['move_to'] = 'bottom';
771
+			}
743 772
 
744 773
 			createBoard($boardOptions);
745 774
 		}
746 775
 
747 776
 		// ...or update an existing board.
748
-		else
749
-			modifyBoard($_POST['boardid'], $boardOptions);
750
-	}
751
-	elseif (isset($_POST['delete']) && !isset($_POST['confirmation']) && !isset($_POST['no_children']))
777
+		else {
778
+					modifyBoard($_POST['boardid'], $boardOptions);
779
+		}
780
+	} elseif (isset($_POST['delete']) && !isset($_POST['confirmation']) && !isset($_POST['no_children']))
752 781
 	{
753 782
 		EditBoard();
754 783
 		return;
755
-	}
756
-	elseif (isset($_POST['delete']))
784
+	} elseif (isset($_POST['delete']))
757 785
 	{
758 786
 		// First off - check if we are moving all the current child boards first - before we start deleting!
759 787
 		if (isset($_POST['delete_action']) && $_POST['delete_action'] == 1)
760 788
 		{
761
-			if (empty($_POST['board_to']))
762
-				fatal_lang_error('mboards_delete_board_error');
789
+			if (empty($_POST['board_to'])) {
790
+							fatal_lang_error('mboards_delete_board_error');
791
+			}
763 792
 
764 793
 			deleteBoards(array($_POST['boardid']), (int) $_POST['board_to']);
794
+		} else {
795
+					deleteBoards(array($_POST['boardid']), 0);
765 796
 		}
766
-		else
767
-			deleteBoards(array($_POST['boardid']), 0);
768 797
 	}
769 798
 
770
-	if (isset($_REQUEST['rid']) && $_REQUEST['rid'] == 'permissions')
771
-		redirectexit('action=admin;area=permissions;sa=board;' . $context['session_var'] . '=' . $context['session_id']);
772
-	else
773
-		redirectexit('action=admin;area=manageboards');
774
-}
799
+	if (isset($_REQUEST['rid']) && $_REQUEST['rid'] == 'permissions') {
800
+			redirectexit('action=admin;area=permissions;sa=board;' . $context['session_var'] . '=' . $context['session_id']);
801
+	} else {
802
+			redirectexit('action=admin;area=manageboards');
803
+	}
804
+	}
775 805
 
776 806
 /**
777 807
  * Used to retrieve data for modifying a board category
@@ -808,8 +838,9 @@  discard block
 block discarded – undo
808 838
 	$smcFunc['db_free_result']($request);
809 839
 
810 840
 	// This would probably never happen, but just to be sure.
811
-	if ($cat .= $allowed_sa[1])
812
-		die(str_replace(',', ' to', $cat));
841
+	if ($cat .= $allowed_sa[1]) {
842
+			die(str_replace(',', ' to', $cat));
843
+	}
813 844
 
814 845
 	redirectexit();
815 846
 }
@@ -835,8 +866,9 @@  discard block
 block discarded – undo
835 866
 			'empty_string' => '',
836 867
 		)
837 868
 	);
838
-	while ($row = $smcFunc['db_fetch_assoc']($request))
839
-		$recycle_boards[$row['id_board']] = $row['cat_name'] . ' - ' . $row['board_name'];
869
+	while ($row = $smcFunc['db_fetch_assoc']($request)) {
870
+			$recycle_boards[$row['id_board']] = $row['cat_name'] . ' - ' . $row['board_name'];
871
+	}
840 872
 	$smcFunc['db_free_result']($request);
841 873
 
842 874
 	require_once($sourcedir . '/Subs-Boards.php');
@@ -860,8 +892,9 @@  discard block
 block discarded – undo
860 892
 
861 893
 	call_integration_hook('integrate_modify_board_settings', array(&$config_vars));
862 894
 
863
-	if ($return_config)
864
-		return $config_vars;
895
+	if ($return_config) {
896
+			return $config_vars;
897
+	}
865 898
 
866 899
 	// Needed for the settings template.
867 900
 	require_once($sourcedir . '/ManageServer.php');
Please login to merge, or discard this patch.
Sources/Packages.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -531,14 +531,14 @@  discard block
 block discarded – undo
531 531
 
532 532
 			$thisAction = array(
533 533
 				'type' => $action['reverse'] ? $txt['execute_hook_remove'] : $txt['execute_hook_add'],
534
-				'action' => sprintf($txt['execute_hook_action'. ($action['reverse'] ? '_inverse' : '')],  $smcFunc['htmlspecialchars']($action['hook'])),
534
+				'action' => sprintf($txt['execute_hook_action' . ($action['reverse'] ? '_inverse' : '')], $smcFunc['htmlspecialchars']($action['hook'])),
535 535
 			);
536 536
 		}
537 537
 		elseif ($action['type'] == 'credits')
538 538
 		{
539 539
 			$thisAction = array(
540 540
 				'type' => $txt['execute_credits_add'],
541
-				'action' => sprintf($txt['execute_credits_action'],  $smcFunc['htmlspecialchars']($action['title'])),
541
+				'action' => sprintf($txt['execute_credits_action'], $smcFunc['htmlspecialchars']($action['title'])),
542 542
 			);
543 543
 		}
544 544
 		elseif ($action['type'] == 'requires')
@@ -654,7 +654,7 @@  discard block
 block discarded – undo
654 654
 			if ($context['uninstalling'])
655 655
 				$file = in_array($action['type'], array('remove-dir', 'remove-file')) ? $action['filename'] : $packagesdir . '/temp/' . $context['base_path'] . $action['filename'];
656 656
 			else
657
-				$file =  $packagesdir . '/temp/' . $context['base_path'] . $action['filename'];
657
+				$file = $packagesdir . '/temp/' . $context['base_path'] . $action['filename'];
658 658
 		}
659 659
 
660 660
 		// Don't fail if a file/directory we're trying to create doesn't exist...
@@ -758,7 +758,7 @@  discard block
 block discarded – undo
758 758
 		$context['ftp_needed'] = !empty($ftp_status['files']['notwritable']) && !empty($context['package_ftp']);
759 759
 	}
760 760
 
761
-	$context['post_url'] = $scripturl .'?action=admin;area=packages;sa=' . ($context['uninstalling'] ? 'uninstall' : 'install') . ($context['ftp_needed'] ? '' : '2') . ';package=' . $context['filename'] . ';pid=' . $context['install_id'];
761
+	$context['post_url'] = $scripturl . '?action=admin;area=packages;sa=' . ($context['uninstalling'] ? 'uninstall' : 'install') . ($context['ftp_needed'] ? '' : '2') . ';package=' . $context['filename'] . ';pid=' . $context['install_id'];
762 762
 	checkSubmitOnce('register');
763 763
 }
764 764
 
@@ -1180,7 +1180,7 @@  discard block
 block discarded – undo
1180 1180
 				'{db_prefix}log_packages',
1181 1181
 				array(
1182 1182
 					'filename' => 'string', 'name' => 'string', 'package_id' => 'string', 'version' => 'string',
1183
-					'id_member_installed' => 'int', 'member_installed' => 'string','time_installed' => 'int',
1183
+					'id_member_installed' => 'int', 'member_installed' => 'string', 'time_installed' => 'int',
1184 1184
 					'install_state' => 'int', 'failed_steps' => 'string', 'themes_installed' => 'string',
1185 1185
 					'member_removed' => 'int', 'db_changes' => 'string', 'credits' => 'string',
1186 1186
 				),
@@ -1383,7 +1383,7 @@  discard block
 block discarded – undo
1383 1383
 						'style' => 'width: 40px;',
1384 1384
 					),
1385 1385
 					'data' => array(
1386
-						'function' => function ($package_md5) use ($type, &$context)
1386
+						'function' => function($package_md5) use ($type, &$context)
1387 1387
 						{
1388 1388
 							if (isset($context['available_' . $type . ''][$package_md5]))
1389 1389
 								return $context['available_' . $type . ''][$package_md5]['sort_id'];
@@ -1400,7 +1400,7 @@  discard block
 block discarded – undo
1400 1400
 						'style' => 'width: 25%;',
1401 1401
 					),
1402 1402
 					'data' => array(
1403
-						'function' => function ($package_md5) use ($type, &$context)
1403
+						'function' => function($package_md5) use ($type, &$context)
1404 1404
 						{
1405 1405
 							if (isset($context['available_' . $type . ''][$package_md5]))
1406 1406
 								return $context['available_' . $type . ''][$package_md5]['name'];
@@ -1416,7 +1416,7 @@  discard block
 block discarded – undo
1416 1416
 						'value' => $txt['mod_version'],
1417 1417
 					),
1418 1418
 					'data' => array(
1419
-						'function' => function ($package_md5) use ($type, &$context)
1419
+						'function' => function($package_md5) use ($type, &$context)
1420 1420
 						{
1421 1421
 							if (isset($context['available_' . $type . ''][$package_md5]))
1422 1422
 								return $context['available_' . $type . ''][$package_md5]['version'];
@@ -1432,7 +1432,7 @@  discard block
 block discarded – undo
1432 1432
 						'value' => $txt['mod_installed_time'],
1433 1433
 					),
1434 1434
 					'data' => array(
1435
-						'function' => function ($package_md5) use ($type, $txt, &$context)
1435
+						'function' => function($package_md5) use ($type, $txt, &$context)
1436 1436
 						{
1437 1437
 							if (isset($context['available_' . $type . ''][$package_md5]))
1438 1438
 								return !empty($context['available_' . $type . ''][$package_md5]['time_installed']) ? timeformat($context['available_' . $type . ''][$package_md5]['time_installed']) : $txt['not_applicable'];
@@ -1449,7 +1449,7 @@  discard block
 block discarded – undo
1449 1449
 						'value' => '',
1450 1450
 					),
1451 1451
 					'data' => array(
1452
-						'function' => function ($package_md5) use ($type, &$context, $scripturl, $txt)
1452
+						'function' => function($package_md5) use ($type, &$context, $scripturl, $txt)
1453 1453
 						{
1454 1454
 							if (!isset($context['available_' . $type . ''][$package_md5]))
1455 1455
 								return '';
@@ -1734,7 +1734,7 @@  discard block
 block discarded – undo
1734 1734
 				{
1735 1735
 					$sort_id['modification']++;
1736 1736
 					$sort_id['mod']++;
1737
-					$packages['modification'][strtolower($packageInfo[$sort]) .  '_' . $sort_id['mod']] = md5($package);
1737
+					$packages['modification'][strtolower($packageInfo[$sort]) . '_' . $sort_id['mod']] = md5($package);
1738 1738
 					$context['available_modification'][md5($package)] = $packageInfo;
1739 1739
 				}
1740 1740
 				// Avatar package.
Please login to merge, or discard this patch.
Braces   +599 added lines, -484 removed lines patch added patch discarded remove patch
@@ -13,8 +13,9 @@  discard block
 block discarded – undo
13 13
  * @version 2.1 Beta 3
14 14
  */
15 15
 
16
-if (!defined('SMF'))
16
+if (!defined('SMF')) {
17 17
 	die('No direct access...');
18
+}
18 19
 
19 20
 /**
20 21
  * This is the notoriously defunct package manager..... :/.
@@ -57,10 +58,11 @@  discard block
 block discarded – undo
57 58
 	);
58 59
 
59 60
 	// Work out exactly who it is we are calling.
60
-	if (isset($_REQUEST['sa']) && isset($subActions[$_REQUEST['sa']]))
61
-		$context['sub_action'] = $_REQUEST['sa'];
62
-	else
63
-		$context['sub_action'] = 'browse';
61
+	if (isset($_REQUEST['sa']) && isset($subActions[$_REQUEST['sa']])) {
62
+			$context['sub_action'] = $_REQUEST['sa'];
63
+	} else {
64
+			$context['sub_action'] = 'browse';
65
+	}
64 66
 
65 67
 	// Set up some tabs...
66 68
 	$context[$context['admin_menu_name']]['tab_data'] = array(
@@ -82,8 +84,9 @@  discard block
 block discarded – undo
82 84
 		),
83 85
 	);
84 86
 
85
-	if ($context['sub_action'] == 'browse')
86
-		loadJavaScriptFile('suggest.js', array('defer' => false), 'smf_suggest');
87
+	if ($context['sub_action'] == 'browse') {
88
+			loadJavaScriptFile('suggest.js', array('defer' => false), 'smf_suggest');
89
+	}
87 90
 
88 91
 	call_integration_hook('integrate_manage_packages', array(&$subActions));
89 92
 
@@ -99,8 +102,9 @@  discard block
 block discarded – undo
99 102
 	global $boarddir, $txt, $context, $scripturl, $sourcedir, $packagesdir, $modSettings, $smcFunc, $settings;
100 103
 
101 104
 	// You have to specify a file!!
102
-	if (!isset($_REQUEST['package']) || $_REQUEST['package'] == '')
103
-		redirectexit('action=admin;area=packages');
105
+	if (!isset($_REQUEST['package']) || $_REQUEST['package'] == '') {
106
+			redirectexit('action=admin;area=packages');
107
+	}
104 108
 	$context['filename'] = preg_replace('~[\.]+~', '.', $_REQUEST['package']);
105 109
 
106 110
 	// Do we have an existing id, for uninstalls and the like.
@@ -112,8 +116,9 @@  discard block
 block discarded – undo
112 116
 	create_chmod_control();
113 117
 
114 118
 	// Make sure temp directory exists and is empty.
115
-	if (file_exists($packagesdir . '/temp'))
116
-		deltree($packagesdir . '/temp', false);
119
+	if (file_exists($packagesdir . '/temp')) {
120
+			deltree($packagesdir . '/temp', false);
121
+	}
117 122
 
118 123
 	if (!mktree($packagesdir . '/temp', 0755))
119 124
 	{
@@ -124,8 +129,9 @@  discard block
 block discarded – undo
124 129
 			create_chmod_control(array($packagesdir . '/temp/delme.tmp'), array('destination_url' => $scripturl . '?action=admin;area=packages;sa=' . $_REQUEST['sa'] . ';package=' . $_REQUEST['package'], 'crash_on_error' => true));
125 130
 
126 131
 			deltree($packagesdir . '/temp', false);
127
-			if (!mktree($packagesdir . '/temp', 0777))
128
-				fatal_lang_error('package_cant_download', false);
132
+			if (!mktree($packagesdir . '/temp', 0777)) {
133
+							fatal_lang_error('package_cant_download', false);
134
+			}
129 135
 		}
130 136
 	}
131 137
 
@@ -151,25 +157,26 @@  discard block
 block discarded – undo
151 157
 	{
152 158
 		$context['extracted_files'] = read_tgz_file($packagesdir . '/' . $context['filename'], $packagesdir . '/temp');
153 159
 
154
-		if ($context['extracted_files'] && !file_exists($packagesdir . '/temp/package-info.xml'))
155
-			foreach ($context['extracted_files'] as $file)
160
+		if ($context['extracted_files'] && !file_exists($packagesdir . '/temp/package-info.xml')) {
161
+					foreach ($context['extracted_files'] as $file)
156 162
 				if (basename($file['filename']) == 'package-info.xml')
157 163
 				{
158 164
 					$context['base_path'] = dirname($file['filename']) . '/';
165
+		}
159 166
 					break;
160 167
 				}
161 168
 
162
-		if (!isset($context['base_path']))
163
-			$context['base_path'] = '';
164
-	}
165
-	elseif (is_dir($packagesdir . '/' . $context['filename']))
169
+		if (!isset($context['base_path'])) {
170
+					$context['base_path'] = '';
171
+		}
172
+	} elseif (is_dir($packagesdir . '/' . $context['filename']))
166 173
 	{
167 174
 		copytree($packagesdir . '/' . $context['filename'], $packagesdir . '/temp');
168 175
 		$context['extracted_files'] = listtree($packagesdir . '/temp');
169 176
 		$context['base_path'] = '';
177
+	} else {
178
+			fatal_lang_error('no_access', false);
170 179
 	}
171
-	else
172
-		fatal_lang_error('no_access', false);
173 180
 
174 181
 	// Load up any custom themes we may want to install into...
175 182
 	$request = $smcFunc['db_query']('', '
@@ -185,15 +192,17 @@  discard block
 block discarded – undo
185 192
 		)
186 193
 	);
187 194
 	$theme_paths = array();
188
-	while ($row = $smcFunc['db_fetch_assoc']($request))
189
-		$theme_paths[$row['id_theme']][$row['variable']] = $row['value'];
195
+	while ($row = $smcFunc['db_fetch_assoc']($request)) {
196
+			$theme_paths[$row['id_theme']][$row['variable']] = $row['value'];
197
+	}
190 198
 	$smcFunc['db_free_result']($request);
191 199
 
192 200
 	// Get the package info...
193 201
 	$packageInfo = getPackageInfo($context['filename']);
194 202
 
195
-	if (!is_array($packageInfo))
196
-		fatal_lang_error($packageInfo);
203
+	if (!is_array($packageInfo)) {
204
+			fatal_lang_error($packageInfo);
205
+	}
197 206
 
198 207
 	$packageInfo['filename'] = $context['filename'];
199 208
 	$context['package_name'] = isset($packageInfo['name']) ? $packageInfo['name'] : $context['filename'];
@@ -227,18 +236,19 @@  discard block
 block discarded – undo
227 236
 	$smcFunc['db_free_result']($request);
228 237
 
229 238
 	$context['database_changes'] = array();
230
-	if (isset($packageInfo['uninstall']['database']))
231
-		$context['database_changes'][] = $txt['execute_database_changes'] . ' - ' . $packageInfo['uninstall']['database'];
232
-	elseif (!empty($db_changes))
239
+	if (isset($packageInfo['uninstall']['database'])) {
240
+			$context['database_changes'][] = $txt['execute_database_changes'] . ' - ' . $packageInfo['uninstall']['database'];
241
+	} elseif (!empty($db_changes))
233 242
 	{
234 243
 		foreach ($db_changes as $change)
235 244
 		{
236
-			if (isset($change[2]) && isset($txt['package_db_' . $change[0]]))
237
-				$context['database_changes'][] = sprintf($txt['package_db_' . $change[0]], $change[1], $change[2]);
238
-			elseif (isset($txt['package_db_' . $change[0]]))
239
-				$context['database_changes'][] = sprintf($txt['package_db_' . $change[0]], $change[1]);
240
-			else
241
-				$context['database_changes'][] = $change[0] . '-' . $change[1] . (isset($change[2]) ? '-' . $change[2] : '');
245
+			if (isset($change[2]) && isset($txt['package_db_' . $change[0]])) {
246
+							$context['database_changes'][] = sprintf($txt['package_db_' . $change[0]], $change[1], $change[2]);
247
+			} elseif (isset($txt['package_db_' . $change[0]])) {
248
+							$context['database_changes'][] = sprintf($txt['package_db_' . $change[0]], $change[1]);
249
+			} else {
250
+							$context['database_changes'][] = $change[0] . '-' . $change[1] . (isset($change[2]) ? '-' . $change[2] : '');
251
+			}
242 252
 		}
243 253
 	}
244 254
 
@@ -265,31 +275,33 @@  discard block
 block discarded – undo
265 275
 		$context['themes_locked'] = true;
266 276
 
267 277
 		// Only let them uninstall themes it was installed into.
268
-		foreach ($theme_paths as $id => $data)
269
-			if ($id != 1 && !in_array($id, $old_themes))
278
+		foreach ($theme_paths as $id => $data) {
279
+					if ($id != 1 && !in_array($id, $old_themes))
270 280
 				unset($theme_paths[$id]);
271
-	}
272
-	elseif (isset($old_version) && $old_version != $packageInfo['version'])
281
+		}
282
+	} elseif (isset($old_version) && $old_version != $packageInfo['version'])
273 283
 	{
274 284
 		// Look for an upgrade...
275 285
 		$actions = parsePackageInfo($packageInfo['xml'], true, 'upgrade', $old_version);
276 286
 
277 287
 		// There was no upgrade....
278
-		if (empty($actions))
279
-			$context['is_installed'] = true;
280
-		else
288
+		if (empty($actions)) {
289
+					$context['is_installed'] = true;
290
+		} else
281 291
 		{
282 292
 			// Otherwise they can only upgrade themes from the first time around.
283
-			foreach ($theme_paths as $id => $data)
284
-				if ($id != 1 && !in_array($id, $old_themes))
293
+			foreach ($theme_paths as $id => $data) {
294
+							if ($id != 1 && !in_array($id, $old_themes))
285 295
 					unset($theme_paths[$id]);
296
+			}
286 297
 		}
298
+	} elseif (isset($old_version) && $old_version == $packageInfo['version']) {
299
+			$context['is_installed'] = true;
287 300
 	}
288
-	elseif (isset($old_version) && $old_version == $packageInfo['version'])
289
-		$context['is_installed'] = true;
290 301
 
291
-	if (!isset($old_version) || $context['is_installed'])
292
-		$actions = parsePackageInfo($packageInfo['xml'], true, 'install');
302
+	if (!isset($old_version) || $context['is_installed']) {
303
+			$actions = parsePackageInfo($packageInfo['xml'], true, 'install');
304
+	}
293 305
 
294 306
 	$context['actions'] = array();
295 307
 	$context['ftp_needed'] = false;
@@ -297,8 +309,9 @@  discard block
 block discarded – undo
297 309
 	$chmod_files = array();
298 310
 
299 311
 	// no actions found, return so we can display an error
300
-	if (empty($actions))
301
-		return;
312
+	if (empty($actions)) {
313
+			return;
314
+	}
302 315
 
303 316
 	// This will hold data about anything that can be installed in other themes.
304 317
 	$themeFinds = array(
@@ -317,14 +330,14 @@  discard block
 block discarded – undo
317 330
 		{
318 331
 			$chmod_files[] = $action['filename'];
319 332
 			continue;
320
-		}
321
-		elseif ($action['type'] == 'readme' || $action['type'] == 'license')
333
+		} elseif ($action['type'] == 'readme' || $action['type'] == 'license')
322 334
 		{
323 335
 			$type = 'package_' . $action['type'];
324
-			if (file_exists($packagesdir . '/temp/' . $context['base_path'] . $action['filename']))
325
-				$context[$type] = $smcFunc['htmlspecialchars'](trim(file_get_contents($packagesdir . '/temp/' . $context['base_path'] . $action['filename']), "\n\r"));
326
-			elseif (file_exists($action['filename']))
327
-				$context[$type] = $smcFunc['htmlspecialchars'](trim(file_get_contents($action['filename']), "\n\r"));
336
+			if (file_exists($packagesdir . '/temp/' . $context['base_path'] . $action['filename'])) {
337
+							$context[$type] = $smcFunc['htmlspecialchars'](trim(file_get_contents($packagesdir . '/temp/' . $context['base_path'] . $action['filename']), "\n\r"));
338
+			} elseif (file_exists($action['filename'])) {
339
+							$context[$type] = $smcFunc['htmlspecialchars'](trim(file_get_contents($action['filename']), "\n\r"));
340
+			}
328 341
 
329 342
 			if (!empty($action['parse_bbc']))
330 343
 			{
@@ -332,24 +345,24 @@  discard block
 block discarded – undo
332 345
 				$context[$type] = preg_replace('~\[[/]?html\]~i', '', $context[$type]);
333 346
 				preparsecode($context[$type]);
334 347
 				$context[$type] = parse_bbc($context[$type]);
348
+			} else {
349
+							$context[$type] = nl2br($context[$type]);
335 350
 			}
336
-			else
337
-				$context[$type] = nl2br($context[$type]);
338 351
 
339 352
 			continue;
340 353
 		}
341 354
 		// Don't show redirects.
342
-		elseif ($action['type'] == 'redirect')
343
-			continue;
344
-		elseif ($action['type'] == 'error')
355
+		elseif ($action['type'] == 'redirect') {
356
+					continue;
357
+		} elseif ($action['type'] == 'error')
345 358
 		{
346 359
 			$context['has_failure'] = true;
347
-			if (isset($action['error_msg']) && isset($action['error_var']))
348
-				$context['failure_details'] = sprintf($txt['package_will_fail_' . $action['error_msg']], $action['error_var']);
349
-			elseif (isset($action['error_msg']))
350
-				$context['failure_details'] = isset($txt['package_will_fail_' . $action['error_msg']]) ? $txt['package_will_fail_' . $action['error_msg']] : $action['error_msg'];
351
-		}
352
-		elseif ($action['type'] == 'modification')
360
+			if (isset($action['error_msg']) && isset($action['error_var'])) {
361
+							$context['failure_details'] = sprintf($txt['package_will_fail_' . $action['error_msg']], $action['error_var']);
362
+			} elseif (isset($action['error_msg'])) {
363
+							$context['failure_details'] = isset($txt['package_will_fail_' . $action['error_msg']]) ? $txt['package_will_fail_' . $action['error_msg']] : $action['error_msg'];
364
+			}
365
+		} elseif ($action['type'] == 'modification')
353 366
 		{
354 367
 			if (!file_exists($packagesdir . '/temp/' . $context['base_path'] . $action['filename']))
355 368
 			{
@@ -361,52 +374,54 @@  discard block
 block discarded – undo
361 374
 					'description' => $txt['package_action_missing'],
362 375
 					'failed' => true,
363 376
 				);
364
-			}
365
-			else
377
+			} else
366 378
 			{
367 379
 
368
-				if ($action['boardmod'])
369
-					$mod_actions = parseBoardMod(@file_get_contents($packagesdir . '/temp/' . $context['base_path'] . $action['filename']), true, $action['reverse'], $theme_paths);
370
-				else
371
-					$mod_actions = parseModification(@file_get_contents($packagesdir . '/temp/' . $context['base_path'] . $action['filename']), true, $action['reverse'], $theme_paths);
380
+				if ($action['boardmod']) {
381
+									$mod_actions = parseBoardMod(@file_get_contents($packagesdir . '/temp/' . $context['base_path'] . $action['filename']), true, $action['reverse'], $theme_paths);
382
+				} else {
383
+									$mod_actions = parseModification(@file_get_contents($packagesdir . '/temp/' . $context['base_path'] . $action['filename']), true, $action['reverse'], $theme_paths);
384
+				}
372 385
 
373
-				if (count($mod_actions) == 1 && isset($mod_actions[0]) && $mod_actions[0]['type'] == 'error' && $mod_actions[0]['filename'] == '-')
374
-					$mod_actions[0]['filename'] = $action['filename'];
386
+				if (count($mod_actions) == 1 && isset($mod_actions[0]) && $mod_actions[0]['type'] == 'error' && $mod_actions[0]['filename'] == '-') {
387
+									$mod_actions[0]['filename'] = $action['filename'];
388
+				}
375 389
 
376 390
 				foreach ($mod_actions as $key => $mod_action)
377 391
 				{
378 392
 					// Lets get the last section of the file name.
379
-					if (isset($mod_action['filename']) && substr($mod_action['filename'], -13) != '.template.php')
380
-						$actual_filename = strtolower(substr(strrchr($mod_action['filename'], '/'), 1) . '||' . $action['filename']);
381
-					elseif (isset($mod_action['filename']) && preg_match('~([\w]*)/([\w]*)\.template\.php$~', $mod_action['filename'], $matches))
382
-						$actual_filename = strtolower($matches[1] . '/' . $matches[2] . '.template.php' . '||' . $action['filename']);
383
-					else
384
-						$actual_filename = $key;
385
-
386
-					if ($mod_action['type'] == 'opened')
387
-						$failed = false;
388
-					elseif ($mod_action['type'] == 'failure')
393
+					if (isset($mod_action['filename']) && substr($mod_action['filename'], -13) != '.template.php') {
394
+											$actual_filename = strtolower(substr(strrchr($mod_action['filename'], '/'), 1) . '||' . $action['filename']);
395
+					} elseif (isset($mod_action['filename']) && preg_match('~([\w]*)/([\w]*)\.template\.php$~', $mod_action['filename'], $matches)) {
396
+											$actual_filename = strtolower($matches[1] . '/' . $matches[2] . '.template.php' . '||' . $action['filename']);
397
+					} else {
398
+											$actual_filename = $key;
399
+					}
400
+
401
+					if ($mod_action['type'] == 'opened') {
402
+											$failed = false;
403
+					} elseif ($mod_action['type'] == 'failure')
389 404
 					{
390
-						if (empty($mod_action['is_custom']))
391
-							$context['has_failure'] = true;
405
+						if (empty($mod_action['is_custom'])) {
406
+													$context['has_failure'] = true;
407
+						}
392 408
 						$failed = true;
393
-					}
394
-					elseif ($mod_action['type'] == 'chmod')
409
+					} elseif ($mod_action['type'] == 'chmod')
395 410
 					{
396 411
 						$chmod_files[] = $mod_action['filename'];
397
-					}
398
-					elseif ($mod_action['type'] == 'saved')
412
+					} elseif ($mod_action['type'] == 'saved')
399 413
 					{
400 414
 						if (!empty($mod_action['is_custom']))
401 415
 						{
402
-							if (!isset($context['theme_actions'][$mod_action['is_custom']]))
403
-								$context['theme_actions'][$mod_action['is_custom']] = array(
416
+							if (!isset($context['theme_actions'][$mod_action['is_custom']])) {
417
+															$context['theme_actions'][$mod_action['is_custom']] = array(
404 418
 									'name' => $theme_paths[$mod_action['is_custom']]['name'],
405 419
 									'actions' => array(),
406 420
 									'has_failure' => $failed,
407 421
 								);
408
-							else
409
-								$context['theme_actions'][$mod_action['is_custom']]['has_failure'] |= $failed;
422
+							} else {
423
+															$context['theme_actions'][$mod_action['is_custom']]['has_failure'] |= $failed;
424
+							}
410 425
 
411 426
 							$context['theme_actions'][$mod_action['is_custom']]['actions'][$actual_filename] = array(
412 427
 								'type' => $txt['execute_modification'],
@@ -414,8 +429,7 @@  discard block
 block discarded – undo
414 429
 								'description' => $failed ? $txt['package_action_failure'] : $txt['package_action_success'],
415 430
 								'failed' => $failed,
416 431
 							);
417
-						}
418
-						elseif (!isset($context['actions'][$actual_filename]))
432
+						} elseif (!isset($context['actions'][$actual_filename]))
419 433
 						{
420 434
 							$context['actions'][$actual_filename] = array(
421 435
 								'type' => $txt['execute_modification'],
@@ -423,22 +437,19 @@  discard block
 block discarded – undo
423 437
 								'description' => $failed ? $txt['package_action_failure'] : $txt['package_action_success'],
424 438
 								'failed' => $failed,
425 439
 							);
426
-						}
427
-						else
440
+						} else
428 441
 						{
429 442
 								$context['actions'][$actual_filename]['failed'] |= $failed;
430 443
 								$context['actions'][$actual_filename]['description'] = $context['actions'][$actual_filename]['failed'] ? $txt['package_action_failure'] : $txt['package_action_success'];
431 444
 						}
432
-					}
433
-					elseif ($mod_action['type'] == 'skipping')
445
+					} elseif ($mod_action['type'] == 'skipping')
434 446
 					{
435 447
 						$context['actions'][$actual_filename] = array(
436 448
 							'type' => $txt['execute_modification'],
437 449
 							'action' => $smcFunc['htmlspecialchars'](strtr($mod_action['filename'], array($boarddir => '.'))),
438 450
 							'description' => $txt['package_action_skipping']
439 451
 						);
440
-					}
441
-					elseif ($mod_action['type'] == 'missing' && empty($mod_action['is_custom']))
452
+					} elseif ($mod_action['type'] == 'missing' && empty($mod_action['is_custom']))
442 453
 					{
443 454
 						$context['has_failure'] = true;
444 455
 						$context['actions'][$actual_filename] = array(
@@ -447,32 +458,33 @@  discard block
 block discarded – undo
447 458
 							'description' => $txt['package_action_missing'],
448 459
 							'failed' => true,
449 460
 						);
450
-					}
451
-					elseif ($mod_action['type'] == 'error')
452
-						$context['actions'][$actual_filename] = array(
461
+					} elseif ($mod_action['type'] == 'error') {
462
+											$context['actions'][$actual_filename] = array(
453 463
 							'type' => $txt['execute_modification'],
454 464
 							'action' => $smcFunc['htmlspecialchars'](strtr($mod_action['filename'], array($boarddir => '.'))),
455 465
 							'description' => $txt['package_action_error'],
456 466
 							'failed' => true,
457 467
 						);
468
+					}
458 469
 				}
459 470
 
460 471
 				// We need to loop again just to get the operations down correctly.
461 472
 				foreach ($mod_actions as $operation_key => $mod_action)
462 473
 				{
463 474
 					// Lets get the last section of the file name.
464
-					if (isset($mod_action['filename']) && substr($mod_action['filename'], -13) != '.template.php')
465
-						$actual_filename = strtolower(substr(strrchr($mod_action['filename'], '/'), 1) . '||' . $action['filename']);
466
-					elseif (isset($mod_action['filename']) && preg_match('~([\w]*)/([\w]*)\.template\.php$~', $mod_action['filename'], $matches))
467
-						$actual_filename = strtolower($matches[1] . '/' . $matches[2] . '.template.php' . '||' . $action['filename']);
468
-					else
469
-						$actual_filename = $key;
475
+					if (isset($mod_action['filename']) && substr($mod_action['filename'], -13) != '.template.php') {
476
+											$actual_filename = strtolower(substr(strrchr($mod_action['filename'], '/'), 1) . '||' . $action['filename']);
477
+					} elseif (isset($mod_action['filename']) && preg_match('~([\w]*)/([\w]*)\.template\.php$~', $mod_action['filename'], $matches)) {
478
+											$actual_filename = strtolower($matches[1] . '/' . $matches[2] . '.template.php' . '||' . $action['filename']);
479
+					} else {
480
+											$actual_filename = $key;
481
+					}
470 482
 
471 483
 					// We just need it for actual parse changes.
472 484
 					if (!in_array($mod_action['type'], array('error', 'result', 'opened', 'saved', 'end', 'missing', 'skipping', 'chmod')))
473 485
 					{
474
-						if (empty($mod_action['is_custom']))
475
-							$context['actions'][$actual_filename]['operations'][] = array(
486
+						if (empty($mod_action['is_custom'])) {
487
+													$context['actions'][$actual_filename]['operations'][] = array(
476 488
 								'type' => $txt['execute_modification'],
477 489
 								'action' => $smcFunc['htmlspecialchars'](strtr($mod_action['filename'], array($boarddir => '.'))),
478 490
 								'description' => $mod_action['failed'] ? $txt['package_action_failure'] : $txt['package_action_success'],
@@ -483,10 +495,11 @@  discard block
 block discarded – undo
483 495
 								'failed' => $mod_action['failed'],
484 496
 								'ignore_failure' => !empty($mod_action['ignore_failure']),
485 497
 							);
498
+						}
486 499
 
487 500
 						// Themes are under the saved type.
488
-						if (isset($mod_action['is_custom']) && isset($context['theme_actions'][$mod_action['is_custom']]))
489
-							$context['theme_actions'][$mod_action['is_custom']]['actions'][$actual_filename]['operations'][] = array(
501
+						if (isset($mod_action['is_custom']) && isset($context['theme_actions'][$mod_action['is_custom']])) {
502
+													$context['theme_actions'][$mod_action['is_custom']]['actions'][$actual_filename]['operations'][] = array(
490 503
 								'type' => $txt['execute_modification'],
491 504
 								'action' => $smcFunc['htmlspecialchars'](strtr($mod_action['filename'], array($boarddir => '.'))),
492 505
 								'description' => $mod_action['failed'] ? $txt['package_action_failure'] : $txt['package_action_success'],
@@ -497,59 +510,55 @@  discard block
 block discarded – undo
497 510
 								'failed' => $mod_action['failed'],
498 511
 								'ignore_failure' => !empty($mod_action['ignore_failure']),
499 512
 							);
513
+						}
500 514
 					}
501 515
 				}
502 516
 			}
503
-		}
504
-		elseif ($action['type'] == 'code')
517
+		} elseif ($action['type'] == 'code')
505 518
 		{
506 519
 			$thisAction = array(
507 520
 				'type' => $txt['execute_code'],
508 521
 				'action' => $smcFunc['htmlspecialchars']($action['filename']),
509 522
 			);
510
-		}
511
-		elseif ($action['type'] == 'database')
523
+		} elseif ($action['type'] == 'database')
512 524
 		{
513 525
 			$thisAction = array(
514 526
 				'type' => $txt['execute_database_changes'],
515 527
 				'action' => $smcFunc['htmlspecialchars']($action['filename']),
516 528
 			);
517
-		}
518
-		elseif (in_array($action['type'], array('create-dir', 'create-file')))
529
+		} elseif (in_array($action['type'], array('create-dir', 'create-file')))
519 530
 		{
520 531
 			$thisAction = array(
521 532
 				'type' => $txt['package_create'] . ' ' . ($action['type'] == 'create-dir' ? $txt['package_tree'] : $txt['package_file']),
522 533
 				'action' => $smcFunc['htmlspecialchars'](strtr($action['destination'], array($boarddir => '.')))
523 534
 			);
524
-		}
525
-		elseif ($action['type'] == 'hook')
535
+		} elseif ($action['type'] == 'hook')
526 536
 		{
527 537
 			$action['description'] = !isset($action['hook'], $action['function']) ? $txt['package_action_failure'] : $txt['package_action_success'];
528 538
 
529
-			if (!isset($action['hook'], $action['function']))
530
-				$context['has_failure'] = true;
539
+			if (!isset($action['hook'], $action['function'])) {
540
+							$context['has_failure'] = true;
541
+			}
531 542
 
532 543
 			$thisAction = array(
533 544
 				'type' => $action['reverse'] ? $txt['execute_hook_remove'] : $txt['execute_hook_add'],
534 545
 				'action' => sprintf($txt['execute_hook_action'. ($action['reverse'] ? '_inverse' : '')],  $smcFunc['htmlspecialchars']($action['hook'])),
535 546
 			);
536
-		}
537
-		elseif ($action['type'] == 'credits')
547
+		} elseif ($action['type'] == 'credits')
538 548
 		{
539 549
 			$thisAction = array(
540 550
 				'type' => $txt['execute_credits_add'],
541 551
 				'action' => sprintf($txt['execute_credits_action'],  $smcFunc['htmlspecialchars']($action['title'])),
542 552
 			);
543
-		}
544
-		elseif ($action['type'] == 'requires')
553
+		} elseif ($action['type'] == 'requires')
545 554
 		{
546 555
 			$installed = false;
547 556
 			$version = true;
548 557
 
549 558
 			// package missing required values?
550
-			if (!isset($action['id']))
551
-				$context['has_failure'] = true;
552
-			else
559
+			if (!isset($action['id'])) {
560
+							$context['has_failure'] = true;
561
+			} else
553 562
 			{
554 563
 				// See if this dependancy is installed
555 564
 				$request = $smcFunc['db_query']('', '
@@ -565,8 +574,9 @@  discard block
 block discarded – undo
565 574
 					)
566 575
 				);
567 576
 				$installed = ($smcFunc['db_num_rows']($request) !== 0);
568
-				if ($installed)
569
-					list ($version) = $smcFunc['db_fetch_row']($request);
577
+				if ($installed) {
578
+									list ($version) = $smcFunc['db_fetch_row']($request);
579
+				}
570 580
 				$smcFunc['db_free_result']($request);
571 581
 
572 582
 				// do a version level check (if requested) in the most basic way
@@ -581,8 +591,7 @@  discard block
 block discarded – undo
581 591
 				'type' => $txt['package_requires'],
582 592
 				'action' => $txt['package_check_for'] . ' ' . $action['id'] . (isset($action['version']) ? (' / ' . ($version ? $action['version'] : '<span class="error">' . $action['version'] . '</span>')) : ''),
583 593
 			);
584
-		}
585
-		elseif (in_array($action['type'], array('require-dir', 'require-file')))
594
+		} elseif (in_array($action['type'], array('require-dir', 'require-file')))
586 595
 		{
587 596
 			// Do this one...
588 597
 			$thisAction = array(
@@ -596,26 +605,29 @@  discard block
 block discarded – undo
596 605
 				// Is the action already stated?
597 606
 				$theme_action = !empty($action['theme_action']) && in_array($action['theme_action'], array('no', 'yes', 'auto')) ? $action['theme_action'] : 'auto';
598 607
 				// If it's not auto do we think we have something we can act upon?
599
-				if ($theme_action != 'auto' && !in_array($matches[1], array('languagedir', 'languages_dir', 'imagesdir', 'themedir')))
600
-					$theme_action = '';
608
+				if ($theme_action != 'auto' && !in_array($matches[1], array('languagedir', 'languages_dir', 'imagesdir', 'themedir'))) {
609
+									$theme_action = '';
610
+				}
601 611
 				// ... or if it's auto do we even want to do anything?
602
-				elseif ($theme_action == 'auto' && $matches[1] != 'imagesdir')
603
-					$theme_action = '';
612
+				elseif ($theme_action == 'auto' && $matches[1] != 'imagesdir') {
613
+									$theme_action = '';
614
+				}
604 615
 
605 616
 				// So, we still want to do something?
606
-				if ($theme_action != '')
607
-					$themeFinds['candidates'][] = $action;
617
+				if ($theme_action != '') {
618
+									$themeFinds['candidates'][] = $action;
619
+				}
608 620
 				// Otherwise is this is going into another theme record it.
609
-				elseif ($matches[1] == 'themes_dir')
610
-					$themeFinds['other_themes'][] = strtolower(strtr(parse_path($action['unparsed_destination']), array('\\' => '/')) . '/' . basename($action['filename']));
621
+				elseif ($matches[1] == 'themes_dir') {
622
+									$themeFinds['other_themes'][] = strtolower(strtr(parse_path($action['unparsed_destination']), array('\\' => '/')) . '/' . basename($action['filename']));
623
+				}
611 624
 			}
612
-		}
613
-		elseif (in_array($action['type'], array('move-dir', 'move-file')))
614
-			$thisAction = array(
625
+		} elseif (in_array($action['type'], array('move-dir', 'move-file'))) {
626
+					$thisAction = array(
615 627
 				'type' => $txt['package_move'] . ' ' . ($action['type'] == 'move-dir' ? $txt['package_tree'] : $txt['package_file']),
616 628
 				'action' => $smcFunc['htmlspecialchars'](strtr($action['source'], array($boarddir => '.'))) . ' => ' . $smcFunc['htmlspecialchars'](strtr($action['destination'], array($boarddir => '.')))
617 629
 			);
618
-		elseif (in_array($action['type'], array('remove-dir', 'remove-file')))
630
+		} elseif (in_array($action['type'], array('remove-dir', 'remove-file')))
619 631
 		{
620 632
 			$thisAction = array(
621 633
 				'type' => $txt['package_delete'] . ' ' . ($action['type'] == 'remove-dir' ? $txt['package_tree'] : $txt['package_file']),
@@ -631,30 +643,36 @@  discard block
 block discarded – undo
631 643
 				$action['unparsed_destination'] = $action['unparsed_filename'];
632 644
 
633 645
 				// If it's not auto do we think we have something we can act upon?
634
-				if ($theme_action != 'auto' && !in_array($matches[1], array('languagedir', 'languages_dir', 'imagesdir', 'themedir')))
635
-					$theme_action = '';
646
+				if ($theme_action != 'auto' && !in_array($matches[1], array('languagedir', 'languages_dir', 'imagesdir', 'themedir'))) {
647
+									$theme_action = '';
648
+				}
636 649
 				// ... or if it's auto do we even want to do anything?
637
-				elseif ($theme_action == 'auto' && $matches[1] != 'imagesdir')
638
-					$theme_action = '';
650
+				elseif ($theme_action == 'auto' && $matches[1] != 'imagesdir') {
651
+									$theme_action = '';
652
+				}
639 653
 
640 654
 				// So, we still want to do something?
641
-				if ($theme_action != '')
642
-					$themeFinds['candidates'][] = $action;
655
+				if ($theme_action != '') {
656
+									$themeFinds['candidates'][] = $action;
657
+				}
643 658
 				// Otherwise is this is going into another theme record it.
644
-				elseif ($matches[1] == 'themes_dir')
645
-					$themeFinds['other_themes'][] = strtolower(strtr(parse_path($action['unparsed_filename']), array('\\' => '/')) . '/' . basename($action['filename']));
659
+				elseif ($matches[1] == 'themes_dir') {
660
+									$themeFinds['other_themes'][] = strtolower(strtr(parse_path($action['unparsed_filename']), array('\\' => '/')) . '/' . basename($action['filename']));
661
+				}
646 662
 			}
647 663
 		}
648 664
 
649
-		if (empty($thisAction))
650
-			continue;
665
+		if (empty($thisAction)) {
666
+					continue;
667
+		}
651 668
 
652 669
 		if (!in_array($action['type'], array('hook', 'credits')))
653 670
 		{
654
-			if ($context['uninstalling'])
655
-				$file = in_array($action['type'], array('remove-dir', 'remove-file')) ? $action['filename'] : $packagesdir . '/temp/' . $context['base_path'] . $action['filename'];
656
-			else
657
-				$file =  $packagesdir . '/temp/' . $context['base_path'] . $action['filename'];
671
+			if ($context['uninstalling']) {
672
+							$file = in_array($action['type'], array('remove-dir', 'remove-file')) ? $action['filename'] : $packagesdir . '/temp/' . $context['base_path'] . $action['filename'];
673
+			} else {
674
+							$file =  $packagesdir . '/temp/' . $context['base_path'] . $action['filename'];
675
+			}
658 676
 		}
659 677
 
660 678
 		// Don't fail if a file/directory we're trying to create doesn't exist...
@@ -669,8 +687,9 @@  discard block
 block discarded – undo
669 687
 		}
670 688
 
671 689
 		// @todo None given?
672
-		if (empty($thisAction['description']))
673
-			$thisAction['description'] = isset($action['description']) ? $action['description'] : '';
690
+		if (empty($thisAction['description'])) {
691
+					$thisAction['description'] = isset($action['description']) ? $action['description'] : '';
692
+		}
674 693
 
675 694
 		$context['actions'][] = $thisAction;
676 695
 	}
@@ -683,18 +702,21 @@  discard block
 block discarded – undo
683 702
 			// Get the part of the file we'll be dealing with.
684 703
 			preg_match('~^\$(languagedir|languages_dir|imagesdir|themedir)(\\|/)*(.+)*~i', $action_data['unparsed_destination'], $matches);
685 704
 
686
-			if ($matches[1] == 'imagesdir')
687
-				$path = '/' . basename($settings['default_images_url']);
688
-			elseif ($matches[1] == 'languagedir' || $matches[1] == 'languages_dir')
689
-				$path = '/languages';
690
-			else
691
-				$path = '';
705
+			if ($matches[1] == 'imagesdir') {
706
+							$path = '/' . basename($settings['default_images_url']);
707
+			} elseif ($matches[1] == 'languagedir' || $matches[1] == 'languages_dir') {
708
+							$path = '/languages';
709
+			} else {
710
+							$path = '';
711
+			}
692 712
 
693
-			if (!empty($matches[3]))
694
-				$path .= $matches[3];
713
+			if (!empty($matches[3])) {
714
+							$path .= $matches[3];
715
+			}
695 716
 
696
-			if (!$context['uninstalling'])
697
-				$path .= '/' . basename($action_data['filename']);
717
+			if (!$context['uninstalling']) {
718
+							$path .= '/' . basename($action_data['filename']);
719
+			}
698 720
 
699 721
 			// Loop through each custom theme to note it's candidacy!
700 722
 			foreach ($theme_paths as $id => $theme_data)
@@ -710,36 +732,40 @@  discard block
 block discarded – undo
710 732
 						if (!mktree(dirname($real_path), false))
711 733
 						{
712 734
 							$temp = dirname($real_path);
713
-							while (!file_exists($temp) && strlen($temp) > 1)
714
-								$temp = dirname($temp);
735
+							while (!file_exists($temp) && strlen($temp) > 1) {
736
+															$temp = dirname($temp);
737
+							}
715 738
 							$chmod_files[] = $temp;
716 739
 						}
717 740
 
718
-						if ($action_data['type'] == 'require-dir' && !is_writable($real_path) && (file_exists($real_path) || !is_writable(dirname($real_path))))
719
-							$chmod_files[] = $real_path;
741
+						if ($action_data['type'] == 'require-dir' && !is_writable($real_path) && (file_exists($real_path) || !is_writable(dirname($real_path)))) {
742
+													$chmod_files[] = $real_path;
743
+						}
720 744
 
721
-						if (!isset($context['theme_actions'][$id]))
722
-							$context['theme_actions'][$id] = array(
745
+						if (!isset($context['theme_actions'][$id])) {
746
+													$context['theme_actions'][$id] = array(
723 747
 								'name' => $theme_data['name'],
724 748
 								'actions' => array(),
725 749
 							);
750
+						}
726 751
 
727
-						if ($context['uninstalling'])
728
-							$context['theme_actions'][$id]['actions'][] = array(
752
+						if ($context['uninstalling']) {
753
+													$context['theme_actions'][$id]['actions'][] = array(
729 754
 								'type' => $txt['package_delete'] . ' ' . ($action_data['type'] == 'require-dir' ? $txt['package_tree'] : $txt['package_file']),
730 755
 								'action' => strtr($real_path, array('\\' => '/', $boarddir => '.')),
731 756
 								'description' => '',
732 757
 								'value' => base64_encode(json_encode(array('type' => $action_data['type'], 'orig' => $action_data['filename'], 'future' => $real_path, 'id' => $id))),
733 758
 								'not_mod' => true,
734 759
 							);
735
-						else
736
-							$context['theme_actions'][$id]['actions'][] = array(
760
+						} else {
761
+													$context['theme_actions'][$id]['actions'][] = array(
737 762
 								'type' => $txt['package_extract'] . ' ' . ($action_data['type'] == 'require-dir' ? $txt['package_tree'] : $txt['package_file']),
738 763
 								'action' => strtr($real_path, array('\\' => '/', $boarddir => '.')),
739 764
 								'description' => '',
740 765
 								'value' => base64_encode(json_encode(array('type' => $action_data['type'], 'orig' => $action_data['destination'], 'future' => $real_path, 'id' => $id))),
741 766
 								'not_mod' => true,
742 767
 							);
768
+						}
743 769
 					}
744 770
 				}
745 771
 			}
@@ -749,8 +775,9 @@  discard block
 block discarded – undo
749 775
 	// Trash the cache... which will also check permissions for us!
750 776
 	package_flush_cache(true);
751 777
 
752
-	if (file_exists($packagesdir . '/temp'))
753
-		deltree($packagesdir . '/temp');
778
+	if (file_exists($packagesdir . '/temp')) {
779
+			deltree($packagesdir . '/temp');
780
+	}
754 781
 
755 782
 	if (!empty($chmod_files))
756 783
 	{
@@ -775,8 +802,9 @@  discard block
 block discarded – undo
775 802
 	checkSession();
776 803
 
777 804
 	// If there's no file, what are we installing?
778
-	if (!isset($_REQUEST['package']) || $_REQUEST['package'] == '')
779
-		redirectexit('action=admin;area=packages');
805
+	if (!isset($_REQUEST['package']) || $_REQUEST['package'] == '') {
806
+			redirectexit('action=admin;area=packages');
807
+	}
780 808
 	$context['filename'] = $_REQUEST['package'];
781 809
 
782 810
 	// If this is an uninstall, we'll have an id.
@@ -797,51 +825,55 @@  discard block
 block discarded – undo
797 825
 
798 826
 	$context['sub_template'] = 'extract_package';
799 827
 
800
-	if (!file_exists($packagesdir . '/' . $context['filename']))
801
-		fatal_lang_error('package_no_file', false);
828
+	if (!file_exists($packagesdir . '/' . $context['filename'])) {
829
+			fatal_lang_error('package_no_file', false);
830
+	}
802 831
 
803 832
 	// Load up the package FTP information?
804 833
 	create_chmod_control(array(), array('destination_url' => $scripturl . '?action=admin;area=packages;sa=' . $_REQUEST['sa'] . ';package=' . $_REQUEST['package']));
805 834
 
806 835
 	// Make sure temp directory exists and is empty!
807
-	if (file_exists($packagesdir . '/temp'))
808
-		deltree($packagesdir . '/temp', false);
809
-	else
810
-		mktree($packagesdir . '/temp', 0777);
836
+	if (file_exists($packagesdir . '/temp')) {
837
+			deltree($packagesdir . '/temp', false);
838
+	} else {
839
+			mktree($packagesdir . '/temp', 0777);
840
+	}
811 841
 
812 842
 	// Let the unpacker do the work.
813 843
 	if (is_file($packagesdir . '/' . $context['filename']))
814 844
 	{
815 845
 		$context['extracted_files'] = read_tgz_file($packagesdir . '/' . $context['filename'], $packagesdir . '/temp');
816 846
 
817
-		if (!file_exists($packagesdir . '/temp/package-info.xml'))
818
-			foreach ($context['extracted_files'] as $file)
847
+		if (!file_exists($packagesdir . '/temp/package-info.xml')) {
848
+					foreach ($context['extracted_files'] as $file)
819 849
 				if (basename($file['filename']) == 'package-info.xml')
820 850
 				{
821 851
 					$context['base_path'] = dirname($file['filename']) . '/';
852
+		}
822 853
 					break;
823 854
 				}
824 855
 
825
-		if (!isset($context['base_path']))
826
-			$context['base_path'] = '';
827
-	}
828
-	elseif (is_dir($packagesdir . '/' . $context['filename']))
856
+		if (!isset($context['base_path'])) {
857
+					$context['base_path'] = '';
858
+		}
859
+	} elseif (is_dir($packagesdir . '/' . $context['filename']))
829 860
 	{
830 861
 		copytree($packagesdir . '/' . $context['filename'], $packagesdir . '/temp');
831 862
 		$context['extracted_files'] = listtree($packagesdir . '/temp');
832 863
 		$context['base_path'] = '';
864
+	} else {
865
+			fatal_lang_error('no_access', false);
833 866
 	}
834
-	else
835
-		fatal_lang_error('no_access', false);
836 867
 
837 868
 	// Are we installing this into any custom themes?
838 869
 	$custom_themes = array(1);
839 870
 	$known_themes = explode(',', $modSettings['knownThemes']);
840 871
 	if (!empty($_POST['custom_theme']))
841 872
 	{
842
-		foreach ($_POST['custom_theme'] as $tid)
843
-			if (in_array($tid, $known_themes))
873
+		foreach ($_POST['custom_theme'] as $tid) {
874
+					if (in_array($tid, $known_themes))
844 875
 				$custom_themes[] = (int) $tid;
876
+		}
845 877
 	}
846 878
 
847 879
 	// Now load up the paths of the themes that we need to know about.
@@ -858,8 +890,9 @@  discard block
 block discarded – undo
858 890
 	);
859 891
 	$theme_paths = array();
860 892
 	$themes_installed = array(1);
861
-	while ($row = $smcFunc['db_fetch_assoc']($request))
862
-		$theme_paths[$row['id_theme']][$row['variable']] = $row['value'];
893
+	while ($row = $smcFunc['db_fetch_assoc']($request)) {
894
+			$theme_paths[$row['id_theme']][$row['variable']] = $row['value'];
895
+	}
863 896
 	$smcFunc['db_free_result']($request);
864 897
 
865 898
 	// Are there any theme copying that we want to take place?
@@ -871,11 +904,13 @@  discard block
 block discarded – undo
871 904
 	{
872 905
 		foreach ($_POST['theme_changes'] as $change)
873 906
 		{
874
-			if (empty($change))
875
-				continue;
907
+			if (empty($change)) {
908
+							continue;
909
+			}
876 910
 			$theme_data = smf_json_decode(base64_decode($change), true);
877
-			if (empty($theme_data['type']))
878
-				continue;
911
+			if (empty($theme_data['type'])) {
912
+							continue;
913
+			}
879 914
 
880 915
 			$themes_installed[] = $theme_data['id'];
881 916
 			$context['theme_copies'][$theme_data['type']][$theme_data['orig']][] = $theme_data['future'];
@@ -884,8 +919,9 @@  discard block
 block discarded – undo
884 919
 
885 920
 	// Get the package info...
886 921
 	$packageInfo = getPackageInfo($context['filename']);
887
-	if (!is_array($packageInfo))
888
-		fatal_lang_error($packageInfo);
922
+	if (!is_array($packageInfo)) {
923
+			fatal_lang_error($packageInfo);
924
+	}
889 925
 
890 926
 	$packageInfo['filename'] = $context['filename'];
891 927
 
@@ -897,8 +933,9 @@  discard block
 block discarded – undo
897 933
 	{
898 934
 		$_SESSION['last_backup_for'] = $context['filename'] . ($context['uninstalling'] ? '$$' : '$');
899 935
 		$result = package_create_backup(($context['uninstalling'] ? 'backup_' : 'before_') . strtok($context['filename'], '.'));
900
-		if (!$result)
901
-			fatal_lang_error('could_not_package_backup', false);
936
+		if (!$result) {
937
+					fatal_lang_error('could_not_package_backup', false);
938
+		}
902 939
 	}
903 940
 
904 941
 	// The mod isn't installed.... unless proven otherwise.
@@ -938,35 +975,38 @@  discard block
 block discarded – undo
938 975
 		$install_log = parsePackageInfo($packageInfo['xml'], false, 'uninstall');
939 976
 
940 977
 		// Gadzooks!  There's no uninstaller at all!?
941
-		if (empty($install_log))
942
-			fatal_lang_error('package_uninstall_cannot', false);
978
+		if (empty($install_log)) {
979
+					fatal_lang_error('package_uninstall_cannot', false);
980
+		}
943 981
 
944 982
 		// They can only uninstall from what it was originally installed into.
945
-		foreach ($theme_paths as $id => $data)
946
-			if ($id != 1 && !in_array($id, $old_themes))
983
+		foreach ($theme_paths as $id => $data) {
984
+					if ($id != 1 && !in_array($id, $old_themes))
947 985
 				unset($theme_paths[$id]);
948
-	}
949
-	elseif (isset($old_version) && $old_version != $packageInfo['version'])
986
+		}
987
+	} elseif (isset($old_version) && $old_version != $packageInfo['version'])
950 988
 	{
951 989
 		// Look for an upgrade...
952 990
 		$install_log = parsePackageInfo($packageInfo['xml'], false, 'upgrade', $old_version);
953 991
 
954 992
 		// There was no upgrade....
955
-		if (empty($install_log))
956
-			$context['is_installed'] = true;
957
-		else
993
+		if (empty($install_log)) {
994
+					$context['is_installed'] = true;
995
+		} else
958 996
 		{
959 997
 			// Upgrade previous themes only!
960
-			foreach ($theme_paths as $id => $data)
961
-				if ($id != 1 && !in_array($id, $old_themes))
998
+			foreach ($theme_paths as $id => $data) {
999
+							if ($id != 1 && !in_array($id, $old_themes))
962 1000
 					unset($theme_paths[$id]);
1001
+			}
963 1002
 		}
1003
+	} elseif (isset($old_version) && $old_version == $packageInfo['version']) {
1004
+			$context['is_installed'] = true;
964 1005
 	}
965
-	elseif (isset($old_version) && $old_version == $packageInfo['version'])
966
-		$context['is_installed'] = true;
967 1006
 
968
-	if (!isset($old_version) || $context['is_installed'])
969
-		$install_log = parsePackageInfo($packageInfo['xml'], false, 'install');
1007
+	if (!isset($old_version) || $context['is_installed']) {
1008
+			$install_log = parsePackageInfo($packageInfo['xml'], false, 'install');
1009
+	}
970 1010
 
971 1011
 	$context['install_finished'] = false;
972 1012
 
@@ -983,37 +1023,39 @@  discard block
 block discarded – undo
983 1023
 
984 1024
 			if ($action['type'] == 'modification' && !empty($action['filename']))
985 1025
 			{
986
-				if ($action['boardmod'])
987
-					$mod_actions = parseBoardMod(file_get_contents($packagesdir . '/temp/' . $context['base_path'] . $action['filename']), false, $action['reverse'], $theme_paths);
988
-				else
989
-					$mod_actions = parseModification(file_get_contents($packagesdir . '/temp/' . $context['base_path'] . $action['filename']), false, $action['reverse'], $theme_paths);
1026
+				if ($action['boardmod']) {
1027
+									$mod_actions = parseBoardMod(file_get_contents($packagesdir . '/temp/' . $context['base_path'] . $action['filename']), false, $action['reverse'], $theme_paths);
1028
+				} else {
1029
+									$mod_actions = parseModification(file_get_contents($packagesdir . '/temp/' . $context['base_path'] . $action['filename']), false, $action['reverse'], $theme_paths);
1030
+				}
990 1031
 
991 1032
 				// Any errors worth noting?
992 1033
 				foreach ($mod_actions as $key => $action)
993 1034
 				{
994
-					if ($action['type'] == 'failure')
995
-						$failed_steps[] = array(
1035
+					if ($action['type'] == 'failure') {
1036
+											$failed_steps[] = array(
996 1037
 							'file' => $action['filename'],
997 1038
 							'large_step' => $failed_count,
998 1039
 							'sub_step' => $key,
999 1040
 							'theme' => 1,
1000 1041
 						);
1042
+					}
1001 1043
 
1002 1044
 					// Gather the themes we installed into.
1003
-					if (!empty($action['is_custom']))
1004
-						$themes_installed[] = $action['is_custom'];
1045
+					if (!empty($action['is_custom'])) {
1046
+											$themes_installed[] = $action['is_custom'];
1047
+					}
1005 1048
 				}
1006
-			}
1007
-			elseif ($action['type'] == 'code' && !empty($action['filename']))
1049
+			} elseif ($action['type'] == 'code' && !empty($action['filename']))
1008 1050
 			{
1009 1051
 				// This is just here as reference for what is available.
1010 1052
 				global $txt, $boarddir, $sourcedir, $modSettings, $context, $settings, $forum_version, $smcFunc;
1011 1053
 
1012 1054
 				// Now include the file and be done with it ;).
1013
-				if (file_exists($packagesdir . '/temp/' . $context['base_path'] . $action['filename']))
1014
-					require($packagesdir . '/temp/' . $context['base_path'] . $action['filename']);
1015
-			}
1016
-			elseif ($action['type'] == 'credits')
1055
+				if (file_exists($packagesdir . '/temp/' . $context['base_path'] . $action['filename'])) {
1056
+									require($packagesdir . '/temp/' . $context['base_path'] . $action['filename']);
1057
+				}
1058
+			} elseif ($action['type'] == 'credits')
1017 1059
 			{
1018 1060
 				// Time to build the billboard
1019 1061
 				$credits_tag = array(
@@ -1023,13 +1065,13 @@  discard block
 block discarded – undo
1023 1065
 					'copyright' => $action['copyright'],
1024 1066
 					'title' => $action['title'],
1025 1067
 				);
1026
-			}
1027
-			elseif ($action['type'] == 'hook' && isset($action['hook'], $action['function']))
1068
+			} elseif ($action['type'] == 'hook' && isset($action['hook'], $action['function']))
1028 1069
 			{
1029
-				if ($action['reverse'])
1030
-					remove_integration_function($action['hook'], $action['function'], true, $action['include_file'], $action['object']);
1031
-				else
1032
-					add_integration_function($action['hook'], $action['function'], true, $action['include_file'], $action['object']);
1070
+				if ($action['reverse']) {
1071
+									remove_integration_function($action['hook'], $action['function'], true, $action['include_file'], $action['object']);
1072
+				} else {
1073
+									add_integration_function($action['hook'], $action['function'], true, $action['include_file'], $action['object']);
1074
+				}
1033 1075
 			}
1034 1076
 			// Only do the database changes on uninstall if requested.
1035 1077
 			elseif ($action['type'] == 'database' && !empty($action['filename']) && (!$context['uninstalling'] || !empty($_POST['do_db_changes'])))
@@ -1042,8 +1084,9 @@  discard block
 block discarded – undo
1042 1084
 				db_extend('packages');
1043 1085
 
1044 1086
 				// Let the file work its magic ;)
1045
-				if (file_exists($packagesdir . '/temp/' . $context['base_path'] . $action['filename']))
1046
-					require($packagesdir . '/temp/' . $context['base_path'] . $action['filename']);
1087
+				if (file_exists($packagesdir . '/temp/' . $context['base_path'] . $action['filename'])) {
1088
+									require($packagesdir . '/temp/' . $context['base_path'] . $action['filename']);
1089
+				}
1047 1090
 			}
1048 1091
 			// Handle a redirect...
1049 1092
 			elseif ($action['type'] == 'redirect' && !empty($action['redirect_url']))
@@ -1125,8 +1168,9 @@  discard block
 block discarded – undo
1125 1168
 			reloadSettings();
1126 1169
 
1127 1170
 			// Any db changes from older version?
1128
-			if (!empty($old_db_changes))
1129
-				$db_package_log = empty($db_package_log) ? $old_db_changes : array_merge($old_db_changes, $db_package_log);
1171
+			if (!empty($old_db_changes)) {
1172
+							$db_package_log = empty($db_package_log) ? $old_db_changes : array_merge($old_db_changes, $db_package_log);
1173
+			}
1130 1174
 
1131 1175
 			// If there are some database changes we might want to remove then filter them out.
1132 1176
 			if (!empty($db_package_log))
@@ -1142,22 +1186,24 @@  discard block
 block discarded – undo
1142 1186
 				 */
1143 1187
 				function sort_table_first($a, $b)
1144 1188
 				{
1145
-					if ($a[0] == $b[0])
1146
-						return 0;
1189
+					if ($a[0] == $b[0]) {
1190
+											return 0;
1191
+					}
1147 1192
 					return $a[0] == 'remove_table' ? -1 : 1;
1148 1193
 				}
1149 1194
 				usort($db_package_log, 'sort_table_first');
1150 1195
 				foreach ($db_package_log as $k => $log)
1151 1196
 				{
1152
-					if ($log[0] == 'remove_table')
1153
-						$tables[] = $log[1];
1154
-					elseif (in_array($log[1], $tables))
1155
-						unset($db_package_log[$k]);
1197
+					if ($log[0] == 'remove_table') {
1198
+											$tables[] = $log[1];
1199
+					} elseif (in_array($log[1], $tables)) {
1200
+											unset($db_package_log[$k]);
1201
+					}
1156 1202
 				}
1157 1203
 				$db_changes = json_encode($db_package_log);
1204
+			} else {
1205
+							$db_changes = '';
1158 1206
 			}
1159
-			else
1160
-				$db_changes = '';
1161 1207
 
1162 1208
 			// What themes did we actually install?
1163 1209
 			$themes_installed = array_unique($themes_installed);
@@ -1206,18 +1252,20 @@  discard block
 block discarded – undo
1206 1252
 
1207 1253
 		foreach ($db_changes as $change)
1208 1254
 		{
1209
-			if ($change[0] == 'remove_table' && isset($change[1]))
1210
-				$smcFunc['db_drop_table']($change[1]);
1211
-			elseif ($change[0] == 'remove_column' && isset($change[2]))
1212
-				$smcFunc['db_remove_column']($change[1], $change[2]);
1213
-			elseif ($change[0] == 'remove_index' && isset($change[2]))
1214
-				$smcFunc['db_remove_index']($change[1], $change[2]);
1255
+			if ($change[0] == 'remove_table' && isset($change[1])) {
1256
+							$smcFunc['db_drop_table']($change[1]);
1257
+			} elseif ($change[0] == 'remove_column' && isset($change[2])) {
1258
+							$smcFunc['db_remove_column']($change[1], $change[2]);
1259
+			} elseif ($change[0] == 'remove_index' && isset($change[2])) {
1260
+							$smcFunc['db_remove_index']($change[1], $change[2]);
1261
+			}
1215 1262
 		}
1216 1263
 	}
1217 1264
 
1218 1265
 	// Clean house... get rid of the evidence ;).
1219
-	if (file_exists($packagesdir . '/temp'))
1220
-		deltree($packagesdir . '/temp');
1266
+	if (file_exists($packagesdir . '/temp')) {
1267
+			deltree($packagesdir . '/temp');
1268
+	}
1221 1269
 
1222 1270
 	// Log what we just did.
1223 1271
 	logAction($context['uninstalling'] ? 'uninstall_package' : (!empty($is_upgrade) ? 'upgrade_package' : 'install_package'), array('package' => $smcFunc['htmlspecialchars']($packageInfo['name']), 'version' => $smcFunc['htmlspecialchars']($packageInfo['version'])), 'admin');
@@ -1239,8 +1287,9 @@  discard block
 block discarded – undo
1239 1287
 	require_once($sourcedir . '/Subs-Package.php');
1240 1288
 
1241 1289
 	// No package?  Show him or her the door.
1242
-	if (!isset($_REQUEST['package']) || $_REQUEST['package'] == '')
1243
-		redirectexit('action=admin;area=packages');
1290
+	if (!isset($_REQUEST['package']) || $_REQUEST['package'] == '') {
1291
+			redirectexit('action=admin;area=packages');
1292
+	}
1244 1293
 
1245 1294
 	$context['linktree'][] = array(
1246 1295
 		'url' => $scripturl . '?action=admin;area=packages;sa=list;package=' . $_REQUEST['package'],
@@ -1253,11 +1302,12 @@  discard block
 block discarded – undo
1253 1302
 	$context['filename'] = $_REQUEST['package'];
1254 1303
 
1255 1304
 	// Let the unpacker do the work.
1256
-	if (is_file($packagesdir . '/' . $context['filename']))
1257
-		$context['files'] = read_tgz_file($packagesdir . '/' . $context['filename'], null);
1258
-	elseif (is_dir($packagesdir . '/' . $context['filename']))
1259
-		$context['files'] = listtree($packagesdir . '/' . $context['filename']);
1260
-}
1305
+	if (is_file($packagesdir . '/' . $context['filename'])) {
1306
+			$context['files'] = read_tgz_file($packagesdir . '/' . $context['filename'], null);
1307
+	} elseif (is_dir($packagesdir . '/' . $context['filename'])) {
1308
+			$context['files'] = listtree($packagesdir . '/' . $context['filename']);
1309
+	}
1310
+	}
1261 1311
 
1262 1312
 /**
1263 1313
  * Display one of the files in a package.
@@ -1269,22 +1319,25 @@  discard block
 block discarded – undo
1269 1319
 	require_once($sourcedir . '/Subs-Package.php');
1270 1320
 
1271 1321
 	// No package?  Show him or her the door.
1272
-	if (!isset($_REQUEST['package']) || $_REQUEST['package'] == '')
1273
-		redirectexit('action=admin;area=packages');
1322
+	if (!isset($_REQUEST['package']) || $_REQUEST['package'] == '') {
1323
+			redirectexit('action=admin;area=packages');
1324
+	}
1274 1325
 
1275 1326
 	// No file?  Show him or her the door.
1276
-	if (!isset($_REQUEST['file']) || $_REQUEST['file'] == '')
1277
-		redirectexit('action=admin;area=packages');
1327
+	if (!isset($_REQUEST['file']) || $_REQUEST['file'] == '') {
1328
+			redirectexit('action=admin;area=packages');
1329
+	}
1278 1330
 
1279 1331
 	$_REQUEST['package'] = preg_replace('~[\.]+~', '.', strtr($_REQUEST['package'], array('/' => '_', '\\' => '_')));
1280 1332
 	$_REQUEST['file'] = preg_replace('~[\.]+~', '.', $_REQUEST['file']);
1281 1333
 
1282 1334
 	if (isset($_REQUEST['raw']))
1283 1335
 	{
1284
-		if (is_file($packagesdir . '/' . $_REQUEST['package']))
1285
-			echo read_tgz_file($packagesdir . '/' . $_REQUEST['package'], $_REQUEST['file'], true);
1286
-		elseif (is_dir($packagesdir . '/' . $_REQUEST['package']))
1287
-			echo file_get_contents($packagesdir . '/' . $_REQUEST['package'] . '/' . $_REQUEST['file']);
1336
+		if (is_file($packagesdir . '/' . $_REQUEST['package'])) {
1337
+					echo read_tgz_file($packagesdir . '/' . $_REQUEST['package'], $_REQUEST['file'], true);
1338
+		} elseif (is_dir($packagesdir . '/' . $_REQUEST['package'])) {
1339
+					echo file_get_contents($packagesdir . '/' . $_REQUEST['package'] . '/' . $_REQUEST['file']);
1340
+		}
1288 1341
 
1289 1342
 		obExit(false);
1290 1343
 	}
@@ -1301,17 +1354,19 @@  discard block
 block discarded – undo
1301 1354
 	$context['filename'] = $_REQUEST['file'];
1302 1355
 
1303 1356
 	// Let the unpacker do the work.... but make sure we handle images properly.
1304
-	if (in_array(strtolower(strrchr($_REQUEST['file'], '.')), array('.bmp', '.gif', '.jpeg', '.jpg', '.png')))
1305
-		$context['filedata'] = '<img src="' . $scripturl . '?action=admin;area=packages;sa=examine;package=' . $_REQUEST['package'] . ';file=' . $_REQUEST['file'] . ';raw" alt="' . $_REQUEST['file'] . '">';
1306
-	else
1357
+	if (in_array(strtolower(strrchr($_REQUEST['file'], '.')), array('.bmp', '.gif', '.jpeg', '.jpg', '.png'))) {
1358
+			$context['filedata'] = '<img src="' . $scripturl . '?action=admin;area=packages;sa=examine;package=' . $_REQUEST['package'] . ';file=' . $_REQUEST['file'] . ';raw" alt="' . $_REQUEST['file'] . '">';
1359
+	} else
1307 1360
 	{
1308
-		if (is_file($packagesdir . '/' . $_REQUEST['package']))
1309
-			$context['filedata'] = $smcFunc['htmlspecialchars'](read_tgz_file($packagesdir . '/' . $_REQUEST['package'], $_REQUEST['file'], true));
1310
-		elseif (is_dir($packagesdir . '/' . $_REQUEST['package']))
1311
-			$context['filedata'] = $smcFunc['htmlspecialchars'](file_get_contents($packagesdir . '/' . $_REQUEST['package'] . '/' . $_REQUEST['file']));
1361
+		if (is_file($packagesdir . '/' . $_REQUEST['package'])) {
1362
+					$context['filedata'] = $smcFunc['htmlspecialchars'](read_tgz_file($packagesdir . '/' . $_REQUEST['package'], $_REQUEST['file'], true));
1363
+		} elseif (is_dir($packagesdir . '/' . $_REQUEST['package'])) {
1364
+					$context['filedata'] = $smcFunc['htmlspecialchars'](file_get_contents($packagesdir . '/' . $_REQUEST['package'] . '/' . $_REQUEST['file']));
1365
+		}
1312 1366
 
1313
-		if (strtolower(strrchr($_REQUEST['file'], '.')) == '.php')
1314
-			$context['filedata'] = highlight_php_code($context['filedata']);
1367
+		if (strtolower(strrchr($_REQUEST['file'], '.')) == '.php') {
1368
+					$context['filedata'] = highlight_php_code($context['filedata']);
1369
+		}
1315 1370
 	}
1316 1371
 }
1317 1372
 
@@ -1326,8 +1381,9 @@  discard block
 block discarded – undo
1326 1381
 	checkSession('get');
1327 1382
 
1328 1383
 	// Ack, don't allow deletion of arbitrary files here, could become a security hole somehow!
1329
-	if (!isset($_GET['package']) || $_GET['package'] == 'index.php' || $_GET['package'] == 'backups')
1330
-		redirectexit('action=admin;area=packages;sa=browse');
1384
+	if (!isset($_GET['package']) || $_GET['package'] == 'index.php' || $_GET['package'] == 'backups') {
1385
+			redirectexit('action=admin;area=packages;sa=browse');
1386
+	}
1331 1387
 	$_GET['package'] = preg_replace('~[\.]+~', '.', strtr($_GET['package'], array('/' => '_', '\\' => '_')));
1332 1388
 
1333 1389
 	// Can't delete what's not there.
@@ -1335,9 +1391,9 @@  discard block
 block discarded – undo
1335 1391
 	{
1336 1392
 		create_chmod_control(array($packagesdir . '/' . $_GET['package']), array('destination_url' => $scripturl . '?action=admin;area=packages;sa=remove;package=' . $_GET['package'], 'crash_on_error' => true));
1337 1393
 
1338
-		if (is_dir($packagesdir . '/' . $_GET['package']))
1339
-			deltree($packagesdir . '/' . $_GET['package']);
1340
-		else
1394
+		if (is_dir($packagesdir . '/' . $_GET['package'])) {
1395
+					deltree($packagesdir . '/' . $_GET['package']);
1396
+		} else
1341 1397
 		{
1342 1398
 			smf_chmod($packagesdir . '/' . $_GET['package'], 0777);
1343 1399
 			unlink($packagesdir . '/' . $_GET['package']);
@@ -1385,8 +1441,9 @@  discard block
 block discarded – undo
1385 1441
 					'data' => array(
1386 1442
 						'function' => function ($package_md5) use ($type, &$context)
1387 1443
 						{
1388
-							if (isset($context['available_' . $type . ''][$package_md5]))
1389
-								return $context['available_' . $type . ''][$package_md5]['sort_id'];
1444
+							if (isset($context['available_' . $type . ''][$package_md5])) {
1445
+															return $context['available_' . $type . ''][$package_md5]['sort_id'];
1446
+							}
1390 1447
 						},
1391 1448
 					),
1392 1449
 					'sort' => array(
@@ -1402,8 +1459,9 @@  discard block
 block discarded – undo
1402 1459
 					'data' => array(
1403 1460
 						'function' => function ($package_md5) use ($type, &$context)
1404 1461
 						{
1405
-							if (isset($context['available_' . $type . ''][$package_md5]))
1406
-								return $context['available_' . $type . ''][$package_md5]['name'];
1462
+							if (isset($context['available_' . $type . ''][$package_md5])) {
1463
+															return $context['available_' . $type . ''][$package_md5]['name'];
1464
+							}
1407 1465
 						},
1408 1466
 					),
1409 1467
 					'sort' => array(
@@ -1418,8 +1476,9 @@  discard block
 block discarded – undo
1418 1476
 					'data' => array(
1419 1477
 						'function' => function ($package_md5) use ($type, &$context)
1420 1478
 						{
1421
-							if (isset($context['available_' . $type . ''][$package_md5]))
1422
-								return $context['available_' . $type . ''][$package_md5]['version'];
1479
+							if (isset($context['available_' . $type . ''][$package_md5])) {
1480
+															return $context['available_' . $type . ''][$package_md5]['version'];
1481
+							}
1423 1482
 						},
1424 1483
 					),
1425 1484
 					'sort' => array(
@@ -1434,8 +1493,9 @@  discard block
 block discarded – undo
1434 1493
 					'data' => array(
1435 1494
 						'function' => function ($package_md5) use ($type, $txt, &$context)
1436 1495
 						{
1437
-							if (isset($context['available_' . $type . ''][$package_md5]))
1438
-								return !empty($context['available_' . $type . ''][$package_md5]['time_installed']) ? timeformat($context['available_' . $type . ''][$package_md5]['time_installed']) : $txt['not_applicable'];
1496
+							if (isset($context['available_' . $type . ''][$package_md5])) {
1497
+															return !empty($context['available_' . $type . ''][$package_md5]['time_installed']) ? timeformat($context['available_' . $type . ''][$package_md5]['time_installed']) : $txt['not_applicable'];
1498
+							}
1439 1499
 						},
1440 1500
 						'class' => 'smalltext',
1441 1501
 					),
@@ -1451,28 +1511,30 @@  discard block
 block discarded – undo
1451 1511
 					'data' => array(
1452 1512
 						'function' => function ($package_md5) use ($type, &$context, $scripturl, $txt)
1453 1513
 						{
1454
-							if (!isset($context['available_' . $type . ''][$package_md5]))
1455
-								return '';
1514
+							if (!isset($context['available_' . $type . ''][$package_md5])) {
1515
+															return '';
1516
+							}
1456 1517
 
1457 1518
 							// Rewrite shortcut
1458 1519
 							$package = $context['available_' . $type . ''][$package_md5];
1459 1520
 							$return = '';
1460 1521
 
1461
-							if ($package['can_uninstall'])
1462
-								$return = '
1522
+							if ($package['can_uninstall']) {
1523
+															$return = '
1463 1524
 									<a href="' . $scripturl . '?action=admin;area=packages;sa=uninstall;package=' . $package['filename'] . ';pid=' . $package['installed_id'] . '" class="button">' . $txt['uninstall'] . '</a>';
1464
-							elseif ($package['can_emulate_uninstall'])
1465
-								$return = '
1525
+							} elseif ($package['can_emulate_uninstall']) {
1526
+															$return = '
1466 1527
 									<a href="' . $scripturl . '?action=admin;area=packages;sa=uninstall;ve=' . $package['can_emulate_uninstall'] . ';package=' . $package['filename'] . ';pid=' . $package['installed_id'] . '" class="button">' . $txt['package_emulate_uninstall'] . ' ' . $package['can_emulate_uninstall'] . '</a>';
1467
-							elseif ($package['can_upgrade'])
1468
-								$return = '
1528
+							} elseif ($package['can_upgrade']) {
1529
+															$return = '
1469 1530
 									<a href="' . $scripturl . '?action=admin;area=packages;sa=install;package=' . $package['filename'] . '" class="button">' . $txt['package_upgrade'] . '</a>';
1470
-							elseif ($package['can_install'])
1471
-								$return = '
1531
+							} elseif ($package['can_install']) {
1532
+															$return = '
1472 1533
 									<a href="' . $scripturl . '?action=admin;area=packages;sa=install;package=' . $package['filename'] . '" class="button">' . $txt['install_mod'] . '</a>';
1473
-							elseif ($package['can_emulate_install'])
1474
-								$return = '
1534
+							} elseif ($package['can_emulate_install']) {
1535
+															$return = '
1475 1536
 									<a href="' . $scripturl . '?action=admin;area=packages;sa=install;ve=' . $package['can_emulate_install'] . ';package=' . $package['filename'] . '" class="button">' . $txt['package_emulate_install'] . ' ' . $package['can_emulate_install'] . '</a>';
1537
+							}
1476 1538
 
1477 1539
 							return $return . '
1478 1540
 									<a href="' . $scripturl . '?action=admin;area=packages;sa=list;package=' . $package['filename'] . '" class="button">' . $txt['list_files'] . '</a>
@@ -1537,12 +1599,14 @@  discard block
 block discarded – undo
1537 1599
 	static $packages, $installed_mods;
1538 1600
 
1539 1601
 	// Start things up
1540
-	if (!isset($packages[$params]))
1541
-		$packages[$params] = array();
1602
+	if (!isset($packages[$params])) {
1603
+			$packages[$params] = array();
1604
+	}
1542 1605
 
1543 1606
 	// We need the packages directory to be writable for this.
1544
-	if (!@is_writable($packagesdir))
1545
-		create_chmod_control(array($packagesdir), array('destination_url' => $scripturl . '?action=admin;area=packages', 'crash_on_error' => true));
1607
+	if (!@is_writable($packagesdir)) {
1608
+			create_chmod_control(array($packagesdir), array('destination_url' => $scripturl . '?action=admin;area=packages', 'crash_on_error' => true));
1609
+	}
1546 1610
 
1547 1611
 	$the_version = strtr($forum_version, array('SMF ' => ''));
1548 1612
 
@@ -1550,41 +1614,44 @@  discard block
 block discarded – undo
1550 1614
 	if (isset($_GET['version_emulate']) && strtr($_GET['version_emulate'], array('SMF ' => '')) == $the_version)
1551 1615
 	{
1552 1616
 		unset($_SESSION['version_emulate']);
1553
-	}
1554
-	elseif (isset($_GET['version_emulate']))
1617
+	} elseif (isset($_GET['version_emulate']))
1555 1618
 	{
1556
-		if (($_GET['version_emulate'] === 0 || $_GET['version_emulate'] === $forum_version) && isset($_SESSION['version_emulate']))
1557
-			unset($_SESSION['version_emulate']);
1558
-		elseif ($_GET['version_emulate'] !== 0)
1559
-			$_SESSION['version_emulate'] = strtr($_GET['version_emulate'], array('-' => ' ', '+' => ' ', 'SMF ' => ''));
1619
+		if (($_GET['version_emulate'] === 0 || $_GET['version_emulate'] === $forum_version) && isset($_SESSION['version_emulate'])) {
1620
+					unset($_SESSION['version_emulate']);
1621
+		} elseif ($_GET['version_emulate'] !== 0) {
1622
+					$_SESSION['version_emulate'] = strtr($_GET['version_emulate'], array('-' => ' ', '+' => ' ', 'SMF ' => ''));
1623
+		}
1560 1624
 	}
1561 1625
 	if (!empty($_SESSION['version_emulate']))
1562 1626
 	{
1563 1627
 		$context['forum_version'] = 'SMF ' . $_SESSION['version_emulate'];
1564 1628
 		$the_version = $_SESSION['version_emulate'];
1565 1629
 	}
1566
-	if (isset($_SESSION['single_version_emulate']))
1567
-		unset($_SESSION['single_version_emulate']);
1630
+	if (isset($_SESSION['single_version_emulate'])) {
1631
+			unset($_SESSION['single_version_emulate']);
1632
+	}
1568 1633
 
1569 1634
 	if (empty($installed_mods))
1570 1635
 	{
1571 1636
 		$instmods = loadInstalledPackages();
1572 1637
 		$installed_mods = array();
1573 1638
 		// Look through the list of installed mods...
1574
-		foreach ($instmods as $installed_mod)
1575
-			$installed_mods[$installed_mod['package_id']] = array(
1639
+		foreach ($instmods as $installed_mod) {
1640
+					$installed_mods[$installed_mod['package_id']] = array(
1576 1641
 				'id' => $installed_mod['id'],
1577 1642
 				'version' => $installed_mod['version'],
1578 1643
 				'time_installed' => $installed_mod['time_installed'],
1579 1644
 			);
1645
+		}
1580 1646
 
1581 1647
 		// Get a list of all the ids installed, so the latest packages won't include already installed ones.
1582 1648
 		$context['installed_mods'] = array_keys($installed_mods);
1583 1649
 	}
1584 1650
 
1585
-	if (empty($packages))
1586
-		foreach ($context['modification_types'] as $type)
1651
+	if (empty($packages)) {
1652
+			foreach ($context['modification_types'] as $type)
1587 1653
 			$packages[$type] = array();
1654
+	}
1588 1655
 
1589 1656
 	if ($dir = @opendir($packagesdir))
1590 1657
 	{
@@ -1600,50 +1667,56 @@  discard block
 block discarded – undo
1600 1667
 
1601 1668
 		while ($package = readdir($dir))
1602 1669
 		{
1603
-			if ($package == '.' || $package == '..' || $package == 'temp' || (!(is_dir($packagesdir . '/' . $package) && file_exists($packagesdir . '/' . $package . '/package-info.xml')) && substr(strtolower($package), -7) != '.tar.gz' && substr(strtolower($package), -4) != '.tgz' && substr(strtolower($package), -4) != '.zip'))
1604
-				continue;
1670
+			if ($package == '.' || $package == '..' || $package == 'temp' || (!(is_dir($packagesdir . '/' . $package) && file_exists($packagesdir . '/' . $package . '/package-info.xml')) && substr(strtolower($package), -7) != '.tar.gz' && substr(strtolower($package), -4) != '.tgz' && substr(strtolower($package), -4) != '.zip')) {
1671
+							continue;
1672
+			}
1605 1673
 
1606 1674
 			$skip = false;
1607
-			foreach ($context['modification_types'] as $type)
1608
-				if (isset($context['available_' . $type][md5($package)]))
1675
+			foreach ($context['modification_types'] as $type) {
1676
+							if (isset($context['available_' . $type][md5($package)]))
1609 1677
 					$skip = true;
1678
+			}
1610 1679
 
1611
-			if ($skip)
1612
-				continue;
1680
+			if ($skip) {
1681
+							continue;
1682
+			}
1613 1683
 
1614 1684
 			// Skip directories or files that are named the same.
1615 1685
 			if (is_dir($packagesdir . '/' . $package))
1616 1686
 			{
1617
-				if (in_array($package, $dirs))
1618
-					continue;
1687
+				if (in_array($package, $dirs)) {
1688
+									continue;
1689
+				}
1619 1690
 				$dirs[] = $package;
1620
-			}
1621
-			elseif (substr(strtolower($package), -7) == '.tar.gz')
1691
+			} elseif (substr(strtolower($package), -7) == '.tar.gz')
1622 1692
 			{
1623
-				if (in_array(substr($package, 0, -7), $dirs))
1624
-					continue;
1693
+				if (in_array(substr($package, 0, -7), $dirs)) {
1694
+									continue;
1695
+				}
1625 1696
 				$dirs[] = substr($package, 0, -7);
1626
-			}
1627
-			elseif (substr(strtolower($package), -4) == '.zip' || substr(strtolower($package), -4) == '.tgz')
1697
+			} elseif (substr(strtolower($package), -4) == '.zip' || substr(strtolower($package), -4) == '.tgz')
1628 1698
 			{
1629
-				if (in_array(substr($package, 0, -4), $dirs))
1630
-					continue;
1699
+				if (in_array(substr($package, 0, -4), $dirs)) {
1700
+									continue;
1701
+				}
1631 1702
 				$dirs[] = substr($package, 0, -4);
1632 1703
 			}
1633 1704
 
1634 1705
 			$packageInfo = getPackageInfo($package);
1635
-			if (!is_array($packageInfo))
1636
-				continue;
1706
+			if (!is_array($packageInfo)) {
1707
+							continue;
1708
+			}
1637 1709
 
1638 1710
 			if (!empty($packageInfo))
1639 1711
 			{
1640 1712
 				$packageInfo['installed_id'] = isset($installed_mods[$packageInfo['id']]) ? $installed_mods[$packageInfo['id']]['id'] : 0;
1641 1713
 				$packageInfo['time_installed'] = isset($installed_mods[$packageInfo['id']]) ? $installed_mods[$packageInfo['id']]['time_installed'] : 0;
1642 1714
 
1643
-				if (!isset($sort_id[$packageInfo['type']]))
1644
-					$packageInfo['sort_id'] = $sort_id['unknown'];
1645
-				else
1646
-					$packageInfo['sort_id'] = $sort_id[$packageInfo['type']];
1715
+				if (!isset($sort_id[$packageInfo['type']])) {
1716
+									$packageInfo['sort_id'] = $sort_id['unknown'];
1717
+				} else {
1718
+									$packageInfo['sort_id'] = $sort_id[$packageInfo['type']];
1719
+				}
1647 1720
 
1648 1721
 				$packageInfo['is_installed'] = isset($installed_mods[$packageInfo['id']]);
1649 1722
 				$packageInfo['is_current'] = $packageInfo['is_installed'] && ($installed_mods[$packageInfo['id']]['version'] == $packageInfo['version']);
@@ -1692,10 +1765,11 @@  discard block
 block discarded – undo
1692 1765
 					foreach ($upgrades as $upgrade)
1693 1766
 					{
1694 1767
 						// Even if it is for this SMF, is it for the installed version of the mod?
1695
-						if (!$upgrade->exists('@for') || matchPackageVersion($the_version, $upgrade->fetch('@for')))
1696
-							if (!$upgrade->exists('@from') || matchPackageVersion($installed_mods[$packageInfo['id']]['version'], $upgrade->fetch('@from')))
1768
+						if (!$upgrade->exists('@for') || matchPackageVersion($the_version, $upgrade->fetch('@for'))) {
1769
+													if (!$upgrade->exists('@from') || matchPackageVersion($installed_mods[$packageInfo['id']]['version'], $upgrade->fetch('@from')))
1697 1770
 							{
1698 1771
 								$packageInfo['can_upgrade'] = true;
1772
+						}
1699 1773
 								break;
1700 1774
 							}
1701 1775
 					}
@@ -1772,10 +1846,11 @@  discard block
 block discarded – undo
1772 1846
 
1773 1847
 	if (isset($_GET['type']) && $_GET['type'] == $params)
1774 1848
 	{
1775
-		if (isset($_GET['desc']))
1776
-			krsort($packages[$params]);
1777
-		else
1778
-			ksort($packages[$params]);
1849
+		if (isset($_GET['desc'])) {
1850
+					krsort($packages[$params]);
1851
+		} else {
1852
+					ksort($packages[$params]);
1853
+		}
1779 1854
 	}
1780 1855
 
1781 1856
 	return $packages[$params];
@@ -1804,10 +1879,11 @@  discard block
 block discarded – undo
1804 1879
 		redirectexit('action=admin;area=packages;sa=options');
1805 1880
 	}
1806 1881
 
1807
-	if (preg_match('~^/home\d*/([^/]+?)/public_html~', $_SERVER['DOCUMENT_ROOT'], $match))
1808
-		$default_username = $match[1];
1809
-	else
1810
-		$default_username = '';
1882
+	if (preg_match('~^/home\d*/([^/]+?)/public_html~', $_SERVER['DOCUMENT_ROOT'], $match)) {
1883
+			$default_username = $match[1];
1884
+	} else {
1885
+			$default_username = '';
1886
+	}
1811 1887
 
1812 1888
 	$context['page_title'] = $txt['package_settings'];
1813 1889
 	$context['sub_template'] = 'install_options';
@@ -1836,8 +1912,9 @@  discard block
 block discarded – undo
1836 1912
 	isAllowedTo('admin_forum');
1837 1913
 
1838 1914
 	// We need to know the operation key for the search and replace, mod file looking at, is it a board mod?
1839
-	if (!isset($_REQUEST['operation_key'], $_REQUEST['filename']) && !is_numeric($_REQUEST['operation_key']))
1840
-		fatal_lang_error('operation_invalid', 'general');
1915
+	if (!isset($_REQUEST['operation_key'], $_REQUEST['filename']) && !is_numeric($_REQUEST['operation_key'])) {
1916
+			fatal_lang_error('operation_invalid', 'general');
1917
+	}
1841 1918
 
1842 1919
 	// Load the required file.
1843 1920
 	require_once($sourcedir . '/Subs-Package.php');
@@ -1853,18 +1930,19 @@  discard block
 block discarded – undo
1853 1930
 	{
1854 1931
 		$context['extracted_files'] = read_tgz_file($packagesdir . '/' . $context['filename'], $packagesdir . '/temp');
1855 1932
 
1856
-		if ($context['extracted_files'] && !file_exists($packagesdir . '/temp/package-info.xml'))
1857
-			foreach ($context['extracted_files'] as $file)
1933
+		if ($context['extracted_files'] && !file_exists($packagesdir . '/temp/package-info.xml')) {
1934
+					foreach ($context['extracted_files'] as $file)
1858 1935
 				if (basename($file['filename']) == 'package-info.xml')
1859 1936
 				{
1860 1937
 					$context['base_path'] = dirname($file['filename']) . '/';
1938
+		}
1861 1939
 					break;
1862 1940
 				}
1863 1941
 
1864
-		if (!isset($context['base_path']))
1865
-			$context['base_path'] = '';
1866
-	}
1867
-	elseif (is_dir($packagesdir . '/' . $context['filename']))
1942
+		if (!isset($context['base_path'])) {
1943
+					$context['base_path'] = '';
1944
+		}
1945
+	} elseif (is_dir($packagesdir . '/' . $context['filename']))
1868 1946
 	{
1869 1947
 		copytree($packagesdir . '/' . $context['filename'], $packagesdir . '/temp');
1870 1948
 		$context['extracted_files'] = listtree($packagesdir . '/temp');
@@ -1885,8 +1963,9 @@  discard block
 block discarded – undo
1885 1963
 		)
1886 1964
 	);
1887 1965
 	$theme_paths = array();
1888
-	while ($row = $smcFunc['db_fetch_assoc']($request))
1889
-		$theme_paths[$row['id_theme']][$row['variable']] = $row['value'];
1966
+	while ($row = $smcFunc['db_fetch_assoc']($request)) {
1967
+			$theme_paths[$row['id_theme']][$row['variable']] = $row['value'];
1968
+	}
1890 1969
 	$smcFunc['db_free_result']($request);
1891 1970
 
1892 1971
 	// If we're viewing uninstall operations, only consider themes that
@@ -1911,19 +1990,21 @@  discard block
 block discarded – undo
1911 1990
 				list ($old_themes) = $smcFunc['db_fetch_row']($request);
1912 1991
 				$old_themes = explode(',', $old_themes);
1913 1992
 
1914
-				foreach ($theme_paths as $id => $data)
1915
-					if ($id != 1 && !in_array($id, $old_themes))
1993
+				foreach ($theme_paths as $id => $data) {
1994
+									if ($id != 1 && !in_array($id, $old_themes))
1916 1995
 						unset($theme_paths[$id]);
1996
+				}
1917 1997
 			}
1918 1998
 			$smcFunc['db_free_result']($request);
1919 1999
 		}
1920 2000
 	}
1921 2001
 
1922 2002
 	// Boardmod?
1923
-	if (isset($_REQUEST['boardmod']))
1924
-		$mod_actions = parseBoardMod(@file_get_contents($packagesdir . '/temp/' . $context['base_path'] . $_REQUEST['filename']), true, $reverse, $theme_paths);
1925
-	else
1926
-		$mod_actions = parseModification(@file_get_contents($packagesdir . '/temp/' . $context['base_path'] . $_REQUEST['filename']), true, $reverse, $theme_paths);
2003
+	if (isset($_REQUEST['boardmod'])) {
2004
+			$mod_actions = parseBoardMod(@file_get_contents($packagesdir . '/temp/' . $context['base_path'] . $_REQUEST['filename']), true, $reverse, $theme_paths);
2005
+	} else {
2006
+			$mod_actions = parseModification(@file_get_contents($packagesdir . '/temp/' . $context['base_path'] . $_REQUEST['filename']), true, $reverse, $theme_paths);
2007
+	}
1927 2008
 
1928 2009
 	// Ok lets get the content of the file.
1929 2010
 	$context['operations'] = array(
@@ -1979,9 +2060,9 @@  discard block
 block discarded – undo
1979 2060
 			'path' => $detect_path,
1980 2061
 			'form_elements_only' => true,
1981 2062
 		);
2063
+	} else {
2064
+			$context['ftp_connected'] = true;
1982 2065
 	}
1983
-	else
1984
-		$context['ftp_connected'] = true;
1985 2066
 
1986 2067
 	// Define the template.
1987 2068
 	$context['page_title'] = $txt['package_file_perms'];
@@ -2094,18 +2175,19 @@  discard block
 block discarded – undo
2094 2175
 	{
2095 2176
 		unset($context['file_tree'][strtr($boarddir, array('\\' => '/'))]['contents']['attachments']);
2096 2177
 
2097
-		if (!is_array($modSettings['attachmentUploadDir']))
2098
-			$modSettings['attachmentUploadDir'] = smf_json_decode($modSettings['attachmentUploadDir'], true);
2178
+		if (!is_array($modSettings['attachmentUploadDir'])) {
2179
+					$modSettings['attachmentUploadDir'] = smf_json_decode($modSettings['attachmentUploadDir'], true);
2180
+		}
2099 2181
 
2100 2182
 		// @todo Should we suggest non-current directories be read only?
2101
-		foreach ($modSettings['attachmentUploadDir'] as $dir)
2102
-			$context['file_tree'][strtr($dir, array('\\' => '/'))] = array(
2183
+		foreach ($modSettings['attachmentUploadDir'] as $dir) {
2184
+					$context['file_tree'][strtr($dir, array('\\' => '/'))] = array(
2103 2185
 			'type' => 'dir',
2104 2186
 			'writable_on' => 'restrictive',
2105 2187
 		);
2188
+		}
2106 2189
 
2107
-	}
2108
-	elseif (substr($modSettings['attachmentUploadDir'], 0, strlen($boarddir)) != $boarddir)
2190
+	} elseif (substr($modSettings['attachmentUploadDir'], 0, strlen($boarddir)) != $boarddir)
2109 2191
 	{
2110 2192
 		unset($context['file_tree'][strtr($boarddir, array('\\' => '/'))]['contents']['attachments']);
2111 2193
 		$context['file_tree'][strtr($modSettings['attachmentUploadDir'], array('\\' => '/'))] = array(
@@ -2155,8 +2237,8 @@  discard block
 block discarded – undo
2155 2237
 	);
2156 2238
 	while ($row = $smcFunc['db_fetch_assoc']($request))
2157 2239
 	{
2158
-		if (substr(strtolower(strtr($row['value'], array('\\' => '/'))), 0, strlen($boarddir) + 7) == strtolower(strtr($boarddir, array('\\' => '/')) . '/Themes'))
2159
-			$context['file_tree'][strtr($boarddir, array('\\' => '/'))]['contents']['Themes']['contents'][substr($row['value'], strlen($boarddir) + 8)] = array(
2240
+		if (substr(strtolower(strtr($row['value'], array('\\' => '/'))), 0, strlen($boarddir) + 7) == strtolower(strtr($boarddir, array('\\' => '/')) . '/Themes')) {
2241
+					$context['file_tree'][strtr($boarddir, array('\\' => '/'))]['contents']['Themes']['contents'][substr($row['value'], strlen($boarddir) + 8)] = array(
2160 2242
 				'type' => 'dir_recursive',
2161 2243
 				'list_contents' => true,
2162 2244
 				'contents' => array(
@@ -2166,7 +2248,7 @@  discard block
 block discarded – undo
2166 2248
 					),
2167 2249
 				),
2168 2250
 			);
2169
-		else
2251
+		} else
2170 2252
 		{
2171 2253
 			$context['file_tree'][strtr($row['value'], array('\\' => '/'))] = array(
2172 2254
 				'type' => 'dir_recursive',
@@ -2183,28 +2265,33 @@  discard block
 block discarded – undo
2183 2265
 	$smcFunc['db_free_result']($request);
2184 2266
 
2185 2267
 	// If we're submitting then let's move on to another function to keep things cleaner..
2186
-	if (isset($_POST['action_changes']))
2187
-		return PackagePermissionsAction();
2268
+	if (isset($_POST['action_changes'])) {
2269
+			return PackagePermissionsAction();
2270
+	}
2188 2271
 
2189 2272
 	$context['look_for'] = array();
2190 2273
 	// Are we looking for a particular tree - normally an expansion?
2191
-	if (!empty($_REQUEST['find']))
2192
-		$context['look_for'][] = base64_decode($_REQUEST['find']);
2274
+	if (!empty($_REQUEST['find'])) {
2275
+			$context['look_for'][] = base64_decode($_REQUEST['find']);
2276
+	}
2193 2277
 	// Only that tree?
2194 2278
 	$context['only_find'] = isset($_GET['xml']) && !empty($_REQUEST['onlyfind']) ? $_REQUEST['onlyfind'] : '';
2195
-	if ($context['only_find'])
2196
-		$context['look_for'][] = $context['only_find'];
2279
+	if ($context['only_find']) {
2280
+			$context['look_for'][] = $context['only_find'];
2281
+	}
2197 2282
 
2198 2283
 	// Have we got a load of back-catalogue trees to expand from a submit etc?
2199 2284
 	if (!empty($_GET['back_look']))
2200 2285
 	{
2201 2286
 		$potententialTrees = smf_json_decode(base64_decode($_GET['back_look']), true);
2202
-		foreach ($potententialTrees as $tree)
2203
-			$context['look_for'][] = $tree;
2287
+		foreach ($potententialTrees as $tree) {
2288
+					$context['look_for'][] = $tree;
2289
+		}
2204 2290
 	}
2205 2291
 	// ... maybe posted?
2206
-	if (!empty($_POST['back_look']))
2207
-		$context['only_find'] = array_merge($context['only_find'], $_POST['back_look']);
2292
+	if (!empty($_POST['back_look'])) {
2293
+			$context['only_find'] = array_merge($context['only_find'], $_POST['back_look']);
2294
+	}
2208 2295
 
2209 2296
 	$context['back_look_data'] = base64_encode(json_encode(array_slice($context['look_for'], 0, 15)));
2210 2297
 
@@ -2243,9 +2330,9 @@  discard block
 block discarded – undo
2243 2330
 				'chmod' => @is_writable($path),
2244 2331
 				'perms' => @fileperms($path),
2245 2332
 			);
2333
+		} else {
2334
+					unset($context['file_tree'][$path]);
2246 2335
 		}
2247
-		else
2248
-			unset($context['file_tree'][$path]);
2249 2336
 	}
2250 2337
 
2251 2338
 	// Is this actually xml?
@@ -2269,22 +2356,25 @@  discard block
 block discarded – undo
2269 2356
 	global $context;
2270 2357
 
2271 2358
 	$isLikelyPath = false;
2272
-	foreach ($context['look_for'] as $possiblePath)
2273
-		if (substr($possiblePath, 0, strlen($path)) == $path)
2359
+	foreach ($context['look_for'] as $possiblePath) {
2360
+			if (substr($possiblePath, 0, strlen($path)) == $path)
2274 2361
 			$isLikelyPath = true;
2362
+	}
2275 2363
 
2276 2364
 	// Is this where we stop?
2277
-	if (isset($_GET['xml']) && !empty($context['look_for']) && !$isLikelyPath)
2278
-		return;
2279
-	elseif ($level > $context['default_level'] && !$isLikelyPath)
2280
-		return;
2365
+	if (isset($_GET['xml']) && !empty($context['look_for']) && !$isLikelyPath) {
2366
+			return;
2367
+	} elseif ($level > $context['default_level'] && !$isLikelyPath) {
2368
+			return;
2369
+	}
2281 2370
 
2282 2371
 	// Are we actually interested in saving this data?
2283 2372
 	$save_data = empty($context['only_find']) || $context['only_find'] == $path;
2284 2373
 
2285 2374
 	// @todo Shouldn't happen - but better error message?
2286
-	if (!is_dir($path))
2287
-		fatal_lang_error('no_access', false);
2375
+	if (!is_dir($path)) {
2376
+			fatal_lang_error('no_access', false);
2377
+	}
2288 2378
 
2289 2379
 	// This is where we put stuff we've found for sorting.
2290 2380
 	$foundData = array(
@@ -2299,11 +2389,13 @@  discard block
 block discarded – undo
2299 2389
 		if (is_file($path . '/' . $entry))
2300 2390
 		{
2301 2391
 			// Are we listing PHP files in this directory?
2302
-			if ($save_data && !empty($data['list_contents']) && substr($entry, -4) == '.php')
2303
-				$foundData['files'][$entry] = true;
2392
+			if ($save_data && !empty($data['list_contents']) && substr($entry, -4) == '.php') {
2393
+							$foundData['files'][$entry] = true;
2394
+			}
2304 2395
 			// A file we were looking for.
2305
-			elseif ($save_data && isset($data['contents'][$entry]))
2306
-				$foundData['files'][$entry] = true;
2396
+			elseif ($save_data && isset($data['contents'][$entry])) {
2397
+							$foundData['files'][$entry] = true;
2398
+			}
2307 2399
 		}
2308 2400
 		// It's a directory - we're interested one way or another, probably...
2309 2401
 		elseif ($entry != '.' && $entry != '..')
@@ -2311,32 +2403,36 @@  discard block
 block discarded – undo
2311 2403
 			// Going further?
2312 2404
 			if ((!empty($data['type']) && $data['type'] == 'dir_recursive') || (isset($data['contents'][$entry]) && (!empty($data['contents'][$entry]['list_contents']) || (!empty($data['contents'][$entry]['type']) && $data['contents'][$entry]['type'] == 'dir_recursive'))))
2313 2405
 			{
2314
-				if (!isset($data['contents'][$entry]))
2315
-					$foundData['folders'][$entry] = 'dir_recursive';
2316
-				else
2317
-					$foundData['folders'][$entry] = true;
2406
+				if (!isset($data['contents'][$entry])) {
2407
+									$foundData['folders'][$entry] = 'dir_recursive';
2408
+				} else {
2409
+									$foundData['folders'][$entry] = true;
2410
+				}
2318 2411
 
2319 2412
 				// If this wasn't expected inherit the recusiveness...
2320
-				if (!isset($data['contents'][$entry]))
2321
-					// We need to do this as we will be going all recursive.
2413
+				if (!isset($data['contents'][$entry])) {
2414
+									// We need to do this as we will be going all recursive.
2322 2415
 					$data['contents'][$entry] = array(
2323 2416
 						'type' => 'dir_recursive',
2324 2417
 					);
2418
+				}
2325 2419
 
2326 2420
 				// Actually do the recursive stuff...
2327 2421
 				fetchPerms__recursive($path . '/' . $entry, $data['contents'][$entry], $level + 1);
2328 2422
 			}
2329 2423
 			// Maybe it is a folder we are not descending into.
2330
-			elseif (isset($data['contents'][$entry]))
2331
-				$foundData['folders'][$entry] = true;
2424
+			elseif (isset($data['contents'][$entry])) {
2425
+							$foundData['folders'][$entry] = true;
2426
+			}
2332 2427
 			// Otherwise we stop here.
2333 2428
 		}
2334 2429
 	}
2335 2430
 	closedir($dh);
2336 2431
 
2337 2432
 	// Nothing to see here?
2338
-	if (!$save_data)
2339
-		return;
2433
+	if (!$save_data) {
2434
+			return;
2435
+	}
2340 2436
 
2341 2437
 	// Now actually add the data, starting with the folders.
2342 2438
 	ksort($foundData['folders']);
@@ -2348,8 +2444,9 @@  discard block
 block discarded – undo
2348 2444
 				'perms' => @fileperms($path . '/' . $folder),
2349 2445
 			),
2350 2446
 		);
2351
-		if ($type !== true)
2352
-			$additional_data['type'] = $type;
2447
+		if ($type !== true) {
2448
+					$additional_data['type'] = $type;
2449
+		}
2353 2450
 
2354 2451
 		// If there's an offset ignore any folders in XML mode.
2355 2452
 		if (isset($_GET['xml']) && $context['file_offset'] == 0)
@@ -2368,13 +2465,13 @@  discard block
 block discarded – undo
2368 2465
 				),
2369 2466
 				'value' => $folder,
2370 2467
 			);
2371
-		}
2372
-		elseif (!isset($_GET['xml']))
2468
+		} elseif (!isset($_GET['xml']))
2373 2469
 		{
2374
-			if (isset($data['contents'][$folder]))
2375
-				$data['contents'][$folder] = array_merge($data['contents'][$folder], $additional_data);
2376
-			else
2377
-				$data['contents'][$folder] = $additional_data;
2470
+			if (isset($data['contents'][$folder])) {
2471
+							$data['contents'][$folder] = array_merge($data['contents'][$folder], $additional_data);
2472
+			} else {
2473
+							$data['contents'][$folder] = $additional_data;
2474
+			}
2378 2475
 		}
2379 2476
 	}
2380 2477
 
@@ -2386,11 +2483,13 @@  discard block
 block discarded – undo
2386 2483
 		$counter++;
2387 2484
 
2388 2485
 		// Have we reached our offset?
2389
-		if ($context['file_offset'] > $counter)
2390
-			continue;
2486
+		if ($context['file_offset'] > $counter) {
2487
+					continue;
2488
+		}
2391 2489
 		// Gone too far?
2392
-		if ($counter > ($context['file_offset'] + $context['file_limit']))
2393
-			continue;
2490
+		if ($counter > ($context['file_offset'] + $context['file_limit'])) {
2491
+					continue;
2492
+		}
2394 2493
 
2395 2494
 		$additional_data = array(
2396 2495
 			'perms' => array(
@@ -2416,13 +2515,13 @@  discard block
 block discarded – undo
2416 2515
 				),
2417 2516
 				'value' => $file,
2418 2517
 			);
2419
-		}
2420
-		elseif ($counter != ($context['file_offset'] + $context['file_limit']))
2518
+		} elseif ($counter != ($context['file_offset'] + $context['file_limit']))
2421 2519
 		{
2422
-			if (isset($data['contents'][$file]))
2423
-				$data['contents'][$file] = array_merge($data['contents'][$file], $additional_data);
2424
-			else
2425
-				$data['contents'][$file] = $additional_data;
2520
+			if (isset($data['contents'][$file])) {
2521
+							$data['contents'][$file] = array_merge($data['contents'][$file], $additional_data);
2522
+			} else {
2523
+							$data['contents'][$file] = $additional_data;
2524
+			}
2426 2525
 		}
2427 2526
 	}
2428 2527
 }
@@ -2444,8 +2543,9 @@  discard block
 block discarded – undo
2444 2543
 	$context['back_look_data'] = isset($_POST['back_look']) ? $_POST['back_look'] : array();
2445 2544
 
2446 2545
 	// Skipping use of FTP?
2447
-	if (empty($package_ftp))
2448
-		$context['skip_ftp'] = true;
2546
+	if (empty($package_ftp)) {
2547
+			$context['skip_ftp'] = true;
2548
+	}
2449 2549
 
2450 2550
 	// We'll start off in a good place, security. Make sure that if we're dealing with individual files that they seem in the right place.
2451 2551
 	if ($context['method'] == 'individual')
@@ -2455,8 +2555,9 @@  discard block
 block discarded – undo
2455 2555
 		$context['custom_value'] = (int) $_POST['custom_value'];
2456 2556
 
2457 2557
 		// Continuing?
2458
-		if (isset($_POST['toProcess']))
2459
-			$_POST['permStatus'] = smf_json_decode(base64_decode($_POST['toProcess']), true);
2558
+		if (isset($_POST['toProcess'])) {
2559
+					$_POST['permStatus'] = smf_json_decode(base64_decode($_POST['toProcess']), true);
2560
+		}
2460 2561
 
2461 2562
 		if (isset($_POST['permStatus']))
2462 2563
 		{
@@ -2465,22 +2566,27 @@  discard block
 block discarded – undo
2465 2566
 			foreach ($_POST['permStatus'] as $path => $status)
2466 2567
 			{
2467 2568
 				// Nothing to see here?
2468
-				if ($status == 'no_change')
2469
-					continue;
2569
+				if ($status == 'no_change') {
2570
+									continue;
2571
+				}
2470 2572
 				$legal = false;
2471
-				foreach ($legal_roots as $root)
2472
-					if (substr($path, 0, strlen($root)) == $root)
2573
+				foreach ($legal_roots as $root) {
2574
+									if (substr($path, 0, strlen($root)) == $root)
2473 2575
 						$legal = true;
2576
+				}
2474 2577
 
2475
-				if (!$legal)
2476
-					continue;
2578
+				if (!$legal) {
2579
+									continue;
2580
+				}
2477 2581
 
2478 2582
 				// Check it exists.
2479
-				if (!file_exists($path))
2480
-					continue;
2583
+				if (!file_exists($path)) {
2584
+									continue;
2585
+				}
2481 2586
 
2482
-				if ($status == 'custom')
2483
-					$validate_custom = true;
2587
+				if ($status == 'custom') {
2588
+									$validate_custom = true;
2589
+				}
2484 2590
 
2485 2591
 				// Now add it.
2486 2592
 				$context['to_process'][$path] = $status;
@@ -2490,17 +2596,20 @@  discard block
 block discarded – undo
2490 2596
 			// Make sure the chmod status is valid?
2491 2597
 			if ($validate_custom)
2492 2598
 			{
2493
-				if (preg_match('~^[4567][4567][4567]$~', $context['custom_value']) == false)
2494
-					fatal_error($txt['chmod_value_invalid']);
2599
+				if (preg_match('~^[4567][4567][4567]$~', $context['custom_value']) == false) {
2600
+									fatal_error($txt['chmod_value_invalid']);
2601
+				}
2495 2602
 			}
2496 2603
 
2497 2604
 			// Nothing to do?
2498
-			if (empty($context['to_process']))
2499
-				redirectexit('action=admin;area=packages;sa=perms' . (!empty($context['back_look_data']) ? ';back_look=' . base64_encode(json_encode($context['back_look_data'])) : '') . ';' . $context['session_var'] . '=' . $context['session_id']);
2605
+			if (empty($context['to_process'])) {
2606
+							redirectexit('action=admin;area=packages;sa=perms' . (!empty($context['back_look_data']) ? ';back_look=' . base64_encode(json_encode($context['back_look_data'])) : '') . ';' . $context['session_var'] . '=' . $context['session_id']);
2607
+			}
2500 2608
 		}
2501 2609
 		// Should never get here,
2502
-		else
2503
-			fatal_lang_error('no_access', false);
2610
+		else {
2611
+					fatal_lang_error('no_access', false);
2612
+		}
2504 2613
 
2505 2614
 		// Setup the custom value.
2506 2615
 		$custom_value = octdec('0' . $context['custom_value']);
@@ -2508,26 +2617,27 @@  discard block
 block discarded – undo
2508 2617
 		// Start processing items.
2509 2618
 		foreach ($context['to_process'] as $path => $status)
2510 2619
 		{
2511
-			if (in_array($status, array('execute', 'writable', 'read')))
2512
-				package_chmod($path, $status);
2513
-			elseif ($status == 'custom' && !empty($custom_value))
2620
+			if (in_array($status, array('execute', 'writable', 'read'))) {
2621
+							package_chmod($path, $status);
2622
+			} elseif ($status == 'custom' && !empty($custom_value))
2514 2623
 			{
2515 2624
 				// Use FTP if we have it.
2516 2625
 				if (!empty($package_ftp) && !empty($_SESSION['pack_ftp']))
2517 2626
 				{
2518 2627
 					$ftp_file = strtr($path, array($_SESSION['pack_ftp']['root'] => ''));
2519 2628
 					$package_ftp->chmod($ftp_file, $custom_value);
2629
+				} else {
2630
+									smf_chmod($path, $custom_value);
2520 2631
 				}
2521
-				else
2522
-					smf_chmod($path, $custom_value);
2523 2632
 			}
2524 2633
 
2525 2634
 			// This fish is fried...
2526 2635
 			unset($context['to_process'][$path]);
2527 2636
 
2528 2637
 			// See if we're out of time?
2529
-			if (time() - array_sum(explode(' ', $time_start)) > $timeout_limit)
2530
-				return false;
2638
+			if (time() - array_sum(explode(' ', $time_start)) > $timeout_limit) {
2639
+							return false;
2640
+			}
2531 2641
 		}
2532 2642
 	}
2533 2643
 	// If predefined this is a little different.
@@ -2595,23 +2705,27 @@  discard block
 block discarded – undo
2595 2705
 			{
2596 2706
 				global $context;
2597 2707
 
2598
-				if (!empty($data['writable_on']))
2599
-					if ($context['predefined_type'] == 'standard' || $data['writable_on'] == 'restrictive')
2708
+				if (!empty($data['writable_on'])) {
2709
+									if ($context['predefined_type'] == 'standard' || $data['writable_on'] == 'restrictive')
2600 2710
 						$context['special_files'][$path] = 1;
2711
+				}
2601 2712
 
2602
-				if (!empty($data['contents']))
2603
-					foreach ($data['contents'] as $name => $contents)
2713
+				if (!empty($data['contents'])) {
2714
+									foreach ($data['contents'] as $name => $contents)
2604 2715
 						build_special_files__recursive($path . '/' . $name, $contents);
2716
+				}
2605 2717
 			}
2606 2718
 
2607
-			foreach ($context['file_tree'] as $path => $data)
2608
-				build_special_files__recursive($path, $data);
2719
+			foreach ($context['file_tree'] as $path => $data) {
2720
+							build_special_files__recursive($path, $data);
2721
+			}
2609 2722
 		}
2610 2723
 		// Free doesn't need special files.
2611
-		elseif ($context['predefined_type'] == 'free')
2612
-			$context['special_files'] = array();
2613
-		else
2614
-			$context['special_files'] = smf_json_decode(base64_decode($_POST['specialFiles']), true);
2724
+		elseif ($context['predefined_type'] == 'free') {
2725
+					$context['special_files'] = array();
2726
+		} else {
2727
+					$context['special_files'] = smf_json_decode(base64_decode($_POST['specialFiles']), true);
2728
+		}
2615 2729
 
2616 2730
 		// Now we definitely know where we are, we need to go through again doing the chmod!
2617 2731
 		foreach ($context['directory_list'] as $path => $dummy)
@@ -2656,8 +2770,9 @@  discard block
 block discarded – undo
2656 2770
 			unset($context['directory_list'][$path]);
2657 2771
 
2658 2772
 			// See if we're out of time?
2659
-			if (time() - array_sum(explode(' ', $time_start)) > $timeout_limit)
2660
-				return false;
2773
+			if (time() - array_sum(explode(' ', $time_start)) > $timeout_limit) {
2774
+							return false;
2775
+			}
2661 2776
 		}
2662 2777
 	}
2663 2778
 
Please login to merge, or discard this patch.
Sources/Groups.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 					'value' => $txt['name'],
97 97
 				),
98 98
 				'data' => array(
99
-					'function' => function ($rowData) use ($scripturl)
99
+					'function' => function($rowData) use ($scripturl)
100 100
 					{
101 101
 						// Since the moderator group has no explicit members, no link is needed.
102 102
 						if ($rowData['id_group'] == 3)
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
 					'value' => $txt['moderators'],
147 147
 				),
148 148
 				'data' => array(
149
-					'function' => function ($group) use ($txt)
149
+					'function' => function($group) use ($txt)
150 150
 					{
151 151
 						return empty($group['moderators']) ? '<em>' . $txt['membergroups_new_copy_none'] . '</em>' : implode(', ', $group['moderators']);
152 152
 					},
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 					'value' => $txt['membergroups_members_top'],
158 158
 				),
159 159
 				'data' => array(
160
-					'function' => function ($rowData) use ($txt)
160
+					'function' => function($rowData) use ($txt)
161 161
 					{
162 162
 						// No explicit members for the moderator group.
163 163
 						return $rowData['id_group'] == 3 ? $txt['membergroups_guests_na'] : comma_format($rowData['num_members']);
@@ -745,7 +745,7 @@  discard block
 block discarded – undo
745 745
 	while ($row = $smcFunc['db_fetch_assoc']($request))
746 746
 	{
747 747
 		if (empty($row['reason']))
748
-			$reason = '<em>(' . $txt['mc_groupr_no_reason'] .  ')</em>';
748
+			$reason = '<em>(' . $txt['mc_groupr_no_reason'] . ')</em>';
749 749
 		else
750 750
 			$reason = censorText($row['reason']);
751 751
 
Please login to merge, or discard this patch.
Braces   +80 added lines, -59 removed lines patch added patch discarded remove patch
@@ -13,8 +13,9 @@  discard block
 block discarded – undo
13 13
  * @version 2.1 Beta 3
14 14
  */
15 15
 
16
-if (!defined('SMF'))
16
+if (!defined('SMF')) {
17 17
 	die('No direct access...');
18
+}
18 19
 
19 20
 /**
20 21
  * Entry point function, permission checks, admin bars, etc.
@@ -99,27 +100,27 @@  discard block
 block discarded – undo
99 100
 					'function' => function ($rowData) use ($scripturl)
100 101
 					{
101 102
 						// Since the moderator group has no explicit members, no link is needed.
102
-						if ($rowData['id_group'] == 3)
103
-							$group_name = $rowData['group_name'];
104
-						else
103
+						if ($rowData['id_group'] == 3) {
104
+													$group_name = $rowData['group_name'];
105
+						} else
105 106
 						{
106 107
 							$color_style = empty($rowData['online_color']) ? '' : sprintf(' style="color: %1$s;"', $rowData['online_color']);
107 108
 
108 109
 							if (allowedTo('manage_membergroups'))
109 110
 							{
110 111
 								$group_name = sprintf('<a href="%1$s?action=admin;area=membergroups;sa=members;group=%2$d"%3$s>%4$s</a>', $scripturl, $rowData['id_group'], $color_style, $rowData['group_name']);
111
-							}
112
-							else
112
+							} else
113 113
 							{
114 114
 								$group_name = sprintf('<a href="%1$s?action=groups;sa=members;group=%2$d"%3$s>%4$s</a>', $scripturl, $rowData['id_group'], $color_style, $rowData['group_name']);
115 115
 							}
116 116
 						}
117 117
 
118 118
 						// Add a help option for moderator and administrator.
119
-						if ($rowData['id_group'] == 1)
120
-							$group_name .= sprintf(' (<a href="%1$s?action=helpadmin;help=membergroup_administrator" onclick="return reqOverlayDiv(this.href);">?</a>)', $scripturl);
121
-						elseif ($rowData['id_group'] == 3)
122
-							$group_name .= sprintf(' (<a href="%1$s?action=helpadmin;help=membergroup_moderator" onclick="return reqOverlayDiv(this.href);">?</a>)', $scripturl);
119
+						if ($rowData['id_group'] == 1) {
120
+													$group_name .= sprintf(' (<a href="%1$s?action=helpadmin;help=membergroup_administrator" onclick="return reqOverlayDiv(this.href);">?</a>)', $scripturl);
121
+						} elseif ($rowData['id_group'] == 3) {
122
+													$group_name .= sprintf(' (<a href="%1$s?action=helpadmin;help=membergroup_moderator" onclick="return reqOverlayDiv(this.href);">?</a>)', $scripturl);
123
+						}
123 124
 
124 125
 						return $group_name;
125 126
 					},
@@ -198,8 +199,9 @@  discard block
 block discarded – undo
198 199
 	$_REQUEST['group'] = isset($_REQUEST['group']) ? (int) $_REQUEST['group'] : 0;
199 200
 
200 201
 	// No browsing of guests, membergroup 0 or moderators.
201
-	if (in_array($_REQUEST['group'], array(-1, 0, 3)))
202
-		fatal_lang_error('membergroup_does_not_exist', false);
202
+	if (in_array($_REQUEST['group'], array(-1, 0, 3))) {
203
+			fatal_lang_error('membergroup_does_not_exist', false);
204
+	}
203 205
 
204 206
 	// Load up the group details.
205 207
 	$request = $smcFunc['db_query']('', '
@@ -214,8 +216,9 @@  discard block
 block discarded – undo
214 216
 		)
215 217
 	);
216 218
 	// Doesn't exist?
217
-	if ($smcFunc['db_num_rows']($request) == 0)
218
-		fatal_lang_error('membergroup_does_not_exist', false);
219
+	if ($smcFunc['db_num_rows']($request) == 0) {
220
+			fatal_lang_error('membergroup_does_not_exist', false);
221
+	}
219 222
 	$context['group'] = $smcFunc['db_fetch_assoc']($request);
220 223
 	$smcFunc['db_free_result']($request);
221 224
 
@@ -248,21 +251,25 @@  discard block
 block discarded – undo
248 251
 			'name' => $row['real_name']
249 252
 		);
250 253
 
251
-		if ($user_info['id'] == $row['id_member'] && $context['group']['group_type'] != 1)
252
-			$context['group']['can_moderate'] = true;
254
+		if ($user_info['id'] == $row['id_member'] && $context['group']['group_type'] != 1) {
255
+					$context['group']['can_moderate'] = true;
256
+		}
253 257
 	}
254 258
 	$smcFunc['db_free_result']($request);
255 259
 
256 260
 	// If this group is hidden then it can only "exists" if the user can moderate it!
257
-	if ($context['group']['hidden'] && !$context['group']['can_moderate'])
258
-		fatal_lang_error('membergroup_does_not_exist', false);
261
+	if ($context['group']['hidden'] && !$context['group']['can_moderate']) {
262
+			fatal_lang_error('membergroup_does_not_exist', false);
263
+	}
259 264
 
260 265
 	// You can only assign membership if you are the moderator and/or can manage groups!
261
-	if (!$context['group']['can_moderate'])
262
-		$context['group']['assignable'] = 0;
266
+	if (!$context['group']['can_moderate']) {
267
+			$context['group']['assignable'] = 0;
268
+	}
263 269
 	// Non-admins cannot assign admins.
264
-	elseif ($context['group']['id'] == 1 && !allowedTo('admin_forum'))
265
-		$context['group']['assignable'] = 0;
270
+	elseif ($context['group']['id'] == 1 && !allowedTo('admin_forum')) {
271
+			$context['group']['assignable'] = 0;
272
+	}
266 273
 
267 274
 	// Removing member from group?
268 275
 	if (isset($_POST['remove']) && !empty($_REQUEST['rem']) && is_array($_REQUEST['rem']) && $context['group']['assignable'])
@@ -271,8 +278,9 @@  discard block
 block discarded – undo
271 278
 		validateToken('mod-mgm');
272 279
 
273 280
 		// Make sure we're dealing with integers only.
274
-		foreach ($_REQUEST['rem'] as $key => $group)
275
-			$_REQUEST['rem'][$key] = (int) $group;
281
+		foreach ($_REQUEST['rem'] as $key => $group) {
282
+					$_REQUEST['rem'][$key] = (int) $group;
283
+		}
276 284
 
277 285
 		require_once($sourcedir . '/Subs-Membergroups.php');
278 286
 		removeMembersFromGroups($_REQUEST['rem'], $_REQUEST['group'], true);
@@ -295,16 +303,18 @@  discard block
 block discarded – undo
295 303
 		{
296 304
 			$member_names[$index] = trim($smcFunc['strtolower']($member_names[$index]));
297 305
 
298
-			if (strlen($member_names[$index]) == 0)
299
-				unset($member_names[$index]);
306
+			if (strlen($member_names[$index]) == 0) {
307
+							unset($member_names[$index]);
308
+			}
300 309
 		}
301 310
 
302 311
 		// Any passed by ID?
303 312
 		$member_ids = array();
304
-		if (!empty($_REQUEST['member_add']))
305
-			foreach ($_REQUEST['member_add'] as $id)
313
+		if (!empty($_REQUEST['member_add'])) {
314
+					foreach ($_REQUEST['member_add'] as $id)
306 315
 				if ($id > 0)
307 316
 					$member_ids[] = (int) $id;
317
+		}
308 318
 
309 319
 		// Construct the query pelements.
310 320
 		if (!empty($member_ids))
@@ -332,8 +342,9 @@  discard block
 block discarded – undo
332 342
 					'id_group' => $_REQUEST['group'],
333 343
 				))
334 344
 			);
335
-			while ($row = $smcFunc['db_fetch_assoc']($request))
336
-				$members[] = $row['id_member'];
345
+			while ($row = $smcFunc['db_fetch_assoc']($request)) {
346
+							$members[] = $row['id_member'];
347
+			}
337 348
 			$smcFunc['db_free_result']($request);
338 349
 		}
339 350
 
@@ -372,10 +383,11 @@  discard block
 block discarded – undo
372 383
 	$context['sort_direction'] = isset($_REQUEST['desc']) ? 'down' : 'up';
373 384
 
374 385
 	// The where on the query is interesting. Non-moderators should only see people who are in this group as primary.
375
-	if ($context['group']['can_moderate'])
376
-		$where = $context['group']['is_post_group'] ? 'id_post_group = {int:group}' : 'id_group = {int:group} OR FIND_IN_SET({int:group}, additional_groups) != 0';
377
-	else
378
-		$where = $context['group']['is_post_group'] ? 'id_post_group = {int:group}' : 'id_group = {int:group}';
386
+	if ($context['group']['can_moderate']) {
387
+			$where = $context['group']['is_post_group'] ? 'id_post_group = {int:group}' : 'id_group = {int:group} OR FIND_IN_SET({int:group}, additional_groups) != 0';
388
+	} else {
389
+			$where = $context['group']['is_post_group'] ? 'id_post_group = {int:group}' : 'id_group = {int:group}';
390
+	}
379 391
 
380 392
 	// Count members of the group.
381 393
 	$request = $smcFunc['db_query']('', '
@@ -416,8 +428,9 @@  discard block
 block discarded – undo
416 428
 		$last_online = empty($row['last_login']) ? $txt['never'] : timeformat($row['last_login']);
417 429
 
418 430
 		// Italicize the online note if they aren't activated.
419
-		if ($row['is_activated'] % 10 != 1)
420
-			$last_online = '<em title="' . $txt['not_activated'] . '">' . $last_online . '</em>';
431
+		if ($row['is_activated'] % 10 != 1) {
432
+					$last_online = '<em title="' . $txt['not_activated'] . '">' . $last_online . '</em>';
433
+		}
421 434
 
422 435
 		$context['members'][] = array(
423 436
 			'id' => $row['id_member'],
@@ -437,9 +450,10 @@  discard block
 block discarded – undo
437 450
 	$context['page_title'] = $txt['membergroups_members_title'] . ': ' . $context['group']['name'];
438 451
 	createToken('mod-mgm');
439 452
 
440
-	if ($context['group']['assignable'])
441
-		loadJavaScriptFile('suggest.js', array('defer' => false), 'smf_suggest');
442
-}
453
+	if ($context['group']['assignable']) {
454
+			loadJavaScriptFile('suggest.js', array('defer' => false), 'smf_suggest');
455
+	}
456
+	}
443 457
 
444 458
 /**
445 459
  * Show and manage all group requests.
@@ -453,16 +467,18 @@  discard block
 block discarded – undo
453 467
 	$context['sub_template'] = 'show_list';
454 468
 
455 469
 	// Verify we can be here.
456
-	if ($user_info['mod_cache']['gq'] == '0=1')
457
-		isAllowedTo('manage_membergroups');
470
+	if ($user_info['mod_cache']['gq'] == '0=1') {
471
+			isAllowedTo('manage_membergroups');
472
+	}
458 473
 
459 474
 	// Normally, we act normally...
460 475
 	$where = ($user_info['mod_cache']['gq'] == '1=1' || $user_info['mod_cache']['gq'] == '0=1' ? $user_info['mod_cache']['gq'] : 'lgr.' . $user_info['mod_cache']['gq']);
461 476
 
462
-	if (isset($_GET['closed']))
463
-		$where .= ' AND lgr.status != {int:status_open}';
464
-	else
465
-		$where .= ' AND lgr.status = {int:status_open}';
477
+	if (isset($_GET['closed'])) {
478
+			$where .= ' AND lgr.status != {int:status_open}';
479
+	} else {
480
+			$where .= ' AND lgr.status = {int:status_open}';
481
+	}
466 482
 
467 483
 	$where_parameters = array(
468 484
 		'status_open' => 0,
@@ -475,8 +491,9 @@  discard block
 block discarded – undo
475 491
 		validateToken('mod-gr');
476 492
 
477 493
 		// Clean the values.
478
-		foreach ($_POST['groupr'] as $k => $request)
479
-			$_POST['groupr'][$k] = (int) $request;
494
+		foreach ($_POST['groupr'] as $k => $request) {
495
+					$_POST['groupr'][$k] = (int) $request;
496
+		}
480 497
 
481 498
 		$log_changes = array();
482 499
 
@@ -513,8 +530,8 @@  discard block
 block discarded – undo
513 530
 			$request_list = array();
514 531
 			while ($row = $smcFunc['db_fetch_assoc']($request))
515 532
 			{
516
-				if (!isset($log_changes[$row['id_request']]))
517
-					$log_changes[$row['id_request']] = array(
533
+				if (!isset($log_changes[$row['id_request']])) {
534
+									$log_changes[$row['id_request']] = array(
518 535
 						'id_request' => $row['id_request'],
519 536
 						'status' => $_POST['req_action'] == 'approve' ? 1 : 2, // 1 = approved, 2 = rejected
520 537
 						'id_member_acted' => $user_info['id'],
@@ -522,6 +539,7 @@  discard block
 block discarded – undo
522 539
 						'time_acted' => time(),
523 540
 						'act_reason' => $_POST['req_action'] != 'approve' && !empty($_POST['groupreason']) && !empty($_POST['groupreason'][$row['id_request']]) ? $smcFunc['htmlspecialchars']($_POST['groupreason'][$row['id_request']], ENT_QUOTES) : '',
524 541
 					);
542
+				}
525 543
 				$request_list[] = $row['id_request'];
526 544
 			}
527 545
 			$smcFunc['db_free_result']($request);
@@ -744,21 +762,24 @@  discard block
 block discarded – undo
744 762
 	$group_requests = array();
745 763
 	while ($row = $smcFunc['db_fetch_assoc']($request))
746 764
 	{
747
-		if (empty($row['reason']))
748
-			$reason = '<em>(' . $txt['mc_groupr_no_reason'] .  ')</em>';
749
-		else
750
-			$reason = censorText($row['reason']);
765
+		if (empty($row['reason'])) {
766
+					$reason = '<em>(' . $txt['mc_groupr_no_reason'] .  ')</em>';
767
+		} else {
768
+					$reason = censorText($row['reason']);
769
+		}
751 770
 
752 771
 		if (isset($_GET['closed']))
753 772
 		{
754
-			if ($row['status'] == 1)
755
-				$reason .= '<br><br><strong>' . $txt['mc_groupr_approved'] . '</strong>';
756
-			elseif ($row['status'] == 2)
757
-				$reason .= '<br><br><strong>' . $txt['mc_groupr_rejected'] . '</strong>';
773
+			if ($row['status'] == 1) {
774
+							$reason .= '<br><br><strong>' . $txt['mc_groupr_approved'] . '</strong>';
775
+			} elseif ($row['status'] == 2) {
776
+							$reason .= '<br><br><strong>' . $txt['mc_groupr_rejected'] . '</strong>';
777
+			}
758 778
 
759 779
 				$reason .= ' (' . timeformat($row['time_acted']) . ')';
760
-			if (!empty($row['act_reason']))
761
-				$reason .= '<br><br>' . censorText($row['act_reason']);
780
+			if (!empty($row['act_reason'])) {
781
+							$reason .= '<br><br>' . censorText($row['act_reason']);
782
+			}
762 783
 		}
763 784
 
764 785
 		$group_requests[] = array(
Please login to merge, or discard this patch.
Sources/LogInOut.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -99,19 +99,19 @@
 block discarded – undo
99 99
 	{
100 100
 		if (isset($_COOKIE[$cookiename]) && preg_match('~^a:[34]:\{i:0;i:\d{1,7};i:1;s:(0|128):"([a-fA-F0-9]{128})?";i:2;[id]:\d{1,14};(i:3;i:\d;)?\}$~', $_COOKIE[$cookiename]) === 1)
101 101
 		{
102
-			list (, , $timeout) = smf_json_decode($_COOKIE[$cookiename], true);
102
+			list (,, $timeout) = smf_json_decode($_COOKIE[$cookiename], true);
103 103
 
104 104
 			// That didn't work... Maybe it's using serialize?
105 105
 			if (is_null($timeout))
106
-				list (, , $timeout) = safe_unserialize($_COOKIE[$cookiename]);
106
+				list (,, $timeout) = safe_unserialize($_COOKIE[$cookiename]);
107 107
 		}
108 108
 		elseif (isset($_SESSION['login_' . $cookiename]))
109 109
 		{
110
-			list (, , $timeout) = smf_json_decode($_SESSION['login_' . $cookiename]);
110
+			list (,, $timeout) = smf_json_decode($_SESSION['login_' . $cookiename]);
111 111
 
112 112
 			// Try for old format
113 113
 			if (is_null($timeout))
114
-				list (, , $timeout) = safe_unserialize($_SESSION['login_' . $cookiename]);
114
+				list (,, $timeout) = safe_unserialize($_SESSION['login_' . $cookiename]);
115 115
 		}
116 116
 		else
117 117
 			trigger_error('Login2(): Cannot be logged in without a session or cookie', E_USER_ERROR);
Please login to merge, or discard this patch.
Braces   +164 added lines, -128 removed lines patch added patch discarded remove patch
@@ -14,8 +14,9 @@  discard block
 block discarded – undo
14 14
  * @version 2.1 Beta 3
15 15
  */
16 16
 
17
-if (!defined('SMF'))
17
+if (!defined('SMF')) {
18 18
 	die('No direct access...');
19
+}
19 20
 
20 21
 /**
21 22
  * Ask them for their login information. (shows a page for the user to type
@@ -29,8 +30,9 @@  discard block
 block discarded – undo
29 30
 	global $txt, $context, $scripturl, $user_info;
30 31
 
31 32
 	// You are already logged in, go take a tour of the boards
32
-	if (!empty($user_info['id']))
33
-		redirectexit();
33
+	if (!empty($user_info['id'])) {
34
+			redirectexit();
35
+	}
34 36
 
35 37
 	// We need to load the Login template/language file.
36 38
 	loadLanguage('Login');
@@ -57,10 +59,11 @@  discard block
 block discarded – undo
57 59
 	);
58 60
 
59 61
 	// Set the login URL - will be used when the login process is done (but careful not to send us to an attachment).
60
-	if (isset($_SESSION['old_url']) && strpos($_SESSION['old_url'], 'dlattach') === false && preg_match('~(board|topic)[=,]~', $_SESSION['old_url']) != 0)
61
-		$_SESSION['login_url'] = $_SESSION['old_url'];
62
-	elseif (isset($_SESSION['login_url']) && strpos($_SESSION['login_url'], 'dlattach') !== false)
63
-		unset($_SESSION['login_url']);
62
+	if (isset($_SESSION['old_url']) && strpos($_SESSION['old_url'], 'dlattach') === false && preg_match('~(board|topic)[=,]~', $_SESSION['old_url']) != 0) {
63
+			$_SESSION['login_url'] = $_SESSION['old_url'];
64
+	} elseif (isset($_SESSION['login_url']) && strpos($_SESSION['login_url'], 'dlattach') !== false) {
65
+			unset($_SESSION['login_url']);
66
+	}
64 67
 
65 68
 	// Create a one time token.
66 69
 	createToken('login');
@@ -83,8 +86,9 @@  discard block
 block discarded – undo
83 86
 	global $cookiename, $modSettings, $context, $sourcedir, $maintenance;
84 87
 
85 88
 	// Check to ensure we're forcing SSL for authentication
86
-	if (!empty($modSettings['force_ssl']) && empty($maintenance) && (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != 'on'))
87
-		fatal_lang_error('login_ssl_required');
89
+	if (!empty($modSettings['force_ssl']) && empty($maintenance) && (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != 'on')) {
90
+			fatal_lang_error('login_ssl_required');
91
+	}
88 92
 
89 93
 	// Load cookie authentication stuff.
90 94
 	require_once($sourcedir . '/Subs-Auth.php');
@@ -102,19 +106,20 @@  discard block
 block discarded – undo
102 106
 			list (, , $timeout) = smf_json_decode($_COOKIE[$cookiename], true);
103 107
 
104 108
 			// That didn't work... Maybe it's using serialize?
105
-			if (is_null($timeout))
106
-				list (, , $timeout) = safe_unserialize($_COOKIE[$cookiename]);
107
-		}
108
-		elseif (isset($_SESSION['login_' . $cookiename]))
109
+			if (is_null($timeout)) {
110
+							list (, , $timeout) = safe_unserialize($_COOKIE[$cookiename]);
111
+			}
112
+		} elseif (isset($_SESSION['login_' . $cookiename]))
109 113
 		{
110 114
 			list (, , $timeout) = smf_json_decode($_SESSION['login_' . $cookiename]);
111 115
 
112 116
 			// Try for old format
113
-			if (is_null($timeout))
114
-				list (, , $timeout) = safe_unserialize($_SESSION['login_' . $cookiename]);
117
+			if (is_null($timeout)) {
118
+							list (, , $timeout) = safe_unserialize($_SESSION['login_' . $cookiename]);
119
+			}
120
+		} else {
121
+					trigger_error('Login2(): Cannot be logged in without a session or cookie', E_USER_ERROR);
115 122
 		}
116
-		else
117
-			trigger_error('Login2(): Cannot be logged in without a session or cookie', E_USER_ERROR);
118 123
 
119 124
 		$user_settings['password_salt'] = substr(md5(mt_rand()), 0, 4);
120 125
 		updateMemberData($user_info['id'], array('password_salt' => $user_settings['password_salt']));
@@ -125,16 +130,18 @@  discard block
 block discarded – undo
125 130
 			$tfadata = smf_json_decode($_COOKIE[$cookiename . '_tfa'], true);
126 131
 
127 132
 			// If that didn't work, try unserialize instead...
128
-			if (is_null($tfadata))
129
-				$tfadata = safe_unserialize($_COOKIE[$cookiename . '_tfa']);
133
+			if (is_null($tfadata)) {
134
+							$tfadata = safe_unserialize($_COOKIE[$cookiename . '_tfa']);
135
+			}
130 136
 
131 137
 			list ($tfamember, $tfasecret, $exp, $state, $preserve) = $tfadata;
132 138
 
133 139
 			// If we're preserving the cookie, reset it with updated salt
134
-			if ($preserve && time() < $exp)
135
-				setTFACookie(3153600, $user_info['password_salt'], hash_salt($user_settings['tfa_backup'], $user_settings['password_salt']), true);
136
-			else
137
-				setTFACookie(-3600, 0, '');
140
+			if ($preserve && time() < $exp) {
141
+							setTFACookie(3153600, $user_info['password_salt'], hash_salt($user_settings['tfa_backup'], $user_settings['password_salt']), true);
142
+			} else {
143
+							setTFACookie(-3600, 0, '');
144
+			}
138 145
 		}
139 146
 
140 147
 		setLoginCookie($timeout - time(), $user_info['id'], hash_salt($user_settings['passwd'], $user_settings['password_salt']));
@@ -145,20 +152,20 @@  discard block
 block discarded – undo
145 152
 	elseif (isset($_GET['sa']) && $_GET['sa'] == 'check')
146 153
 	{
147 154
 		// Strike!  You're outta there!
148
-		if ($_GET['member'] != $user_info['id'])
149
-			fatal_lang_error('login_cookie_error', false);
155
+		if ($_GET['member'] != $user_info['id']) {
156
+					fatal_lang_error('login_cookie_error', false);
157
+		}
150 158
 
151 159
 		$user_info['can_mod'] = allowedTo('access_mod_center') || (!$user_info['is_guest'] && ($user_info['mod_cache']['gq'] != '0=1' || $user_info['mod_cache']['bq'] != '0=1' || ($modSettings['postmod_active'] && !empty($user_info['mod_cache']['ap']))));
152 160
 
153 161
 		// Some whitelisting for login_url...
154
-		if (empty($_SESSION['login_url']))
155
-			redirectexit(empty($user_settings['tfa_secret']) ? '' : 'action=logintfa');
156
-		elseif (!empty($_SESSION['login_url']) && (strpos($_SESSION['login_url'], 'http://') === false && strpos($_SESSION['login_url'], 'https://') === false))
162
+		if (empty($_SESSION['login_url'])) {
163
+					redirectexit(empty($user_settings['tfa_secret']) ? '' : 'action=logintfa');
164
+		} elseif (!empty($_SESSION['login_url']) && (strpos($_SESSION['login_url'], 'http://') === false && strpos($_SESSION['login_url'], 'https://') === false))
157 165
 		{
158 166
 			unset ($_SESSION['login_url']);
159 167
 			redirectexit(empty($user_settings['tfa_secret']) ? '' : 'action=logintfa');
160
-		}
161
-		else
168
+		} else
162 169
 		{
163 170
 			// Best not to clutter the session data too much...
164 171
 			$temp = $_SESSION['login_url'];
@@ -169,8 +176,9 @@  discard block
 block discarded – undo
169 176
 	}
170 177
 
171 178
 	// Beyond this point you are assumed to be a guest trying to login.
172
-	if (!$user_info['is_guest'])
173
-		redirectexit();
179
+	if (!$user_info['is_guest']) {
180
+			redirectexit();
181
+	}
174 182
 
175 183
 	// Are you guessing with a script?
176 184
 	checkSession();
@@ -178,18 +186,21 @@  discard block
 block discarded – undo
178 186
 	spamProtection('login');
179 187
 
180 188
 	// Set the login_url if it's not already set (but careful not to send us to an attachment).
181
-	if ((empty($_SESSION['login_url']) && isset($_SESSION['old_url']) && strpos($_SESSION['old_url'], 'dlattach') === false && preg_match('~(board|topic)[=,]~', $_SESSION['old_url']) != 0) || (isset($_GET['quicklogin']) && isset($_SESSION['old_url']) && strpos($_SESSION['old_url'], 'login') === false))
182
-		$_SESSION['login_url'] = $_SESSION['old_url'];
189
+	if ((empty($_SESSION['login_url']) && isset($_SESSION['old_url']) && strpos($_SESSION['old_url'], 'dlattach') === false && preg_match('~(board|topic)[=,]~', $_SESSION['old_url']) != 0) || (isset($_GET['quicklogin']) && isset($_SESSION['old_url']) && strpos($_SESSION['old_url'], 'login') === false)) {
190
+			$_SESSION['login_url'] = $_SESSION['old_url'];
191
+	}
183 192
 
184 193
 	// Been guessing a lot, haven't we?
185
-	if (isset($_SESSION['failed_login']) && $_SESSION['failed_login'] >= $modSettings['failed_login_threshold'] * 3)
186
-		fatal_lang_error('login_threshold_fail', 'critical');
194
+	if (isset($_SESSION['failed_login']) && $_SESSION['failed_login'] >= $modSettings['failed_login_threshold'] * 3) {
195
+			fatal_lang_error('login_threshold_fail', 'critical');
196
+	}
187 197
 
188 198
 	// Set up the cookie length.  (if it's invalid, just fall through and use the default.)
189
-	if (isset($_POST['cookieneverexp']) || (!empty($_POST['cookielength']) && $_POST['cookielength'] == -1))
190
-		$modSettings['cookieTime'] = 3153600;
191
-	elseif (!empty($_POST['cookielength']) && ($_POST['cookielength'] >= 1 && $_POST['cookielength'] <= 525600))
192
-		$modSettings['cookieTime'] = (int) $_POST['cookielength'];
199
+	if (isset($_POST['cookieneverexp']) || (!empty($_POST['cookielength']) && $_POST['cookielength'] == -1)) {
200
+			$modSettings['cookieTime'] = 3153600;
201
+	} elseif (!empty($_POST['cookielength']) && ($_POST['cookielength'] >= 1 && $_POST['cookielength'] <= 525600)) {
202
+			$modSettings['cookieTime'] = (int) $_POST['cookielength'];
203
+	}
193 204
 
194 205
 	loadLanguage('Login');
195 206
 	// Load the template stuff.
@@ -301,8 +312,9 @@  discard block
 block discarded – undo
301 312
 			$other_passwords[] = crypt(md5($_POST['passwrd']), md5($_POST['passwrd']));
302 313
 
303 314
 			// Snitz style - SHA-256.  Technically, this is a downgrade, but most PHP configurations don't support sha256 anyway.
304
-			if (strlen($user_settings['passwd']) == 64 && function_exists('mhash') && defined('MHASH_SHA256'))
305
-				$other_passwords[] = bin2hex(mhash(MHASH_SHA256, $_POST['passwrd']));
315
+			if (strlen($user_settings['passwd']) == 64 && function_exists('mhash') && defined('MHASH_SHA256')) {
316
+							$other_passwords[] = bin2hex(mhash(MHASH_SHA256, $_POST['passwrd']));
317
+			}
306 318
 
307 319
 			// phpBB3 users new hashing.  We now support it as well ;).
308 320
 			$other_passwords[] = phpBB3_password_check($_POST['passwrd'], $user_settings['passwd']);
@@ -322,27 +334,29 @@  discard block
 block discarded – undo
322 334
 			// Some common md5 ones.
323 335
 			$other_passwords[] = md5($user_settings['password_salt'] . $_POST['passwrd']);
324 336
 			$other_passwords[] = md5($_POST['passwrd'] . $user_settings['password_salt']);
325
-		}
326
-		elseif (strlen($user_settings['passwd']) == 40)
337
+		} elseif (strlen($user_settings['passwd']) == 40)
327 338
 		{
328 339
 			// Maybe they are using a hash from before the password fix.
329 340
 			// This is also valid for SMF 1.1 to 2.0 style of hashing, changed to bcrypt in SMF 2.1
330 341
 			$other_passwords[] = sha1(strtolower($user_settings['member_name']) . un_htmlspecialchars($_POST['passwrd']));
331 342
 
332 343
 			// BurningBoard3 style of hashing.
333
-			if (!empty($modSettings['enable_password_conversion']))
334
-				$other_passwords[] = sha1($user_settings['password_salt'] . sha1($user_settings['password_salt'] . sha1($_POST['passwrd'])));
344
+			if (!empty($modSettings['enable_password_conversion'])) {
345
+							$other_passwords[] = sha1($user_settings['password_salt'] . sha1($user_settings['password_salt'] . sha1($_POST['passwrd'])));
346
+			}
335 347
 
336 348
 			// Perhaps we converted to UTF-8 and have a valid password being hashed differently.
337 349
 			if ($context['character_set'] == 'UTF-8' && !empty($modSettings['previousCharacterSet']) && $modSettings['previousCharacterSet'] != 'utf8')
338 350
 			{
339 351
 				// Try iconv first, for no particular reason.
340
-				if (function_exists('iconv'))
341
-					$other_passwords['iconv'] = sha1(strtolower(iconv('UTF-8', $modSettings['previousCharacterSet'], $user_settings['member_name'])) . un_htmlspecialchars(iconv('UTF-8', $modSettings['previousCharacterSet'], $_POST['passwrd'])));
352
+				if (function_exists('iconv')) {
353
+									$other_passwords['iconv'] = sha1(strtolower(iconv('UTF-8', $modSettings['previousCharacterSet'], $user_settings['member_name'])) . un_htmlspecialchars(iconv('UTF-8', $modSettings['previousCharacterSet'], $_POST['passwrd'])));
354
+				}
342 355
 
343 356
 				// Say it aint so, iconv failed!
344
-				if (empty($other_passwords['iconv']) && function_exists('mb_convert_encoding'))
345
-					$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'])));
357
+				if (empty($other_passwords['iconv']) && function_exists('mb_convert_encoding')) {
358
+									$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'])));
359
+				}
346 360
 			}
347 361
 		}
348 362
 
@@ -372,8 +386,9 @@  discard block
 block discarded – undo
372 386
 			$_SESSION['failed_login'] = isset($_SESSION['failed_login']) ? ($_SESSION['failed_login'] + 1) : 1;
373 387
 
374 388
 			// Hmm... don't remember it, do you?  Here, try the password reminder ;).
375
-			if ($_SESSION['failed_login'] >= $modSettings['failed_login_threshold'])
376
-				redirectexit('action=reminder');
389
+			if ($_SESSION['failed_login'] >= $modSettings['failed_login_threshold']) {
390
+							redirectexit('action=reminder');
391
+			}
377 392
 			// We'll give you another chance...
378 393
 			else
379 394
 			{
@@ -384,8 +399,7 @@  discard block
 block discarded – undo
384 399
 				return;
385 400
 			}
386 401
 		}
387
-	}
388
-	elseif (!empty($user_settings['passwd_flood']))
402
+	} elseif (!empty($user_settings['passwd_flood']))
389 403
 	{
390 404
 		// Let's be sure they weren't a little hacker.
391 405
 		validatePasswordFlood($user_settings['id_member'], $user_settings['passwd_flood'], true);
@@ -402,8 +416,9 @@  discard block
 block discarded – undo
402 416
 	}
403 417
 
404 418
 	// Check their activation status.
405
-	if (!checkActivation())
406
-		return;
419
+	if (!checkActivation()) {
420
+			return;
421
+	}
407 422
 
408 423
 	DoLogin();
409 424
 }
@@ -415,8 +430,9 @@  discard block
 block discarded – undo
415 430
 {
416 431
 	global $sourcedir, $txt, $context, $user_info, $modSettings, $scripturl;
417 432
 
418
-	if (!$user_info['is_guest'] || empty($context['tfa_member']) || empty($modSettings['tfa_mode']))
419
-		fatal_lang_error('no_access', false);
433
+	if (!$user_info['is_guest'] || empty($context['tfa_member']) || empty($modSettings['tfa_mode'])) {
434
+			fatal_lang_error('no_access', false);
435
+	}
420 436
 
421 437
 	loadLanguage('Profile');
422 438
 	require_once($sourcedir . '/Class-TOTP.php');
@@ -424,8 +440,9 @@  discard block
 block discarded – undo
424 440
 	$member = $context['tfa_member'];
425 441
 
426 442
 	// Prevent replay attacks by limiting at least 2 minutes before they can log in again via 2FA
427
-	if (time() - $member['last_login'] < 120)
428
-		fatal_lang_error('tfa_wait', false);
443
+	if (time() - $member['last_login'] < 120) {
444
+			fatal_lang_error('tfa_wait', false);
445
+	}
429 446
 
430 447
 	$totp = new \TOTP\Auth($member['tfa_secret']);
431 448
 	$totp->setRange(1);
@@ -439,8 +456,9 @@  discard block
 block discarded – undo
439 456
 	if (!empty($_POST['tfa_code']) && empty($_POST['tfa_backup']))
440 457
 	{
441 458
 		// Check to ensure we're forcing SSL for authentication
442
-		if (!empty($modSettings['force_ssl']) && empty($maintenance) && (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != 'on'))
443
-			fatal_lang_error('login_ssl_required');
459
+		if (!empty($modSettings['force_ssl']) && empty($maintenance) && (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != 'on')) {
460
+					fatal_lang_error('login_ssl_required');
461
+		}
444 462
 
445 463
 		$code = $_POST['tfa_code'];
446 464
 
@@ -450,20 +468,19 @@  discard block
 block discarded – undo
450 468
 
451 469
 			setTFACookie(3153600, $member['id_member'], hash_salt($member['tfa_backup'], $member['password_salt']), !empty($_POST['tfa_preserve']));
452 470
 			redirectexit();
453
-		}
454
-		else
471
+		} else
455 472
 		{
456 473
 			validatePasswordFlood($member['id_member'], $member['passwd_flood'], false, true);
457 474
 
458 475
 			$context['tfa_error'] = true;
459 476
 			$context['tfa_value'] = $_POST['tfa_code'];
460 477
 		}
461
-	}
462
-	elseif (!empty($_POST['tfa_backup']))
478
+	} elseif (!empty($_POST['tfa_backup']))
463 479
 	{
464 480
 		// Check to ensure we're forcing SSL for authentication
465
-		if (!empty($modSettings['force_ssl']) && empty($maintenance) && (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != 'on'))
466
-			fatal_lang_error('login_ssl_required');
481
+		if (!empty($modSettings['force_ssl']) && empty($maintenance) && (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != 'on')) {
482
+					fatal_lang_error('login_ssl_required');
483
+		}
467 484
 
468 485
 		$backup = $_POST['tfa_backup'];
469 486
 
@@ -477,8 +494,7 @@  discard block
 block discarded – undo
477 494
 			));
478 495
 			setTFACookie(3153600, $member['id_member'], hash_salt($member['tfa_backup'], $member['password_salt']));
479 496
 			redirectexit('action=profile;area=tfasetup;backup');
480
-		}
481
-		else
497
+		} else
482 498
 		{
483 499
 			validatePasswordFlood($member['id_member'], $member['passwd_flood'], false, true);
484 500
 
@@ -501,8 +517,9 @@  discard block
 block discarded – undo
501 517
 {
502 518
 	global $context, $txt, $scripturl, $user_settings, $modSettings;
503 519
 
504
-	if (!isset($context['login_errors']))
505
-		$context['login_errors'] = array();
520
+	if (!isset($context['login_errors'])) {
521
+			$context['login_errors'] = array();
522
+	}
506 523
 
507 524
 	// What is the true activation status of this account?
508 525
 	$activation_status = $user_settings['is_activated'] > 10 ? $user_settings['is_activated'] - 10 : $user_settings['is_activated'];
@@ -514,8 +531,9 @@  discard block
 block discarded – undo
514 531
 		return false;
515 532
 	}
516 533
 	// Awaiting approval still?
517
-	elseif ($activation_status == 3)
518
-		fatal_lang_error('still_awaiting_approval', 'user');
534
+	elseif ($activation_status == 3) {
535
+			fatal_lang_error('still_awaiting_approval', 'user');
536
+	}
519 537
 	// Awaiting deletion, changed their mind?
520 538
 	elseif ($activation_status == 4)
521 539
 	{
@@ -523,8 +541,7 @@  discard block
 block discarded – undo
523 541
 		{
524 542
 			updateMemberData($user_settings['id_member'], array('is_activated' => 1));
525 543
 			updateSettings(array('unapprovedMembers' => ($modSettings['unapprovedMembers'] > 0 ? $modSettings['unapprovedMembers'] - 1 : 0)));
526
-		}
527
-		else
544
+		} else
528 545
 		{
529 546
 			$context['disable_login_hashing'] = true;
530 547
 			$context['login_errors'][] = $txt['awaiting_delete_account'];
@@ -565,8 +582,9 @@  discard block
 block discarded – undo
565 582
 	setLoginCookie(60 * $modSettings['cookieTime'], $user_settings['id_member'], hash_salt($user_settings['passwd'], $user_settings['password_salt']));
566 583
 
567 584
 	// Reset the login threshold.
568
-	if (isset($_SESSION['failed_login']))
569
-		unset($_SESSION['failed_login']);
585
+	if (isset($_SESSION['failed_login'])) {
586
+			unset($_SESSION['failed_login']);
587
+	}
570 588
 
571 589
 	$user_info['is_guest'] = false;
572 590
 	$user_settings['additional_groups'] = explode(',', $user_settings['additional_groups']);
@@ -588,16 +606,18 @@  discard block
 block discarded – undo
588 606
 			'id_member' => $user_info['id'],
589 607
 		)
590 608
 	);
591
-	if ($smcFunc['db_num_rows']($request) == 1)
592
-		$_SESSION['first_login'] = true;
593
-	else
594
-		unset($_SESSION['first_login']);
609
+	if ($smcFunc['db_num_rows']($request) == 1) {
610
+			$_SESSION['first_login'] = true;
611
+	} else {
612
+			unset($_SESSION['first_login']);
613
+	}
595 614
 	$smcFunc['db_free_result']($request);
596 615
 
597 616
 	// You've logged in, haven't you?
598 617
 	$update = array('member_ip' => $user_info['ip'], 'member_ip2' => $_SERVER['BAN_CHECK_IP']);
599
-	if (empty($user_settings['tfa_secret']))
600
-		$update['last_login'] = time();
618
+	if (empty($user_settings['tfa_secret'])) {
619
+			$update['last_login'] = time();
620
+	}
601 621
 	updateMemberData($user_info['id'], $update);
602 622
 
603 623
 	// Get rid of the online entry for that old guest....
@@ -611,8 +631,8 @@  discard block
 block discarded – undo
611 631
 	$_SESSION['log_time'] = 0;
612 632
 
613 633
 	// Log this entry, only if we have it enabled.
614
-	if (!empty($modSettings['loginHistoryDays']))
615
-		$smcFunc['db_insert']('insert',
634
+	if (!empty($modSettings['loginHistoryDays'])) {
635
+			$smcFunc['db_insert']('insert',
616 636
 			'{db_prefix}member_logins',
617 637
 			array(
618 638
 				'id_member' => 'int', 'time' => 'int', 'ip' => 'inet', 'ip2' => 'inet',
@@ -624,13 +644,15 @@  discard block
 block discarded – undo
624 644
 				'id_member', 'time'
625 645
 			)
626 646
 		);
647
+	}
627 648
 
628 649
 	// Just log you back out if it's in maintenance mode and you AREN'T an admin.
629
-	if (empty($maintenance) || allowedTo('admin_forum'))
630
-		redirectexit('action=login2;sa=check;member=' . $user_info['id'], $context['server']['needs_login_fix']);
631
-	else
632
-		redirectexit('action=logout;' . $context['session_var'] . '=' . $context['session_id'], $context['server']['needs_login_fix']);
633
-}
650
+	if (empty($maintenance) || allowedTo('admin_forum')) {
651
+			redirectexit('action=login2;sa=check;member=' . $user_info['id'], $context['server']['needs_login_fix']);
652
+	} else {
653
+			redirectexit('action=logout;' . $context['session_var'] . '=' . $context['session_id'], $context['server']['needs_login_fix']);
654
+	}
655
+	}
634 656
 
635 657
 /**
636 658
  * Logs the current user out of their account.
@@ -646,13 +668,15 @@  discard block
 block discarded – undo
646 668
 	global $sourcedir, $user_info, $user_settings, $context, $smcFunc, $cookiename, $modSettings;
647 669
 
648 670
 	// Make sure they aren't being auto-logged out.
649
-	if (!$internal)
650
-		checkSession('get');
671
+	if (!$internal) {
672
+			checkSession('get');
673
+	}
651 674
 
652 675
 	require_once($sourcedir . '/Subs-Auth.php');
653 676
 
654
-	if (isset($_SESSION['pack_ftp']))
655
-		$_SESSION['pack_ftp'] = null;
677
+	if (isset($_SESSION['pack_ftp'])) {
678
+			$_SESSION['pack_ftp'] = null;
679
+	}
656 680
 
657 681
 	// It won't be first login anymore.
658 682
 	unset($_SESSION['first_login']);
@@ -680,24 +704,27 @@  discard block
 block discarded – undo
680 704
 
681 705
 	// And some other housekeeping while we're at it.
682 706
 	$salt = substr(md5(mt_rand()), 0, 4);
683
-	if (!empty($user_info['id']))
684
-		updateMemberData($user_info['id'], array('password_salt' => $salt));
707
+	if (!empty($user_info['id'])) {
708
+			updateMemberData($user_info['id'], array('password_salt' => $salt));
709
+	}
685 710
 
686 711
 	if (!empty($modSettings['tfa_mode']) && !empty($user_info['id']) && !empty($_COOKIE[$cookiename . '_tfa']))
687 712
 	{
688 713
 		$tfadata = smf_json_decode($_COOKIE[$cookiename . '_tfa'], true);
689 714
 
690 715
 		// If that failed, try the old method
691
-		if (is_null($tfadata))
692
-			$tfadata = safe_unserialize($_COOKIE[$cookiename . '_tfa']);
716
+		if (is_null($tfadata)) {
717
+					$tfadata = safe_unserialize($_COOKIE[$cookiename . '_tfa']);
718
+		}
693 719
 
694 720
 		list ($tfamember, $tfasecret, $exp, $state, $preserve) = $tfadata;
695 721
 
696 722
 		// If we're preserving the cookie, reset it with updated salt
697
-		if ($preserve && time() < $exp)
698
-			setTFACookie(3153600, $user_info['id'], hash_salt($user_settings['tfa_backup'], $salt), true);
699
-		else
700
-			setTFACookie(-3600, 0, '');
723
+		if ($preserve && time() < $exp) {
724
+					setTFACookie(3153600, $user_info['id'], hash_salt($user_settings['tfa_backup'], $salt), true);
725
+		} else {
726
+					setTFACookie(-3600, 0, '');
727
+		}
701 728
 	}
702 729
 
703 730
 	session_destroy();
@@ -705,14 +732,13 @@  discard block
 block discarded – undo
705 732
 	// Off to the merry board index we go!
706 733
 	if ($redirect)
707 734
 	{
708
-		if (empty($_SESSION['logout_url']))
709
-			redirectexit('', $context['server']['needs_login_fix']);
710
-		elseif (!empty($_SESSION['logout_url']) && (strpos($_SESSION['logout_url'], 'http://') === false && strpos($_SESSION['logout_url'], 'https://') === false))
735
+		if (empty($_SESSION['logout_url'])) {
736
+					redirectexit('', $context['server']['needs_login_fix']);
737
+		} elseif (!empty($_SESSION['logout_url']) && (strpos($_SESSION['logout_url'], 'http://') === false && strpos($_SESSION['logout_url'], 'https://') === false))
711 738
 		{
712 739
 			unset ($_SESSION['logout_url']);
713 740
 			redirectexit();
714
-		}
715
-		else
741
+		} else
716 742
 		{
717 743
 			$temp = $_SESSION['logout_url'];
718 744
 			unset($_SESSION['logout_url']);
@@ -745,8 +771,9 @@  discard block
 block discarded – undo
745 771
 function phpBB3_password_check($passwd, $passwd_hash)
746 772
 {
747 773
 	// Too long or too short?
748
-	if (strlen($passwd_hash) != 34)
749
-		return;
774
+	if (strlen($passwd_hash) != 34) {
775
+			return;
776
+	}
750 777
 
751 778
 	// Range of characters allowed.
752 779
 	$range = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
@@ -758,8 +785,9 @@  discard block
 block discarded – undo
758 785
 	$salt = substr($passwd_hash, 4, 8);
759 786
 
760 787
 	$hash = md5($salt . $passwd, true);
761
-	for (; $count != 0; --$count)
762
-		$hash = md5($hash . $passwd, true);
788
+	for (; $count != 0; --$count) {
789
+			$hash = md5($hash . $passwd, true);
790
+	}
763 791
 
764 792
 	$output = substr($passwd_hash, 0, 12);
765 793
 	$i = 0;
@@ -768,21 +796,25 @@  discard block
 block discarded – undo
768 796
 		$value = ord($hash[$i++]);
769 797
 		$output .= $range[$value & 0x3f];
770 798
 
771
-		if ($i < 16)
772
-			$value |= ord($hash[$i]) << 8;
799
+		if ($i < 16) {
800
+					$value |= ord($hash[$i]) << 8;
801
+		}
773 802
 
774 803
 		$output .= $range[($value >> 6) & 0x3f];
775 804
 
776
-		if ($i++ >= 16)
777
-			break;
805
+		if ($i++ >= 16) {
806
+					break;
807
+		}
778 808
 
779
-		if ($i < 16)
780
-			$value |= ord($hash[$i]) << 16;
809
+		if ($i < 16) {
810
+					$value |= ord($hash[$i]) << 16;
811
+		}
781 812
 
782 813
 		$output .= $range[($value >> 12) & 0x3f];
783 814
 
784
-		if ($i++ >= 16)
785
-			break;
815
+		if ($i++ >= 16) {
816
+					break;
817
+		}
786 818
 
787 819
 		$output .= $range[($value >> 18) & 0x3f];
788 820
 	}
@@ -813,8 +845,9 @@  discard block
 block discarded – undo
813 845
 		require_once($sourcedir . '/Subs-Auth.php');
814 846
 		setLoginCookie(-3600, 0);
815 847
 
816
-		if (isset($_SESSION['login_' . $cookiename]))
817
-			unset($_SESSION['login_' . $cookiename]);
848
+		if (isset($_SESSION['login_' . $cookiename])) {
849
+					unset($_SESSION['login_' . $cookiename]);
850
+		}
818 851
 	}
819 852
 
820 853
 	// We need a member!
@@ -828,8 +861,9 @@  discard block
 block discarded – undo
828 861
 	}
829 862
 
830 863
 	// Right, have we got a flood value?
831
-	if ($password_flood_value !== false)
832
-		@list ($time_stamp, $number_tries) = explode('|', $password_flood_value);
864
+	if ($password_flood_value !== false) {
865
+			@list ($time_stamp, $number_tries) = explode('|', $password_flood_value);
866
+	}
833 867
 
834 868
 	// Timestamp or number of tries invalid?
835 869
 	if (empty($number_tries) || empty($time_stamp))
@@ -845,15 +879,17 @@  discard block
 block discarded – undo
845 879
 		$number_tries = $time_stamp < time() - 20 ? 2 : $number_tries;
846 880
 
847 881
 		// They are trying too fast, make them wait longer
848
-		if ($time_stamp < time() - 10)
849
-			$time_stamp = time();
882
+		if ($time_stamp < time() - 10) {
883
+					$time_stamp = time();
884
+		}
850 885
 	}
851 886
 
852 887
 	$number_tries++;
853 888
 
854 889
 	// Broken the law?
855
-	if ($number_tries > 5)
856
-		fatal_lang_error('login_threshold_brute_fail', 'critical');
890
+	if ($number_tries > 5) {
891
+			fatal_lang_error('login_threshold_brute_fail', 'critical');
892
+	}
857 893
 
858 894
 	// Otherwise set the members data. If they correct on their first attempt then we actually clear it, otherwise we set it!
859 895
 	updateMemberData($id_member, array('passwd_flood' => $was_correct && $number_tries == 1 ? '' : $time_stamp . '|' . $number_tries));
Please login to merge, or discard this patch.
Sources/Subs-BoardIndex.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@
 block discarded – undo
107 107
 					'new' => false,
108 108
 					'css_class' => '',
109 109
 				);
110
-				$categories[$row_board['id_cat']]['link'] = '<a id="c' . $row_board['id_cat'] . '"></a>' . (!$context['user']['is_guest'] ? '<a href="' . $scripturl . '?action=unread;c='. $row_board['id_cat'] . '" title="' . sprintf($txt['new_posts_in_category'], strip_tags($row_board['cat_name'])) . '">' . $row_board['cat_name'] . '</a>' : $row_board['cat_name']);
110
+				$categories[$row_board['id_cat']]['link'] = '<a id="c' . $row_board['id_cat'] . '"></a>' . (!$context['user']['is_guest'] ? '<a href="' . $scripturl . '?action=unread;c=' . $row_board['id_cat'] . '" title="' . sprintf($txt['new_posts_in_category'], strip_tags($row_board['cat_name'])) . '">' . $row_board['cat_name'] . '</a>' : $row_board['cat_name']);
111 111
 			}
112 112
 
113 113
 			// If this board has new posts in it (and isn't the recycle bin!) then the category is new.
Please login to merge, or discard this patch.
Braces   +60 added lines, -47 removed lines patch added patch discarded remove patch
@@ -14,8 +14,9 @@  discard block
 block discarded – undo
14 14
  * @version 2.1 Beta 3
15 15
  */
16 16
 
17
-if (!defined('SMF'))
17
+if (!defined('SMF')) {
18 18
 	die('No direct access...');
19
+}
19 20
 
20 21
 /**
21 22
  * Fetches a list of boards and (optional) categories including
@@ -37,11 +38,12 @@  discard block
 block discarded – undo
37 38
 	require_once($sourcedir . '/Subs-Boards.php');
38 39
 
39 40
 	// For performance, track the latest post while going through the boards.
40
-	if (!empty($boardIndexOptions['set_latest_post']))
41
-		$latest_post = array(
41
+	if (!empty($boardIndexOptions['set_latest_post'])) {
42
+			$latest_post = array(
42 43
 			'timestamp' => 0,
43 44
 			'ref' => 0,
44 45
 		);
46
+	}
45 47
 
46 48
 	// Find all boards and categories, as well as related information.  This will be sorted by the natural order of boards and categories, which we control.
47 49
 	$result_boards = $smcFunc['db_query']('boardindex_fetch_boards', '
@@ -74,10 +76,11 @@  discard block
 block discarded – undo
74 76
 	);
75 77
 
76 78
 	// Start with an empty array.
77
-	if ($boardIndexOptions['include_categories'])
78
-		$categories = array();
79
-	else
80
-		$this_category = array();
79
+	if ($boardIndexOptions['include_categories']) {
80
+			$categories = array();
81
+	} else {
82
+			$this_category = array();
83
+	}
81 84
 	$boards = array();
82 85
 
83 86
 	// Run through the categories and boards (or only boards)....
@@ -88,8 +91,9 @@  discard block
 block discarded – undo
88 91
 		$row_board['is_read'] = !empty($row_board['is_read']) || $ignoreThisBoard ? '1' : '0';
89 92
 
90 93
 		// Add parent boards to the $boards list later used to fetch moderators
91
-		if ($row_board['id_parent'] == $boardIndexOptions['parent_id'])
92
-			$boards[] = $row_board['id_board'];
94
+		if ($row_board['id_parent'] == $boardIndexOptions['parent_id']) {
95
+					$boards[] = $row_board['id_board'];
96
+		}
93 97
 
94 98
 		if ($boardIndexOptions['include_categories'])
95 99
 		{
@@ -111,8 +115,9 @@  discard block
 block discarded – undo
111 115
 			}
112 116
 
113 117
 			// If this board has new posts in it (and isn't the recycle bin!) then the category is new.
114
-			if (empty($modSettings['recycle_enable']) || $modSettings['recycle_board'] != $row_board['id_board'])
115
-				$categories[$row_board['id_cat']]['new'] |= empty($row_board['is_read']) && $row_board['poster_name'] != '';
118
+			if (empty($modSettings['recycle_enable']) || $modSettings['recycle_board'] != $row_board['id_board']) {
119
+							$categories[$row_board['id_cat']]['new'] |= empty($row_board['is_read']) && $row_board['poster_name'] != '';
120
+			}
116 121
 
117 122
 			// Avoid showing category unread link where it only has redirection boards.
118 123
 			$categories[$row_board['id_cat']]['show_unread'] = !empty($categories[$row_board['id_cat']]['show_unread']) ? 1 : !$row_board['is_redirect'];
@@ -160,14 +165,12 @@  discard block
 block discarded – undo
160 165
 				{
161 166
 					$this_category[$row_board['id_board']]['board_class'] = 'redirect';
162 167
 					$this_category[$row_board['id_board']]['board_tooltip'] = $txt['redirect_board'];
163
-				}
164
-				elseif ($this_category[$row_board['id_board']]['new'] || $context['user']['is_guest'])
168
+				} elseif ($this_category[$row_board['id_board']]['new'] || $context['user']['is_guest'])
165 169
 				{
166 170
 					// If we're showing to guests, we want to give them the idea that something interesting is going on!
167 171
 					$this_category[$row_board['id_board']]['board_class'] = 'on';
168 172
 					$this_category[$row_board['id_board']]['board_tooltip'] = $txt['new_posts'];
169
-				}
170
-				else
173
+				} else
171 174
 				{
172 175
 					$this_category[$row_board['id_board']]['board_tooltip'] = $txt['old_posts'];
173 176
 				}
@@ -218,14 +221,16 @@  discard block
 block discarded – undo
218 221
 		// Child of a child... just add it on...
219 222
 		elseif (!empty($boardIndexOptions['countChildPosts']))
220 223
 		{
221
-			if (!isset($parent_map))
222
-				$parent_map = array();
224
+			if (!isset($parent_map)) {
225
+							$parent_map = array();
226
+			}
223 227
 
224
-			if (!isset($parent_map[$row_board['id_parent']]))
225
-				foreach ($this_category as $id => $board)
228
+			if (!isset($parent_map[$row_board['id_parent']])) {
229
+							foreach ($this_category as $id => $board)
226 230
 				{
227 231
 					if (!isset($board['children'][$row_board['id_parent']]))
228 232
 						continue;
233
+			}
229 234
 
230 235
 					$parent_map[$row_board['id_parent']] = array(&$this_category[$id], &$this_category[$id]['children'][$row_board['id_parent']]);
231 236
 					$parent_map[$row_board['id_board']] = array(&$this_category[$id], &$this_category[$id]['children'][$row_board['id_parent']]);
@@ -246,8 +251,9 @@  discard block
 block discarded – undo
246 251
 			continue;
247 252
 		}
248 253
 		// Found a child of a child - skip.
249
-		else
250
-			continue;
254
+		else {
255
+					continue;
256
+		}
251 257
 
252 258
 		// Prepare the subject, and make sure it's not too long.
253 259
 		censorText($row_board['subject']);
@@ -268,12 +274,13 @@  discard block
 block discarded – undo
268 274
 			'topic' => $row_board['id_topic']
269 275
 		);
270 276
 
271
-		if (!empty($settings['avatars_on_boardIndex']))
272
-			$this_last_post['member']['avatar'] = set_avatar_data(array(
277
+		if (!empty($settings['avatars_on_boardIndex'])) {
278
+					$this_last_post['member']['avatar'] = set_avatar_data(array(
273 279
 				'avatar' => $row_board['avatar'],
274 280
 				'email' => $row_board['email_address'],
275 281
 				'filename' => !empty($row['member_filename']) ? $row_board['member_filename'] : '',
276 282
 			));
283
+		}
277 284
 
278 285
 		// Provide the href and link.
279 286
 		if ($row_board['subject'] != '')
@@ -285,8 +292,7 @@  discard block
 block discarded – undo
285 292
 			link, href, subject, start (where they should go for the first unread post.),
286 293
 			and member. (which has id, name, link, href, username in it.) */
287 294
 			$this_last_post['last_post_message'] = sprintf($txt['last_post_message'], $this_last_post['member']['link'], $this_last_post['link'], $this_last_post['time']);
288
-		}
289
-		else
295
+		} else
290 296
 		{
291 297
 			$this_last_post['href'] = '';
292 298
 			$this_last_post['link'] = $txt['not_applicable'];
@@ -294,8 +300,9 @@  discard block
 block discarded – undo
294 300
 		}
295 301
 
296 302
 		// Set the last post in the parent board.
297
-		if ($row_board['id_parent'] == $boardIndexOptions['parent_id'] || ($isChild && !empty($row_board['poster_time']) && $this_category[$row_board['id_parent']]['last_post']['timestamp'] < forum_time(true, $row_board['poster_time'])))
298
-			$this_category[$isChild ? $row_board['id_parent'] : $row_board['id_board']]['last_post'] = $this_last_post;
303
+		if ($row_board['id_parent'] == $boardIndexOptions['parent_id'] || ($isChild && !empty($row_board['poster_time']) && $this_category[$row_board['id_parent']]['last_post']['timestamp'] < forum_time(true, $row_board['poster_time']))) {
304
+					$this_category[$isChild ? $row_board['id_parent'] : $row_board['id_board']]['last_post'] = $this_last_post;
305
+		}
299 306
 		// Just in the child...?
300 307
 		if ($isChild)
301 308
 		{
@@ -305,15 +312,17 @@  discard block
 block discarded – undo
305 312
 			$this_category[$row_board['id_parent']]['children'][$row_board['id_board']]['new'] &= $row_board['poster_name'] != '';
306 313
 		}
307 314
 		// No last post for this board?  It's not new then, is it..?
308
-		elseif ($row_board['poster_name'] == '')
309
-			$this_category[$row_board['id_board']]['new'] = false;
315
+		elseif ($row_board['poster_name'] == '') {
316
+					$this_category[$row_board['id_board']]['new'] = false;
317
+		}
310 318
 
311 319
 		// Determine a global most recent topic.
312
-		if (!empty($boardIndexOptions['set_latest_post']) && !empty($row_board['poster_time']) && $row_board['poster_time'] > $latest_post['timestamp'] && !$ignoreThisBoard)
313
-			$latest_post = array(
320
+		if (!empty($boardIndexOptions['set_latest_post']) && !empty($row_board['poster_time']) && $row_board['poster_time'] > $latest_post['timestamp'] && !$ignoreThisBoard) {
321
+					$latest_post = array(
314 322
 				'timestamp' => $row_board['poster_time'],
315 323
 				'ref' => &$this_category[$isChild ? $row_board['id_parent'] : $row_board['id_board']]['last_post'],
316 324
 			);
325
+		}
317 326
 	}
318 327
 	$smcFunc['db_free_result']($result_boards);
319 328
 
@@ -330,8 +339,9 @@  discard block
 block discarded – undo
330 339
 				if (!empty($moderators[$board['id']]))
331 340
 				{
332 341
 					$categories[$k]['boards'][$j]['moderators'] = $moderators[$board['id']];
333
-					foreach ($moderators[$board['id']] as $moderator)
334
-						$categories[$k]['boards'][$j]['link_moderators'][] = $moderator['link'];
342
+					foreach ($moderators[$board['id']] as $moderator) {
343
+											$categories[$k]['boards'][$j]['link_moderators'][] = $moderator['link'];
344
+					}
335 345
 				}
336 346
 				if (!empty($groups[$board['id']]))
337 347
 				{
@@ -344,16 +354,16 @@  discard block
 block discarded – undo
344 354
 				}
345 355
 			}
346 356
 		}
347
-	}
348
-	else
357
+	} else
349 358
 	{
350 359
 		foreach ($this_category as $k => $board)
351 360
 		{
352 361
 			if (!empty($moderators[$board['id']]))
353 362
 			{
354 363
 				$this_category[$k]['moderators'] = $moderators[$board['id']];
355
-				foreach ($moderators[$board['id']] as $moderator)
356
-					$this_category[$k]['link_moderators'][] = $moderator['link'];
364
+				foreach ($moderators[$board['id']] as $moderator) {
365
+									$this_category[$k]['link_moderators'][] = $moderator['link'];
366
+				}
357 367
 			}
358 368
 			if (!empty($groups[$board['id']]))
359 369
 			{
@@ -367,20 +377,23 @@  discard block
 block discarded – undo
367 377
 		}
368 378
 	}
369 379
 
370
-	if ($boardIndexOptions['include_categories'])
371
-		sortCategories($categories);
372
-	else
373
-		sortBoards($this_category);
380
+	if ($boardIndexOptions['include_categories']) {
381
+			sortCategories($categories);
382
+	} else {
383
+			sortBoards($this_category);
384
+	}
374 385
 
375 386
 	// By now we should know the most recent post...if we wanna know it that is.
376
-	if (!empty($boardIndexOptions['set_latest_post']) && !empty($latest_post['ref']))
377
-		$context['latest_post'] = $latest_post['ref'];
387
+	if (!empty($boardIndexOptions['set_latest_post']) && !empty($latest_post['ref'])) {
388
+			$context['latest_post'] = $latest_post['ref'];
389
+	}
378 390
 
379 391
 	// I can't remember why but trying to make a ternary to get this all in one line is actually a Very Bad Idea.
380
-	if ($boardIndexOptions['include_categories'])
381
-		call_integration_hook('integrate_getboardtree', array($boardIndexOptions, &$categories));
382
-	else
383
-		call_integration_hook('integrate_getboardtree', array($boardIndexOptions, &$this_category));
392
+	if ($boardIndexOptions['include_categories']) {
393
+			call_integration_hook('integrate_getboardtree', array($boardIndexOptions, &$categories));
394
+	} else {
395
+			call_integration_hook('integrate_getboardtree', array($boardIndexOptions, &$this_category));
396
+	}
384 397
 
385 398
 	return $boardIndexOptions['include_categories'] ? $categories : $this_category;
386 399
 }
Please login to merge, or discard this patch.
Sources/Mentions.php 1 patch
Braces   +26 added lines, -18 removed lines patch added patch discarded remove patch
@@ -50,8 +50,8 @@  discard block
 block discarded – undo
50 50
 			)
51 51
 		);
52 52
 		$members = array();
53
-		while ($row = $smcFunc['db_fetch_assoc']($request))
54
-			$members[$row['id_member']] = array(
53
+		while ($row = $smcFunc['db_fetch_assoc']($request)) {
54
+					$members[$row['id_member']] = array(
55 55
 				'id' => $row['id_member'],
56 56
 				'real_name' => $row['real_name'],
57 57
 				'email_address' => $row['email_address'],
@@ -62,6 +62,7 @@  discard block
 block discarded – undo
62 62
 				),
63 63
 				'lngfile' => $row['lngfile'],
64 64
 			);
65
+		}
65 66
 		$smcFunc['db_free_result']($request);
66 67
 
67 68
 		return $members;
@@ -83,13 +84,14 @@  discard block
 block discarded – undo
83 84
 
84 85
 		call_integration_hook('mention_insert_' . $content_type, array($content_id, &$members));
85 86
 
86
-		foreach ($members as $member)
87
-			$smcFunc['db_insert']('ignore',
87
+		foreach ($members as $member) {
88
+					$smcFunc['db_insert']('ignore',
88 89
 				'{db_prefix}mentions',
89 90
 				array('content_id' => 'int', 'content_type' => 'string', 'id_member' => 'int', 'id_mentioned' => 'int', 'time' => 'int'),
90 91
 				array((int) $content_id, $content_type, $id_member, $member['id'], time()),
91 92
 				array('content_id', 'content_type', 'id_mentioned')
92 93
 			);
94
+		}
93 95
 	}
94 96
 
95 97
 	/**
@@ -103,8 +105,9 @@  discard block
 block discarded – undo
103 105
 	 */
104 106
 	public static function getBody($body, array $members)
105 107
 	{
106
-		foreach ($members as $member)
107
-			$body = str_ireplace(static::$char . $member['real_name'], '[member=' . $member['id'] . ']' . $member['real_name'] . '[/member]', $body);
108
+		foreach ($members as $member) {
109
+					$body = str_ireplace(static::$char . $member['real_name'], '[member=' . $member['id'] . ']' . $member['real_name'] . '[/member]', $body);
110
+		}
108 111
 
109 112
 		return $body;
110 113
 	}
@@ -123,8 +126,9 @@  discard block
 block discarded – undo
123 126
 
124 127
 		$possible_names = self::getPossibleMentions($body);
125 128
 
126
-		if (empty($possible_names) || !allowedTo('mention'))
127
-			return array();
129
+		if (empty($possible_names) || !allowedTo('mention')) {
130
+					return array();
131
+		}
128 132
 
129 133
 		$request = $smcFunc['db_query']('', '
130 134
 			SELECT id_member, real_name
@@ -140,8 +144,9 @@  discard block
 block discarded – undo
140 144
 		$members = array();
141 145
 		while ($row = $smcFunc['db_fetch_assoc']($request))
142 146
 		{
143
-			if (stripos($body, static::$char . $row['real_name']) === false)
144
-				continue;
147
+			if (stripos($body, static::$char . $row['real_name']) === false) {
148
+							continue;
149
+			}
145 150
 
146 151
 			$members[$row['id_member']] = array(
147 152
 				'id' => $row['id_member'],
@@ -185,8 +190,9 @@  discard block
 block discarded – undo
185 190
 		$body = htmlspecialchars_decode(preg_replace('~<br\s*/?\>~', "\n", str_replace('&nbsp;', ' ', $body)), ENT_QUOTES);
186 191
 
187 192
 		// Remove quotes, we don't want to get double mentions.
188
-		while (preg_match('~\[quote[^\]]*\](.+?)\[\/quote\]~s', $body))
189
-			$body = preg_replace('~\[quote[^\]]*\](.+?)\[\/quote\]~s', '', $body);
193
+		while (preg_match('~\[quote[^\]]*\](.+?)\[\/quote\]~s', $body)) {
194
+					$body = preg_replace('~\[quote[^\]]*\](.+?)\[\/quote\]~s', '', $body);
195
+		}
190 196
 
191 197
 		$matches = array();
192 198
 		$string = str_split($body);
@@ -197,9 +203,9 @@  discard block
 block discarded – undo
197 203
 			{
198 204
 				$depth++;
199 205
 				$matches[] = array();
206
+			} elseif ($char == "\n") {
207
+							$depth = 0;
200 208
 			}
201
-			elseif ($char == "\n")
202
-				$depth = 0;
203 209
 
204 210
 			for ($i = $depth; $i > 0; $i--)
205 211
 			{
@@ -212,8 +218,9 @@  discard block
 block discarded – undo
212 218
 			}
213 219
 		}
214 220
 
215
-		foreach ($matches as $k => $match)
216
-			$matches[$k] = substr(implode('', $match), 1);
221
+		foreach ($matches as $k => $match) {
222
+					$matches[$k] = substr(implode('', $match), 1);
223
+		}
217 224
 
218 225
 		// Names can have spaces, other breaks, or they can't...we try to match every possible
219 226
 		// combination.
@@ -222,8 +229,9 @@  discard block
 block discarded – undo
222 229
 		{
223 230
 			$match = preg_split('/([^\w])/', $match, -1, PREG_SPLIT_DELIM_CAPTURE);
224 231
 
225
-			for ($i = 1; $i <= count($match); $i++)
226
-				$names[] = $smcFunc['htmlspecialchars']($smcFunc['htmltrim'](implode('', array_slice($match, 0, $i))));
232
+			for ($i = 1; $i <= count($match); $i++) {
233
+							$names[] = $smcFunc['htmlspecialchars']($smcFunc['htmltrim'](implode('', array_slice($match, 0, $i))));
234
+			}
227 235
 		}
228 236
 
229 237
 		$names = array_unique($names);
Please login to merge, or discard this patch.
Sources/ManageNews.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 					'value' => $txt['admin_edit_news'],
153 153
 				),
154 154
 				'data' => array(
155
-					'function' => function ($news)
155
+					'function' => function($news)
156 156
 					{
157 157
 						if (is_numeric($news['id']))
158 158
 							return '<textarea id="data_' . $news['id'] . '" rows="3" cols="50" name="news[]" class="padding block">' . $news['unparsed'] . '</textarea>
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 					'value' => $txt['preview'],
169 169
 				),
170 170
 				'data' => array(
171
-					'function' => function ($news)
171
+					'function' => function($news)
172 172
 					{
173 173
 						return '<div id="box_preview_' . $news['id'] . '" style="overflow: auto; width: 100%; height: 10ex;">' . $news['parsed'] . '</div>';
174 174
 					},
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 					'class' => 'centercol',
182 182
 				),
183 183
 				'data' => array(
184
-					'function' => function ($news)
184
+					'function' => function($news)
185 185
 					{
186 186
 						if (is_numeric($news['id']))
187 187
 							return '<input type="checkbox" name="remove[]" value="' . $news['id'] . '" class="input_check">';
@@ -431,7 +431,7 @@  discard block
 block discarded – undo
431 431
  * Prepare subject and message of an email for the preview box
432 432
  * Used in ComposeMailing and RetrievePreview (Xml.php)
433 433
  */
434
-function prepareMailingForPreview ()
434
+function prepareMailingForPreview()
435 435
 {
436 436
 	global $context, $modSettings, $scripturl, $user_info, $txt;
437 437
 	loadLanguage('Errors');
@@ -635,7 +635,7 @@  discard block
 block discarded – undo
635 635
 		$request = $smcFunc['db_query']('', '
636 636
 			SELECT id_member
637 637
 			FROM {db_prefix}members
638
-			WHERE email_address IN(' . implode(', ', $condition_array) .')',
638
+			WHERE email_address IN(' . implode(', ', $condition_array) . ')',
639 639
 			$condition_array_params
640 640
 		);
641 641
 		while ($row = $smcFunc['db_fetch_assoc']($request))
Please login to merge, or discard this patch.
Braces   +141 added lines, -104 removed lines patch added patch discarded remove patch
@@ -13,8 +13,9 @@  discard block
 block discarded – undo
13 13
  * @version 2.1 Beta 3
14 14
  */
15 15
 
16
-if (!defined('SMF'))
16
+if (!defined('SMF')) {
17 17
 	die('No direct access...');
18
+}
18 19
 
19 20
 /**
20 21
  * The news dispatcher; doesn't do anything, just delegates.
@@ -67,8 +68,9 @@  discard block
 block discarded – undo
67 68
 	);
68 69
 
69 70
 	// Force the right area...
70
-	if (substr($_REQUEST['sa'], 0, 7) == 'mailing')
71
-		$context[$context['admin_menu_name']]['current_subsection'] = 'mailingmembers';
71
+	if (substr($_REQUEST['sa'], 0, 7) == 'mailing') {
72
+			$context[$context['admin_menu_name']]['current_subsection'] = 'mailingmembers';
73
+	}
72 74
 
73 75
 	call_helper($subActions[$_REQUEST['sa']][0]);
74 76
 }
@@ -99,9 +101,10 @@  discard block
 block discarded – undo
99 101
 		$temp_news = explode("\n", $modSettings['news']);
100 102
 
101 103
 		// Remove the items that were selected.
102
-		foreach ($temp_news as $i => $news)
103
-			if (in_array($i, $_POST['remove']))
104
+		foreach ($temp_news as $i => $news) {
105
+					if (in_array($i, $_POST['remove']))
104 106
 				unset($temp_news[$i]);
107
+		}
105 108
 
106 109
 		// Update the database.
107 110
 		updateSettings(array('news' => implode("\n", $temp_news)));
@@ -117,9 +120,9 @@  discard block
 block discarded – undo
117 120
 
118 121
 		foreach ($_POST['news'] as $i => $news)
119 122
 		{
120
-			if (trim($news) == '')
121
-				unset($_POST['news'][$i]);
122
-			else
123
+			if (trim($news) == '') {
124
+							unset($_POST['news'][$i]);
125
+			} else
123 126
 			{
124 127
 				$_POST['news'][$i] = $smcFunc['htmlspecialchars']($_POST['news'][$i], ENT_QUOTES);
125 128
 				preparsecode($_POST['news'][$i]);
@@ -154,11 +157,12 @@  discard block
 block discarded – undo
154 157
 				'data' => array(
155 158
 					'function' => function ($news)
156 159
 					{
157
-						if (is_numeric($news['id']))
158
-							return '<textarea id="data_' . $news['id'] . '" rows="3" cols="50" name="news[]" class="padding block">' . $news['unparsed'] . '</textarea>
160
+						if (is_numeric($news['id'])) {
161
+													return '<textarea id="data_' . $news['id'] . '" rows="3" cols="50" name="news[]" class="padding block">' . $news['unparsed'] . '</textarea>
159 162
 							<div class="floatleft" id="preview_' . $news['id'] . '"></div>';
160
-						else
161
-							return $news['unparsed'];
163
+						} else {
164
+													return $news['unparsed'];
165
+						}
162 166
 					},
163 167
 					'style' => 'width: 50%;',
164 168
 				),
@@ -183,10 +187,11 @@  discard block
 block discarded – undo
183 187
 				'data' => array(
184 188
 					'function' => function ($news)
185 189
 					{
186
-						if (is_numeric($news['id']))
187
-							return '<input type="checkbox" name="remove[]" value="' . $news['id'] . '" class="input_check">';
188
-						else
189
-							return '';
190
+						if (is_numeric($news['id'])) {
191
+													return '<input type="checkbox" name="remove[]" value="' . $news['id'] . '" class="input_check">';
192
+						} else {
193
+													return '';
194
+						}
190 195
 					},
191 196
 					'class' => 'centercol',
192 197
 				),
@@ -280,12 +285,13 @@  discard block
 block discarded – undo
280 285
 
281 286
 	$admin_current_news = array();
282 287
 	// Ready the current news.
283
-	foreach (explode("\n", $modSettings['news']) as $id => $line)
284
-		$admin_current_news[$id] = array(
288
+	foreach (explode("\n", $modSettings['news']) as $id => $line) {
289
+			$admin_current_news[$id] = array(
285 290
 			'id' => $id,
286 291
 			'unparsed' => un_preparsecode($line),
287 292
 			'parsed' => preg_replace('~<([/]?)form[^>]*?[>]*>~i', '<em class="smalltext">&lt;$1form&gt;</em>', parse_bbc($line)),
288 293
 		);
294
+	}
289 295
 
290 296
 	$admin_current_news['last'] = array(
291 297
 		'id' => 'last',
@@ -352,10 +358,11 @@  discard block
 block discarded – undo
352 358
 			'member_count' => 0,
353 359
 		);
354 360
 
355
-		if ($row['min_posts'] == -1)
356
-			$normalGroups[$row['id_group']] = $row['id_group'];
357
-		else
358
-			$postGroups[$row['id_group']] = $row['id_group'];
361
+		if ($row['min_posts'] == -1) {
362
+					$normalGroups[$row['id_group']] = $row['id_group'];
363
+		} else {
364
+					$postGroups[$row['id_group']] = $row['id_group'];
365
+		}
359 366
 	}
360 367
 	$smcFunc['db_free_result']($request);
361 368
 
@@ -371,8 +378,9 @@  discard block
 block discarded – undo
371 378
 				'post_group_list' => $postGroups,
372 379
 			)
373 380
 		);
374
-		while ($row = $smcFunc['db_fetch_assoc']($query))
375
-			$context['groups'][$row['id_group']]['member_count'] += $row['member_count'];
381
+		while ($row = $smcFunc['db_fetch_assoc']($query)) {
382
+					$context['groups'][$row['id_group']]['member_count'] += $row['member_count'];
383
+		}
376 384
 		$smcFunc['db_free_result']($query);
377 385
 	}
378 386
 
@@ -388,8 +396,9 @@  discard block
 block discarded – undo
388 396
 				'normal_group_list' => $normalGroups,
389 397
 			)
390 398
 		);
391
-		while ($row = $smcFunc['db_fetch_assoc']($query))
392
-			$context['groups'][$row['id_group']]['member_count'] += $row['member_count'];
399
+		while ($row = $smcFunc['db_fetch_assoc']($query)) {
400
+					$context['groups'][$row['id_group']]['member_count'] += $row['member_count'];
401
+		}
393 402
 		$smcFunc['db_free_result']($query);
394 403
 
395 404
 		// Also do those who have it as an additional membergroup - this ones more yucky...
@@ -406,8 +415,9 @@  discard block
 block discarded – undo
406 415
 				'blank_string' => '',
407 416
 			)
408 417
 		);
409
-		while ($row = $smcFunc['db_fetch_assoc']($query))
410
-			$context['groups'][$row['id_group']]['member_count'] += $row['member_count'];
418
+		while ($row = $smcFunc['db_fetch_assoc']($query)) {
419
+					$context['groups'][$row['id_group']]['member_count'] += $row['member_count'];
420
+		}
411 421
 		$smcFunc['db_free_result']($query);
412 422
 	}
413 423
 
@@ -458,10 +468,11 @@  discard block
 block discarded – undo
458 468
 	{
459 469
 		$context[$key] = !empty($_REQUEST[$post]) ? $_REQUEST[$post] : '';
460 470
 
461
-		if (empty($context[$key]) && empty($_REQUEST['xml']))
462
-			$context['post_error']['messages'][] = $txt['error_no_' . $post];
463
-		elseif (!empty($_REQUEST['xml']))
464
-			continue;
471
+		if (empty($context[$key]) && empty($_REQUEST['xml'])) {
472
+					$context['post_error']['messages'][] = $txt['error_no_' . $post];
473
+		} elseif (!empty($_REQUEST['xml'])) {
474
+					continue;
475
+		}
465 476
 
466 477
 		preparsecode($context[$key]);
467 478
 		if ($html)
@@ -540,10 +551,12 @@  discard block
 block discarded – undo
540 551
 
541 552
 	// Start by finding any members!
542 553
 	$toClean = array();
543
-	if (!empty($_POST['members']))
544
-		$toClean[] = 'members';
545
-	if (!empty($_POST['exclude_members']))
546
-		$toClean[] = 'exclude_members';
554
+	if (!empty($_POST['members'])) {
555
+			$toClean[] = 'members';
556
+	}
557
+	if (!empty($_POST['exclude_members'])) {
558
+			$toClean[] = 'exclude_members';
559
+	}
547 560
 	if (!empty($toClean))
548 561
 	{
549 562
 		require_once($sourcedir . '/Subs-Auth.php');
@@ -555,11 +568,13 @@  discard block
 block discarded – undo
555 568
 			preg_match_all('~"([^"]+)"~', $_POST[$type], $matches);
556 569
 			$_POST[$type] = array_unique(array_merge($matches[1], explode(',', preg_replace('~"[^"]+"~', '', $_POST[$type]))));
557 570
 
558
-			foreach ($_POST[$type] as $index => $member)
559
-				if (strlen(trim($member)) > 0)
571
+			foreach ($_POST[$type] as $index => $member) {
572
+							if (strlen(trim($member)) > 0)
560 573
 					$_POST[$type][$index] = $smcFunc['htmlspecialchars']($smcFunc['strtolower'](trim($member)));
561
-				else
562
-					unset($_POST[$type][$index]);
574
+			}
575
+				else {
576
+									unset($_POST[$type][$index]);
577
+				}
563 578
 
564 579
 			// Find the members
565 580
 			$_POST[$type] = implode(',', array_keys(findMembers($_POST[$type])));
@@ -569,16 +584,18 @@  discard block
 block discarded – undo
569 584
 	if (isset($_POST['member_list']) && is_array($_POST['member_list']))
570 585
 	{
571 586
 		$members = array();
572
-		foreach ($_POST['member_list'] as $member_id)
573
-			$members[] = (int) $member_id;
587
+		foreach ($_POST['member_list'] as $member_id) {
588
+					$members[] = (int) $member_id;
589
+		}
574 590
 		$_POST['members'] = implode(',', $members);
575 591
 	}
576 592
 
577 593
 	if (isset($_POST['exclude_member_list']) && is_array($_POST['exclude_member_list']))
578 594
 	{
579 595
 		$members = array();
580
-		foreach ($_POST['exclude_member_list'] as $member_id)
581
-			$members[] = (int) $member_id;
596
+		foreach ($_POST['exclude_member_list'] as $member_id) {
597
+					$members[] = (int) $member_id;
598
+		}
582 599
 		$_POST['exclude_members'] = implode(',', $members);
583 600
 	}
584 601
 
@@ -602,8 +619,9 @@  discard block
 block discarded – undo
602 619
 			'current_time' => time(),
603 620
 		)
604 621
 	);
605
-	while ($row = $smcFunc['db_fetch_assoc']($request))
606
-		$context['recipients']['exclude_members'][] = $row['id_member'];
622
+	while ($row = $smcFunc['db_fetch_assoc']($request)) {
623
+			$context['recipients']['exclude_members'][] = $row['id_member'];
624
+	}
607 625
 	$smcFunc['db_free_result']($request);
608 626
 
609 627
 	$request = $smcFunc['db_query']('', '
@@ -638,8 +656,9 @@  discard block
 block discarded – undo
638 656
 			WHERE email_address IN(' . implode(', ', $condition_array) .')',
639 657
 			$condition_array_params
640 658
 		);
641
-		while ($row = $smcFunc['db_fetch_assoc']($request))
642
-			$context['recipients']['exclude_members'][] = $row['id_member'];
659
+		while ($row = $smcFunc['db_fetch_assoc']($request)) {
660
+					$context['recipients']['exclude_members'][] = $row['id_member'];
661
+		}
643 662
 		$smcFunc['db_free_result']($request);
644 663
 	}
645 664
 
@@ -657,10 +676,11 @@  discard block
 block discarded – undo
657 676
 		);
658 677
 		while ($row = $smcFunc['db_fetch_assoc']($request))
659 678
 		{
660
-			if (in_array(3, $context['recipients']))
661
-				$context['recipients']['exclude_members'][] = $row['identifier'];
662
-			else
663
-				$context['recipients']['members'][] = $row['identifier'];
679
+			if (in_array(3, $context['recipients'])) {
680
+							$context['recipients']['exclude_members'][] = $row['identifier'];
681
+			} else {
682
+							$context['recipients']['members'][] = $row['identifier'];
683
+			}
664 684
 		}
665 685
 		$smcFunc['db_free_result']($request);
666 686
 	}
@@ -707,8 +727,9 @@  discard block
 block discarded – undo
707 727
 	$num_at_once = 1000;
708 728
 
709 729
 	// If by PM's I suggest we half the above number.
710
-	if (!empty($_POST['send_pm']))
711
-		$num_at_once /= 2;
730
+	if (!empty($_POST['send_pm'])) {
731
+			$num_at_once /= 2;
732
+	}
712 733
 
713 734
 	checkSession();
714 735
 
@@ -731,8 +752,7 @@  discard block
 block discarded – undo
731 752
 		);
732 753
 		list ($context['total_members']) = $smcFunc['db_fetch_row']($request);
733 754
 		$smcFunc['db_free_result']($request);
734
-	}
735
-	else
755
+	} else
736 756
 	{
737 757
 		$context['total_members'] = (int) $_REQUEST['total_members'];
738 758
 	}
@@ -750,32 +770,35 @@  discard block
 block discarded – undo
750 770
 	if (!empty($_POST['exclude_members']))
751 771
 	{
752 772
 		$members = explode(',', $_POST['exclude_members']);
753
-		foreach ($members as $member)
754
-			if ($member >= $context['start'])
773
+		foreach ($members as $member) {
774
+					if ($member >= $context['start'])
755 775
 				$context['recipients']['exclude_members'][] = (int) $member;
776
+		}
756 777
 	}
757 778
 
758 779
 	// What about members we *must* do?
759 780
 	if (!empty($_POST['members']))
760 781
 	{
761 782
 		$members = explode(',', $_POST['members']);
762
-		foreach ($members as $member)
763
-			if ($member >= $context['start'])
783
+		foreach ($members as $member) {
784
+					if ($member >= $context['start'])
764 785
 				$context['recipients']['members'][] = (int) $member;
786
+		}
765 787
 	}
766 788
 	// Cleaning groups is simple - although deal with both checkbox and commas.
767 789
 	if (isset($_POST['groups']))
768 790
 	{
769 791
 		if (is_array($_POST['groups']))
770 792
 		{
771
-			foreach ($_POST['groups'] as $group => $dummy)
772
-				$context['recipients']['groups'][] = (int) $group;
773
-		}
774
-		else
793
+			foreach ($_POST['groups'] as $group => $dummy) {
794
+							$context['recipients']['groups'][] = (int) $group;
795
+			}
796
+		} else
775 797
 		{
776 798
 			$groups = explode(',', $_POST['groups']);
777
-			foreach ($groups as $group)
778
-				$context['recipients']['groups'][] = (int) $group;
799
+			foreach ($groups as $group) {
800
+							$context['recipients']['groups'][] = (int) $group;
801
+			}
779 802
 		}
780 803
 	}
781 804
 	// Same for excluded groups
@@ -783,14 +806,15 @@  discard block
 block discarded – undo
783 806
 	{
784 807
 		if (is_array($_POST['exclude_groups']))
785 808
 		{
786
-			foreach ($_POST['exclude_groups'] as $group => $dummy)
787
-				$context['recipients']['exclude_groups'][] = (int) $group;
788
-		}
789
-		else
809
+			foreach ($_POST['exclude_groups'] as $group => $dummy) {
810
+							$context['recipients']['exclude_groups'][] = (int) $group;
811
+			}
812
+		} else
790 813
 		{
791 814
 			$groups = explode(',', $_POST['exclude_groups']);
792
-			foreach ($groups as $group)
793
-				$context['recipients']['exclude_groups'][] = (int) $group;
815
+			foreach ($groups as $group) {
816
+							$context['recipients']['exclude_groups'][] = (int) $group;
817
+			}
794 818
 		}
795 819
 	}
796 820
 	// Finally - emails!
@@ -800,14 +824,16 @@  discard block
 block discarded – undo
800 824
 		foreach ($addressed as $curmem)
801 825
 		{
802 826
 			$curmem = trim($curmem);
803
-			if ($curmem != '' && filter_var($curmem, FILTER_VALIDATE_EMAIL))
804
-				$context['recipients']['emails'][$curmem] = $curmem;
827
+			if ($curmem != '' && filter_var($curmem, FILTER_VALIDATE_EMAIL)) {
828
+							$context['recipients']['emails'][$curmem] = $curmem;
829
+			}
805 830
 		}
806 831
 	}
807 832
 
808 833
 	// If we're only cleaning drop out here.
809
-	if ($clean_only)
810
-		return;
834
+	if ($clean_only) {
835
+			return;
836
+	}
811 837
 
812 838
 	require_once($sourcedir . '/Subs-Post.php');
813 839
 
@@ -823,16 +849,18 @@  discard block
 block discarded – undo
823 849
 	if (!$context['send_pm'] && !empty($_POST['send_html']))
824 850
 	{
825 851
 		// Prepare the message for HTML.
826
-		if (!empty($_POST['parse_html']))
827
-			$_POST['message'] = str_replace(array("\n", '  '), array('<br>' . "\n", '&nbsp; '), $_POST['message']);
852
+		if (!empty($_POST['parse_html'])) {
853
+					$_POST['message'] = str_replace(array("\n", '  '), array('<br>' . "\n", '&nbsp; '), $_POST['message']);
854
+		}
828 855
 
829 856
 		// This is here to prevent spam filters from tagging this as spam.
830 857
 		if (preg_match('~\<html~i', $_POST['message']) == 0)
831 858
 		{
832
-			if (preg_match('~\<body~i', $_POST['message']) == 0)
833
-				$_POST['message'] = '<html><head><title>' . $_POST['subject'] . '</title></head>' . "\n" . '<body>' . $_POST['message'] . '</body></html>';
834
-			else
835
-				$_POST['message'] = '<html>' . $_POST['message'] . '</html>';
859
+			if (preg_match('~\<body~i', $_POST['message']) == 0) {
860
+							$_POST['message'] = '<html><head><title>' . $_POST['subject'] . '</title></head>' . "\n" . '<body>' . $_POST['message'] . '</body></html>';
861
+			} else {
862
+							$_POST['message'] = '<html>' . $_POST['message'] . '</html>';
863
+			}
836 864
 		}
837 865
 	}
838 866
 
@@ -886,15 +914,17 @@  discard block
 block discarded – undo
886 914
 	foreach ($context['recipients']['emails'] as $k => $email)
887 915
 	{
888 916
 		// Done as many as we can?
889
-		if ($i >= $num_at_once)
890
-			break;
917
+		if ($i >= $num_at_once) {
918
+					break;
919
+		}
891 920
 
892 921
 		// Don't sent it twice!
893 922
 		unset($context['recipients']['emails'][$k]);
894 923
 
895 924
 		// Dammit - can't PM emails!
896
-		if ($context['send_pm'])
897
-			continue;
925
+		if ($context['send_pm']) {
926
+					continue;
927
+		}
898 928
 
899 929
 		$to_member = array(
900 930
 			$email,
@@ -928,8 +958,9 @@  discard block
 block discarded – undo
928 958
 					$queryBuild[] = 'mem.id_post_group = {int:group_' . $group . '}';
929 959
 				}
930 960
 			}
931
-			if (!empty($queryBuild))
932
-			$sendQuery .= implode(' OR ', $queryBuild);
961
+			if (!empty($queryBuild)) {
962
+						$sendQuery .= implode(' OR ', $queryBuild);
963
+			}
933 964
 		}
934 965
 		if (!empty($context['recipients']['members']))
935 966
 		{
@@ -948,8 +979,9 @@  discard block
 block discarded – undo
948 979
 		}
949 980
 
950 981
 		// Anything to exclude?
951
-		if (!empty($context['recipients']['exclude_groups']) && in_array(0, $context['recipients']['exclude_groups']))
952
-			$sendQuery .= ' AND mem.id_group != {int:regular_group}';
982
+		if (!empty($context['recipients']['exclude_groups']) && in_array(0, $context['recipients']['exclude_groups'])) {
983
+					$sendQuery .= ' AND mem.id_group != {int:regular_group}';
984
+		}
953 985
 		if (!empty($context['recipients']['exclude_members']))
954 986
 		{
955 987
 			$sendQuery .= ' AND mem.id_member NOT IN ({array_int:exclude_members})';
@@ -985,21 +1017,24 @@  discard block
 block discarded – undo
985 1017
 		foreach ($rows as $row)
986 1018
 		{
987 1019
 			// Force them to have it?
988
-			if (empty($context['email_force']) || empty($prefs[$row['id_member']]['announcements']))
989
-				continue;
1020
+			if (empty($context['email_force']) || empty($prefs[$row['id_member']]['announcements'])) {
1021
+							continue;
1022
+			}
990 1023
 
991 1024
 			// What groups are we looking at here?
992
-			if (empty($row['additional_groups']))
993
-				$groups = array($row['id_group'], $row['id_post_group']);
994
-			else
995
-				$groups = array_merge(
1025
+			if (empty($row['additional_groups'])) {
1026
+							$groups = array($row['id_group'], $row['id_post_group']);
1027
+			} else {
1028
+							$groups = array_merge(
996 1029
 					array($row['id_group'], $row['id_post_group']),
997 1030
 					explode(',', $row['additional_groups'])
998 1031
 				);
1032
+			}
999 1033
 
1000 1034
 			// Excluded groups?
1001
-			if (array_intersect($groups, $context['recipients']['exclude_groups']))
1002
-				continue;
1035
+			if (array_intersect($groups, $context['recipients']['exclude_groups'])) {
1036
+							continue;
1037
+			}
1003 1038
 
1004 1039
 			// We might need this
1005 1040
 			$cleanMemberName = empty($_POST['send_html']) || $context['send_pm'] ? un_htmlspecialchars($row['real_name']) : $row['real_name'];
@@ -1022,10 +1057,11 @@  discard block
 block discarded – undo
1022 1057
 				), $_POST['subject']);
1023 1058
 
1024 1059
 			// Send the actual email - or a PM!
1025
-			if (!$context['send_pm'])
1026
-				sendmail($row['email_address'], $subject, $message, null, 'news', !empty($_POST['send_html']), 5);
1027
-			else
1028
-				sendpm(array('to' => array($row['id_member']), 'bcc' => array()), $subject, $message);
1060
+			if (!$context['send_pm']) {
1061
+							sendmail($row['email_address'], $subject, $message, null, 'news', !empty($_POST['send_html']), 5);
1062
+			} else {
1063
+							sendpm(array('to' => array($row['id_member']), 'bcc' => array()), $subject, $message);
1064
+			}
1029 1065
 		}
1030 1066
 	}
1031 1067
 
@@ -1074,8 +1110,9 @@  discard block
 block discarded – undo
1074 1110
 
1075 1111
 	call_integration_hook('integrate_modify_news_settings', array(&$config_vars));
1076 1112
 
1077
-	if ($return_config)
1078
-		return $config_vars;
1113
+	if ($return_config) {
1114
+			return $config_vars;
1115
+	}
1079 1116
 
1080 1117
 	$context['page_title'] = $txt['admin_edit_news'] . ' - ' . $txt['settings'];
1081 1118
 	$context['sub_template'] = 'show_settings';
Please login to merge, or discard this patch.
Sources/Subs-Charset.php 2 patches
Spacing   +506 added lines, -506 removed lines patch added patch discarded remove patch
@@ -24,259 +24,259 @@  discard block
 block discarded – undo
24 24
 function utf8_strtolower($string)
25 25
 {
26 26
 	static $case_folding = array(
27
-		'A' => 'a',		'B' => 'b',		'C' => 'c',		'D' => 'd',
28
-		'E' => 'e',		'F' => 'f',		'G' => 'g',		'H' => 'h',
29
-		'I' => 'i',		'J' => 'j',		'K' => 'k',		'L' => 'l',
30
-		'M' => 'm',		'N' => 'n',		'O' => 'o',		'P' => 'p',
31
-		'Q' => 'q',		'R' => 'r',		'S' => 's',		'T' => 't',
32
-		'U' => 'u',		'V' => 'v',		'W' => 'w',		'X' => 'x',
33
-		'Y' => 'y',		'Z' => 'z',		"\xc2\xb5" => "\xce\xbc",		"\xc3\x80" => "\xc3\xa0",
34
-		"\xc3\x81" => "\xc3\xa1",		"\xc3\x82" => "\xc3\xa2",		"\xc3\x83" => "\xc3\xa3",		"\xc3\x84" => "\xc3\xa4",
35
-		"\xc3\x85" => "\xc3\xa5",		"\xc3\x86" => "\xc3\xa6",		"\xc3\x87" => "\xc3\xa7",		"\xc3\x88" => "\xc3\xa8",
36
-		"\xc3\x89" => "\xc3\xa9",		"\xc3\x8a" => "\xc3\xaa",		"\xc3\x8b" => "\xc3\xab",		"\xc3\x8c" => "\xc3\xac",
37
-		"\xc3\x8d" => "\xc3\xad",		"\xc3\x8e" => "\xc3\xae",		"\xc3\x8f" => "\xc3\xaf",		"\xc3\x90" => "\xc3\xb0",
38
-		"\xc3\x91" => "\xc3\xb1",		"\xc3\x92" => "\xc3\xb2",		"\xc3\x93" => "\xc3\xb3",		"\xc3\x94" => "\xc3\xb4",
39
-		"\xc3\x95" => "\xc3\xb5",		"\xc3\x96" => "\xc3\xb6",		"\xc3\x98" => "\xc3\xb8",		"\xc3\x99" => "\xc3\xb9",
40
-		"\xc3\x9a" => "\xc3\xba",		"\xc3\x9b" => "\xc3\xbb",		"\xc3\x9c" => "\xc3\xbc",		"\xc3\x9d" => "\xc3\xbd",
41
-		"\xc3\x9e" => "\xc3\xbe",		"\xc3\x9f" => "ss",	"\xc4\x80" => "\xc4\x81",		"\xc4\x82" => "\xc4\x83",
42
-		"\xc4\x84" => "\xc4\x85",		"\xc4\x86" => "\xc4\x87",		"\xc4\x88" => "\xc4\x89",		"\xc4\x8a" => "\xc4\x8b",
43
-		"\xc4\x8c" => "\xc4\x8d",		"\xc4\x8e" => "\xc4\x8f",		"\xc4\x90" => "\xc4\x91",		"\xc4\x92" => "\xc4\x93",
44
-		"\xc4\x94" => "\xc4\x95",		"\xc4\x96" => "\xc4\x97",		"\xc4\x98" => "\xc4\x99",		"\xc4\x9a" => "\xc4\x9b",
45
-		"\xc4\x9c" => "\xc4\x9d",		"\xc4\x9e" => "\xc4\x9f",		"\xc4\xa0" => "\xc4\xa1",		"\xc4\xa2" => "\xc4\xa3",
46
-		"\xc4\xa4" => "\xc4\xa5",		"\xc4\xa6" => "\xc4\xa7",		"\xc4\xa8" => "\xc4\xa9",		"\xc4\xaa" => "\xc4\xab",
47
-		"\xc4\xac" => "\xc4\xad",		"\xc4\xae" => "\xc4\xaf",		"\xc4\xb0" => "i\xcc\x87",		"\xc4\xb2" => "\xc4\xb3",
48
-		"\xc4\xb4" => "\xc4\xb5",		"\xc4\xb6" => "\xc4\xb7",		"\xc4\xb9" => "\xc4\xba",		"\xc4\xbb" => "\xc4\xbc",
49
-		"\xc4\xbd" => "\xc4\xbe",		"\xc4\xbf" => "\xc5\x80",		"\xc5\x81" => "\xc5\x82",		"\xc5\x83" => "\xc5\x84",
50
-		"\xc5\x85" => "\xc5\x86",		"\xc5\x87" => "\xc5\x88",		"\xc5\x89" => "\xca\xbcn",	"\xc5\x8a" => "\xc5\x8b",
51
-		"\xc5\x8c" => "\xc5\x8d",		"\xc5\x8e" => "\xc5\x8f",		"\xc5\x90" => "\xc5\x91",		"\xc5\x92" => "\xc5\x93",
52
-		"\xc5\x94" => "\xc5\x95",		"\xc5\x96" => "\xc5\x97",		"\xc5\x98" => "\xc5\x99",		"\xc5\x9a" => "\xc5\x9b",
53
-		"\xc5\x9c" => "\xc5\x9d",		"\xc5\x9e" => "\xc5\x9f",		"\xc5\xa0" => "\xc5\xa1",		"\xc5\xa2" => "\xc5\xa3",
54
-		"\xc5\xa4" => "\xc5\xa5",		"\xc5\xa6" => "\xc5\xa7",		"\xc5\xa8" => "\xc5\xa9",		"\xc5\xaa" => "\xc5\xab",
55
-		"\xc5\xac" => "\xc5\xad",		"\xc5\xae" => "\xc5\xaf",		"\xc5\xb0" => "\xc5\xb1",		"\xc5\xb2" => "\xc5\xb3",
56
-		"\xc5\xb4" => "\xc5\xb5",		"\xc5\xb6" => "\xc5\xb7",		"\xc5\xb8" => "\xc3\xbf",		"\xc5\xb9" => "\xc5\xba",
57
-		"\xc5\xbb" => "\xc5\xbc",		"\xc5\xbd" => "\xc5\xbe",		"\xc5\xbf" => "s",		"\xc6\x81" => "\xc9\x93",
58
-		"\xc6\x82" => "\xc6\x83",		"\xc6\x84" => "\xc6\x85",		"\xc6\x86" => "\xc9\x94",		"\xc6\x87" => "\xc6\x88",
59
-		"\xc6\x89" => "\xc9\x96",		"\xc6\x8a" => "\xc9\x97",		"\xc6\x8b" => "\xc6\x8c",		"\xc6\x8e" => "\xc7\x9d",
60
-		"\xc6\x8f" => "\xc9\x99",		"\xc6\x90" => "\xc9\x9b",		"\xc6\x91" => "\xc6\x92",		"\xc6\x93" => "\xc9\xa0",
61
-		"\xc6\x94" => "\xc9\xa3",		"\xc6\x96" => "\xc9\xa9",		"\xc6\x97" => "\xc9\xa8",		"\xc6\x98" => "\xc6\x99",
62
-		"\xc6\x9c" => "\xc9\xaf",		"\xc6\x9d" => "\xc9\xb2",		"\xc6\x9f" => "\xc9\xb5",		"\xc6\xa0" => "\xc6\xa1",
63
-		"\xc6\xa2" => "\xc6\xa3",		"\xc6\xa4" => "\xc6\xa5",		"\xc6\xa6" => "\xca\x80",		"\xc6\xa7" => "\xc6\xa8",
64
-		"\xc6\xa9" => "\xca\x83",		"\xc6\xac" => "\xc6\xad",		"\xc6\xae" => "\xca\x88",		"\xc6\xaf" => "\xc6\xb0",
65
-		"\xc6\xb1" => "\xca\x8a",		"\xc6\xb2" => "\xca\x8b",		"\xc6\xb3" => "\xc6\xb4",		"\xc6\xb5" => "\xc6\xb6",
66
-		"\xc6\xb7" => "\xca\x92",		"\xc6\xb8" => "\xc6\xb9",		"\xc6\xbc" => "\xc6\xbd",		"\xc7\x84" => "\xc7\x86",
67
-		"\xc7\x85" => "\xc7\x86",		"\xc7\x87" => "\xc7\x89",		"\xc7\x88" => "\xc7\x89",		"\xc7\x8a" => "\xc7\x8c",
68
-		"\xc7\x8b" => "\xc7\x8c",		"\xc7\x8d" => "\xc7\x8e",		"\xc7\x8f" => "\xc7\x90",		"\xc7\x91" => "\xc7\x92",
69
-		"\xc7\x93" => "\xc7\x94",		"\xc7\x95" => "\xc7\x96",		"\xc7\x97" => "\xc7\x98",		"\xc7\x99" => "\xc7\x9a",
70
-		"\xc7\x9b" => "\xc7\x9c",		"\xc7\x9e" => "\xc7\x9f",		"\xc7\xa0" => "\xc7\xa1",		"\xc7\xa2" => "\xc7\xa3",
71
-		"\xc7\xa4" => "\xc7\xa5",		"\xc7\xa6" => "\xc7\xa7",		"\xc7\xa8" => "\xc7\xa9",		"\xc7\xaa" => "\xc7\xab",
72
-		"\xc7\xac" => "\xc7\xad",		"\xc7\xae" => "\xc7\xaf",		"\xc7\xb0" => "j\xcc\x8c",		"\xc7\xb1" => "\xc7\xb3",
73
-		"\xc7\xb2" => "\xc7\xb3",		"\xc7\xb4" => "\xc7\xb5",		"\xc7\xb6" => "\xc6\x95",		"\xc7\xb7" => "\xc6\xbf",
74
-		"\xc7\xb8" => "\xc7\xb9",		"\xc7\xba" => "\xc7\xbb",		"\xc7\xbc" => "\xc7\xbd",		"\xc7\xbe" => "\xc7\xbf",
75
-		"\xc8\x80" => "\xc8\x81",		"\xc8\x82" => "\xc8\x83",		"\xc8\x84" => "\xc8\x85",		"\xc8\x86" => "\xc8\x87",
76
-		"\xc8\x88" => "\xc8\x89",		"\xc8\x8a" => "\xc8\x8b",		"\xc8\x8c" => "\xc8\x8d",		"\xc8\x8e" => "\xc8\x8f",
77
-		"\xc8\x90" => "\xc8\x91",		"\xc8\x92" => "\xc8\x93",		"\xc8\x94" => "\xc8\x95",		"\xc8\x96" => "\xc8\x97",
78
-		"\xc8\x98" => "\xc8\x99",		"\xc8\x9a" => "\xc8\x9b",		"\xc8\x9c" => "\xc8\x9d",		"\xc8\x9e" => "\xc8\x9f",
79
-		"\xc8\xa0" => "\xc6\x9e",		"\xc8\xa2" => "\xc8\xa3",		"\xc8\xa4" => "\xc8\xa5",		"\xc8\xa6" => "\xc8\xa7",
80
-		"\xc8\xa8" => "\xc8\xa9",		"\xc8\xaa" => "\xc8\xab",		"\xc8\xac" => "\xc8\xad",		"\xc8\xae" => "\xc8\xaf",
81
-		"\xc8\xb0" => "\xc8\xb1",		"\xc8\xb2" => "\xc8\xb3",		"\xc8\xba" => "\xe2\xb1\xa5",		"\xc8\xbb" => "\xc8\xbc",
82
-		"\xc8\xbd" => "\xc6\x9a",		"\xc8\xbe" => "\xe2\xb1\xa6",		"\xc9\x81" => "\xc9\x82",		"\xc9\x83" => "\xc6\x80",
83
-		"\xc9\x84" => "\xca\x89",		"\xc9\x85" => "\xca\x8c",		"\xc9\x86" => "\xc9\x87",		"\xc9\x88" => "\xc9\x89",
84
-		"\xc9\x8a" => "\xc9\x8b",		"\xc9\x8c" => "\xc9\x8d",		"\xc9\x8e" => "\xc9\x8f",		"\xcd\x85" => "\xce\xb9",
85
-		"\xce\x86" => "\xce\xac",		"\xce\x88" => "\xce\xad",		"\xce\x89" => "\xce\xae",		"\xce\x8a" => "\xce\xaf",
86
-		"\xce\x8c" => "\xcf\x8c",		"\xce\x8e" => "\xcf\x8d",		"\xce\x8f" => "\xcf\x8e",		"\xce\x90" => "\xce\xb9\xcc\x88\xcc\x81",
87
-		"\xce\x91" => "\xce\xb1",		"\xce\x92" => "\xce\xb2",		"\xce\x93" => "\xce\xb3",		"\xce\x94" => "\xce\xb4",
88
-		"\xce\x95" => "\xce\xb5",		"\xce\x96" => "\xce\xb6",		"\xce\x97" => "\xce\xb7",		"\xce\x98" => "\xce\xb8",
89
-		"\xce\x99" => "\xce\xb9",		"\xce\x9a" => "\xce\xba",		"\xce\x9b" => "\xce\xbb",		"\xce\x9c" => "\xce\xbc",
90
-		"\xce\x9d" => "\xce\xbd",		"\xce\x9e" => "\xce\xbe",		"\xce\x9f" => "\xce\xbf",		"\xce\xa0" => "\xcf\x80",
91
-		"\xce\xa1" => "\xcf\x81",		"\xce\xa3" => "\xcf\x83",		"\xce\xa4" => "\xcf\x84",		"\xce\xa5" => "\xcf\x85",
92
-		"\xce\xa6" => "\xcf\x86",		"\xce\xa7" => "\xcf\x87",		"\xce\xa8" => "\xcf\x88",		"\xce\xa9" => "\xcf\x89",
93
-		"\xce\xaa" => "\xcf\x8a",		"\xce\xab" => "\xcf\x8b",		"\xce\xb0" => "\xcf\x85\xcc\x88\xcc\x81",	"\xcf\x82" => "\xcf\x83",
94
-		"\xcf\x90" => "\xce\xb2",		"\xcf\x91" => "\xce\xb8",		"\xcf\x95" => "\xcf\x86",		"\xcf\x96" => "\xcf\x80",
95
-		"\xcf\x98" => "\xcf\x99",		"\xcf\x9a" => "\xcf\x9b",		"\xcf\x9c" => "\xcf\x9d",		"\xcf\x9e" => "\xcf\x9f",
96
-		"\xcf\xa0" => "\xcf\xa1",		"\xcf\xa2" => "\xcf\xa3",		"\xcf\xa4" => "\xcf\xa5",		"\xcf\xa6" => "\xcf\xa7",
97
-		"\xcf\xa8" => "\xcf\xa9",		"\xcf\xaa" => "\xcf\xab",		"\xcf\xac" => "\xcf\xad",		"\xcf\xae" => "\xcf\xaf",
98
-		"\xcf\xb0" => "\xce\xba",		"\xcf\xb1" => "\xcf\x81",		"\xcf\xb4" => "\xce\xb8",		"\xcf\xb5" => "\xce\xb5",
99
-		"\xcf\xb7" => "\xcf\xb8",		"\xcf\xb9" => "\xcf\xb2",		"\xcf\xba" => "\xcf\xbb",		"\xcf\xbd" => "\xcd\xbb",
100
-		"\xcf\xbe" => "\xcd\xbc",		"\xcf\xbf" => "\xcd\xbd",		"\xd0\x80" => "\xd1\x90",		"\xd0\x81" => "\xd1\x91",
101
-		"\xd0\x82" => "\xd1\x92",		"\xd0\x83" => "\xd1\x93",		"\xd0\x84" => "\xd1\x94",		"\xd0\x85" => "\xd1\x95",
102
-		"\xd0\x86" => "\xd1\x96",		"\xd0\x87" => "\xd1\x97",		"\xd0\x88" => "\xd1\x98",		"\xd0\x89" => "\xd1\x99",
103
-		"\xd0\x8a" => "\xd1\x9a",		"\xd0\x8b" => "\xd1\x9b",		"\xd0\x8c" => "\xd1\x9c",		"\xd0\x8d" => "\xd1\x9d",
104
-		"\xd0\x8e" => "\xd1\x9e",		"\xd0\x8f" => "\xd1\x9f",		"\xd0\x90" => "\xd0\xb0",		"\xd0\x91" => "\xd0\xb1",
105
-		"\xd0\x92" => "\xd0\xb2",		"\xd0\x93" => "\xd0\xb3",		"\xd0\x94" => "\xd0\xb4",		"\xd0\x95" => "\xd0\xb5",
106
-		"\xd0\x96" => "\xd0\xb6",		"\xd0\x97" => "\xd0\xb7",		"\xd0\x98" => "\xd0\xb8",		"\xd0\x99" => "\xd0\xb9",
107
-		"\xd0\x9a" => "\xd0\xba",		"\xd0\x9b" => "\xd0\xbb",		"\xd0\x9c" => "\xd0\xbc",		"\xd0\x9d" => "\xd0\xbd",
108
-		"\xd0\x9e" => "\xd0\xbe",		"\xd0\x9f" => "\xd0\xbf",		"\xd0\xa0" => "\xd1\x80",		"\xd0\xa1" => "\xd1\x81",
109
-		"\xd0\xa2" => "\xd1\x82",		"\xd0\xa3" => "\xd1\x83",		"\xd0\xa4" => "\xd1\x84",		"\xd0\xa5" => "\xd1\x85",
110
-		"\xd0\xa6" => "\xd1\x86",		"\xd0\xa7" => "\xd1\x87",		"\xd0\xa8" => "\xd1\x88",		"\xd0\xa9" => "\xd1\x89",
111
-		"\xd0\xaa" => "\xd1\x8a",		"\xd0\xab" => "\xd1\x8b",		"\xd0\xac" => "\xd1\x8c",		"\xd0\xad" => "\xd1\x8d",
112
-		"\xd0\xae" => "\xd1\x8e",		"\xd0\xaf" => "\xd1\x8f",		"\xd1\xa0" => "\xd1\xa1",		"\xd1\xa2" => "\xd1\xa3",
113
-		"\xd1\xa4" => "\xd1\xa5",		"\xd1\xa6" => "\xd1\xa7",		"\xd1\xa8" => "\xd1\xa9",		"\xd1\xaa" => "\xd1\xab",
114
-		"\xd1\xac" => "\xd1\xad",		"\xd1\xae" => "\xd1\xaf",		"\xd1\xb0" => "\xd1\xb1",		"\xd1\xb2" => "\xd1\xb3",
115
-		"\xd1\xb4" => "\xd1\xb5",		"\xd1\xb6" => "\xd1\xb7",		"\xd1\xb8" => "\xd1\xb9",		"\xd1\xba" => "\xd1\xbb",
116
-		"\xd1\xbc" => "\xd1\xbd",		"\xd1\xbe" => "\xd1\xbf",		"\xd2\x80" => "\xd2\x81",		"\xd2\x8a" => "\xd2\x8b",
117
-		"\xd2\x8c" => "\xd2\x8d",		"\xd2\x8e" => "\xd2\x8f",		"\xd2\x90" => "\xd2\x91",		"\xd2\x92" => "\xd2\x93",
118
-		"\xd2\x94" => "\xd2\x95",		"\xd2\x96" => "\xd2\x97",		"\xd2\x98" => "\xd2\x99",		"\xd2\x9a" => "\xd2\x9b",
119
-		"\xd2\x9c" => "\xd2\x9d",		"\xd2\x9e" => "\xd2\x9f",		"\xd2\xa0" => "\xd2\xa1",		"\xd2\xa2" => "\xd2\xa3",
120
-		"\xd2\xa4" => "\xd2\xa5",		"\xd2\xa6" => "\xd2\xa7",		"\xd2\xa8" => "\xd2\xa9",		"\xd2\xaa" => "\xd2\xab",
121
-		"\xd2\xac" => "\xd2\xad",		"\xd2\xae" => "\xd2\xaf",		"\xd2\xb0" => "\xd2\xb1",		"\xd2\xb2" => "\xd2\xb3",
122
-		"\xd2\xb4" => "\xd2\xb5",		"\xd2\xb6" => "\xd2\xb7",		"\xd2\xb8" => "\xd2\xb9",		"\xd2\xba" => "\xd2\xbb",
123
-		"\xd2\xbc" => "\xd2\xbd",		"\xd2\xbe" => "\xd2\xbf",		"\xd3\x80" => "\xd3\x8f",		"\xd3\x81" => "\xd3\x82",
124
-		"\xd3\x83" => "\xd3\x84",		"\xd3\x85" => "\xd3\x86",		"\xd3\x87" => "\xd3\x88",		"\xd3\x89" => "\xd3\x8a",
125
-		"\xd3\x8b" => "\xd3\x8c",		"\xd3\x8d" => "\xd3\x8e",		"\xd3\x90" => "\xd3\x91",		"\xd3\x92" => "\xd3\x93",
126
-		"\xd3\x94" => "\xd3\x95",		"\xd3\x96" => "\xd3\x97",		"\xd3\x98" => "\xd3\x99",		"\xd3\x9a" => "\xd3\x9b",
127
-		"\xd3\x9c" => "\xd3\x9d",		"\xd3\x9e" => "\xd3\x9f",		"\xd3\xa0" => "\xd3\xa1",		"\xd3\xa2" => "\xd3\xa3",
128
-		"\xd3\xa4" => "\xd3\xa5",		"\xd3\xa6" => "\xd3\xa7",		"\xd3\xa8" => "\xd3\xa9",		"\xd3\xaa" => "\xd3\xab",
129
-		"\xd3\xac" => "\xd3\xad",		"\xd3\xae" => "\xd3\xaf",		"\xd3\xb0" => "\xd3\xb1",		"\xd3\xb2" => "\xd3\xb3",
130
-		"\xd3\xb4" => "\xd3\xb5",		"\xd3\xb6" => "\xd3\xb7",		"\xd3\xb8" => "\xd3\xb9",		"\xd3\xba" => "\xd3\xbb",
131
-		"\xd3\xbc" => "\xd3\xbd",		"\xd3\xbe" => "\xd3\xbf",		"\xd4\x80" => "\xd4\x81",		"\xd4\x82" => "\xd4\x83",
132
-		"\xd4\x84" => "\xd4\x85",		"\xd4\x86" => "\xd4\x87",		"\xd4\x88" => "\xd4\x89",		"\xd4\x8a" => "\xd4\x8b",
133
-		"\xd4\x8c" => "\xd4\x8d",		"\xd4\x8e" => "\xd4\x8f",		"\xd4\x90" => "\xd4\x91",		"\xd4\x92" => "\xd4\x93",
134
-		"\xd4\xb1" => "\xd5\xa1",		"\xd4\xb2" => "\xd5\xa2",		"\xd4\xb3" => "\xd5\xa3",		"\xd4\xb4" => "\xd5\xa4",
135
-		"\xd4\xb5" => "\xd5\xa5",		"\xd4\xb6" => "\xd5\xa6",		"\xd4\xb7" => "\xd5\xa7",		"\xd4\xb8" => "\xd5\xa8",
136
-		"\xd4\xb9" => "\xd5\xa9",		"\xd4\xba" => "\xd5\xaa",		"\xd4\xbb" => "\xd5\xab",		"\xd4\xbc" => "\xd5\xac",
137
-		"\xd4\xbd" => "\xd5\xad",		"\xd4\xbe" => "\xd5\xae",		"\xd4\xbf" => "\xd5\xaf",		"\xd5\x80" => "\xd5\xb0",
138
-		"\xd5\x81" => "\xd5\xb1",		"\xd5\x82" => "\xd5\xb2",		"\xd5\x83" => "\xd5\xb3",		"\xd5\x84" => "\xd5\xb4",
139
-		"\xd5\x85" => "\xd5\xb5",		"\xd5\x86" => "\xd5\xb6",		"\xd5\x87" => "\xd5\xb7",		"\xd5\x88" => "\xd5\xb8",
140
-		"\xd5\x89" => "\xd5\xb9",		"\xd5\x8a" => "\xd5\xba",		"\xd5\x8b" => "\xd5\xbb",		"\xd5\x8c" => "\xd5\xbc",
141
-		"\xd5\x8d" => "\xd5\xbd",		"\xd5\x8e" => "\xd5\xbe",		"\xd5\x8f" => "\xd5\xbf",		"\xd5\x90" => "\xd6\x80",
142
-		"\xd5\x91" => "\xd6\x81",		"\xd5\x92" => "\xd6\x82",		"\xd5\x93" => "\xd6\x83",		"\xd5\x94" => "\xd6\x84",
143
-		"\xd5\x95" => "\xd6\x85",		"\xd5\x96" => "\xd6\x86",		"\xd6\x87" => "\xd5\xa5\xd6\x82",		"\xe1\x82\xa0" => "\xe2\xb4\x80",
144
-		"\xe1\x82\xa1" => "\xe2\xb4\x81",		"\xe1\x82\xa2" => "\xe2\xb4\x82",		"\xe1\x82\xa3" => "\xe2\xb4\x83",		"\xe1\x82\xa4" => "\xe2\xb4\x84",
145
-		"\xe1\x82\xa5" => "\xe2\xb4\x85",		"\xe1\x82\xa6" => "\xe2\xb4\x86",		"\xe1\x82\xa7" => "\xe2\xb4\x87",		"\xe1\x82\xa8" => "\xe2\xb4\x88",
146
-		"\xe1\x82\xa9" => "\xe2\xb4\x89",		"\xe1\x82\xaa" => "\xe2\xb4\x8a",		"\xe1\x82\xab" => "\xe2\xb4\x8b",		"\xe1\x82\xac" => "\xe2\xb4\x8c",
147
-		"\xe1\x82\xad" => "\xe2\xb4\x8d",		"\xe1\x82\xae" => "\xe2\xb4\x8e",		"\xe1\x82\xaf" => "\xe2\xb4\x8f",		"\xe1\x82\xb0" => "\xe2\xb4\x90",
148
-		"\xe1\x82\xb1" => "\xe2\xb4\x91",		"\xe1\x82\xb2" => "\xe2\xb4\x92",		"\xe1\x82\xb3" => "\xe2\xb4\x93",		"\xe1\x82\xb4" => "\xe2\xb4\x94",
149
-		"\xe1\x82\xb5" => "\xe2\xb4\x95",		"\xe1\x82\xb6" => "\xe2\xb4\x96",		"\xe1\x82\xb7" => "\xe2\xb4\x97",		"\xe1\x82\xb8" => "\xe2\xb4\x98",
150
-		"\xe1\x82\xb9" => "\xe2\xb4\x99",		"\xe1\x82\xba" => "\xe2\xb4\x9a",		"\xe1\x82\xbb" => "\xe2\xb4\x9b",		"\xe1\x82\xbc" => "\xe2\xb4\x9c",
151
-		"\xe1\x82\xbd" => "\xe2\xb4\x9d",		"\xe1\x82\xbe" => "\xe2\xb4\x9e",		"\xe1\x82\xbf" => "\xe2\xb4\x9f",		"\xe1\x83\x80" => "\xe2\xb4\xa0",
152
-		"\xe1\x83\x81" => "\xe2\xb4\xa1",		"\xe1\x83\x82" => "\xe2\xb4\xa2",		"\xe1\x83\x83" => "\xe2\xb4\xa3",		"\xe1\x83\x84" => "\xe2\xb4\xa4",
153
-		"\xe1\x83\x85" => "\xe2\xb4\xa5",		"\xe1\xb8\x80" => "\xe1\xb8\x81",		"\xe1\xb8\x82" => "\xe1\xb8\x83",		"\xe1\xb8\x84" => "\xe1\xb8\x85",
154
-		"\xe1\xb8\x86" => "\xe1\xb8\x87",		"\xe1\xb8\x88" => "\xe1\xb8\x89",		"\xe1\xb8\x8a" => "\xe1\xb8\x8b",		"\xe1\xb8\x8c" => "\xe1\xb8\x8d",
155
-		"\xe1\xb8\x8e" => "\xe1\xb8\x8f",		"\xe1\xb8\x90" => "\xe1\xb8\x91",		"\xe1\xb8\x92" => "\xe1\xb8\x93",		"\xe1\xb8\x94" => "\xe1\xb8\x95",
156
-		"\xe1\xb8\x96" => "\xe1\xb8\x97",		"\xe1\xb8\x98" => "\xe1\xb8\x99",		"\xe1\xb8\x9a" => "\xe1\xb8\x9b",		"\xe1\xb8\x9c" => "\xe1\xb8\x9d",
157
-		"\xe1\xb8\x9e" => "\xe1\xb8\x9f",		"\xe1\xb8\xa0" => "\xe1\xb8\xa1",		"\xe1\xb8\xa2" => "\xe1\xb8\xa3",		"\xe1\xb8\xa4" => "\xe1\xb8\xa5",
158
-		"\xe1\xb8\xa6" => "\xe1\xb8\xa7",		"\xe1\xb8\xa8" => "\xe1\xb8\xa9",		"\xe1\xb8\xaa" => "\xe1\xb8\xab",		"\xe1\xb8\xac" => "\xe1\xb8\xad",
159
-		"\xe1\xb8\xae" => "\xe1\xb8\xaf",		"\xe1\xb8\xb0" => "\xe1\xb8\xb1",		"\xe1\xb8\xb2" => "\xe1\xb8\xb3",		"\xe1\xb8\xb4" => "\xe1\xb8\xb5",
160
-		"\xe1\xb8\xb6" => "\xe1\xb8\xb7",		"\xe1\xb8\xb8" => "\xe1\xb8\xb9",		"\xe1\xb8\xba" => "\xe1\xb8\xbb",		"\xe1\xb8\xbc" => "\xe1\xb8\xbd",
161
-		"\xe1\xb8\xbe" => "\xe1\xb8\xbf",		"\xe1\xb9\x80" => "\xe1\xb9\x81",		"\xe1\xb9\x82" => "\xe1\xb9\x83",		"\xe1\xb9\x84" => "\xe1\xb9\x85",
162
-		"\xe1\xb9\x86" => "\xe1\xb9\x87",		"\xe1\xb9\x88" => "\xe1\xb9\x89",		"\xe1\xb9\x8a" => "\xe1\xb9\x8b",		"\xe1\xb9\x8c" => "\xe1\xb9\x8d",
163
-		"\xe1\xb9\x8e" => "\xe1\xb9\x8f",		"\xe1\xb9\x90" => "\xe1\xb9\x91",		"\xe1\xb9\x92" => "\xe1\xb9\x93",		"\xe1\xb9\x94" => "\xe1\xb9\x95",
164
-		"\xe1\xb9\x96" => "\xe1\xb9\x97",		"\xe1\xb9\x98" => "\xe1\xb9\x99",		"\xe1\xb9\x9a" => "\xe1\xb9\x9b",		"\xe1\xb9\x9c" => "\xe1\xb9\x9d",
165
-		"\xe1\xb9\x9e" => "\xe1\xb9\x9f",		"\xe1\xb9\xa0" => "\xe1\xb9\xa1",		"\xe1\xb9\xa2" => "\xe1\xb9\xa3",		"\xe1\xb9\xa4" => "\xe1\xb9\xa5",
166
-		"\xe1\xb9\xa6" => "\xe1\xb9\xa7",		"\xe1\xb9\xa8" => "\xe1\xb9\xa9",		"\xe1\xb9\xaa" => "\xe1\xb9\xab",		"\xe1\xb9\xac" => "\xe1\xb9\xad",
167
-		"\xe1\xb9\xae" => "\xe1\xb9\xaf",		"\xe1\xb9\xb0" => "\xe1\xb9\xb1",		"\xe1\xb9\xb2" => "\xe1\xb9\xb3",		"\xe1\xb9\xb4" => "\xe1\xb9\xb5",
168
-		"\xe1\xb9\xb6" => "\xe1\xb9\xb7",		"\xe1\xb9\xb8" => "\xe1\xb9\xb9",		"\xe1\xb9\xba" => "\xe1\xb9\xbb",		"\xe1\xb9\xbc" => "\xe1\xb9\xbd",
169
-		"\xe1\xb9\xbe" => "\xe1\xb9\xbf",		"\xe1\xba\x80" => "\xe1\xba\x81",		"\xe1\xba\x82" => "\xe1\xba\x83",		"\xe1\xba\x84" => "\xe1\xba\x85",
170
-		"\xe1\xba\x86" => "\xe1\xba\x87",		"\xe1\xba\x88" => "\xe1\xba\x89",		"\xe1\xba\x8a" => "\xe1\xba\x8b",		"\xe1\xba\x8c" => "\xe1\xba\x8d",
171
-		"\xe1\xba\x8e" => "\xe1\xba\x8f",		"\xe1\xba\x90" => "\xe1\xba\x91",		"\xe1\xba\x92" => "\xe1\xba\x93",		"\xe1\xba\x94" => "\xe1\xba\x95",
172
-		"\xe1\xba\x96" => "h\xcc\xb1",		"\xe1\xba\x97" => "t\xcc\x88",		"\xe1\xba\x98" => "w\xcc\x8a",		"\xe1\xba\x99" => "y\xcc\x8a",
173
-		"\xe1\xba\x9a" => "a\xca\xbe",	"\xe1\xba\x9b" => "\xe1\xb9\xa1",		"\xe1\xba\xa0" => "\xe1\xba\xa1",		"\xe1\xba\xa2" => "\xe1\xba\xa3",
174
-		"\xe1\xba\xa4" => "\xe1\xba\xa5",		"\xe1\xba\xa6" => "\xe1\xba\xa7",		"\xe1\xba\xa8" => "\xe1\xba\xa9",		"\xe1\xba\xaa" => "\xe1\xba\xab",
175
-		"\xe1\xba\xac" => "\xe1\xba\xad",		"\xe1\xba\xae" => "\xe1\xba\xaf",		"\xe1\xba\xb0" => "\xe1\xba\xb1",		"\xe1\xba\xb2" => "\xe1\xba\xb3",
176
-		"\xe1\xba\xb4" => "\xe1\xba\xb5",		"\xe1\xba\xb6" => "\xe1\xba\xb7",		"\xe1\xba\xb8" => "\xe1\xba\xb9",		"\xe1\xba\xba" => "\xe1\xba\xbb",
177
-		"\xe1\xba\xbc" => "\xe1\xba\xbd",		"\xe1\xba\xbe" => "\xe1\xba\xbf",		"\xe1\xbb\x80" => "\xe1\xbb\x81",		"\xe1\xbb\x82" => "\xe1\xbb\x83",
178
-		"\xe1\xbb\x84" => "\xe1\xbb\x85",		"\xe1\xbb\x86" => "\xe1\xbb\x87",		"\xe1\xbb\x88" => "\xe1\xbb\x89",		"\xe1\xbb\x8a" => "\xe1\xbb\x8b",
179
-		"\xe1\xbb\x8c" => "\xe1\xbb\x8d",		"\xe1\xbb\x8e" => "\xe1\xbb\x8f",		"\xe1\xbb\x90" => "\xe1\xbb\x91",		"\xe1\xbb\x92" => "\xe1\xbb\x93",
180
-		"\xe1\xbb\x94" => "\xe1\xbb\x95",		"\xe1\xbb\x96" => "\xe1\xbb\x97",		"\xe1\xbb\x98" => "\xe1\xbb\x99",		"\xe1\xbb\x9a" => "\xe1\xbb\x9b",
181
-		"\xe1\xbb\x9c" => "\xe1\xbb\x9d",		"\xe1\xbb\x9e" => "\xe1\xbb\x9f",		"\xe1\xbb\xa0" => "\xe1\xbb\xa1",		"\xe1\xbb\xa2" => "\xe1\xbb\xa3",
182
-		"\xe1\xbb\xa4" => "\xe1\xbb\xa5",		"\xe1\xbb\xa6" => "\xe1\xbb\xa7",		"\xe1\xbb\xa8" => "\xe1\xbb\xa9",		"\xe1\xbb\xaa" => "\xe1\xbb\xab",
183
-		"\xe1\xbb\xac" => "\xe1\xbb\xad",		"\xe1\xbb\xae" => "\xe1\xbb\xaf",		"\xe1\xbb\xb0" => "\xe1\xbb\xb1",		"\xe1\xbb\xb2" => "\xe1\xbb\xb3",
184
-		"\xe1\xbb\xb4" => "\xe1\xbb\xb5",		"\xe1\xbb\xb6" => "\xe1\xbb\xb7",		"\xe1\xbb\xb8" => "\xe1\xbb\xb9",		"\xe1\xbc\x88" => "\xe1\xbc\x80",
185
-		"\xe1\xbc\x89" => "\xe1\xbc\x81",		"\xe1\xbc\x8a" => "\xe1\xbc\x82",		"\xe1\xbc\x8b" => "\xe1\xbc\x83",		"\xe1\xbc\x8c" => "\xe1\xbc\x84",
186
-		"\xe1\xbc\x8d" => "\xe1\xbc\x85",		"\xe1\xbc\x8e" => "\xe1\xbc\x86",		"\xe1\xbc\x8f" => "\xe1\xbc\x87",		"\xe1\xbc\x98" => "\xe1\xbc\x90",
187
-		"\xe1\xbc\x99" => "\xe1\xbc\x91",		"\xe1\xbc\x9a" => "\xe1\xbc\x92",		"\xe1\xbc\x9b" => "\xe1\xbc\x93",		"\xe1\xbc\x9c" => "\xe1\xbc\x94",
188
-		"\xe1\xbc\x9d" => "\xe1\xbc\x95",		"\xe1\xbc\xa8" => "\xe1\xbc\xa0",		"\xe1\xbc\xa9" => "\xe1\xbc\xa1",		"\xe1\xbc\xaa" => "\xe1\xbc\xa2",
189
-		"\xe1\xbc\xab" => "\xe1\xbc\xa3",		"\xe1\xbc\xac" => "\xe1\xbc\xa4",		"\xe1\xbc\xad" => "\xe1\xbc\xa5",		"\xe1\xbc\xae" => "\xe1\xbc\xa6",
190
-		"\xe1\xbc\xaf" => "\xe1\xbc\xa7",		"\xe1\xbc\xb8" => "\xe1\xbc\xb0",		"\xe1\xbc\xb9" => "\xe1\xbc\xb1",		"\xe1\xbc\xba" => "\xe1\xbc\xb2",
191
-		"\xe1\xbc\xbb" => "\xe1\xbc\xb3",		"\xe1\xbc\xbc" => "\xe1\xbc\xb4",		"\xe1\xbc\xbd" => "\xe1\xbc\xb5",		"\xe1\xbc\xbe" => "\xe1\xbc\xb6",
192
-		"\xe1\xbc\xbf" => "\xe1\xbc\xb7",		"\xe1\xbd\x88" => "\xe1\xbd\x80",		"\xe1\xbd\x89" => "\xe1\xbd\x81",		"\xe1\xbd\x8a" => "\xe1\xbd\x82",
193
-		"\xe1\xbd\x8b" => "\xe1\xbd\x83",		"\xe1\xbd\x8c" => "\xe1\xbd\x84",		"\xe1\xbd\x8d" => "\xe1\xbd\x85",		"\xe1\xbd\x90" => "\xcf\x85\xcc\x93",
194
-		"\xe1\xbd\x92" => "\xcf\x85\xcc\x93\xcc\x80",	"\xe1\xbd\x94" => "\xcf\x85\xcc\x93\xcc\x81",	"\xe1\xbd\x96" => "\xcf\x85\xcc\x93\xcd\x82",		"\xe1\xbd\x99" => "\xe1\xbd\x91",
195
-		"\xe1\xbd\x9b" => "\xe1\xbd\x93",		"\xe1\xbd\x9d" => "\xe1\xbd\x95",		"\xe1\xbd\x9f" => "\xe1\xbd\x97",		"\xe1\xbd\xa8" => "\xe1\xbd\xa0",
196
-		"\xe1\xbd\xa9" => "\xe1\xbd\xa1",		"\xe1\xbd\xaa" => "\xe1\xbd\xa2",		"\xe1\xbd\xab" => "\xe1\xbd\xa3",		"\xe1\xbd\xac" => "\xe1\xbd\xa4",
197
-		"\xe1\xbd\xad" => "\xe1\xbd\xa5",		"\xe1\xbd\xae" => "\xe1\xbd\xa6",		"\xe1\xbd\xaf" => "\xe1\xbd\xa7",		"\xe1\xbe\x80" => "\xe1\xbc\x80\xce\xb9",
198
-		"\xe1\xbe\x81" => "\xe1\xbc\x81\xce\xb9",	"\xe1\xbe\x82" => "\xe1\xbc\x82\xce\xb9",	"\xe1\xbe\x83" => "\xe1\xbc\x83\xce\xb9",	"\xe1\xbe\x84" => "\xe1\xbc\x84\xce\xb9",
199
-		"\xe1\xbe\x85" => "\xe1\xbc\x85\xce\xb9",	"\xe1\xbe\x86" => "\xe1\xbc\x86\xce\xb9",	"\xe1\xbe\x87" => "\xe1\xbc\x87\xce\xb9",	"\xe1\xbe\x88" => "\xe1\xbe\x80",
200
-		"\xe1\xbe\x89" => "\xe1\xbe\x81",		"\xe1\xbe\x8a" => "\xe1\xbe\x82",		"\xe1\xbe\x8b" => "\xe1\xbe\x83",		"\xe1\xbe\x8c" => "\xe1\xbe\x84",
201
-		"\xe1\xbe\x8d" => "\xe1\xbe\x85",		"\xe1\xbe\x8e" => "\xe1\xbe\x86",		"\xe1\xbe\x8f" => "\xe1\xbe\x87",		"\xe1\xbe\x90" => "\xe1\xbc\xa0\xce\xb9",
202
-		"\xe1\xbe\x91" => "\xe1\xbc\xa1\xce\xb9",	"\xe1\xbe\x92" => "\xe1\xbc\xa2\xce\xb9",	"\xe1\xbe\x93" => "\xe1\xbc\xa3\xce\xb9",	"\xe1\xbe\x94" => "\xe1\xbc\xa4\xce\xb9",
203
-		"\xe1\xbe\x95" => "\xe1\xbc\xa5\xce\xb9",	"\xe1\xbe\x96" => "\xe1\xbc\xa6\xce\xb9",	"\xe1\xbe\x97" => "\xe1\xbc\xa7\xce\xb9",	"\xe1\xbe\x98" => "\xe1\xbe\x90",
204
-		"\xe1\xbe\x99" => "\xe1\xbe\x91",		"\xe1\xbe\x9a" => "\xe1\xbe\x92",		"\xe1\xbe\x9b" => "\xe1\xbe\x93",		"\xe1\xbe\x9c" => "\xe1\xbe\x94",
205
-		"\xe1\xbe\x9d" => "\xe1\xbe\x95",		"\xe1\xbe\x9e" => "\xe1\xbe\x96",		"\xe1\xbe\x9f" => "\xe1\xbe\x97",		"\xe1\xbe\xa0" => "\xe1\xbd\xa0\xce\xb9",
206
-		"\xe1\xbe\xa1" => "\xe1\xbd\xa1\xce\xb9",	"\xe1\xbe\xa2" => "\xe1\xbd\xa2\xce\xb9",	"\xe1\xbe\xa3" => "\xe1\xbd\xa3\xce\xb9",	"\xe1\xbe\xa4" => "\xe1\xbd\xa4\xce\xb9",
207
-		"\xe1\xbe\xa5" => "\xe1\xbd\xa5\xce\xb9",	"\xe1\xbe\xa6" => "\xe1\xbd\xa6\xce\xb9",	"\xe1\xbe\xa7" => "\xe1\xbd\xa7\xce\xb9",	"\xe1\xbe\xa8" => "\xe1\xbe\xa0",
208
-		"\xe1\xbe\xa9" => "\xe1\xbe\xa1",		"\xe1\xbe\xaa" => "\xe1\xbe\xa2",		"\xe1\xbe\xab" => "\xe1\xbe\xa3",		"\xe1\xbe\xac" => "\xe1\xbe\xa4",
209
-		"\xe1\xbe\xad" => "\xe1\xbe\xa5",		"\xe1\xbe\xae" => "\xe1\xbe\xa6",		"\xe1\xbe\xaf" => "\xe1\xbe\xa7",		"\xe1\xbe\xb2" => "\xe1\xbd\xb0\xce\xb9",
210
-		"\xe1\xbe\xb3" => "\xce\xb1\xce\xb9",	"\xe1\xbe\xb4" => "\xce\xac\xce\xb9",	"\xe1\xbe\xb6" => "\xce\xb1\xcd\x82",		"\xe1\xbe\xb7" => "\xce\xb1\xcd\x82\xce\xb9",
211
-		"\xe1\xbe\xb8" => "\xe1\xbe\xb0",		"\xe1\xbe\xb9" => "\xe1\xbe\xb1",		"\xe1\xbe\xba" => "\xe1\xbd\xb0",		"\xe1\xbe\xbb" => "\xe1\xbd\xb1",
212
-		"\xe1\xbe\xbc" => "\xe1\xbe\xb3",		"\xe1\xbe\xbe" => "\xce\xb9",		"\xe1\xbf\x82" => "\xe1\xbd\xb4\xce\xb9",	"\xe1\xbf\x83" => "\xce\xb7\xce\xb9",
213
-		"\xe1\xbf\x84" => "\xce\xae\xce\xb9",	"\xe1\xbf\x86" => "\xce\xb7\xcd\x82",		"\xe1\xbf\x87" => "\xce\xb7\xcd\x82\xce\xb9",	"\xe1\xbf\x88" => "\xe1\xbd\xb2",
214
-		"\xe1\xbf\x89" => "\xe1\xbd\xb3",		"\xe1\xbf\x8a" => "\xe1\xbd\xb4",		"\xe1\xbf\x8b" => "\xe1\xbd\xb5",		"\xe1\xbf\x8c" => "\xe1\xbf\x83",
215
-		"\xe1\xbf\x92" => "\xce\xb9\xcc\x88\xcc\x80",	"\xe1\xbf\x93" => "\xce\xb9\xcc\x88\xcc\x81",	"\xe1\xbf\x96" => "\xce\xb9\xcd\x82",		"\xe1\xbf\x97" => "\xce\xb9\xcc\x88\xcd\x82",
216
-		"\xe1\xbf\x98" => "\xe1\xbf\x90",		"\xe1\xbf\x99" => "\xe1\xbf\x91",		"\xe1\xbf\x9a" => "\xe1\xbd\xb6",		"\xe1\xbf\x9b" => "\xe1\xbd\xb7",
217
-		"\xe1\xbf\xa2" => "\xcf\x85\xcc\x88\xcc\x80",	"\xe1\xbf\xa3" => "\xcf\x85\xcc\x88\xcc\x81",	"\xe1\xbf\xa4" => "\xcf\x81\xcc\x93",		"\xe1\xbf\xa6" => "\xcf\x85\xcd\x82",
218
-		"\xe1\xbf\xa7" => "\xcf\x85\xcc\x88\xcd\x82",		"\xe1\xbf\xa8" => "\xe1\xbf\xa0",		"\xe1\xbf\xa9" => "\xe1\xbf\xa1",		"\xe1\xbf\xaa" => "\xe1\xbd\xba",
219
-		"\xe1\xbf\xab" => "\xe1\xbd\xbb",		"\xe1\xbf\xac" => "\xe1\xbf\xa5",		"\xe1\xbf\xb2" => "\xe1\xbd\xbc\xce\xb9",	"\xe1\xbf\xb3" => "\xcf\x89\xce\xb9",
220
-		"\xe1\xbf\xb4" => "\xcf\x8e\xce\xb9",	"\xe1\xbf\xb6" => "\xcf\x89\xcd\x82",		"\xe1\xbf\xb7" => "\xcf\x89\xcd\x82\xce\xb9",	"\xe1\xbf\xb8" => "\xe1\xbd\xb8",
221
-		"\xe1\xbf\xb9" => "\xe1\xbd\xb9",		"\xe1\xbf\xba" => "\xe1\xbd\xbc",		"\xe1\xbf\xbb" => "\xe1\xbd\xbd",		"\xe1\xbf\xbc" => "\xe1\xbf\xb3",
222
-		"\xe2\x84\xa6" => "\xcf\x89",		"\xe2\x84\xaa" => "k",		"\xe2\x84\xab" => "\xc3\xa5",		"\xe2\x84\xb2" => "\xe2\x85\x8e",
223
-		"\xe2\x85\xa0" => "\xe2\x85\xb0",		"\xe2\x85\xa1" => "\xe2\x85\xb1",		"\xe2\x85\xa2" => "\xe2\x85\xb2",		"\xe2\x85\xa3" => "\xe2\x85\xb3",
224
-		"\xe2\x85\xa4" => "\xe2\x85\xb4",		"\xe2\x85\xa5" => "\xe2\x85\xb5",		"\xe2\x85\xa6" => "\xe2\x85\xb6",		"\xe2\x85\xa7" => "\xe2\x85\xb7",
225
-		"\xe2\x85\xa8" => "\xe2\x85\xb8",		"\xe2\x85\xa9" => "\xe2\x85\xb9",		"\xe2\x85\xaa" => "\xe2\x85\xba",		"\xe2\x85\xab" => "\xe2\x85\xbb",
226
-		"\xe2\x85\xac" => "\xe2\x85\xbc",		"\xe2\x85\xad" => "\xe2\x85\xbd",		"\xe2\x85\xae" => "\xe2\x85\xbe",		"\xe2\x85\xaf" => "\xe2\x85\xbf",
227
-		"\xe2\x86\x83" => "\xe2\x86\x84",		"\xe2\x92\xb6" => "\xe2\x93\x90",		"\xe2\x92\xb7" => "\xe2\x93\x91",		"\xe2\x92\xb8" => "\xe2\x93\x92",
228
-		"\xe2\x92\xb9" => "\xe2\x93\x93",		"\xe2\x92\xba" => "\xe2\x93\x94",		"\xe2\x92\xbb" => "\xe2\x93\x95",		"\xe2\x92\xbc" => "\xe2\x93\x96",
229
-		"\xe2\x92\xbd" => "\xe2\x93\x97",		"\xe2\x92\xbe" => "\xe2\x93\x98",		"\xe2\x92\xbf" => "\xe2\x93\x99",		"\xe2\x93\x80" => "\xe2\x93\x9a",
230
-		"\xe2\x93\x81" => "\xe2\x93\x9b",		"\xe2\x93\x82" => "\xe2\x93\x9c",		"\xe2\x93\x83" => "\xe2\x93\x9d",		"\xe2\x93\x84" => "\xe2\x93\x9e",
231
-		"\xe2\x93\x85" => "\xe2\x93\x9f",		"\xe2\x93\x86" => "\xe2\x93\xa0",		"\xe2\x93\x87" => "\xe2\x93\xa1",		"\xe2\x93\x88" => "\xe2\x93\xa2",
232
-		"\xe2\x93\x89" => "\xe2\x93\xa3",		"\xe2\x93\x8a" => "\xe2\x93\xa4",		"\xe2\x93\x8b" => "\xe2\x93\xa5",		"\xe2\x93\x8c" => "\xe2\x93\xa6",
233
-		"\xe2\x93\x8d" => "\xe2\x93\xa7",		"\xe2\x93\x8e" => "\xe2\x93\xa8",		"\xe2\x93\x8f" => "\xe2\x93\xa9",		"\xe2\xb0\x80" => "\xe2\xb0\xb0",
234
-		"\xe2\xb0\x81" => "\xe2\xb0\xb1",		"\xe2\xb0\x82" => "\xe2\xb0\xb2",		"\xe2\xb0\x83" => "\xe2\xb0\xb3",		"\xe2\xb0\x84" => "\xe2\xb0\xb4",
235
-		"\xe2\xb0\x85" => "\xe2\xb0\xb5",		"\xe2\xb0\x86" => "\xe2\xb0\xb6",		"\xe2\xb0\x87" => "\xe2\xb0\xb7",		"\xe2\xb0\x88" => "\xe2\xb0\xb8",
236
-		"\xe2\xb0\x89" => "\xe2\xb0\xb9",		"\xe2\xb0\x8a" => "\xe2\xb0\xba",		"\xe2\xb0\x8b" => "\xe2\xb0\xbb",		"\xe2\xb0\x8c" => "\xe2\xb0\xbc",
237
-		"\xe2\xb0\x8d" => "\xe2\xb0\xbd",		"\xe2\xb0\x8e" => "\xe2\xb0\xbe",		"\xe2\xb0\x8f" => "\xe2\xb0\xbf",		"\xe2\xb0\x90" => "\xe2\xb1\x80",
238
-		"\xe2\xb0\x91" => "\xe2\xb1\x81",		"\xe2\xb0\x92" => "\xe2\xb1\x82",		"\xe2\xb0\x93" => "\xe2\xb1\x83",		"\xe2\xb0\x94" => "\xe2\xb1\x84",
239
-		"\xe2\xb0\x95" => "\xe2\xb1\x85",		"\xe2\xb0\x96" => "\xe2\xb1\x86",		"\xe2\xb0\x97" => "\xe2\xb1\x87",		"\xe2\xb0\x98" => "\xe2\xb1\x88",
240
-		"\xe2\xb0\x99" => "\xe2\xb1\x89",		"\xe2\xb0\x9a" => "\xe2\xb1\x8a",		"\xe2\xb0\x9b" => "\xe2\xb1\x8b",		"\xe2\xb0\x9c" => "\xe2\xb1\x8c",
241
-		"\xe2\xb0\x9d" => "\xe2\xb1\x8d",		"\xe2\xb0\x9e" => "\xe2\xb1\x8e",		"\xe2\xb0\x9f" => "\xe2\xb1\x8f",		"\xe2\xb0\xa0" => "\xe2\xb1\x90",
242
-		"\xe2\xb0\xa1" => "\xe2\xb1\x91",		"\xe2\xb0\xa2" => "\xe2\xb1\x92",		"\xe2\xb0\xa3" => "\xe2\xb1\x93",		"\xe2\xb0\xa4" => "\xe2\xb1\x94",
243
-		"\xe2\xb0\xa5" => "\xe2\xb1\x95",		"\xe2\xb0\xa6" => "\xe2\xb1\x96",		"\xe2\xb0\xa7" => "\xe2\xb1\x97",		"\xe2\xb0\xa8" => "\xe2\xb1\x98",
244
-		"\xe2\xb0\xa9" => "\xe2\xb1\x99",		"\xe2\xb0\xaa" => "\xe2\xb1\x9a",		"\xe2\xb0\xab" => "\xe2\xb1\x9b",		"\xe2\xb0\xac" => "\xe2\xb1\x9c",
245
-		"\xe2\xb0\xad" => "\xe2\xb1\x9d",		"\xe2\xb0\xae" => "\xe2\xb1\x9e",		"\xe2\xb1\xa0" => "\xe2\xb1\xa1",		"\xe2\xb1\xa2" => "\xc9\xab",
246
-		"\xe2\xb1\xa3" => "\xe1\xb5\xbd",		"\xe2\xb1\xa4" => "\xc9\xbd",		"\xe2\xb1\xa7" => "\xe2\xb1\xa8",		"\xe2\xb1\xa9" => "\xe2\xb1\xaa",
247
-		"\xe2\xb1\xab" => "\xe2\xb1\xac",		"\xe2\xb1\xb5" => "\xe2\xb1\xb6",		"\xe2\xb2\x80" => "\xe2\xb2\x81",		"\xe2\xb2\x82" => "\xe2\xb2\x83",
248
-		"\xe2\xb2\x84" => "\xe2\xb2\x85",		"\xe2\xb2\x86" => "\xe2\xb2\x87",		"\xe2\xb2\x88" => "\xe2\xb2\x89",		"\xe2\xb2\x8a" => "\xe2\xb2\x8b",
249
-		"\xe2\xb2\x8c" => "\xe2\xb2\x8d",		"\xe2\xb2\x8e" => "\xe2\xb2\x8f",		"\xe2\xb2\x90" => "\xe2\xb2\x91",		"\xe2\xb2\x92" => "\xe2\xb2\x93",
250
-		"\xe2\xb2\x94" => "\xe2\xb2\x95",		"\xe2\xb2\x96" => "\xe2\xb2\x97",		"\xe2\xb2\x98" => "\xe2\xb2\x99",		"\xe2\xb2\x9a" => "\xe2\xb2\x9b",
251
-		"\xe2\xb2\x9c" => "\xe2\xb2\x9d",		"\xe2\xb2\x9e" => "\xe2\xb2\x9f",		"\xe2\xb2\xa0" => "\xe2\xb2\xa1",		"\xe2\xb2\xa2" => "\xe2\xb2\xa3",
252
-		"\xe2\xb2\xa4" => "\xe2\xb2\xa5",		"\xe2\xb2\xa6" => "\xe2\xb2\xa7",		"\xe2\xb2\xa8" => "\xe2\xb2\xa9",		"\xe2\xb2\xaa" => "\xe2\xb2\xab",
253
-		"\xe2\xb2\xac" => "\xe2\xb2\xad",		"\xe2\xb2\xae" => "\xe2\xb2\xaf",		"\xe2\xb2\xb0" => "\xe2\xb2\xb1",		"\xe2\xb2\xb2" => "\xe2\xb2\xb3",
254
-		"\xe2\xb2\xb4" => "\xe2\xb2\xb5",		"\xe2\xb2\xb6" => "\xe2\xb2\xb7",		"\xe2\xb2\xb8" => "\xe2\xb2\xb9",		"\xe2\xb2\xba" => "\xe2\xb2\xbb",
255
-		"\xe2\xb2\xbc" => "\xe2\xb2\xbd",		"\xe2\xb2\xbe" => "\xe2\xb2\xbf",		"\xe2\xb3\x80" => "\xe2\xb3\x81",		"\xe2\xb3\x82" => "\xe2\xb3\x83",
256
-		"\xe2\xb3\x84" => "\xe2\xb3\x85",		"\xe2\xb3\x86" => "\xe2\xb3\x87",		"\xe2\xb3\x88" => "\xe2\xb3\x89",		"\xe2\xb3\x8a" => "\xe2\xb3\x8b",
257
-		"\xe2\xb3\x8c" => "\xe2\xb3\x8d",		"\xe2\xb3\x8e" => "\xe2\xb3\x8f",		"\xe2\xb3\x90" => "\xe2\xb3\x91",		"\xe2\xb3\x92" => "\xe2\xb3\x93",
258
-		"\xe2\xb3\x94" => "\xe2\xb3\x95",		"\xe2\xb3\x96" => "\xe2\xb3\x97",		"\xe2\xb3\x98" => "\xe2\xb3\x99",		"\xe2\xb3\x9a" => "\xe2\xb3\x9b",
259
-		"\xe2\xb3\x9c" => "\xe2\xb3\x9d",		"\xe2\xb3\x9e" => "\xe2\xb3\x9f",		"\xe2\xb3\xa0" => "\xe2\xb3\xa1",		"\xe2\xb3\xa2" => "\xe2\xb3\xa3",
260
-		"\xef\xac\x80" => "ff",	"\xef\xac\x81" => "fi",	"\xef\xac\x82" => "fl",	"\xef\xac\x83" => "ffi",
261
-		"\xef\xac\x84" => "ffl",	"\xef\xac\x85" => "st",	"\xef\xac\x86" => "st",	"\xef\xac\x93" => "\xd5\xb4\xd5\xb6",
262
-		"\xef\xac\x94" => "\xd5\xb4\xd5\xa5",	"\xef\xac\x95" => "\xd5\xb4\xd5\xab",	"\xef\xac\x96" => "\xd5\xbe\xd5\xb6",	"\xef\xac\x97" => "\xd5\xb4\xd5\xad",
263
-		"\xef\xbc\xa1" => "\xef\xbd\x81",		"\xef\xbc\xa2" => "\xef\xbd\x82",		"\xef\xbc\xa3" => "\xef\xbd\x83",		"\xef\xbc\xa4" => "\xef\xbd\x84",
264
-		"\xef\xbc\xa5" => "\xef\xbd\x85",		"\xef\xbc\xa6" => "\xef\xbd\x86",		"\xef\xbc\xa7" => "\xef\xbd\x87",		"\xef\xbc\xa8" => "\xef\xbd\x88",
265
-		"\xef\xbc\xa9" => "\xef\xbd\x89",		"\xef\xbc\xaa" => "\xef\xbd\x8a",		"\xef\xbc\xab" => "\xef\xbd\x8b",		"\xef\xbc\xac" => "\xef\xbd\x8c",
266
-		"\xef\xbc\xad" => "\xef\xbd\x8d",	"\xef\xbc\xae" => "\xef\xbd\x8e",		"\xef\xbc\xaf" => "\xef\xbd\x8f",		"\xef\xbc\xb0" => "\xef\xbd\x90",
267
-		"\xef\xbc\xb1" => "\xef\xbd\x91",		"\xef\xbc\xb2" => "\xef\xbd\x92",		"\xef\xbc\xb3" => "\xef\xbd\x93",		"\xef\xbc\xb4" => "\xef\xbd\x94",
268
-		"\xef\xbc\xb5" => "\xef\xbd\x95",		"\xef\xbc\xb6" => "\xef\xbd\x96",		"\xef\xbc\xb7" => "\xef\xbd\x97",	"\xef\xbc\xb8" => "\xef\xbd\x98",
269
-		"\xef\xbc\xb9" => "\xef\xbd\x99",		"\xef\xbc\xba" => "\xef\xbd\x9a",		"\xf0\x90\x90\x80" => "\xf0\x90\x90\xa8",	"\xf0\x90\x90\x81" => "\xf0\x90\x90\xa9",
270
-		"\xf0\x90\x90\x82" => "\xf0\x90\x90\xaa",	"\xf0\x90\x90\x83" => "\xf0\x90\x90\xab",	"\xf0\x90\x90\x84" => "\xf0\x90\x90\xac",	"\xf0\x90\x90\x85" => "\xf0\x90\x90\xad",
271
-		"\xf0\x90\x90\x86" => "\xf0\x90\x90\xae",	"\xf0\x90\x90\x87" => "\xf0\x90\x90\xaf",	"\xf0\x90\x90\x88" => "\xf0\x90\x90\xb0",	"\xf0\x90\x90\x89" => "\xf0\x90\x90\xb1",
272
-		"\xf0\x90\x90\x8a" => "\xf0\x90\x90\xb2",	"\xf0\x90\x90\x8b" => "\xf0\x90\x90\xb3",	"\xf0\x90\x90\x8c" => "\xf0\x90\x90\xb4",	"\xf0\x90\x90\x8d" => "\xf0\x90\x90\xb5",
273
-		"\xf0\x90\x90\x8e" => "\xf0\x90\x90\xb6",	"\xf0\x90\x90\x8f" => "\xf0\x90\x90\xb7",	"\xf0\x90\x90\x90" => "\xf0\x90\x90\xb8",	"\xf0\x90\x90\x91" => "\xf0\x90\x90\xb9",
274
-		"\xf0\x90\x90\x92" => "\xf0\x90\x90\xba",	"\xf0\x90\x90\x93" => "\xf0\x90\x90\xbb",	"\xf0\x90\x90\x94" => "\xf0\x90\x90\xbc",	"\xf0\x90\x90\x95" => "\xf0\x90\x90\xbd",
275
-		"\xf0\x90\x90\x96" => "\xf0\x90\x90\xbe",	"\xf0\x90\x90\x97" => "\xf0\x90\x90\xbf",	"\xf0\x90\x90\x98" => "\xf0\x90\x91\x80",	"\xf0\x90\x90\x99" => "\xf0\x90\x91\x81",
276
-		"\xf0\x90\x90\x9a" => "\xf0\x90\x91\x82",	"\xf0\x90\x90\x9b" => "\xf0\x90\x91\x83",	"\xf0\x90\x90\x9c" => "\xf0\x90\x91\x84",	"\xf0\x90\x90\x9d" => "\xf0\x90\x91\x85",
277
-		"\xf0\x90\x90\x9e" => "\xf0\x90\x91\x86",	"\xf0\x90\x90\x9f" => "\xf0\x90\x91\x87",	"\xf0\x90\x90\xa0" => "\xf0\x90\x91\x88",	"\xf0\x90\x90\xa1" => "\xf0\x90\x91\x89",
278
-		"\xf0\x90\x90\xa2" => "\xf0\x90\x91\x8a",	"\xf0\x90\x90\xa3" => "\xf0\x90\x91\x8b",	"\xf0\x90\x90\xa4" => "\xf0\x90\x91\x8c",	"\xf0\x90\x90\xa5" => "\xf0\x90\x91\x8d",
279
-		"\xf0\x90\x91\x8e" => "\xf0\x90\x90\xa6",	"\xf0\x90\x91\x8f" => "\xf0\x90\x90\xa7",
27
+		'A' => 'a', 'B' => 'b', 'C' => 'c', 'D' => 'd',
28
+		'E' => 'e', 'F' => 'f', 'G' => 'g', 'H' => 'h',
29
+		'I' => 'i', 'J' => 'j', 'K' => 'k', 'L' => 'l',
30
+		'M' => 'm', 'N' => 'n', 'O' => 'o', 'P' => 'p',
31
+		'Q' => 'q', 'R' => 'r', 'S' => 's', 'T' => 't',
32
+		'U' => 'u', 'V' => 'v', 'W' => 'w', 'X' => 'x',
33
+		'Y' => 'y', 'Z' => 'z', "\xc2\xb5" => "\xce\xbc", "\xc3\x80" => "\xc3\xa0",
34
+		"\xc3\x81" => "\xc3\xa1", "\xc3\x82" => "\xc3\xa2", "\xc3\x83" => "\xc3\xa3", "\xc3\x84" => "\xc3\xa4",
35
+		"\xc3\x85" => "\xc3\xa5", "\xc3\x86" => "\xc3\xa6", "\xc3\x87" => "\xc3\xa7", "\xc3\x88" => "\xc3\xa8",
36
+		"\xc3\x89" => "\xc3\xa9", "\xc3\x8a" => "\xc3\xaa", "\xc3\x8b" => "\xc3\xab", "\xc3\x8c" => "\xc3\xac",
37
+		"\xc3\x8d" => "\xc3\xad", "\xc3\x8e" => "\xc3\xae", "\xc3\x8f" => "\xc3\xaf", "\xc3\x90" => "\xc3\xb0",
38
+		"\xc3\x91" => "\xc3\xb1", "\xc3\x92" => "\xc3\xb2", "\xc3\x93" => "\xc3\xb3", "\xc3\x94" => "\xc3\xb4",
39
+		"\xc3\x95" => "\xc3\xb5", "\xc3\x96" => "\xc3\xb6", "\xc3\x98" => "\xc3\xb8", "\xc3\x99" => "\xc3\xb9",
40
+		"\xc3\x9a" => "\xc3\xba", "\xc3\x9b" => "\xc3\xbb", "\xc3\x9c" => "\xc3\xbc", "\xc3\x9d" => "\xc3\xbd",
41
+		"\xc3\x9e" => "\xc3\xbe", "\xc3\x9f" => "ss", "\xc4\x80" => "\xc4\x81", "\xc4\x82" => "\xc4\x83",
42
+		"\xc4\x84" => "\xc4\x85", "\xc4\x86" => "\xc4\x87", "\xc4\x88" => "\xc4\x89", "\xc4\x8a" => "\xc4\x8b",
43
+		"\xc4\x8c" => "\xc4\x8d", "\xc4\x8e" => "\xc4\x8f", "\xc4\x90" => "\xc4\x91", "\xc4\x92" => "\xc4\x93",
44
+		"\xc4\x94" => "\xc4\x95", "\xc4\x96" => "\xc4\x97", "\xc4\x98" => "\xc4\x99", "\xc4\x9a" => "\xc4\x9b",
45
+		"\xc4\x9c" => "\xc4\x9d", "\xc4\x9e" => "\xc4\x9f", "\xc4\xa0" => "\xc4\xa1", "\xc4\xa2" => "\xc4\xa3",
46
+		"\xc4\xa4" => "\xc4\xa5", "\xc4\xa6" => "\xc4\xa7", "\xc4\xa8" => "\xc4\xa9", "\xc4\xaa" => "\xc4\xab",
47
+		"\xc4\xac" => "\xc4\xad", "\xc4\xae" => "\xc4\xaf", "\xc4\xb0" => "i\xcc\x87", "\xc4\xb2" => "\xc4\xb3",
48
+		"\xc4\xb4" => "\xc4\xb5", "\xc4\xb6" => "\xc4\xb7", "\xc4\xb9" => "\xc4\xba", "\xc4\xbb" => "\xc4\xbc",
49
+		"\xc4\xbd" => "\xc4\xbe", "\xc4\xbf" => "\xc5\x80", "\xc5\x81" => "\xc5\x82", "\xc5\x83" => "\xc5\x84",
50
+		"\xc5\x85" => "\xc5\x86", "\xc5\x87" => "\xc5\x88", "\xc5\x89" => "\xca\xbcn", "\xc5\x8a" => "\xc5\x8b",
51
+		"\xc5\x8c" => "\xc5\x8d", "\xc5\x8e" => "\xc5\x8f", "\xc5\x90" => "\xc5\x91", "\xc5\x92" => "\xc5\x93",
52
+		"\xc5\x94" => "\xc5\x95", "\xc5\x96" => "\xc5\x97", "\xc5\x98" => "\xc5\x99", "\xc5\x9a" => "\xc5\x9b",
53
+		"\xc5\x9c" => "\xc5\x9d", "\xc5\x9e" => "\xc5\x9f", "\xc5\xa0" => "\xc5\xa1", "\xc5\xa2" => "\xc5\xa3",
54
+		"\xc5\xa4" => "\xc5\xa5", "\xc5\xa6" => "\xc5\xa7", "\xc5\xa8" => "\xc5\xa9", "\xc5\xaa" => "\xc5\xab",
55
+		"\xc5\xac" => "\xc5\xad", "\xc5\xae" => "\xc5\xaf", "\xc5\xb0" => "\xc5\xb1", "\xc5\xb2" => "\xc5\xb3",
56
+		"\xc5\xb4" => "\xc5\xb5", "\xc5\xb6" => "\xc5\xb7", "\xc5\xb8" => "\xc3\xbf", "\xc5\xb9" => "\xc5\xba",
57
+		"\xc5\xbb" => "\xc5\xbc", "\xc5\xbd" => "\xc5\xbe", "\xc5\xbf" => "s", "\xc6\x81" => "\xc9\x93",
58
+		"\xc6\x82" => "\xc6\x83", "\xc6\x84" => "\xc6\x85", "\xc6\x86" => "\xc9\x94", "\xc6\x87" => "\xc6\x88",
59
+		"\xc6\x89" => "\xc9\x96", "\xc6\x8a" => "\xc9\x97", "\xc6\x8b" => "\xc6\x8c", "\xc6\x8e" => "\xc7\x9d",
60
+		"\xc6\x8f" => "\xc9\x99", "\xc6\x90" => "\xc9\x9b", "\xc6\x91" => "\xc6\x92", "\xc6\x93" => "\xc9\xa0",
61
+		"\xc6\x94" => "\xc9\xa3", "\xc6\x96" => "\xc9\xa9", "\xc6\x97" => "\xc9\xa8", "\xc6\x98" => "\xc6\x99",
62
+		"\xc6\x9c" => "\xc9\xaf", "\xc6\x9d" => "\xc9\xb2", "\xc6\x9f" => "\xc9\xb5", "\xc6\xa0" => "\xc6\xa1",
63
+		"\xc6\xa2" => "\xc6\xa3", "\xc6\xa4" => "\xc6\xa5", "\xc6\xa6" => "\xca\x80", "\xc6\xa7" => "\xc6\xa8",
64
+		"\xc6\xa9" => "\xca\x83", "\xc6\xac" => "\xc6\xad", "\xc6\xae" => "\xca\x88", "\xc6\xaf" => "\xc6\xb0",
65
+		"\xc6\xb1" => "\xca\x8a", "\xc6\xb2" => "\xca\x8b", "\xc6\xb3" => "\xc6\xb4", "\xc6\xb5" => "\xc6\xb6",
66
+		"\xc6\xb7" => "\xca\x92", "\xc6\xb8" => "\xc6\xb9", "\xc6\xbc" => "\xc6\xbd", "\xc7\x84" => "\xc7\x86",
67
+		"\xc7\x85" => "\xc7\x86", "\xc7\x87" => "\xc7\x89", "\xc7\x88" => "\xc7\x89", "\xc7\x8a" => "\xc7\x8c",
68
+		"\xc7\x8b" => "\xc7\x8c", "\xc7\x8d" => "\xc7\x8e", "\xc7\x8f" => "\xc7\x90", "\xc7\x91" => "\xc7\x92",
69
+		"\xc7\x93" => "\xc7\x94", "\xc7\x95" => "\xc7\x96", "\xc7\x97" => "\xc7\x98", "\xc7\x99" => "\xc7\x9a",
70
+		"\xc7\x9b" => "\xc7\x9c", "\xc7\x9e" => "\xc7\x9f", "\xc7\xa0" => "\xc7\xa1", "\xc7\xa2" => "\xc7\xa3",
71
+		"\xc7\xa4" => "\xc7\xa5", "\xc7\xa6" => "\xc7\xa7", "\xc7\xa8" => "\xc7\xa9", "\xc7\xaa" => "\xc7\xab",
72
+		"\xc7\xac" => "\xc7\xad", "\xc7\xae" => "\xc7\xaf", "\xc7\xb0" => "j\xcc\x8c", "\xc7\xb1" => "\xc7\xb3",
73
+		"\xc7\xb2" => "\xc7\xb3", "\xc7\xb4" => "\xc7\xb5", "\xc7\xb6" => "\xc6\x95", "\xc7\xb7" => "\xc6\xbf",
74
+		"\xc7\xb8" => "\xc7\xb9", "\xc7\xba" => "\xc7\xbb", "\xc7\xbc" => "\xc7\xbd", "\xc7\xbe" => "\xc7\xbf",
75
+		"\xc8\x80" => "\xc8\x81", "\xc8\x82" => "\xc8\x83", "\xc8\x84" => "\xc8\x85", "\xc8\x86" => "\xc8\x87",
76
+		"\xc8\x88" => "\xc8\x89", "\xc8\x8a" => "\xc8\x8b", "\xc8\x8c" => "\xc8\x8d", "\xc8\x8e" => "\xc8\x8f",
77
+		"\xc8\x90" => "\xc8\x91", "\xc8\x92" => "\xc8\x93", "\xc8\x94" => "\xc8\x95", "\xc8\x96" => "\xc8\x97",
78
+		"\xc8\x98" => "\xc8\x99", "\xc8\x9a" => "\xc8\x9b", "\xc8\x9c" => "\xc8\x9d", "\xc8\x9e" => "\xc8\x9f",
79
+		"\xc8\xa0" => "\xc6\x9e", "\xc8\xa2" => "\xc8\xa3", "\xc8\xa4" => "\xc8\xa5", "\xc8\xa6" => "\xc8\xa7",
80
+		"\xc8\xa8" => "\xc8\xa9", "\xc8\xaa" => "\xc8\xab", "\xc8\xac" => "\xc8\xad", "\xc8\xae" => "\xc8\xaf",
81
+		"\xc8\xb0" => "\xc8\xb1", "\xc8\xb2" => "\xc8\xb3", "\xc8\xba" => "\xe2\xb1\xa5", "\xc8\xbb" => "\xc8\xbc",
82
+		"\xc8\xbd" => "\xc6\x9a", "\xc8\xbe" => "\xe2\xb1\xa6", "\xc9\x81" => "\xc9\x82", "\xc9\x83" => "\xc6\x80",
83
+		"\xc9\x84" => "\xca\x89", "\xc9\x85" => "\xca\x8c", "\xc9\x86" => "\xc9\x87", "\xc9\x88" => "\xc9\x89",
84
+		"\xc9\x8a" => "\xc9\x8b", "\xc9\x8c" => "\xc9\x8d", "\xc9\x8e" => "\xc9\x8f", "\xcd\x85" => "\xce\xb9",
85
+		"\xce\x86" => "\xce\xac", "\xce\x88" => "\xce\xad", "\xce\x89" => "\xce\xae", "\xce\x8a" => "\xce\xaf",
86
+		"\xce\x8c" => "\xcf\x8c", "\xce\x8e" => "\xcf\x8d", "\xce\x8f" => "\xcf\x8e", "\xce\x90" => "\xce\xb9\xcc\x88\xcc\x81",
87
+		"\xce\x91" => "\xce\xb1", "\xce\x92" => "\xce\xb2", "\xce\x93" => "\xce\xb3", "\xce\x94" => "\xce\xb4",
88
+		"\xce\x95" => "\xce\xb5", "\xce\x96" => "\xce\xb6", "\xce\x97" => "\xce\xb7", "\xce\x98" => "\xce\xb8",
89
+		"\xce\x99" => "\xce\xb9", "\xce\x9a" => "\xce\xba", "\xce\x9b" => "\xce\xbb", "\xce\x9c" => "\xce\xbc",
90
+		"\xce\x9d" => "\xce\xbd", "\xce\x9e" => "\xce\xbe", "\xce\x9f" => "\xce\xbf", "\xce\xa0" => "\xcf\x80",
91
+		"\xce\xa1" => "\xcf\x81", "\xce\xa3" => "\xcf\x83", "\xce\xa4" => "\xcf\x84", "\xce\xa5" => "\xcf\x85",
92
+		"\xce\xa6" => "\xcf\x86", "\xce\xa7" => "\xcf\x87", "\xce\xa8" => "\xcf\x88", "\xce\xa9" => "\xcf\x89",
93
+		"\xce\xaa" => "\xcf\x8a", "\xce\xab" => "\xcf\x8b", "\xce\xb0" => "\xcf\x85\xcc\x88\xcc\x81", "\xcf\x82" => "\xcf\x83",
94
+		"\xcf\x90" => "\xce\xb2", "\xcf\x91" => "\xce\xb8", "\xcf\x95" => "\xcf\x86", "\xcf\x96" => "\xcf\x80",
95
+		"\xcf\x98" => "\xcf\x99", "\xcf\x9a" => "\xcf\x9b", "\xcf\x9c" => "\xcf\x9d", "\xcf\x9e" => "\xcf\x9f",
96
+		"\xcf\xa0" => "\xcf\xa1", "\xcf\xa2" => "\xcf\xa3", "\xcf\xa4" => "\xcf\xa5", "\xcf\xa6" => "\xcf\xa7",
97
+		"\xcf\xa8" => "\xcf\xa9", "\xcf\xaa" => "\xcf\xab", "\xcf\xac" => "\xcf\xad", "\xcf\xae" => "\xcf\xaf",
98
+		"\xcf\xb0" => "\xce\xba", "\xcf\xb1" => "\xcf\x81", "\xcf\xb4" => "\xce\xb8", "\xcf\xb5" => "\xce\xb5",
99
+		"\xcf\xb7" => "\xcf\xb8", "\xcf\xb9" => "\xcf\xb2", "\xcf\xba" => "\xcf\xbb", "\xcf\xbd" => "\xcd\xbb",
100
+		"\xcf\xbe" => "\xcd\xbc", "\xcf\xbf" => "\xcd\xbd", "\xd0\x80" => "\xd1\x90", "\xd0\x81" => "\xd1\x91",
101
+		"\xd0\x82" => "\xd1\x92", "\xd0\x83" => "\xd1\x93", "\xd0\x84" => "\xd1\x94", "\xd0\x85" => "\xd1\x95",
102
+		"\xd0\x86" => "\xd1\x96", "\xd0\x87" => "\xd1\x97", "\xd0\x88" => "\xd1\x98", "\xd0\x89" => "\xd1\x99",
103
+		"\xd0\x8a" => "\xd1\x9a", "\xd0\x8b" => "\xd1\x9b", "\xd0\x8c" => "\xd1\x9c", "\xd0\x8d" => "\xd1\x9d",
104
+		"\xd0\x8e" => "\xd1\x9e", "\xd0\x8f" => "\xd1\x9f", "\xd0\x90" => "\xd0\xb0", "\xd0\x91" => "\xd0\xb1",
105
+		"\xd0\x92" => "\xd0\xb2", "\xd0\x93" => "\xd0\xb3", "\xd0\x94" => "\xd0\xb4", "\xd0\x95" => "\xd0\xb5",
106
+		"\xd0\x96" => "\xd0\xb6", "\xd0\x97" => "\xd0\xb7", "\xd0\x98" => "\xd0\xb8", "\xd0\x99" => "\xd0\xb9",
107
+		"\xd0\x9a" => "\xd0\xba", "\xd0\x9b" => "\xd0\xbb", "\xd0\x9c" => "\xd0\xbc", "\xd0\x9d" => "\xd0\xbd",
108
+		"\xd0\x9e" => "\xd0\xbe", "\xd0\x9f" => "\xd0\xbf", "\xd0\xa0" => "\xd1\x80", "\xd0\xa1" => "\xd1\x81",
109
+		"\xd0\xa2" => "\xd1\x82", "\xd0\xa3" => "\xd1\x83", "\xd0\xa4" => "\xd1\x84", "\xd0\xa5" => "\xd1\x85",
110
+		"\xd0\xa6" => "\xd1\x86", "\xd0\xa7" => "\xd1\x87", "\xd0\xa8" => "\xd1\x88", "\xd0\xa9" => "\xd1\x89",
111
+		"\xd0\xaa" => "\xd1\x8a", "\xd0\xab" => "\xd1\x8b", "\xd0\xac" => "\xd1\x8c", "\xd0\xad" => "\xd1\x8d",
112
+		"\xd0\xae" => "\xd1\x8e", "\xd0\xaf" => "\xd1\x8f", "\xd1\xa0" => "\xd1\xa1", "\xd1\xa2" => "\xd1\xa3",
113
+		"\xd1\xa4" => "\xd1\xa5", "\xd1\xa6" => "\xd1\xa7", "\xd1\xa8" => "\xd1\xa9", "\xd1\xaa" => "\xd1\xab",
114
+		"\xd1\xac" => "\xd1\xad", "\xd1\xae" => "\xd1\xaf", "\xd1\xb0" => "\xd1\xb1", "\xd1\xb2" => "\xd1\xb3",
115
+		"\xd1\xb4" => "\xd1\xb5", "\xd1\xb6" => "\xd1\xb7", "\xd1\xb8" => "\xd1\xb9", "\xd1\xba" => "\xd1\xbb",
116
+		"\xd1\xbc" => "\xd1\xbd", "\xd1\xbe" => "\xd1\xbf", "\xd2\x80" => "\xd2\x81", "\xd2\x8a" => "\xd2\x8b",
117
+		"\xd2\x8c" => "\xd2\x8d", "\xd2\x8e" => "\xd2\x8f", "\xd2\x90" => "\xd2\x91", "\xd2\x92" => "\xd2\x93",
118
+		"\xd2\x94" => "\xd2\x95", "\xd2\x96" => "\xd2\x97", "\xd2\x98" => "\xd2\x99", "\xd2\x9a" => "\xd2\x9b",
119
+		"\xd2\x9c" => "\xd2\x9d", "\xd2\x9e" => "\xd2\x9f", "\xd2\xa0" => "\xd2\xa1", "\xd2\xa2" => "\xd2\xa3",
120
+		"\xd2\xa4" => "\xd2\xa5", "\xd2\xa6" => "\xd2\xa7", "\xd2\xa8" => "\xd2\xa9", "\xd2\xaa" => "\xd2\xab",
121
+		"\xd2\xac" => "\xd2\xad", "\xd2\xae" => "\xd2\xaf", "\xd2\xb0" => "\xd2\xb1", "\xd2\xb2" => "\xd2\xb3",
122
+		"\xd2\xb4" => "\xd2\xb5", "\xd2\xb6" => "\xd2\xb7", "\xd2\xb8" => "\xd2\xb9", "\xd2\xba" => "\xd2\xbb",
123
+		"\xd2\xbc" => "\xd2\xbd", "\xd2\xbe" => "\xd2\xbf", "\xd3\x80" => "\xd3\x8f", "\xd3\x81" => "\xd3\x82",
124
+		"\xd3\x83" => "\xd3\x84", "\xd3\x85" => "\xd3\x86", "\xd3\x87" => "\xd3\x88", "\xd3\x89" => "\xd3\x8a",
125
+		"\xd3\x8b" => "\xd3\x8c", "\xd3\x8d" => "\xd3\x8e", "\xd3\x90" => "\xd3\x91", "\xd3\x92" => "\xd3\x93",
126
+		"\xd3\x94" => "\xd3\x95", "\xd3\x96" => "\xd3\x97", "\xd3\x98" => "\xd3\x99", "\xd3\x9a" => "\xd3\x9b",
127
+		"\xd3\x9c" => "\xd3\x9d", "\xd3\x9e" => "\xd3\x9f", "\xd3\xa0" => "\xd3\xa1", "\xd3\xa2" => "\xd3\xa3",
128
+		"\xd3\xa4" => "\xd3\xa5", "\xd3\xa6" => "\xd3\xa7", "\xd3\xa8" => "\xd3\xa9", "\xd3\xaa" => "\xd3\xab",
129
+		"\xd3\xac" => "\xd3\xad", "\xd3\xae" => "\xd3\xaf", "\xd3\xb0" => "\xd3\xb1", "\xd3\xb2" => "\xd3\xb3",
130
+		"\xd3\xb4" => "\xd3\xb5", "\xd3\xb6" => "\xd3\xb7", "\xd3\xb8" => "\xd3\xb9", "\xd3\xba" => "\xd3\xbb",
131
+		"\xd3\xbc" => "\xd3\xbd", "\xd3\xbe" => "\xd3\xbf", "\xd4\x80" => "\xd4\x81", "\xd4\x82" => "\xd4\x83",
132
+		"\xd4\x84" => "\xd4\x85", "\xd4\x86" => "\xd4\x87", "\xd4\x88" => "\xd4\x89", "\xd4\x8a" => "\xd4\x8b",
133
+		"\xd4\x8c" => "\xd4\x8d", "\xd4\x8e" => "\xd4\x8f", "\xd4\x90" => "\xd4\x91", "\xd4\x92" => "\xd4\x93",
134
+		"\xd4\xb1" => "\xd5\xa1", "\xd4\xb2" => "\xd5\xa2", "\xd4\xb3" => "\xd5\xa3", "\xd4\xb4" => "\xd5\xa4",
135
+		"\xd4\xb5" => "\xd5\xa5", "\xd4\xb6" => "\xd5\xa6", "\xd4\xb7" => "\xd5\xa7", "\xd4\xb8" => "\xd5\xa8",
136
+		"\xd4\xb9" => "\xd5\xa9", "\xd4\xba" => "\xd5\xaa", "\xd4\xbb" => "\xd5\xab", "\xd4\xbc" => "\xd5\xac",
137
+		"\xd4\xbd" => "\xd5\xad", "\xd4\xbe" => "\xd5\xae", "\xd4\xbf" => "\xd5\xaf", "\xd5\x80" => "\xd5\xb0",
138
+		"\xd5\x81" => "\xd5\xb1", "\xd5\x82" => "\xd5\xb2", "\xd5\x83" => "\xd5\xb3", "\xd5\x84" => "\xd5\xb4",
139
+		"\xd5\x85" => "\xd5\xb5", "\xd5\x86" => "\xd5\xb6", "\xd5\x87" => "\xd5\xb7", "\xd5\x88" => "\xd5\xb8",
140
+		"\xd5\x89" => "\xd5\xb9", "\xd5\x8a" => "\xd5\xba", "\xd5\x8b" => "\xd5\xbb", "\xd5\x8c" => "\xd5\xbc",
141
+		"\xd5\x8d" => "\xd5\xbd", "\xd5\x8e" => "\xd5\xbe", "\xd5\x8f" => "\xd5\xbf", "\xd5\x90" => "\xd6\x80",
142
+		"\xd5\x91" => "\xd6\x81", "\xd5\x92" => "\xd6\x82", "\xd5\x93" => "\xd6\x83", "\xd5\x94" => "\xd6\x84",
143
+		"\xd5\x95" => "\xd6\x85", "\xd5\x96" => "\xd6\x86", "\xd6\x87" => "\xd5\xa5\xd6\x82", "\xe1\x82\xa0" => "\xe2\xb4\x80",
144
+		"\xe1\x82\xa1" => "\xe2\xb4\x81", "\xe1\x82\xa2" => "\xe2\xb4\x82", "\xe1\x82\xa3" => "\xe2\xb4\x83", "\xe1\x82\xa4" => "\xe2\xb4\x84",
145
+		"\xe1\x82\xa5" => "\xe2\xb4\x85", "\xe1\x82\xa6" => "\xe2\xb4\x86", "\xe1\x82\xa7" => "\xe2\xb4\x87", "\xe1\x82\xa8" => "\xe2\xb4\x88",
146
+		"\xe1\x82\xa9" => "\xe2\xb4\x89", "\xe1\x82\xaa" => "\xe2\xb4\x8a", "\xe1\x82\xab" => "\xe2\xb4\x8b", "\xe1\x82\xac" => "\xe2\xb4\x8c",
147
+		"\xe1\x82\xad" => "\xe2\xb4\x8d", "\xe1\x82\xae" => "\xe2\xb4\x8e", "\xe1\x82\xaf" => "\xe2\xb4\x8f", "\xe1\x82\xb0" => "\xe2\xb4\x90",
148
+		"\xe1\x82\xb1" => "\xe2\xb4\x91", "\xe1\x82\xb2" => "\xe2\xb4\x92", "\xe1\x82\xb3" => "\xe2\xb4\x93", "\xe1\x82\xb4" => "\xe2\xb4\x94",
149
+		"\xe1\x82\xb5" => "\xe2\xb4\x95", "\xe1\x82\xb6" => "\xe2\xb4\x96", "\xe1\x82\xb7" => "\xe2\xb4\x97", "\xe1\x82\xb8" => "\xe2\xb4\x98",
150
+		"\xe1\x82\xb9" => "\xe2\xb4\x99", "\xe1\x82\xba" => "\xe2\xb4\x9a", "\xe1\x82\xbb" => "\xe2\xb4\x9b", "\xe1\x82\xbc" => "\xe2\xb4\x9c",
151
+		"\xe1\x82\xbd" => "\xe2\xb4\x9d", "\xe1\x82\xbe" => "\xe2\xb4\x9e", "\xe1\x82\xbf" => "\xe2\xb4\x9f", "\xe1\x83\x80" => "\xe2\xb4\xa0",
152
+		"\xe1\x83\x81" => "\xe2\xb4\xa1", "\xe1\x83\x82" => "\xe2\xb4\xa2", "\xe1\x83\x83" => "\xe2\xb4\xa3", "\xe1\x83\x84" => "\xe2\xb4\xa4",
153
+		"\xe1\x83\x85" => "\xe2\xb4\xa5", "\xe1\xb8\x80" => "\xe1\xb8\x81", "\xe1\xb8\x82" => "\xe1\xb8\x83", "\xe1\xb8\x84" => "\xe1\xb8\x85",
154
+		"\xe1\xb8\x86" => "\xe1\xb8\x87", "\xe1\xb8\x88" => "\xe1\xb8\x89", "\xe1\xb8\x8a" => "\xe1\xb8\x8b", "\xe1\xb8\x8c" => "\xe1\xb8\x8d",
155
+		"\xe1\xb8\x8e" => "\xe1\xb8\x8f", "\xe1\xb8\x90" => "\xe1\xb8\x91", "\xe1\xb8\x92" => "\xe1\xb8\x93", "\xe1\xb8\x94" => "\xe1\xb8\x95",
156
+		"\xe1\xb8\x96" => "\xe1\xb8\x97", "\xe1\xb8\x98" => "\xe1\xb8\x99", "\xe1\xb8\x9a" => "\xe1\xb8\x9b", "\xe1\xb8\x9c" => "\xe1\xb8\x9d",
157
+		"\xe1\xb8\x9e" => "\xe1\xb8\x9f", "\xe1\xb8\xa0" => "\xe1\xb8\xa1", "\xe1\xb8\xa2" => "\xe1\xb8\xa3", "\xe1\xb8\xa4" => "\xe1\xb8\xa5",
158
+		"\xe1\xb8\xa6" => "\xe1\xb8\xa7", "\xe1\xb8\xa8" => "\xe1\xb8\xa9", "\xe1\xb8\xaa" => "\xe1\xb8\xab", "\xe1\xb8\xac" => "\xe1\xb8\xad",
159
+		"\xe1\xb8\xae" => "\xe1\xb8\xaf", "\xe1\xb8\xb0" => "\xe1\xb8\xb1", "\xe1\xb8\xb2" => "\xe1\xb8\xb3", "\xe1\xb8\xb4" => "\xe1\xb8\xb5",
160
+		"\xe1\xb8\xb6" => "\xe1\xb8\xb7", "\xe1\xb8\xb8" => "\xe1\xb8\xb9", "\xe1\xb8\xba" => "\xe1\xb8\xbb", "\xe1\xb8\xbc" => "\xe1\xb8\xbd",
161
+		"\xe1\xb8\xbe" => "\xe1\xb8\xbf", "\xe1\xb9\x80" => "\xe1\xb9\x81", "\xe1\xb9\x82" => "\xe1\xb9\x83", "\xe1\xb9\x84" => "\xe1\xb9\x85",
162
+		"\xe1\xb9\x86" => "\xe1\xb9\x87", "\xe1\xb9\x88" => "\xe1\xb9\x89", "\xe1\xb9\x8a" => "\xe1\xb9\x8b", "\xe1\xb9\x8c" => "\xe1\xb9\x8d",
163
+		"\xe1\xb9\x8e" => "\xe1\xb9\x8f", "\xe1\xb9\x90" => "\xe1\xb9\x91", "\xe1\xb9\x92" => "\xe1\xb9\x93", "\xe1\xb9\x94" => "\xe1\xb9\x95",
164
+		"\xe1\xb9\x96" => "\xe1\xb9\x97", "\xe1\xb9\x98" => "\xe1\xb9\x99", "\xe1\xb9\x9a" => "\xe1\xb9\x9b", "\xe1\xb9\x9c" => "\xe1\xb9\x9d",
165
+		"\xe1\xb9\x9e" => "\xe1\xb9\x9f", "\xe1\xb9\xa0" => "\xe1\xb9\xa1", "\xe1\xb9\xa2" => "\xe1\xb9\xa3", "\xe1\xb9\xa4" => "\xe1\xb9\xa5",
166
+		"\xe1\xb9\xa6" => "\xe1\xb9\xa7", "\xe1\xb9\xa8" => "\xe1\xb9\xa9", "\xe1\xb9\xaa" => "\xe1\xb9\xab", "\xe1\xb9\xac" => "\xe1\xb9\xad",
167
+		"\xe1\xb9\xae" => "\xe1\xb9\xaf", "\xe1\xb9\xb0" => "\xe1\xb9\xb1", "\xe1\xb9\xb2" => "\xe1\xb9\xb3", "\xe1\xb9\xb4" => "\xe1\xb9\xb5",
168
+		"\xe1\xb9\xb6" => "\xe1\xb9\xb7", "\xe1\xb9\xb8" => "\xe1\xb9\xb9", "\xe1\xb9\xba" => "\xe1\xb9\xbb", "\xe1\xb9\xbc" => "\xe1\xb9\xbd",
169
+		"\xe1\xb9\xbe" => "\xe1\xb9\xbf", "\xe1\xba\x80" => "\xe1\xba\x81", "\xe1\xba\x82" => "\xe1\xba\x83", "\xe1\xba\x84" => "\xe1\xba\x85",
170
+		"\xe1\xba\x86" => "\xe1\xba\x87", "\xe1\xba\x88" => "\xe1\xba\x89", "\xe1\xba\x8a" => "\xe1\xba\x8b", "\xe1\xba\x8c" => "\xe1\xba\x8d",
171
+		"\xe1\xba\x8e" => "\xe1\xba\x8f", "\xe1\xba\x90" => "\xe1\xba\x91", "\xe1\xba\x92" => "\xe1\xba\x93", "\xe1\xba\x94" => "\xe1\xba\x95",
172
+		"\xe1\xba\x96" => "h\xcc\xb1", "\xe1\xba\x97" => "t\xcc\x88", "\xe1\xba\x98" => "w\xcc\x8a", "\xe1\xba\x99" => "y\xcc\x8a",
173
+		"\xe1\xba\x9a" => "a\xca\xbe", "\xe1\xba\x9b" => "\xe1\xb9\xa1", "\xe1\xba\xa0" => "\xe1\xba\xa1", "\xe1\xba\xa2" => "\xe1\xba\xa3",
174
+		"\xe1\xba\xa4" => "\xe1\xba\xa5", "\xe1\xba\xa6" => "\xe1\xba\xa7", "\xe1\xba\xa8" => "\xe1\xba\xa9", "\xe1\xba\xaa" => "\xe1\xba\xab",
175
+		"\xe1\xba\xac" => "\xe1\xba\xad", "\xe1\xba\xae" => "\xe1\xba\xaf", "\xe1\xba\xb0" => "\xe1\xba\xb1", "\xe1\xba\xb2" => "\xe1\xba\xb3",
176
+		"\xe1\xba\xb4" => "\xe1\xba\xb5", "\xe1\xba\xb6" => "\xe1\xba\xb7", "\xe1\xba\xb8" => "\xe1\xba\xb9", "\xe1\xba\xba" => "\xe1\xba\xbb",
177
+		"\xe1\xba\xbc" => "\xe1\xba\xbd", "\xe1\xba\xbe" => "\xe1\xba\xbf", "\xe1\xbb\x80" => "\xe1\xbb\x81", "\xe1\xbb\x82" => "\xe1\xbb\x83",
178
+		"\xe1\xbb\x84" => "\xe1\xbb\x85", "\xe1\xbb\x86" => "\xe1\xbb\x87", "\xe1\xbb\x88" => "\xe1\xbb\x89", "\xe1\xbb\x8a" => "\xe1\xbb\x8b",
179
+		"\xe1\xbb\x8c" => "\xe1\xbb\x8d", "\xe1\xbb\x8e" => "\xe1\xbb\x8f", "\xe1\xbb\x90" => "\xe1\xbb\x91", "\xe1\xbb\x92" => "\xe1\xbb\x93",
180
+		"\xe1\xbb\x94" => "\xe1\xbb\x95", "\xe1\xbb\x96" => "\xe1\xbb\x97", "\xe1\xbb\x98" => "\xe1\xbb\x99", "\xe1\xbb\x9a" => "\xe1\xbb\x9b",
181
+		"\xe1\xbb\x9c" => "\xe1\xbb\x9d", "\xe1\xbb\x9e" => "\xe1\xbb\x9f", "\xe1\xbb\xa0" => "\xe1\xbb\xa1", "\xe1\xbb\xa2" => "\xe1\xbb\xa3",
182
+		"\xe1\xbb\xa4" => "\xe1\xbb\xa5", "\xe1\xbb\xa6" => "\xe1\xbb\xa7", "\xe1\xbb\xa8" => "\xe1\xbb\xa9", "\xe1\xbb\xaa" => "\xe1\xbb\xab",
183
+		"\xe1\xbb\xac" => "\xe1\xbb\xad", "\xe1\xbb\xae" => "\xe1\xbb\xaf", "\xe1\xbb\xb0" => "\xe1\xbb\xb1", "\xe1\xbb\xb2" => "\xe1\xbb\xb3",
184
+		"\xe1\xbb\xb4" => "\xe1\xbb\xb5", "\xe1\xbb\xb6" => "\xe1\xbb\xb7", "\xe1\xbb\xb8" => "\xe1\xbb\xb9", "\xe1\xbc\x88" => "\xe1\xbc\x80",
185
+		"\xe1\xbc\x89" => "\xe1\xbc\x81", "\xe1\xbc\x8a" => "\xe1\xbc\x82", "\xe1\xbc\x8b" => "\xe1\xbc\x83", "\xe1\xbc\x8c" => "\xe1\xbc\x84",
186
+		"\xe1\xbc\x8d" => "\xe1\xbc\x85", "\xe1\xbc\x8e" => "\xe1\xbc\x86", "\xe1\xbc\x8f" => "\xe1\xbc\x87", "\xe1\xbc\x98" => "\xe1\xbc\x90",
187
+		"\xe1\xbc\x99" => "\xe1\xbc\x91", "\xe1\xbc\x9a" => "\xe1\xbc\x92", "\xe1\xbc\x9b" => "\xe1\xbc\x93", "\xe1\xbc\x9c" => "\xe1\xbc\x94",
188
+		"\xe1\xbc\x9d" => "\xe1\xbc\x95", "\xe1\xbc\xa8" => "\xe1\xbc\xa0", "\xe1\xbc\xa9" => "\xe1\xbc\xa1", "\xe1\xbc\xaa" => "\xe1\xbc\xa2",
189
+		"\xe1\xbc\xab" => "\xe1\xbc\xa3", "\xe1\xbc\xac" => "\xe1\xbc\xa4", "\xe1\xbc\xad" => "\xe1\xbc\xa5", "\xe1\xbc\xae" => "\xe1\xbc\xa6",
190
+		"\xe1\xbc\xaf" => "\xe1\xbc\xa7", "\xe1\xbc\xb8" => "\xe1\xbc\xb0", "\xe1\xbc\xb9" => "\xe1\xbc\xb1", "\xe1\xbc\xba" => "\xe1\xbc\xb2",
191
+		"\xe1\xbc\xbb" => "\xe1\xbc\xb3", "\xe1\xbc\xbc" => "\xe1\xbc\xb4", "\xe1\xbc\xbd" => "\xe1\xbc\xb5", "\xe1\xbc\xbe" => "\xe1\xbc\xb6",
192
+		"\xe1\xbc\xbf" => "\xe1\xbc\xb7", "\xe1\xbd\x88" => "\xe1\xbd\x80", "\xe1\xbd\x89" => "\xe1\xbd\x81", "\xe1\xbd\x8a" => "\xe1\xbd\x82",
193
+		"\xe1\xbd\x8b" => "\xe1\xbd\x83", "\xe1\xbd\x8c" => "\xe1\xbd\x84", "\xe1\xbd\x8d" => "\xe1\xbd\x85", "\xe1\xbd\x90" => "\xcf\x85\xcc\x93",
194
+		"\xe1\xbd\x92" => "\xcf\x85\xcc\x93\xcc\x80", "\xe1\xbd\x94" => "\xcf\x85\xcc\x93\xcc\x81", "\xe1\xbd\x96" => "\xcf\x85\xcc\x93\xcd\x82", "\xe1\xbd\x99" => "\xe1\xbd\x91",
195
+		"\xe1\xbd\x9b" => "\xe1\xbd\x93", "\xe1\xbd\x9d" => "\xe1\xbd\x95", "\xe1\xbd\x9f" => "\xe1\xbd\x97", "\xe1\xbd\xa8" => "\xe1\xbd\xa0",
196
+		"\xe1\xbd\xa9" => "\xe1\xbd\xa1", "\xe1\xbd\xaa" => "\xe1\xbd\xa2", "\xe1\xbd\xab" => "\xe1\xbd\xa3", "\xe1\xbd\xac" => "\xe1\xbd\xa4",
197
+		"\xe1\xbd\xad" => "\xe1\xbd\xa5", "\xe1\xbd\xae" => "\xe1\xbd\xa6", "\xe1\xbd\xaf" => "\xe1\xbd\xa7", "\xe1\xbe\x80" => "\xe1\xbc\x80\xce\xb9",
198
+		"\xe1\xbe\x81" => "\xe1\xbc\x81\xce\xb9", "\xe1\xbe\x82" => "\xe1\xbc\x82\xce\xb9", "\xe1\xbe\x83" => "\xe1\xbc\x83\xce\xb9", "\xe1\xbe\x84" => "\xe1\xbc\x84\xce\xb9",
199
+		"\xe1\xbe\x85" => "\xe1\xbc\x85\xce\xb9", "\xe1\xbe\x86" => "\xe1\xbc\x86\xce\xb9", "\xe1\xbe\x87" => "\xe1\xbc\x87\xce\xb9", "\xe1\xbe\x88" => "\xe1\xbe\x80",
200
+		"\xe1\xbe\x89" => "\xe1\xbe\x81", "\xe1\xbe\x8a" => "\xe1\xbe\x82", "\xe1\xbe\x8b" => "\xe1\xbe\x83", "\xe1\xbe\x8c" => "\xe1\xbe\x84",
201
+		"\xe1\xbe\x8d" => "\xe1\xbe\x85", "\xe1\xbe\x8e" => "\xe1\xbe\x86", "\xe1\xbe\x8f" => "\xe1\xbe\x87", "\xe1\xbe\x90" => "\xe1\xbc\xa0\xce\xb9",
202
+		"\xe1\xbe\x91" => "\xe1\xbc\xa1\xce\xb9", "\xe1\xbe\x92" => "\xe1\xbc\xa2\xce\xb9", "\xe1\xbe\x93" => "\xe1\xbc\xa3\xce\xb9", "\xe1\xbe\x94" => "\xe1\xbc\xa4\xce\xb9",
203
+		"\xe1\xbe\x95" => "\xe1\xbc\xa5\xce\xb9", "\xe1\xbe\x96" => "\xe1\xbc\xa6\xce\xb9", "\xe1\xbe\x97" => "\xe1\xbc\xa7\xce\xb9", "\xe1\xbe\x98" => "\xe1\xbe\x90",
204
+		"\xe1\xbe\x99" => "\xe1\xbe\x91", "\xe1\xbe\x9a" => "\xe1\xbe\x92", "\xe1\xbe\x9b" => "\xe1\xbe\x93", "\xe1\xbe\x9c" => "\xe1\xbe\x94",
205
+		"\xe1\xbe\x9d" => "\xe1\xbe\x95", "\xe1\xbe\x9e" => "\xe1\xbe\x96", "\xe1\xbe\x9f" => "\xe1\xbe\x97", "\xe1\xbe\xa0" => "\xe1\xbd\xa0\xce\xb9",
206
+		"\xe1\xbe\xa1" => "\xe1\xbd\xa1\xce\xb9", "\xe1\xbe\xa2" => "\xe1\xbd\xa2\xce\xb9", "\xe1\xbe\xa3" => "\xe1\xbd\xa3\xce\xb9", "\xe1\xbe\xa4" => "\xe1\xbd\xa4\xce\xb9",
207
+		"\xe1\xbe\xa5" => "\xe1\xbd\xa5\xce\xb9", "\xe1\xbe\xa6" => "\xe1\xbd\xa6\xce\xb9", "\xe1\xbe\xa7" => "\xe1\xbd\xa7\xce\xb9", "\xe1\xbe\xa8" => "\xe1\xbe\xa0",
208
+		"\xe1\xbe\xa9" => "\xe1\xbe\xa1", "\xe1\xbe\xaa" => "\xe1\xbe\xa2", "\xe1\xbe\xab" => "\xe1\xbe\xa3", "\xe1\xbe\xac" => "\xe1\xbe\xa4",
209
+		"\xe1\xbe\xad" => "\xe1\xbe\xa5", "\xe1\xbe\xae" => "\xe1\xbe\xa6", "\xe1\xbe\xaf" => "\xe1\xbe\xa7", "\xe1\xbe\xb2" => "\xe1\xbd\xb0\xce\xb9",
210
+		"\xe1\xbe\xb3" => "\xce\xb1\xce\xb9", "\xe1\xbe\xb4" => "\xce\xac\xce\xb9", "\xe1\xbe\xb6" => "\xce\xb1\xcd\x82", "\xe1\xbe\xb7" => "\xce\xb1\xcd\x82\xce\xb9",
211
+		"\xe1\xbe\xb8" => "\xe1\xbe\xb0", "\xe1\xbe\xb9" => "\xe1\xbe\xb1", "\xe1\xbe\xba" => "\xe1\xbd\xb0", "\xe1\xbe\xbb" => "\xe1\xbd\xb1",
212
+		"\xe1\xbe\xbc" => "\xe1\xbe\xb3", "\xe1\xbe\xbe" => "\xce\xb9", "\xe1\xbf\x82" => "\xe1\xbd\xb4\xce\xb9", "\xe1\xbf\x83" => "\xce\xb7\xce\xb9",
213
+		"\xe1\xbf\x84" => "\xce\xae\xce\xb9", "\xe1\xbf\x86" => "\xce\xb7\xcd\x82", "\xe1\xbf\x87" => "\xce\xb7\xcd\x82\xce\xb9", "\xe1\xbf\x88" => "\xe1\xbd\xb2",
214
+		"\xe1\xbf\x89" => "\xe1\xbd\xb3", "\xe1\xbf\x8a" => "\xe1\xbd\xb4", "\xe1\xbf\x8b" => "\xe1\xbd\xb5", "\xe1\xbf\x8c" => "\xe1\xbf\x83",
215
+		"\xe1\xbf\x92" => "\xce\xb9\xcc\x88\xcc\x80", "\xe1\xbf\x93" => "\xce\xb9\xcc\x88\xcc\x81", "\xe1\xbf\x96" => "\xce\xb9\xcd\x82", "\xe1\xbf\x97" => "\xce\xb9\xcc\x88\xcd\x82",
216
+		"\xe1\xbf\x98" => "\xe1\xbf\x90", "\xe1\xbf\x99" => "\xe1\xbf\x91", "\xe1\xbf\x9a" => "\xe1\xbd\xb6", "\xe1\xbf\x9b" => "\xe1\xbd\xb7",
217
+		"\xe1\xbf\xa2" => "\xcf\x85\xcc\x88\xcc\x80", "\xe1\xbf\xa3" => "\xcf\x85\xcc\x88\xcc\x81", "\xe1\xbf\xa4" => "\xcf\x81\xcc\x93", "\xe1\xbf\xa6" => "\xcf\x85\xcd\x82",
218
+		"\xe1\xbf\xa7" => "\xcf\x85\xcc\x88\xcd\x82", "\xe1\xbf\xa8" => "\xe1\xbf\xa0", "\xe1\xbf\xa9" => "\xe1\xbf\xa1", "\xe1\xbf\xaa" => "\xe1\xbd\xba",
219
+		"\xe1\xbf\xab" => "\xe1\xbd\xbb", "\xe1\xbf\xac" => "\xe1\xbf\xa5", "\xe1\xbf\xb2" => "\xe1\xbd\xbc\xce\xb9", "\xe1\xbf\xb3" => "\xcf\x89\xce\xb9",
220
+		"\xe1\xbf\xb4" => "\xcf\x8e\xce\xb9", "\xe1\xbf\xb6" => "\xcf\x89\xcd\x82", "\xe1\xbf\xb7" => "\xcf\x89\xcd\x82\xce\xb9", "\xe1\xbf\xb8" => "\xe1\xbd\xb8",
221
+		"\xe1\xbf\xb9" => "\xe1\xbd\xb9", "\xe1\xbf\xba" => "\xe1\xbd\xbc", "\xe1\xbf\xbb" => "\xe1\xbd\xbd", "\xe1\xbf\xbc" => "\xe1\xbf\xb3",
222
+		"\xe2\x84\xa6" => "\xcf\x89", "\xe2\x84\xaa" => "k", "\xe2\x84\xab" => "\xc3\xa5", "\xe2\x84\xb2" => "\xe2\x85\x8e",
223
+		"\xe2\x85\xa0" => "\xe2\x85\xb0", "\xe2\x85\xa1" => "\xe2\x85\xb1", "\xe2\x85\xa2" => "\xe2\x85\xb2", "\xe2\x85\xa3" => "\xe2\x85\xb3",
224
+		"\xe2\x85\xa4" => "\xe2\x85\xb4", "\xe2\x85\xa5" => "\xe2\x85\xb5", "\xe2\x85\xa6" => "\xe2\x85\xb6", "\xe2\x85\xa7" => "\xe2\x85\xb7",
225
+		"\xe2\x85\xa8" => "\xe2\x85\xb8", "\xe2\x85\xa9" => "\xe2\x85\xb9", "\xe2\x85\xaa" => "\xe2\x85\xba", "\xe2\x85\xab" => "\xe2\x85\xbb",
226
+		"\xe2\x85\xac" => "\xe2\x85\xbc", "\xe2\x85\xad" => "\xe2\x85\xbd", "\xe2\x85\xae" => "\xe2\x85\xbe", "\xe2\x85\xaf" => "\xe2\x85\xbf",
227
+		"\xe2\x86\x83" => "\xe2\x86\x84", "\xe2\x92\xb6" => "\xe2\x93\x90", "\xe2\x92\xb7" => "\xe2\x93\x91", "\xe2\x92\xb8" => "\xe2\x93\x92",
228
+		"\xe2\x92\xb9" => "\xe2\x93\x93", "\xe2\x92\xba" => "\xe2\x93\x94", "\xe2\x92\xbb" => "\xe2\x93\x95", "\xe2\x92\xbc" => "\xe2\x93\x96",
229
+		"\xe2\x92\xbd" => "\xe2\x93\x97", "\xe2\x92\xbe" => "\xe2\x93\x98", "\xe2\x92\xbf" => "\xe2\x93\x99", "\xe2\x93\x80" => "\xe2\x93\x9a",
230
+		"\xe2\x93\x81" => "\xe2\x93\x9b", "\xe2\x93\x82" => "\xe2\x93\x9c", "\xe2\x93\x83" => "\xe2\x93\x9d", "\xe2\x93\x84" => "\xe2\x93\x9e",
231
+		"\xe2\x93\x85" => "\xe2\x93\x9f", "\xe2\x93\x86" => "\xe2\x93\xa0", "\xe2\x93\x87" => "\xe2\x93\xa1", "\xe2\x93\x88" => "\xe2\x93\xa2",
232
+		"\xe2\x93\x89" => "\xe2\x93\xa3", "\xe2\x93\x8a" => "\xe2\x93\xa4", "\xe2\x93\x8b" => "\xe2\x93\xa5", "\xe2\x93\x8c" => "\xe2\x93\xa6",
233
+		"\xe2\x93\x8d" => "\xe2\x93\xa7", "\xe2\x93\x8e" => "\xe2\x93\xa8", "\xe2\x93\x8f" => "\xe2\x93\xa9", "\xe2\xb0\x80" => "\xe2\xb0\xb0",
234
+		"\xe2\xb0\x81" => "\xe2\xb0\xb1", "\xe2\xb0\x82" => "\xe2\xb0\xb2", "\xe2\xb0\x83" => "\xe2\xb0\xb3", "\xe2\xb0\x84" => "\xe2\xb0\xb4",
235
+		"\xe2\xb0\x85" => "\xe2\xb0\xb5", "\xe2\xb0\x86" => "\xe2\xb0\xb6", "\xe2\xb0\x87" => "\xe2\xb0\xb7", "\xe2\xb0\x88" => "\xe2\xb0\xb8",
236
+		"\xe2\xb0\x89" => "\xe2\xb0\xb9", "\xe2\xb0\x8a" => "\xe2\xb0\xba", "\xe2\xb0\x8b" => "\xe2\xb0\xbb", "\xe2\xb0\x8c" => "\xe2\xb0\xbc",
237
+		"\xe2\xb0\x8d" => "\xe2\xb0\xbd", "\xe2\xb0\x8e" => "\xe2\xb0\xbe", "\xe2\xb0\x8f" => "\xe2\xb0\xbf", "\xe2\xb0\x90" => "\xe2\xb1\x80",
238
+		"\xe2\xb0\x91" => "\xe2\xb1\x81", "\xe2\xb0\x92" => "\xe2\xb1\x82", "\xe2\xb0\x93" => "\xe2\xb1\x83", "\xe2\xb0\x94" => "\xe2\xb1\x84",
239
+		"\xe2\xb0\x95" => "\xe2\xb1\x85", "\xe2\xb0\x96" => "\xe2\xb1\x86", "\xe2\xb0\x97" => "\xe2\xb1\x87", "\xe2\xb0\x98" => "\xe2\xb1\x88",
240
+		"\xe2\xb0\x99" => "\xe2\xb1\x89", "\xe2\xb0\x9a" => "\xe2\xb1\x8a", "\xe2\xb0\x9b" => "\xe2\xb1\x8b", "\xe2\xb0\x9c" => "\xe2\xb1\x8c",
241
+		"\xe2\xb0\x9d" => "\xe2\xb1\x8d", "\xe2\xb0\x9e" => "\xe2\xb1\x8e", "\xe2\xb0\x9f" => "\xe2\xb1\x8f", "\xe2\xb0\xa0" => "\xe2\xb1\x90",
242
+		"\xe2\xb0\xa1" => "\xe2\xb1\x91", "\xe2\xb0\xa2" => "\xe2\xb1\x92", "\xe2\xb0\xa3" => "\xe2\xb1\x93", "\xe2\xb0\xa4" => "\xe2\xb1\x94",
243
+		"\xe2\xb0\xa5" => "\xe2\xb1\x95", "\xe2\xb0\xa6" => "\xe2\xb1\x96", "\xe2\xb0\xa7" => "\xe2\xb1\x97", "\xe2\xb0\xa8" => "\xe2\xb1\x98",
244
+		"\xe2\xb0\xa9" => "\xe2\xb1\x99", "\xe2\xb0\xaa" => "\xe2\xb1\x9a", "\xe2\xb0\xab" => "\xe2\xb1\x9b", "\xe2\xb0\xac" => "\xe2\xb1\x9c",
245
+		"\xe2\xb0\xad" => "\xe2\xb1\x9d", "\xe2\xb0\xae" => "\xe2\xb1\x9e", "\xe2\xb1\xa0" => "\xe2\xb1\xa1", "\xe2\xb1\xa2" => "\xc9\xab",
246
+		"\xe2\xb1\xa3" => "\xe1\xb5\xbd", "\xe2\xb1\xa4" => "\xc9\xbd", "\xe2\xb1\xa7" => "\xe2\xb1\xa8", "\xe2\xb1\xa9" => "\xe2\xb1\xaa",
247
+		"\xe2\xb1\xab" => "\xe2\xb1\xac", "\xe2\xb1\xb5" => "\xe2\xb1\xb6", "\xe2\xb2\x80" => "\xe2\xb2\x81", "\xe2\xb2\x82" => "\xe2\xb2\x83",
248
+		"\xe2\xb2\x84" => "\xe2\xb2\x85", "\xe2\xb2\x86" => "\xe2\xb2\x87", "\xe2\xb2\x88" => "\xe2\xb2\x89", "\xe2\xb2\x8a" => "\xe2\xb2\x8b",
249
+		"\xe2\xb2\x8c" => "\xe2\xb2\x8d", "\xe2\xb2\x8e" => "\xe2\xb2\x8f", "\xe2\xb2\x90" => "\xe2\xb2\x91", "\xe2\xb2\x92" => "\xe2\xb2\x93",
250
+		"\xe2\xb2\x94" => "\xe2\xb2\x95", "\xe2\xb2\x96" => "\xe2\xb2\x97", "\xe2\xb2\x98" => "\xe2\xb2\x99", "\xe2\xb2\x9a" => "\xe2\xb2\x9b",
251
+		"\xe2\xb2\x9c" => "\xe2\xb2\x9d", "\xe2\xb2\x9e" => "\xe2\xb2\x9f", "\xe2\xb2\xa0" => "\xe2\xb2\xa1", "\xe2\xb2\xa2" => "\xe2\xb2\xa3",
252
+		"\xe2\xb2\xa4" => "\xe2\xb2\xa5", "\xe2\xb2\xa6" => "\xe2\xb2\xa7", "\xe2\xb2\xa8" => "\xe2\xb2\xa9", "\xe2\xb2\xaa" => "\xe2\xb2\xab",
253
+		"\xe2\xb2\xac" => "\xe2\xb2\xad", "\xe2\xb2\xae" => "\xe2\xb2\xaf", "\xe2\xb2\xb0" => "\xe2\xb2\xb1", "\xe2\xb2\xb2" => "\xe2\xb2\xb3",
254
+		"\xe2\xb2\xb4" => "\xe2\xb2\xb5", "\xe2\xb2\xb6" => "\xe2\xb2\xb7", "\xe2\xb2\xb8" => "\xe2\xb2\xb9", "\xe2\xb2\xba" => "\xe2\xb2\xbb",
255
+		"\xe2\xb2\xbc" => "\xe2\xb2\xbd", "\xe2\xb2\xbe" => "\xe2\xb2\xbf", "\xe2\xb3\x80" => "\xe2\xb3\x81", "\xe2\xb3\x82" => "\xe2\xb3\x83",
256
+		"\xe2\xb3\x84" => "\xe2\xb3\x85", "\xe2\xb3\x86" => "\xe2\xb3\x87", "\xe2\xb3\x88" => "\xe2\xb3\x89", "\xe2\xb3\x8a" => "\xe2\xb3\x8b",
257
+		"\xe2\xb3\x8c" => "\xe2\xb3\x8d", "\xe2\xb3\x8e" => "\xe2\xb3\x8f", "\xe2\xb3\x90" => "\xe2\xb3\x91", "\xe2\xb3\x92" => "\xe2\xb3\x93",
258
+		"\xe2\xb3\x94" => "\xe2\xb3\x95", "\xe2\xb3\x96" => "\xe2\xb3\x97", "\xe2\xb3\x98" => "\xe2\xb3\x99", "\xe2\xb3\x9a" => "\xe2\xb3\x9b",
259
+		"\xe2\xb3\x9c" => "\xe2\xb3\x9d", "\xe2\xb3\x9e" => "\xe2\xb3\x9f", "\xe2\xb3\xa0" => "\xe2\xb3\xa1", "\xe2\xb3\xa2" => "\xe2\xb3\xa3",
260
+		"\xef\xac\x80" => "ff", "\xef\xac\x81" => "fi", "\xef\xac\x82" => "fl", "\xef\xac\x83" => "ffi",
261
+		"\xef\xac\x84" => "ffl", "\xef\xac\x85" => "st", "\xef\xac\x86" => "st", "\xef\xac\x93" => "\xd5\xb4\xd5\xb6",
262
+		"\xef\xac\x94" => "\xd5\xb4\xd5\xa5", "\xef\xac\x95" => "\xd5\xb4\xd5\xab", "\xef\xac\x96" => "\xd5\xbe\xd5\xb6", "\xef\xac\x97" => "\xd5\xb4\xd5\xad",
263
+		"\xef\xbc\xa1" => "\xef\xbd\x81", "\xef\xbc\xa2" => "\xef\xbd\x82", "\xef\xbc\xa3" => "\xef\xbd\x83", "\xef\xbc\xa4" => "\xef\xbd\x84",
264
+		"\xef\xbc\xa5" => "\xef\xbd\x85", "\xef\xbc\xa6" => "\xef\xbd\x86", "\xef\xbc\xa7" => "\xef\xbd\x87", "\xef\xbc\xa8" => "\xef\xbd\x88",
265
+		"\xef\xbc\xa9" => "\xef\xbd\x89", "\xef\xbc\xaa" => "\xef\xbd\x8a", "\xef\xbc\xab" => "\xef\xbd\x8b", "\xef\xbc\xac" => "\xef\xbd\x8c",
266
+		"\xef\xbc\xad" => "\xef\xbd\x8d", "\xef\xbc\xae" => "\xef\xbd\x8e", "\xef\xbc\xaf" => "\xef\xbd\x8f", "\xef\xbc\xb0" => "\xef\xbd\x90",
267
+		"\xef\xbc\xb1" => "\xef\xbd\x91", "\xef\xbc\xb2" => "\xef\xbd\x92", "\xef\xbc\xb3" => "\xef\xbd\x93", "\xef\xbc\xb4" => "\xef\xbd\x94",
268
+		"\xef\xbc\xb5" => "\xef\xbd\x95", "\xef\xbc\xb6" => "\xef\xbd\x96", "\xef\xbc\xb7" => "\xef\xbd\x97", "\xef\xbc\xb8" => "\xef\xbd\x98",
269
+		"\xef\xbc\xb9" => "\xef\xbd\x99", "\xef\xbc\xba" => "\xef\xbd\x9a", "\xf0\x90\x90\x80" => "\xf0\x90\x90\xa8", "\xf0\x90\x90\x81" => "\xf0\x90\x90\xa9",
270
+		"\xf0\x90\x90\x82" => "\xf0\x90\x90\xaa", "\xf0\x90\x90\x83" => "\xf0\x90\x90\xab", "\xf0\x90\x90\x84" => "\xf0\x90\x90\xac", "\xf0\x90\x90\x85" => "\xf0\x90\x90\xad",
271
+		"\xf0\x90\x90\x86" => "\xf0\x90\x90\xae", "\xf0\x90\x90\x87" => "\xf0\x90\x90\xaf", "\xf0\x90\x90\x88" => "\xf0\x90\x90\xb0", "\xf0\x90\x90\x89" => "\xf0\x90\x90\xb1",
272
+		"\xf0\x90\x90\x8a" => "\xf0\x90\x90\xb2", "\xf0\x90\x90\x8b" => "\xf0\x90\x90\xb3", "\xf0\x90\x90\x8c" => "\xf0\x90\x90\xb4", "\xf0\x90\x90\x8d" => "\xf0\x90\x90\xb5",
273
+		"\xf0\x90\x90\x8e" => "\xf0\x90\x90\xb6", "\xf0\x90\x90\x8f" => "\xf0\x90\x90\xb7", "\xf0\x90\x90\x90" => "\xf0\x90\x90\xb8", "\xf0\x90\x90\x91" => "\xf0\x90\x90\xb9",
274
+		"\xf0\x90\x90\x92" => "\xf0\x90\x90\xba", "\xf0\x90\x90\x93" => "\xf0\x90\x90\xbb", "\xf0\x90\x90\x94" => "\xf0\x90\x90\xbc", "\xf0\x90\x90\x95" => "\xf0\x90\x90\xbd",
275
+		"\xf0\x90\x90\x96" => "\xf0\x90\x90\xbe", "\xf0\x90\x90\x97" => "\xf0\x90\x90\xbf", "\xf0\x90\x90\x98" => "\xf0\x90\x91\x80", "\xf0\x90\x90\x99" => "\xf0\x90\x91\x81",
276
+		"\xf0\x90\x90\x9a" => "\xf0\x90\x91\x82", "\xf0\x90\x90\x9b" => "\xf0\x90\x91\x83", "\xf0\x90\x90\x9c" => "\xf0\x90\x91\x84", "\xf0\x90\x90\x9d" => "\xf0\x90\x91\x85",
277
+		"\xf0\x90\x90\x9e" => "\xf0\x90\x91\x86", "\xf0\x90\x90\x9f" => "\xf0\x90\x91\x87", "\xf0\x90\x90\xa0" => "\xf0\x90\x91\x88", "\xf0\x90\x90\xa1" => "\xf0\x90\x91\x89",
278
+		"\xf0\x90\x90\xa2" => "\xf0\x90\x91\x8a", "\xf0\x90\x90\xa3" => "\xf0\x90\x91\x8b", "\xf0\x90\x90\xa4" => "\xf0\x90\x91\x8c", "\xf0\x90\x90\xa5" => "\xf0\x90\x91\x8d",
279
+		"\xf0\x90\x91\x8e" => "\xf0\x90\x90\xa6", "\xf0\x90\x91\x8f" => "\xf0\x90\x90\xa7",
280 280
 	);
281 281
 
282 282
 	return strtr($string, $case_folding);
@@ -293,259 +293,259 @@  discard block
 block discarded – undo
293 293
 function utf8_strtoupper($string)
294 294
 {
295 295
 	static $case_folding = array(
296
-		'a' => 'A',		'b' => 'B',		'c' => 'C',		'd' => 'D',
297
-		'e' => 'E',		'f' => 'F',		'g' => 'G',		'h' => 'H',
298
-		'i' => 'I',		'j' => 'J',		'k' => 'K',		'l' => 'L',
299
-		'm' => 'M',		'n' => 'N',		'o' => 'O',		'p' => 'P',
300
-		'q' => 'Q',		'r' => 'R',		's' => 'S',		't' => 'T',
301
-		'u' => 'U',		'v' => 'V',		'w' => 'W',		'x' => 'X',
302
-		'y' => 'Y',		'z' => 'Z',		"\xce\xbc" => "\xc2\xb5",		"\xc3\xa0" => "\xc3\x80",
303
-		"\xc3\xa1" => "\xc3\x81",		"\xc3\xa2" => "\xc3\x82",		"\xc3\xa3" => "\xc3\x83",		"\xc3\xa4" => "\xc3\x84",
304
-		"\xc3\xa5" => "\xc3\x85",		"\xc3\xa6" => "\xc3\x86",		"\xc3\xa7" => "\xc3\x87",		"\xc3\xa8" => "\xc3\x88",
305
-		"\xc3\xa9" => "\xc3\x89",		"\xc3\xaa" => "\xc3\x8a",		"\xc3\xab" => "\xc3\x8b",		"\xc3\xac" => "\xc3\x8c",
306
-		"\xc3\xad" => "\xc3\x8d",		"\xc3\xae" => "\xc3\x8e",		"\xc3\xaf" => "\xc3\x8f",		"\xc3\xb0" => "\xc3\x90",
307
-		"\xc3\xb1" => "\xc3\x91",		"\xc3\xb2" => "\xc3\x92",		"\xc3\xb3" => "\xc3\x93",		"\xc3\xb4" => "\xc3\x94",
308
-		"\xc3\xb5" => "\xc3\x95",		"\xc3\xb6" => "\xc3\x96",		"\xc3\xb8" => "\xc3\x98",		"\xc3\xb9" => "\xc3\x99",
309
-		"\xc3\xba" => "\xc3\x9a",		"\xc3\xbb" => "\xc3\x9b",		"\xc3\xbc" => "\xc3\x9c",		"\xc3\xbd" => "\xc3\x9d",
310
-		"\xc3\xbe" => "\xc3\x9e",		"ss" => "\xc3\x9f",	"\xc4\x81" => "\xc4\x80",		"\xc4\x83" => "\xc4\x82",
311
-		"\xc4\x85" => "\xc4\x84",		"\xc4\x87" => "\xc4\x86",		"\xc4\x89" => "\xc4\x88",		"\xc4\x8b" => "\xc4\x8a",
312
-		"\xc4\x8d" => "\xc4\x8c",		"\xc4\x8f" => "\xc4\x8e",		"\xc4\x91" => "\xc4\x90",		"\xc4\x93" => "\xc4\x92",
313
-		"\xc4\x95" => "\xc4\x94",		"\xc4\x97" => "\xc4\x96",		"\xc4\x99" => "\xc4\x98",		"\xc4\x9b" => "\xc4\x9a",
314
-		"\xc4\x9d" => "\xc4\x9c",		"\xc4\x9f" => "\xc4\x9e",		"\xc4\xa1" => "\xc4\xa0",		"\xc4\xa3" => "\xc4\xa2",
315
-		"\xc4\xa5" => "\xc4\xa4",		"\xc4\xa7" => "\xc4\xa6",		"\xc4\xa9" => "\xc4\xa8",		"\xc4\xab" => "\xc4\xaa",
316
-		"\xc4\xad" => "\xc4\xac",		"\xc4\xaf" => "\xc4\xae",		"i\xcc\x87" => "\xc4\xb0",		"\xc4\xb3" => "\xc4\xb2",
317
-		"\xc4\xb5" => "\xc4\xb4",		"\xc4\xb7" => "\xc4\xb6",		"\xc4\xba" => "\xc4\xb9",		"\xc4\xbc" => "\xc4\xbb",
318
-		"\xc4\xbe" => "\xc4\xbd",		"\xc5\x80" => "\xc4\xbf",		"\xc5\x82" => "\xc5\x81",		"\xc5\x84" => "\xc5\x83",
319
-		"\xc5\x86" => "\xc5\x85",		"\xc5\x88" => "\xc5\x87",		"\xca\xbcn" => "\xc5\x89",	"\xc5\x8b" => "\xc5\x8a",
320
-		"\xc5\x8d" => "\xc5\x8c",		"\xc5\x8f" => "\xc5\x8e",		"\xc5\x91" => "\xc5\x90",		"\xc5\x93" => "\xc5\x92",
321
-		"\xc5\x95" => "\xc5\x94",		"\xc5\x97" => "\xc5\x96",		"\xc5\x99" => "\xc5\x98",		"\xc5\x9b" => "\xc5\x9a",
322
-		"\xc5\x9d" => "\xc5\x9c",		"\xc5\x9f" => "\xc5\x9e",		"\xc5\xa1" => "\xc5\xa0",		"\xc5\xa3" => "\xc5\xa2",
323
-		"\xc5\xa5" => "\xc5\xa4",		"\xc5\xa7" => "\xc5\xa6",		"\xc5\xa9" => "\xc5\xa8",		"\xc5\xab" => "\xc5\xaa",
324
-		"\xc5\xad" => "\xc5\xac",		"\xc5\xaf" => "\xc5\xae",		"\xc5\xb1" => "\xc5\xb0",		"\xc5\xb3" => "\xc5\xb2",
325
-		"\xc5\xb5" => "\xc5\xb4",		"\xc5\xb7" => "\xc5\xb6",		"\xc3\xbf" => "\xc5\xb8",		"\xc5\xba" => "\xc5\xb9",
326
-		"\xc5\xbc" => "\xc5\xbb",		"\xc5\xbe" => "\xc5\xbd",		"\xc9\x93" => "\xc6\x81",
327
-		"\xc6\x83" => "\xc6\x82",		"\xc6\x85" => "\xc6\x84",		"\xc9\x94" => "\xc6\x86",		"\xc6\x88" => "\xc6\x87",
328
-		"\xc9\x96" => "\xc6\x89",		"\xc9\x97" => "\xc6\x8a",		"\xc6\x8c" => "\xc6\x8b",		"\xc7\x9d" => "\xc6\x8e",
329
-		"\xc9\x99" => "\xc6\x8f",		"\xc9\x9b" => "\xc6\x90",		"\xc6\x92" => "\xc6\x91",		"\xc9\xa0" => "\xc6\x93",
330
-		"\xc9\xa3" => "\xc6\x94",		"\xc9\xa9" => "\xc6\x96",		"\xc9\xa8" => "\xc6\x97",		"\xc6\x99" => "\xc6\x98",
331
-		"\xc9\xaf" => "\xc6\x9c",		"\xc9\xb2" => "\xc6\x9d",		"\xc9\xb5" => "\xc6\x9f",		"\xc6\xa1" => "\xc6\xa0",
332
-		"\xc6\xa3" => "\xc6\xa2",		"\xc6\xa5" => "\xc6\xa4",		"\xca\x80" => "\xc6\xa6",		"\xc6\xa8" => "\xc6\xa7",
333
-		"\xca\x83" => "\xc6\xa9",		"\xc6\xad" => "\xc6\xac",		"\xca\x88" => "\xc6\xae",		"\xc6\xb0" => "\xc6\xaf",
334
-		"\xca\x8a" => "\xc6\xb1",		"\xca\x8b" => "\xc6\xb2",		"\xc6\xb4" => "\xc6\xb3",		"\xc6\xb6" => "\xc6\xb5",
335
-		"\xca\x92" => "\xc6\xb7",		"\xc6\xb9" => "\xc6\xb8",		"\xc6\xbd" => "\xc6\xbc",		"\xc7\x86" => "\xc7\x84",
336
-		"\xc7\x86" => "\xc7\x85",		"\xc7\x89" => "\xc7\x87",		"\xc7\x89" => "\xc7\x88",		"\xc7\x8c" => "\xc7\x8a",
337
-		"\xc7\x8c" => "\xc7\x8b",		"\xc7\x8e" => "\xc7\x8d",		"\xc7\x90" => "\xc7\x8f",		"\xc7\x92" => "\xc7\x91",
338
-		"\xc7\x94" => "\xc7\x93",		"\xc7\x96" => "\xc7\x95",		"\xc7\x98" => "\xc7\x97",		"\xc7\x9a" => "\xc7\x99",
339
-		"\xc7\x9c" => "\xc7\x9b",		"\xc7\x9f" => "\xc7\x9e",		"\xc7\xa1" => "\xc7\xa0",		"\xc7\xa3" => "\xc7\xa2",
340
-		"\xc7\xa5" => "\xc7\xa4",		"\xc7\xa7" => "\xc7\xa6",		"\xc7\xa9" => "\xc7\xa8",		"\xc7\xab" => "\xc7\xaa",
341
-		"\xc7\xad" => "\xc7\xac",		"\xc7\xaf" => "\xc7\xae",		"j\xcc\x8c" => "\xc7\xb0",		"\xc7\xb3" => "\xc7\xb1",
342
-		"\xc7\xb3" => "\xc7\xb2",		"\xc7\xb5" => "\xc7\xb4",		"\xc6\x95" => "\xc7\xb6",		"\xc6\xbf" => "\xc7\xb7",
343
-		"\xc7\xb9" => "\xc7\xb8",		"\xc7\xbb" => "\xc7\xba",		"\xc7\xbd" => "\xc7\xbc",		"\xc7\xbf" => "\xc7\xbe",
344
-		"\xc8\x81" => "\xc8\x80",		"\xc8\x83" => "\xc8\x82",		"\xc8\x85" => "\xc8\x84",		"\xc8\x87" => "\xc8\x86",
345
-		"\xc8\x89" => "\xc8\x88",		"\xc8\x8b" => "\xc8\x8a",		"\xc8\x8d" => "\xc8\x8c",		"\xc8\x8f" => "\xc8\x8e",
346
-		"\xc8\x91" => "\xc8\x90",		"\xc8\x93" => "\xc8\x92",		"\xc8\x95" => "\xc8\x94",		"\xc8\x97" => "\xc8\x96",
347
-		"\xc8\x99" => "\xc8\x98",		"\xc8\x9b" => "\xc8\x9a",		"\xc8\x9d" => "\xc8\x9c",		"\xc8\x9f" => "\xc8\x9e",
348
-		"\xc6\x9e" => "\xc8\xa0",		"\xc8\xa3" => "\xc8\xa2",		"\xc8\xa5" => "\xc8\xa4",		"\xc8\xa7" => "\xc8\xa6",
349
-		"\xc8\xa9" => "\xc8\xa8",		"\xc8\xab" => "\xc8\xaa",		"\xc8\xad" => "\xc8\xac",		"\xc8\xaf" => "\xc8\xae",
350
-		"\xc8\xb1" => "\xc8\xb0",		"\xc8\xb3" => "\xc8\xb2",		"\xe2\xb1\xa5" => "\xc8\xba",		"\xc8\xbc" => "\xc8\xbb",
351
-		"\xc6\x9a" => "\xc8\xbd",		"\xe2\xb1\xa6" => "\xc8\xbe",		"\xc9\x82" => "\xc9\x81",		"\xc6\x80" => "\xc9\x83",
352
-		"\xca\x89" => "\xc9\x84",		"\xca\x8c" => "\xc9\x85",		"\xc9\x87" => "\xc9\x86",		"\xc9\x89" => "\xc9\x88",
353
-		"\xc9\x8b" => "\xc9\x8a",		"\xc9\x8d" => "\xc9\x8c",		"\xc9\x8f" => "\xc9\x8e",		"\xce\xb9" => "\xcd\x85",
354
-		"\xce\xac" => "\xce\x86",		"\xce\xad" => "\xce\x88",		"\xce\xae" => "\xce\x89",		"\xce\xaf" => "\xce\x8a",
355
-		"\xcf\x8c" => "\xce\x8c",		"\xcf\x8d" => "\xce\x8e",		"\xcf\x8e" => "\xce\x8f",		"\xce\xb9\xcc\x88\xcc\x81" => "\xce\x90",
356
-		"\xce\xb1" => "\xce\x91",		"\xce\xb2" => "\xce\x92",		"\xce\xb3" => "\xce\x93",		"\xce\xb4" => "\xce\x94",
357
-		"\xce\xb5" => "\xce\x95",		"\xce\xb6" => "\xce\x96",		"\xce\xb7" => "\xce\x97",		"\xce\xb8" => "\xce\x98",
358
-		"\xce\xb9" => "\xce\x99",		"\xce\xba" => "\xce\x9a",		"\xce\xbb" => "\xce\x9b",		"\xce\xbc" => "\xce\x9c",
359
-		"\xce\xbd" => "\xce\x9d",		"\xce\xbe" => "\xce\x9e",		"\xce\xbf" => "\xce\x9f",		"\xcf\x80" => "\xce\xa0",
360
-		"\xcf\x81" => "\xce\xa1",		"\xcf\x83" => "\xce\xa3",		"\xcf\x84" => "\xce\xa4",		"\xcf\x85" => "\xce\xa5",
361
-		"\xcf\x86" => "\xce\xa6",		"\xcf\x87" => "\xce\xa7",		"\xcf\x88" => "\xce\xa8",		"\xcf\x89" => "\xce\xa9",
362
-		"\xcf\x8a" => "\xce\xaa",		"\xcf\x8b" => "\xce\xab",		"\xcf\x85\xcc\x88\xcc\x81" => "\xce\xb0",	"\xcf\x83" => "\xcf\x82",
363
-		"\xce\xb2" => "\xcf\x90",		"\xce\xb8" => "\xcf\x91",		"\xcf\x86" => "\xcf\x95",		"\xcf\x80" => "\xcf\x96",
364
-		"\xcf\x99" => "\xcf\x98",		"\xcf\x9b" => "\xcf\x9a",		"\xcf\x9d" => "\xcf\x9c",		"\xcf\x9f" => "\xcf\x9e",
365
-		"\xcf\xa1" => "\xcf\xa0",		"\xcf\xa3" => "\xcf\xa2",		"\xcf\xa5" => "\xcf\xa4",		"\xcf\xa7" => "\xcf\xa6",
366
-		"\xcf\xa9" => "\xcf\xa8",		"\xcf\xab" => "\xcf\xaa",		"\xcf\xad" => "\xcf\xac",		"\xcf\xaf" => "\xcf\xae",
367
-		"\xce\xba" => "\xcf\xb0",		"\xcf\x81" => "\xcf\xb1",		"\xce\xb8" => "\xcf\xb4",		"\xce\xb5" => "\xcf\xb5",
368
-		"\xcf\xb8" => "\xcf\xb7",		"\xcf\xb2" => "\xcf\xb9",		"\xcf\xbb" => "\xcf\xba",		"\xcd\xbb" => "\xcf\xbd",
369
-		"\xcd\xbc" => "\xcf\xbe",		"\xcd\xbd" => "\xcf\xbf",		"\xd1\x90" => "\xd0\x80",		"\xd1\x91" => "\xd0\x81",
370
-		"\xd1\x92" => "\xd0\x82",		"\xd1\x93" => "\xd0\x83",		"\xd1\x94" => "\xd0\x84",		"\xd1\x95" => "\xd0\x85",
371
-		"\xd1\x96" => "\xd0\x86",		"\xd1\x97" => "\xd0\x87",		"\xd1\x98" => "\xd0\x88",		"\xd1\x99" => "\xd0\x89",
372
-		"\xd1\x9a" => "\xd0\x8a",		"\xd1\x9b" => "\xd0\x8b",		"\xd1\x9c" => "\xd0\x8c",		"\xd1\x9d" => "\xd0\x8d",
373
-		"\xd1\x9e" => "\xd0\x8e",		"\xd1\x9f" => "\xd0\x8f",		"\xd0\xb0" => "\xd0\x90",		"\xd0\xb1" => "\xd0\x91",
374
-		"\xd0\xb2" => "\xd0\x92",		"\xd0\xb3" => "\xd0\x93",		"\xd0\xb4" => "\xd0\x94",		"\xd0\xb5" => "\xd0\x95",
375
-		"\xd0\xb6" => "\xd0\x96",		"\xd0\xb7" => "\xd0\x97",		"\xd0\xb8" => "\xd0\x98",		"\xd0\xb9" => "\xd0\x99",
376
-		"\xd0\xba" => "\xd0\x9a",		"\xd0\xbb" => "\xd0\x9b",		"\xd0\xbc" => "\xd0\x9c",		"\xd0\xbd" => "\xd0\x9d",
377
-		"\xd0\xbe" => "\xd0\x9e",		"\xd0\xbf" => "\xd0\x9f",		"\xd1\x80" => "\xd0\xa0",		"\xd1\x81" => "\xd0\xa1",
378
-		"\xd1\x82" => "\xd0\xa2",		"\xd1\x83" => "\xd0\xa3",		"\xd1\x84" => "\xd0\xa4",		"\xd1\x85" => "\xd0\xa5",
379
-		"\xd1\x86" => "\xd0\xa6",		"\xd1\x87" => "\xd0\xa7",		"\xd1\x88" => "\xd0\xa8",		"\xd1\x89" => "\xd0\xa9",
380
-		"\xd1\x8a" => "\xd0\xaa",		"\xd1\x8b" => "\xd0\xab",		"\xd1\x8c" => "\xd0\xac",		"\xd1\x8d" => "\xd0\xad",
381
-		"\xd1\x8e" => "\xd0\xae",		"\xd1\x8f" => "\xd0\xaf",		"\xd1\xa1" => "\xd1\xa0",		"\xd1\xa3" => "\xd1\xa2",
382
-		"\xd1\xa5" => "\xd1\xa4",		"\xd1\xa7" => "\xd1\xa6",		"\xd1\xa9" => "\xd1\xa8",		"\xd1\xab" => "\xd1\xaa",
383
-		"\xd1\xad" => "\xd1\xac",		"\xd1\xaf" => "\xd1\xae",		"\xd1\xb1" => "\xd1\xb0",		"\xd1\xb3" => "\xd1\xb2",
384
-		"\xd1\xb5" => "\xd1\xb4",		"\xd1\xb7" => "\xd1\xb6",		"\xd1\xb9" => "\xd1\xb8",		"\xd1\xbb" => "\xd1\xba",
385
-		"\xd1\xbd" => "\xd1\xbc",		"\xd1\xbf" => "\xd1\xbe",		"\xd2\x81" => "\xd2\x80",		"\xd2\x8b" => "\xd2\x8a",
386
-		"\xd2\x8d" => "\xd2\x8c",		"\xd2\x8f" => "\xd2\x8e",		"\xd2\x91" => "\xd2\x90",		"\xd2\x93" => "\xd2\x92",
387
-		"\xd2\x95" => "\xd2\x94",		"\xd2\x97" => "\xd2\x96",		"\xd2\x99" => "\xd2\x98",		"\xd2\x9b" => "\xd2\x9a",
388
-		"\xd2\x9d" => "\xd2\x9c",		"\xd2\x9f" => "\xd2\x9e",		"\xd2\xa1" => "\xd2\xa0",		"\xd2\xa3" => "\xd2\xa2",
389
-		"\xd2\xa5" => "\xd2\xa4",		"\xd2\xa7" => "\xd2\xa6",		"\xd2\xa9" => "\xd2\xa8",		"\xd2\xab" => "\xd2\xaa",
390
-		"\xd2\xad" => "\xd2\xac",		"\xd2\xaf" => "\xd2\xae",		"\xd2\xb1" => "\xd2\xb0",		"\xd2\xb3" => "\xd2\xb2",
391
-		"\xd2\xb5" => "\xd2\xb4",		"\xd2\xb7" => "\xd2\xb6",		"\xd2\xb9" => "\xd2\xb8",		"\xd2\xbb" => "\xd2\xba",
392
-		"\xd2\xbd" => "\xd2\xbc",		"\xd2\xbf" => "\xd2\xbe",		"\xd3\x8f" => "\xd3\x80",		"\xd3\x82" => "\xd3\x81",
393
-		"\xd3\x84" => "\xd3\x83",		"\xd3\x86" => "\xd3\x85",		"\xd3\x88" => "\xd3\x87",		"\xd3\x8a" => "\xd3\x89",
394
-		"\xd3\x8c" => "\xd3\x8b",		"\xd3\x8e" => "\xd3\x8d",		"\xd3\x91" => "\xd3\x90",		"\xd3\x93" => "\xd3\x92",
395
-		"\xd3\x95" => "\xd3\x94",		"\xd3\x97" => "\xd3\x96",		"\xd3\x99" => "\xd3\x98",		"\xd3\x9b" => "\xd3\x9a",
396
-		"\xd3\x9d" => "\xd3\x9c",		"\xd3\x9f" => "\xd3\x9e",		"\xd3\xa1" => "\xd3\xa0",		"\xd3\xa3" => "\xd3\xa2",
397
-		"\xd3\xa5" => "\xd3\xa4",		"\xd3\xa7" => "\xd3\xa6",		"\xd3\xa9" => "\xd3\xa8",		"\xd3\xab" => "\xd3\xaa",
398
-		"\xd3\xad" => "\xd3\xac",		"\xd3\xaf" => "\xd3\xae",		"\xd3\xb1" => "\xd3\xb0",		"\xd3\xb3" => "\xd3\xb2",
399
-		"\xd3\xb5" => "\xd3\xb4",		"\xd3\xb7" => "\xd3\xb6",		"\xd3\xb9" => "\xd3\xb8",		"\xd3\xbb" => "\xd3\xba",
400
-		"\xd3\xbd" => "\xd3\xbc",		"\xd3\xbf" => "\xd3\xbe",		"\xd4\x81" => "\xd4\x80",		"\xd4\x83" => "\xd4\x82",
401
-		"\xd4\x85" => "\xd4\x84",		"\xd4\x87" => "\xd4\x86",		"\xd4\x89" => "\xd4\x88",		"\xd4\x8b" => "\xd4\x8a",
402
-		"\xd4\x8d" => "\xd4\x8c",		"\xd4\x8f" => "\xd4\x8e",		"\xd4\x91" => "\xd4\x90",		"\xd4\x93" => "\xd4\x92",
403
-		"\xd5\xa1" => "\xd4\xb1",		"\xd5\xa2" => "\xd4\xb2",		"\xd5\xa3" => "\xd4\xb3",		"\xd5\xa4" => "\xd4\xb4",
404
-		"\xd5\xa5" => "\xd4\xb5",		"\xd5\xa6" => "\xd4\xb6",		"\xd5\xa7" => "\xd4\xb7",		"\xd5\xa8" => "\xd4\xb8",
405
-		"\xd5\xa9" => "\xd4\xb9",		"\xd5\xaa" => "\xd4\xba",		"\xd5\xab" => "\xd4\xbb",		"\xd5\xac" => "\xd4\xbc",
406
-		"\xd5\xad" => "\xd4\xbd",		"\xd5\xae" => "\xd4\xbe",		"\xd5\xaf" => "\xd4\xbf",		"\xd5\xb0" => "\xd5\x80",
407
-		"\xd5\xb1" => "\xd5\x81",		"\xd5\xb2" => "\xd5\x82",		"\xd5\xb3" => "\xd5\x83",		"\xd5\xb4" => "\xd5\x84",
408
-		"\xd5\xb5" => "\xd5\x85",		"\xd5\xb6" => "\xd5\x86",		"\xd5\xb7" => "\xd5\x87",		"\xd5\xb8" => "\xd5\x88",
409
-		"\xd5\xb9" => "\xd5\x89",		"\xd5\xba" => "\xd5\x8a",		"\xd5\xbb" => "\xd5\x8b",		"\xd5\xbc" => "\xd5\x8c",
410
-		"\xd5\xbd" => "\xd5\x8d",		"\xd5\xbe" => "\xd5\x8e",		"\xd5\xbf" => "\xd5\x8f",		"\xd6\x80" => "\xd5\x90",
411
-		"\xd6\x81" => "\xd5\x91",		"\xd6\x82" => "\xd5\x92",		"\xd6\x83" => "\xd5\x93",		"\xd6\x84" => "\xd5\x94",
412
-		"\xd6\x85" => "\xd5\x95",		"\xd6\x86" => "\xd5\x96",		"\xd5\xa5\xd6\x82" => "\xd6\x87",		"\xe2\xb4\x80" => "\xe1\x82\xa0",
413
-		"\xe2\xb4\x81" => "\xe1\x82\xa1",		"\xe2\xb4\x82" => "\xe1\x82\xa2",		"\xe2\xb4\x83" => "\xe1\x82\xa3",		"\xe2\xb4\x84" => "\xe1\x82\xa4",
414
-		"\xe2\xb4\x85" => "\xe1\x82\xa5",		"\xe2\xb4\x86" => "\xe1\x82\xa6",		"\xe2\xb4\x87" => "\xe1\x82\xa7",		"\xe2\xb4\x88" => "\xe1\x82\xa8",
415
-		"\xe2\xb4\x89" => "\xe1\x82\xa9",		"\xe2\xb4\x8a" => "\xe1\x82\xaa",		"\xe2\xb4\x8b" => "\xe1\x82\xab",		"\xe2\xb4\x8c" => "\xe1\x82\xac",
416
-		"\xe2\xb4\x8d" => "\xe1\x82\xad",		"\xe2\xb4\x8e" => "\xe1\x82\xae",		"\xe2\xb4\x8f" => "\xe1\x82\xaf",		"\xe2\xb4\x90" => "\xe1\x82\xb0",
417
-		"\xe2\xb4\x91" => "\xe1\x82\xb1",		"\xe2\xb4\x92" => "\xe1\x82\xb2",		"\xe2\xb4\x93" => "\xe1\x82\xb3",		"\xe2\xb4\x94" => "\xe1\x82\xb4",
418
-		"\xe2\xb4\x95" => "\xe1\x82\xb5",		"\xe2\xb4\x96" => "\xe1\x82\xb6",		"\xe2\xb4\x97" => "\xe1\x82\xb7",		"\xe2\xb4\x98" => "\xe1\x82\xb8",
419
-		"\xe2\xb4\x99" => "\xe1\x82\xb9",		"\xe2\xb4\x9a" => "\xe1\x82\xba",		"\xe2\xb4\x9b" => "\xe1\x82\xbb",		"\xe2\xb4\x9c" => "\xe1\x82\xbc",
420
-		"\xe2\xb4\x9d" => "\xe1\x82\xbd",		"\xe2\xb4\x9e" => "\xe1\x82\xbe",		"\xe2\xb4\x9f" => "\xe1\x82\xbf",		"\xe2\xb4\xa0" => "\xe1\x83\x80",
421
-		"\xe2\xb4\xa1" => "\xe1\x83\x81",		"\xe2\xb4\xa2" => "\xe1\x83\x82",		"\xe2\xb4\xa3" => "\xe1\x83\x83",		"\xe2\xb4\xa4" => "\xe1\x83\x84",
422
-		"\xe2\xb4\xa5" => "\xe1\x83\x85",		"\xe1\xb8\x81" => "\xe1\xb8\x80",		"\xe1\xb8\x83" => "\xe1\xb8\x82",		"\xe1\xb8\x85" => "\xe1\xb8\x84",
423
-		"\xe1\xb8\x87" => "\xe1\xb8\x86",		"\xe1\xb8\x89" => "\xe1\xb8\x88",		"\xe1\xb8\x8b" => "\xe1\xb8\x8a",		"\xe1\xb8\x8d" => "\xe1\xb8\x8c",
424
-		"\xe1\xb8\x8f" => "\xe1\xb8\x8e",		"\xe1\xb8\x91" => "\xe1\xb8\x90",		"\xe1\xb8\x93" => "\xe1\xb8\x92",		"\xe1\xb8\x95" => "\xe1\xb8\x94",
425
-		"\xe1\xb8\x97" => "\xe1\xb8\x96",		"\xe1\xb8\x99" => "\xe1\xb8\x98",		"\xe1\xb8\x9b" => "\xe1\xb8\x9a",		"\xe1\xb8\x9d" => "\xe1\xb8\x9c",
426
-		"\xe1\xb8\x9f" => "\xe1\xb8\x9e",		"\xe1\xb8\xa1" => "\xe1\xb8\xa0",		"\xe1\xb8\xa3" => "\xe1\xb8\xa2",		"\xe1\xb8\xa5" => "\xe1\xb8\xa4",
427
-		"\xe1\xb8\xa7" => "\xe1\xb8\xa6",		"\xe1\xb8\xa9" => "\xe1\xb8\xa8",		"\xe1\xb8\xab" => "\xe1\xb8\xaa",		"\xe1\xb8\xad" => "\xe1\xb8\xac",
428
-		"\xe1\xb8\xaf" => "\xe1\xb8\xae",		"\xe1\xb8\xb1" => "\xe1\xb8\xb0",		"\xe1\xb8\xb3" => "\xe1\xb8\xb2",		"\xe1\xb8\xb5" => "\xe1\xb8\xb4",
429
-		"\xe1\xb8\xb7" => "\xe1\xb8\xb6",		"\xe1\xb8\xb9" => "\xe1\xb8\xb8",		"\xe1\xb8\xbb" => "\xe1\xb8\xba",		"\xe1\xb8\xbd" => "\xe1\xb8\xbc",
430
-		"\xe1\xb8\xbf" => "\xe1\xb8\xbe",		"\xe1\xb9\x81" => "\xe1\xb9\x80",		"\xe1\xb9\x83" => "\xe1\xb9\x82",		"\xe1\xb9\x85" => "\xe1\xb9\x84",
431
-		"\xe1\xb9\x87" => "\xe1\xb9\x86",		"\xe1\xb9\x89" => "\xe1\xb9\x88",		"\xe1\xb9\x8b" => "\xe1\xb9\x8a",		"\xe1\xb9\x8d" => "\xe1\xb9\x8c",
432
-		"\xe1\xb9\x8f" => "\xe1\xb9\x8e",		"\xe1\xb9\x91" => "\xe1\xb9\x90",		"\xe1\xb9\x93" => "\xe1\xb9\x92",		"\xe1\xb9\x95" => "\xe1\xb9\x94",
433
-		"\xe1\xb9\x97" => "\xe1\xb9\x96",		"\xe1\xb9\x99" => "\xe1\xb9\x98",		"\xe1\xb9\x9b" => "\xe1\xb9\x9a",		"\xe1\xb9\x9d" => "\xe1\xb9\x9c",
434
-		"\xe1\xb9\x9f" => "\xe1\xb9\x9e",		"\xe1\xb9\xa1" => "\xe1\xb9\xa0",		"\xe1\xb9\xa3" => "\xe1\xb9\xa2",		"\xe1\xb9\xa5" => "\xe1\xb9\xa4",
435
-		"\xe1\xb9\xa7" => "\xe1\xb9\xa6",		"\xe1\xb9\xa9" => "\xe1\xb9\xa8",		"\xe1\xb9\xab" => "\xe1\xb9\xaa",		"\xe1\xb9\xad" => "\xe1\xb9\xac",
436
-		"\xe1\xb9\xaf" => "\xe1\xb9\xae",		"\xe1\xb9\xb1" => "\xe1\xb9\xb0",		"\xe1\xb9\xb3" => "\xe1\xb9\xb2",		"\xe1\xb9\xb5" => "\xe1\xb9\xb4",
437
-		"\xe1\xb9\xb7" => "\xe1\xb9\xb6",		"\xe1\xb9\xb9" => "\xe1\xb9\xb8",		"\xe1\xb9\xbb" => "\xe1\xb9\xba",		"\xe1\xb9\xbd" => "\xe1\xb9\xbc",
438
-		"\xe1\xb9\xbf" => "\xe1\xb9\xbe",		"\xe1\xba\x81" => "\xe1\xba\x80",		"\xe1\xba\x83" => "\xe1\xba\x82",		"\xe1\xba\x85" => "\xe1\xba\x84",
439
-		"\xe1\xba\x87" => "\xe1\xba\x86",		"\xe1\xba\x89" => "\xe1\xba\x88",		"\xe1\xba\x8b" => "\xe1\xba\x8a",		"\xe1\xba\x8d" => "\xe1\xba\x8c",
440
-		"\xe1\xba\x8f" => "\xe1\xba\x8e",		"\xe1\xba\x91" => "\xe1\xba\x90",		"\xe1\xba\x93" => "\xe1\xba\x92",		"\xe1\xba\x95" => "\xe1\xba\x94",
441
-		"h\xcc\xb1" => "\xe1\xba\x96",		"t\xcc\x88" => "\xe1\xba\x97",		"w\xcc\x8a" => "\xe1\xba\x98",		"y\xcc\x8a" => "\xe1\xba\x99",
442
-		"a\xca\xbe" => "\xe1\xba\x9a",	"\xe1\xb9\xa1" => "\xe1\xba\x9b",		"\xe1\xba\xa1" => "\xe1\xba\xa0",		"\xe1\xba\xa3" => "\xe1\xba\xa2",
443
-		"\xe1\xba\xa5" => "\xe1\xba\xa4",		"\xe1\xba\xa7" => "\xe1\xba\xa6",		"\xe1\xba\xa9" => "\xe1\xba\xa8",		"\xe1\xba\xab" => "\xe1\xba\xaa",
444
-		"\xe1\xba\xad" => "\xe1\xba\xac",		"\xe1\xba\xaf" => "\xe1\xba\xae",		"\xe1\xba\xb1" => "\xe1\xba\xb0",		"\xe1\xba\xb3" => "\xe1\xba\xb2",
445
-		"\xe1\xba\xb5" => "\xe1\xba\xb4",		"\xe1\xba\xb7" => "\xe1\xba\xb6",		"\xe1\xba\xb9" => "\xe1\xba\xb8",		"\xe1\xba\xbb" => "\xe1\xba\xba",
446
-		"\xe1\xba\xbd" => "\xe1\xba\xbc",		"\xe1\xba\xbf" => "\xe1\xba\xbe",		"\xe1\xbb\x81" => "\xe1\xbb\x80",		"\xe1\xbb\x83" => "\xe1\xbb\x82",
447
-		"\xe1\xbb\x85" => "\xe1\xbb\x84",		"\xe1\xbb\x87" => "\xe1\xbb\x86",		"\xe1\xbb\x89" => "\xe1\xbb\x88",		"\xe1\xbb\x8b" => "\xe1\xbb\x8a",
448
-		"\xe1\xbb\x8d" => "\xe1\xbb\x8c",		"\xe1\xbb\x8f" => "\xe1\xbb\x8e",		"\xe1\xbb\x91" => "\xe1\xbb\x90",		"\xe1\xbb\x93" => "\xe1\xbb\x92",
449
-		"\xe1\xbb\x95" => "\xe1\xbb\x94",		"\xe1\xbb\x97" => "\xe1\xbb\x96",		"\xe1\xbb\x99" => "\xe1\xbb\x98",		"\xe1\xbb\x9b" => "\xe1\xbb\x9a",
450
-		"\xe1\xbb\x9d" => "\xe1\xbb\x9c",		"\xe1\xbb\x9f" => "\xe1\xbb\x9e",		"\xe1\xbb\xa1" => "\xe1\xbb\xa0",		"\xe1\xbb\xa3" => "\xe1\xbb\xa2",
451
-		"\xe1\xbb\xa5" => "\xe1\xbb\xa4",		"\xe1\xbb\xa7" => "\xe1\xbb\xa6",		"\xe1\xbb\xa9" => "\xe1\xbb\xa8",		"\xe1\xbb\xab" => "\xe1\xbb\xaa",
452
-		"\xe1\xbb\xad" => "\xe1\xbb\xac",		"\xe1\xbb\xaf" => "\xe1\xbb\xae",		"\xe1\xbb\xb1" => "\xe1\xbb\xb0",		"\xe1\xbb\xb3" => "\xe1\xbb\xb2",
453
-		"\xe1\xbb\xb5" => "\xe1\xbb\xb4",		"\xe1\xbb\xb7" => "\xe1\xbb\xb6",		"\xe1\xbb\xb9" => "\xe1\xbb\xb8",		"\xe1\xbc\x80" => "\xe1\xbc\x88",
454
-		"\xe1\xbc\x81" => "\xe1\xbc\x89",		"\xe1\xbc\x82" => "\xe1\xbc\x8a",		"\xe1\xbc\x83" => "\xe1\xbc\x8b",		"\xe1\xbc\x84" => "\xe1\xbc\x8c",
455
-		"\xe1\xbc\x85" => "\xe1\xbc\x8d",		"\xe1\xbc\x86" => "\xe1\xbc\x8e",		"\xe1\xbc\x87" => "\xe1\xbc\x8f",		"\xe1\xbc\x90" => "\xe1\xbc\x98",
456
-		"\xe1\xbc\x91" => "\xe1\xbc\x99",		"\xe1\xbc\x92" => "\xe1\xbc\x9a",		"\xe1\xbc\x93" => "\xe1\xbc\x9b",		"\xe1\xbc\x94" => "\xe1\xbc\x9c",
457
-		"\xe1\xbc\x95" => "\xe1\xbc\x9d",		"\xe1\xbc\xa0" => "\xe1\xbc\xa8",		"\xe1\xbc\xa1" => "\xe1\xbc\xa9",		"\xe1\xbc\xa2" => "\xe1\xbc\xaa",
458
-		"\xe1\xbc\xa3" => "\xe1\xbc\xab",		"\xe1\xbc\xa4" => "\xe1\xbc\xac",		"\xe1\xbc\xa5" => "\xe1\xbc\xad",		"\xe1\xbc\xa6" => "\xe1\xbc\xae",
459
-		"\xe1\xbc\xa7" => "\xe1\xbc\xaf",		"\xe1\xbc\xb0" => "\xe1\xbc\xb8",		"\xe1\xbc\xb1" => "\xe1\xbc\xb9",		"\xe1\xbc\xb2" => "\xe1\xbc\xba",
460
-		"\xe1\xbc\xb3" => "\xe1\xbc\xbb",		"\xe1\xbc\xb4" => "\xe1\xbc\xbc",		"\xe1\xbc\xb5" => "\xe1\xbc\xbd",		"\xe1\xbc\xb6" => "\xe1\xbc\xbe",
461
-		"\xe1\xbc\xb7" => "\xe1\xbc\xbf",		"\xe1\xbd\x80" => "\xe1\xbd\x88",		"\xe1\xbd\x81" => "\xe1\xbd\x89",		"\xe1\xbd\x82" => "\xe1\xbd\x8a",
462
-		"\xe1\xbd\x83" => "\xe1\xbd\x8b",		"\xe1\xbd\x84" => "\xe1\xbd\x8c",		"\xe1\xbd\x85" => "\xe1\xbd\x8d",		"\xcf\x85\xcc\x93" => "\xe1\xbd\x90",
463
-		"\xcf\x85\xcc\x93\xcc\x80" => "\xe1\xbd\x92",	"\xcf\x85\xcc\x93\xcc\x81" => "\xe1\xbd\x94",	"\xcf\x85\xcc\x93\xcd\x82" => "\xe1\xbd\x96",		"\xe1\xbd\x91" => "\xe1\xbd\x99",
464
-		"\xe1\xbd\x93" => "\xe1\xbd\x9b",		"\xe1\xbd\x95" => "\xe1\xbd\x9d",		"\xe1\xbd\x97" => "\xe1\xbd\x9f",		"\xe1\xbd\xa0" => "\xe1\xbd\xa8",
465
-		"\xe1\xbd\xa1" => "\xe1\xbd\xa9",		"\xe1\xbd\xa2" => "\xe1\xbd\xaa",		"\xe1\xbd\xa3" => "\xe1\xbd\xab",		"\xe1\xbd\xa4" => "\xe1\xbd\xac",
466
-		"\xe1\xbd\xa5" => "\xe1\xbd\xad",		"\xe1\xbd\xa6" => "\xe1\xbd\xae",		"\xe1\xbd\xa7" => "\xe1\xbd\xaf",		"\xe1\xbc\x80\xce\xb9" => "\xe1\xbe\x80",
467
-		"\xe1\xbc\x81\xce\xb9" => "\xe1\xbe\x81",	"\xe1\xbc\x82\xce\xb9" => "\xe1\xbe\x82",	"\xe1\xbc\x83\xce\xb9" => "\xe1\xbe\x83",	"\xe1\xbc\x84\xce\xb9" => "\xe1\xbe\x84",
468
-		"\xe1\xbc\x85\xce\xb9" => "\xe1\xbe\x85",	"\xe1\xbc\x86\xce\xb9" => "\xe1\xbe\x86",	"\xe1\xbc\x87\xce\xb9" => "\xe1\xbe\x87",	"\xe1\xbe\x80" => "\xe1\xbe\x88",
469
-		"\xe1\xbe\x81" => "\xe1\xbe\x89",		"\xe1\xbe\x82" => "\xe1\xbe\x8a",		"\xe1\xbe\x83" => "\xe1\xbe\x8b",		"\xe1\xbe\x84" => "\xe1\xbe\x8c",
470
-		"\xe1\xbe\x85" => "\xe1\xbe\x8d",		"\xe1\xbe\x86" => "\xe1\xbe\x8e",		"\xe1\xbe\x87" => "\xe1\xbe\x8f",		"\xe1\xbc\xa0\xce\xb9" => "\xe1\xbe\x90",
471
-		"\xe1\xbc\xa1\xce\xb9" => "\xe1\xbe\x91",	"\xe1\xbc\xa2\xce\xb9" => "\xe1\xbe\x92",	"\xe1\xbc\xa3\xce\xb9" => "\xe1\xbe\x93",	"\xe1\xbc\xa4\xce\xb9" => "\xe1\xbe\x94",
472
-		"\xe1\xbc\xa5\xce\xb9" => "\xe1\xbe\x95",	"\xe1\xbc\xa6\xce\xb9" => "\xe1\xbe\x96",	"\xe1\xbc\xa7\xce\xb9" => "\xe1\xbe\x97",	"\xe1\xbe\x90" => "\xe1\xbe\x98",
473
-		"\xe1\xbe\x91" => "\xe1\xbe\x99",		"\xe1\xbe\x92" => "\xe1\xbe\x9a",		"\xe1\xbe\x93" => "\xe1\xbe\x9b",		"\xe1\xbe\x94" => "\xe1\xbe\x9c",
474
-		"\xe1\xbe\x95" => "\xe1\xbe\x9d",		"\xe1\xbe\x96" => "\xe1\xbe\x9e",		"\xe1\xbe\x97" => "\xe1\xbe\x9f",		"\xe1\xbd\xa0\xce\xb9" => "\xe1\xbe\xa0",
475
-		"\xe1\xbd\xa1\xce\xb9" => "\xe1\xbe\xa1",	"\xe1\xbd\xa2\xce\xb9" => "\xe1\xbe\xa2",	"\xe1\xbd\xa3\xce\xb9" => "\xe1\xbe\xa3",	"\xe1\xbd\xa4\xce\xb9" => "\xe1\xbe\xa4",
476
-		"\xe1\xbd\xa5\xce\xb9" => "\xe1\xbe\xa5",	"\xe1\xbd\xa6\xce\xb9" => "\xe1\xbe\xa6",	"\xe1\xbd\xa7\xce\xb9" => "\xe1\xbe\xa7",	"\xe1\xbe\xa0" => "\xe1\xbe\xa8",
477
-		"\xe1\xbe\xa1" => "\xe1\xbe\xa9",		"\xe1\xbe\xa2" => "\xe1\xbe\xaa",		"\xe1\xbe\xa3" => "\xe1\xbe\xab",		"\xe1\xbe\xa4" => "\xe1\xbe\xac",
478
-		"\xe1\xbe\xa5" => "\xe1\xbe\xad",		"\xe1\xbe\xa6" => "\xe1\xbe\xae",		"\xe1\xbe\xa7" => "\xe1\xbe\xaf",		"\xe1\xbd\xb0\xce\xb9" => "\xe1\xbe\xb2",
479
-		"\xce\xb1\xce\xb9" => "\xe1\xbe\xb3",	"\xce\xac\xce\xb9" => "\xe1\xbe\xb4",	"\xce\xb1\xcd\x82" => "\xe1\xbe\xb6",		"\xce\xb1\xcd\x82\xce\xb9" => "\xe1\xbe\xb7",
480
-		"\xe1\xbe\xb0" => "\xe1\xbe\xb8",		"\xe1\xbe\xb1" => "\xe1\xbe\xb9",		"\xe1\xbd\xb0" => "\xe1\xbe\xba",		"\xe1\xbd\xb1" => "\xe1\xbe\xbb",
481
-		"\xe1\xbe\xb3" => "\xe1\xbe\xbc",		"\xce\xb9" => "\xe1\xbe\xbe",		"\xe1\xbd\xb4\xce\xb9" => "\xe1\xbf\x82",	"\xce\xb7\xce\xb9" => "\xe1\xbf\x83",
482
-		"\xce\xae\xce\xb9" => "\xe1\xbf\x84",	"\xce\xb7\xcd\x82" => "\xe1\xbf\x86",		"\xce\xb7\xcd\x82\xce\xb9" => "\xe1\xbf\x87",	"\xe1\xbd\xb2" => "\xe1\xbf\x88",
483
-		"\xe1\xbd\xb3" => "\xe1\xbf\x89",		"\xe1\xbd\xb4" => "\xe1\xbf\x8a",		"\xe1\xbd\xb5" => "\xe1\xbf\x8b",		"\xe1\xbf\x83" => "\xe1\xbf\x8c",
484
-		"\xce\xb9\xcc\x88\xcc\x80" => "\xe1\xbf\x92",	"\xce\xb9\xcc\x88\xcc\x81" => "\xe1\xbf\x93",	"\xce\xb9\xcd\x82" => "\xe1\xbf\x96",		"\xce\xb9\xcc\x88\xcd\x82" => "\xe1\xbf\x97",
485
-		"\xe1\xbf\x90" => "\xe1\xbf\x98",		"\xe1\xbf\x91" => "\xe1\xbf\x99",		"\xe1\xbd\xb6" => "\xe1\xbf\x9a",		"\xe1\xbd\xb7" => "\xe1\xbf\x9b",
486
-		"\xcf\x85\xcc\x88\xcc\x80" => "\xe1\xbf\xa2",	"\xcf\x85\xcc\x88\xcc\x81" => "\xe1\xbf\xa3",	"\xcf\x81\xcc\x93" => "\xe1\xbf\xa4",		"\xcf\x85\xcd\x82" => "\xe1\xbf\xa6",
487
-		"\xcf\x85\xcc\x88\xcd\x82" => "\xe1\xbf\xa7",		"\xe1\xbf\xa0" => "\xe1\xbf\xa8",		"\xe1\xbf\xa1" => "\xe1\xbf\xa9",		"\xe1\xbd\xba" => "\xe1\xbf\xaa",
488
-		"\xe1\xbd\xbb" => "\xe1\xbf\xab",		"\xe1\xbf\xa5" => "\xe1\xbf\xac",		"\xe1\xbd\xbc\xce\xb9" => "\xe1\xbf\xb2",	"\xcf\x89\xce\xb9" => "\xe1\xbf\xb3",
489
-		"\xcf\x8e\xce\xb9" => "\xe1\xbf\xb4",	"\xcf\x89\xcd\x82" => "\xe1\xbf\xb6",		"\xcf\x89\xcd\x82\xce\xb9" => "\xe1\xbf\xb7",	"\xe1\xbd\xb8" => "\xe1\xbf\xb8",
490
-		"\xe1\xbd\xb9" => "\xe1\xbf\xb9",		"\xe1\xbd\xbc" => "\xe1\xbf\xba",		"\xe1\xbd\xbd" => "\xe1\xbf\xbb",		"\xe1\xbf\xb3" => "\xe1\xbf\xbc",
491
-		"\xcf\x89" => "\xe2\x84\xa6",		"k" => "\xe2\x84\xaa",		"\xc3\xa5" => "\xe2\x84\xab",		"\xe2\x85\x8e" => "\xe2\x84\xb2",
492
-		"\xe2\x85\xb0" => "\xe2\x85\xa0",		"\xe2\x85\xb1" => "\xe2\x85\xa1",		"\xe2\x85\xb2" => "\xe2\x85\xa2",		"\xe2\x85\xb3" => "\xe2\x85\xa3",
493
-		"\xe2\x85\xb4" => "\xe2\x85\xa4",		"\xe2\x85\xb5" => "\xe2\x85\xa5",		"\xe2\x85\xb6" => "\xe2\x85\xa6",		"\xe2\x85\xb7" => "\xe2\x85\xa7",
494
-		"\xe2\x85\xb8" => "\xe2\x85\xa8",		"\xe2\x85\xb9" => "\xe2\x85\xa9",		"\xe2\x85\xba" => "\xe2\x85\xaa",		"\xe2\x85\xbb" => "\xe2\x85\xab",
495
-		"\xe2\x85\xbc" => "\xe2\x85\xac",		"\xe2\x85\xbd" => "\xe2\x85\xad",		"\xe2\x85\xbe" => "\xe2\x85\xae",		"\xe2\x85\xbf" => "\xe2\x85\xaf",
496
-		"\xe2\x86\x84" => "\xe2\x86\x83",		"\xe2\x93\x90" => "\xe2\x92\xb6",		"\xe2\x93\x91" => "\xe2\x92\xb7",		"\xe2\x93\x92" => "\xe2\x92\xb8",
497
-		"\xe2\x93\x93" => "\xe2\x92\xb9",		"\xe2\x93\x94" => "\xe2\x92\xba",		"\xe2\x93\x95" => "\xe2\x92\xbb",		"\xe2\x93\x96" => "\xe2\x92\xbc",
498
-		"\xe2\x93\x97" => "\xe2\x92\xbd",		"\xe2\x93\x98" => "\xe2\x92\xbe",		"\xe2\x93\x99" => "\xe2\x92\xbf",		"\xe2\x93\x9a" => "\xe2\x93\x80",
499
-		"\xe2\x93\x9b" => "\xe2\x93\x81",		"\xe2\x93\x9c" => "\xe2\x93\x82",		"\xe2\x93\x9d" => "\xe2\x93\x83",		"\xe2\x93\x9e" => "\xe2\x93\x84",
500
-		"\xe2\x93\x9f" => "\xe2\x93\x85",		"\xe2\x93\xa0" => "\xe2\x93\x86",		"\xe2\x93\xa1" => "\xe2\x93\x87",		"\xe2\x93\xa2" => "\xe2\x93\x88",
501
-		"\xe2\x93\xa3" => "\xe2\x93\x89",		"\xe2\x93\xa4" => "\xe2\x93\x8a",		"\xe2\x93\xa5" => "\xe2\x93\x8b",		"\xe2\x93\xa6" => "\xe2\x93\x8c",
502
-		"\xe2\x93\xa7" => "\xe2\x93\x8d",		"\xe2\x93\xa8" => "\xe2\x93\x8e",		"\xe2\x93\xa9" => "\xe2\x93\x8f",		"\xe2\xb0\xb0" => "\xe2\xb0\x80",
503
-		"\xe2\xb0\xb1" => "\xe2\xb0\x81",		"\xe2\xb0\xb2" => "\xe2\xb0\x82",		"\xe2\xb0\xb3" => "\xe2\xb0\x83",		"\xe2\xb0\xb4" => "\xe2\xb0\x84",
504
-		"\xe2\xb0\xb5" => "\xe2\xb0\x85",		"\xe2\xb0\xb6" => "\xe2\xb0\x86",		"\xe2\xb0\xb7" => "\xe2\xb0\x87",		"\xe2\xb0\xb8" => "\xe2\xb0\x88",
505
-		"\xe2\xb0\xb9" => "\xe2\xb0\x89",		"\xe2\xb0\xba" => "\xe2\xb0\x8a",		"\xe2\xb0\xbb" => "\xe2\xb0\x8b",		"\xe2\xb0\xbc" => "\xe2\xb0\x8c",
506
-		"\xe2\xb0\xbd" => "\xe2\xb0\x8d",		"\xe2\xb0\xbe" => "\xe2\xb0\x8e",		"\xe2\xb0\xbf" => "\xe2\xb0\x8f",		"\xe2\xb1\x80" => "\xe2\xb0\x90",
507
-		"\xe2\xb1\x81" => "\xe2\xb0\x91",		"\xe2\xb1\x82" => "\xe2\xb0\x92",		"\xe2\xb1\x83" => "\xe2\xb0\x93",		"\xe2\xb1\x84" => "\xe2\xb0\x94",
508
-		"\xe2\xb1\x85" => "\xe2\xb0\x95",		"\xe2\xb1\x86" => "\xe2\xb0\x96",		"\xe2\xb1\x87" => "\xe2\xb0\x97",		"\xe2\xb1\x88" => "\xe2\xb0\x98",
509
-		"\xe2\xb1\x89" => "\xe2\xb0\x99",		"\xe2\xb1\x8a" => "\xe2\xb0\x9a",		"\xe2\xb1\x8b" => "\xe2\xb0\x9b",		"\xe2\xb1\x8c" => "\xe2\xb0\x9c",
510
-		"\xe2\xb1\x8d" => "\xe2\xb0\x9d",		"\xe2\xb1\x8e" => "\xe2\xb0\x9e",		"\xe2\xb1\x8f" => "\xe2\xb0\x9f",		"\xe2\xb1\x90" => "\xe2\xb0\xa0",
511
-		"\xe2\xb1\x91" => "\xe2\xb0\xa1",		"\xe2\xb1\x92" => "\xe2\xb0\xa2",		"\xe2\xb1\x93" => "\xe2\xb0\xa3",		"\xe2\xb1\x94" => "\xe2\xb0\xa4",
512
-		"\xe2\xb1\x95" => "\xe2\xb0\xa5",		"\xe2\xb1\x96" => "\xe2\xb0\xa6",		"\xe2\xb1\x97" => "\xe2\xb0\xa7",		"\xe2\xb1\x98" => "\xe2\xb0\xa8",
513
-		"\xe2\xb1\x99" => "\xe2\xb0\xa9",		"\xe2\xb1\x9a" => "\xe2\xb0\xaa",		"\xe2\xb1\x9b" => "\xe2\xb0\xab",		"\xe2\xb1\x9c" => "\xe2\xb0\xac",
514
-		"\xe2\xb1\x9d" => "\xe2\xb0\xad",		"\xe2\xb1\x9e" => "\xe2\xb0\xae",		"\xe2\xb1\xa1" => "\xe2\xb1\xa0",		"\xc9\xab" => "\xe2\xb1\xa2",
515
-		"\xe1\xb5\xbd" => "\xe2\xb1\xa3",		"\xc9\xbd" => "\xe2\xb1\xa4",		"\xe2\xb1\xa8" => "\xe2\xb1\xa7",		"\xe2\xb1\xaa" => "\xe2\xb1\xa9",
516
-		"\xe2\xb1\xac" => "\xe2\xb1\xab",		"\xe2\xb1\xb6" => "\xe2\xb1\xb5",		"\xe2\xb2\x81" => "\xe2\xb2\x80",		"\xe2\xb2\x83" => "\xe2\xb2\x82",
517
-		"\xe2\xb2\x85" => "\xe2\xb2\x84",		"\xe2\xb2\x87" => "\xe2\xb2\x86",		"\xe2\xb2\x89" => "\xe2\xb2\x88",		"\xe2\xb2\x8b" => "\xe2\xb2\x8a",
518
-		"\xe2\xb2\x8d" => "\xe2\xb2\x8c",		"\xe2\xb2\x8f" => "\xe2\xb2\x8e",		"\xe2\xb2\x91" => "\xe2\xb2\x90",		"\xe2\xb2\x93" => "\xe2\xb2\x92",
519
-		"\xe2\xb2\x95" => "\xe2\xb2\x94",		"\xe2\xb2\x97" => "\xe2\xb2\x96",		"\xe2\xb2\x99" => "\xe2\xb2\x98",		"\xe2\xb2\x9b" => "\xe2\xb2\x9a",
520
-		"\xe2\xb2\x9d" => "\xe2\xb2\x9c",		"\xe2\xb2\x9f" => "\xe2\xb2\x9e",		"\xe2\xb2\xa1" => "\xe2\xb2\xa0",		"\xe2\xb2\xa3" => "\xe2\xb2\xa2",
521
-		"\xe2\xb2\xa5" => "\xe2\xb2\xa4",		"\xe2\xb2\xa7" => "\xe2\xb2\xa6",		"\xe2\xb2\xa9" => "\xe2\xb2\xa8",		"\xe2\xb2\xab" => "\xe2\xb2\xaa",
522
-		"\xe2\xb2\xad" => "\xe2\xb2\xac",		"\xe2\xb2\xaf" => "\xe2\xb2\xae",		"\xe2\xb2\xb1" => "\xe2\xb2\xb0",		"\xe2\xb2\xb3" => "\xe2\xb2\xb2",
523
-		"\xe2\xb2\xb5" => "\xe2\xb2\xb4",		"\xe2\xb2\xb7" => "\xe2\xb2\xb6",		"\xe2\xb2\xb9" => "\xe2\xb2\xb8",		"\xe2\xb2\xbb" => "\xe2\xb2\xba",
524
-		"\xe2\xb2\xbd" => "\xe2\xb2\xbc",		"\xe2\xb2\xbf" => "\xe2\xb2\xbe",		"\xe2\xb3\x81" => "\xe2\xb3\x80",		"\xe2\xb3\x83" => "\xe2\xb3\x82",
525
-		"\xe2\xb3\x85" => "\xe2\xb3\x84",		"\xe2\xb3\x87" => "\xe2\xb3\x86",		"\xe2\xb3\x89" => "\xe2\xb3\x88",		"\xe2\xb3\x8b" => "\xe2\xb3\x8a",
526
-		"\xe2\xb3\x8d" => "\xe2\xb3\x8c",		"\xe2\xb3\x8f" => "\xe2\xb3\x8e",		"\xe2\xb3\x91" => "\xe2\xb3\x90",		"\xe2\xb3\x93" => "\xe2\xb3\x92",
527
-		"\xe2\xb3\x95" => "\xe2\xb3\x94",		"\xe2\xb3\x97" => "\xe2\xb3\x96",		"\xe2\xb3\x99" => "\xe2\xb3\x98",		"\xe2\xb3\x9b" => "\xe2\xb3\x9a",
528
-		"\xe2\xb3\x9d" => "\xe2\xb3\x9c",		"\xe2\xb3\x9f" => "\xe2\xb3\x9e",		"\xe2\xb3\xa1" => "\xe2\xb3\xa0",		"\xe2\xb3\xa3" => "\xe2\xb3\xa2",
529
-		"ff" => "\xef\xac\x80",	"fi" => "\xef\xac\x81",	"fl" => "\xef\xac\x82",	"ffi" => "\xef\xac\x83",
530
-		"ffl" => "\xef\xac\x84",	"st" => "\xef\xac\x85",	"st" => "\xef\xac\x86",	"\xd5\xb4\xd5\xb6" => "\xef\xac\x93",
531
-		"\xd5\xb4\xd5\xa5" => "\xef\xac\x94",	"\xd5\xb4\xd5\xab" => "\xef\xac\x95",	"\xd5\xbe\xd5\xb6" => "\xef\xac\x96",	"\xd5\xb4\xd5\xad" => "\xef\xac\x97",
532
-		"\xef\xbd\x81" => "\xef\xbc\xa1",		"\xef\xbd\x82" => "\xef\xbc\xa2",		"\xef\xbd\x83" => "\xef\xbc\xa3",		"\xef\xbd\x84" => "\xef\xbc\xa4",
533
-		"\xef\xbd\x85" => "\xef\xbc\xa5",		"\xef\xbd\x86" => "\xef\xbc\xa6",		"\xef\xbd\x87" => "\xef\xbc\xa7",		"\xef\xbd\x88" => "\xef\xbc\xa8",
534
-		"\xef\xbd\x89" => "\xef\xbc\xa9",		"\xef\xbd\x8a" => "\xef\xbc\xaa",		"\xef\xbd\x8b" => "\xef\xbc\xab",		"\xef\xbd\x8c" => "\xef\xbc\xac",
535
-		"\xef\xbd\x8d" => "\xef\xbc\xad",	"\xef\xbd\x8e" => "\xef\xbc\xae",		"\xef\xbd\x8f" => "\xef\xbc\xaf",		"\xef\xbd\x90" => "\xef\xbc\xb0",
536
-		"\xef\xbd\x91" => "\xef\xbc\xb1",		"\xef\xbd\x92" => "\xef\xbc\xb2",		"\xef\xbd\x93" => "\xef\xbc\xb3",		"\xef\xbd\x94" => "\xef\xbc\xb4",
537
-		"\xef\xbd\x95" => "\xef\xbc\xb5",		"\xef\xbd\x96" => "\xef\xbc\xb6",		"\xef\xbd\x97" => "\xef\xbc\xb7",	"\xef\xbd\x98" => "\xef\xbc\xb8",
538
-		"\xef\xbd\x99" => "\xef\xbc\xb9",		"\xef\xbd\x9a" => "\xef\xbc\xba",		"\xf0\x90\x90\xa8" => "\xf0\x90\x90\x80",	"\xf0\x90\x90\xa9" => "\xf0\x90\x90\x81",
539
-		"\xf0\x90\x90\xaa" => "\xf0\x90\x90\x82",	"\xf0\x90\x90\xab" => "\xf0\x90\x90\x83",	"\xf0\x90\x90\xac" => "\xf0\x90\x90\x84",	"\xf0\x90\x90\xad" => "\xf0\x90\x90\x85",
540
-		"\xf0\x90\x90\xae" => "\xf0\x90\x90\x86",	"\xf0\x90\x90\xaf" => "\xf0\x90\x90\x87",	"\xf0\x90\x90\xb0" => "\xf0\x90\x90\x88",	"\xf0\x90\x90\xb1" => "\xf0\x90\x90\x89",
541
-		"\xf0\x90\x90\xb2" => "\xf0\x90\x90\x8a",	"\xf0\x90\x90\xb3" => "\xf0\x90\x90\x8b",	"\xf0\x90\x90\xb4" => "\xf0\x90\x90\x8c",	"\xf0\x90\x90\xb5" => "\xf0\x90\x90\x8d",
542
-		"\xf0\x90\x90\xb6" => "\xf0\x90\x90\x8e",	"\xf0\x90\x90\xb7" => "\xf0\x90\x90\x8f",	"\xf0\x90\x90\xb8" => "\xf0\x90\x90\x90",	"\xf0\x90\x90\xb9" => "\xf0\x90\x90\x91",
543
-		"\xf0\x90\x90\xba" => "\xf0\x90\x90\x92",	"\xf0\x90\x90\xbb" => "\xf0\x90\x90\x93",	"\xf0\x90\x90\xbc" => "\xf0\x90\x90\x94",	"\xf0\x90\x90\xbd" => "\xf0\x90\x90\x95",
544
-		"\xf0\x90\x90\xbe" => "\xf0\x90\x90\x96",	"\xf0\x90\x90\xbf" => "\xf0\x90\x90\x97",	"\xf0\x90\x91\x80" => "\xf0\x90\x90\x98",	"\xf0\x90\x91\x81" => "\xf0\x90\x90\x99",
545
-		"\xf0\x90\x91\x82" => "\xf0\x90\x90\x9a",	"\xf0\x90\x91\x83" => "\xf0\x90\x90\x9b",	"\xf0\x90\x91\x84" => "\xf0\x90\x90\x9c",	"\xf0\x90\x91\x85" => "\xf0\x90\x90\x9d",
546
-		"\xf0\x90\x91\x86" => "\xf0\x90\x90\x9e",	"\xf0\x90\x91\x87" => "\xf0\x90\x90\x9f",	"\xf0\x90\x91\x88" => "\xf0\x90\x90\xa0",	"\xf0\x90\x91\x89" => "\xf0\x90\x90\xa1",
547
-		"\xf0\x90\x91\x8a" => "\xf0\x90\x90\xa2",	"\xf0\x90\x91\x8b" => "\xf0\x90\x90\xa3",	"\xf0\x90\x91\x8c" => "\xf0\x90\x90\xa4",	"\xf0\x90\x91\x8d" => "\xf0\x90\x90\xa5",
548
-		"\xf0\x90\x90\xa6" => "\xf0\x90\x91\x8e",	"\xf0\x90\x90\xa7" => "\xf0\x90\x91\x8f",
296
+		'a' => 'A', 'b' => 'B', 'c' => 'C', 'd' => 'D',
297
+		'e' => 'E', 'f' => 'F', 'g' => 'G', 'h' => 'H',
298
+		'i' => 'I', 'j' => 'J', 'k' => 'K', 'l' => 'L',
299
+		'm' => 'M', 'n' => 'N', 'o' => 'O', 'p' => 'P',
300
+		'q' => 'Q', 'r' => 'R', 's' => 'S', 't' => 'T',
301
+		'u' => 'U', 'v' => 'V', 'w' => 'W', 'x' => 'X',
302
+		'y' => 'Y', 'z' => 'Z', "\xce\xbc" => "\xc2\xb5", "\xc3\xa0" => "\xc3\x80",
303
+		"\xc3\xa1" => "\xc3\x81", "\xc3\xa2" => "\xc3\x82", "\xc3\xa3" => "\xc3\x83", "\xc3\xa4" => "\xc3\x84",
304
+		"\xc3\xa5" => "\xc3\x85", "\xc3\xa6" => "\xc3\x86", "\xc3\xa7" => "\xc3\x87", "\xc3\xa8" => "\xc3\x88",
305
+		"\xc3\xa9" => "\xc3\x89", "\xc3\xaa" => "\xc3\x8a", "\xc3\xab" => "\xc3\x8b", "\xc3\xac" => "\xc3\x8c",
306
+		"\xc3\xad" => "\xc3\x8d", "\xc3\xae" => "\xc3\x8e", "\xc3\xaf" => "\xc3\x8f", "\xc3\xb0" => "\xc3\x90",
307
+		"\xc3\xb1" => "\xc3\x91", "\xc3\xb2" => "\xc3\x92", "\xc3\xb3" => "\xc3\x93", "\xc3\xb4" => "\xc3\x94",
308
+		"\xc3\xb5" => "\xc3\x95", "\xc3\xb6" => "\xc3\x96", "\xc3\xb8" => "\xc3\x98", "\xc3\xb9" => "\xc3\x99",
309
+		"\xc3\xba" => "\xc3\x9a", "\xc3\xbb" => "\xc3\x9b", "\xc3\xbc" => "\xc3\x9c", "\xc3\xbd" => "\xc3\x9d",
310
+		"\xc3\xbe" => "\xc3\x9e", "ss" => "\xc3\x9f", "\xc4\x81" => "\xc4\x80", "\xc4\x83" => "\xc4\x82",
311
+		"\xc4\x85" => "\xc4\x84", "\xc4\x87" => "\xc4\x86", "\xc4\x89" => "\xc4\x88", "\xc4\x8b" => "\xc4\x8a",
312
+		"\xc4\x8d" => "\xc4\x8c", "\xc4\x8f" => "\xc4\x8e", "\xc4\x91" => "\xc4\x90", "\xc4\x93" => "\xc4\x92",
313
+		"\xc4\x95" => "\xc4\x94", "\xc4\x97" => "\xc4\x96", "\xc4\x99" => "\xc4\x98", "\xc4\x9b" => "\xc4\x9a",
314
+		"\xc4\x9d" => "\xc4\x9c", "\xc4\x9f" => "\xc4\x9e", "\xc4\xa1" => "\xc4\xa0", "\xc4\xa3" => "\xc4\xa2",
315
+		"\xc4\xa5" => "\xc4\xa4", "\xc4\xa7" => "\xc4\xa6", "\xc4\xa9" => "\xc4\xa8", "\xc4\xab" => "\xc4\xaa",
316
+		"\xc4\xad" => "\xc4\xac", "\xc4\xaf" => "\xc4\xae", "i\xcc\x87" => "\xc4\xb0", "\xc4\xb3" => "\xc4\xb2",
317
+		"\xc4\xb5" => "\xc4\xb4", "\xc4\xb7" => "\xc4\xb6", "\xc4\xba" => "\xc4\xb9", "\xc4\xbc" => "\xc4\xbb",
318
+		"\xc4\xbe" => "\xc4\xbd", "\xc5\x80" => "\xc4\xbf", "\xc5\x82" => "\xc5\x81", "\xc5\x84" => "\xc5\x83",
319
+		"\xc5\x86" => "\xc5\x85", "\xc5\x88" => "\xc5\x87", "\xca\xbcn" => "\xc5\x89", "\xc5\x8b" => "\xc5\x8a",
320
+		"\xc5\x8d" => "\xc5\x8c", "\xc5\x8f" => "\xc5\x8e", "\xc5\x91" => "\xc5\x90", "\xc5\x93" => "\xc5\x92",
321
+		"\xc5\x95" => "\xc5\x94", "\xc5\x97" => "\xc5\x96", "\xc5\x99" => "\xc5\x98", "\xc5\x9b" => "\xc5\x9a",
322
+		"\xc5\x9d" => "\xc5\x9c", "\xc5\x9f" => "\xc5\x9e", "\xc5\xa1" => "\xc5\xa0", "\xc5\xa3" => "\xc5\xa2",
323
+		"\xc5\xa5" => "\xc5\xa4", "\xc5\xa7" => "\xc5\xa6", "\xc5\xa9" => "\xc5\xa8", "\xc5\xab" => "\xc5\xaa",
324
+		"\xc5\xad" => "\xc5\xac", "\xc5\xaf" => "\xc5\xae", "\xc5\xb1" => "\xc5\xb0", "\xc5\xb3" => "\xc5\xb2",
325
+		"\xc5\xb5" => "\xc5\xb4", "\xc5\xb7" => "\xc5\xb6", "\xc3\xbf" => "\xc5\xb8", "\xc5\xba" => "\xc5\xb9",
326
+		"\xc5\xbc" => "\xc5\xbb", "\xc5\xbe" => "\xc5\xbd", "\xc9\x93" => "\xc6\x81",
327
+		"\xc6\x83" => "\xc6\x82", "\xc6\x85" => "\xc6\x84", "\xc9\x94" => "\xc6\x86", "\xc6\x88" => "\xc6\x87",
328
+		"\xc9\x96" => "\xc6\x89", "\xc9\x97" => "\xc6\x8a", "\xc6\x8c" => "\xc6\x8b", "\xc7\x9d" => "\xc6\x8e",
329
+		"\xc9\x99" => "\xc6\x8f", "\xc9\x9b" => "\xc6\x90", "\xc6\x92" => "\xc6\x91", "\xc9\xa0" => "\xc6\x93",
330
+		"\xc9\xa3" => "\xc6\x94", "\xc9\xa9" => "\xc6\x96", "\xc9\xa8" => "\xc6\x97", "\xc6\x99" => "\xc6\x98",
331
+		"\xc9\xaf" => "\xc6\x9c", "\xc9\xb2" => "\xc6\x9d", "\xc9\xb5" => "\xc6\x9f", "\xc6\xa1" => "\xc6\xa0",
332
+		"\xc6\xa3" => "\xc6\xa2", "\xc6\xa5" => "\xc6\xa4", "\xca\x80" => "\xc6\xa6", "\xc6\xa8" => "\xc6\xa7",
333
+		"\xca\x83" => "\xc6\xa9", "\xc6\xad" => "\xc6\xac", "\xca\x88" => "\xc6\xae", "\xc6\xb0" => "\xc6\xaf",
334
+		"\xca\x8a" => "\xc6\xb1", "\xca\x8b" => "\xc6\xb2", "\xc6\xb4" => "\xc6\xb3", "\xc6\xb6" => "\xc6\xb5",
335
+		"\xca\x92" => "\xc6\xb7", "\xc6\xb9" => "\xc6\xb8", "\xc6\xbd" => "\xc6\xbc", "\xc7\x86" => "\xc7\x84",
336
+		"\xc7\x86" => "\xc7\x85", "\xc7\x89" => "\xc7\x87", "\xc7\x89" => "\xc7\x88", "\xc7\x8c" => "\xc7\x8a",
337
+		"\xc7\x8c" => "\xc7\x8b", "\xc7\x8e" => "\xc7\x8d", "\xc7\x90" => "\xc7\x8f", "\xc7\x92" => "\xc7\x91",
338
+		"\xc7\x94" => "\xc7\x93", "\xc7\x96" => "\xc7\x95", "\xc7\x98" => "\xc7\x97", "\xc7\x9a" => "\xc7\x99",
339
+		"\xc7\x9c" => "\xc7\x9b", "\xc7\x9f" => "\xc7\x9e", "\xc7\xa1" => "\xc7\xa0", "\xc7\xa3" => "\xc7\xa2",
340
+		"\xc7\xa5" => "\xc7\xa4", "\xc7\xa7" => "\xc7\xa6", "\xc7\xa9" => "\xc7\xa8", "\xc7\xab" => "\xc7\xaa",
341
+		"\xc7\xad" => "\xc7\xac", "\xc7\xaf" => "\xc7\xae", "j\xcc\x8c" => "\xc7\xb0", "\xc7\xb3" => "\xc7\xb1",
342
+		"\xc7\xb3" => "\xc7\xb2", "\xc7\xb5" => "\xc7\xb4", "\xc6\x95" => "\xc7\xb6", "\xc6\xbf" => "\xc7\xb7",
343
+		"\xc7\xb9" => "\xc7\xb8", "\xc7\xbb" => "\xc7\xba", "\xc7\xbd" => "\xc7\xbc", "\xc7\xbf" => "\xc7\xbe",
344
+		"\xc8\x81" => "\xc8\x80", "\xc8\x83" => "\xc8\x82", "\xc8\x85" => "\xc8\x84", "\xc8\x87" => "\xc8\x86",
345
+		"\xc8\x89" => "\xc8\x88", "\xc8\x8b" => "\xc8\x8a", "\xc8\x8d" => "\xc8\x8c", "\xc8\x8f" => "\xc8\x8e",
346
+		"\xc8\x91" => "\xc8\x90", "\xc8\x93" => "\xc8\x92", "\xc8\x95" => "\xc8\x94", "\xc8\x97" => "\xc8\x96",
347
+		"\xc8\x99" => "\xc8\x98", "\xc8\x9b" => "\xc8\x9a", "\xc8\x9d" => "\xc8\x9c", "\xc8\x9f" => "\xc8\x9e",
348
+		"\xc6\x9e" => "\xc8\xa0", "\xc8\xa3" => "\xc8\xa2", "\xc8\xa5" => "\xc8\xa4", "\xc8\xa7" => "\xc8\xa6",
349
+		"\xc8\xa9" => "\xc8\xa8", "\xc8\xab" => "\xc8\xaa", "\xc8\xad" => "\xc8\xac", "\xc8\xaf" => "\xc8\xae",
350
+		"\xc8\xb1" => "\xc8\xb0", "\xc8\xb3" => "\xc8\xb2", "\xe2\xb1\xa5" => "\xc8\xba", "\xc8\xbc" => "\xc8\xbb",
351
+		"\xc6\x9a" => "\xc8\xbd", "\xe2\xb1\xa6" => "\xc8\xbe", "\xc9\x82" => "\xc9\x81", "\xc6\x80" => "\xc9\x83",
352
+		"\xca\x89" => "\xc9\x84", "\xca\x8c" => "\xc9\x85", "\xc9\x87" => "\xc9\x86", "\xc9\x89" => "\xc9\x88",
353
+		"\xc9\x8b" => "\xc9\x8a", "\xc9\x8d" => "\xc9\x8c", "\xc9\x8f" => "\xc9\x8e", "\xce\xb9" => "\xcd\x85",
354
+		"\xce\xac" => "\xce\x86", "\xce\xad" => "\xce\x88", "\xce\xae" => "\xce\x89", "\xce\xaf" => "\xce\x8a",
355
+		"\xcf\x8c" => "\xce\x8c", "\xcf\x8d" => "\xce\x8e", "\xcf\x8e" => "\xce\x8f", "\xce\xb9\xcc\x88\xcc\x81" => "\xce\x90",
356
+		"\xce\xb1" => "\xce\x91", "\xce\xb2" => "\xce\x92", "\xce\xb3" => "\xce\x93", "\xce\xb4" => "\xce\x94",
357
+		"\xce\xb5" => "\xce\x95", "\xce\xb6" => "\xce\x96", "\xce\xb7" => "\xce\x97", "\xce\xb8" => "\xce\x98",
358
+		"\xce\xb9" => "\xce\x99", "\xce\xba" => "\xce\x9a", "\xce\xbb" => "\xce\x9b", "\xce\xbc" => "\xce\x9c",
359
+		"\xce\xbd" => "\xce\x9d", "\xce\xbe" => "\xce\x9e", "\xce\xbf" => "\xce\x9f", "\xcf\x80" => "\xce\xa0",
360
+		"\xcf\x81" => "\xce\xa1", "\xcf\x83" => "\xce\xa3", "\xcf\x84" => "\xce\xa4", "\xcf\x85" => "\xce\xa5",
361
+		"\xcf\x86" => "\xce\xa6", "\xcf\x87" => "\xce\xa7", "\xcf\x88" => "\xce\xa8", "\xcf\x89" => "\xce\xa9",
362
+		"\xcf\x8a" => "\xce\xaa", "\xcf\x8b" => "\xce\xab", "\xcf\x85\xcc\x88\xcc\x81" => "\xce\xb0", "\xcf\x83" => "\xcf\x82",
363
+		"\xce\xb2" => "\xcf\x90", "\xce\xb8" => "\xcf\x91", "\xcf\x86" => "\xcf\x95", "\xcf\x80" => "\xcf\x96",
364
+		"\xcf\x99" => "\xcf\x98", "\xcf\x9b" => "\xcf\x9a", "\xcf\x9d" => "\xcf\x9c", "\xcf\x9f" => "\xcf\x9e",
365
+		"\xcf\xa1" => "\xcf\xa0", "\xcf\xa3" => "\xcf\xa2", "\xcf\xa5" => "\xcf\xa4", "\xcf\xa7" => "\xcf\xa6",
366
+		"\xcf\xa9" => "\xcf\xa8", "\xcf\xab" => "\xcf\xaa", "\xcf\xad" => "\xcf\xac", "\xcf\xaf" => "\xcf\xae",
367
+		"\xce\xba" => "\xcf\xb0", "\xcf\x81" => "\xcf\xb1", "\xce\xb8" => "\xcf\xb4", "\xce\xb5" => "\xcf\xb5",
368
+		"\xcf\xb8" => "\xcf\xb7", "\xcf\xb2" => "\xcf\xb9", "\xcf\xbb" => "\xcf\xba", "\xcd\xbb" => "\xcf\xbd",
369
+		"\xcd\xbc" => "\xcf\xbe", "\xcd\xbd" => "\xcf\xbf", "\xd1\x90" => "\xd0\x80", "\xd1\x91" => "\xd0\x81",
370
+		"\xd1\x92" => "\xd0\x82", "\xd1\x93" => "\xd0\x83", "\xd1\x94" => "\xd0\x84", "\xd1\x95" => "\xd0\x85",
371
+		"\xd1\x96" => "\xd0\x86", "\xd1\x97" => "\xd0\x87", "\xd1\x98" => "\xd0\x88", "\xd1\x99" => "\xd0\x89",
372
+		"\xd1\x9a" => "\xd0\x8a", "\xd1\x9b" => "\xd0\x8b", "\xd1\x9c" => "\xd0\x8c", "\xd1\x9d" => "\xd0\x8d",
373
+		"\xd1\x9e" => "\xd0\x8e", "\xd1\x9f" => "\xd0\x8f", "\xd0\xb0" => "\xd0\x90", "\xd0\xb1" => "\xd0\x91",
374
+		"\xd0\xb2" => "\xd0\x92", "\xd0\xb3" => "\xd0\x93", "\xd0\xb4" => "\xd0\x94", "\xd0\xb5" => "\xd0\x95",
375
+		"\xd0\xb6" => "\xd0\x96", "\xd0\xb7" => "\xd0\x97", "\xd0\xb8" => "\xd0\x98", "\xd0\xb9" => "\xd0\x99",
376
+		"\xd0\xba" => "\xd0\x9a", "\xd0\xbb" => "\xd0\x9b", "\xd0\xbc" => "\xd0\x9c", "\xd0\xbd" => "\xd0\x9d",
377
+		"\xd0\xbe" => "\xd0\x9e", "\xd0\xbf" => "\xd0\x9f", "\xd1\x80" => "\xd0\xa0", "\xd1\x81" => "\xd0\xa1",
378
+		"\xd1\x82" => "\xd0\xa2", "\xd1\x83" => "\xd0\xa3", "\xd1\x84" => "\xd0\xa4", "\xd1\x85" => "\xd0\xa5",
379
+		"\xd1\x86" => "\xd0\xa6", "\xd1\x87" => "\xd0\xa7", "\xd1\x88" => "\xd0\xa8", "\xd1\x89" => "\xd0\xa9",
380
+		"\xd1\x8a" => "\xd0\xaa", "\xd1\x8b" => "\xd0\xab", "\xd1\x8c" => "\xd0\xac", "\xd1\x8d" => "\xd0\xad",
381
+		"\xd1\x8e" => "\xd0\xae", "\xd1\x8f" => "\xd0\xaf", "\xd1\xa1" => "\xd1\xa0", "\xd1\xa3" => "\xd1\xa2",
382
+		"\xd1\xa5" => "\xd1\xa4", "\xd1\xa7" => "\xd1\xa6", "\xd1\xa9" => "\xd1\xa8", "\xd1\xab" => "\xd1\xaa",
383
+		"\xd1\xad" => "\xd1\xac", "\xd1\xaf" => "\xd1\xae", "\xd1\xb1" => "\xd1\xb0", "\xd1\xb3" => "\xd1\xb2",
384
+		"\xd1\xb5" => "\xd1\xb4", "\xd1\xb7" => "\xd1\xb6", "\xd1\xb9" => "\xd1\xb8", "\xd1\xbb" => "\xd1\xba",
385
+		"\xd1\xbd" => "\xd1\xbc", "\xd1\xbf" => "\xd1\xbe", "\xd2\x81" => "\xd2\x80", "\xd2\x8b" => "\xd2\x8a",
386
+		"\xd2\x8d" => "\xd2\x8c", "\xd2\x8f" => "\xd2\x8e", "\xd2\x91" => "\xd2\x90", "\xd2\x93" => "\xd2\x92",
387
+		"\xd2\x95" => "\xd2\x94", "\xd2\x97" => "\xd2\x96", "\xd2\x99" => "\xd2\x98", "\xd2\x9b" => "\xd2\x9a",
388
+		"\xd2\x9d" => "\xd2\x9c", "\xd2\x9f" => "\xd2\x9e", "\xd2\xa1" => "\xd2\xa0", "\xd2\xa3" => "\xd2\xa2",
389
+		"\xd2\xa5" => "\xd2\xa4", "\xd2\xa7" => "\xd2\xa6", "\xd2\xa9" => "\xd2\xa8", "\xd2\xab" => "\xd2\xaa",
390
+		"\xd2\xad" => "\xd2\xac", "\xd2\xaf" => "\xd2\xae", "\xd2\xb1" => "\xd2\xb0", "\xd2\xb3" => "\xd2\xb2",
391
+		"\xd2\xb5" => "\xd2\xb4", "\xd2\xb7" => "\xd2\xb6", "\xd2\xb9" => "\xd2\xb8", "\xd2\xbb" => "\xd2\xba",
392
+		"\xd2\xbd" => "\xd2\xbc", "\xd2\xbf" => "\xd2\xbe", "\xd3\x8f" => "\xd3\x80", "\xd3\x82" => "\xd3\x81",
393
+		"\xd3\x84" => "\xd3\x83", "\xd3\x86" => "\xd3\x85", "\xd3\x88" => "\xd3\x87", "\xd3\x8a" => "\xd3\x89",
394
+		"\xd3\x8c" => "\xd3\x8b", "\xd3\x8e" => "\xd3\x8d", "\xd3\x91" => "\xd3\x90", "\xd3\x93" => "\xd3\x92",
395
+		"\xd3\x95" => "\xd3\x94", "\xd3\x97" => "\xd3\x96", "\xd3\x99" => "\xd3\x98", "\xd3\x9b" => "\xd3\x9a",
396
+		"\xd3\x9d" => "\xd3\x9c", "\xd3\x9f" => "\xd3\x9e", "\xd3\xa1" => "\xd3\xa0", "\xd3\xa3" => "\xd3\xa2",
397
+		"\xd3\xa5" => "\xd3\xa4", "\xd3\xa7" => "\xd3\xa6", "\xd3\xa9" => "\xd3\xa8", "\xd3\xab" => "\xd3\xaa",
398
+		"\xd3\xad" => "\xd3\xac", "\xd3\xaf" => "\xd3\xae", "\xd3\xb1" => "\xd3\xb0", "\xd3\xb3" => "\xd3\xb2",
399
+		"\xd3\xb5" => "\xd3\xb4", "\xd3\xb7" => "\xd3\xb6", "\xd3\xb9" => "\xd3\xb8", "\xd3\xbb" => "\xd3\xba",
400
+		"\xd3\xbd" => "\xd3\xbc", "\xd3\xbf" => "\xd3\xbe", "\xd4\x81" => "\xd4\x80", "\xd4\x83" => "\xd4\x82",
401
+		"\xd4\x85" => "\xd4\x84", "\xd4\x87" => "\xd4\x86", "\xd4\x89" => "\xd4\x88", "\xd4\x8b" => "\xd4\x8a",
402
+		"\xd4\x8d" => "\xd4\x8c", "\xd4\x8f" => "\xd4\x8e", "\xd4\x91" => "\xd4\x90", "\xd4\x93" => "\xd4\x92",
403
+		"\xd5\xa1" => "\xd4\xb1", "\xd5\xa2" => "\xd4\xb2", "\xd5\xa3" => "\xd4\xb3", "\xd5\xa4" => "\xd4\xb4",
404
+		"\xd5\xa5" => "\xd4\xb5", "\xd5\xa6" => "\xd4\xb6", "\xd5\xa7" => "\xd4\xb7", "\xd5\xa8" => "\xd4\xb8",
405
+		"\xd5\xa9" => "\xd4\xb9", "\xd5\xaa" => "\xd4\xba", "\xd5\xab" => "\xd4\xbb", "\xd5\xac" => "\xd4\xbc",
406
+		"\xd5\xad" => "\xd4\xbd", "\xd5\xae" => "\xd4\xbe", "\xd5\xaf" => "\xd4\xbf", "\xd5\xb0" => "\xd5\x80",
407
+		"\xd5\xb1" => "\xd5\x81", "\xd5\xb2" => "\xd5\x82", "\xd5\xb3" => "\xd5\x83", "\xd5\xb4" => "\xd5\x84",
408
+		"\xd5\xb5" => "\xd5\x85", "\xd5\xb6" => "\xd5\x86", "\xd5\xb7" => "\xd5\x87", "\xd5\xb8" => "\xd5\x88",
409
+		"\xd5\xb9" => "\xd5\x89", "\xd5\xba" => "\xd5\x8a", "\xd5\xbb" => "\xd5\x8b", "\xd5\xbc" => "\xd5\x8c",
410
+		"\xd5\xbd" => "\xd5\x8d", "\xd5\xbe" => "\xd5\x8e", "\xd5\xbf" => "\xd5\x8f", "\xd6\x80" => "\xd5\x90",
411
+		"\xd6\x81" => "\xd5\x91", "\xd6\x82" => "\xd5\x92", "\xd6\x83" => "\xd5\x93", "\xd6\x84" => "\xd5\x94",
412
+		"\xd6\x85" => "\xd5\x95", "\xd6\x86" => "\xd5\x96", "\xd5\xa5\xd6\x82" => "\xd6\x87", "\xe2\xb4\x80" => "\xe1\x82\xa0",
413
+		"\xe2\xb4\x81" => "\xe1\x82\xa1", "\xe2\xb4\x82" => "\xe1\x82\xa2", "\xe2\xb4\x83" => "\xe1\x82\xa3", "\xe2\xb4\x84" => "\xe1\x82\xa4",
414
+		"\xe2\xb4\x85" => "\xe1\x82\xa5", "\xe2\xb4\x86" => "\xe1\x82\xa6", "\xe2\xb4\x87" => "\xe1\x82\xa7", "\xe2\xb4\x88" => "\xe1\x82\xa8",
415
+		"\xe2\xb4\x89" => "\xe1\x82\xa9", "\xe2\xb4\x8a" => "\xe1\x82\xaa", "\xe2\xb4\x8b" => "\xe1\x82\xab", "\xe2\xb4\x8c" => "\xe1\x82\xac",
416
+		"\xe2\xb4\x8d" => "\xe1\x82\xad", "\xe2\xb4\x8e" => "\xe1\x82\xae", "\xe2\xb4\x8f" => "\xe1\x82\xaf", "\xe2\xb4\x90" => "\xe1\x82\xb0",
417
+		"\xe2\xb4\x91" => "\xe1\x82\xb1", "\xe2\xb4\x92" => "\xe1\x82\xb2", "\xe2\xb4\x93" => "\xe1\x82\xb3", "\xe2\xb4\x94" => "\xe1\x82\xb4",
418
+		"\xe2\xb4\x95" => "\xe1\x82\xb5", "\xe2\xb4\x96" => "\xe1\x82\xb6", "\xe2\xb4\x97" => "\xe1\x82\xb7", "\xe2\xb4\x98" => "\xe1\x82\xb8",
419
+		"\xe2\xb4\x99" => "\xe1\x82\xb9", "\xe2\xb4\x9a" => "\xe1\x82\xba", "\xe2\xb4\x9b" => "\xe1\x82\xbb", "\xe2\xb4\x9c" => "\xe1\x82\xbc",
420
+		"\xe2\xb4\x9d" => "\xe1\x82\xbd", "\xe2\xb4\x9e" => "\xe1\x82\xbe", "\xe2\xb4\x9f" => "\xe1\x82\xbf", "\xe2\xb4\xa0" => "\xe1\x83\x80",
421
+		"\xe2\xb4\xa1" => "\xe1\x83\x81", "\xe2\xb4\xa2" => "\xe1\x83\x82", "\xe2\xb4\xa3" => "\xe1\x83\x83", "\xe2\xb4\xa4" => "\xe1\x83\x84",
422
+		"\xe2\xb4\xa5" => "\xe1\x83\x85", "\xe1\xb8\x81" => "\xe1\xb8\x80", "\xe1\xb8\x83" => "\xe1\xb8\x82", "\xe1\xb8\x85" => "\xe1\xb8\x84",
423
+		"\xe1\xb8\x87" => "\xe1\xb8\x86", "\xe1\xb8\x89" => "\xe1\xb8\x88", "\xe1\xb8\x8b" => "\xe1\xb8\x8a", "\xe1\xb8\x8d" => "\xe1\xb8\x8c",
424
+		"\xe1\xb8\x8f" => "\xe1\xb8\x8e", "\xe1\xb8\x91" => "\xe1\xb8\x90", "\xe1\xb8\x93" => "\xe1\xb8\x92", "\xe1\xb8\x95" => "\xe1\xb8\x94",
425
+		"\xe1\xb8\x97" => "\xe1\xb8\x96", "\xe1\xb8\x99" => "\xe1\xb8\x98", "\xe1\xb8\x9b" => "\xe1\xb8\x9a", "\xe1\xb8\x9d" => "\xe1\xb8\x9c",
426
+		"\xe1\xb8\x9f" => "\xe1\xb8\x9e", "\xe1\xb8\xa1" => "\xe1\xb8\xa0", "\xe1\xb8\xa3" => "\xe1\xb8\xa2", "\xe1\xb8\xa5" => "\xe1\xb8\xa4",
427
+		"\xe1\xb8\xa7" => "\xe1\xb8\xa6", "\xe1\xb8\xa9" => "\xe1\xb8\xa8", "\xe1\xb8\xab" => "\xe1\xb8\xaa", "\xe1\xb8\xad" => "\xe1\xb8\xac",
428
+		"\xe1\xb8\xaf" => "\xe1\xb8\xae", "\xe1\xb8\xb1" => "\xe1\xb8\xb0", "\xe1\xb8\xb3" => "\xe1\xb8\xb2", "\xe1\xb8\xb5" => "\xe1\xb8\xb4",
429
+		"\xe1\xb8\xb7" => "\xe1\xb8\xb6", "\xe1\xb8\xb9" => "\xe1\xb8\xb8", "\xe1\xb8\xbb" => "\xe1\xb8\xba", "\xe1\xb8\xbd" => "\xe1\xb8\xbc",
430
+		"\xe1\xb8\xbf" => "\xe1\xb8\xbe", "\xe1\xb9\x81" => "\xe1\xb9\x80", "\xe1\xb9\x83" => "\xe1\xb9\x82", "\xe1\xb9\x85" => "\xe1\xb9\x84",
431
+		"\xe1\xb9\x87" => "\xe1\xb9\x86", "\xe1\xb9\x89" => "\xe1\xb9\x88", "\xe1\xb9\x8b" => "\xe1\xb9\x8a", "\xe1\xb9\x8d" => "\xe1\xb9\x8c",
432
+		"\xe1\xb9\x8f" => "\xe1\xb9\x8e", "\xe1\xb9\x91" => "\xe1\xb9\x90", "\xe1\xb9\x93" => "\xe1\xb9\x92", "\xe1\xb9\x95" => "\xe1\xb9\x94",
433
+		"\xe1\xb9\x97" => "\xe1\xb9\x96", "\xe1\xb9\x99" => "\xe1\xb9\x98", "\xe1\xb9\x9b" => "\xe1\xb9\x9a", "\xe1\xb9\x9d" => "\xe1\xb9\x9c",
434
+		"\xe1\xb9\x9f" => "\xe1\xb9\x9e", "\xe1\xb9\xa1" => "\xe1\xb9\xa0", "\xe1\xb9\xa3" => "\xe1\xb9\xa2", "\xe1\xb9\xa5" => "\xe1\xb9\xa4",
435
+		"\xe1\xb9\xa7" => "\xe1\xb9\xa6", "\xe1\xb9\xa9" => "\xe1\xb9\xa8", "\xe1\xb9\xab" => "\xe1\xb9\xaa", "\xe1\xb9\xad" => "\xe1\xb9\xac",
436
+		"\xe1\xb9\xaf" => "\xe1\xb9\xae", "\xe1\xb9\xb1" => "\xe1\xb9\xb0", "\xe1\xb9\xb3" => "\xe1\xb9\xb2", "\xe1\xb9\xb5" => "\xe1\xb9\xb4",
437
+		"\xe1\xb9\xb7" => "\xe1\xb9\xb6", "\xe1\xb9\xb9" => "\xe1\xb9\xb8", "\xe1\xb9\xbb" => "\xe1\xb9\xba", "\xe1\xb9\xbd" => "\xe1\xb9\xbc",
438
+		"\xe1\xb9\xbf" => "\xe1\xb9\xbe", "\xe1\xba\x81" => "\xe1\xba\x80", "\xe1\xba\x83" => "\xe1\xba\x82", "\xe1\xba\x85" => "\xe1\xba\x84",
439
+		"\xe1\xba\x87" => "\xe1\xba\x86", "\xe1\xba\x89" => "\xe1\xba\x88", "\xe1\xba\x8b" => "\xe1\xba\x8a", "\xe1\xba\x8d" => "\xe1\xba\x8c",
440
+		"\xe1\xba\x8f" => "\xe1\xba\x8e", "\xe1\xba\x91" => "\xe1\xba\x90", "\xe1\xba\x93" => "\xe1\xba\x92", "\xe1\xba\x95" => "\xe1\xba\x94",
441
+		"h\xcc\xb1" => "\xe1\xba\x96", "t\xcc\x88" => "\xe1\xba\x97", "w\xcc\x8a" => "\xe1\xba\x98", "y\xcc\x8a" => "\xe1\xba\x99",
442
+		"a\xca\xbe" => "\xe1\xba\x9a", "\xe1\xb9\xa1" => "\xe1\xba\x9b", "\xe1\xba\xa1" => "\xe1\xba\xa0", "\xe1\xba\xa3" => "\xe1\xba\xa2",
443
+		"\xe1\xba\xa5" => "\xe1\xba\xa4", "\xe1\xba\xa7" => "\xe1\xba\xa6", "\xe1\xba\xa9" => "\xe1\xba\xa8", "\xe1\xba\xab" => "\xe1\xba\xaa",
444
+		"\xe1\xba\xad" => "\xe1\xba\xac", "\xe1\xba\xaf" => "\xe1\xba\xae", "\xe1\xba\xb1" => "\xe1\xba\xb0", "\xe1\xba\xb3" => "\xe1\xba\xb2",
445
+		"\xe1\xba\xb5" => "\xe1\xba\xb4", "\xe1\xba\xb7" => "\xe1\xba\xb6", "\xe1\xba\xb9" => "\xe1\xba\xb8", "\xe1\xba\xbb" => "\xe1\xba\xba",
446
+		"\xe1\xba\xbd" => "\xe1\xba\xbc", "\xe1\xba\xbf" => "\xe1\xba\xbe", "\xe1\xbb\x81" => "\xe1\xbb\x80", "\xe1\xbb\x83" => "\xe1\xbb\x82",
447
+		"\xe1\xbb\x85" => "\xe1\xbb\x84", "\xe1\xbb\x87" => "\xe1\xbb\x86", "\xe1\xbb\x89" => "\xe1\xbb\x88", "\xe1\xbb\x8b" => "\xe1\xbb\x8a",
448
+		"\xe1\xbb\x8d" => "\xe1\xbb\x8c", "\xe1\xbb\x8f" => "\xe1\xbb\x8e", "\xe1\xbb\x91" => "\xe1\xbb\x90", "\xe1\xbb\x93" => "\xe1\xbb\x92",
449
+		"\xe1\xbb\x95" => "\xe1\xbb\x94", "\xe1\xbb\x97" => "\xe1\xbb\x96", "\xe1\xbb\x99" => "\xe1\xbb\x98", "\xe1\xbb\x9b" => "\xe1\xbb\x9a",
450
+		"\xe1\xbb\x9d" => "\xe1\xbb\x9c", "\xe1\xbb\x9f" => "\xe1\xbb\x9e", "\xe1\xbb\xa1" => "\xe1\xbb\xa0", "\xe1\xbb\xa3" => "\xe1\xbb\xa2",
451
+		"\xe1\xbb\xa5" => "\xe1\xbb\xa4", "\xe1\xbb\xa7" => "\xe1\xbb\xa6", "\xe1\xbb\xa9" => "\xe1\xbb\xa8", "\xe1\xbb\xab" => "\xe1\xbb\xaa",
452
+		"\xe1\xbb\xad" => "\xe1\xbb\xac", "\xe1\xbb\xaf" => "\xe1\xbb\xae", "\xe1\xbb\xb1" => "\xe1\xbb\xb0", "\xe1\xbb\xb3" => "\xe1\xbb\xb2",
453
+		"\xe1\xbb\xb5" => "\xe1\xbb\xb4", "\xe1\xbb\xb7" => "\xe1\xbb\xb6", "\xe1\xbb\xb9" => "\xe1\xbb\xb8", "\xe1\xbc\x80" => "\xe1\xbc\x88",
454
+		"\xe1\xbc\x81" => "\xe1\xbc\x89", "\xe1\xbc\x82" => "\xe1\xbc\x8a", "\xe1\xbc\x83" => "\xe1\xbc\x8b", "\xe1\xbc\x84" => "\xe1\xbc\x8c",
455
+		"\xe1\xbc\x85" => "\xe1\xbc\x8d", "\xe1\xbc\x86" => "\xe1\xbc\x8e", "\xe1\xbc\x87" => "\xe1\xbc\x8f", "\xe1\xbc\x90" => "\xe1\xbc\x98",
456
+		"\xe1\xbc\x91" => "\xe1\xbc\x99", "\xe1\xbc\x92" => "\xe1\xbc\x9a", "\xe1\xbc\x93" => "\xe1\xbc\x9b", "\xe1\xbc\x94" => "\xe1\xbc\x9c",
457
+		"\xe1\xbc\x95" => "\xe1\xbc\x9d", "\xe1\xbc\xa0" => "\xe1\xbc\xa8", "\xe1\xbc\xa1" => "\xe1\xbc\xa9", "\xe1\xbc\xa2" => "\xe1\xbc\xaa",
458
+		"\xe1\xbc\xa3" => "\xe1\xbc\xab", "\xe1\xbc\xa4" => "\xe1\xbc\xac", "\xe1\xbc\xa5" => "\xe1\xbc\xad", "\xe1\xbc\xa6" => "\xe1\xbc\xae",
459
+		"\xe1\xbc\xa7" => "\xe1\xbc\xaf", "\xe1\xbc\xb0" => "\xe1\xbc\xb8", "\xe1\xbc\xb1" => "\xe1\xbc\xb9", "\xe1\xbc\xb2" => "\xe1\xbc\xba",
460
+		"\xe1\xbc\xb3" => "\xe1\xbc\xbb", "\xe1\xbc\xb4" => "\xe1\xbc\xbc", "\xe1\xbc\xb5" => "\xe1\xbc\xbd", "\xe1\xbc\xb6" => "\xe1\xbc\xbe",
461
+		"\xe1\xbc\xb7" => "\xe1\xbc\xbf", "\xe1\xbd\x80" => "\xe1\xbd\x88", "\xe1\xbd\x81" => "\xe1\xbd\x89", "\xe1\xbd\x82" => "\xe1\xbd\x8a",
462
+		"\xe1\xbd\x83" => "\xe1\xbd\x8b", "\xe1\xbd\x84" => "\xe1\xbd\x8c", "\xe1\xbd\x85" => "\xe1\xbd\x8d", "\xcf\x85\xcc\x93" => "\xe1\xbd\x90",
463
+		"\xcf\x85\xcc\x93\xcc\x80" => "\xe1\xbd\x92", "\xcf\x85\xcc\x93\xcc\x81" => "\xe1\xbd\x94", "\xcf\x85\xcc\x93\xcd\x82" => "\xe1\xbd\x96", "\xe1\xbd\x91" => "\xe1\xbd\x99",
464
+		"\xe1\xbd\x93" => "\xe1\xbd\x9b", "\xe1\xbd\x95" => "\xe1\xbd\x9d", "\xe1\xbd\x97" => "\xe1\xbd\x9f", "\xe1\xbd\xa0" => "\xe1\xbd\xa8",
465
+		"\xe1\xbd\xa1" => "\xe1\xbd\xa9", "\xe1\xbd\xa2" => "\xe1\xbd\xaa", "\xe1\xbd\xa3" => "\xe1\xbd\xab", "\xe1\xbd\xa4" => "\xe1\xbd\xac",
466
+		"\xe1\xbd\xa5" => "\xe1\xbd\xad", "\xe1\xbd\xa6" => "\xe1\xbd\xae", "\xe1\xbd\xa7" => "\xe1\xbd\xaf", "\xe1\xbc\x80\xce\xb9" => "\xe1\xbe\x80",
467
+		"\xe1\xbc\x81\xce\xb9" => "\xe1\xbe\x81", "\xe1\xbc\x82\xce\xb9" => "\xe1\xbe\x82", "\xe1\xbc\x83\xce\xb9" => "\xe1\xbe\x83", "\xe1\xbc\x84\xce\xb9" => "\xe1\xbe\x84",
468
+		"\xe1\xbc\x85\xce\xb9" => "\xe1\xbe\x85", "\xe1\xbc\x86\xce\xb9" => "\xe1\xbe\x86", "\xe1\xbc\x87\xce\xb9" => "\xe1\xbe\x87", "\xe1\xbe\x80" => "\xe1\xbe\x88",
469
+		"\xe1\xbe\x81" => "\xe1\xbe\x89", "\xe1\xbe\x82" => "\xe1\xbe\x8a", "\xe1\xbe\x83" => "\xe1\xbe\x8b", "\xe1\xbe\x84" => "\xe1\xbe\x8c",
470
+		"\xe1\xbe\x85" => "\xe1\xbe\x8d", "\xe1\xbe\x86" => "\xe1\xbe\x8e", "\xe1\xbe\x87" => "\xe1\xbe\x8f", "\xe1\xbc\xa0\xce\xb9" => "\xe1\xbe\x90",
471
+		"\xe1\xbc\xa1\xce\xb9" => "\xe1\xbe\x91", "\xe1\xbc\xa2\xce\xb9" => "\xe1\xbe\x92", "\xe1\xbc\xa3\xce\xb9" => "\xe1\xbe\x93", "\xe1\xbc\xa4\xce\xb9" => "\xe1\xbe\x94",
472
+		"\xe1\xbc\xa5\xce\xb9" => "\xe1\xbe\x95", "\xe1\xbc\xa6\xce\xb9" => "\xe1\xbe\x96", "\xe1\xbc\xa7\xce\xb9" => "\xe1\xbe\x97", "\xe1\xbe\x90" => "\xe1\xbe\x98",
473
+		"\xe1\xbe\x91" => "\xe1\xbe\x99", "\xe1\xbe\x92" => "\xe1\xbe\x9a", "\xe1\xbe\x93" => "\xe1\xbe\x9b", "\xe1\xbe\x94" => "\xe1\xbe\x9c",
474
+		"\xe1\xbe\x95" => "\xe1\xbe\x9d", "\xe1\xbe\x96" => "\xe1\xbe\x9e", "\xe1\xbe\x97" => "\xe1\xbe\x9f", "\xe1\xbd\xa0\xce\xb9" => "\xe1\xbe\xa0",
475
+		"\xe1\xbd\xa1\xce\xb9" => "\xe1\xbe\xa1", "\xe1\xbd\xa2\xce\xb9" => "\xe1\xbe\xa2", "\xe1\xbd\xa3\xce\xb9" => "\xe1\xbe\xa3", "\xe1\xbd\xa4\xce\xb9" => "\xe1\xbe\xa4",
476
+		"\xe1\xbd\xa5\xce\xb9" => "\xe1\xbe\xa5", "\xe1\xbd\xa6\xce\xb9" => "\xe1\xbe\xa6", "\xe1\xbd\xa7\xce\xb9" => "\xe1\xbe\xa7", "\xe1\xbe\xa0" => "\xe1\xbe\xa8",
477
+		"\xe1\xbe\xa1" => "\xe1\xbe\xa9", "\xe1\xbe\xa2" => "\xe1\xbe\xaa", "\xe1\xbe\xa3" => "\xe1\xbe\xab", "\xe1\xbe\xa4" => "\xe1\xbe\xac",
478
+		"\xe1\xbe\xa5" => "\xe1\xbe\xad", "\xe1\xbe\xa6" => "\xe1\xbe\xae", "\xe1\xbe\xa7" => "\xe1\xbe\xaf", "\xe1\xbd\xb0\xce\xb9" => "\xe1\xbe\xb2",
479
+		"\xce\xb1\xce\xb9" => "\xe1\xbe\xb3", "\xce\xac\xce\xb9" => "\xe1\xbe\xb4", "\xce\xb1\xcd\x82" => "\xe1\xbe\xb6", "\xce\xb1\xcd\x82\xce\xb9" => "\xe1\xbe\xb7",
480
+		"\xe1\xbe\xb0" => "\xe1\xbe\xb8", "\xe1\xbe\xb1" => "\xe1\xbe\xb9", "\xe1\xbd\xb0" => "\xe1\xbe\xba", "\xe1\xbd\xb1" => "\xe1\xbe\xbb",
481
+		"\xe1\xbe\xb3" => "\xe1\xbe\xbc", "\xce\xb9" => "\xe1\xbe\xbe", "\xe1\xbd\xb4\xce\xb9" => "\xe1\xbf\x82", "\xce\xb7\xce\xb9" => "\xe1\xbf\x83",
482
+		"\xce\xae\xce\xb9" => "\xe1\xbf\x84", "\xce\xb7\xcd\x82" => "\xe1\xbf\x86", "\xce\xb7\xcd\x82\xce\xb9" => "\xe1\xbf\x87", "\xe1\xbd\xb2" => "\xe1\xbf\x88",
483
+		"\xe1\xbd\xb3" => "\xe1\xbf\x89", "\xe1\xbd\xb4" => "\xe1\xbf\x8a", "\xe1\xbd\xb5" => "\xe1\xbf\x8b", "\xe1\xbf\x83" => "\xe1\xbf\x8c",
484
+		"\xce\xb9\xcc\x88\xcc\x80" => "\xe1\xbf\x92", "\xce\xb9\xcc\x88\xcc\x81" => "\xe1\xbf\x93", "\xce\xb9\xcd\x82" => "\xe1\xbf\x96", "\xce\xb9\xcc\x88\xcd\x82" => "\xe1\xbf\x97",
485
+		"\xe1\xbf\x90" => "\xe1\xbf\x98", "\xe1\xbf\x91" => "\xe1\xbf\x99", "\xe1\xbd\xb6" => "\xe1\xbf\x9a", "\xe1\xbd\xb7" => "\xe1\xbf\x9b",
486
+		"\xcf\x85\xcc\x88\xcc\x80" => "\xe1\xbf\xa2", "\xcf\x85\xcc\x88\xcc\x81" => "\xe1\xbf\xa3", "\xcf\x81\xcc\x93" => "\xe1\xbf\xa4", "\xcf\x85\xcd\x82" => "\xe1\xbf\xa6",
487
+		"\xcf\x85\xcc\x88\xcd\x82" => "\xe1\xbf\xa7", "\xe1\xbf\xa0" => "\xe1\xbf\xa8", "\xe1\xbf\xa1" => "\xe1\xbf\xa9", "\xe1\xbd\xba" => "\xe1\xbf\xaa",
488
+		"\xe1\xbd\xbb" => "\xe1\xbf\xab", "\xe1\xbf\xa5" => "\xe1\xbf\xac", "\xe1\xbd\xbc\xce\xb9" => "\xe1\xbf\xb2", "\xcf\x89\xce\xb9" => "\xe1\xbf\xb3",
489
+		"\xcf\x8e\xce\xb9" => "\xe1\xbf\xb4", "\xcf\x89\xcd\x82" => "\xe1\xbf\xb6", "\xcf\x89\xcd\x82\xce\xb9" => "\xe1\xbf\xb7", "\xe1\xbd\xb8" => "\xe1\xbf\xb8",
490
+		"\xe1\xbd\xb9" => "\xe1\xbf\xb9", "\xe1\xbd\xbc" => "\xe1\xbf\xba", "\xe1\xbd\xbd" => "\xe1\xbf\xbb", "\xe1\xbf\xb3" => "\xe1\xbf\xbc",
491
+		"\xcf\x89" => "\xe2\x84\xa6", "k" => "\xe2\x84\xaa", "\xc3\xa5" => "\xe2\x84\xab", "\xe2\x85\x8e" => "\xe2\x84\xb2",
492
+		"\xe2\x85\xb0" => "\xe2\x85\xa0", "\xe2\x85\xb1" => "\xe2\x85\xa1", "\xe2\x85\xb2" => "\xe2\x85\xa2", "\xe2\x85\xb3" => "\xe2\x85\xa3",
493
+		"\xe2\x85\xb4" => "\xe2\x85\xa4", "\xe2\x85\xb5" => "\xe2\x85\xa5", "\xe2\x85\xb6" => "\xe2\x85\xa6", "\xe2\x85\xb7" => "\xe2\x85\xa7",
494
+		"\xe2\x85\xb8" => "\xe2\x85\xa8", "\xe2\x85\xb9" => "\xe2\x85\xa9", "\xe2\x85\xba" => "\xe2\x85\xaa", "\xe2\x85\xbb" => "\xe2\x85\xab",
495
+		"\xe2\x85\xbc" => "\xe2\x85\xac", "\xe2\x85\xbd" => "\xe2\x85\xad", "\xe2\x85\xbe" => "\xe2\x85\xae", "\xe2\x85\xbf" => "\xe2\x85\xaf",
496
+		"\xe2\x86\x84" => "\xe2\x86\x83", "\xe2\x93\x90" => "\xe2\x92\xb6", "\xe2\x93\x91" => "\xe2\x92\xb7", "\xe2\x93\x92" => "\xe2\x92\xb8",
497
+		"\xe2\x93\x93" => "\xe2\x92\xb9", "\xe2\x93\x94" => "\xe2\x92\xba", "\xe2\x93\x95" => "\xe2\x92\xbb", "\xe2\x93\x96" => "\xe2\x92\xbc",
498
+		"\xe2\x93\x97" => "\xe2\x92\xbd", "\xe2\x93\x98" => "\xe2\x92\xbe", "\xe2\x93\x99" => "\xe2\x92\xbf", "\xe2\x93\x9a" => "\xe2\x93\x80",
499
+		"\xe2\x93\x9b" => "\xe2\x93\x81", "\xe2\x93\x9c" => "\xe2\x93\x82", "\xe2\x93\x9d" => "\xe2\x93\x83", "\xe2\x93\x9e" => "\xe2\x93\x84",
500
+		"\xe2\x93\x9f" => "\xe2\x93\x85", "\xe2\x93\xa0" => "\xe2\x93\x86", "\xe2\x93\xa1" => "\xe2\x93\x87", "\xe2\x93\xa2" => "\xe2\x93\x88",
501
+		"\xe2\x93\xa3" => "\xe2\x93\x89", "\xe2\x93\xa4" => "\xe2\x93\x8a", "\xe2\x93\xa5" => "\xe2\x93\x8b", "\xe2\x93\xa6" => "\xe2\x93\x8c",
502
+		"\xe2\x93\xa7" => "\xe2\x93\x8d", "\xe2\x93\xa8" => "\xe2\x93\x8e", "\xe2\x93\xa9" => "\xe2\x93\x8f", "\xe2\xb0\xb0" => "\xe2\xb0\x80",
503
+		"\xe2\xb0\xb1" => "\xe2\xb0\x81", "\xe2\xb0\xb2" => "\xe2\xb0\x82", "\xe2\xb0\xb3" => "\xe2\xb0\x83", "\xe2\xb0\xb4" => "\xe2\xb0\x84",
504
+		"\xe2\xb0\xb5" => "\xe2\xb0\x85", "\xe2\xb0\xb6" => "\xe2\xb0\x86", "\xe2\xb0\xb7" => "\xe2\xb0\x87", "\xe2\xb0\xb8" => "\xe2\xb0\x88",
505
+		"\xe2\xb0\xb9" => "\xe2\xb0\x89", "\xe2\xb0\xba" => "\xe2\xb0\x8a", "\xe2\xb0\xbb" => "\xe2\xb0\x8b", "\xe2\xb0\xbc" => "\xe2\xb0\x8c",
506
+		"\xe2\xb0\xbd" => "\xe2\xb0\x8d", "\xe2\xb0\xbe" => "\xe2\xb0\x8e", "\xe2\xb0\xbf" => "\xe2\xb0\x8f", "\xe2\xb1\x80" => "\xe2\xb0\x90",
507
+		"\xe2\xb1\x81" => "\xe2\xb0\x91", "\xe2\xb1\x82" => "\xe2\xb0\x92", "\xe2\xb1\x83" => "\xe2\xb0\x93", "\xe2\xb1\x84" => "\xe2\xb0\x94",
508
+		"\xe2\xb1\x85" => "\xe2\xb0\x95", "\xe2\xb1\x86" => "\xe2\xb0\x96", "\xe2\xb1\x87" => "\xe2\xb0\x97", "\xe2\xb1\x88" => "\xe2\xb0\x98",
509
+		"\xe2\xb1\x89" => "\xe2\xb0\x99", "\xe2\xb1\x8a" => "\xe2\xb0\x9a", "\xe2\xb1\x8b" => "\xe2\xb0\x9b", "\xe2\xb1\x8c" => "\xe2\xb0\x9c",
510
+		"\xe2\xb1\x8d" => "\xe2\xb0\x9d", "\xe2\xb1\x8e" => "\xe2\xb0\x9e", "\xe2\xb1\x8f" => "\xe2\xb0\x9f", "\xe2\xb1\x90" => "\xe2\xb0\xa0",
511
+		"\xe2\xb1\x91" => "\xe2\xb0\xa1", "\xe2\xb1\x92" => "\xe2\xb0\xa2", "\xe2\xb1\x93" => "\xe2\xb0\xa3", "\xe2\xb1\x94" => "\xe2\xb0\xa4",
512
+		"\xe2\xb1\x95" => "\xe2\xb0\xa5", "\xe2\xb1\x96" => "\xe2\xb0\xa6", "\xe2\xb1\x97" => "\xe2\xb0\xa7", "\xe2\xb1\x98" => "\xe2\xb0\xa8",
513
+		"\xe2\xb1\x99" => "\xe2\xb0\xa9", "\xe2\xb1\x9a" => "\xe2\xb0\xaa", "\xe2\xb1\x9b" => "\xe2\xb0\xab", "\xe2\xb1\x9c" => "\xe2\xb0\xac",
514
+		"\xe2\xb1\x9d" => "\xe2\xb0\xad", "\xe2\xb1\x9e" => "\xe2\xb0\xae", "\xe2\xb1\xa1" => "\xe2\xb1\xa0", "\xc9\xab" => "\xe2\xb1\xa2",
515
+		"\xe1\xb5\xbd" => "\xe2\xb1\xa3", "\xc9\xbd" => "\xe2\xb1\xa4", "\xe2\xb1\xa8" => "\xe2\xb1\xa7", "\xe2\xb1\xaa" => "\xe2\xb1\xa9",
516
+		"\xe2\xb1\xac" => "\xe2\xb1\xab", "\xe2\xb1\xb6" => "\xe2\xb1\xb5", "\xe2\xb2\x81" => "\xe2\xb2\x80", "\xe2\xb2\x83" => "\xe2\xb2\x82",
517
+		"\xe2\xb2\x85" => "\xe2\xb2\x84", "\xe2\xb2\x87" => "\xe2\xb2\x86", "\xe2\xb2\x89" => "\xe2\xb2\x88", "\xe2\xb2\x8b" => "\xe2\xb2\x8a",
518
+		"\xe2\xb2\x8d" => "\xe2\xb2\x8c", "\xe2\xb2\x8f" => "\xe2\xb2\x8e", "\xe2\xb2\x91" => "\xe2\xb2\x90", "\xe2\xb2\x93" => "\xe2\xb2\x92",
519
+		"\xe2\xb2\x95" => "\xe2\xb2\x94", "\xe2\xb2\x97" => "\xe2\xb2\x96", "\xe2\xb2\x99" => "\xe2\xb2\x98", "\xe2\xb2\x9b" => "\xe2\xb2\x9a",
520
+		"\xe2\xb2\x9d" => "\xe2\xb2\x9c", "\xe2\xb2\x9f" => "\xe2\xb2\x9e", "\xe2\xb2\xa1" => "\xe2\xb2\xa0", "\xe2\xb2\xa3" => "\xe2\xb2\xa2",
521
+		"\xe2\xb2\xa5" => "\xe2\xb2\xa4", "\xe2\xb2\xa7" => "\xe2\xb2\xa6", "\xe2\xb2\xa9" => "\xe2\xb2\xa8", "\xe2\xb2\xab" => "\xe2\xb2\xaa",
522
+		"\xe2\xb2\xad" => "\xe2\xb2\xac", "\xe2\xb2\xaf" => "\xe2\xb2\xae", "\xe2\xb2\xb1" => "\xe2\xb2\xb0", "\xe2\xb2\xb3" => "\xe2\xb2\xb2",
523
+		"\xe2\xb2\xb5" => "\xe2\xb2\xb4", "\xe2\xb2\xb7" => "\xe2\xb2\xb6", "\xe2\xb2\xb9" => "\xe2\xb2\xb8", "\xe2\xb2\xbb" => "\xe2\xb2\xba",
524
+		"\xe2\xb2\xbd" => "\xe2\xb2\xbc", "\xe2\xb2\xbf" => "\xe2\xb2\xbe", "\xe2\xb3\x81" => "\xe2\xb3\x80", "\xe2\xb3\x83" => "\xe2\xb3\x82",
525
+		"\xe2\xb3\x85" => "\xe2\xb3\x84", "\xe2\xb3\x87" => "\xe2\xb3\x86", "\xe2\xb3\x89" => "\xe2\xb3\x88", "\xe2\xb3\x8b" => "\xe2\xb3\x8a",
526
+		"\xe2\xb3\x8d" => "\xe2\xb3\x8c", "\xe2\xb3\x8f" => "\xe2\xb3\x8e", "\xe2\xb3\x91" => "\xe2\xb3\x90", "\xe2\xb3\x93" => "\xe2\xb3\x92",
527
+		"\xe2\xb3\x95" => "\xe2\xb3\x94", "\xe2\xb3\x97" => "\xe2\xb3\x96", "\xe2\xb3\x99" => "\xe2\xb3\x98", "\xe2\xb3\x9b" => "\xe2\xb3\x9a",
528
+		"\xe2\xb3\x9d" => "\xe2\xb3\x9c", "\xe2\xb3\x9f" => "\xe2\xb3\x9e", "\xe2\xb3\xa1" => "\xe2\xb3\xa0", "\xe2\xb3\xa3" => "\xe2\xb3\xa2",
529
+		"ff" => "\xef\xac\x80", "fi" => "\xef\xac\x81", "fl" => "\xef\xac\x82", "ffi" => "\xef\xac\x83",
530
+		"ffl" => "\xef\xac\x84", "st" => "\xef\xac\x85", "st" => "\xef\xac\x86", "\xd5\xb4\xd5\xb6" => "\xef\xac\x93",
531
+		"\xd5\xb4\xd5\xa5" => "\xef\xac\x94", "\xd5\xb4\xd5\xab" => "\xef\xac\x95", "\xd5\xbe\xd5\xb6" => "\xef\xac\x96", "\xd5\xb4\xd5\xad" => "\xef\xac\x97",
532
+		"\xef\xbd\x81" => "\xef\xbc\xa1", "\xef\xbd\x82" => "\xef\xbc\xa2", "\xef\xbd\x83" => "\xef\xbc\xa3", "\xef\xbd\x84" => "\xef\xbc\xa4",
533
+		"\xef\xbd\x85" => "\xef\xbc\xa5", "\xef\xbd\x86" => "\xef\xbc\xa6", "\xef\xbd\x87" => "\xef\xbc\xa7", "\xef\xbd\x88" => "\xef\xbc\xa8",
534
+		"\xef\xbd\x89" => "\xef\xbc\xa9", "\xef\xbd\x8a" => "\xef\xbc\xaa", "\xef\xbd\x8b" => "\xef\xbc\xab", "\xef\xbd\x8c" => "\xef\xbc\xac",
535
+		"\xef\xbd\x8d" => "\xef\xbc\xad", "\xef\xbd\x8e" => "\xef\xbc\xae", "\xef\xbd\x8f" => "\xef\xbc\xaf", "\xef\xbd\x90" => "\xef\xbc\xb0",
536
+		"\xef\xbd\x91" => "\xef\xbc\xb1", "\xef\xbd\x92" => "\xef\xbc\xb2", "\xef\xbd\x93" => "\xef\xbc\xb3", "\xef\xbd\x94" => "\xef\xbc\xb4",
537
+		"\xef\xbd\x95" => "\xef\xbc\xb5", "\xef\xbd\x96" => "\xef\xbc\xb6", "\xef\xbd\x97" => "\xef\xbc\xb7", "\xef\xbd\x98" => "\xef\xbc\xb8",
538
+		"\xef\xbd\x99" => "\xef\xbc\xb9", "\xef\xbd\x9a" => "\xef\xbc\xba", "\xf0\x90\x90\xa8" => "\xf0\x90\x90\x80", "\xf0\x90\x90\xa9" => "\xf0\x90\x90\x81",
539
+		"\xf0\x90\x90\xaa" => "\xf0\x90\x90\x82", "\xf0\x90\x90\xab" => "\xf0\x90\x90\x83", "\xf0\x90\x90\xac" => "\xf0\x90\x90\x84", "\xf0\x90\x90\xad" => "\xf0\x90\x90\x85",
540
+		"\xf0\x90\x90\xae" => "\xf0\x90\x90\x86", "\xf0\x90\x90\xaf" => "\xf0\x90\x90\x87", "\xf0\x90\x90\xb0" => "\xf0\x90\x90\x88", "\xf0\x90\x90\xb1" => "\xf0\x90\x90\x89",
541
+		"\xf0\x90\x90\xb2" => "\xf0\x90\x90\x8a", "\xf0\x90\x90\xb3" => "\xf0\x90\x90\x8b", "\xf0\x90\x90\xb4" => "\xf0\x90\x90\x8c", "\xf0\x90\x90\xb5" => "\xf0\x90\x90\x8d",
542
+		"\xf0\x90\x90\xb6" => "\xf0\x90\x90\x8e", "\xf0\x90\x90\xb7" => "\xf0\x90\x90\x8f", "\xf0\x90\x90\xb8" => "\xf0\x90\x90\x90", "\xf0\x90\x90\xb9" => "\xf0\x90\x90\x91",
543
+		"\xf0\x90\x90\xba" => "\xf0\x90\x90\x92", "\xf0\x90\x90\xbb" => "\xf0\x90\x90\x93", "\xf0\x90\x90\xbc" => "\xf0\x90\x90\x94", "\xf0\x90\x90\xbd" => "\xf0\x90\x90\x95",
544
+		"\xf0\x90\x90\xbe" => "\xf0\x90\x90\x96", "\xf0\x90\x90\xbf" => "\xf0\x90\x90\x97", "\xf0\x90\x91\x80" => "\xf0\x90\x90\x98", "\xf0\x90\x91\x81" => "\xf0\x90\x90\x99",
545
+		"\xf0\x90\x91\x82" => "\xf0\x90\x90\x9a", "\xf0\x90\x91\x83" => "\xf0\x90\x90\x9b", "\xf0\x90\x91\x84" => "\xf0\x90\x90\x9c", "\xf0\x90\x91\x85" => "\xf0\x90\x90\x9d",
546
+		"\xf0\x90\x91\x86" => "\xf0\x90\x90\x9e", "\xf0\x90\x91\x87" => "\xf0\x90\x90\x9f", "\xf0\x90\x91\x88" => "\xf0\x90\x90\xa0", "\xf0\x90\x91\x89" => "\xf0\x90\x90\xa1",
547
+		"\xf0\x90\x91\x8a" => "\xf0\x90\x90\xa2", "\xf0\x90\x91\x8b" => "\xf0\x90\x90\xa3", "\xf0\x90\x91\x8c" => "\xf0\x90\x90\xa4", "\xf0\x90\x91\x8d" => "\xf0\x90\x90\xa5",
548
+		"\xf0\x90\x90\xa6" => "\xf0\x90\x91\x8e", "\xf0\x90\x90\xa7" => "\xf0\x90\x91\x8f",
549 549
 	);
550 550
 
551 551
 	return strtr($string, $case_folding);
Please login to merge, or discard this patch.
Braces   +5 added lines, -3 removed lines patch added patch discarded remove patch
@@ -11,8 +11,9 @@  discard block
 block discarded – undo
11 11
  * @version 2.1 Beta 3
12 12
  */
13 13
 
14
-if (!defined('SMF'))
14
+if (!defined('SMF')) {
15 15
 	die('No direct access...');
16
+}
16 17
 
17 18
 /**
18 19
  * Converts the given UTF-8 string into lowercase.
@@ -569,8 +570,8 @@  discard block
 block discarded – undo
569 570
 	);
570 571
 	while ($row = $smcFunc['db_fetch_assoc']($request))
571 572
 	{
572
-		if (safe_unserialize($row['extra']) === false && preg_match('~^(a:3:{s:5:"topic";i:\d+;s:7:"subject";s:)(\d+):"(.+)"(;s:6:"member";s:5:"\d+";})$~', $row['extra'], $matches) === 1)
573
-			$smcFunc['db_query']('', '
573
+		if (safe_unserialize($row['extra']) === false && preg_match('~^(a:3:{s:5:"topic";i:\d+;s:7:"subject";s:)(\d+):"(.+)"(;s:6:"member";s:5:"\d+";})$~', $row['extra'], $matches) === 1) {
574
+					$smcFunc['db_query']('', '
574 575
 				UPDATE {db_prefix}log_actions
575 576
 				SET extra = {string:extra}
576 577
 				WHERE id_action = {int:current_action}',
@@ -579,6 +580,7 @@  discard block
 block discarded – undo
579 580
 					'extra' => $matches[1] . strlen($matches[3]) . ':"' . $matches[3] . '"' . $matches[4],
580 581
 				)
581 582
 			);
583
+		}
582 584
 	}
583 585
 	$smcFunc['db_free_result']($request);
584 586
 
Please login to merge, or discard this patch.
Sources/Subs-Members.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -586,7 +586,7 @@  discard block
 block discarded – undo
586 586
 		'member_name' => $regOptions['username'],
587 587
 		'email_address' => $regOptions['email'],
588 588
 		'passwd' => hash_password($regOptions['username'], $regOptions['password']),
589
-		'password_salt' => substr(md5(mt_rand()), 0, 4) ,
589
+		'password_salt' => substr(md5(mt_rand()), 0, 4),
590 590
 		'posts' => 0,
591 591
 		'date_registered' => time(),
592 592
 		'member_ip' => $regOptions['interface'] == 'admin' ? '127.0.0.1' : $user_info['ip'],
@@ -676,7 +676,7 @@  discard block
 block discarded – undo
676 676
 		'time_offset',
677 677
 	);
678 678
 	$knownInets = array(
679
-		'member_ip','member_ip2',
679
+		'member_ip', 'member_ip2',
680 680
 	);
681 681
 
682 682
 	// Call an optional function to validate the users' input.
@@ -904,7 +904,7 @@  discard block
 block discarded – undo
904 904
 	$checkName = strtr($name, array('_' => '\\_', '%' => '\\%'));
905 905
 
906 906
 	//when we got no wildcard we can use equal -> fast
907
-	$operator = (strpos($checkName, '%') || strpos($checkName, '_') ? 'LIKE' : '=' );
907
+	$operator = (strpos($checkName, '%') || strpos($checkName, '_') ? 'LIKE' : '=');
908 908
 
909 909
 	// Make sure they don't want someone else's name.
910 910
 	$request = $smcFunc['db_query']('', '
@@ -1273,7 +1273,7 @@  discard block
 block discarded – undo
1273 1273
 		$user_info['buddies'][] = $userReceiver;
1274 1274
 
1275 1275
 		// And add a nice alert. Don't abuse though!
1276
-		if ((cache_get_data('Buddy-sent-'. $user_info['id'] .'-'. $userReceiver, 86400)) == null)
1276
+		if ((cache_get_data('Buddy-sent-' . $user_info['id'] . '-' . $userReceiver, 86400)) == null)
1277 1277
 		{
1278 1278
 			$smcFunc['db_insert']('insert',
1279 1279
 				'{db_prefix}background_tasks',
@@ -1288,7 +1288,7 @@  discard block
 block discarded – undo
1288 1288
 			);
1289 1289
 
1290 1290
 			// Store this in a cache entry to avoid creating multiple alerts. Give it a long life cycle.
1291
-			cache_put_data('Buddy-sent-'. $user_info['id'] .'-'. $userReceiver, '1', 86400);
1291
+			cache_put_data('Buddy-sent-' . $user_info['id'] . '-' . $userReceiver, '1', 86400);
1292 1292
 		}
1293 1293
 	}
1294 1294
 
Please login to merge, or discard this patch.
Braces   +208 added lines, -151 removed lines patch added patch discarded remove patch
@@ -13,8 +13,9 @@  discard block
 block discarded – undo
13 13
  * @version 2.1 Beta 3
14 14
  */
15 15
 
16
-if (!defined('SMF'))
16
+if (!defined('SMF')) {
17 17
 	die('No direct access...');
18
+}
18 19
 
19 20
 /**
20 21
  * Delete one or more members.
@@ -43,30 +44,32 @@  discard block
 block discarded – undo
43 44
 	setMemoryLimit('128M');
44 45
 
45 46
 	// If it's not an array, make it so!
46
-	if (!is_array($users))
47
-		$users = array($users);
48
-	else
49
-		$users = array_unique($users);
47
+	if (!is_array($users)) {
48
+			$users = array($users);
49
+	} else {
50
+			$users = array_unique($users);
51
+	}
50 52
 
51 53
 	// Make sure there's no void user in here.
52 54
 	$users = array_diff($users, array(0));
53 55
 
54 56
 	// How many are they deleting?
55
-	if (empty($users))
56
-		return;
57
-	elseif (count($users) == 1)
57
+	if (empty($users)) {
58
+			return;
59
+	} elseif (count($users) == 1)
58 60
 	{
59 61
 		list ($user) = $users;
60 62
 
61
-		if ($user == $user_info['id'])
62
-			isAllowedTo('profile_remove_own');
63
-		else
64
-			isAllowedTo('profile_remove_any');
65
-	}
66
-	else
63
+		if ($user == $user_info['id']) {
64
+					isAllowedTo('profile_remove_own');
65
+		} else {
66
+					isAllowedTo('profile_remove_any');
67
+		}
68
+	} else
67 69
 	{
68
-		foreach ($users as $k => $v)
69
-			$users[$k] = (int) $v;
70
+		foreach ($users as $k => $v) {
71
+					$users[$k] = (int) $v;
72
+		}
70 73
 
71 74
 		// Deleting more than one?  You can't have more than one account...
72 75
 		isAllowedTo('profile_remove_any');
@@ -88,26 +91,30 @@  discard block
 block discarded – undo
88 91
 	$user_log_details = array();
89 92
 	while ($row = $smcFunc['db_fetch_assoc']($request))
90 93
 	{
91
-		if ($row['is_admin'])
92
-			$admins[] = $row['id_member'];
94
+		if ($row['is_admin']) {
95
+					$admins[] = $row['id_member'];
96
+		}
93 97
 		$user_log_details[$row['id_member']] = array($row['id_member'], $row['member_name']);
94 98
 	}
95 99
 	$smcFunc['db_free_result']($request);
96 100
 
97
-	if (empty($user_log_details))
98
-		return;
101
+	if (empty($user_log_details)) {
102
+			return;
103
+	}
99 104
 
100 105
 	// Make sure they aren't trying to delete administrators if they aren't one.  But don't bother checking if it's just themself.
101 106
 	if (!empty($admins) && ($check_not_admin || (!allowedTo('admin_forum') && (count($users) != 1 || $users[0] != $user_info['id']))))
102 107
 	{
103 108
 		$users = array_diff($users, $admins);
104
-		foreach ($admins as $id)
105
-			unset($user_log_details[$id]);
109
+		foreach ($admins as $id) {
110
+					unset($user_log_details[$id]);
111
+		}
106 112
 	}
107 113
 
108 114
 	// No one left?
109
-	if (empty($users))
110
-		return;
115
+	if (empty($users)) {
116
+			return;
117
+	}
111 118
 
112 119
 	// Log the action - regardless of who is deleting it.
113 120
 	$log_changes = array();
@@ -124,8 +131,9 @@  discard block
 block discarded – undo
124 131
 		);
125 132
 
126 133
 		// Remove any cached data if enabled.
127
-		if (!empty($modSettings['cache_enable']) && $modSettings['cache_enable'] >= 2)
128
-			cache_put_data('user_settings-' . $user[0], null, 60);
134
+		if (!empty($modSettings['cache_enable']) && $modSettings['cache_enable'] >= 2) {
135
+					cache_put_data('user_settings-' . $user[0], null, 60);
136
+		}
129 137
 	}
130 138
 
131 139
 	// Make these peoples' posts guest posts.
@@ -388,8 +396,8 @@  discard block
 block discarded – undo
388 396
 			'buddy_list' => implode(', buddy_list) != 0 OR FIND_IN_SET(', $users),
389 397
 		)
390 398
 	);
391
-	while ($row = $smcFunc['db_fetch_assoc']($request))
392
-		$smcFunc['db_query']('', '
399
+	while ($row = $smcFunc['db_fetch_assoc']($request)) {
400
+			$smcFunc['db_query']('', '
393 401
 			UPDATE {db_prefix}members
394 402
 			SET
395 403
 				pm_ignore_list = {string:pm_ignore_list},
@@ -401,6 +409,7 @@  discard block
 block discarded – undo
401 409
 				'buddy_list' => implode(',', array_diff(explode(',', $row['buddy_list']), $users)),
402 410
 			)
403 411
 		);
412
+	}
404 413
 	$smcFunc['db_free_result']($request);
405 414
 
406 415
 	// Make sure no member's birthday is still sticking in the calendar...
@@ -455,29 +464,34 @@  discard block
 block discarded – undo
455 464
 	elseif ($regOptions['interface'] == 'guest')
456 465
 	{
457 466
 		// You cannot register twice...
458
-		if (empty($user_info['is_guest']))
459
-			redirectexit();
467
+		if (empty($user_info['is_guest'])) {
468
+					redirectexit();
469
+		}
460 470
 
461 471
 		// Make sure they didn't just register with this session.
462
-		if (!empty($_SESSION['just_registered']) && empty($modSettings['disableRegisterCheck']))
463
-			fatal_lang_error('register_only_once', false);
472
+		if (!empty($_SESSION['just_registered']) && empty($modSettings['disableRegisterCheck'])) {
473
+					fatal_lang_error('register_only_once', false);
474
+		}
464 475
 	}
465 476
 
466 477
 	// Spaces and other odd characters are evil...
467 478
 	$regOptions['username'] = trim(preg_replace('~[\t\n\r \x0B\0' . ($context['utf8'] ? '\x{A0}\x{AD}\x{2000}-\x{200F}\x{201F}\x{202F}\x{3000}\x{FEFF}' : '\x00-\x08\x0B\x0C\x0E-\x19\xA0') . ']+~' . ($context['utf8'] ? 'u' : ''), ' ', $regOptions['username']));
468 479
 
469 480
 	// @todo Separate the sprintf?
470
-	if (empty($regOptions['email']) || !filter_var($regOptions['email'], FILTER_VALIDATE_EMAIL) || strlen($regOptions['email']) > 255)
471
-		$reg_errors[] = array('lang', 'profile_error_bad_email');
481
+	if (empty($regOptions['email']) || !filter_var($regOptions['email'], FILTER_VALIDATE_EMAIL) || strlen($regOptions['email']) > 255) {
482
+			$reg_errors[] = array('lang', 'profile_error_bad_email');
483
+	}
472 484
 
473 485
 	$username_validation_errors = validateUsername(0, $regOptions['username'], true, !empty($regOptions['check_reserved_name']));
474
-	if (!empty($username_validation_errors))
475
-		$reg_errors = array_merge($reg_errors, $username_validation_errors);
486
+	if (!empty($username_validation_errors)) {
487
+			$reg_errors = array_merge($reg_errors, $username_validation_errors);
488
+	}
476 489
 
477 490
 	// Generate a validation code if it's supposed to be emailed.
478 491
 	$validation_code = '';
479
-	if ($regOptions['require'] == 'activation')
480
-		$validation_code = generateValidationCode();
492
+	if ($regOptions['require'] == 'activation') {
493
+			$validation_code = generateValidationCode();
494
+	}
481 495
 
482 496
 	// If you haven't put in a password generate one.
483 497
 	if ($regOptions['interface'] == 'admin' && $regOptions['password'] == '')
@@ -487,8 +501,9 @@  discard block
 block discarded – undo
487 501
 		$regOptions['password_check'] = $regOptions['password'];
488 502
 	}
489 503
 	// Does the first password match the second?
490
-	elseif ($regOptions['password'] != $regOptions['password_check'])
491
-		$reg_errors[] = array('lang', 'passwords_dont_match');
504
+	elseif ($regOptions['password'] != $regOptions['password_check']) {
505
+			$reg_errors[] = array('lang', 'passwords_dont_match');
506
+	}
492 507
 
493 508
 	// That's kind of easy to guess...
494 509
 	if ($regOptions['password'] == '')
@@ -502,13 +517,15 @@  discard block
 block discarded – undo
502 517
 		$passwordError = validatePassword($regOptions['password'], $regOptions['username'], array($regOptions['email']));
503 518
 
504 519
 		// Password isn't legal?
505
-		if ($passwordError != null)
506
-			$reg_errors[] = array('lang', 'profile_error_password_' . $passwordError);
520
+		if ($passwordError != null) {
521
+					$reg_errors[] = array('lang', 'profile_error_password_' . $passwordError);
522
+		}
507 523
 	}
508 524
 
509 525
 	// You may not be allowed to register this email.
510
-	if (!empty($regOptions['check_email_ban']))
511
-		isBannedEmail($regOptions['email'], 'cannot_register', $txt['ban_register_prohibited']);
526
+	if (!empty($regOptions['check_email_ban'])) {
527
+			isBannedEmail($regOptions['email'], 'cannot_register', $txt['ban_register_prohibited']);
528
+	}
512 529
 
513 530
 	// Check if the email address is in use.
514 531
 	$request = $smcFunc['db_query']('', '
@@ -523,8 +540,9 @@  discard block
 block discarded – undo
523 540
 		)
524 541
 	);
525 542
 	// @todo Separate the sprintf?
526
-	if ($smcFunc['db_num_rows']($request) != 0)
527
-		$reg_errors[] = array('lang', 'email_in_use', false, array($smcFunc['htmlspecialchars']($regOptions['email'])));
543
+	if ($smcFunc['db_num_rows']($request) != 0) {
544
+			$reg_errors[] = array('lang', 'email_in_use', false, array($smcFunc['htmlspecialchars']($regOptions['email'])));
545
+	}
528 546
 
529 547
 	$smcFunc['db_free_result']($request);
530 548
 
@@ -539,24 +557,27 @@  discard block
 block discarded – undo
539 557
 			1 = The text/index.
540 558
 			2 = Whether to log.
541 559
 			3 = sprintf data if necessary. */
542
-		if ($error[0] == 'lang')
543
-			loadLanguage('Errors');
560
+		if ($error[0] == 'lang') {
561
+					loadLanguage('Errors');
562
+		}
544 563
 		$message = $error[0] == 'lang' ? (empty($error[3]) ? $txt[$error[1]] : vsprintf($txt[$error[1]], $error[3])) : $error[1];
545 564
 
546 565
 		// What to do, what to do, what to do.
547 566
 		if ($return_errors)
548 567
 		{
549
-			if (!empty($error[2]))
550
-				log_error($message, $error[2]);
568
+			if (!empty($error[2])) {
569
+							log_error($message, $error[2]);
570
+			}
551 571
 			$reg_errors[$key] = $message;
572
+		} else {
573
+					fatal_error($message, empty($error[2]) ? false : $error[2]);
552 574
 		}
553
-		else
554
-			fatal_error($message, empty($error[2]) ? false : $error[2]);
555 575
 	}
556 576
 
557 577
 	// If there's any errors left return them at once!
558
-	if (!empty($reg_errors))
559
-		return $reg_errors;
578
+	if (!empty($reg_errors)) {
579
+			return $reg_errors;
580
+	}
560 581
 
561 582
 	$reservedVars = array(
562 583
 		'actual_theme_url',
@@ -578,8 +599,9 @@  discard block
 block discarded – undo
578 599
 	);
579 600
 
580 601
 	// Can't change reserved vars.
581
-	if (isset($regOptions['theme_vars']) && count(array_intersect(array_keys($regOptions['theme_vars']), $reservedVars)) != 0)
582
-		fatal_lang_error('no_theme');
602
+	if (isset($regOptions['theme_vars']) && count(array_intersect(array_keys($regOptions['theme_vars']), $reservedVars)) != 0) {
603
+			fatal_lang_error('no_theme');
604
+	}
583 605
 
584 606
 	// Some of these might be overwritten. (the lower ones that are in the arrays below.)
585 607
 	$regOptions['register_vars'] = array(
@@ -621,14 +643,17 @@  discard block
 block discarded – undo
621 643
 		$regOptions['register_vars']['validation_code'] = '';
622 644
 	}
623 645
 	// Maybe it can be activated right away?
624
-	elseif ($regOptions['require'] == 'nothing')
625
-		$regOptions['register_vars']['is_activated'] = 1;
646
+	elseif ($regOptions['require'] == 'nothing') {
647
+			$regOptions['register_vars']['is_activated'] = 1;
648
+	}
626 649
 	// Maybe it must be activated by email?
627
-	elseif ($regOptions['require'] == 'activation')
628
-		$regOptions['register_vars']['is_activated'] = 0;
650
+	elseif ($regOptions['require'] == 'activation') {
651
+			$regOptions['register_vars']['is_activated'] = 0;
652
+	}
629 653
 	// Otherwise it must be awaiting approval!
630
-	else
631
-		$regOptions['register_vars']['is_activated'] = 3;
654
+	else {
655
+			$regOptions['register_vars']['is_activated'] = 3;
656
+	}
632 657
 
633 658
 	if (isset($regOptions['memberGroup']))
634 659
 	{
@@ -647,24 +672,28 @@  discard block
 block discarded – undo
647 672
 				'is_protected' => 1,
648 673
 			)
649 674
 		);
650
-		while ($row = $smcFunc['db_fetch_assoc']($request))
651
-			$unassignableGroups[] = $row['id_group'];
675
+		while ($row = $smcFunc['db_fetch_assoc']($request)) {
676
+					$unassignableGroups[] = $row['id_group'];
677
+		}
652 678
 		$smcFunc['db_free_result']($request);
653 679
 
654
-		if (in_array($regOptions['register_vars']['id_group'], $unassignableGroups))
655
-			$regOptions['register_vars']['id_group'] = 0;
680
+		if (in_array($regOptions['register_vars']['id_group'], $unassignableGroups)) {
681
+					$regOptions['register_vars']['id_group'] = 0;
682
+		}
656 683
 	}
657 684
 
658 685
 	// Integrate optional member settings to be set.
659
-	if (!empty($regOptions['extra_register_vars']))
660
-		foreach ($regOptions['extra_register_vars'] as $var => $value)
686
+	if (!empty($regOptions['extra_register_vars'])) {
687
+			foreach ($regOptions['extra_register_vars'] as $var => $value)
661 688
 			$regOptions['register_vars'][$var] = $value;
689
+	}
662 690
 
663 691
 	// Integrate optional user theme options to be set.
664 692
 	$theme_vars = array();
665
-	if (!empty($regOptions['theme_vars']))
666
-		foreach ($regOptions['theme_vars'] as $var => $value)
693
+	if (!empty($regOptions['theme_vars'])) {
694
+			foreach ($regOptions['theme_vars'] as $var => $value)
667 695
 			$theme_vars[$var] = $value;
696
+	}
668 697
 
669 698
 	// Right, now let's prepare for insertion.
670 699
 	$knownInts = array(
@@ -687,14 +716,15 @@  discard block
 block discarded – undo
687 716
 	foreach ($regOptions['register_vars'] as $var => $val)
688 717
 	{
689 718
 		$type = 'string';
690
-		if (in_array($var, $knownInts))
691
-			$type = 'int';
692
-		elseif (in_array($var, $knownFloats))
693
-			$type = 'float';
694
-		elseif (in_array($var, $knownInets))
695
-			$type = 'inet';
696
-		elseif ($var == 'birthdate')
697
-			$type = 'date';
719
+		if (in_array($var, $knownInts)) {
720
+					$type = 'int';
721
+		} elseif (in_array($var, $knownFloats)) {
722
+					$type = 'float';
723
+		} elseif (in_array($var, $knownInets)) {
724
+					$type = 'inet';
725
+		} elseif ($var == 'birthdate') {
726
+					$type = 'date';
727
+		}
698 728
 
699 729
 		$column_names[$var] = $type;
700 730
 		$values[$var] = $val;
@@ -713,17 +743,19 @@  discard block
 block discarded – undo
713 743
 	call_integration_hook('integrate_post_register', array(&$regOptions, &$theme_vars, &$memberID));
714 744
 
715 745
 	// Update the number of members and latest member's info - and pass the name, but remove the 's.
716
-	if ($regOptions['register_vars']['is_activated'] == 1)
717
-		updateStats('member', $memberID, $regOptions['register_vars']['real_name']);
718
-	else
719
-		updateStats('member');
746
+	if ($regOptions['register_vars']['is_activated'] == 1) {
747
+			updateStats('member', $memberID, $regOptions['register_vars']['real_name']);
748
+	} else {
749
+			updateStats('member');
750
+	}
720 751
 
721 752
 	// Theme variables too?
722 753
 	if (!empty($theme_vars))
723 754
 	{
724 755
 		$inserts = array();
725
-		foreach ($theme_vars as $var => $val)
726
-			$inserts[] = array($memberID, $var, $val);
756
+		foreach ($theme_vars as $var => $val) {
757
+					$inserts[] = array($memberID, $var, $val);
758
+		}
727 759
 		$smcFunc['db_insert']('insert',
728 760
 			'{db_prefix}themes',
729 761
 			array('id_member' => 'int', 'variable' => 'string-255', 'value' => 'string-65534'),
@@ -738,10 +770,11 @@  discard block
 block discarded – undo
738 770
 	// Administrative registrations are a bit different...
739 771
 	if ($regOptions['interface'] == 'admin')
740 772
 	{
741
-		if ($regOptions['require'] == 'activation')
742
-			$email_message = 'admin_register_activate';
743
-		elseif (!empty($regOptions['send_welcome_email']))
744
-			$email_message = 'admin_register_immediate';
773
+		if ($regOptions['require'] == 'activation') {
774
+					$email_message = 'admin_register_activate';
775
+		} elseif (!empty($regOptions['send_welcome_email'])) {
776
+					$email_message = 'admin_register_immediate';
777
+		}
745 778
 
746 779
 		if (isset($email_message))
747 780
 		{
@@ -792,16 +825,17 @@  discard block
 block discarded – undo
792 825
 			'FORGOTPASSWORDLINK' => $scripturl . '?action=reminder',
793 826
 		);
794 827
 
795
-		if ($regOptions['require'] == 'activation')
796
-			$replacements += array(
828
+		if ($regOptions['require'] == 'activation') {
829
+					$replacements += array(
797 830
 				'ACTIVATIONLINK' => $scripturl . '?action=activate;u=' . $memberID . ';code=' . $validation_code,
798 831
 				'ACTIVATIONLINKWITHOUTCODE' => $scripturl . '?action=activate;u=' . $memberID,
799 832
 				'ACTIVATIONCODE' => $validation_code,
800 833
 			);
801
-		else
802
-			$replacements += array(
834
+		} else {
835
+					$replacements += array(
803 836
 				'COPPALINK' => $scripturl . '?action=coppa;u=' . $memberID,
804 837
 			);
838
+		}
805 839
 
806 840
 		$emaildata = loadEmailTemplate('register_' . ($regOptions['require'] == 'activation' ? 'activate' : 'coppa'), $replacements);
807 841
 
@@ -866,39 +900,45 @@  discard block
 block discarded – undo
866 900
 		// Check each name in the list...
867 901
 		foreach ($reservedNames as $reserved)
868 902
 		{
869
-			if ($reserved == '')
870
-				continue;
903
+			if ($reserved == '') {
904
+							continue;
905
+			}
871 906
 
872 907
 			// The admin might've used entities too, level the playing field.
873 908
 			$reservedCheck = preg_replace('~(&#(\d{1,7}|x[0-9a-fA-F]{1,6});)~', 'replaceEntities__callback', $reserved);
874 909
 
875 910
 			// Case sensitive name?
876
-			if (empty($modSettings['reserveCase']))
877
-				$reservedCheck = $smcFunc['strtolower']($reservedCheck);
911
+			if (empty($modSettings['reserveCase'])) {
912
+							$reservedCheck = $smcFunc['strtolower']($reservedCheck);
913
+			}
878 914
 
879 915
 			// If it's not just entire word, check for it in there somewhere...
880
-			if ($checkMe == $reservedCheck || ($smcFunc['strpos']($checkMe, $reservedCheck) !== false && empty($modSettings['reserveWord'])))
881
-				if ($fatal)
916
+			if ($checkMe == $reservedCheck || ($smcFunc['strpos']($checkMe, $reservedCheck) !== false && empty($modSettings['reserveWord']))) {
917
+							if ($fatal)
882 918
 					fatal_lang_error('username_reserved', 'password', array($reserved));
883
-				else
884
-					return true;
919
+			} else {
920
+									return true;
921
+				}
885 922
 		}
886 923
 
887 924
 		$censor_name = $name;
888
-		if (censorText($censor_name) != $name)
889
-			if ($fatal)
925
+		if (censorText($censor_name) != $name) {
926
+					if ($fatal)
890 927
 				fatal_lang_error('name_censored', 'password', array($name));
891
-			else
892
-				return true;
928
+		} else {
929
+							return true;
930
+			}
893 931
 	}
894 932
 
895 933
 	// Characters we just shouldn't allow, regardless.
896
-	foreach (array('*') as $char)
897
-		if (strpos($checkName, $char) !== false)
934
+	foreach (array('*') as $char) {
935
+			if (strpos($checkName, $char) !== false)
898 936
 			if ($fatal)
899 937
 				fatal_lang_error('username_reserved', 'password', array($char));
900
-			else
901
-				return true;
938
+	}
939
+			else {
940
+							return true;
941
+			}
902 942
 
903 943
 	// Get rid of any SQL parts of the reserved name...
904 944
 	$checkName = strtr($name, array('_' => '\\_', '%' => '\\%'));
@@ -980,8 +1020,9 @@  discard block
 block discarded – undo
980 1020
 				'permission' => $permission,
981 1021
 			)
982 1022
 		);
983
-		while ($row = $smcFunc['db_fetch_assoc']($request))
984
-			$member_groups[$row['add_deny'] === '1' ? 'allowed' : 'denied'][] = $row['id_group'];
1023
+		while ($row = $smcFunc['db_fetch_assoc']($request)) {
1024
+					$member_groups[$row['add_deny'] === '1' ? 'allowed' : 'denied'][] = $row['id_group'];
1025
+		}
985 1026
 		$smcFunc['db_free_result']($request);
986 1027
 	}
987 1028
 
@@ -989,9 +1030,9 @@  discard block
 block discarded – undo
989 1030
 	else
990 1031
 	{
991 1032
 		// First get the profile of the given board.
992
-		if (isset($board_info['id']) && $board_info['id'] == $board_id)
993
-			$profile_id = $board_info['profile'];
994
-		elseif ($board_id !== 0)
1033
+		if (isset($board_info['id']) && $board_info['id'] == $board_id) {
1034
+					$profile_id = $board_info['profile'];
1035
+		} elseif ($board_id !== 0)
995 1036
 		{
996 1037
 			$request = $smcFunc['db_query']('', '
997 1038
 				SELECT id_profile
@@ -1002,13 +1043,14 @@  discard block
 block discarded – undo
1002 1043
 					'id_board' => $board_id,
1003 1044
 				)
1004 1045
 			);
1005
-			if ($smcFunc['db_num_rows']($request) == 0)
1006
-				fatal_lang_error('no_board');
1046
+			if ($smcFunc['db_num_rows']($request) == 0) {
1047
+							fatal_lang_error('no_board');
1048
+			}
1007 1049
 			list ($profile_id) = $smcFunc['db_fetch_row']($request);
1008 1050
 			$smcFunc['db_free_result']($request);
1051
+		} else {
1052
+					$profile_id = 1;
1009 1053
 		}
1010
-		else
1011
-			$profile_id = 1;
1012 1054
 
1013 1055
 		$request = $smcFunc['db_query']('', '
1014 1056
 			SELECT bp.id_group, bp.add_deny
@@ -1020,8 +1062,9 @@  discard block
 block discarded – undo
1020 1062
 				'permission' => $permission,
1021 1063
 			)
1022 1064
 		);
1023
-		while ($row = $smcFunc['db_fetch_assoc']($request))
1024
-			$member_groups[$row['add_deny'] === '1' ? 'allowed' : 'denied'][] = $row['id_group'];
1065
+		while ($row = $smcFunc['db_fetch_assoc']($request)) {
1066
+					$member_groups[$row['add_deny'] === '1' ? 'allowed' : 'denied'][] = $row['id_group'];
1067
+		}
1025 1068
 		$smcFunc['db_free_result']($request);
1026 1069
 
1027 1070
 		$moderator_groups = array();
@@ -1030,8 +1073,7 @@  discard block
 block discarded – undo
1030 1073
 		if (isset($board_info['moderator_groups']))
1031 1074
 		{
1032 1075
 			$moderator_groups = array_keys($board_info['moderator_groups']);
1033
-		}
1034
-		elseif ($board_id !== 0)
1076
+		} elseif ($board_id !== 0)
1035 1077
 		{
1036 1078
 			// Get the groups that can moderate this board
1037 1079
 			$request = $smcFunc['db_query']('', '
@@ -1116,8 +1158,9 @@  discard block
 block discarded – undo
1116 1158
 		)
1117 1159
 	);
1118 1160
 	$members = array();
1119
-	while ($row = $smcFunc['db_fetch_assoc']($request))
1120
-		$members[] = $row['id_member'];
1161
+	while ($row = $smcFunc['db_fetch_assoc']($request)) {
1162
+			$members[] = $row['id_member'];
1163
+	}
1121 1164
 	$smcFunc['db_free_result']($request);
1122 1165
 
1123 1166
 	return $members;
@@ -1190,10 +1233,12 @@  discard block
 block discarded – undo
1190 1233
 	}
1191 1234
 
1192 1235
 	$query_parts = array();
1193
-	if (!empty($email))
1194
-		$query_parts[] = 'poster_email = {string:email_address}';
1195
-	if (!empty($membername))
1196
-		$query_parts[] = 'poster_name = {string:member_name}';
1236
+	if (!empty($email)) {
1237
+			$query_parts[] = 'poster_email = {string:email_address}';
1238
+	}
1239
+	if (!empty($membername)) {
1240
+			$query_parts[] = 'poster_name = {string:member_name}';
1241
+	}
1197 1242
 	$query = implode(' AND ', $query_parts);
1198 1243
 
1199 1244
 	// Finally, update the posts themselves!
@@ -1260,12 +1305,14 @@  discard block
 block discarded – undo
1260 1305
 
1261 1306
 	$userReceiver = (int) !empty($_REQUEST['u']) ? $_REQUEST['u'] : 0;
1262 1307
 
1263
-	if (empty($userReceiver))
1264
-		fatal_lang_error('no_access', false);
1308
+	if (empty($userReceiver)) {
1309
+			fatal_lang_error('no_access', false);
1310
+	}
1265 1311
 
1266 1312
 	// Remove if it's already there...
1267
-	if (in_array($userReceiver, $user_info['buddies']))
1268
-		$user_info['buddies'] = array_diff($user_info['buddies'], array($userReceiver));
1313
+	if (in_array($userReceiver, $user_info['buddies'])) {
1314
+			$user_info['buddies'] = array_diff($user_info['buddies'], array($userReceiver));
1315
+	}
1269 1316
 
1270 1317
 	// ...or add if it's not and if it's not you.
1271 1318
 	elseif ($user_info['id'] != $userReceiver)
@@ -1340,8 +1387,9 @@  discard block
 block discarded – undo
1340 1387
 	$smcFunc['db_free_result']($request);
1341 1388
 
1342 1389
 	// If we want duplicates pass the members array off.
1343
-	if ($get_duplicates)
1344
-		populateDuplicateMembers($members);
1390
+	if ($get_duplicates) {
1391
+			populateDuplicateMembers($members);
1392
+	}
1345 1393
 
1346 1394
 	return $members;
1347 1395
 }
@@ -1358,8 +1406,9 @@  discard block
 block discarded – undo
1358 1406
 	global $smcFunc, $modSettings;
1359 1407
 
1360 1408
 	// We know how many members there are in total.
1361
-	if (empty($where) || $where == '1=1')
1362
-		$num_members = $modSettings['totalMembers'];
1409
+	if (empty($where) || $where == '1=1') {
1410
+			$num_members = $modSettings['totalMembers'];
1411
+	}
1363 1412
 
1364 1413
 	// The database knows the amount when there are extra conditions.
1365 1414
 	else
@@ -1395,16 +1444,19 @@  discard block
 block discarded – undo
1395 1444
 		$members[$key]['duplicate_members'] = array();
1396 1445
 
1397 1446
 		// Store the IPs.
1398
-		if (!empty($member['member_ip']))
1399
-			$ips[] = $member['member_ip'];
1400
-		if (!empty($member['member_ip2']))
1401
-			$ips[] = $member['member_ip2'];
1447
+		if (!empty($member['member_ip'])) {
1448
+					$ips[] = $member['member_ip'];
1449
+		}
1450
+		if (!empty($member['member_ip2'])) {
1451
+					$ips[] = $member['member_ip2'];
1452
+		}
1402 1453
 	}
1403 1454
 
1404 1455
 	$ips = array_unique($ips);
1405 1456
 
1406
-	if (empty($ips))
1407
-		return false;
1457
+	if (empty($ips)) {
1458
+			return false;
1459
+	}
1408 1460
 
1409 1461
 	// Fetch all members with this IP address, we'll filter out the current ones in a sec.
1410 1462
 	$request = $smcFunc['db_query']('', '
@@ -1434,10 +1486,12 @@  discard block
 block discarded – undo
1434 1486
 			'ip2' => $row['member_ip2'],
1435 1487
 		);
1436 1488
 
1437
-		if (in_array($row['member_ip'], $ips))
1438
-			$duplicate_members[$row['member_ip']][] = $member_context;
1439
-		if ($row['member_ip'] != $row['member_ip2'] && in_array($row['member_ip2'], $ips))
1440
-			$duplicate_members[$row['member_ip2']][] = $member_context;
1489
+		if (in_array($row['member_ip'], $ips)) {
1490
+					$duplicate_members[$row['member_ip']][] = $member_context;
1491
+		}
1492
+		if ($row['member_ip'] != $row['member_ip2'] && in_array($row['member_ip2'], $ips)) {
1493
+					$duplicate_members[$row['member_ip2']][] = $member_context;
1494
+		}
1441 1495
 	}
1442 1496
 	$smcFunc['db_free_result']($request);
1443 1497
 
@@ -1462,8 +1516,9 @@  discard block
 block discarded – undo
1462 1516
 		$row['poster_ip'] = inet_dtop($row['poster_ip']);
1463 1517
 
1464 1518
 		// Don't collect lots of the same.
1465
-		if (isset($had_ips[$row['poster_ip']]) && in_array($row['id_member'], $had_ips[$row['poster_ip']]))
1466
-			continue;
1519
+		if (isset($had_ips[$row['poster_ip']]) && in_array($row['id_member'], $had_ips[$row['poster_ip']])) {
1520
+					continue;
1521
+		}
1467 1522
 		$had_ips[$row['poster_ip']][] = $row['id_member'];
1468 1523
 
1469 1524
 		$duplicate_members[$row['poster_ip']][] = array(
@@ -1478,13 +1533,15 @@  discard block
 block discarded – undo
1478 1533
 	$smcFunc['db_free_result']($request);
1479 1534
 
1480 1535
 	// Now we have all the duplicate members, stick them with their respective member in the list.
1481
-	if (!empty($duplicate_members))
1482
-		foreach ($members as $key => $member)
1536
+	if (!empty($duplicate_members)) {
1537
+			foreach ($members as $key => $member)
1483 1538
 		{
1484 1539
 			if (isset($duplicate_members[$member['member_ip']]))
1485 1540
 				$members[$key]['duplicate_members'] = $duplicate_members[$member['member_ip']];
1486
-			if ($member['member_ip'] != $member['member_ip2'] && isset($duplicate_members[$member['member_ip2']]))
1487
-				$members[$key]['duplicate_members'] = array_merge($member['duplicate_members'], $duplicate_members[$member['member_ip2']]);
1541
+	}
1542
+			if ($member['member_ip'] != $member['member_ip2'] && isset($duplicate_members[$member['member_ip2']])) {
1543
+							$members[$key]['duplicate_members'] = array_merge($member['duplicate_members'], $duplicate_members[$member['member_ip2']]);
1544
+			}
1488 1545
 
1489 1546
 			// Check we don't have lots of the same member.
1490 1547
 			$member_track = array($member['id_member']);
Please login to merge, or discard this patch.