Completed
Push — release-2.1 ( 72357d...5fd6f8 )
by Michael
22s
created
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 4
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.
@@ -575,8 +576,8 @@  discard block
 block discarded – undo
575 576
 		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)
576 577
 		{
577 578
 			$temp = $matches[1] . strlen($matches[3]) . ':"' . $matches[3] . '"' . $matches[4];
578
-			if (safe_unserialize($temp) !== false)
579
-				$smcFunc['db_query']('', '
579
+			if (safe_unserialize($temp) !== false) {
580
+							$smcFunc['db_query']('', '
580 581
 					UPDATE {db_prefix}log_actions
581 582
 					SET extra = {string:extra}
582 583
 					WHERE id_action = {int:current_action}',
@@ -585,6 +586,7 @@  discard block
 block discarded – undo
585 586
 						'extra' => $smcFunc['json_encode'](safe_unserialize($temp)),
586 587
 					)
587 588
 				);
589
+			}
588 590
 		}
589 591
 	}
590 592
 	$smcFunc['db_free_result']($request);
Please login to merge, or discard this patch.
Sources/CacheAPI-memcached.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
 		$currentServers = $this->memcached->getServerList();
55 55
 		foreach ($servers as $server)
56 56
 		{
57
-			if (strpos($server,'/') !== false)
57
+			if (strpos($server, '/') !== false)
58 58
 				$tempServer = array($server, 0);
59 59
 			else
60 60
 			{
Please login to merge, or discard this patch.
Braces   +17 added lines, -12 removed lines patch added patch discarded remove patch
@@ -11,8 +11,9 @@  discard block
 block discarded – undo
11 11
  * @version 2.1 Beta 4
12 12
  */
13 13
 
14
-if (!defined('SMF'))
14
+if (!defined('SMF')) {
15 15
 	die('Hacking attempt...');
16
+}
16 17
 
17 18
 /**
18 19
  * Our Cache API class
@@ -34,8 +35,9 @@  discard block
 block discarded – undo
34 35
 
35 36
 		$supported = class_exists('memcached');
36 37
 
37
-		if ($test)
38
-			return $supported;
38
+		if ($test) {
39
+					return $supported;
40
+		}
39 41
 		return parent::isSupported() && $supported && !empty($cache_memcached);
40 42
 	}
41 43
 
@@ -53,9 +55,9 @@  discard block
 block discarded – undo
53 55
 		$currentServers = $this->memcached->getServerList();
54 56
 		foreach ($servers as $server)
55 57
 		{
56
-			if (strpos($server,'/') !== false)
57
-				$tempServer = array($server, 0);
58
-			else
58
+			if (strpos($server,'/') !== false) {
59
+							$tempServer = array($server, 0);
60
+			} else
59 61
 			{
60 62
 				$server = explode(':', $server);
61 63
 				$tempServer = array($server[0], isset($server[1]) ? $server[1] : 11211);
@@ -73,8 +75,9 @@  discard block
 block discarded – undo
73 75
 			}
74 76
 
75 77
 			// Found it?
76
-			if (empty($foundServer))
77
-				$this->memcached->addServer($tempServer[0], $tempServer[1]);
78
+			if (empty($foundServer)) {
79
+							$this->memcached->addServer($tempServer[0], $tempServer[1]);
80
+			}
78 81
 		}
79 82
 
80 83
 		// Best guess is this worked.
@@ -91,8 +94,9 @@  discard block
 block discarded – undo
91 94
 		$value = $this->memcached->get($key);
92 95
 
93 96
 		// $value should return either data or false (from failure, key not found or empty array).
94
-		if ($value === false)
95
-			return null;
97
+		if ($value === false) {
98
+					return null;
99
+		}
96 100
 		return $value;
97 101
 	}
98 102
 
@@ -135,8 +139,9 @@  discard block
 block discarded – undo
135 139
 		$config_vars[] = $txt['cache_memcache_settings'];
136 140
 		$config_vars[] = array('cache_memcached', $txt['cache_memcache_servers'], 'file', 'text', 0, 'cache_memcached', 'postinput' => '<br /><div class="smalltext"><em>' . $txt['cache_memcache_servers_subtext'] . '</em></div>');
137 141
 
138
-		if (!isset($context['settings_post_javascript']))
139
-			$context['settings_post_javascript'] = '';
142
+		if (!isset($context['settings_post_javascript'])) {
143
+					$context['settings_post_javascript'] = '';
144
+		}
140 145
 
141 146
 		$context['settings_post_javascript'] .= '
142 147
 			$("#cache_accelerator").change(function (e) {
Please login to merge, or discard this patch.
Sources/Stats.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -555,7 +555,7 @@
 block discarded – undo
555 555
 				'subject' => $row_liked_message['subject'],
556 556
 				'num' => $row_liked_message['likes'],
557 557
 				'href' => $scripturl . '?msg=' . $row_liked_message['id_msg'],
558
-				'link' => '<a href="' . $scripturl . '?msg=' . $row_liked_message['id_msg'] .'">' . $row_liked_message['subject'] . '</a>'
558
+				'link' => '<a href="' . $scripturl . '?msg=' . $row_liked_message['id_msg'] . '">' . $row_liked_message['subject'] . '</a>'
559 559
 			);
560 560
 
561 561
 			if ($max_liked_message < $row_liked_message['likes'])
Please login to merge, or discard this patch.
Braces   +112 added lines, -78 removed lines patch added patch discarded remove patch
@@ -13,8 +13,9 @@  discard block
 block discarded – undo
13 13
  * @version 2.1 Beta 4
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
  * Display some useful/interesting board statistics.
@@ -30,8 +31,9 @@  discard block
 block discarded – undo
30 31
 
31 32
 	isAllowedTo('view_stats');
32 33
 	// Page disabled - redirect them out
33
-	if (empty($modSettings['trackStats']))
34
-		fatal_lang_error('feature_disabled', true);
34
+	if (empty($modSettings['trackStats'])) {
35
+			fatal_lang_error('feature_disabled', true);
36
+	}
35 37
 
36 38
 	if (!empty($_REQUEST['expand']))
37 39
 	{
@@ -39,31 +41,34 @@  discard block
 block discarded – undo
39 41
 
40 42
 		$month = (int) substr($_REQUEST['expand'], 4);
41 43
 		$year = (int) substr($_REQUEST['expand'], 0, 4);
42
-		if ($year > 1900 && $year < 2200 && $month >= 1 && $month <= 12)
43
-			$_SESSION['expanded_stats'][$year][] = $month;
44
-	}
45
-	elseif (!empty($_REQUEST['collapse']))
44
+		if ($year > 1900 && $year < 2200 && $month >= 1 && $month <= 12) {
45
+					$_SESSION['expanded_stats'][$year][] = $month;
46
+		}
47
+	} elseif (!empty($_REQUEST['collapse']))
46 48
 	{
47 49
 		$context['robot_no_index'] = true;
48 50
 
49 51
 		$month = (int) substr($_REQUEST['collapse'], 4);
50 52
 		$year = (int) substr($_REQUEST['collapse'], 0, 4);
51
-		if (!empty($_SESSION['expanded_stats'][$year]))
52
-			$_SESSION['expanded_stats'][$year] = array_diff($_SESSION['expanded_stats'][$year], array($month));
53
+		if (!empty($_SESSION['expanded_stats'][$year])) {
54
+					$_SESSION['expanded_stats'][$year] = array_diff($_SESSION['expanded_stats'][$year], array($month));
55
+		}
53 56
 	}
54 57
 
55 58
 	// Handle the XMLHttpRequest.
56 59
 	if (isset($_REQUEST['xml']))
57 60
 	{
58 61
 		// Collapsing stats only needs adjustments of the session variables.
59
-		if (!empty($_REQUEST['collapse']))
60
-			obExit(false);
62
+		if (!empty($_REQUEST['collapse'])) {
63
+					obExit(false);
64
+		}
61 65
 
62 66
 		$context['sub_template'] = 'stats';
63 67
 		$context['yearly'] = array();
64 68
 
65
-		if (empty($month) || empty($year))
66
-			return;
69
+		if (empty($month) || empty($year)) {
70
+					return;
71
+		}
67 72
 
68 73
 		getDailyStats('YEAR(date) = {int:year} AND MONTH(date) = {int:month}', array('year' => $year, 'month' => $month));
69 74
 		$context['yearly'][$year]['months'][$month]['date'] = array(
@@ -220,8 +225,9 @@  discard block
 block discarded – undo
220 225
 			'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row_members['id_member'] . '">' . $row_members['real_name'] . '</a>'
221 226
 		);
222 227
 
223
-		if ($max_num_posts < $row_members['posts'])
224
-			$max_num_posts = $row_members['posts'];
228
+		if ($max_num_posts < $row_members['posts']) {
229
+					$max_num_posts = $row_members['posts'];
230
+		}
225 231
 	}
226 232
 	$smcFunc['db_free_result']($members_result);
227 233
 
@@ -257,8 +263,9 @@  discard block
 block discarded – undo
257 263
 			'link' => '<a href="' . $scripturl . '?board=' . $row_board['id_board'] . '.0">' . $row_board['name'] . '</a>'
258 264
 		);
259 265
 
260
-		if ($max_num_posts < $row_board['num_posts'])
261
-			$max_num_posts = $row_board['num_posts'];
266
+		if ($max_num_posts < $row_board['num_posts']) {
267
+					$max_num_posts = $row_board['num_posts'];
268
+		}
262 269
 	}
263 270
 	$smcFunc['db_free_result']($boards_result);
264 271
 
@@ -284,12 +291,13 @@  discard block
 block discarded – undo
284 291
 			)
285 292
 		);
286 293
 		$topic_ids = array();
287
-		while ($row = $smcFunc['db_fetch_assoc']($request))
288
-			$topic_ids[] = $row['id_topic'];
294
+		while ($row = $smcFunc['db_fetch_assoc']($request)) {
295
+					$topic_ids[] = $row['id_topic'];
296
+		}
289 297
 		$smcFunc['db_free_result']($request);
298
+	} else {
299
+			$topic_ids = array();
290 300
 	}
291
-	else
292
-		$topic_ids = array();
293 301
 
294 302
 	// Topic replies top 10.
295 303
 	$topic_reply_result = $smcFunc['db_query']('', '
@@ -329,8 +337,9 @@  discard block
 block discarded – undo
329 337
 			'link' => '<a href="' . $scripturl . '?topic=' . $row_topic_reply['id_topic'] . '.0">' . $row_topic_reply['subject'] . '</a>'
330 338
 		);
331 339
 
332
-		if ($max_num_replies < $row_topic_reply['num_replies'])
333
-			$max_num_replies = $row_topic_reply['num_replies'];
340
+		if ($max_num_replies < $row_topic_reply['num_replies']) {
341
+					$max_num_replies = $row_topic_reply['num_replies'];
342
+		}
334 343
 	}
335 344
 	$smcFunc['db_free_result']($topic_reply_result);
336 345
 
@@ -354,12 +363,13 @@  discard block
 block discarded – undo
354 363
 			)
355 364
 		);
356 365
 		$topic_ids = array();
357
-		while ($row = $smcFunc['db_fetch_assoc']($request))
358
-			$topic_ids[] = $row['id_topic'];
366
+		while ($row = $smcFunc['db_fetch_assoc']($request)) {
367
+					$topic_ids[] = $row['id_topic'];
368
+		}
359 369
 		$smcFunc['db_free_result']($request);
370
+	} else {
371
+			$topic_ids = array();
360 372
 	}
361
-	else
362
-		$topic_ids = array();
363 373
 
364 374
 	// Topic views top 10.
365 375
 	$topic_view_result = $smcFunc['db_query']('', '
@@ -399,8 +409,9 @@  discard block
 block discarded – undo
399 409
 			'link' => '<a href="' . $scripturl . '?topic=' . $row_topic_views['id_topic'] . '.0">' . $row_topic_views['subject'] . '</a>'
400 410
 		);
401 411
 
402
-		if ($max_num < $row_topic_views['num_views'])
403
-			$max_num = $row_topic_views['num_views'];
412
+		if ($max_num < $row_topic_views['num_views']) {
413
+					$max_num = $row_topic_views['num_views'];
414
+		}
404 415
 	}
405 416
 	$smcFunc['db_free_result']($topic_view_result);
406 417
 
@@ -425,15 +436,17 @@  discard block
 block discarded – undo
425 436
 			)
426 437
 		);
427 438
 		$members = array();
428
-		while ($row = $smcFunc['db_fetch_assoc']($request))
429
-			$members[$row['id_member_started']] = $row['hits'];
439
+		while ($row = $smcFunc['db_fetch_assoc']($request)) {
440
+					$members[$row['id_member_started']] = $row['hits'];
441
+		}
430 442
 		$smcFunc['db_free_result']($request);
431 443
 
432 444
 		cache_put_data('stats_top_starters', $members, 360);
433 445
 	}
434 446
 
435
-	if (empty($members))
436
-		$members = array(0 => 0);
447
+	if (empty($members)) {
448
+			$members = array(0 => 0);
449
+	}
437 450
 
438 451
 	// Topic poster top 10.
439 452
 	$members_result = $smcFunc['db_query']('', '
@@ -458,8 +471,9 @@  discard block
 block discarded – undo
458 471
 			'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row_members['id_member'] . '">' . $row_members['real_name'] . '</a>'
459 472
 		);
460 473
 
461
-		if ($max_num < $members[$row_members['id_member']])
462
-			$max_num = $members[$row_members['id_member']];
474
+		if ($max_num < $members[$row_members['id_member']]) {
475
+					$max_num = $members[$row_members['id_member']];
476
+		}
463 477
 	}
464 478
 	ksort($context['stats_blocks']['starters']);
465 479
 	$smcFunc['db_free_result']($members_result);
@@ -488,8 +502,9 @@  discard block
 block discarded – undo
488 502
 	while ($row_members = $smcFunc['db_fetch_assoc']($members_result))
489 503
 	{
490 504
 		$temp2[] = (int) $row_members['id_member'];
491
-		if (count($context['stats_blocks']['time_online']) >= 10)
492
-			continue;
505
+		if (count($context['stats_blocks']['time_online']) >= 10) {
506
+					continue;
507
+		}
493 508
 
494 509
 		// Figure out the days, hours and minutes.
495 510
 		$timeDays = floor($row_members['total_time_logged_in'] / 86400);
@@ -497,10 +512,12 @@  discard block
 block discarded – undo
497 512
 
498 513
 		// Figure out which things to show... (days, hours, minutes, etc.)
499 514
 		$timelogged = '';
500
-		if ($timeDays > 0)
501
-			$timelogged .= $timeDays . $txt['totalTimeLogged5'];
502
-		if ($timeHours > 0)
503
-			$timelogged .= $timeHours . $txt['totalTimeLogged6'];
515
+		if ($timeDays > 0) {
516
+					$timelogged .= $timeDays . $txt['totalTimeLogged5'];
517
+		}
518
+		if ($timeHours > 0) {
519
+					$timelogged .= $timeHours . $txt['totalTimeLogged6'];
520
+		}
504 521
 		$timelogged .= floor(($row_members['total_time_logged_in'] % 3600) / 60) . $txt['totalTimeLogged7'];
505 522
 
506 523
 		$context['stats_blocks']['time_online'][] = array(
@@ -512,17 +529,20 @@  discard block
 block discarded – undo
512 529
 			'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row_members['id_member'] . '">' . $row_members['real_name'] . '</a>'
513 530
 		);
514 531
 
515
-		if ($max_time_online < $row_members['total_time_logged_in'])
516
-			$max_time_online = $row_members['total_time_logged_in'];
532
+		if ($max_time_online < $row_members['total_time_logged_in']) {
533
+					$max_time_online = $row_members['total_time_logged_in'];
534
+		}
517 535
 	}
518 536
 	$smcFunc['db_free_result']($members_result);
519 537
 
520
-	foreach ($context['stats_blocks']['time_online'] as $i => $member)
521
-		$context['stats_blocks']['time_online'][$i]['percent'] = round(($member['seconds_online'] * 100) / $max_time_online);
538
+	foreach ($context['stats_blocks']['time_online'] as $i => $member) {
539
+			$context['stats_blocks']['time_online'][$i]['percent'] = round(($member['seconds_online'] * 100) / $max_time_online);
540
+	}
522 541
 
523 542
 	// Cache the ones we found for a bit, just so we don't have to look again.
524
-	if ($temp !== $temp2)
525
-		cache_put_data('stats_total_time_members', $temp2, 480);
543
+	if ($temp !== $temp2) {
544
+			cache_put_data('stats_total_time_members', $temp2, 480);
545
+	}
526 546
 
527 547
 	// Likes.
528 548
 	if (!empty($modSettings['enable_likes']))
@@ -558,13 +578,15 @@  discard block
 block discarded – undo
558 578
 				'link' => '<a href="' . $scripturl . '?msg=' . $row_liked_message['id_msg'] .'">' . $row_liked_message['subject'] . '</a>'
559 579
 			);
560 580
 
561
-			if ($max_liked_message < $row_liked_message['likes'])
562
-				$max_liked_message = $row_liked_message['likes'];
581
+			if ($max_liked_message < $row_liked_message['likes']) {
582
+							$max_liked_message = $row_liked_message['likes'];
583
+			}
563 584
 		}
564 585
 		$smcFunc['db_free_result']($liked_messages);
565 586
 
566
-		foreach ($context['stats_blocks']['liked_messages'] as $i => $liked_messages)
567
-			$context['stats_blocks']['liked_messages'][$i]['percent'] = round(($liked_messages['num'] * 100) / $max_liked_message);
587
+		foreach ($context['stats_blocks']['liked_messages'] as $i => $liked_messages) {
588
+					$context['stats_blocks']['liked_messages'][$i]['percent'] = round(($liked_messages['num'] * 100) / $max_liked_message);
589
+		}
568 590
 
569 591
 		// Liked users top 10.
570 592
 		$context['stats_blocks']['liked_users'] = array();
@@ -595,14 +617,16 @@  discard block
 block discarded – undo
595 617
 				'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row_liked_users['liked_user'] . '">' . $row_liked_users['real_name'] . '</a>',
596 618
 			);
597 619
 
598
-			if ($max_liked_users < $row_liked_users['count'])
599
-				$max_liked_users = $row_liked_users['count'];
620
+			if ($max_liked_users < $row_liked_users['count']) {
621
+							$max_liked_users = $row_liked_users['count'];
622
+			}
600 623
 		}
601 624
 
602 625
 		$smcFunc['db_free_result']($liked_users);
603 626
 
604
-		foreach ($context['stats_blocks']['liked_users'] as $i => $liked_users)
605
-			$context['stats_blocks']['liked_users'][$i]['percent'] = round(($liked_users['num'] * 100) / $max_liked_users);
627
+		foreach ($context['stats_blocks']['liked_users'] as $i => $liked_users) {
628
+					$context['stats_blocks']['liked_users'][$i]['percent'] = round(($liked_users['num'] * 100) / $max_liked_users);
629
+		}
606 630
 	}
607 631
 
608 632
 	// Activity by month.
@@ -620,8 +644,8 @@  discard block
 block discarded – undo
620 644
 		$ID_MONTH = $row_months['stats_year'] . sprintf('%02d', $row_months['stats_month']);
621 645
 		$expanded = !empty($_SESSION['expanded_stats'][$row_months['stats_year']]) && in_array($row_months['stats_month'], $_SESSION['expanded_stats'][$row_months['stats_year']]);
622 646
 
623
-		if (!isset($context['yearly'][$row_months['stats_year']]))
624
-			$context['yearly'][$row_months['stats_year']] = array(
647
+		if (!isset($context['yearly'][$row_months['stats_year']])) {
648
+					$context['yearly'][$row_months['stats_year']] = array(
625 649
 				'year' => $row_months['stats_year'],
626 650
 				'new_topics' => 0,
627 651
 				'new_posts' => 0,
@@ -633,6 +657,7 @@  discard block
 block discarded – undo
633 657
 				'expanded' => false,
634 658
 				'current_year' => $row_months['stats_year'] == date('Y'),
635 659
 			);
660
+		}
636 661
 
637 662
 		$context['yearly'][$row_months['stats_year']]['months'][(int) $row_months['stats_month']] = array(
638 663
 			'id' => $ID_MONTH,
@@ -678,26 +703,30 @@  discard block
 block discarded – undo
678 703
 		$context['yearly'][$year]['hits'] = comma_format($data['hits']);
679 704
 
680 705
 		// Keep a list of collapsed years.
681
-		if (!$data['expanded'] && !$data['current_year'])
682
-			$context['collapsed_years'][] = $year;
706
+		if (!$data['expanded'] && !$data['current_year']) {
707
+					$context['collapsed_years'][] = $year;
708
+		}
683 709
 	}
684 710
 
685
-	if (empty($_SESSION['expanded_stats']))
686
-		return;
711
+	if (empty($_SESSION['expanded_stats'])) {
712
+			return;
713
+	}
687 714
 
688 715
 	$condition_text = array();
689 716
 	$condition_params = array();
690
-	foreach ($_SESSION['expanded_stats'] as $year => $months)
691
-		if (!empty($months))
717
+	foreach ($_SESSION['expanded_stats'] as $year => $months) {
718
+			if (!empty($months))
692 719
 		{
693 720
 			$condition_text[] = 'YEAR(date) = {int:year_' . $year . '} AND MONTH(date) IN ({array_int:months_' . $year . '})';
721
+	}
694 722
 			$condition_params['year_' . $year] = $year;
695 723
 			$condition_params['months_' . $year] = $months;
696 724
 		}
697 725
 
698 726
 	// No daily stats to even look at?
699
-	if (empty($condition_text))
700
-		return;
727
+	if (empty($condition_text)) {
728
+			return;
729
+	}
701 730
 
702 731
 	getDailyStats(implode(' OR ', $condition_text), $condition_params);
703 732
 
@@ -723,8 +752,8 @@  discard block
 block discarded – undo
723 752
 		ORDER BY stats_day ASC',
724 753
 		$condition_parameters
725 754
 	);
726
-	while ($row_days = $smcFunc['db_fetch_assoc']($days_result))
727
-		$context['yearly'][$row_days['stats_year']]['months'][(int) $row_days['stats_month']]['days'][] = array(
755
+	while ($row_days = $smcFunc['db_fetch_assoc']($days_result)) {
756
+			$context['yearly'][$row_days['stats_year']]['months'][(int) $row_days['stats_month']]['days'][] = array(
728 757
 			'day' => sprintf('%02d', $row_days['stats_day']),
729 758
 			'month' => sprintf('%02d', $row_days['stats_month']),
730 759
 			'year' => $row_days['stats_year'],
@@ -734,6 +763,7 @@  discard block
 block discarded – undo
734 763
 			'most_members_online' => comma_format($row_days['most_on']),
735 764
 			'hits' => comma_format($row_days['hits'])
736 765
 		);
766
+	}
737 767
 	$smcFunc['db_free_result']($days_result);
738 768
 }
739 769
 
@@ -751,16 +781,19 @@  discard block
 block discarded – undo
751 781
 	global $modSettings, $user_info, $forum_version, $sourcedir;
752 782
 
753 783
 	// First, is it disabled?
754
-	if (empty($modSettings['enable_sm_stats']) || empty($modSettings['sm_stats_key']))
755
-		die();
784
+	if (empty($modSettings['enable_sm_stats']) || empty($modSettings['sm_stats_key'])) {
785
+			die();
786
+	}
756 787
 
757 788
 	// Are we saying who we are, and are we right? (OR an admin)
758
-	if (!$user_info['is_admin'] && (!isset($_GET['sid']) || $_GET['sid'] != $modSettings['sm_stats_key']))
759
-		die();
789
+	if (!$user_info['is_admin'] && (!isset($_GET['sid']) || $_GET['sid'] != $modSettings['sm_stats_key'])) {
790
+			die();
791
+	}
760 792
 
761 793
 	// Verify the referer...
762
-	if (!$user_info['is_admin'] && (!isset($_SERVER['HTTP_REFERER']) || md5($_SERVER['HTTP_REFERER']) != '746cb59a1a0d5cf4bd240e5a67c73085'))
763
-		die();
794
+	if (!$user_info['is_admin'] && (!isset($_SERVER['HTTP_REFERER']) || md5($_SERVER['HTTP_REFERER']) != '746cb59a1a0d5cf4bd240e5a67c73085')) {
795
+			die();
796
+	}
764 797
 
765 798
 	// Get some server versions.
766 799
 	require_once($sourcedir . '/Subs-Admin.php');
@@ -786,16 +819,17 @@  discard block
 block discarded – undo
786 819
 	);
787 820
 
788 821
 	// Encode all the data, for security.
789
-	foreach ($stats_to_send as $k => $v)
790
-		$stats_to_send[$k] = urlencode($k) . '=' . urlencode($v);
822
+	foreach ($stats_to_send as $k => $v) {
823
+			$stats_to_send[$k] = urlencode($k) . '=' . urlencode($v);
824
+	}
791 825
 
792 826
 	// Turn this into the query string!
793 827
 	$stats_to_send = implode('&', $stats_to_send);
794 828
 
795 829
 	// If we're an admin, just plonk them out.
796
-	if ($user_info['is_admin'])
797
-		echo $stats_to_send;
798
-	else
830
+	if ($user_info['is_admin']) {
831
+			echo $stats_to_send;
832
+	} else
799 833
 	{
800 834
 		// Connect to the collection script.
801 835
 		$fp = @fsockopen('www.simplemachines.org', 80, $errno, $errstr);
Please login to merge, or discard this patch.
Sources/ModerationCenter.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1799,9 +1799,9 @@
 block discarded – undo
1799 1799
 }
1800 1800
 
1801 1801
 /**
1802
-  * Callback for createList().
1803
-  * @return int The total number of warning templates
1804
-  */
1802
+ * Callback for createList().
1803
+ * @return int The total number of warning templates
1804
+ */
1805 1805
 function list_getWarningTemplateCount()
1806 1806
 {
1807 1807
 	global $smcFunc, $user_info;
Please login to merge, or discard this patch.
Braces   +139 added lines, -102 removed lines patch added patch discarded remove patch
@@ -13,8 +13,9 @@  discard block
 block discarded – undo
13 13
  * @version 2.1 Beta 4
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 for the moderation center.
@@ -26,8 +27,9 @@  discard block
 block discarded – undo
26 27
 	global $smcFunc, $txt, $context, $scripturl, $modSettings, $user_info, $sourcedir, $options;
27 28
 
28 29
 	// Don't run this twice... and don't conflict with the admin bar.
29
-	if (isset($context['admin_area']))
30
-		return;
30
+	if (isset($context['admin_area'])) {
31
+			return;
32
+	}
31 33
 
32 34
 	$context['can_moderate_boards'] = $user_info['mod_cache']['bq'] != '0=1';
33 35
 	$context['can_moderate_groups'] = $user_info['mod_cache']['gq'] != '0=1';
@@ -35,8 +37,9 @@  discard block
 block discarded – undo
35 37
 	$context['can_moderate_users'] = allowedTo('moderate_forum');
36 38
 
37 39
 	// Everyone using this area must be allowed here!
38
-	if (!$context['can_moderate_boards'] && !$context['can_moderate_groups'] && !$context['can_moderate_approvals'] && !$context['can_moderate_users'])
39
-		isAllowedTo('access_mod_center');
40
+	if (!$context['can_moderate_boards'] && !$context['can_moderate_groups'] && !$context['can_moderate_approvals'] && !$context['can_moderate_users']) {
41
+			isAllowedTo('access_mod_center');
42
+	}
40 43
 
41 44
 	// We're gonna want a menu of some kind.
42 45
 	require_once($sourcedir . '/Subs-Menu.php');
@@ -195,8 +198,9 @@  discard block
 block discarded – undo
195 198
 	unset($moderation_areas);
196 199
 
197 200
 	// We got something - didn't we? DIDN'T WE!
198
-	if ($mod_include_data == false)
199
-		fatal_lang_error('no_access', false);
201
+	if ($mod_include_data == false) {
202
+			fatal_lang_error('no_access', false);
203
+	}
200 204
 
201 205
 	// Retain the ID information in case required by a subaction.
202 206
 	$context['moderation_menu_id'] = $context['max_menu_id'];
@@ -219,22 +223,25 @@  discard block
 block discarded – undo
219 223
 		'url' => $scripturl . '?action=moderate',
220 224
 		'name' => $txt['moderation_center'],
221 225
 	);
222
-	if (isset($mod_include_data['current_area']) && $mod_include_data['current_area'] != 'index')
223
-		$context['linktree'][] = array(
226
+	if (isset($mod_include_data['current_area']) && $mod_include_data['current_area'] != 'index') {
227
+			$context['linktree'][] = array(
224 228
 			'url' => $scripturl . '?action=moderate;area=' . $mod_include_data['current_area'],
225 229
 			'name' => $mod_include_data['label'],
226 230
 		);
227
-	if (!empty($mod_include_data['current_subsection']) && $mod_include_data['subsections'][$mod_include_data['current_subsection']][0] != $mod_include_data['label'])
228
-		$context['linktree'][] = array(
231
+	}
232
+	if (!empty($mod_include_data['current_subsection']) && $mod_include_data['subsections'][$mod_include_data['current_subsection']][0] != $mod_include_data['label']) {
233
+			$context['linktree'][] = array(
229 234
 			'url' => $scripturl . '?action=moderate;area=' . $mod_include_data['current_area'] . ';sa=' . $mod_include_data['current_subsection'],
230 235
 			'name' => $mod_include_data['subsections'][$mod_include_data['current_subsection']][0],
231 236
 		);
237
+	}
232 238
 
233 239
 	// Now - finally - the bit before the encore - the main performance of course!
234 240
 	if (!$dont_call)
235 241
 	{
236
-		if (isset($mod_include_data['file']))
237
-			require_once($sourcedir . '/' . $mod_include_data['file']);
242
+		if (isset($mod_include_data['file'])) {
243
+					require_once($sourcedir . '/' . $mod_include_data['file']);
244
+		}
238 245
 
239 246
 		call_helper($mod_include_data['function']);
240 247
 	}
@@ -259,8 +266,9 @@  discard block
 block discarded – undo
259 266
 	// Load what blocks the user actually can see...
260 267
 	$valid_blocks = array();
261 268
 
262
-	if ($context['can_moderate_groups'])
263
-		$valid_blocks['g'] = 'GroupRequests';
269
+	if ($context['can_moderate_groups']) {
270
+			$valid_blocks['g'] = 'GroupRequests';
271
+	}
264 272
 	if ($context['can_moderate_boards'])
265 273
 	{
266 274
 		$valid_blocks['r'] = 'ReportedPosts';
@@ -269,8 +277,9 @@  discard block
 block discarded – undo
269 277
 	if ($context['can_moderate_users'])
270 278
 	{
271 279
 		// This falls under the category of moderating users as well...
272
-		if (!$context['can_moderate_boards'])
273
-			$valid_blocks['w'] = 'WatchedUsers';
280
+		if (!$context['can_moderate_boards']) {
281
+					$valid_blocks['w'] = 'WatchedUsers';
282
+		}
274 283
 
275 284
 		$valid_blocks['rm'] = 'ReportedMembers';
276 285
 	}
@@ -281,8 +290,9 @@  discard block
 block discarded – undo
281 290
 	foreach ($valid_blocks as $k => $block)
282 291
 	{
283 292
 		$block = 'ModBlock' . $block;
284
-		if (function_exists($block))
285
-			$context['mod_blocks'][] = $block();
293
+		if (function_exists($block)) {
294
+					$context['mod_blocks'][] = $block();
295
+		}
286 296
 	}
287 297
 
288 298
 	$context['admin_prefs'] = !empty($options['admin_preferences']) ? $smcFunc['json_decode']($options['admin_preferences'], true) : array();
@@ -309,8 +319,9 @@  discard block
 block discarded – undo
309 319
 			)
310 320
 		);
311 321
 		$watched_users = array();
312
-		while ($row = $smcFunc['db_fetch_assoc']($request))
313
-			$watched_users[] = $row;
322
+		while ($row = $smcFunc['db_fetch_assoc']($request)) {
323
+					$watched_users[] = $row;
324
+		}
314 325
 		$smcFunc['db_free_result']($request);
315 326
 
316 327
 		cache_put_data('recent_user_watches', $watched_users, 240);
@@ -402,8 +413,9 @@  discard block
 block discarded – undo
402 413
 			$note_owner = $smcFunc['db_num_rows']($get_owner);
403 414
 			$smcFunc['db_free_result']($get_owner);
404 415
 
405
-			if (empty($note_owner))
406
-				fatal_lang_error('mc_notes_delete_own', false);
416
+			if (empty($note_owner)) {
417
+							fatal_lang_error('mc_notes_delete_own', false);
418
+			}
407 419
 		}
408 420
 
409 421
 		// Lets delete it.
@@ -460,12 +472,14 @@  discard block
 block discarded – undo
460 472
 			)
461 473
 		);
462 474
 		$moderator_notes = array();
463
-		while ($row = $smcFunc['db_fetch_assoc']($request))
464
-			$moderator_notes[] = $row;
475
+		while ($row = $smcFunc['db_fetch_assoc']($request)) {
476
+					$moderator_notes[] = $row;
477
+		}
465 478
 		$smcFunc['db_free_result']($request);
466 479
 
467
-		if ($offset == 0)
468
-			cache_put_data('moderator_notes', $moderator_notes, 240);
480
+		if ($offset == 0) {
481
+					cache_put_data('moderator_notes', $moderator_notes, 240);
482
+		}
469 483
 	}
470 484
 
471 485
 	// Lets construct a page index.
@@ -504,8 +518,9 @@  discard block
 block discarded – undo
504 518
 	// Got the info already?
505 519
 	$cachekey = md5($smcFunc['json_encode']($user_info['mod_cache']['bq']));
506 520
 	$context['reported_posts'] = array();
507
-	if ($user_info['mod_cache']['bq'] == '0=1')
508
-		return 'reported_posts_block';
521
+	if ($user_info['mod_cache']['bq'] == '0=1') {
522
+			return 'reported_posts_block';
523
+	}
509 524
 
510 525
 	if (($reported_posts = cache_get_data('reported_posts_' . $cachekey, 90)) === null)
511 526
 	{
@@ -529,8 +544,9 @@  discard block
 block discarded – undo
529 544
 			)
530 545
 		);
531 546
 		$reported_posts = array();
532
-		while ($row = $smcFunc['db_fetch_assoc']($request))
533
-			$reported_posts[] = $row;
547
+		while ($row = $smcFunc['db_fetch_assoc']($request)) {
548
+					$reported_posts[] = $row;
549
+		}
534 550
 		$smcFunc['db_free_result']($request);
535 551
 
536 552
 		// Cache it.
@@ -568,8 +584,9 @@  discard block
 block discarded – undo
568 584
 
569 585
 	$context['group_requests'] = array();
570 586
 	// Make sure they can even moderate someone!
571
-	if ($user_info['mod_cache']['gq'] == '0=1')
572
-		return 'group_requests_block';
587
+	if ($user_info['mod_cache']['gq'] == '0=1') {
588
+			return 'group_requests_block';
589
+	}
573 590
 
574 591
 	// What requests are outstanding?
575 592
 	$request = $smcFunc['db_query']('', '
@@ -618,8 +635,9 @@  discard block
 block discarded – undo
618 635
 	// Got the info already?
619 636
 	$cachekey = md5($smcFunc['json_encode']((int) allowedTo('moderate_forum')));
620 637
 	$context['reported_users'] = array();
621
-	if (!allowedTo('moderate_forum'))
622
-		return 'reported_users_block';
638
+	if (!allowedTo('moderate_forum')) {
639
+			return 'reported_users_block';
640
+	}
623 641
 
624 642
 	if (($reported_users = cache_get_data('reported_users_' . $cachekey, 90)) === null)
625 643
 	{
@@ -642,8 +660,9 @@  discard block
 block discarded – undo
642 660
 			)
643 661
 		);
644 662
 		$reported_users = array();
645
-		while ($row = $smcFunc['db_fetch_assoc']($request))
646
-			$reported_users[] = $row;
663
+		while ($row = $smcFunc['db_fetch_assoc']($request)) {
664
+					$reported_users[] = $row;
665
+		}
647 666
 		$smcFunc['db_free_result']($request);
648 667
 
649 668
 		// Cache it.
@@ -691,8 +710,9 @@  discard block
 block discarded – undo
691 710
 	isAllowedTo('moderate_forum');
692 711
 
693 712
 	// Are they wanting to view a particular report?
694
-	if (!empty($_REQUEST['report']))
695
-		return MemberReport();
713
+	if (!empty($_REQUEST['report'])) {
714
+			return MemberReport();
715
+	}
696 716
 
697 717
 	// Set up the comforting bits...
698 718
 	$context['page_title'] = $txt['mc_reported_members'];
@@ -746,15 +766,15 @@  discard block
 block discarded – undo
746 766
 		// Time to update.
747 767
 		updateSettings(array('last_mod_report_action' => time()));
748 768
 		recountOpenReports('members');
749
-	}
750
-	elseif (isset($_POST['close']) && isset($_POST['close_selected']))
769
+	} elseif (isset($_POST['close']) && isset($_POST['close_selected']))
751 770
 	{
752 771
 		checkSession();
753 772
 
754 773
 		// All the ones to update...
755 774
 		$toClose = array();
756
-		foreach ($_POST['close'] as $rid)
757
-			$toClose[] = (int) $rid;
775
+		foreach ($_POST['close'] as $rid) {
776
+					$toClose[] = (int) $rid;
777
+		}
758 778
 
759 779
 		if (!empty($toClose))
760 780
 		{
@@ -907,8 +927,9 @@  discard block
 block discarded – undo
907 927
 	global $context, $user_info;
908 928
 
909 929
 	// You need to be allowed to moderate groups...
910
-	if ($user_info['mod_cache']['gq'] == '0=1')
911
-		isAllowedTo('manage_membergroups');
930
+	if ($user_info['mod_cache']['gq'] == '0=1') {
931
+			isAllowedTo('manage_membergroups');
932
+	}
912 933
 
913 934
 	// Load the group templates.
914 935
 	loadTemplate('ModerationCenter');
@@ -919,8 +940,9 @@  discard block
 block discarded – undo
919 940
 		'view' => 'ViewGroups',
920 941
 	);
921 942
 
922
-	if (!isset($_GET['sa']) || !isset($subActions[$_GET['sa']]))
923
-		$_GET['sa'] = 'view';
943
+	if (!isset($_GET['sa']) || !isset($subActions[$_GET['sa']])) {
944
+			$_GET['sa'] = 'view';
945
+	}
924 946
 	$context['sub_action'] = $_GET['sa'];
925 947
 
926 948
 	// Call the relevant function.
@@ -950,8 +972,9 @@  discard block
 block discarded – undo
950 972
 			'id_notice' => $id_notice,
951 973
 		)
952 974
 	);
953
-	if ($smcFunc['db_num_rows']($request) == 0)
954
-		fatal_lang_error('no_access', false);
975
+	if ($smcFunc['db_num_rows']($request) == 0) {
976
+			fatal_lang_error('no_access', false);
977
+	}
955 978
 	list ($context['notice_body'], $context['notice_subject']) = $smcFunc['db_fetch_row']($request);
956 979
 	$smcFunc['db_free_result']($request);
957 980
 
@@ -988,18 +1011,20 @@  discard block
 block discarded – undo
988 1011
 		checkSession(!is_array($_REQUEST['delete']) ? 'get' : 'post');
989 1012
 
990 1013
 		$toDelete = array();
991
-		if (!is_array($_REQUEST['delete']))
992
-			$toDelete[] = (int) $_REQUEST['delete'];
993
-		else
994
-			foreach ($_REQUEST['delete'] as $did)
1014
+		if (!is_array($_REQUEST['delete'])) {
1015
+					$toDelete[] = (int) $_REQUEST['delete'];
1016
+		} else {
1017
+					foreach ($_REQUEST['delete'] as $did)
995 1018
 				$toDelete[] = (int) $did;
1019
+		}
996 1020
 
997 1021
 		if (!empty($toDelete))
998 1022
 		{
999 1023
 			require_once($sourcedir . '/RemoveTopic.php');
1000 1024
 			// If they don't have permission we'll let it error - either way no chance of a security slip here!
1001
-			foreach ($toDelete as $did)
1002
-				removeMessage($did);
1025
+			foreach ($toDelete as $did) {
1026
+							removeMessage($did);
1027
+			}
1003 1028
 		}
1004 1029
 	}
1005 1030
 
@@ -1008,20 +1033,21 @@  discard block
 block discarded – undo
1008 1033
 	{
1009 1034
 		$approve_query = '';
1010 1035
 		$delete_boards = array();
1011
-	}
1012
-	else
1036
+	} else
1013 1037
 	{
1014 1038
 		// Still obey permissions!
1015 1039
 		$approve_boards = boardsAllowedTo('approve_posts');
1016 1040
 		$delete_boards = boardsAllowedTo('delete_any');
1017 1041
 
1018
-		if ($approve_boards == array(0))
1019
-			$approve_query = '';
1020
-		elseif (!empty($approve_boards))
1021
-			$approve_query = ' AND m.id_board IN (' . implode(',', $approve_boards) . ')';
1042
+		if ($approve_boards == array(0)) {
1043
+					$approve_query = '';
1044
+		} elseif (!empty($approve_boards)) {
1045
+					$approve_query = ' AND m.id_board IN (' . implode(',', $approve_boards) . ')';
1046
+		}
1022 1047
 		// Nada, zip, etc...
1023
-		else
1024
-			$approve_query = ' AND 1=0';
1048
+		else {
1049
+					$approve_query = ' AND 1=0';
1050
+		}
1025 1051
 	}
1026 1052
 
1027 1053
 	require_once($sourcedir . '/Subs-List.php');
@@ -1120,10 +1146,11 @@  discard block
 block discarded – undo
1120 1146
 				'data' => array(
1121 1147
 					'function' => function($member) use ($scripturl)
1122 1148
 					{
1123
-						if ($member['last_post_id'])
1124
-							return '<a href="' . $scripturl . '?msg=' . $member['last_post_id'] . '">' . $member['last_post'] . '</a>';
1125
-						else
1126
-							return $member['last_post'];
1149
+						if ($member['last_post_id']) {
1150
+													return '<a href="' . $scripturl . '?msg=' . $member['last_post_id'] . '">' . $member['last_post'] . '</a>';
1151
+						} else {
1152
+													return $member['last_post'];
1153
+						}
1127 1154
 					},
1128 1155
 				),
1129 1156
 			),
@@ -1251,8 +1278,9 @@  discard block
 block discarded – undo
1251 1278
 			)
1252 1279
 		);
1253 1280
 		$latest_posts = array();
1254
-		while ($row = $smcFunc['db_fetch_assoc']($request))
1255
-			$latest_posts[$row['id_member']] = $row['last_post_id'];
1281
+		while ($row = $smcFunc['db_fetch_assoc']($request)) {
1282
+					$latest_posts[$row['id_member']] = $row['last_post_id'];
1283
+		}
1256 1284
 
1257 1285
 		if (!empty($latest_posts))
1258 1286
 		{
@@ -1443,15 +1471,17 @@  discard block
 block discarded – undo
1443 1471
 	// Setup the direction stuff...
1444 1472
 	$context['order'] = isset($_REQUEST['sort']) && isset($sort_types[$_REQUEST['sort']]) ? $_REQUEST['sort'] : 'member';
1445 1473
 
1446
-	if (!isset($search_params['string']) || (!empty($_REQUEST['search']) && $search_params['string'] != $_REQUEST['search']))
1447
-		$search_params_string = empty($_REQUEST['search']) ? '' : $_REQUEST['search'];
1448
-	else
1449
-		$search_params_string = $search_params['string'];
1474
+	if (!isset($search_params['string']) || (!empty($_REQUEST['search']) && $search_params['string'] != $_REQUEST['search'])) {
1475
+			$search_params_string = empty($_REQUEST['search']) ? '' : $_REQUEST['search'];
1476
+	} else {
1477
+			$search_params_string = $search_params['string'];
1478
+	}
1450 1479
 
1451
-	if (isset($_REQUEST['search_type']) || empty($search_params['type']) || !isset($searchTypes[$search_params['type']]))
1452
-		$search_params_type = isset($_REQUEST['search_type']) && isset($searchTypes[$_REQUEST['search_type']]) ? $_REQUEST['search_type'] : (isset($searchTypes[$context['order']]) ? $context['order'] : 'member');
1453
-	else
1454
-		$search_params_type = $search_params['type'];
1480
+	if (isset($_REQUEST['search_type']) || empty($search_params['type']) || !isset($searchTypes[$search_params['type']])) {
1481
+			$search_params_type = isset($_REQUEST['search_type']) && isset($searchTypes[$_REQUEST['search_type']]) ? $_REQUEST['search_type'] : (isset($searchTypes[$context['order']]) ? $context['order'] : 'member');
1482
+	} else {
1483
+			$search_params_type = $search_params['type'];
1484
+	}
1455 1485
 
1456 1486
 	$search_params = array(
1457 1487
 		'string' => $search_params_string,
@@ -1534,9 +1564,10 @@  discard block
 block discarded – undo
1534 1564
 								' . $rowData['reason'] . '
1535 1565
 							</div>';
1536 1566
 
1537
-						if (!empty($rowData['id_notice']))
1538
-							$output .= '
1567
+						if (!empty($rowData['id_notice'])) {
1568
+													$output .= '
1539 1569
 								&nbsp;<a href="' . $scripturl . '?action=moderate;area=notice;nid=' . $rowData['id_notice'] . '" onclick="window.open(this.href, \'\', \'scrollbars=yes,resizable=yes,width=400,height=250\');return false;" target="_blank" class="new_win" title="' . $txt['profile_warning_previous_notice'] . '"><span class="generic_icons filter centericon"></span></a>';
1570
+						}
1540 1571
 						return $output;
1541 1572
 					},
1542 1573
 				),
@@ -1654,9 +1685,9 @@  discard block
 block discarded – undo
1654 1685
 	global $smcFunc, $modSettings, $context, $txt, $scripturl, $sourcedir, $user_info;
1655 1686
 
1656 1687
 	// Submitting a new one?
1657
-	if (isset($_POST['add']))
1658
-		return ModifyWarningTemplate();
1659
-	elseif (isset($_POST['delete']) && !empty($_POST['deltpl']))
1688
+	if (isset($_POST['add'])) {
1689
+			return ModifyWarningTemplate();
1690
+	} elseif (isset($_POST['delete']) && !empty($_POST['deltpl']))
1660 1691
 	{
1661 1692
 		checkSession();
1662 1693
 		validateToken('mod-wt');
@@ -1675,8 +1706,9 @@  discard block
 block discarded – undo
1675 1706
 				'current_member' => $user_info['id'],
1676 1707
 			)
1677 1708
 		);
1678
-		while ($row = $smcFunc['db_fetch_assoc']($request))
1679
-			logAction('delete_warn_template', array('template' => $row['recipient_name']));
1709
+		while ($row = $smcFunc['db_fetch_assoc']($request)) {
1710
+					logAction('delete_warn_template', array('template' => $row['recipient_name']));
1711
+		}
1680 1712
 		$smcFunc['db_free_result']($request);
1681 1713
 
1682 1714
 		// Do the deletes.
@@ -1967,16 +1999,18 @@  discard block
 block discarded – undo
1967 1999
 				);
1968 2000
 
1969 2001
 				// If it wasn't visible and now is they've effectively added it.
1970
-				if ($context['template_data']['personal'] && !$recipient_id)
1971
-					logAction('add_warn_template', array('template' => $_POST['template_title']));
2002
+				if ($context['template_data']['personal'] && !$recipient_id) {
2003
+									logAction('add_warn_template', array('template' => $_POST['template_title']));
2004
+				}
1972 2005
 				// Conversely if they made it personal it's a delete.
1973
-				elseif (!$context['template_data']['personal'] && $recipient_id)
1974
-					logAction('delete_warn_template', array('template' => $_POST['template_title']));
2006
+				elseif (!$context['template_data']['personal'] && $recipient_id) {
2007
+									logAction('delete_warn_template', array('template' => $_POST['template_title']));
2008
+				}
1975 2009
 				// Otherwise just an edit.
1976
-				else
1977
-					logAction('modify_warn_template', array('template' => $_POST['template_title']));
1978
-			}
1979
-			else
2010
+				else {
2011
+									logAction('modify_warn_template', array('template' => $_POST['template_title']));
2012
+				}
2013
+			} else
1980 2014
 			{
1981 2015
 				$smcFunc['db_insert']('',
1982 2016
 					'{db_prefix}log_comments',
@@ -1996,17 +2030,18 @@  discard block
 block discarded – undo
1996 2030
 
1997 2031
 			// Get out of town...
1998 2032
 			redirectexit('action=moderate;area=warnings;sa=templates');
1999
-		}
2000
-		else
2033
+		} else
2001 2034
 		{
2002 2035
 			$context['warning_errors'] = array();
2003 2036
 			$context['template_data']['title'] = !empty($_POST['template_title']) ? $_POST['template_title'] : '';
2004 2037
 			$context['template_data']['body'] = !empty($_POST['template_body']) ? $_POST['template_body'] : $txt['mc_warning_template_body_default'];
2005 2038
 			$context['template_data']['personal'] = !empty($_POST['make_personal']);
2006
-			if (empty($_POST['template_title']))
2007
-				$context['warning_errors'][] = $txt['mc_warning_template_error_no_title'];
2008
-			if (empty($_POST['template_body']))
2009
-				$context['warning_errors'][] = $txt['mc_warning_template_error_no_body'];
2039
+			if (empty($_POST['template_title'])) {
2040
+							$context['warning_errors'][] = $txt['mc_warning_template_error_no_title'];
2041
+			}
2042
+			if (empty($_POST['template_body'])) {
2043
+							$context['warning_errors'][] = $txt['mc_warning_template_error_no_body'];
2044
+			}
2010 2045
 		}
2011 2046
 	}
2012 2047
 
@@ -2051,8 +2086,9 @@  discard block
 block discarded – undo
2051 2086
 		// Now check other options!
2052 2087
 		$pref_binary = 0;
2053 2088
 
2054
-		if ($context['can_moderate_approvals'] && !empty($_POST['mod_notify_approval']))
2055
-			$pref_binary |= 4;
2089
+		if ($context['can_moderate_approvals'] && !empty($_POST['mod_notify_approval'])) {
2090
+					$pref_binary |= 4;
2091
+		}
2056 2092
 
2057 2093
 		// Put it all together.
2058 2094
 		$mod_prefs = '0||' . $pref_binary;
@@ -2076,9 +2112,10 @@  discard block
 block discarded – undo
2076 2112
 	unset($_SESSION['moderate_time']);
2077 2113
 
2078 2114
 	// Clean any moderator tokens as well.
2079
-	foreach ($_SESSION['token'] as $key => $token)
2080
-		if (strpos($key, '-mod') !== false)
2115
+	foreach ($_SESSION['token'] as $key => $token) {
2116
+			if (strpos($key, '-mod') !== false)
2081 2117
 			unset($_SESSION['token'][$key]);
2118
+	}
2082 2119
 
2083 2120
 	redirectexit();
2084 2121
 }
Please login to merge, or discard this patch.
Sources/ManagePosts.php 2 patches
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -273,7 +273,6 @@
 block discarded – undo
273 273
  * Modify any setting related to topics.
274 274
  * Requires the admin_forum permission.
275 275
  * Accessed from ?action=admin;area=postsettings;sa=topics.
276
-
277 276
  * @param bool $return_config Whether or not to return the config_vars array (used for admin search)
278 277
  * @return void|array Returns nothing or returns $config_vars if $return_config is true
279 278
  * @uses Admin template, edit_topic_settings sub-template.
Please login to merge, or discard this patch.
Braces   +39 added lines, -29 removed lines patch added patch discarded remove patch
@@ -13,8 +13,9 @@  discard block
 block discarded – undo
13 13
  * @version 2.1 Beta 4
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 entrance point for the 'Posts and topics' screen.
@@ -98,23 +99,23 @@  discard block
 block discarded – undo
98 99
 		{
99 100
 			$_POST['censortext'] = explode("\n", strtr($_POST['censortext'], array("\r" => '')));
100 101
 
101
-			foreach ($_POST['censortext'] as $c)
102
-				list ($censored_vulgar[], $censored_proper[]) = array_pad(explode('=', trim($c)), 2, '');
103
-		}
104
-		elseif (isset($_POST['censor_vulgar'], $_POST['censor_proper']))
102
+			foreach ($_POST['censortext'] as $c) {
103
+							list ($censored_vulgar[], $censored_proper[]) = array_pad(explode('=', trim($c)), 2, '');
104
+			}
105
+		} elseif (isset($_POST['censor_vulgar'], $_POST['censor_proper']))
105 106
 		{
106 107
 			if (is_array($_POST['censor_vulgar']))
107 108
 			{
108 109
 				foreach ($_POST['censor_vulgar'] as $i => $value)
109 110
 				{
110
-					if (trim(strtr($value, '*', ' ')) == '')
111
-						unset($_POST['censor_vulgar'][$i], $_POST['censor_proper'][$i]);
111
+					if (trim(strtr($value, '*', ' ')) == '') {
112
+											unset($_POST['censor_vulgar'][$i], $_POST['censor_proper'][$i]);
113
+					}
112 114
 				}
113 115
 
114 116
 				$censored_vulgar = $_POST['censor_vulgar'];
115 117
 				$censored_proper = $_POST['censor_proper'];
116
-			}
117
-			else
118
+			} else
118 119
 			{
119 120
 				$censored_vulgar = explode("\n", strtr($_POST['censor_vulgar'], array("\r" => '')));
120 121
 				$censored_proper = explode("\n", strtr($_POST['censor_proper'], array("\r" => '')));
@@ -151,12 +152,14 @@  discard block
 block discarded – undo
151 152
 	$context['censored_words'] = array();
152 153
 	for ($i = 0, $n = count($censor_vulgar); $i < $n; $i++)
153 154
 	{
154
-		if (empty($censor_vulgar[$i]))
155
-			continue;
155
+		if (empty($censor_vulgar[$i])) {
156
+					continue;
157
+		}
156 158
 
157 159
 		// Skip it, it's either spaces or stars only.
158
-		if (trim(strtr($censor_vulgar[$i], '*', ' ')) == '')
159
-			continue;
160
+		if (trim(strtr($censor_vulgar[$i], '*', ' ')) == '') {
161
+					continue;
162
+		}
160 163
 
161 164
 		$context['censored_words'][$smcFunc['htmlspecialchars'](trim($censor_vulgar[$i]))] = isset($censor_proper[$i]) ? $smcFunc['htmlspecialchars']($censor_proper[$i]) : '';
162 165
 	}
@@ -187,10 +190,11 @@  discard block
 block discarded – undo
187 190
 
188 191
 	// Make an inline conditional a little shorter...
189 192
 	$can_spell_check = false;
190
-	if (function_exists('pspell_new'))
191
-		$can_spell_check = true;
192
-	elseif (function_exists('enchant_broker_init') && ($txt['lang_charset'] == 'UTF-8' || function_exists('iconv')))
193
-		$can_spell_check = true;
193
+	if (function_exists('pspell_new')) {
194
+			$can_spell_check = true;
195
+	} elseif (function_exists('enchant_broker_init') && ($txt['lang_charset'] == 'UTF-8' || function_exists('iconv'))) {
196
+			$can_spell_check = true;
197
+	}
194 198
 
195 199
 	// All the settings...
196 200
 	$config_vars = array(
@@ -221,8 +225,9 @@  discard block
 block discarded – undo
221 225
 
222 226
 	call_integration_hook('integrate_modify_post_settings', array(&$config_vars));
223 227
 
224
-	if ($return_config)
225
-		return $config_vars;
228
+	if ($return_config) {
229
+			return $config_vars;
230
+	}
226 231
 
227 232
 	// We'll want this for our easy save.
228 233
 	require_once($sourcedir . '/ManageServer.php');
@@ -242,17 +247,20 @@  discard block
 block discarded – undo
242 247
 			db_extend('packages');
243 248
 
244 249
 			$colData = $smcFunc['db_list_columns']('{db_prefix}messages', true);
245
-			foreach ($colData as $column)
246
-				if ($column['name'] == 'body')
250
+			foreach ($colData as $column) {
251
+							if ($column['name'] == 'body')
247 252
 					$body_type = $column['type'];
253
+			}
248 254
 
249
-			if (isset($body_type) && ($_POST['max_messageLength'] > 65535 || $_POST['max_messageLength'] == 0) && $body_type == 'text')
250
-				fatal_lang_error('convert_to_mediumtext', false, array($scripturl . '?action=admin;area=maintain;sa=database'));
255
+			if (isset($body_type) && ($_POST['max_messageLength'] > 65535 || $_POST['max_messageLength'] == 0) && $body_type == 'text') {
256
+							fatal_lang_error('convert_to_mediumtext', false, array($scripturl . '?action=admin;area=maintain;sa=database'));
257
+			}
251 258
 		}
252 259
 
253 260
 		// If we're changing the post preview length let's check its valid
254
-		if (!empty($_POST['preview_characters']))
255
-			$_POST['preview_characters'] = (int) min(max(0, $_POST['preview_characters']), 512);
261
+		if (!empty($_POST['preview_characters'])) {
262
+					$_POST['preview_characters'] = (int) min(max(0, $_POST['preview_characters']), 512);
263
+		}
256 264
 
257 265
 		call_integration_hook('integrate_save_post_settings');
258 266
 
@@ -313,8 +321,9 @@  discard block
 block discarded – undo
313 321
 
314 322
 	call_integration_hook('integrate_modify_topic_settings', array(&$config_vars));
315 323
 
316
-	if ($return_config)
317
-		return $config_vars;
324
+	if ($return_config) {
325
+			return $config_vars;
326
+	}
318 327
 
319 328
 	// Get the settings template ready.
320 329
 	require_once($sourcedir . '/ManageServer.php');
@@ -367,8 +376,9 @@  discard block
 block discarded – undo
367 376
 		array('int', 'drafts_autosave_frequency', 'postinput' => $txt['manageposts_seconds'], 'subtext' => $txt['drafts_autosave_frequency_subnote']),
368 377
 	);
369 378
 
370
-	if ($return_config)
371
-		return $config_vars;
379
+	if ($return_config) {
380
+			return $config_vars;
381
+	}
372 382
 
373 383
 	// Get the settings template ready.
374 384
 	require_once($sourcedir . '/ManageServer.php');
Please login to merge, or discard this patch.
Sources/Subs.php 4 patches
Indentation   -2 removed lines patch added patch discarded remove patch
@@ -5265,7 +5265,6 @@  discard block
 block discarded – undo
5265 5265
 
5266 5266
 /**
5267 5267
  * Tries different modes to make file/dirs writable. Wrapper function for chmod()
5268
-
5269 5268
  * @param string $file The file/dir full path.
5270 5269
  * @param int $value Not needed, added for legacy reasons.
5271 5270
  * @return boolean  true if the file/dir is already writable or the function was able to make it writable, false if the function couldn't make the file/dir writable.
@@ -5305,7 +5304,6 @@  discard block
 block discarded – undo
5305 5304
 
5306 5305
 /**
5307 5306
  * Wrapper function for json_decode() with error handling.
5308
-
5309 5307
  * @param string $json The string to decode.
5310 5308
  * @param bool $returnAsArray To return the decoded string as an array or an object, SMF only uses Arrays but to keep on compatibility with json_decode its set to false as default.
5311 5309
  * @param bool $logIt To specify if the error will be logged if theres any.
Please login to merge, or discard this patch.
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -676,7 +676,7 @@  discard block
 block discarded – undo
676 676
  * - caches the formatting data from the setting for optimization.
677 677
  *
678 678
  * @param float $number A number
679
- * @param bool|int $override_decimal_count If set, will use the specified number of decimal places. Otherwise it's automatically determined
679
+ * @param integer $override_decimal_count If set, will use the specified number of decimal places. Otherwise it's automatically determined
680 680
  * @return string A formatted number
681 681
  */
682 682
 function comma_format($number, $override_decimal_count = false)
@@ -5530,7 +5530,7 @@  discard block
 block discarded – undo
5530 5530
  * It assumes the data is already a string.
5531 5531
  * @param string $data The data to print
5532 5532
  * @param string $type The content type. Defaults to Json.
5533
- * @return void
5533
+ * @return false|null
5534 5534
  */
5535 5535
 function smf_serverResponse($data = '', $type = 'Content-Type: application/json')
5536 5536
 {
Please login to merge, or discard this patch.
Spacing   +126 added lines, -126 removed lines patch added patch discarded remove patch
@@ -599,7 +599,7 @@  discard block
 block discarded – undo
599 599
 		if (empty($low_id))
600 600
 			$pageindex .= $start == 0 ? ' ' : sprintf($base_link, $start - $num_per_page, $settings['page_index']['previous_page']);
601 601
 		else
602
-			$pageindex .= $start == 0 ? ' ' : sprintf($base_link_page, ($start - $num_per_page), $settings['page_index']['previous_page'], 'L'.$low_id);
602
+			$pageindex .= $start == 0 ? ' ' : sprintf($base_link_page, ($start - $num_per_page), $settings['page_index']['previous_page'], 'L' . $low_id);
603 603
 		
604 604
 		// Show all the pages.
605 605
 		$display_page = 1;
@@ -608,11 +608,11 @@  discard block
 block discarded – undo
608 608
 
609 609
 		// Show the right arrow.
610 610
 		$display_page = ($start + $num_per_page) > $max_value ? $max_value : ($start + $num_per_page);
611
-		if ($start != $counter - $max_value && !$start_invalid){
611
+		if ($start != $counter - $max_value && !$start_invalid) {
612 612
 			if (empty($max_id))
613 613
 				$pageindex .= $display_page > $counter - $num_per_page ? ' ' : sprintf($base_link, $display_page, $settings['page_index']['next_page']);
614 614
 			else
615
-				$pageindex .= $display_page > $counter - $num_per_page ? ' ' : sprintf($base_link_page, $display_page , $settings['page_index']['next_page'], 'M'.$max_id);
615
+				$pageindex .= $display_page > $counter - $num_per_page ? ' ' : sprintf($base_link_page, $display_page, $settings['page_index']['next_page'], 'M' . $max_id);
616 616
 		}
617 617
 			
618 618
 	}
@@ -626,7 +626,7 @@  discard block
 block discarded – undo
626 626
 			if (empty($low_id))
627 627
 				$pageindex .= sprintf($base_link, $start - $num_per_page, $settings['page_index']['previous_page']);
628 628
 			else
629
-				$pageindex .= sprintf($base_link_page, $start - $num_per_page, $settings['page_index']['previous_page'], 'L'.$low_id);
629
+				$pageindex .= sprintf($base_link_page, $start - $num_per_page, $settings['page_index']['previous_page'], 'L' . $low_id);
630 630
 		else
631 631
 			$pageindex .= '';
632 632
 
@@ -648,10 +648,10 @@  discard block
 block discarded – undo
648 648
 			if ($start >= $num_per_page * $nCont)
649 649
 			{
650 650
 				$tmpStart = $start - $num_per_page * $nCont;
651
-				if($nCont != 1 || empty($low_id))
651
+				if ($nCont != 1 || empty($low_id))
652 652
 					$pageindex .= sprintf($base_link, $tmpStart, $tmpStart / $num_per_page + 1);
653 653
 				else
654
-					$pageindex .= sprintf($base_link_page, $tmpStart, $tmpStart / $num_per_page + 1, 'L'.$low_id);
654
+					$pageindex .= sprintf($base_link_page, $tmpStart, $tmpStart / $num_per_page + 1, 'L' . $low_id);
655 655
 			}
656 656
 
657 657
 		// Show the current page. (prev page 1 ... 6 7 >[8]< 9 10 ... 15 next page)
@@ -666,10 +666,10 @@  discard block
 block discarded – undo
666 666
 			if ($start + $num_per_page * $nCont <= $tmpMaxPages)
667 667
 			{
668 668
 				$tmpStart = $start + $num_per_page * $nCont;
669
-				if($nCont != 1 || empty($max_id))
669
+				if ($nCont != 1 || empty($max_id))
670 670
 					$pageindex .= sprintf($base_link, $tmpStart, $tmpStart / $num_per_page + 1);
671 671
 				else
672
-					$pageindex .= sprintf($base_link_page, $tmpStart, $tmpStart / $num_per_page + 1, 'M'.$max_id);
672
+					$pageindex .= sprintf($base_link_page, $tmpStart, $tmpStart / $num_per_page + 1, 'M' . $max_id);
673 673
 			}
674 674
 
675 675
 		// Show the '...' part near the end. (prev page 1 ... 6 7 [8] 9 10 >...< 15 next page)
@@ -690,7 +690,7 @@  discard block
 block discarded – undo
690 690
 			if (empty($max_id))
691 691
 				$pageindex .= sprintf($base_link, $start + $num_per_page, $settings['page_index']['next_page']);
692 692
 			else
693
-				$pageindex .= sprintf($base_link_page, $start + $num_per_page, $settings['page_index']['next_page'], 'M'.$max_id);
693
+				$pageindex .= sprintf($base_link_page, $start + $num_per_page, $settings['page_index']['next_page'], 'M' . $max_id);
694 694
 	}
695 695
 	$pageindex .= $settings['page_index']['extra_after'];
696 696
 
@@ -1125,7 +1125,7 @@  discard block
 block discarded – undo
1125 1125
 					'height' => array('optional' => true, 'match' => '(\d+)'),
1126 1126
 				),
1127 1127
 				'content' => '$1',
1128
-				'validate' => function (&$tag, &$data, $disabled, $params) use ($modSettings, $context, $sourcedir, $txt)
1128
+				'validate' => function(&$tag, &$data, $disabled, $params) use ($modSettings, $context, $sourcedir, $txt)
1129 1129
 				{
1130 1130
 					$returnContext = '';
1131 1131
 
@@ -1160,7 +1160,7 @@  discard block
 block discarded – undo
1160 1160
 						}
1161 1161
 
1162 1162
 						if ($currentAttachment['thumbnail']['has_thumb'] && empty($params['{width}']) && empty($params['{height}']))
1163
-							$returnContext .= '<a href="'. $currentAttachment['href']. ';image" id="link_'. $currentAttachment['id']. '" onclick="'. $currentAttachment['thumbnail']['javascript']. '"><img src="'. $currentAttachment['thumbnail']['href']. '"' . $alt . $title . ' id="thumb_'. $currentAttachment['id']. '" class="atc_img"></a>';
1163
+							$returnContext .= '<a href="' . $currentAttachment['href'] . ';image" id="link_' . $currentAttachment['id'] . '" onclick="' . $currentAttachment['thumbnail']['javascript'] . '"><img src="' . $currentAttachment['thumbnail']['href'] . '"' . $alt . $title . ' id="thumb_' . $currentAttachment['id'] . '" class="atc_img"></a>';
1164 1164
 						else
1165 1165
 							$returnContext .= '<img src="' . $currentAttachment['href'] . ';image"' . $alt . $title . $width . $height . ' class="bbc_img"/>';
1166 1166
 					}
@@ -1189,7 +1189,7 @@  discard block
 block discarded – undo
1189 1189
 				'type' => 'unparsed_content',
1190 1190
 				'content' => '<div class="codeheader"><span class="code floatleft">' . $txt['code'] . '</span> <a class="codeoperation smf_select_text">' . $txt['code_select'] . '</a></div><code class="bbc_code">$1</code>',
1191 1191
 				// @todo Maybe this can be simplified?
1192
-				'validate' => isset($disabled['code']) ? null : function (&$tag, &$data, $disabled) use ($context)
1192
+				'validate' => isset($disabled['code']) ? null : function(&$tag, &$data, $disabled) use ($context)
1193 1193
 				{
1194 1194
 					if (!isset($disabled['code']))
1195 1195
 					{
@@ -1226,7 +1226,7 @@  discard block
 block discarded – undo
1226 1226
 				'type' => 'unparsed_equals_content',
1227 1227
 				'content' => '<div class="codeheader"><span class="code floatleft">' . $txt['code'] . '</span> ($2) <a class="codeoperation smf_select_text">' . $txt['code_select'] . '</a></div><code class="bbc_code">$1</code>',
1228 1228
 				// @todo Maybe this can be simplified?
1229
-				'validate' => isset($disabled['code']) ? null : function (&$tag, &$data, $disabled) use ($context)
1229
+				'validate' => isset($disabled['code']) ? null : function(&$tag, &$data, $disabled) use ($context)
1230 1230
 				{
1231 1231
 					if (!isset($disabled['code']))
1232 1232
 					{
@@ -1270,7 +1270,7 @@  discard block
 block discarded – undo
1270 1270
 				'type' => 'unparsed_content',
1271 1271
 				'content' => '<a href="mailto:$1" class="bbc_email">$1</a>',
1272 1272
 				// @todo Should this respect guest_hideContacts?
1273
-				'validate' => function (&$tag, &$data, $disabled)
1273
+				'validate' => function(&$tag, &$data, $disabled)
1274 1274
 				{
1275 1275
 					$data = strtr($data, array('<br>' => ''));
1276 1276
 				},
@@ -1289,7 +1289,7 @@  discard block
 block discarded – undo
1289 1289
 				'type' => 'unparsed_commas_content',
1290 1290
 				'test' => '\d+,\d+\]',
1291 1291
 				'content' => '<embed type="application/x-shockwave-flash" src="$1" width="$2" height="$3" play="true" loop="true" quality="high" AllowScriptAccess="never">',
1292
-				'validate' => function (&$tag, &$data, $disabled)
1292
+				'validate' => function(&$tag, &$data, $disabled)
1293 1293
 				{
1294 1294
 					if (isset($disabled['url']))
1295 1295
 						$tag['content'] = '$1';
@@ -1305,7 +1305,7 @@  discard block
 block discarded – undo
1305 1305
 				'test' => '(left|right)(\s+max=\d+(?:%|px|em|rem|ex|pt|pc|ch|vw|vh|vmin|vmax|cm|mm|in)?)?\]',
1306 1306
 				'before' => '<div $1>',
1307 1307
 				'after' => '</div>',
1308
-				'validate' => function (&$tag, &$data, $disabled)
1308
+				'validate' => function(&$tag, &$data, $disabled)
1309 1309
 				{
1310 1310
 					$class = 'class="bbc_float float' . (strpos($data, 'left') === 0 ? 'left' : 'right') . '"';
1311 1311
 
@@ -1354,7 +1354,7 @@  discard block
 block discarded – undo
1354 1354
 					'height' => array('optional' => true, 'value' => ' height="$1"', 'match' => '(\d+)'),
1355 1355
 				),
1356 1356
 				'content' => '<img src="$1" alt="{alt}" title="{title}"{width}{height} class="bbc_img resized">',
1357
-				'validate' => function (&$tag, &$data, $disabled)
1357
+				'validate' => function(&$tag, &$data, $disabled)
1358 1358
 				{
1359 1359
 					global $image_proxy_enabled, $image_proxy_secret, $boardurl;
1360 1360
 
@@ -1377,7 +1377,7 @@  discard block
 block discarded – undo
1377 1377
 				'tag' => 'img',
1378 1378
 				'type' => 'unparsed_content',
1379 1379
 				'content' => '<img src="$1" alt="" class="bbc_img">',
1380
-				'validate' => function (&$tag, &$data, $disabled)
1380
+				'validate' => function(&$tag, &$data, $disabled)
1381 1381
 				{
1382 1382
 					global $image_proxy_enabled, $image_proxy_secret, $boardurl;
1383 1383
 
@@ -1400,7 +1400,7 @@  discard block
 block discarded – undo
1400 1400
 				'tag' => 'iurl',
1401 1401
 				'type' => 'unparsed_content',
1402 1402
 				'content' => '<a href="$1" class="bbc_link">$1</a>',
1403
-				'validate' => function (&$tag, &$data, $disabled)
1403
+				'validate' => function(&$tag, &$data, $disabled)
1404 1404
 				{
1405 1405
 					$data = strtr($data, array('<br>' => ''));
1406 1406
 					$scheme = parse_url($data, PHP_URL_SCHEME);
@@ -1414,7 +1414,7 @@  discard block
 block discarded – undo
1414 1414
 				'quoted' => 'optional',
1415 1415
 				'before' => '<a href="$1" class="bbc_link">',
1416 1416
 				'after' => '</a>',
1417
-				'validate' => function (&$tag, &$data, $disabled)
1417
+				'validate' => function(&$tag, &$data, $disabled)
1418 1418
 				{
1419 1419
 					if (substr($data, 0, 1) == '#')
1420 1420
 						$data = '#post_' . substr($data, 1);
@@ -1494,7 +1494,7 @@  discard block
 block discarded – undo
1494 1494
 				'tag' => 'php',
1495 1495
 				'type' => 'unparsed_content',
1496 1496
 				'content' => '<span class="phpcode">$1</span>',
1497
-				'validate' => isset($disabled['php']) ? null : function (&$tag, &$data, $disabled)
1497
+				'validate' => isset($disabled['php']) ? null : function(&$tag, &$data, $disabled)
1498 1498
 				{
1499 1499
 					if (!isset($disabled['php']))
1500 1500
 					{
@@ -1592,7 +1592,7 @@  discard block
 block discarded – undo
1592 1592
 				'test' => '[1-7]\]',
1593 1593
 				'before' => '<span style="font-size: $1;" class="bbc_size">',
1594 1594
 				'after' => '</span>',
1595
-				'validate' => function (&$tag, &$data, $disabled)
1595
+				'validate' => function(&$tag, &$data, $disabled)
1596 1596
 				{
1597 1597
 					$sizes = array(1 => 0.7, 2 => 1.0, 3 => 1.35, 4 => 1.45, 5 => 2.0, 6 => 2.65, 7 => 3.95);
1598 1598
 					$data = $sizes[$data] . 'em';
@@ -1630,7 +1630,7 @@  discard block
 block discarded – undo
1630 1630
 				'tag' => 'time',
1631 1631
 				'type' => 'unparsed_content',
1632 1632
 				'content' => '$1',
1633
-				'validate' => function (&$tag, &$data, $disabled)
1633
+				'validate' => function(&$tag, &$data, $disabled)
1634 1634
 				{
1635 1635
 					if (is_numeric($data))
1636 1636
 						$data = timeformat($data);
@@ -1658,7 +1658,7 @@  discard block
 block discarded – undo
1658 1658
 				'tag' => 'url',
1659 1659
 				'type' => 'unparsed_content',
1660 1660
 				'content' => '<a href="$1" class="bbc_link" target="_blank">$1</a>',
1661
-				'validate' => function (&$tag, &$data, $disabled)
1661
+				'validate' => function(&$tag, &$data, $disabled)
1662 1662
 				{
1663 1663
 					$data = strtr($data, array('<br>' => ''));
1664 1664
 					$scheme = parse_url($data, PHP_URL_SCHEME);
@@ -1672,7 +1672,7 @@  discard block
 block discarded – undo
1672 1672
 				'quoted' => 'optional',
1673 1673
 				'before' => '<a href="$1" class="bbc_link" target="_blank">',
1674 1674
 				'after' => '</a>',
1675
-				'validate' => function (&$tag, &$data, $disabled)
1675
+				'validate' => function(&$tag, &$data, $disabled)
1676 1676
 				{
1677 1677
 					$scheme = parse_url($data, PHP_URL_SCHEME);
1678 1678
 					if (empty($scheme))
@@ -1698,7 +1698,7 @@  discard block
 block discarded – undo
1698 1698
 		{
1699 1699
 			if (isset($temp_bbc))
1700 1700
 				$bbc_codes = $temp_bbc;
1701
-			usort($codes, function ($a, $b) {
1701
+			usort($codes, function($a, $b) {
1702 1702
 				return strcmp($a['tag'], $b['tag']);
1703 1703
 			});
1704 1704
 			return $codes;
@@ -1936,7 +1936,7 @@  discard block
 block discarded – undo
1936 1936
 										# a run of Unicode domain name characters and a dot
1937 1937
 										[\p{L}\p{M}\p{N}\-.:@]+\.
1938 1938
 										# and then a TLD valid in the DNS or the reserved "local" TLD
1939
-										(?:'. $modSettings['tld_regex'] .'|local)
1939
+										(?:'. $modSettings['tld_regex'] . '|local)
1940 1940
 									)
1941 1941
 									# followed by a non-domain character or end of line
1942 1942
 									(?=[^\p{L}\p{N}\-.]|$)
@@ -2004,7 +2004,7 @@  discard block
 block discarded – undo
2004 2004
 						)?
2005 2005
 						';
2006 2006
 
2007
-						$data = preg_replace_callback('~' . $url_regex . '~xi' . ($context['utf8'] ? 'u' : ''), function ($matches) {
2007
+						$data = preg_replace_callback('~' . $url_regex . '~xi' . ($context['utf8'] ? 'u' : ''), function($matches) {
2008 2008
 							$url = array_shift($matches);
2009 2009
 
2010 2010
 							$scheme = parse_url($url, PHP_URL_SCHEME);
@@ -2741,7 +2741,7 @@  discard block
 block discarded – undo
2741 2741
 		for ($i = 0, $n = count($smileysfrom); $i < $n; $i++)
2742 2742
 		{
2743 2743
 			$specialChars = $smcFunc['htmlspecialchars']($smileysfrom[$i], ENT_QUOTES);
2744
-			$smileyCode = '<img src="' . $smileys_path . $smileysto[$i] . '" alt="' . strtr($specialChars, array(':' => '&#58;', '(' => '&#40;', ')' => '&#41;', '$' => '&#36;', '[' => '&#091;')). '" title="' . strtr($smcFunc['htmlspecialchars']($smileysdescs[$i]), array(':' => '&#58;', '(' => '&#40;', ')' => '&#41;', '$' => '&#36;', '[' => '&#091;')) . '" class="smiley">';
2744
+			$smileyCode = '<img src="' . $smileys_path . $smileysto[$i] . '" alt="' . strtr($specialChars, array(':' => '&#58;', '(' => '&#40;', ')' => '&#41;', '$' => '&#36;', '[' => '&#091;')) . '" title="' . strtr($smcFunc['htmlspecialchars']($smileysdescs[$i]), array(':' => '&#58;', '(' => '&#40;', ')' => '&#41;', '$' => '&#36;', '[' => '&#091;')) . '" class="smiley">';
2745 2745
 
2746 2746
 			$smileyPregReplacements[$smileysfrom[$i]] = $smileyCode;
2747 2747
 
@@ -2758,7 +2758,7 @@  discard block
 block discarded – undo
2758 2758
 
2759 2759
 	// Replace away!
2760 2760
 	$message = preg_replace_callback($smileyPregSearch,
2761
-		function ($matches) use ($smileyPregReplacements)
2761
+		function($matches) use ($smileyPregReplacements)
2762 2762
 		{
2763 2763
 			return $smileyPregReplacements[$matches[1]];
2764 2764
 		}, $message);
@@ -2824,13 +2824,13 @@  discard block
 block discarded – undo
2824 2824
 	{
2825 2825
 		if (defined('SID') && SID != '')
2826 2826
 			$setLocation = preg_replace_callback('~^' . preg_quote($scripturl, '/') . '\?(?:' . SID . '(?:;|&|&amp;))((?:board|topic)=[^#]+?)(#[^"]*?)?$~',
2827
-				function ($m) use ($scripturl)
2827
+				function($m) use ($scripturl)
2828 2828
 				{
2829
-					return $scripturl . '/' . strtr("$m[1]", '&;=', '//,') . '.html?' . SID. (isset($m[2]) ? "$m[2]" : "");
2829
+					return $scripturl . '/' . strtr("$m[1]", '&;=', '//,') . '.html?' . SID . (isset($m[2]) ? "$m[2]" : "");
2830 2830
 				}, $setLocation);
2831 2831
 		else
2832 2832
 			$setLocation = preg_replace_callback('~^' . preg_quote($scripturl, '/') . '\?((?:board|topic)=[^#"]+?)(#[^"]*?)?$~',
2833
-				function ($m) use ($scripturl)
2833
+				function($m) use ($scripturl)
2834 2834
 				{
2835 2835
 					return $scripturl . '/' . strtr("$m[1]", '&;=', '//,') . '.html' . (isset($m[2]) ? "$m[2]" : "");
2836 2836
 				}, $setLocation);
@@ -3153,7 +3153,7 @@  discard block
 block discarded – undo
3153 3153
 
3154 3154
 	// Add a generic "Are you sure?" confirmation message.
3155 3155
 	addInlineJavaScript('
3156
-	var smf_you_sure =' . JavaScriptEscape($txt['quickmod_confirm']) .';');
3156
+	var smf_you_sure =' . JavaScriptEscape($txt['quickmod_confirm']) . ';');
3157 3157
 
3158 3158
 	// Now add the capping code for avatars.
3159 3159
 	if (!empty($modSettings['avatar_max_width_external']) && !empty($modSettings['avatar_max_height_external']) && !empty($modSettings['avatar_action_too_large']) && $modSettings['avatar_action_too_large'] == 'option_css_resize')
@@ -3514,7 +3514,7 @@  discard block
 block discarded – undo
3514 3514
 
3515 3515
 		else
3516 3516
 			echo '
3517
-	<script src="', $settings['theme_url'] ,'/scripts/minified', ($do_deferred ? '_deferred' : '') ,'.js', $minSeed ,'"></script>';
3517
+	<script src="', $settings['theme_url'], '/scripts/minified', ($do_deferred ? '_deferred' : ''), '.js', $minSeed, '"></script>';
3518 3518
 	}
3519 3519
 
3520 3520
 	// Inline JavaScript - Actually useful some times!
@@ -3592,14 +3592,14 @@  discard block
 block discarded – undo
3592 3592
 
3593 3593
 		else
3594 3594
 			echo '
3595
-	<link rel="stylesheet" href="', $settings['theme_url'] ,'/css/minified.css', $minSeed ,'">';
3595
+	<link rel="stylesheet" href="', $settings['theme_url'], '/css/minified.css', $minSeed, '">';
3596 3596
 	}
3597 3597
 
3598 3598
 	// Print the rest after the minified files.
3599 3599
 	if (!empty($normal))
3600 3600
 		foreach ($normal as $nf)
3601 3601
 			echo '
3602
-	<link rel="stylesheet" href="', $nf ,'">';
3602
+	<link rel="stylesheet" href="', $nf, '">';
3603 3603
 
3604 3604
 	if ($db_show_debug === true)
3605 3605
 	{
@@ -3615,7 +3615,7 @@  discard block
 block discarded – undo
3615 3615
 	<style>';
3616 3616
 
3617 3617
 		foreach ($context['css_header'] as $css)
3618
-			echo $css .'
3618
+			echo $css . '
3619 3619
 	';
3620 3620
 
3621 3621
 		echo'
@@ -3644,27 +3644,27 @@  discard block
 block discarded – undo
3644 3644
 		return false;
3645 3645
 
3646 3646
 	// Did we already did this?
3647
-	$toCache = cache_get_data('minimized_'. $settings['theme_id'] .'_'. $type, 86400);
3647
+	$toCache = cache_get_data('minimized_' . $settings['theme_id'] . '_' . $type, 86400);
3648 3648
 
3649 3649
 	// Already done?
3650 3650
 	if (!empty($toCache))
3651 3651
 		return true;
3652 3652
 
3653 3653
 	// No namespaces, sorry!
3654
-	$classType = 'MatthiasMullie\\Minify\\'. strtoupper($type);
3654
+	$classType = 'MatthiasMullie\\Minify\\' . strtoupper($type);
3655 3655
 
3656 3656
 	// Temp path.
3657
-	$cTempPath = $settings['theme_dir'] .'/'. ($type == 'css' ? 'css' : 'scripts') .'/';
3657
+	$cTempPath = $settings['theme_dir'] . '/' . ($type == 'css' ? 'css' : 'scripts') . '/';
3658 3658
 
3659 3659
 	// What kind of file are we going to create?
3660
-	$toCreate = $cTempPath .'minified'. ($do_deferred ? '_deferred' : '') .'.'. $type;
3660
+	$toCreate = $cTempPath . 'minified' . ($do_deferred ? '_deferred' : '') . '.' . $type;
3661 3661
 
3662 3662
 	// File has to exists, if it isn't try to create it.
3663 3663
 	if ((!file_exists($toCreate) && @fopen($toCreate, 'w') === false) || !smf_chmod($toCreate))
3664 3664
 	{
3665 3665
 		loadLanguage('Errors');
3666 3666
 		log_error(sprintf($txt['file_not_created'], $toCreate), 'general');
3667
-		cache_put_data('minimized_'. $settings['theme_id'] .'_'. $type, null);
3667
+		cache_put_data('minimized_' . $settings['theme_id'] . '_' . $type, null);
3668 3668
 
3669 3669
 		// The process failed so roll back to print each individual file.
3670 3670
 		return $data;
@@ -3699,14 +3699,14 @@  discard block
 block discarded – undo
3699 3699
 	{
3700 3700
 		loadLanguage('Errors');
3701 3701
 		log_error(sprintf($txt['file_not_created'], $toCreate), 'general');
3702
-		cache_put_data('minimized_'. $settings['theme_id'] .'_'. $type, null);
3702
+		cache_put_data('minimized_' . $settings['theme_id'] . '_' . $type, null);
3703 3703
 
3704 3704
 		// The process failed so roll back to print each individual file.
3705 3705
 		return $data;
3706 3706
 	}
3707 3707
 
3708 3708
 	// And create a long lived cache entry.
3709
-	cache_put_data('minimized_'. $settings['theme_id'] .'_'. $type, $toCreate, 86400);
3709
+	cache_put_data('minimized_' . $settings['theme_id'] . '_' . $type, $toCreate, 86400);
3710 3710
 
3711 3711
 	return true;
3712 3712
 }
@@ -3766,7 +3766,7 @@  discard block
 block discarded – undo
3766 3766
 	else
3767 3767
 		$path = $modSettings['attachmentUploadDir'];
3768 3768
 
3769
-	return $path . '/' . $attachment_id . '_' . $file_hash .'.dat';
3769
+	return $path . '/' . $attachment_id . '_' . $file_hash . '.dat';
3770 3770
 }
3771 3771
 
3772 3772
 /**
@@ -3810,10 +3810,10 @@  discard block
 block discarded – undo
3810 3810
 		$valid_low = isValidIP($ip_parts[0]);
3811 3811
 		$valid_high = isValidIP($ip_parts[1]);
3812 3812
 		$count = 0;
3813
-		$mode = (preg_match('/:/',$ip_parts[0]) > 0 ? ':' : '.');
3813
+		$mode = (preg_match('/:/', $ip_parts[0]) > 0 ? ':' : '.');
3814 3814
 		$max = ($mode == ':' ? 'ffff' : '255');
3815 3815
 		$min = 0;
3816
-		if(!$valid_low)
3816
+		if (!$valid_low)
3817 3817
 		{
3818 3818
 			$ip_parts[0] = preg_replace('/\*/', '0', $ip_parts[0]);
3819 3819
 			$valid_low = isValidIP($ip_parts[0]);
@@ -3827,7 +3827,7 @@  discard block
 block discarded – undo
3827 3827
 		}
3828 3828
 
3829 3829
 		$count = 0;
3830
-		if(!$valid_high)
3830
+		if (!$valid_high)
3831 3831
 		{
3832 3832
 			$ip_parts[1] = preg_replace('/\*/', $max, $ip_parts[1]);
3833 3833
 			$valid_high = isValidIP($ip_parts[1]);
@@ -3840,7 +3840,7 @@  discard block
 block discarded – undo
3840 3840
 			}
3841 3841
 		}
3842 3842
 
3843
-		if($valid_high && $valid_low)
3843
+		if ($valid_high && $valid_low)
3844 3844
 		{
3845 3845
 			$ip_array['low'] = $ip_parts[0];
3846 3846
 			$ip_array['high'] = $ip_parts[1];
@@ -4022,7 +4022,7 @@  discard block
 block discarded – undo
4022 4022
 		addInlineJavaScript('
4023 4023
 	var user_menus = new smc_PopupMenu();
4024 4024
 	user_menus.add("profile", "' . $scripturl . '?action=profile;area=popup");
4025
-	user_menus.add("alerts", "' . $scripturl . '?action=profile;area=alerts_popup;u='. $context['user']['id'] .'");', true);
4025
+	user_menus.add("alerts", "' . $scripturl . '?action=profile;area=alerts_popup;u=' . $context['user']['id'] . '");', true);
4026 4026
 		if ($context['allow_pm'])
4027 4027
 			addInlineJavaScript('
4028 4028
 	user_menus.add("pm", "' . $scripturl . '?action=pm;sa=popup");', true);
@@ -4644,7 +4644,7 @@  discard block
 block discarded – undo
4644 4644
 		// No? try a fallback to $sourcedir
4645 4645
 		else
4646 4646
 		{
4647
-			$absPath = $sourcedir .'/'. $file;
4647
+			$absPath = $sourcedir . '/' . $file;
4648 4648
 
4649 4649
 			if (file_exists($absPath))
4650 4650
 				require_once($absPath);
@@ -4725,15 +4725,15 @@  discard block
 block discarded – undo
4725 4725
 
4726 4726
 	// UTF-8 occurences of MS special characters
4727 4727
 	$findchars_utf8 = array(
4728
-		"\xe2\x80\x9a",	// single low-9 quotation mark
4729
-		"\xe2\x80\x9e",	// double low-9 quotation mark
4730
-		"\xe2\x80\xa6",	// horizontal ellipsis
4731
-		"\xe2\x80\x98",	// left single curly quote
4732
-		"\xe2\x80\x99",	// right single curly quote
4733
-		"\xe2\x80\x9c",	// left double curly quote
4734
-		"\xe2\x80\x9d",	// right double curly quote
4735
-		"\xe2\x80\x93",	// en dash
4736
-		"\xe2\x80\x94",	// em dash
4728
+		"\xe2\x80\x9a", // single low-9 quotation mark
4729
+		"\xe2\x80\x9e", // double low-9 quotation mark
4730
+		"\xe2\x80\xa6", // horizontal ellipsis
4731
+		"\xe2\x80\x98", // left single curly quote
4732
+		"\xe2\x80\x99", // right single curly quote
4733
+		"\xe2\x80\x9c", // left double curly quote
4734
+		"\xe2\x80\x9d", // right double curly quote
4735
+		"\xe2\x80\x93", // en dash
4736
+		"\xe2\x80\x94", // em dash
4737 4737
 	);
4738 4738
 
4739 4739
 	// windows 1252 / iso equivalents
@@ -4751,15 +4751,15 @@  discard block
 block discarded – undo
4751 4751
 
4752 4752
 	// safe replacements
4753 4753
 	$replacechars = array(
4754
-		',',	// &sbquo;
4755
-		',,',	// &bdquo;
4756
-		'...',	// &hellip;
4757
-		"'",	// &lsquo;
4758
-		"'",	// &rsquo;
4759
-		'"',	// &ldquo;
4760
-		'"',	// &rdquo;
4761
-		'-',	// &ndash;
4762
-		'--',	// &mdash;
4754
+		',', // &sbquo;
4755
+		',,', // &bdquo;
4756
+		'...', // &hellip;
4757
+		"'", // &lsquo;
4758
+		"'", // &rsquo;
4759
+		'"', // &ldquo;
4760
+		'"', // &rdquo;
4761
+		'-', // &ndash;
4762
+		'--', // &mdash;
4763 4763
 	);
4764 4764
 
4765 4765
 	if ($context['utf8'])
@@ -5177,7 +5177,7 @@  discard block
 block discarded – undo
5177 5177
  */
5178 5178
 function inet_dtop($bin)
5179 5179
 {
5180
-	if(empty($bin))
5180
+	if (empty($bin))
5181 5181
 		return '';
5182 5182
 
5183 5183
 	global $db_type;
@@ -5208,28 +5208,28 @@  discard block
 block discarded – undo
5208 5208
  */
5209 5209
 function _safe_serialize($value)
5210 5210
 {
5211
-	if(is_null($value))
5211
+	if (is_null($value))
5212 5212
 		return 'N;';
5213 5213
 
5214
-	if(is_bool($value))
5215
-		return 'b:'. (int) $value .';';
5214
+	if (is_bool($value))
5215
+		return 'b:' . (int) $value . ';';
5216 5216
 
5217
-	if(is_int($value))
5218
-		return 'i:'. $value .';';
5217
+	if (is_int($value))
5218
+		return 'i:' . $value . ';';
5219 5219
 
5220
-	if(is_float($value))
5221
-		return 'd:'. str_replace(',', '.', $value) .';';
5220
+	if (is_float($value))
5221
+		return 'd:' . str_replace(',', '.', $value) . ';';
5222 5222
 
5223
-	if(is_string($value))
5224
-		return 's:'. strlen($value) .':"'. $value .'";';
5223
+	if (is_string($value))
5224
+		return 's:' . strlen($value) . ':"' . $value . '";';
5225 5225
 
5226
-	if(is_array($value))
5226
+	if (is_array($value))
5227 5227
 	{
5228 5228
 		$out = '';
5229
-		foreach($value as $k => $v)
5229
+		foreach ($value as $k => $v)
5230 5230
 			$out .= _safe_serialize($k) . _safe_serialize($v);
5231 5231
 
5232
-		return 'a:'. count($value) .':{'. $out .'}';
5232
+		return 'a:' . count($value) . ':{' . $out . '}';
5233 5233
 	}
5234 5234
 
5235 5235
 	// safe_serialize cannot serialize resources or objects.
@@ -5271,7 +5271,7 @@  discard block
 block discarded – undo
5271 5271
 function _safe_unserialize($str)
5272 5272
 {
5273 5273
 	// Input  is not a string.
5274
-	if(empty($str) || !is_string($str))
5274
+	if (empty($str) || !is_string($str))
5275 5275
 		return false;
5276 5276
 
5277 5277
 	$stack = array();
@@ -5285,40 +5285,40 @@  discard block
 block discarded – undo
5285 5285
 	 *   3 - in array, expecting value or another array
5286 5286
 	 */
5287 5287
 	$state = 0;
5288
-	while($state != 1)
5288
+	while ($state != 1)
5289 5289
 	{
5290 5290
 		$type = isset($str[0]) ? $str[0] : '';
5291
-		if($type == '}')
5291
+		if ($type == '}')
5292 5292
 			$str = substr($str, 1);
5293 5293
 
5294
-		else if($type == 'N' && $str[1] == ';')
5294
+		else if ($type == 'N' && $str[1] == ';')
5295 5295
 		{
5296 5296
 			$value = null;
5297 5297
 			$str = substr($str, 2);
5298 5298
 		}
5299
-		else if($type == 'b' && preg_match('/^b:([01]);/', $str, $matches))
5299
+		else if ($type == 'b' && preg_match('/^b:([01]);/', $str, $matches))
5300 5300
 		{
5301 5301
 			$value = $matches[1] == '1' ? true : false;
5302 5302
 			$str = substr($str, 4);
5303 5303
 		}
5304
-		else if($type == 'i' && preg_match('/^i:(-?[0-9]+);(.*)/s', $str, $matches))
5304
+		else if ($type == 'i' && preg_match('/^i:(-?[0-9]+);(.*)/s', $str, $matches))
5305 5305
 		{
5306
-			$value = (int)$matches[1];
5306
+			$value = (int) $matches[1];
5307 5307
 			$str = $matches[2];
5308 5308
 		}
5309
-		else if($type == 'd' && preg_match('/^d:(-?[0-9]+\.?[0-9]*(E[+-][0-9]+)?);(.*)/s', $str, $matches))
5309
+		else if ($type == 'd' && preg_match('/^d:(-?[0-9]+\.?[0-9]*(E[+-][0-9]+)?);(.*)/s', $str, $matches))
5310 5310
 		{
5311
-			$value = (float)$matches[1];
5311
+			$value = (float) $matches[1];
5312 5312
 			$str = $matches[3];
5313 5313
 		}
5314
-		else if($type == 's' && preg_match('/^s:([0-9]+):"(.*)/s', $str, $matches) && substr($matches[2], (int)$matches[1], 2) == '";')
5314
+		else if ($type == 's' && preg_match('/^s:([0-9]+):"(.*)/s', $str, $matches) && substr($matches[2], (int) $matches[1], 2) == '";')
5315 5315
 		{
5316
-			$value = substr($matches[2], 0, (int)$matches[1]);
5317
-			$str = substr($matches[2], (int)$matches[1] + 2);
5316
+			$value = substr($matches[2], 0, (int) $matches[1]);
5317
+			$str = substr($matches[2], (int) $matches[1] + 2);
5318 5318
 		}
5319
-		else if($type == 'a' && preg_match('/^a:([0-9]+):{(.*)/s', $str, $matches))
5319
+		else if ($type == 'a' && preg_match('/^a:([0-9]+):{(.*)/s', $str, $matches))
5320 5320
 		{
5321
-			$expectedLength = (int)$matches[1];
5321
+			$expectedLength = (int) $matches[1];
5322 5322
 			$str = $matches[2];
5323 5323
 		}
5324 5324
 
@@ -5326,10 +5326,10 @@  discard block
 block discarded – undo
5326 5326
 		else
5327 5327
 			return false;
5328 5328
 
5329
-		switch($state)
5329
+		switch ($state)
5330 5330
 		{
5331 5331
 			case 3: // In array, expecting value or another array.
5332
-				if($type == 'a')
5332
+				if ($type == 'a')
5333 5333
 				{
5334 5334
 					$stack[] = &$list;
5335 5335
 					$list[$key] = array();
@@ -5338,7 +5338,7 @@  discard block
 block discarded – undo
5338 5338
 					$state = 2;
5339 5339
 					break;
5340 5340
 				}
5341
-				if($type != '}')
5341
+				if ($type != '}')
5342 5342
 				{
5343 5343
 					$list[$key] = $value;
5344 5344
 					$state = 2;
@@ -5349,29 +5349,29 @@  discard block
 block discarded – undo
5349 5349
 				return false;
5350 5350
 
5351 5351
 			case 2: // in array, expecting end of array or a key
5352
-				if($type == '}')
5352
+				if ($type == '}')
5353 5353
 				{
5354 5354
 					// Array size is less than expected.
5355
-					if(count($list) < end($expected))
5355
+					if (count($list) < end($expected))
5356 5356
 						return false;
5357 5357
 
5358 5358
 					unset($list);
5359
-					$list = &$stack[count($stack)-1];
5359
+					$list = &$stack[count($stack) - 1];
5360 5360
 					array_pop($stack);
5361 5361
 
5362 5362
 					// Go to terminal state if we're at the end of the root array.
5363 5363
 					array_pop($expected);
5364 5364
 
5365
-					if(count($expected) == 0)
5365
+					if (count($expected) == 0)
5366 5366
 						$state = 1;
5367 5367
 
5368 5368
 					break;
5369 5369
 				}
5370 5370
 
5371
-				if($type == 'i' || $type == 's')
5371
+				if ($type == 'i' || $type == 's')
5372 5372
 				{
5373 5373
 					// Array size exceeds expected length.
5374
-					if(count($list) >= end($expected))
5374
+					if (count($list) >= end($expected))
5375 5375
 						return false;
5376 5376
 
5377 5377
 					$key = $value;
@@ -5384,7 +5384,7 @@  discard block
 block discarded – undo
5384 5384
 
5385 5385
 			// Expecting array or value.
5386 5386
 			case 0:
5387
-				if($type == 'a')
5387
+				if ($type == 'a')
5388 5388
 				{
5389 5389
 					$data = array();
5390 5390
 					$list = &$data;
@@ -5393,7 +5393,7 @@  discard block
 block discarded – undo
5393 5393
 					break;
5394 5394
 				}
5395 5395
 
5396
-				if($type != '}')
5396
+				if ($type != '}')
5397 5397
 				{
5398 5398
 					$data = $value;
5399 5399
 					$state = 1;
@@ -5406,7 +5406,7 @@  discard block
 block discarded – undo
5406 5406
 	}
5407 5407
 
5408 5408
 	// Trailing data in input.
5409
-	if(!empty($str))
5409
+	if (!empty($str))
5410 5410
 		return false;
5411 5411
 
5412 5412
 	return $data;
@@ -5460,7 +5460,7 @@  discard block
 block discarded – undo
5460 5460
 	// Set different modes.
5461 5461
 	$chmodValues = $isDir ? array(0750, 0755, 0775, 0777) : array(0644, 0664, 0666);
5462 5462
 
5463
-	foreach($chmodValues as $val)
5463
+	foreach ($chmodValues as $val)
5464 5464
 	{
5465 5465
 		// If it's writable, break out of the loop.
5466 5466
 		if (is_writable($file))
@@ -5495,13 +5495,13 @@  discard block
 block discarded – undo
5495 5495
 	$returnArray = @json_decode($json, $returnAsArray);
5496 5496
 
5497 5497
 	// PHP 5.3 so no json_last_error_msg()
5498
-	switch(json_last_error())
5498
+	switch (json_last_error())
5499 5499
 	{
5500 5500
 		case JSON_ERROR_NONE:
5501 5501
 			$jsonError = false;
5502 5502
 			break;
5503 5503
 		case JSON_ERROR_DEPTH:
5504
-			$jsonError =  'JSON_ERROR_DEPTH';
5504
+			$jsonError = 'JSON_ERROR_DEPTH';
5505 5505
 			break;
5506 5506
 		case JSON_ERROR_STATE_MISMATCH:
5507 5507
 			$jsonError = 'JSON_ERROR_STATE_MISMATCH';
@@ -5529,10 +5529,10 @@  discard block
 block discarded – undo
5529 5529
 		loadLanguage('Errors');
5530 5530
 
5531 5531
 		if (!empty($jsonDebug))
5532
-			log_error($txt['json_'. $jsonError], 'critical', $jsonDebug['file'], $jsonDebug['line']);
5532
+			log_error($txt['json_' . $jsonError], 'critical', $jsonDebug['file'], $jsonDebug['line']);
5533 5533
 
5534 5534
 		else
5535
-			log_error($txt['json_'. $jsonError], 'critical');
5535
+			log_error($txt['json_' . $jsonError], 'critical');
5536 5536
 
5537 5537
 		// Everyone expects an array.
5538 5538
 		return array();
@@ -5636,7 +5636,7 @@  discard block
 block discarded – undo
5636 5636
 		});
5637 5637
 
5638 5638
 		// Convert Punycode to Unicode
5639
-		$tlds = array_map(function ($input) {
5639
+		$tlds = array_map(function($input) {
5640 5640
 			$prefix = 'xn--';
5641 5641
 			$safe_char = 0xFFFC;
5642 5642
 			$base = 36;
@@ -5652,7 +5652,7 @@  discard block
 block discarded – undo
5652 5652
 
5653 5653
 			foreach ($enco_parts as $encoded)
5654 5654
 			{
5655
-				if (strpos($encoded,$prefix) !== 0 || strlen(trim(str_replace($prefix,'',$encoded))) == 0)
5655
+				if (strpos($encoded, $prefix) !== 0 || strlen(trim(str_replace($prefix, '', $encoded))) == 0)
5656 5656
 				{
5657 5657
 					$output_parts[] = $encoded;
5658 5658
 					continue;
@@ -5663,7 +5663,7 @@  discard block
 block discarded – undo
5663 5663
 				$idx = 0;
5664 5664
 				$char = 0x80;
5665 5665
 				$decoded = array();
5666
-				$output='';
5666
+				$output = '';
5667 5667
 				$delim_pos = strrpos($encoded, '-');
5668 5668
 
5669 5669
 				if ($delim_pos > strlen($prefix))
@@ -5679,7 +5679,7 @@  discard block
 block discarded – undo
5679 5679
 
5680 5680
 				for ($enco_idx = $delim_pos ? ($delim_pos + 1) : 0; $enco_idx < $enco_len; ++$deco_len)
5681 5681
 				{
5682
-					for ($old_idx = $idx, $w = 1, $k = $base; 1 ; $k += $base)
5682
+					for ($old_idx = $idx, $w = 1, $k = $base; 1; $k += $base)
5683 5683
 					{
5684 5684
 						$cp = ord($encoded{$enco_idx++});
5685 5685
 						$digit = ($cp - 48 < 10) ? $cp - 22 : (($cp - 65 < 26) ? $cp - 65 : (($cp - 97 < 26) ? $cp - 97 : $base));
@@ -5720,15 +5720,15 @@  discard block
 block discarded – undo
5720 5720
 
5721 5721
 					// 2 bytes
5722 5722
 					elseif ($v < (1 << 11))
5723
-						$output .= chr(192+($v >> 6)) . chr(128+($v & 63));
5723
+						$output .= chr(192 + ($v >> 6)) . chr(128 + ($v & 63));
5724 5724
 
5725 5725
 					// 3 bytes
5726 5726
 					elseif ($v < (1 << 16))
5727
-						$output .= chr(224+($v >> 12)) . chr(128+(($v >> 6) & 63)) . chr(128+($v & 63));
5727
+						$output .= chr(224 + ($v >> 12)) . chr(128 + (($v >> 6) & 63)) . chr(128 + ($v & 63));
5728 5728
 
5729 5729
 					// 4 bytes
5730 5730
 					elseif ($v < (1 << 21))
5731
-						$output .= chr(240+($v >> 18)) . chr(128+(($v >> 12) & 63)) . chr(128+(($v >> 6) & 63)) . chr(128+($v & 63));
5731
+						$output .= chr(240 + ($v >> 18)) . chr(128 + (($v >> 12) & 63)) . chr(128 + (($v >> 6) & 63)) . chr(128 + ($v & 63));
5732 5732
 
5733 5733
 					//  'Conversion from UCS-4 to UTF-8 failed: malformed input at byte '.$k
5734 5734
 					else
@@ -5835,7 +5835,7 @@  discard block
 block discarded – undo
5835 5835
 	}
5836 5836
 
5837 5837
 	// This recursive function creates the index array from the strings
5838
-	$add_string_to_index = function ($string, $index) use (&$strlen, &$substr, &$add_string_to_index)
5838
+	$add_string_to_index = function($string, $index) use (&$strlen, &$substr, &$add_string_to_index)
5839 5839
 	{
5840 5840
 		static $depth = 0;
5841 5841
 		$depth++;
@@ -5862,7 +5862,7 @@  discard block
 block discarded – undo
5862 5862
 	};
5863 5863
 
5864 5864
 	// This recursive function turns the index array into a regular expression
5865
-	$index_to_regex = function (&$index, $delim) use (&$strlen, &$index_to_regex)
5865
+	$index_to_regex = function(&$index, $delim) use (&$strlen, &$index_to_regex)
5866 5866
 	{
5867 5867
 		static $depth = 0;
5868 5868
 		$depth++;
@@ -5886,11 +5886,11 @@  discard block
 block discarded – undo
5886 5886
 
5887 5887
 				if (count(array_keys($value)) == 1)
5888 5888
 				{
5889
-					$new_key_array = explode('(?'.'>', $sub_regex);
5889
+					$new_key_array = explode('(?' . '>', $sub_regex);
5890 5890
 					$new_key .= $new_key_array[0];
5891 5891
 				}
5892 5892
 				else
5893
-					$sub_regex = '(?'.'>' . $sub_regex . ')';
5893
+					$sub_regex = '(?' . '>' . $sub_regex . ')';
5894 5894
 			}
5895 5895
 
5896 5896
 			if ($depth > 1)
@@ -5930,7 +5930,7 @@  discard block
 block discarded – undo
5930 5930
 		$index = $add_string_to_index($string, $index);
5931 5931
 
5932 5932
 	while (!empty($index))
5933
-		$regexes[] = '(?'.'>' . $index_to_regex($index, $delim) . ')';
5933
+		$regexes[] = '(?' . '>' . $index_to_regex($index, $delim) . ')';
5934 5934
 
5935 5935
 	// Restore PHP's internal character encoding to whatever it was originally
5936 5936
 	if (!empty($current_encoding))
Please login to merge, or discard this patch.
Braces   +1321 added lines, -983 removed lines patch added patch discarded remove patch
@@ -13,8 +13,9 @@  discard block
 block discarded – undo
13 13
  * @version 2.1 Beta 4
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
  * Update some basic statistics.
@@ -122,10 +123,11 @@  discard block
 block discarded – undo
122 123
 						$smcFunc['db_free_result']($result);
123 124
 
124 125
 						// Add this to the number of unapproved members
125
-						if (!empty($changes['unapprovedMembers']))
126
-							$changes['unapprovedMembers'] += $coppa_approvals;
127
-						else
128
-							$changes['unapprovedMembers'] = $coppa_approvals;
126
+						if (!empty($changes['unapprovedMembers'])) {
127
+													$changes['unapprovedMembers'] += $coppa_approvals;
128
+						} else {
129
+													$changes['unapprovedMembers'] = $coppa_approvals;
130
+						}
129 131
 					}
130 132
 				}
131 133
 			}
@@ -133,9 +135,9 @@  discard block
 block discarded – undo
133 135
 			break;
134 136
 
135 137
 		case 'message':
136
-			if ($parameter1 === true && $parameter2 !== null)
137
-				updateSettings(array('totalMessages' => true, 'maxMsgID' => $parameter2), true);
138
-			else
138
+			if ($parameter1 === true && $parameter2 !== null) {
139
+							updateSettings(array('totalMessages' => true, 'maxMsgID' => $parameter2), true);
140
+			} else
139 141
 			{
140 142
 				// SUM and MAX on a smaller table is better for InnoDB tables.
141 143
 				$result = $smcFunc['db_query']('', '
@@ -175,23 +177,25 @@  discard block
 block discarded – undo
175 177
 				$parameter2 = text2words($parameter2);
176 178
 
177 179
 				$inserts = array();
178
-				foreach ($parameter2 as $word)
179
-					$inserts[] = array($word, $parameter1);
180
+				foreach ($parameter2 as $word) {
181
+									$inserts[] = array($word, $parameter1);
182
+				}
180 183
 
181
-				if (!empty($inserts))
182
-					$smcFunc['db_insert']('ignore',
184
+				if (!empty($inserts)) {
185
+									$smcFunc['db_insert']('ignore',
183 186
 						'{db_prefix}log_search_subjects',
184 187
 						array('word' => 'string', 'id_topic' => 'int'),
185 188
 						$inserts,
186 189
 						array('word', 'id_topic')
187 190
 					);
191
+				}
188 192
 			}
189 193
 			break;
190 194
 
191 195
 		case 'topic':
192
-			if ($parameter1 === true)
193
-				updateSettings(array('totalTopics' => true), true);
194
-			else
196
+			if ($parameter1 === true) {
197
+							updateSettings(array('totalTopics' => true), true);
198
+			} else
195 199
 			{
196 200
 				// Get the number of topics - a SUM is better for InnoDB tables.
197 201
 				// We also ignore the recycle bin here because there will probably be a bunch of one-post topics there.
@@ -212,8 +216,9 @@  discard block
 block discarded – undo
212 216
 
213 217
 		case 'postgroups':
214 218
 			// Parameter two is the updated columns: we should check to see if we base groups off any of these.
215
-			if ($parameter2 !== null && !in_array('posts', $parameter2))
216
-				return;
219
+			if ($parameter2 !== null && !in_array('posts', $parameter2)) {
220
+							return;
221
+			}
217 222
 
218 223
 			$postgroups = cache_get_data('updateStats:postgroups', 360);
219 224
 			if ($postgroups == null || $parameter1 == null)
@@ -228,8 +233,9 @@  discard block
 block discarded – undo
228 233
 					)
229 234
 				);
230 235
 				$postgroups = array();
231
-				while ($row = $smcFunc['db_fetch_assoc']($request))
232
-					$postgroups[$row['id_group']] = $row['min_posts'];
236
+				while ($row = $smcFunc['db_fetch_assoc']($request)) {
237
+									$postgroups[$row['id_group']] = $row['min_posts'];
238
+				}
233 239
 				$smcFunc['db_free_result']($request);
234 240
 
235 241
 				// Sort them this way because if it's done with MySQL it causes a filesort :(.
@@ -239,8 +245,9 @@  discard block
 block discarded – undo
239 245
 			}
240 246
 
241 247
 			// Oh great, they've screwed their post groups.
242
-			if (empty($postgroups))
243
-				return;
248
+			if (empty($postgroups)) {
249
+							return;
250
+			}
244 251
 
245 252
 			// Set all membergroups from most posts to least posts.
246 253
 			$conditions = '';
@@ -298,10 +305,9 @@  discard block
 block discarded – undo
298 305
 	{
299 306
 		$condition = 'id_member IN ({array_int:members})';
300 307
 		$parameters['members'] = $members;
301
-	}
302
-	elseif ($members === null)
303
-		$condition = '1=1';
304
-	else
308
+	} elseif ($members === null) {
309
+			$condition = '1=1';
310
+	} else
305 311
 	{
306 312
 		$condition = 'id_member = {int:member}';
307 313
 		$parameters['member'] = $members;
@@ -341,9 +347,9 @@  discard block
 block discarded – undo
341 347
 		if (count($vars_to_integrate) != 0)
342 348
 		{
343 349
 			// Fetch a list of member_names if necessary
344
-			if ((!is_array($members) && $members === $user_info['id']) || (is_array($members) && count($members) == 1 && in_array($user_info['id'], $members)))
345
-				$member_names = array($user_info['username']);
346
-			else
350
+			if ((!is_array($members) && $members === $user_info['id']) || (is_array($members) && count($members) == 1 && in_array($user_info['id'], $members))) {
351
+							$member_names = array($user_info['username']);
352
+			} else
347 353
 			{
348 354
 				$member_names = array();
349 355
 				$request = $smcFunc['db_query']('', '
@@ -352,14 +358,16 @@  discard block
 block discarded – undo
352 358
 					WHERE ' . $condition,
353 359
 					$parameters
354 360
 				);
355
-				while ($row = $smcFunc['db_fetch_assoc']($request))
356
-					$member_names[] = $row['member_name'];
361
+				while ($row = $smcFunc['db_fetch_assoc']($request)) {
362
+									$member_names[] = $row['member_name'];
363
+				}
357 364
 				$smcFunc['db_free_result']($request);
358 365
 			}
359 366
 
360
-			if (!empty($member_names))
361
-				foreach ($vars_to_integrate as $var)
367
+			if (!empty($member_names)) {
368
+							foreach ($vars_to_integrate as $var)
362 369
 					call_integration_hook('integrate_change_member_data', array($member_names, $var, &$data[$var], &$knownInts, &$knownFloats));
370
+			}
363 371
 		}
364 372
 	}
365 373
 
@@ -367,16 +375,17 @@  discard block
 block discarded – undo
367 375
 	foreach ($data as $var => $val)
368 376
 	{
369 377
 		$type = 'string';
370
-		if (in_array($var, $knownInts))
371
-			$type = 'int';
372
-		elseif (in_array($var, $knownFloats))
373
-			$type = 'float';
374
-		elseif ($var == 'birthdate')
375
-			$type = 'date';
376
-		elseif ($var == 'member_ip')
377
-			$type = 'inet';
378
-		elseif ($var == 'member_ip2')
379
-			$type = 'inet';
378
+		if (in_array($var, $knownInts)) {
379
+					$type = 'int';
380
+		} elseif (in_array($var, $knownFloats)) {
381
+					$type = 'float';
382
+		} elseif ($var == 'birthdate') {
383
+					$type = 'date';
384
+		} elseif ($var == 'member_ip') {
385
+					$type = 'inet';
386
+		} elseif ($var == 'member_ip2') {
387
+					$type = 'inet';
388
+		}
380 389
 
381 390
 		// Doing an increment?
382 391
 		if ($type == 'int' && ($val === '+' || $val === '-'))
@@ -390,8 +399,9 @@  discard block
 block discarded – undo
390 399
 		{
391 400
 			if (preg_match('~^' . $var . ' (\+ |- |\+ -)([\d]+)~', $val, $match))
392 401
 			{
393
-				if ($match[1] != '+ ')
394
-					$val = 'CASE WHEN ' . $var . ' <= ' . abs($match[2]) . ' THEN 0 ELSE ' . $val . ' END';
402
+				if ($match[1] != '+ ') {
403
+									$val = 'CASE WHEN ' . $var . ' <= ' . abs($match[2]) . ' THEN 0 ELSE ' . $val . ' END';
404
+				}
395 405
 				$type = 'raw';
396 406
 			}
397 407
 		}
@@ -412,8 +422,9 @@  discard block
 block discarded – undo
412 422
 	// Clear any caching?
413 423
 	if (!empty($modSettings['cache_enable']) && $modSettings['cache_enable'] >= 2 && !empty($members))
414 424
 	{
415
-		if (!is_array($members))
416
-			$members = array($members);
425
+		if (!is_array($members)) {
426
+					$members = array($members);
427
+		}
417 428
 
418 429
 		foreach ($members as $member)
419 430
 		{
@@ -446,29 +457,32 @@  discard block
 block discarded – undo
446 457
 {
447 458
 	global $modSettings, $smcFunc;
448 459
 
449
-	if (empty($changeArray) || !is_array($changeArray))
450
-		return;
460
+	if (empty($changeArray) || !is_array($changeArray)) {
461
+			return;
462
+	}
451 463
 
452 464
 	$toRemove = array();
453 465
 
454 466
 	// Go check if there is any setting to be removed.
455
-	foreach ($changeArray as $k => $v)
456
-		if ($v === null)
467
+	foreach ($changeArray as $k => $v) {
468
+			if ($v === null)
457 469
 		{
458 470
 			// Found some, remove them from the original array and add them to ours.
459 471
 			unset($changeArray[$k]);
472
+	}
460 473
 			$toRemove[] = $k;
461 474
 		}
462 475
 
463 476
 	// Proceed with the deletion.
464
-	if (!empty($toRemove))
465
-		$smcFunc['db_query']('', '
477
+	if (!empty($toRemove)) {
478
+			$smcFunc['db_query']('', '
466 479
 			DELETE FROM {db_prefix}settings
467 480
 			WHERE variable IN ({array_string:remove})',
468 481
 			array(
469 482
 				'remove' => $toRemove,
470 483
 			)
471 484
 		);
485
+	}
472 486
 
473 487
 	// In some cases, this may be better and faster, but for large sets we don't want so many UPDATEs.
474 488
 	if ($update)
@@ -497,19 +511,22 @@  discard block
 block discarded – undo
497 511
 	foreach ($changeArray as $variable => $value)
498 512
 	{
499 513
 		// Don't bother if it's already like that ;).
500
-		if (isset($modSettings[$variable]) && $modSettings[$variable] == $value)
501
-			continue;
514
+		if (isset($modSettings[$variable]) && $modSettings[$variable] == $value) {
515
+					continue;
516
+		}
502 517
 		// If the variable isn't set, but would only be set to nothing'ness, then don't bother setting it.
503
-		elseif (!isset($modSettings[$variable]) && empty($value))
504
-			continue;
518
+		elseif (!isset($modSettings[$variable]) && empty($value)) {
519
+					continue;
520
+		}
505 521
 
506 522
 		$replaceArray[] = array($variable, $value);
507 523
 
508 524
 		$modSettings[$variable] = $value;
509 525
 	}
510 526
 
511
-	if (empty($replaceArray))
512
-		return;
527
+	if (empty($replaceArray)) {
528
+			return;
529
+	}
513 530
 
514 531
 	$smcFunc['db_insert']('replace',
515 532
 		'{db_prefix}settings',
@@ -555,20 +572,25 @@  discard block
 block discarded – undo
555 572
 	$start = (int) $start;
556 573
 	$start_invalid = $start < 0;
557 574
 	
558
-	if (!empty($options['low_id']))
559
-		$low_id = $options['low_id'];
560
-	if (!empty($options['max_id']))
561
-		$max_id = $options['max_id'];
575
+	if (!empty($options['low_id'])) {
576
+			$low_id = $options['low_id'];
577
+	}
578
+	if (!empty($options['max_id'])) {
579
+			$max_id = $options['max_id'];
580
+	}
562 581
 
563 582
 	// Make sure $start is a proper variable - not less than 0.
564
-	if ($start_invalid)
565
-		$start = 0;
583
+	if ($start_invalid) {
584
+			$start = 0;
585
+	}
566 586
 	// Not greater than the upper bound.
567
-	elseif ($start >= $max_value)
568
-		$start = max(0, (int) $max_value - (((int) $max_value % (int) $num_per_page) == 0 ? $num_per_page : ((int) $max_value % (int) $num_per_page)));
587
+	elseif ($start >= $max_value) {
588
+			$start = max(0, (int) $max_value - (((int) $max_value % (int) $num_per_page) == 0 ? $num_per_page : ((int) $max_value % (int) $num_per_page)));
589
+	}
569 590
 	// And it has to be a multiple of $num_per_page!
570
-	else
571
-		$start = max(0, (int) $start - ((int) $start % (int) $num_per_page));
591
+	else {
592
+			$start = max(0, (int) $start - ((int) $start % (int) $num_per_page));
593
+	}
572 594
 
573 595
 	$context['current_page'] = $start / $num_per_page;
574 596
 
@@ -596,101 +618,115 @@  discard block
 block discarded – undo
596 618
 	if (empty($modSettings['compactTopicPagesEnable']))
597 619
 	{
598 620
 		// Show the left arrow.
599
-		if (empty($low_id))
600
-			$pageindex .= $start == 0 ? ' ' : sprintf($base_link, $start - $num_per_page, $settings['page_index']['previous_page']);
601
-		else
602
-			$pageindex .= $start == 0 ? ' ' : sprintf($base_link_page, ($start - $num_per_page), $settings['page_index']['previous_page'], 'L'.$low_id);
621
+		if (empty($low_id)) {
622
+					$pageindex .= $start == 0 ? ' ' : sprintf($base_link, $start - $num_per_page, $settings['page_index']['previous_page']);
623
+		} else {
624
+					$pageindex .= $start == 0 ? ' ' : sprintf($base_link_page, ($start - $num_per_page), $settings['page_index']['previous_page'], 'L'.$low_id);
625
+		}
603 626
 		
604 627
 		// Show all the pages.
605 628
 		$display_page = 1;
606
-		for ($counter = 0; $counter < $max_value; $counter += $num_per_page)
607
-			$pageindex .= $start == $counter && !$start_invalid ? sprintf($settings['page_index']['current_page'], $display_page++) : sprintf($base_link, $counter, $display_page++);
629
+		for ($counter = 0; $counter < $max_value; $counter += $num_per_page) {
630
+					$pageindex .= $start == $counter && !$start_invalid ? sprintf($settings['page_index']['current_page'], $display_page++) : sprintf($base_link, $counter, $display_page++);
631
+		}
608 632
 
609 633
 		// Show the right arrow.
610 634
 		$display_page = ($start + $num_per_page) > $max_value ? $max_value : ($start + $num_per_page);
611 635
 		if ($start != $counter - $max_value && !$start_invalid){
612
-			if (empty($max_id))
613
-				$pageindex .= $display_page > $counter - $num_per_page ? ' ' : sprintf($base_link, $display_page, $settings['page_index']['next_page']);
614
-			else
615
-				$pageindex .= $display_page > $counter - $num_per_page ? ' ' : sprintf($base_link_page, $display_page , $settings['page_index']['next_page'], 'M'.$max_id);
636
+			if (empty($max_id)) {
637
+							$pageindex .= $display_page > $counter - $num_per_page ? ' ' : sprintf($base_link, $display_page, $settings['page_index']['next_page']);
638
+			} else {
639
+							$pageindex .= $display_page > $counter - $num_per_page ? ' ' : sprintf($base_link_page, $display_page , $settings['page_index']['next_page'], 'M'.$max_id);
640
+			}
616 641
 		}
617 642
 			
618
-	}
619
-	else
643
+	} else
620 644
 	{
621 645
 		// If they didn't enter an odd value, pretend they did.
622 646
 		$PageContiguous = (int) ($modSettings['compactTopicPagesContiguous'] - ($modSettings['compactTopicPagesContiguous'] % 2)) / 2;
623 647
 
624 648
 		// Show the "prev page" link. (>prev page< 1 ... 6 7 [8] 9 10 ... 15 next page)
625
-		if (!empty($start) && $show_prevnext)
626
-			if (empty($low_id))
649
+		if (!empty($start) && $show_prevnext) {
650
+					if (empty($low_id))
627 651
 				$pageindex .= sprintf($base_link, $start - $num_per_page, $settings['page_index']['previous_page']);
628
-			else
629
-				$pageindex .= sprintf($base_link_page, $start - $num_per_page, $settings['page_index']['previous_page'], 'L'.$low_id);
630
-		else
631
-			$pageindex .= '';
652
+		} else {
653
+							$pageindex .= sprintf($base_link_page, $start - $num_per_page, $settings['page_index']['previous_page'], 'L'.$low_id);
654
+			}
655
+		else {
656
+					$pageindex .= '';
657
+		}
632 658
 
633 659
 		// Show the first page. (prev page >1< ... 6 7 [8] 9 10 ... 15)
634
-		if ($start > $num_per_page * $PageContiguous)
635
-			$pageindex .= sprintf($base_link, 0, '1');
660
+		if ($start > $num_per_page * $PageContiguous) {
661
+					$pageindex .= sprintf($base_link, 0, '1');
662
+		}
636 663
 
637 664
 		// Show the ... after the first page.  (prev page 1 >...< 6 7 [8] 9 10 ... 15 next page)
638
-		if ($start > $num_per_page * ($PageContiguous + 1))
639
-			$pageindex .= strtr($settings['page_index']['expand_pages'], array(
665
+		if ($start > $num_per_page * ($PageContiguous + 1)) {
666
+					$pageindex .= strtr($settings['page_index']['expand_pages'], array(
640 667
 				'{LINK}' => JavaScriptEscape($smcFunc['htmlspecialchars']($base_link)),
641 668
 				'{FIRST_PAGE}' => $num_per_page,
642 669
 				'{LAST_PAGE}' => $start - $num_per_page * $PageContiguous,
643 670
 				'{PER_PAGE}' => $num_per_page,
644 671
 			));
672
+		}
645 673
 
646 674
 		// Show the pages before the current one. (prev page 1 ... >6 7< [8] 9 10 ... 15 next page)
647
-		for ($nCont = $PageContiguous; $nCont >= 1; $nCont--)
648
-			if ($start >= $num_per_page * $nCont)
675
+		for ($nCont = $PageContiguous; $nCont >= 1; $nCont--) {
676
+					if ($start >= $num_per_page * $nCont)
649 677
 			{
650 678
 				$tmpStart = $start - $num_per_page * $nCont;
651
-				if($nCont != 1 || empty($low_id))
652
-					$pageindex .= sprintf($base_link, $tmpStart, $tmpStart / $num_per_page + 1);
653
-				else
654
-					$pageindex .= sprintf($base_link_page, $tmpStart, $tmpStart / $num_per_page + 1, 'L'.$low_id);
679
+		}
680
+				if($nCont != 1 || empty($low_id)) {
681
+									$pageindex .= sprintf($base_link, $tmpStart, $tmpStart / $num_per_page + 1);
682
+				} else {
683
+									$pageindex .= sprintf($base_link_page, $tmpStart, $tmpStart / $num_per_page + 1, 'L'.$low_id);
684
+				}
655 685
 			}
656 686
 
657 687
 		// Show the current page. (prev page 1 ... 6 7 >[8]< 9 10 ... 15 next page)
658
-		if (!$start_invalid)
659
-			$pageindex .= sprintf($settings['page_index']['current_page'], $start / $num_per_page + 1);
660
-		else
661
-			$pageindex .= sprintf($base_link, $start, $start / $num_per_page + 1);
688
+		if (!$start_invalid) {
689
+					$pageindex .= sprintf($settings['page_index']['current_page'], $start / $num_per_page + 1);
690
+		} else {
691
+					$pageindex .= sprintf($base_link, $start, $start / $num_per_page + 1);
692
+		}
662 693
 
663 694
 		// Show the pages after the current one... (prev page 1 ... 6 7 [8] >9 10< ... 15 next page)
664 695
 		$tmpMaxPages = (int) (($max_value - 1) / $num_per_page) * $num_per_page;
665
-		for ($nCont = 1; $nCont <= $PageContiguous; $nCont++)
666
-			if ($start + $num_per_page * $nCont <= $tmpMaxPages)
696
+		for ($nCont = 1; $nCont <= $PageContiguous; $nCont++) {
697
+					if ($start + $num_per_page * $nCont <= $tmpMaxPages)
667 698
 			{
668 699
 				$tmpStart = $start + $num_per_page * $nCont;
669
-				if($nCont != 1 || empty($max_id))
670
-					$pageindex .= sprintf($base_link, $tmpStart, $tmpStart / $num_per_page + 1);
671
-				else
672
-					$pageindex .= sprintf($base_link_page, $tmpStart, $tmpStart / $num_per_page + 1, 'M'.$max_id);
700
+		}
701
+				if($nCont != 1 || empty($max_id)) {
702
+									$pageindex .= sprintf($base_link, $tmpStart, $tmpStart / $num_per_page + 1);
703
+				} else {
704
+									$pageindex .= sprintf($base_link_page, $tmpStart, $tmpStart / $num_per_page + 1, 'M'.$max_id);
705
+				}
673 706
 			}
674 707
 
675 708
 		// Show the '...' part near the end. (prev page 1 ... 6 7 [8] 9 10 >...< 15 next page)
676
-		if ($start + $num_per_page * ($PageContiguous + 1) < $tmpMaxPages)
677
-			$pageindex .= strtr($settings['page_index']['expand_pages'], array(
709
+		if ($start + $num_per_page * ($PageContiguous + 1) < $tmpMaxPages) {
710
+					$pageindex .= strtr($settings['page_index']['expand_pages'], array(
678 711
 				'{LINK}' => JavaScriptEscape($smcFunc['htmlspecialchars']($base_link)),
679 712
 				'{FIRST_PAGE}' => $start + $num_per_page * ($PageContiguous + 1),
680 713
 				'{LAST_PAGE}' => $tmpMaxPages,
681 714
 				'{PER_PAGE}' => $num_per_page,
682 715
 			));
716
+		}
683 717
 
684 718
 		// Show the last number in the list. (prev page 1 ... 6 7 [8] 9 10 ... >15<  next page)
685
-		if ($start + $num_per_page * $PageContiguous < $tmpMaxPages)
686
-			$pageindex .= sprintf($base_link, $tmpMaxPages, $tmpMaxPages / $num_per_page + 1);
719
+		if ($start + $num_per_page * $PageContiguous < $tmpMaxPages) {
720
+					$pageindex .= sprintf($base_link, $tmpMaxPages, $tmpMaxPages / $num_per_page + 1);
721
+		}
687 722
 
688 723
 		// Show the "next page" link. (prev page 1 ... 6 7 [8] 9 10 ... 15 >next page<)
689
-		if ($start != $tmpMaxPages && $show_prevnext)
690
-			if (empty($max_id))
724
+		if ($start != $tmpMaxPages && $show_prevnext) {
725
+					if (empty($max_id))
691 726
 				$pageindex .= sprintf($base_link, $start + $num_per_page, $settings['page_index']['next_page']);
692
-			else
693
-				$pageindex .= sprintf($base_link_page, $start + $num_per_page, $settings['page_index']['next_page'], 'M'.$max_id);
727
+		} else {
728
+							$pageindex .= sprintf($base_link_page, $start + $num_per_page, $settings['page_index']['next_page'], 'M'.$max_id);
729
+			}
694 730
 	}
695 731
 	$pageindex .= $settings['page_index']['extra_after'];
696 732
 
@@ -716,8 +752,9 @@  discard block
 block discarded – undo
716 752
 	if ($decimal_separator === null)
717 753
 	{
718 754
 		// Not set for whatever reason?
719
-		if (empty($txt['number_format']) || preg_match('~^1([^\d]*)?234([^\d]*)(0*?)$~', $txt['number_format'], $matches) != 1)
720
-			return $number;
755
+		if (empty($txt['number_format']) || preg_match('~^1([^\d]*)?234([^\d]*)(0*?)$~', $txt['number_format'], $matches) != 1) {
756
+					return $number;
757
+		}
721 758
 
722 759
 		// Cache these each load...
723 760
 		$thousands_separator = $matches[1];
@@ -751,17 +788,20 @@  discard block
 block discarded – undo
751 788
 	static $local_cache;
752 789
 
753 790
 	// Offset the time.
754
-	if (!$offset_type)
755
-		$time = $log_time + ($user_info['time_offset'] + $modSettings['time_offset']) * 3600;
791
+	if (!$offset_type) {
792
+			$time = $log_time + ($user_info['time_offset'] + $modSettings['time_offset']) * 3600;
793
+	}
756 794
 	// Just the forum offset?
757
-	elseif ($offset_type == 'forum')
758
-		$time = $log_time + $modSettings['time_offset'] * 3600;
759
-	else
760
-		$time = $log_time;
795
+	elseif ($offset_type == 'forum') {
796
+			$time = $log_time + $modSettings['time_offset'] * 3600;
797
+	} else {
798
+			$time = $log_time;
799
+	}
761 800
 
762 801
 	// We can't have a negative date (on Windows, at least.)
763
-	if ($log_time < 0)
764
-		$log_time = 0;
802
+	if ($log_time < 0) {
803
+			$log_time = 0;
804
+	}
765 805
 
766 806
 	// Today and Yesterday?
767 807
 	if ($modSettings['todayMod'] >= 1 && $show_today === true)
@@ -778,56 +818,65 @@  discard block
 block discarded – undo
778 818
 		{
779 819
 			$h = strpos($user_info['time_format'], '%l') === false ? '%I' : '%l';
780 820
 			$today_fmt = $h . ':%M' . $s . ' %p';
821
+		} else {
822
+					$today_fmt = '%H:%M' . $s;
781 823
 		}
782
-		else
783
-			$today_fmt = '%H:%M' . $s;
784 824
 
785 825
 		// Same day of the year, same year.... Today!
786
-		if ($then['yday'] == $now['yday'] && $then['year'] == $now['year'])
787
-			return $txt['today'] . timeformat($log_time, $today_fmt, $offset_type);
826
+		if ($then['yday'] == $now['yday'] && $then['year'] == $now['year']) {
827
+					return $txt['today'] . timeformat($log_time, $today_fmt, $offset_type);
828
+		}
788 829
 
789 830
 		// Day-of-year is one less and same year, or it's the first of the year and that's the last of the year...
790
-		if ($modSettings['todayMod'] == '2' && (($then['yday'] == $now['yday'] - 1 && $then['year'] == $now['year']) || ($now['yday'] == 0 && $then['year'] == $now['year'] - 1) && $then['mon'] == 12 && $then['mday'] == 31))
791
-			return $txt['yesterday'] . timeformat($log_time, $today_fmt, $offset_type);
831
+		if ($modSettings['todayMod'] == '2' && (($then['yday'] == $now['yday'] - 1 && $then['year'] == $now['year']) || ($now['yday'] == 0 && $then['year'] == $now['year'] - 1) && $then['mon'] == 12 && $then['mday'] == 31)) {
832
+					return $txt['yesterday'] . timeformat($log_time, $today_fmt, $offset_type);
833
+		}
792 834
 	}
793 835
 
794 836
 	$str = !is_bool($show_today) ? $show_today : $user_info['time_format'];
795 837
 
796
-	if (!isset($local_cache))
797
-		$local_cache = setlocale(LC_TIME, $txt['lang_locale']);
838
+	if (!isset($local_cache)) {
839
+			$local_cache = setlocale(LC_TIME, $txt['lang_locale']);
840
+	}
798 841
 
799 842
 	if ($local_cache !== false)
800 843
 	{
801 844
 		//check if other process change the local
802 845
 		if ($process_safe === true)
803 846
 		{
804
-			if (setlocale(LC_TIME, '0') != $local_cache)
805
-				setlocale(LC_TIME, $txt['lang_locale']);
847
+			if (setlocale(LC_TIME, '0') != $local_cache) {
848
+							setlocale(LC_TIME, $txt['lang_locale']);
849
+			}
806 850
 		}
807 851
 
808
-		if (!isset($non_twelve_hour))
809
-			$non_twelve_hour = trim(strftime('%p')) === '';
810
-		if ($non_twelve_hour && strpos($str, '%p') !== false)
811
-			$str = str_replace('%p', (strftime('%H', $time) < 12 ? $txt['time_am'] : $txt['time_pm']), $str);
852
+		if (!isset($non_twelve_hour)) {
853
+					$non_twelve_hour = trim(strftime('%p')) === '';
854
+		}
855
+		if ($non_twelve_hour && strpos($str, '%p') !== false) {
856
+					$str = str_replace('%p', (strftime('%H', $time) < 12 ? $txt['time_am'] : $txt['time_pm']), $str);
857
+		}
812 858
 
813
-		foreach (array('%a', '%A', '%b', '%B') as $token)
814
-			if (strpos($str, $token) !== false)
859
+		foreach (array('%a', '%A', '%b', '%B') as $token) {
860
+					if (strpos($str, $token) !== false)
815 861
 				$str = str_replace($token, strftime($token, $time), $str);
816
-	}
817
-	else
862
+		}
863
+	} else
818 864
 	{
819 865
 		// Do-it-yourself time localization.  Fun.
820
-		foreach (array('%a' => 'days_short', '%A' => 'days', '%b' => 'months_short', '%B' => 'months') as $token => $text_label)
821
-			if (strpos($str, $token) !== false)
866
+		foreach (array('%a' => 'days_short', '%A' => 'days', '%b' => 'months_short', '%B' => 'months') as $token => $text_label) {
867
+					if (strpos($str, $token) !== false)
822 868
 				$str = str_replace($token, $txt[$text_label][(int) strftime($token === '%a' || $token === '%A' ? '%w' : '%m', $time)], $str);
869
+		}
823 870
 
824
-		if (strpos($str, '%p') !== false)
825
-			$str = str_replace('%p', (strftime('%H', $time) < 12 ? $txt['time_am'] : $txt['time_pm']), $str);
871
+		if (strpos($str, '%p') !== false) {
872
+					$str = str_replace('%p', (strftime('%H', $time) < 12 ? $txt['time_am'] : $txt['time_pm']), $str);
873
+		}
826 874
 	}
827 875
 
828 876
 	// Windows doesn't support %e; on some versions, strftime fails altogether if used, so let's prevent that.
829
-	if ($context['server']['is_windows'] && strpos($str, '%e') !== false)
830
-		$str = str_replace('%e', ltrim(strftime('%d', $time), '0'), $str);
877
+	if ($context['server']['is_windows'] && strpos($str, '%e') !== false) {
878
+			$str = str_replace('%e', ltrim(strftime('%d', $time), '0'), $str);
879
+	}
831 880
 
832 881
 	// Format any other characters..
833 882
 	return strftime($str, $time);
@@ -849,16 +898,19 @@  discard block
 block discarded – undo
849 898
 	static $translation = array();
850 899
 
851 900
 	// Determine the character set... Default to UTF-8
852
-	if (empty($context['character_set']))
853
-		$charset = 'UTF-8';
901
+	if (empty($context['character_set'])) {
902
+			$charset = 'UTF-8';
903
+	}
854 904
 	// Use ISO-8859-1 in place of non-supported ISO-8859 charsets...
855
-	elseif (strpos($context['character_set'], 'ISO-8859-') !== false && !in_array($context['character_set'], array('ISO-8859-5', 'ISO-8859-15')))
856
-		$charset = 'ISO-8859-1';
857
-	else
858
-		$charset = $context['character_set'];
905
+	elseif (strpos($context['character_set'], 'ISO-8859-') !== false && !in_array($context['character_set'], array('ISO-8859-5', 'ISO-8859-15'))) {
906
+			$charset = 'ISO-8859-1';
907
+	} else {
908
+			$charset = $context['character_set'];
909
+	}
859 910
 
860
-	if (empty($translation))
861
-		$translation = array_flip(get_html_translation_table(HTML_SPECIALCHARS, ENT_QUOTES, $charset)) + array('&#039;' => '\'', '&#39;' => '\'', '&nbsp;' => ' ');
911
+	if (empty($translation)) {
912
+			$translation = array_flip(get_html_translation_table(HTML_SPECIALCHARS, ENT_QUOTES, $charset)) + array('&#039;' => '\'', '&#39;' => '\'', '&nbsp;' => ' ');
913
+	}
862 914
 
863 915
 	return strtr($string, $translation);
864 916
 }
@@ -880,8 +932,9 @@  discard block
 block discarded – undo
880 932
 	global $smcFunc;
881 933
 
882 934
 	// It was already short enough!
883
-	if ($smcFunc['strlen']($subject) <= $len)
884
-		return $subject;
935
+	if ($smcFunc['strlen']($subject) <= $len) {
936
+			return $subject;
937
+	}
885 938
 
886 939
 	// Shorten it by the length it was too long, and strip off junk from the end.
887 940
 	return $smcFunc['substr']($subject, 0, $len) . '...';
@@ -900,10 +953,11 @@  discard block
 block discarded – undo
900 953
 {
901 954
 	global $user_info, $modSettings;
902 955
 
903
-	if ($timestamp === null)
904
-		$timestamp = time();
905
-	elseif ($timestamp == 0)
906
-		return 0;
956
+	if ($timestamp === null) {
957
+			$timestamp = time();
958
+	} elseif ($timestamp == 0) {
959
+			return 0;
960
+	}
907 961
 
908 962
 	return $timestamp + ($modSettings['time_offset'] + ($use_user_offset ? $user_info['time_offset'] : 0)) * 3600;
909 963
 }
@@ -932,8 +986,9 @@  discard block
 block discarded – undo
932 986
 		$array[$i] = $array[$j];
933 987
 		$array[$j] = $temp;
934 988
 
935
-		for ($i = 1; $p[$i] == 0; $i++)
936
-			$p[$i] = 1;
989
+		for ($i = 1; $p[$i] == 0; $i++) {
990
+					$p[$i] = 1;
991
+		}
937 992
 
938 993
 		$orders[] = $array;
939 994
 	}
@@ -965,12 +1020,14 @@  discard block
 block discarded – undo
965 1020
 	static $disabled;
966 1021
 
967 1022
 	// Don't waste cycles
968
-	if ($message === '')
969
-		return '';
1023
+	if ($message === '') {
1024
+			return '';
1025
+	}
970 1026
 
971 1027
 	// Just in case it wasn't determined yet whether UTF-8 is enabled.
972
-	if (!isset($context['utf8']))
973
-		$context['utf8'] = (empty($modSettings['global_character_set']) ? $txt['lang_character_set'] : $modSettings['global_character_set']) === 'UTF-8';
1028
+	if (!isset($context['utf8'])) {
1029
+			$context['utf8'] = (empty($modSettings['global_character_set']) ? $txt['lang_character_set'] : $modSettings['global_character_set']) === 'UTF-8';
1030
+	}
974 1031
 
975 1032
 	// Clean up any cut/paste issues we may have
976 1033
 	$message = sanitizeMSCutPaste($message);
@@ -982,13 +1039,15 @@  discard block
 block discarded – undo
982 1039
 		return $message;
983 1040
 	}
984 1041
 
985
-	if ($smileys !== null && ($smileys == '1' || $smileys == '0'))
986
-		$smileys = (bool) $smileys;
1042
+	if ($smileys !== null && ($smileys == '1' || $smileys == '0')) {
1043
+			$smileys = (bool) $smileys;
1044
+	}
987 1045
 
988 1046
 	if (empty($modSettings['enableBBC']) && $message !== false)
989 1047
 	{
990
-		if ($smileys === true)
991
-			parsesmileys($message);
1048
+		if ($smileys === true) {
1049
+					parsesmileys($message);
1050
+		}
992 1051
 
993 1052
 		return $message;
994 1053
 	}
@@ -1001,8 +1060,9 @@  discard block
 block discarded – undo
1001 1060
 	}
1002 1061
 
1003 1062
 	// Ensure $modSettings['tld_regex'] contains a valid regex for the autolinker
1004
-	if (!empty($modSettings['autoLinkUrls']))
1005
-		set_tld_regex();
1063
+	if (!empty($modSettings['autoLinkUrls'])) {
1064
+			set_tld_regex();
1065
+	}
1006 1066
 
1007 1067
 	// Allow mods access before entering the main parse_bbc loop
1008 1068
 	call_integration_hook('integrate_pre_parsebbc', array(&$message, &$smileys, &$cache_id, &$parse_tags));
@@ -1016,12 +1076,14 @@  discard block
 block discarded – undo
1016 1076
 
1017 1077
 			$temp = explode(',', strtolower($modSettings['disabledBBC']));
1018 1078
 
1019
-			foreach ($temp as $tag)
1020
-				$disabled[trim($tag)] = true;
1079
+			foreach ($temp as $tag) {
1080
+							$disabled[trim($tag)] = true;
1081
+			}
1021 1082
 		}
1022 1083
 
1023
-		if (empty($modSettings['enableEmbeddedFlash']))
1024
-			$disabled['flash'] = true;
1084
+		if (empty($modSettings['enableEmbeddedFlash'])) {
1085
+					$disabled['flash'] = true;
1086
+		}
1025 1087
 
1026 1088
 		/* The following bbc are formatted as an array, with keys as follows:
1027 1089
 
@@ -1142,8 +1204,9 @@  discard block
 block discarded – undo
1142 1204
 					$returnContext = '';
1143 1205
 
1144 1206
 					// BBC or the entire attachments feature is disabled
1145
-					if (empty($modSettings['attachmentEnable']) || !empty($disabled['attach']))
1146
-						return $data;
1207
+					if (empty($modSettings['attachmentEnable']) || !empty($disabled['attach'])) {
1208
+											return $data;
1209
+					}
1147 1210
 
1148 1211
 					// Save the attach ID.
1149 1212
 					$attachID = $data;
@@ -1154,8 +1217,9 @@  discard block
 block discarded – undo
1154 1217
 					$currentAttachment = parseAttachBBC($attachID);
1155 1218
 
1156 1219
 					// parseAttachBBC will return a string ($txt key) rather than diying with a fatal_error. Up to you to decide what to do.
1157
-					if (is_string($currentAttachment))
1158
-						return $data = !empty($txt[$currentAttachment]) ? $txt[$currentAttachment] : $currentAttachment;
1220
+					if (is_string($currentAttachment)) {
1221
+											return $data = !empty($txt[$currentAttachment]) ? $txt[$currentAttachment] : $currentAttachment;
1222
+					}
1159 1223
 
1160 1224
 					if (!empty($currentAttachment['is_image']))
1161 1225
 					{
@@ -1171,15 +1235,17 @@  discard block
 block discarded – undo
1171 1235
 							$height = ' height="' . $currentAttachment['height'] . '"';
1172 1236
 						}
1173 1237
 
1174
-						if ($currentAttachment['thumbnail']['has_thumb'] && empty($params['{width}']) && empty($params['{height}']))
1175
-							$returnContext .= '<a href="'. $currentAttachment['href']. ';image" id="link_'. $currentAttachment['id']. '" onclick="'. $currentAttachment['thumbnail']['javascript']. '"><img src="'. $currentAttachment['thumbnail']['href']. '"' . $alt . $title . ' id="thumb_'. $currentAttachment['id']. '" class="atc_img"></a>';
1176
-						else
1177
-							$returnContext .= '<img src="' . $currentAttachment['href'] . ';image"' . $alt . $title . $width . $height . ' class="bbc_img"/>';
1238
+						if ($currentAttachment['thumbnail']['has_thumb'] && empty($params['{width}']) && empty($params['{height}'])) {
1239
+													$returnContext .= '<a href="'. $currentAttachment['href']. ';image" id="link_'. $currentAttachment['id']. '" onclick="'. $currentAttachment['thumbnail']['javascript']. '"><img src="'. $currentAttachment['thumbnail']['href']. '"' . $alt . $title . ' id="thumb_'. $currentAttachment['id']. '" class="atc_img"></a>';
1240
+						} else {
1241
+													$returnContext .= '<img src="' . $currentAttachment['href'] . ';image"' . $alt . $title . $width . $height . ' class="bbc_img"/>';
1242
+						}
1178 1243
 					}
1179 1244
 
1180 1245
 					// No image. Show a link.
1181
-					else
1182
-						$returnContext .= $currentAttachment['link'];
1246
+					else {
1247
+											$returnContext .= $currentAttachment['link'];
1248
+					}
1183 1249
 
1184 1250
 					// Gotta append what we just did.
1185 1251
 					$data = $returnContext;
@@ -1210,8 +1276,9 @@  discard block
 block discarded – undo
1210 1276
 						for ($php_i = 0, $php_n = count($php_parts); $php_i < $php_n; $php_i++)
1211 1277
 						{
1212 1278
 							// Do PHP code coloring?
1213
-							if ($php_parts[$php_i] != '&lt;?php')
1214
-								continue;
1279
+							if ($php_parts[$php_i] != '&lt;?php') {
1280
+															continue;
1281
+							}
1215 1282
 
1216 1283
 							$php_string = '';
1217 1284
 							while ($php_i + 1 < count($php_parts) && $php_parts[$php_i] != '?&gt;')
@@ -1227,8 +1294,9 @@  discard block
 block discarded – undo
1227 1294
 						$data = str_replace("\t", "<span style=\"white-space: pre;\">\t</span>", $data);
1228 1295
 
1229 1296
 						// Recent Opera bug requiring temporary fix. &nsbp; is needed before </code> to avoid broken selection.
1230
-						if ($context['browser']['is_opera'])
1231
-							$data .= '&nbsp;';
1297
+						if ($context['browser']['is_opera']) {
1298
+													$data .= '&nbsp;';
1299
+						}
1232 1300
 					}
1233 1301
 				},
1234 1302
 				'block_level' => true,
@@ -1247,8 +1315,9 @@  discard block
 block discarded – undo
1247 1315
 						for ($php_i = 0, $php_n = count($php_parts); $php_i < $php_n; $php_i++)
1248 1316
 						{
1249 1317
 							// Do PHP code coloring?
1250
-							if ($php_parts[$php_i] != '&lt;?php')
1251
-								continue;
1318
+							if ($php_parts[$php_i] != '&lt;?php') {
1319
+															continue;
1320
+							}
1252 1321
 
1253 1322
 							$php_string = '';
1254 1323
 							while ($php_i + 1 < count($php_parts) && $php_parts[$php_i] != '?&gt;')
@@ -1264,8 +1333,9 @@  discard block
 block discarded – undo
1264 1333
 						$data[0] = str_replace("\t", "<span style=\"white-space: pre;\">\t</span>", $data[0]);
1265 1334
 
1266 1335
 						// Recent Opera bug requiring temporary fix. &nsbp; is needed before </code> to avoid broken selection.
1267
-						if ($context['browser']['is_opera'])
1268
-							$data[0] .= '&nbsp;';
1336
+						if ($context['browser']['is_opera']) {
1337
+													$data[0] .= '&nbsp;';
1338
+						}
1269 1339
 					}
1270 1340
 				},
1271 1341
 				'block_level' => true,
@@ -1303,11 +1373,13 @@  discard block
 block discarded – undo
1303 1373
 				'content' => '<embed type="application/x-shockwave-flash" src="$1" width="$2" height="$3" play="true" loop="true" quality="high" AllowScriptAccess="never">',
1304 1374
 				'validate' => function (&$tag, &$data, $disabled)
1305 1375
 				{
1306
-					if (isset($disabled['url']))
1307
-						$tag['content'] = '$1';
1376
+					if (isset($disabled['url'])) {
1377
+											$tag['content'] = '$1';
1378
+					}
1308 1379
 					$scheme = parse_url($data[0], PHP_URL_SCHEME);
1309
-					if (empty($scheme))
1310
-						$data[0] = '//' . ltrim($data[0], ':/');
1380
+					if (empty($scheme)) {
1381
+											$data[0] = '//' . ltrim($data[0], ':/');
1382
+					}
1311 1383
 				},
1312 1384
 				'disabled_content' => '<a href="$1" target="_blank" class="new_win">$1</a>',
1313 1385
 			),
@@ -1321,10 +1393,11 @@  discard block
 block discarded – undo
1321 1393
 				{
1322 1394
 					$class = 'class="bbc_float float' . (strpos($data, 'left') === 0 ? 'left' : 'right') . '"';
1323 1395
 
1324
-					if (preg_match('~\bmax=(\d+(?:%|px|em|rem|ex|pt|pc|ch|vw|vh|vmin|vmax|cm|mm|in)?)~', $data, $matches))
1325
-						$css = ' style="max-width:' . $matches[1] . (is_numeric($matches[1]) ? 'px' : '') . '"';
1326
-					else
1327
-						$css = '';
1396
+					if (preg_match('~\bmax=(\d+(?:%|px|em|rem|ex|pt|pc|ch|vw|vh|vmin|vmax|cm|mm|in)?)~', $data, $matches)) {
1397
+											$css = ' style="max-width:' . $matches[1] . (is_numeric($matches[1]) ? 'px' : '') . '"';
1398
+					} else {
1399
+											$css = '';
1400
+					}
1328 1401
 
1329 1402
 					$data = $class . $css;
1330 1403
 				},
@@ -1374,14 +1447,16 @@  discard block
 block discarded – undo
1374 1447
 					$scheme = parse_url($data, PHP_URL_SCHEME);
1375 1448
 					if ($image_proxy_enabled)
1376 1449
 					{
1377
-						if (empty($scheme))
1378
-							$data = 'http://' . ltrim($data, ':/');
1450
+						if (empty($scheme)) {
1451
+													$data = 'http://' . ltrim($data, ':/');
1452
+						}
1379 1453
 
1380
-						if ($scheme != 'https')
1381
-							$data = $boardurl . '/proxy.php?request=' . urlencode($data) . '&hash=' . md5($data . $image_proxy_secret);
1454
+						if ($scheme != 'https') {
1455
+													$data = $boardurl . '/proxy.php?request=' . urlencode($data) . '&hash=' . md5($data . $image_proxy_secret);
1456
+						}
1457
+					} elseif (empty($scheme)) {
1458
+											$data = '//' . ltrim($data, ':/');
1382 1459
 					}
1383
-					elseif (empty($scheme))
1384
-						$data = '//' . ltrim($data, ':/');
1385 1460
 				},
1386 1461
 				'disabled_content' => '($1)',
1387 1462
 			),
@@ -1397,14 +1472,16 @@  discard block
 block discarded – undo
1397 1472
 					$scheme = parse_url($data, PHP_URL_SCHEME);
1398 1473
 					if ($image_proxy_enabled)
1399 1474
 					{
1400
-						if (empty($scheme))
1401
-							$data = 'http://' . ltrim($data, ':/');
1475
+						if (empty($scheme)) {
1476
+													$data = 'http://' . ltrim($data, ':/');
1477
+						}
1402 1478
 
1403
-						if ($scheme != 'https')
1404
-							$data = $boardurl . '/proxy.php?request=' . urlencode($data) . '&hash=' . md5($data . $image_proxy_secret);
1479
+						if ($scheme != 'https') {
1480
+													$data = $boardurl . '/proxy.php?request=' . urlencode($data) . '&hash=' . md5($data . $image_proxy_secret);
1481
+						}
1482
+					} elseif (empty($scheme)) {
1483
+											$data = '//' . ltrim($data, ':/');
1405 1484
 					}
1406
-					elseif (empty($scheme))
1407
-						$data = '//' . ltrim($data, ':/');
1408 1485
 				},
1409 1486
 				'disabled_content' => '($1)',
1410 1487
 			),
@@ -1416,8 +1493,9 @@  discard block
 block discarded – undo
1416 1493
 				{
1417 1494
 					$data = strtr($data, array('<br>' => ''));
1418 1495
 					$scheme = parse_url($data, PHP_URL_SCHEME);
1419
-					if (empty($scheme))
1420
-						$data = '//' . ltrim($data, ':/');
1496
+					if (empty($scheme)) {
1497
+											$data = '//' . ltrim($data, ':/');
1498
+					}
1421 1499
 				},
1422 1500
 			),
1423 1501
 			array(
@@ -1428,13 +1506,14 @@  discard block
 block discarded – undo
1428 1506
 				'after' => '</a>',
1429 1507
 				'validate' => function (&$tag, &$data, $disabled)
1430 1508
 				{
1431
-					if (substr($data, 0, 1) == '#')
1432
-						$data = '#post_' . substr($data, 1);
1433
-					else
1509
+					if (substr($data, 0, 1) == '#') {
1510
+											$data = '#post_' . substr($data, 1);
1511
+					} else
1434 1512
 					{
1435 1513
 						$scheme = parse_url($data, PHP_URL_SCHEME);
1436
-						if (empty($scheme))
1437
-							$data = '//' . ltrim($data, ':/');
1514
+						if (empty($scheme)) {
1515
+													$data = '//' . ltrim($data, ':/');
1516
+						}
1438 1517
 					}
1439 1518
 				},
1440 1519
 				'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
@@ -1512,8 +1591,9 @@  discard block
 block discarded – undo
1512 1591
 					{
1513 1592
 						$add_begin = substr(trim($data), 0, 5) != '&lt;?';
1514 1593
 						$data = highlight_php_code($add_begin ? '&lt;?php ' . $data . '?&gt;' : $data);
1515
-						if ($add_begin)
1516
-							$data = preg_replace(array('~^(.+?)&lt;\?.{0,40}?php(?:&nbsp;|\s)~', '~\?&gt;((?:</(font|span)>)*)$~'), '$1', $data, 2);
1594
+						if ($add_begin) {
1595
+													$data = preg_replace(array('~^(.+?)&lt;\?.{0,40}?php(?:&nbsp;|\s)~', '~\?&gt;((?:</(font|span)>)*)$~'), '$1', $data, 2);
1596
+						}
1517 1597
 					}
1518 1598
 				},
1519 1599
 				'block_level' => false,
@@ -1644,10 +1724,11 @@  discard block
 block discarded – undo
1644 1724
 				'content' => '$1',
1645 1725
 				'validate' => function (&$tag, &$data, $disabled)
1646 1726
 				{
1647
-					if (is_numeric($data))
1648
-						$data = timeformat($data);
1649
-					else
1650
-						$tag['content'] = '[time]$1[/time]';
1727
+					if (is_numeric($data)) {
1728
+											$data = timeformat($data);
1729
+					} else {
1730
+											$tag['content'] = '[time]$1[/time]';
1731
+					}
1651 1732
 				},
1652 1733
 			),
1653 1734
 			array(
@@ -1674,8 +1755,9 @@  discard block
 block discarded – undo
1674 1755
 				{
1675 1756
 					$data = strtr($data, array('<br>' => ''));
1676 1757
 					$scheme = parse_url($data, PHP_URL_SCHEME);
1677
-					if (empty($scheme))
1678
-						$data = '//' . ltrim($data, ':/');
1758
+					if (empty($scheme)) {
1759
+											$data = '//' . ltrim($data, ':/');
1760
+					}
1679 1761
 				},
1680 1762
 			),
1681 1763
 			array(
@@ -1687,8 +1769,9 @@  discard block
 block discarded – undo
1687 1769
 				'validate' => function (&$tag, &$data, $disabled)
1688 1770
 				{
1689 1771
 					$scheme = parse_url($data, PHP_URL_SCHEME);
1690
-					if (empty($scheme))
1691
-						$data = '//' . ltrim($data, ':/');
1772
+					if (empty($scheme)) {
1773
+											$data = '//' . ltrim($data, ':/');
1774
+					}
1692 1775
 				},
1693 1776
 				'disallow_children' => array('email', 'ftp', 'url', 'iurl'),
1694 1777
 				'disabled_after' => ' ($1)',
@@ -1708,8 +1791,9 @@  discard block
 block discarded – undo
1708 1791
 		// This is mainly for the bbc manager, so it's easy to add tags above.  Custom BBC should be added above this line.
1709 1792
 		if ($message === false)
1710 1793
 		{
1711
-			if (isset($temp_bbc))
1712
-				$bbc_codes = $temp_bbc;
1794
+			if (isset($temp_bbc)) {
1795
+							$bbc_codes = $temp_bbc;
1796
+			}
1713 1797
 			usort($codes, function ($a, $b) {
1714 1798
 				return strcmp($a['tag'], $b['tag']);
1715 1799
 			});
@@ -1729,8 +1813,9 @@  discard block
 block discarded – undo
1729 1813
 		);
1730 1814
 		if (!isset($disabled['li']) && !isset($disabled['list']))
1731 1815
 		{
1732
-			foreach ($itemcodes as $c => $dummy)
1733
-				$bbc_codes[$c] = array();
1816
+			foreach ($itemcodes as $c => $dummy) {
1817
+							$bbc_codes[$c] = array();
1818
+			}
1734 1819
 		}
1735 1820
 
1736 1821
 		// Shhhh!
@@ -1751,12 +1836,14 @@  discard block
 block discarded – undo
1751 1836
 		foreach ($codes as $code)
1752 1837
 		{
1753 1838
 			// Make it easier to process parameters later
1754
-			if (!empty($code['parameters']))
1755
-				ksort($code['parameters'], SORT_STRING);
1839
+			if (!empty($code['parameters'])) {
1840
+							ksort($code['parameters'], SORT_STRING);
1841
+			}
1756 1842
 
1757 1843
 			// If we are not doing every tag only do ones we are interested in.
1758
-			if (empty($parse_tags) || in_array($code['tag'], $parse_tags))
1759
-				$bbc_codes[substr($code['tag'], 0, 1)][] = $code;
1844
+			if (empty($parse_tags) || in_array($code['tag'], $parse_tags)) {
1845
+							$bbc_codes[substr($code['tag'], 0, 1)][] = $code;
1846
+			}
1760 1847
 		}
1761 1848
 		$codes = null;
1762 1849
 	}
@@ -1767,8 +1854,9 @@  discard block
 block discarded – undo
1767 1854
 		// It's likely this will change if the message is modified.
1768 1855
 		$cache_key = 'parse:' . $cache_id . '-' . md5(md5($message) . '-' . $smileys . (empty($disabled) ? '' : implode(',', array_keys($disabled))) . $smcFunc['json_encode']($context['browser']) . $txt['lang_locale'] . $user_info['time_offset'] . $user_info['time_format']);
1769 1856
 
1770
-		if (($temp = cache_get_data($cache_key, 240)) != null)
1771
-			return $temp;
1857
+		if (($temp = cache_get_data($cache_key, 240)) != null) {
1858
+					return $temp;
1859
+		}
1772 1860
 
1773 1861
 		$cache_t = microtime();
1774 1862
 	}
@@ -1800,8 +1888,9 @@  discard block
 block discarded – undo
1800 1888
 		$disabled['flash'] = true;
1801 1889
 
1802 1890
 		// @todo Change maybe?
1803
-		if (!isset($_GET['images']))
1804
-			$disabled['img'] = true;
1891
+		if (!isset($_GET['images'])) {
1892
+					$disabled['img'] = true;
1893
+		}
1805 1894
 
1806 1895
 		// @todo Interface/setting to add more?
1807 1896
 	}
@@ -1825,8 +1914,9 @@  discard block
 block discarded – undo
1825 1914
 		$pos = isset($matches[0][1]) ? $matches[0][1] : false;
1826 1915
 
1827 1916
 		// Failsafe.
1828
-		if ($pos === false || $last_pos > $pos)
1829
-			$pos = strlen($message) + 1;
1917
+		if ($pos === false || $last_pos > $pos) {
1918
+					$pos = strlen($message) + 1;
1919
+		}
1830 1920
 
1831 1921
 		// Can't have a one letter smiley, URL, or email! (sorry.)
1832 1922
 		if ($last_pos < $pos - 1)
@@ -1845,8 +1935,9 @@  discard block
 block discarded – undo
1845 1935
 
1846 1936
 				// <br> should be empty.
1847 1937
 				$empty_tags = array('br', 'hr');
1848
-				foreach ($empty_tags as $tag)
1849
-					$data = str_replace(array('&lt;' . $tag . '&gt;', '&lt;' . $tag . '/&gt;', '&lt;' . $tag . ' /&gt;'), '[' . $tag . ' /]', $data);
1938
+				foreach ($empty_tags as $tag) {
1939
+									$data = str_replace(array('&lt;' . $tag . '&gt;', '&lt;' . $tag . '/&gt;', '&lt;' . $tag . ' /&gt;'), '[' . $tag . ' /]', $data);
1940
+				}
1850 1941
 
1851 1942
 				// b, u, i, s, pre... basic tags.
1852 1943
 				$closable_tags = array('b', 'u', 'i', 's', 'em', 'ins', 'del', 'pre', 'blockquote');
@@ -1855,8 +1946,9 @@  discard block
 block discarded – undo
1855 1946
 					$diff = substr_count($data, '&lt;' . $tag . '&gt;') - substr_count($data, '&lt;/' . $tag . '&gt;');
1856 1947
 					$data = strtr($data, array('&lt;' . $tag . '&gt;' => '<' . $tag . '>', '&lt;/' . $tag . '&gt;' => '</' . $tag . '>'));
1857 1948
 
1858
-					if ($diff > 0)
1859
-						$data = substr($data, 0, -1) . str_repeat('</' . $tag . '>', $diff) . substr($data, -1);
1949
+					if ($diff > 0) {
1950
+											$data = substr($data, 0, -1) . str_repeat('</' . $tag . '>', $diff) . substr($data, -1);
1951
+					}
1860 1952
 				}
1861 1953
 
1862 1954
 				// Do <img ...> - with security... action= -> action-.
@@ -1869,8 +1961,9 @@  discard block
 block discarded – undo
1869 1961
 						$alt = empty($matches[3][$match]) ? '' : ' alt=' . preg_replace('~^&quot;|&quot;$~', '', $matches[3][$match]);
1870 1962
 
1871 1963
 						// Remove action= from the URL - no funny business, now.
1872
-						if (preg_match('~action(=|%3d)(?!dlattach)~i', $imgtag) != 0)
1873
-							$imgtag = preg_replace('~action(?:=|%3d)(?!dlattach)~i', 'action-', $imgtag);
1964
+						if (preg_match('~action(=|%3d)(?!dlattach)~i', $imgtag) != 0) {
1965
+													$imgtag = preg_replace('~action(?:=|%3d)(?!dlattach)~i', 'action-', $imgtag);
1966
+						}
1874 1967
 
1875 1968
 						// Check if the image is larger than allowed.
1876 1969
 						if (!empty($modSettings['max_image_width']) && !empty($modSettings['max_image_height']))
@@ -1891,9 +1984,9 @@  discard block
 block discarded – undo
1891 1984
 
1892 1985
 							// Set the new image tag.
1893 1986
 							$replaces[$matches[0][$match]] = '[img width=' . $width . ' height=' . $height . $alt . ']' . $imgtag . '[/img]';
1987
+						} else {
1988
+													$replaces[$matches[0][$match]] = '[img' . $alt . ']' . $imgtag . '[/img]';
1894 1989
 						}
1895
-						else
1896
-							$replaces[$matches[0][$match]] = '[img' . $alt . ']' . $imgtag . '[/img]';
1897 1990
 					}
1898 1991
 
1899 1992
 					$data = strtr($data, $replaces);
@@ -1906,16 +1999,18 @@  discard block
 block discarded – undo
1906 1999
 				$no_autolink_area = false;
1907 2000
 				if (!empty($open_tags))
1908 2001
 				{
1909
-					foreach ($open_tags as $open_tag)
1910
-						if (in_array($open_tag['tag'], $no_autolink_tags))
2002
+					foreach ($open_tags as $open_tag) {
2003
+											if (in_array($open_tag['tag'], $no_autolink_tags))
1911 2004
 							$no_autolink_area = true;
2005
+					}
1912 2006
 				}
1913 2007
 
1914 2008
 				// Don't go backwards.
1915 2009
 				// @todo Don't think is the real solution....
1916 2010
 				$lastAutoPos = isset($lastAutoPos) ? $lastAutoPos : 0;
1917
-				if ($pos < $lastAutoPos)
1918
-					$no_autolink_area = true;
2011
+				if ($pos < $lastAutoPos) {
2012
+									$no_autolink_area = true;
2013
+				}
1919 2014
 				$lastAutoPos = $pos;
1920 2015
 
1921 2016
 				if (!$no_autolink_area)
@@ -2024,17 +2119,19 @@  discard block
 block discarded – undo
2024 2119
 							if ($scheme == 'mailto')
2025 2120
 							{
2026 2121
 								$email_address = str_replace('mailto:', '', $url);
2027
-								if (!isset($disabled['email']) && filter_var($email_address, FILTER_VALIDATE_EMAIL) !== false)
2028
-									return '[email=' . $email_address . ']' . $url . '[/email]';
2029
-								else
2030
-									return $url;
2122
+								if (!isset($disabled['email']) && filter_var($email_address, FILTER_VALIDATE_EMAIL) !== false) {
2123
+																	return '[email=' . $email_address . ']' . $url . '[/email]';
2124
+								} else {
2125
+																	return $url;
2126
+								}
2031 2127
 							}
2032 2128
 
2033 2129
 							// Are we linking a schemeless URL or naked domain name (e.g. "example.com")?
2034
-							if (empty($scheme))
2035
-								$fullUrl = '//' . ltrim($url, ':/');
2036
-							else
2037
-								$fullUrl = $url;
2130
+							if (empty($scheme)) {
2131
+															$fullUrl = '//' . ltrim($url, ':/');
2132
+							} else {
2133
+															$fullUrl = $url;
2134
+							}
2038 2135
 
2039 2136
 							return '[url=&quot;' . str_replace(array('[', ']'), array('&#91;', '&#93;'), $fullUrl) . '&quot;]' . $url . '[/url]';
2040 2137
 						}, $data);
@@ -2083,16 +2180,18 @@  discard block
 block discarded – undo
2083 2180
 		}
2084 2181
 
2085 2182
 		// Are we there yet?  Are we there yet?
2086
-		if ($pos >= strlen($message) - 1)
2087
-			break;
2183
+		if ($pos >= strlen($message) - 1) {
2184
+					break;
2185
+		}
2088 2186
 
2089 2187
 		$tags = strtolower($message[$pos + 1]);
2090 2188
 
2091 2189
 		if ($tags == '/' && !empty($open_tags))
2092 2190
 		{
2093 2191
 			$pos2 = strpos($message, ']', $pos + 1);
2094
-			if ($pos2 == $pos + 2)
2095
-				continue;
2192
+			if ($pos2 == $pos + 2) {
2193
+							continue;
2194
+			}
2096 2195
 
2097 2196
 			$look_for = strtolower(substr($message, $pos + 2, $pos2 - $pos - 2));
2098 2197
 
@@ -2102,8 +2201,9 @@  discard block
 block discarded – undo
2102 2201
 			do
2103 2202
 			{
2104 2203
 				$tag = array_pop($open_tags);
2105
-				if (!$tag)
2106
-					break;
2204
+				if (!$tag) {
2205
+									break;
2206
+				}
2107 2207
 
2108 2208
 				if (!empty($tag['block_level']))
2109 2209
 				{
@@ -2117,10 +2217,11 @@  discard block
 block discarded – undo
2117 2217
 					// The idea is, if we are LOOKING for a block level tag, we can close them on the way.
2118 2218
 					if (strlen($look_for) > 0 && isset($bbc_codes[$look_for[0]]))
2119 2219
 					{
2120
-						foreach ($bbc_codes[$look_for[0]] as $temp)
2121
-							if ($temp['tag'] == $look_for)
2220
+						foreach ($bbc_codes[$look_for[0]] as $temp) {
2221
+													if ($temp['tag'] == $look_for)
2122 2222
 							{
2123 2223
 								$block_level = !empty($temp['block_level']);
2224
+						}
2124 2225
 								break;
2125 2226
 							}
2126 2227
 					}
@@ -2142,15 +2243,15 @@  discard block
 block discarded – undo
2142 2243
 			{
2143 2244
 				$open_tags = $to_close;
2144 2245
 				continue;
2145
-			}
2146
-			elseif (!empty($to_close) && $tag['tag'] != $look_for)
2246
+			} elseif (!empty($to_close) && $tag['tag'] != $look_for)
2147 2247
 			{
2148 2248
 				if ($block_level === null && isset($look_for[0], $bbc_codes[$look_for[0]]))
2149 2249
 				{
2150
-					foreach ($bbc_codes[$look_for[0]] as $temp)
2151
-						if ($temp['tag'] == $look_for)
2250
+					foreach ($bbc_codes[$look_for[0]] as $temp) {
2251
+											if ($temp['tag'] == $look_for)
2152 2252
 						{
2153 2253
 							$block_level = !empty($temp['block_level']);
2254
+					}
2154 2255
 							break;
2155 2256
 						}
2156 2257
 				}
@@ -2158,8 +2259,9 @@  discard block
 block discarded – undo
2158 2259
 				// We're not looking for a block level tag (or maybe even a tag that exists...)
2159 2260
 				if (!$block_level)
2160 2261
 				{
2161
-					foreach ($to_close as $tag)
2162
-						array_push($open_tags, $tag);
2262
+					foreach ($to_close as $tag) {
2263
+											array_push($open_tags, $tag);
2264
+					}
2163 2265
 					continue;
2164 2266
 				}
2165 2267
 			}
@@ -2172,14 +2274,17 @@  discard block
 block discarded – undo
2172 2274
 
2173 2275
 				// See the comment at the end of the big loop - just eating whitespace ;).
2174 2276
 				$whitespace_regex = '';
2175
-				if (!empty($tag['block_level']))
2176
-					$whitespace_regex .= '(&nbsp;|\s)*(<br>)?';
2277
+				if (!empty($tag['block_level'])) {
2278
+									$whitespace_regex .= '(&nbsp;|\s)*(<br>)?';
2279
+				}
2177 2280
 				// Trim one line of whitespace after unnested tags, but all of it after nested ones
2178
-				if (!empty($tag['trim']) && $tag['trim'] != 'inside')
2179
-					$whitespace_regex .= empty($tag['require_parents']) ? '(&nbsp;|\s)*' : '(<br>|&nbsp;|\s)*';
2281
+				if (!empty($tag['trim']) && $tag['trim'] != 'inside') {
2282
+									$whitespace_regex .= empty($tag['require_parents']) ? '(&nbsp;|\s)*' : '(<br>|&nbsp;|\s)*';
2283
+				}
2180 2284
 
2181
-				if (!empty($whitespace_regex) && preg_match('~' . $whitespace_regex . '~', substr($message, $pos), $matches) != 0)
2182
-					$message = substr($message, 0, $pos) . substr($message, $pos + strlen($matches[0]));
2285
+				if (!empty($whitespace_regex) && preg_match('~' . $whitespace_regex . '~', substr($message, $pos), $matches) != 0) {
2286
+									$message = substr($message, 0, $pos) . substr($message, $pos + strlen($matches[0]));
2287
+				}
2183 2288
 			}
2184 2289
 
2185 2290
 			if (!empty($to_close))
@@ -2192,8 +2297,9 @@  discard block
 block discarded – undo
2192 2297
 		}
2193 2298
 
2194 2299
 		// No tags for this character, so just keep going (fastest possible course.)
2195
-		if (!isset($bbc_codes[$tags]))
2196
-			continue;
2300
+		if (!isset($bbc_codes[$tags])) {
2301
+					continue;
2302
+		}
2197 2303
 
2198 2304
 		$inside = empty($open_tags) ? null : $open_tags[count($open_tags) - 1];
2199 2305
 		$tag = null;
@@ -2202,44 +2308,52 @@  discard block
 block discarded – undo
2202 2308
 			$pt_strlen = strlen($possible['tag']);
2203 2309
 
2204 2310
 			// Not a match?
2205
-			if (strtolower(substr($message, $pos + 1, $pt_strlen)) != $possible['tag'])
2206
-				continue;
2311
+			if (strtolower(substr($message, $pos + 1, $pt_strlen)) != $possible['tag']) {
2312
+							continue;
2313
+			}
2207 2314
 
2208 2315
 			$next_c = $message[$pos + 1 + $pt_strlen];
2209 2316
 
2210 2317
 			// A test validation?
2211
-			if (isset($possible['test']) && preg_match('~^' . $possible['test'] . '~', substr($message, $pos + 1 + $pt_strlen + 1)) === 0)
2212
-				continue;
2318
+			if (isset($possible['test']) && preg_match('~^' . $possible['test'] . '~', substr($message, $pos + 1 + $pt_strlen + 1)) === 0) {
2319
+							continue;
2320
+			}
2213 2321
 			// Do we want parameters?
2214 2322
 			elseif (!empty($possible['parameters']))
2215 2323
 			{
2216
-				if ($next_c != ' ')
2217
-					continue;
2218
-			}
2219
-			elseif (isset($possible['type']))
2324
+				if ($next_c != ' ') {
2325
+									continue;
2326
+				}
2327
+			} elseif (isset($possible['type']))
2220 2328
 			{
2221 2329
 				// Do we need an equal sign?
2222
-				if (in_array($possible['type'], array('unparsed_equals', 'unparsed_commas', 'unparsed_commas_content', 'unparsed_equals_content', 'parsed_equals')) && $next_c != '=')
2223
-					continue;
2330
+				if (in_array($possible['type'], array('unparsed_equals', 'unparsed_commas', 'unparsed_commas_content', 'unparsed_equals_content', 'parsed_equals')) && $next_c != '=') {
2331
+									continue;
2332
+				}
2224 2333
 				// Maybe we just want a /...
2225
-				if ($possible['type'] == 'closed' && $next_c != ']' && substr($message, $pos + 1 + $pt_strlen, 2) != '/]' && substr($message, $pos + 1 + $pt_strlen, 3) != ' /]')
2226
-					continue;
2334
+				if ($possible['type'] == 'closed' && $next_c != ']' && substr($message, $pos + 1 + $pt_strlen, 2) != '/]' && substr($message, $pos + 1 + $pt_strlen, 3) != ' /]') {
2335
+									continue;
2336
+				}
2227 2337
 				// An immediate ]?
2228
-				if ($possible['type'] == 'unparsed_content' && $next_c != ']')
2229
-					continue;
2338
+				if ($possible['type'] == 'unparsed_content' && $next_c != ']') {
2339
+									continue;
2340
+				}
2230 2341
 			}
2231 2342
 			// No type means 'parsed_content', which demands an immediate ] without parameters!
2232
-			elseif ($next_c != ']')
2233
-				continue;
2343
+			elseif ($next_c != ']') {
2344
+							continue;
2345
+			}
2234 2346
 
2235 2347
 			// Check allowed tree?
2236
-			if (isset($possible['require_parents']) && ($inside === null || !in_array($inside['tag'], $possible['require_parents'])))
2237
-				continue;
2238
-			elseif (isset($inside['require_children']) && !in_array($possible['tag'], $inside['require_children']))
2239
-				continue;
2348
+			if (isset($possible['require_parents']) && ($inside === null || !in_array($inside['tag'], $possible['require_parents']))) {
2349
+							continue;
2350
+			} elseif (isset($inside['require_children']) && !in_array($possible['tag'], $inside['require_children'])) {
2351
+							continue;
2352
+			}
2240 2353
 			// If this is in the list of disallowed child tags, don't parse it.
2241
-			elseif (isset($inside['disallow_children']) && in_array($possible['tag'], $inside['disallow_children']))
2242
-				continue;
2354
+			elseif (isset($inside['disallow_children']) && in_array($possible['tag'], $inside['disallow_children'])) {
2355
+							continue;
2356
+			}
2243 2357
 
2244 2358
 			$pos1 = $pos + 1 + $pt_strlen + 1;
2245 2359
 
@@ -2251,8 +2365,9 @@  discard block
 block discarded – undo
2251 2365
 				foreach ($open_tags as $open_quote)
2252 2366
 				{
2253 2367
 					// Every parent quote this quote has flips the styling
2254
-					if ($open_quote['tag'] == 'quote')
2255
-						$quote_alt = !$quote_alt;
2368
+					if ($open_quote['tag'] == 'quote') {
2369
+											$quote_alt = !$quote_alt;
2370
+					}
2256 2371
 				}
2257 2372
 				// Add a class to the quote to style alternating blockquotes
2258 2373
 				$possible['before'] = strtr($possible['before'], array('<blockquote>' => '<blockquote class="bbc_' . ($quote_alt ? 'alternate' : 'standard') . '_quote">'));
@@ -2263,8 +2378,9 @@  discard block
 block discarded – undo
2263 2378
 			{
2264 2379
 				// Build a regular expression for each parameter for the current tag.
2265 2380
 				$preg = array();
2266
-				foreach ($possible['parameters'] as $p => $info)
2267
-					$preg[] = '(\s+' . $p . '=' . (empty($info['quoted']) ? '' : '&quot;') . (isset($info['match']) ? $info['match'] : '(.+?)') . (empty($info['quoted']) ? '' : '&quot;') . '\s*)' . (empty($info['optional']) ? '' : '?');
2381
+				foreach ($possible['parameters'] as $p => $info) {
2382
+									$preg[] = '(\s+' . $p . '=' . (empty($info['quoted']) ? '' : '&quot;') . (isset($info['match']) ? $info['match'] : '(.+?)') . (empty($info['quoted']) ? '' : '&quot;') . '\s*)' . (empty($info['optional']) ? '' : '?');
2383
+				}
2268 2384
 
2269 2385
 				// Extract the string that potentially holds our parameters.
2270 2386
 				$blob = preg_split('~\[/?(?:' . $alltags_regex . ')~i', substr($message, $pos));
@@ -2284,24 +2400,27 @@  discard block
 block discarded – undo
2284 2400
 
2285 2401
 					$match = preg_match('~^' . implode('', $preg) . '$~i', implode(' ', $given_params), $matches) !== 0;
2286 2402
 
2287
-					if ($match)
2288
-						$blob_counter = count($blobs) + 1;
2403
+					if ($match) {
2404
+											$blob_counter = count($blobs) + 1;
2405
+					}
2289 2406
 				}
2290 2407
 
2291 2408
 				// Didn't match our parameter list, try the next possible.
2292
-				if (!$match)
2293
-					continue;
2409
+				if (!$match) {
2410
+									continue;
2411
+				}
2294 2412
 
2295 2413
 				$params = array();
2296 2414
 				for ($i = 1, $n = count($matches); $i < $n; $i += 2)
2297 2415
 				{
2298 2416
 					$key = strtok(ltrim($matches[$i]), '=');
2299
-					if (isset($possible['parameters'][$key]['value']))
2300
-						$params['{' . $key . '}'] = strtr($possible['parameters'][$key]['value'], array('$1' => $matches[$i + 1]));
2301
-					elseif (isset($possible['parameters'][$key]['validate']))
2302
-						$params['{' . $key . '}'] = $possible['parameters'][$key]['validate']($matches[$i + 1]);
2303
-					else
2304
-						$params['{' . $key . '}'] = $matches[$i + 1];
2417
+					if (isset($possible['parameters'][$key]['value'])) {
2418
+											$params['{' . $key . '}'] = strtr($possible['parameters'][$key]['value'], array('$1' => $matches[$i + 1]));
2419
+					} elseif (isset($possible['parameters'][$key]['validate'])) {
2420
+											$params['{' . $key . '}'] = $possible['parameters'][$key]['validate']($matches[$i + 1]);
2421
+					} else {
2422
+											$params['{' . $key . '}'] = $matches[$i + 1];
2423
+					}
2305 2424
 
2306 2425
 					// Just to make sure: replace any $ or { so they can't interpolate wrongly.
2307 2426
 					$params['{' . $key . '}'] = strtr($params['{' . $key . '}'], array('$' => '&#036;', '{' => '&#123;'));
@@ -2309,23 +2428,26 @@  discard block
 block discarded – undo
2309 2428
 
2310 2429
 				foreach ($possible['parameters'] as $p => $info)
2311 2430
 				{
2312
-					if (!isset($params['{' . $p . '}']))
2313
-						$params['{' . $p . '}'] = '';
2431
+					if (!isset($params['{' . $p . '}'])) {
2432
+											$params['{' . $p . '}'] = '';
2433
+					}
2314 2434
 				}
2315 2435
 
2316 2436
 				$tag = $possible;
2317 2437
 
2318 2438
 				// Put the parameters into the string.
2319
-				if (isset($tag['before']))
2320
-					$tag['before'] = strtr($tag['before'], $params);
2321
-				if (isset($tag['after']))
2322
-					$tag['after'] = strtr($tag['after'], $params);
2323
-				if (isset($tag['content']))
2324
-					$tag['content'] = strtr($tag['content'], $params);
2439
+				if (isset($tag['before'])) {
2440
+									$tag['before'] = strtr($tag['before'], $params);
2441
+				}
2442
+				if (isset($tag['after'])) {
2443
+									$tag['after'] = strtr($tag['after'], $params);
2444
+				}
2445
+				if (isset($tag['content'])) {
2446
+									$tag['content'] = strtr($tag['content'], $params);
2447
+				}
2325 2448
 
2326 2449
 				$pos1 += strlen($given_param_string);
2327
-			}
2328
-			else
2450
+			} else
2329 2451
 			{
2330 2452
 				$tag = $possible;
2331 2453
 				$params = array();
@@ -2336,8 +2458,9 @@  discard block
 block discarded – undo
2336 2458
 		// Item codes are complicated buggers... they are implicit [li]s and can make [list]s!
2337 2459
 		if ($smileys !== false && $tag === null && isset($itemcodes[$message[$pos + 1]]) && $message[$pos + 2] == ']' && !isset($disabled['list']) && !isset($disabled['li']))
2338 2460
 		{
2339
-			if ($message[$pos + 1] == '0' && !in_array($message[$pos - 1], array(';', ' ', "\t", "\n", '>')))
2340
-				continue;
2461
+			if ($message[$pos + 1] == '0' && !in_array($message[$pos - 1], array(';', ' ', "\t", "\n", '>'))) {
2462
+							continue;
2463
+			}
2341 2464
 
2342 2465
 			$tag = $itemcodes[$message[$pos + 1]];
2343 2466
 
@@ -2358,9 +2481,9 @@  discard block
 block discarded – undo
2358 2481
 			{
2359 2482
 				array_pop($open_tags);
2360 2483
 				$code = '</li>';
2484
+			} else {
2485
+							$code = '';
2361 2486
 			}
2362
-			else
2363
-				$code = '';
2364 2487
 
2365 2488
 			// Now we open a new tag.
2366 2489
 			$open_tags[] = array(
@@ -2407,12 +2530,14 @@  discard block
 block discarded – undo
2407 2530
 		}
2408 2531
 
2409 2532
 		// No tag?  Keep looking, then.  Silly people using brackets without actual tags.
2410
-		if ($tag === null)
2411
-			continue;
2533
+		if ($tag === null) {
2534
+					continue;
2535
+		}
2412 2536
 
2413 2537
 		// Propagate the list to the child (so wrapping the disallowed tag won't work either.)
2414
-		if (isset($inside['disallow_children']))
2415
-			$tag['disallow_children'] = isset($tag['disallow_children']) ? array_unique(array_merge($tag['disallow_children'], $inside['disallow_children'])) : $inside['disallow_children'];
2538
+		if (isset($inside['disallow_children'])) {
2539
+					$tag['disallow_children'] = isset($tag['disallow_children']) ? array_unique(array_merge($tag['disallow_children'], $inside['disallow_children'])) : $inside['disallow_children'];
2540
+		}
2416 2541
 
2417 2542
 		// Is this tag disabled?
2418 2543
 		if (isset($disabled[$tag['tag']]))
@@ -2422,14 +2547,13 @@  discard block
 block discarded – undo
2422 2547
 				$tag['before'] = !empty($tag['block_level']) ? '<div>' : '';
2423 2548
 				$tag['after'] = !empty($tag['block_level']) ? '</div>' : '';
2424 2549
 				$tag['content'] = isset($tag['type']) && $tag['type'] == 'closed' ? '' : (!empty($tag['block_level']) ? '<div>$1</div>' : '$1');
2425
-			}
2426
-			elseif (isset($tag['disabled_before']) || isset($tag['disabled_after']))
2550
+			} elseif (isset($tag['disabled_before']) || isset($tag['disabled_after']))
2427 2551
 			{
2428 2552
 				$tag['before'] = isset($tag['disabled_before']) ? $tag['disabled_before'] : (!empty($tag['block_level']) ? '<div>' : '');
2429 2553
 				$tag['after'] = isset($tag['disabled_after']) ? $tag['disabled_after'] : (!empty($tag['block_level']) ? '</div>' : '');
2554
+			} else {
2555
+							$tag['content'] = $tag['disabled_content'];
2430 2556
 			}
2431
-			else
2432
-				$tag['content'] = $tag['disabled_content'];
2433 2557
 		}
2434 2558
 
2435 2559
 		// we use this a lot
@@ -2439,8 +2563,9 @@  discard block
 block discarded – undo
2439 2563
 		if (!empty($tag['block_level']) && $tag['tag'] != 'html' && empty($inside['block_level']))
2440 2564
 		{
2441 2565
 			$n = count($open_tags) - 1;
2442
-			while (empty($open_tags[$n]['block_level']) && $n >= 0)
2443
-				$n--;
2566
+			while (empty($open_tags[$n]['block_level']) && $n >= 0) {
2567
+							$n--;
2568
+			}
2444 2569
 
2445 2570
 			// Close all the non block level tags so this tag isn't surrounded by them.
2446 2571
 			for ($i = count($open_tags) - 1; $i > $n; $i--)
@@ -2452,12 +2577,15 @@  discard block
 block discarded – undo
2452 2577
 
2453 2578
 				// Trim or eat trailing stuff... see comment at the end of the big loop.
2454 2579
 				$whitespace_regex = '';
2455
-				if (!empty($tag['block_level']))
2456
-					$whitespace_regex .= '(&nbsp;|\s)*(<br>)?';
2457
-				if (!empty($tag['trim']) && $tag['trim'] != 'inside')
2458
-					$whitespace_regex .= empty($tag['require_parents']) ? '(&nbsp;|\s)*' : '(<br>|&nbsp;|\s)*';
2459
-				if (!empty($whitespace_regex) && preg_match('~' . $whitespace_regex . '~', substr($message, $pos), $matches) != 0)
2460
-					$message = substr($message, 0, $pos) . substr($message, $pos + strlen($matches[0]));
2580
+				if (!empty($tag['block_level'])) {
2581
+									$whitespace_regex .= '(&nbsp;|\s)*(<br>)?';
2582
+				}
2583
+				if (!empty($tag['trim']) && $tag['trim'] != 'inside') {
2584
+									$whitespace_regex .= empty($tag['require_parents']) ? '(&nbsp;|\s)*' : '(<br>|&nbsp;|\s)*';
2585
+				}
2586
+				if (!empty($whitespace_regex) && preg_match('~' . $whitespace_regex . '~', substr($message, $pos), $matches) != 0) {
2587
+									$message = substr($message, 0, $pos) . substr($message, $pos + strlen($matches[0]));
2588
+				}
2461 2589
 
2462 2590
 				array_pop($open_tags);
2463 2591
 			}
@@ -2475,16 +2603,19 @@  discard block
 block discarded – undo
2475 2603
 		elseif ($tag['type'] == 'unparsed_content')
2476 2604
 		{
2477 2605
 			$pos2 = stripos($message, '[/' . substr($message, $pos + 1, $tag_strlen) . ']', $pos1);
2478
-			if ($pos2 === false)
2479
-				continue;
2606
+			if ($pos2 === false) {
2607
+							continue;
2608
+			}
2480 2609
 
2481 2610
 			$data = substr($message, $pos1, $pos2 - $pos1);
2482 2611
 
2483
-			if (!empty($tag['block_level']) && substr($data, 0, 4) == '<br>')
2484
-				$data = substr($data, 4);
2612
+			if (!empty($tag['block_level']) && substr($data, 0, 4) == '<br>') {
2613
+							$data = substr($data, 4);
2614
+			}
2485 2615
 
2486
-			if (isset($tag['validate']))
2487
-				$tag['validate']($tag, $data, $disabled, $params);
2616
+			if (isset($tag['validate'])) {
2617
+							$tag['validate']($tag, $data, $disabled, $params);
2618
+			}
2488 2619
 
2489 2620
 			$code = strtr($tag['content'], array('$1' => $data));
2490 2621
 			$message = substr($message, 0, $pos) . "\n" . $code . "\n" . substr($message, $pos2 + 3 + $tag_strlen);
@@ -2500,34 +2631,40 @@  discard block
 block discarded – undo
2500 2631
 			if (isset($tag['quoted']))
2501 2632
 			{
2502 2633
 				$quoted = substr($message, $pos1, 6) == '&quot;';
2503
-				if ($tag['quoted'] != 'optional' && !$quoted)
2504
-					continue;
2634
+				if ($tag['quoted'] != 'optional' && !$quoted) {
2635
+									continue;
2636
+				}
2505 2637
 
2506
-				if ($quoted)
2507
-					$pos1 += 6;
2638
+				if ($quoted) {
2639
+									$pos1 += 6;
2640
+				}
2641
+			} else {
2642
+							$quoted = false;
2508 2643
 			}
2509
-			else
2510
-				$quoted = false;
2511 2644
 
2512 2645
 			$pos2 = strpos($message, $quoted == false ? ']' : '&quot;]', $pos1);
2513
-			if ($pos2 === false)
2514
-				continue;
2646
+			if ($pos2 === false) {
2647
+							continue;
2648
+			}
2515 2649
 
2516 2650
 			$pos3 = stripos($message, '[/' . substr($message, $pos + 1, $tag_strlen) . ']', $pos2);
2517
-			if ($pos3 === false)
2518
-				continue;
2651
+			if ($pos3 === false) {
2652
+							continue;
2653
+			}
2519 2654
 
2520 2655
 			$data = array(
2521 2656
 				substr($message, $pos2 + ($quoted == false ? 1 : 7), $pos3 - ($pos2 + ($quoted == false ? 1 : 7))),
2522 2657
 				substr($message, $pos1, $pos2 - $pos1)
2523 2658
 			);
2524 2659
 
2525
-			if (!empty($tag['block_level']) && substr($data[0], 0, 4) == '<br>')
2526
-				$data[0] = substr($data[0], 4);
2660
+			if (!empty($tag['block_level']) && substr($data[0], 0, 4) == '<br>') {
2661
+							$data[0] = substr($data[0], 4);
2662
+			}
2527 2663
 
2528 2664
 			// Validation for my parking, please!
2529
-			if (isset($tag['validate']))
2530
-				$tag['validate']($tag, $data, $disabled, $params);
2665
+			if (isset($tag['validate'])) {
2666
+							$tag['validate']($tag, $data, $disabled, $params);
2667
+			}
2531 2668
 
2532 2669
 			$code = strtr($tag['content'], array('$1' => $data[0], '$2' => $data[1]));
2533 2670
 			$message = substr($message, 0, $pos) . "\n" . $code . "\n" . substr($message, $pos3 + 3 + $tag_strlen);
@@ -2544,23 +2681,27 @@  discard block
 block discarded – undo
2544 2681
 		elseif ($tag['type'] == 'unparsed_commas_content')
2545 2682
 		{
2546 2683
 			$pos2 = strpos($message, ']', $pos1);
2547
-			if ($pos2 === false)
2548
-				continue;
2684
+			if ($pos2 === false) {
2685
+							continue;
2686
+			}
2549 2687
 
2550 2688
 			$pos3 = stripos($message, '[/' . substr($message, $pos + 1, $tag_strlen) . ']', $pos2);
2551
-			if ($pos3 === false)
2552
-				continue;
2689
+			if ($pos3 === false) {
2690
+							continue;
2691
+			}
2553 2692
 
2554 2693
 			// We want $1 to be the content, and the rest to be csv.
2555 2694
 			$data = explode(',', ',' . substr($message, $pos1, $pos2 - $pos1));
2556 2695
 			$data[0] = substr($message, $pos2 + 1, $pos3 - $pos2 - 1);
2557 2696
 
2558
-			if (isset($tag['validate']))
2559
-				$tag['validate']($tag, $data, $disabled, $params);
2697
+			if (isset($tag['validate'])) {
2698
+							$tag['validate']($tag, $data, $disabled, $params);
2699
+			}
2560 2700
 
2561 2701
 			$code = $tag['content'];
2562
-			foreach ($data as $k => $d)
2563
-				$code = strtr($code, array('$' . ($k + 1) => trim($d)));
2702
+			foreach ($data as $k => $d) {
2703
+							$code = strtr($code, array('$' . ($k + 1) => trim($d)));
2704
+			}
2564 2705
 			$message = substr($message, 0, $pos) . "\n" . $code . "\n" . substr($message, $pos3 + 3 + $tag_strlen);
2565 2706
 			$pos += strlen($code) - 1 + 2;
2566 2707
 		}
@@ -2568,24 +2709,28 @@  discard block
 block discarded – undo
2568 2709
 		elseif ($tag['type'] == 'unparsed_commas')
2569 2710
 		{
2570 2711
 			$pos2 = strpos($message, ']', $pos1);
2571
-			if ($pos2 === false)
2572
-				continue;
2712
+			if ($pos2 === false) {
2713
+							continue;
2714
+			}
2573 2715
 
2574 2716
 			$data = explode(',', substr($message, $pos1, $pos2 - $pos1));
2575 2717
 
2576
-			if (isset($tag['validate']))
2577
-				$tag['validate']($tag, $data, $disabled, $params);
2718
+			if (isset($tag['validate'])) {
2719
+							$tag['validate']($tag, $data, $disabled, $params);
2720
+			}
2578 2721
 
2579 2722
 			// Fix after, for disabled code mainly.
2580
-			foreach ($data as $k => $d)
2581
-				$tag['after'] = strtr($tag['after'], array('$' . ($k + 1) => trim($d)));
2723
+			foreach ($data as $k => $d) {
2724
+							$tag['after'] = strtr($tag['after'], array('$' . ($k + 1) => trim($d)));
2725
+			}
2582 2726
 
2583 2727
 			$open_tags[] = $tag;
2584 2728
 
2585 2729
 			// Replace them out, $1, $2, $3, $4, etc.
2586 2730
 			$code = $tag['before'];
2587
-			foreach ($data as $k => $d)
2588
-				$code = strtr($code, array('$' . ($k + 1) => trim($d)));
2731
+			foreach ($data as $k => $d) {
2732
+							$code = strtr($code, array('$' . ($k + 1) => trim($d)));
2733
+			}
2589 2734
 			$message = substr($message, 0, $pos) . "\n" . $code . "\n" . substr($message, $pos2 + 1);
2590 2735
 			$pos += strlen($code) - 1 + 2;
2591 2736
 		}
@@ -2596,28 +2741,33 @@  discard block
 block discarded – undo
2596 2741
 			if (isset($tag['quoted']))
2597 2742
 			{
2598 2743
 				$quoted = substr($message, $pos1, 6) == '&quot;';
2599
-				if ($tag['quoted'] != 'optional' && !$quoted)
2600
-					continue;
2744
+				if ($tag['quoted'] != 'optional' && !$quoted) {
2745
+									continue;
2746
+				}
2601 2747
 
2602
-				if ($quoted)
2603
-					$pos1 += 6;
2748
+				if ($quoted) {
2749
+									$pos1 += 6;
2750
+				}
2751
+			} else {
2752
+							$quoted = false;
2604 2753
 			}
2605
-			else
2606
-				$quoted = false;
2607 2754
 
2608 2755
 			$pos2 = strpos($message, $quoted == false ? ']' : '&quot;]', $pos1);
2609
-			if ($pos2 === false)
2610
-				continue;
2756
+			if ($pos2 === false) {
2757
+							continue;
2758
+			}
2611 2759
 
2612 2760
 			$data = substr($message, $pos1, $pos2 - $pos1);
2613 2761
 
2614 2762
 			// Validation for my parking, please!
2615
-			if (isset($tag['validate']))
2616
-				$tag['validate']($tag, $data, $disabled, $params);
2763
+			if (isset($tag['validate'])) {
2764
+							$tag['validate']($tag, $data, $disabled, $params);
2765
+			}
2617 2766
 
2618 2767
 			// For parsed content, we must recurse to avoid security problems.
2619
-			if ($tag['type'] != 'unparsed_equals')
2620
-				$data = parse_bbc($data, !empty($tag['parsed_tags_allowed']) ? false : true, '', !empty($tag['parsed_tags_allowed']) ? $tag['parsed_tags_allowed'] : array());
2768
+			if ($tag['type'] != 'unparsed_equals') {
2769
+							$data = parse_bbc($data, !empty($tag['parsed_tags_allowed']) ? false : true, '', !empty($tag['parsed_tags_allowed']) ? $tag['parsed_tags_allowed'] : array());
2770
+			}
2621 2771
 
2622 2772
 			$tag['after'] = strtr($tag['after'], array('$1' => $data));
2623 2773
 
@@ -2629,34 +2779,40 @@  discard block
 block discarded – undo
2629 2779
 		}
2630 2780
 
2631 2781
 		// If this is block level, eat any breaks after it.
2632
-		if (!empty($tag['block_level']) && substr($message, $pos + 1, 4) == '<br>')
2633
-			$message = substr($message, 0, $pos + 1) . substr($message, $pos + 5);
2782
+		if (!empty($tag['block_level']) && substr($message, $pos + 1, 4) == '<br>') {
2783
+					$message = substr($message, 0, $pos + 1) . substr($message, $pos + 5);
2784
+		}
2634 2785
 
2635 2786
 		// Are we trimming outside this tag?
2636
-		if (!empty($tag['trim']) && $tag['trim'] != 'outside' && preg_match('~(<br>|&nbsp;|\s)*~', substr($message, $pos + 1), $matches) != 0)
2637
-			$message = substr($message, 0, $pos + 1) . substr($message, $pos + 1 + strlen($matches[0]));
2787
+		if (!empty($tag['trim']) && $tag['trim'] != 'outside' && preg_match('~(<br>|&nbsp;|\s)*~', substr($message, $pos + 1), $matches) != 0) {
2788
+					$message = substr($message, 0, $pos + 1) . substr($message, $pos + 1 + strlen($matches[0]));
2789
+		}
2638 2790
 	}
2639 2791
 
2640 2792
 	// Close any remaining tags.
2641
-	while ($tag = array_pop($open_tags))
2642
-		$message .= "\n" . $tag['after'] . "\n";
2793
+	while ($tag = array_pop($open_tags)) {
2794
+			$message .= "\n" . $tag['after'] . "\n";
2795
+	}
2643 2796
 
2644 2797
 	// Parse the smileys within the parts where it can be done safely.
2645 2798
 	if ($smileys === true)
2646 2799
 	{
2647 2800
 		$message_parts = explode("\n", $message);
2648
-		for ($i = 0, $n = count($message_parts); $i < $n; $i += 2)
2649
-			parsesmileys($message_parts[$i]);
2801
+		for ($i = 0, $n = count($message_parts); $i < $n; $i += 2) {
2802
+					parsesmileys($message_parts[$i]);
2803
+		}
2650 2804
 
2651 2805
 		$message = implode('', $message_parts);
2652 2806
 	}
2653 2807
 
2654 2808
 	// No smileys, just get rid of the markers.
2655
-	else
2656
-		$message = strtr($message, array("\n" => ''));
2809
+	else {
2810
+			$message = strtr($message, array("\n" => ''));
2811
+	}
2657 2812
 
2658
-	if ($message !== '' && $message[0] === ' ')
2659
-		$message = '&nbsp;' . substr($message, 1);
2813
+	if ($message !== '' && $message[0] === ' ') {
2814
+			$message = '&nbsp;' . substr($message, 1);
2815
+	}
2660 2816
 
2661 2817
 	// Cleanup whitespace.
2662 2818
 	$message = strtr($message, array('  ' => ' &nbsp;', "\r" => '', "\n" => '<br>', '<br> ' => '<br>&nbsp;', '&#13;' => "\n"));
@@ -2665,15 +2821,16 @@  discard block
 block discarded – undo
2665 2821
 	call_integration_hook('integrate_post_parsebbc', array(&$message, &$smileys, &$cache_id, &$parse_tags));
2666 2822
 
2667 2823
 	// Cache the output if it took some time...
2668
-	if (isset($cache_key, $cache_t) && array_sum(explode(' ', microtime())) - array_sum(explode(' ', $cache_t)) > 0.05)
2669
-		cache_put_data($cache_key, $message, 240);
2824
+	if (isset($cache_key, $cache_t) && array_sum(explode(' ', microtime())) - array_sum(explode(' ', $cache_t)) > 0.05) {
2825
+			cache_put_data($cache_key, $message, 240);
2826
+	}
2670 2827
 
2671 2828
 	// If this was a force parse revert if needed.
2672 2829
 	if (!empty($parse_tags))
2673 2830
 	{
2674
-		if (empty($temp_bbc))
2675
-			$bbc_codes = array();
2676
-		else
2831
+		if (empty($temp_bbc)) {
2832
+					$bbc_codes = array();
2833
+		} else
2677 2834
 		{
2678 2835
 			$bbc_codes = $temp_bbc;
2679 2836
 			unset($temp_bbc);
@@ -2700,8 +2857,9 @@  discard block
 block discarded – undo
2700 2857
 	static $smileyPregSearch = null, $smileyPregReplacements = array();
2701 2858
 
2702 2859
 	// No smiley set at all?!
2703
-	if ($user_info['smiley_set'] == 'none' || trim($message) == '')
2704
-		return;
2860
+	if ($user_info['smiley_set'] == 'none' || trim($message) == '') {
2861
+			return;
2862
+	}
2705 2863
 
2706 2864
 	// If smileyPregSearch hasn't been set, do it now.
2707 2865
 	if (empty($smileyPregSearch))
@@ -2712,8 +2870,7 @@  discard block
 block discarded – undo
2712 2870
 			$smileysfrom = array('>:D', ':D', '::)', '>:(', ':))', ':)', ';)', ';D', ':(', ':o', '8)', ':P', '???', ':-[', ':-X', ':-*', ':\'(', ':-\\', '^-^', 'O0', 'C:-)', '0:)');
2713 2871
 			$smileysto = array('evil.gif', 'cheesy.gif', 'rolleyes.gif', 'angry.gif', 'laugh.gif', 'smiley.gif', 'wink.gif', 'grin.gif', 'sad.gif', 'shocked.gif', 'cool.gif', 'tongue.gif', 'huh.gif', 'embarrassed.gif', 'lipsrsealed.gif', 'kiss.gif', 'cry.gif', 'undecided.gif', 'azn.gif', 'afro.gif', 'police.gif', 'angel.gif');
2714 2872
 			$smileysdescs = array('', $txt['icon_cheesy'], $txt['icon_rolleyes'], $txt['icon_angry'], '', $txt['icon_smiley'], $txt['icon_wink'], $txt['icon_grin'], $txt['icon_sad'], $txt['icon_shocked'], $txt['icon_cool'], $txt['icon_tongue'], $txt['icon_huh'], $txt['icon_embarrassed'], $txt['icon_lips'], $txt['icon_kiss'], $txt['icon_cry'], $txt['icon_undecided'], '', '', '', '');
2715
-		}
2716
-		else
2873
+		} else
2717 2874
 		{
2718 2875
 			// Load the smileys in reverse order by length so they don't get parsed wrong.
2719 2876
 			if (($temp = cache_get_data('parsing_smileys', 480)) == null)
@@ -2737,9 +2894,9 @@  discard block
 block discarded – undo
2737 2894
 				$smcFunc['db_free_result']($result);
2738 2895
 
2739 2896
 				cache_put_data('parsing_smileys', array($smileysfrom, $smileysto, $smileysdescs), 480);
2897
+			} else {
2898
+							list ($smileysfrom, $smileysto, $smileysdescs) = $temp;
2740 2899
 			}
2741
-			else
2742
-				list ($smileysfrom, $smileysto, $smileysdescs) = $temp;
2743 2900
 		}
2744 2901
 
2745 2902
 		// The non-breaking-space is a complex thing...
@@ -2816,35 +2973,41 @@  discard block
 block discarded – undo
2816 2973
 	global $scripturl, $context, $modSettings, $db_show_debug, $db_cache;
2817 2974
 
2818 2975
 	// In case we have mail to send, better do that - as obExit doesn't always quite make it...
2819
-	if (!empty($context['flush_mail']))
2820
-		// @todo this relies on 'flush_mail' being only set in AddMailQueue itself... :\
2976
+	if (!empty($context['flush_mail'])) {
2977
+			// @todo this relies on 'flush_mail' being only set in AddMailQueue itself... :\
2821 2978
 		AddMailQueue(true);
2979
+	}
2822 2980
 
2823 2981
 	$add = preg_match('~^(ftp|http)[s]?://~', $setLocation) == 0 && substr($setLocation, 0, 6) != 'about:';
2824 2982
 
2825
-	if ($add)
2826
-		$setLocation = $scripturl . ($setLocation != '' ? '?' . $setLocation : '');
2983
+	if ($add) {
2984
+			$setLocation = $scripturl . ($setLocation != '' ? '?' . $setLocation : '');
2985
+	}
2827 2986
 
2828 2987
 	// Put the session ID in.
2829
-	if (defined('SID') && SID != '')
2830
-		$setLocation = preg_replace('/^' . preg_quote($scripturl, '/') . '(?!\?' . preg_quote(SID, '/') . ')\\??/', $scripturl . '?' . SID . ';', $setLocation);
2988
+	if (defined('SID') && SID != '') {
2989
+			$setLocation = preg_replace('/^' . preg_quote($scripturl, '/') . '(?!\?' . preg_quote(SID, '/') . ')\\??/', $scripturl . '?' . SID . ';', $setLocation);
2990
+	}
2831 2991
 	// Keep that debug in their for template debugging!
2832
-	elseif (isset($_GET['debug']))
2833
-		$setLocation = preg_replace('/^' . preg_quote($scripturl, '/') . '\\??/', $scripturl . '?debug;', $setLocation);
2992
+	elseif (isset($_GET['debug'])) {
2993
+			$setLocation = preg_replace('/^' . preg_quote($scripturl, '/') . '\\??/', $scripturl . '?debug;', $setLocation);
2994
+	}
2834 2995
 
2835 2996
 	if (!empty($modSettings['queryless_urls']) && (empty($context['server']['is_cgi']) || ini_get('cgi.fix_pathinfo') == 1 || @get_cfg_var('cgi.fix_pathinfo') == 1) && (!empty($context['server']['is_apache']) || !empty($context['server']['is_lighttpd']) || !empty($context['server']['is_litespeed'])))
2836 2997
 	{
2837
-		if (defined('SID') && SID != '')
2838
-			$setLocation = preg_replace_callback('~^' . preg_quote($scripturl, '/') . '\?(?:' . SID . '(?:;|&|&amp;))((?:board|topic)=[^#]+?)(#[^"]*?)?$~',
2998
+		if (defined('SID') && SID != '') {
2999
+					$setLocation = preg_replace_callback('~^' . preg_quote($scripturl, '/') . '\?(?:' . SID . '(?:;|&|&amp;))((?:board|topic)=[^#]+?)(#[^"]*?)?$~',
2839 3000
 				function ($m) use ($scripturl)
2840 3001
 				{
2841 3002
 					return $scripturl . '/' . strtr("$m[1]", '&;=', '//,') . '.html?' . SID. (isset($m[2]) ? "$m[2]" : "");
3003
+		}
2842 3004
 				}, $setLocation);
2843
-		else
2844
-			$setLocation = preg_replace_callback('~^' . preg_quote($scripturl, '/') . '\?((?:board|topic)=[^#"]+?)(#[^"]*?)?$~',
3005
+		else {
3006
+					$setLocation = preg_replace_callback('~^' . preg_quote($scripturl, '/') . '\?((?:board|topic)=[^#"]+?)(#[^"]*?)?$~',
2845 3007
 				function ($m) use ($scripturl)
2846 3008
 				{
2847 3009
 					return $scripturl . '/' . strtr("$m[1]", '&;=', '//,') . '.html' . (isset($m[2]) ? "$m[2]" : "");
3010
+		}
2848 3011
 				}, $setLocation);
2849 3012
 	}
2850 3013
 
@@ -2855,8 +3018,9 @@  discard block
 block discarded – undo
2855 3018
 	header('Location: ' . str_replace(' ', '%20', $setLocation), true, $permanent ? 301 : 302);
2856 3019
 
2857 3020
 	// Debugging.
2858
-	if (isset($db_show_debug) && $db_show_debug === true)
2859
-		$_SESSION['debug_redirect'] = $db_cache;
3021
+	if (isset($db_show_debug) && $db_show_debug === true) {
3022
+			$_SESSION['debug_redirect'] = $db_cache;
3023
+	}
2860 3024
 
2861 3025
 	obExit(false);
2862 3026
 }
@@ -2875,51 +3039,60 @@  discard block
 block discarded – undo
2875 3039
 
2876 3040
 	// Attempt to prevent a recursive loop.
2877 3041
 	++$level;
2878
-	if ($level > 1 && !$from_fatal_error && !$has_fatal_error)
2879
-		exit;
2880
-	if ($from_fatal_error)
2881
-		$has_fatal_error = true;
3042
+	if ($level > 1 && !$from_fatal_error && !$has_fatal_error) {
3043
+			exit;
3044
+	}
3045
+	if ($from_fatal_error) {
3046
+			$has_fatal_error = true;
3047
+	}
2882 3048
 
2883 3049
 	// Clear out the stat cache.
2884 3050
 	trackStats();
2885 3051
 
2886 3052
 	// If we have mail to send, send it.
2887
-	if (!empty($context['flush_mail']))
2888
-		// @todo this relies on 'flush_mail' being only set in AddMailQueue itself... :\
3053
+	if (!empty($context['flush_mail'])) {
3054
+			// @todo this relies on 'flush_mail' being only set in AddMailQueue itself... :\
2889 3055
 		AddMailQueue(true);
3056
+	}
2890 3057
 
2891 3058
 	$do_header = $header === null ? !$header_done : $header;
2892
-	if ($do_footer === null)
2893
-		$do_footer = $do_header;
3059
+	if ($do_footer === null) {
3060
+			$do_footer = $do_header;
3061
+	}
2894 3062
 
2895 3063
 	// Has the template/header been done yet?
2896 3064
 	if ($do_header)
2897 3065
 	{
2898 3066
 		// Was the page title set last minute? Also update the HTML safe one.
2899
-		if (!empty($context['page_title']) && empty($context['page_title_html_safe']))
2900
-			$context['page_title_html_safe'] = $smcFunc['htmlspecialchars'](un_htmlspecialchars($context['page_title'])) . (!empty($context['current_page']) ? ' - ' . $txt['page'] . ' ' . ($context['current_page'] + 1) : '');
3067
+		if (!empty($context['page_title']) && empty($context['page_title_html_safe'])) {
3068
+					$context['page_title_html_safe'] = $smcFunc['htmlspecialchars'](un_htmlspecialchars($context['page_title'])) . (!empty($context['current_page']) ? ' - ' . $txt['page'] . ' ' . ($context['current_page'] + 1) : '');
3069
+		}
2901 3070
 
2902 3071
 		// Start up the session URL fixer.
2903 3072
 		ob_start('ob_sessrewrite');
2904 3073
 
2905
-		if (!empty($settings['output_buffers']) && is_string($settings['output_buffers']))
2906
-			$buffers = explode(',', $settings['output_buffers']);
2907
-		elseif (!empty($settings['output_buffers']))
2908
-			$buffers = $settings['output_buffers'];
2909
-		else
2910
-			$buffers = array();
3074
+		if (!empty($settings['output_buffers']) && is_string($settings['output_buffers'])) {
3075
+					$buffers = explode(',', $settings['output_buffers']);
3076
+		} elseif (!empty($settings['output_buffers'])) {
3077
+					$buffers = $settings['output_buffers'];
3078
+		} else {
3079
+					$buffers = array();
3080
+		}
2911 3081
 
2912
-		if (isset($modSettings['integrate_buffer']))
2913
-			$buffers = array_merge(explode(',', $modSettings['integrate_buffer']), $buffers);
3082
+		if (isset($modSettings['integrate_buffer'])) {
3083
+					$buffers = array_merge(explode(',', $modSettings['integrate_buffer']), $buffers);
3084
+		}
2914 3085
 
2915
-		if (!empty($buffers))
2916
-			foreach ($buffers as $function)
3086
+		if (!empty($buffers)) {
3087
+					foreach ($buffers as $function)
2917 3088
 			{
2918 3089
 				$call = call_helper($function, true);
3090
+		}
2919 3091
 
2920 3092
 				// Is it valid?
2921
-				if (!empty($call))
2922
-					ob_start($call);
3093
+				if (!empty($call)) {
3094
+									ob_start($call);
3095
+				}
2923 3096
 			}
2924 3097
 
2925 3098
 		// Display the screen in the logical order.
@@ -2931,8 +3104,9 @@  discard block
 block discarded – undo
2931 3104
 		loadSubTemplate(isset($context['sub_template']) ? $context['sub_template'] : 'main');
2932 3105
 
2933 3106
 		// Anything special to put out?
2934
-		if (!empty($context['insert_after_template']) && !isset($_REQUEST['xml']))
2935
-			echo $context['insert_after_template'];
3107
+		if (!empty($context['insert_after_template']) && !isset($_REQUEST['xml'])) {
3108
+					echo $context['insert_after_template'];
3109
+		}
2936 3110
 
2937 3111
 		// Just so we don't get caught in an endless loop of errors from the footer...
2938 3112
 		if (!$footer_done)
@@ -2941,14 +3115,16 @@  discard block
 block discarded – undo
2941 3115
 			template_footer();
2942 3116
 
2943 3117
 			// (since this is just debugging... it's okay that it's after </html>.)
2944
-			if (!isset($_REQUEST['xml']))
2945
-				displayDebug();
3118
+			if (!isset($_REQUEST['xml'])) {
3119
+							displayDebug();
3120
+			}
2946 3121
 		}
2947 3122
 	}
2948 3123
 
2949 3124
 	// Remember this URL in case someone doesn't like sending HTTP_REFERER.
2950
-	if (strpos($_SERVER['REQUEST_URL'], 'action=dlattach') === false && strpos($_SERVER['REQUEST_URL'], 'action=viewsmfile') === false)
2951
-		$_SESSION['old_url'] = $_SERVER['REQUEST_URL'];
3125
+	if (strpos($_SERVER['REQUEST_URL'], 'action=dlattach') === false && strpos($_SERVER['REQUEST_URL'], 'action=viewsmfile') === false) {
3126
+			$_SESSION['old_url'] = $_SERVER['REQUEST_URL'];
3127
+	}
2952 3128
 
2953 3129
 	// For session check verification.... don't switch browsers...
2954 3130
 	$_SESSION['USER_AGENT'] = empty($_SERVER['HTTP_USER_AGENT']) ? '' : $_SERVER['HTTP_USER_AGENT'];
@@ -2957,9 +3133,10 @@  discard block
 block discarded – undo
2957 3133
 	call_integration_hook('integrate_exit', array($do_footer));
2958 3134
 
2959 3135
 	// Don't exit if we're coming from index.php; that will pass through normally.
2960
-	if (!$from_index)
2961
-		exit;
2962
-}
3136
+	if (!$from_index) {
3137
+			exit;
3138
+	}
3139
+	}
2963 3140
 
2964 3141
 /**
2965 3142
  * Get the size of a specified image with better error handling.
@@ -2978,8 +3155,9 @@  discard block
 block discarded – undo
2978 3155
 	$url = str_replace(' ', '%20', $url);
2979 3156
 
2980 3157
 	// Can we pull this from the cache... please please?
2981
-	if (($temp = cache_get_data('url_image_size-' . md5($url), 240)) !== null)
2982
-		return $temp;
3158
+	if (($temp = cache_get_data('url_image_size-' . md5($url), 240)) !== null) {
3159
+			return $temp;
3160
+	}
2983 3161
 	$t = microtime();
2984 3162
 
2985 3163
 	// Get the host to pester...
@@ -2989,12 +3167,10 @@  discard block
 block discarded – undo
2989 3167
 	if ($url == '' || $url == 'http://' || $url == 'https://')
2990 3168
 	{
2991 3169
 		return false;
2992
-	}
2993
-	elseif (!isset($match[1]))
3170
+	} elseif (!isset($match[1]))
2994 3171
 	{
2995 3172
 		$size = @getimagesize($url);
2996
-	}
2997
-	else
3173
+	} else
2998 3174
 	{
2999 3175
 		// Try to connect to the server... give it half a second.
3000 3176
 		$temp = 0;
@@ -3033,12 +3209,14 @@  discard block
 block discarded – undo
3033 3209
 	}
3034 3210
 
3035 3211
 	// If we didn't get it, we failed.
3036
-	if (!isset($size))
3037
-		$size = false;
3212
+	if (!isset($size)) {
3213
+			$size = false;
3214
+	}
3038 3215
 
3039 3216
 	// If this took a long time, we may never have to do it again, but then again we might...
3040
-	if (array_sum(explode(' ', microtime())) - array_sum(explode(' ', $t)) > 0.8)
3041
-		cache_put_data('url_image_size-' . md5($url), $size, 240);
3217
+	if (array_sum(explode(' ', microtime())) - array_sum(explode(' ', $t)) > 0.8) {
3218
+			cache_put_data('url_image_size-' . md5($url), $size, 240);
3219
+	}
3042 3220
 
3043 3221
 	// Didn't work.
3044 3222
 	return $size;
@@ -3056,8 +3234,9 @@  discard block
 block discarded – undo
3056 3234
 
3057 3235
 	// Under SSI this function can be called more then once.  That can cause some problems.
3058 3236
 	//   So only run the function once unless we are forced to run it again.
3059
-	if ($loaded && !$forceload)
3060
-		return;
3237
+	if ($loaded && !$forceload) {
3238
+			return;
3239
+	}
3061 3240
 
3062 3241
 	$loaded = true;
3063 3242
 
@@ -3069,14 +3248,16 @@  discard block
 block discarded – undo
3069 3248
 	$context['news_lines'] = array_filter(explode("\n", str_replace("\r", '', trim(addslashes($modSettings['news'])))));
3070 3249
 	for ($i = 0, $n = count($context['news_lines']); $i < $n; $i++)
3071 3250
 	{
3072
-		if (trim($context['news_lines'][$i]) == '')
3073
-			continue;
3251
+		if (trim($context['news_lines'][$i]) == '') {
3252
+					continue;
3253
+		}
3074 3254
 
3075 3255
 		// Clean it up for presentation ;).
3076 3256
 		$context['news_lines'][$i] = parse_bbc(stripslashes(trim($context['news_lines'][$i])), true, 'news' . $i);
3077 3257
 	}
3078
-	if (!empty($context['news_lines']))
3079
-		$context['random_news_line'] = $context['news_lines'][mt_rand(0, count($context['news_lines']) - 1)];
3258
+	if (!empty($context['news_lines'])) {
3259
+			$context['random_news_line'] = $context['news_lines'][mt_rand(0, count($context['news_lines']) - 1)];
3260
+	}
3080 3261
 
3081 3262
 	if (!$user_info['is_guest'])
3082 3263
 	{
@@ -3085,40 +3266,48 @@  discard block
 block discarded – undo
3085 3266
 		$context['user']['alerts'] = &$user_info['alerts'];
3086 3267
 
3087 3268
 		// Personal message popup...
3088
-		if ($user_info['unread_messages'] > (isset($_SESSION['unread_messages']) ? $_SESSION['unread_messages'] : 0))
3089
-			$context['user']['popup_messages'] = true;
3090
-		else
3091
-			$context['user']['popup_messages'] = false;
3269
+		if ($user_info['unread_messages'] > (isset($_SESSION['unread_messages']) ? $_SESSION['unread_messages'] : 0)) {
3270
+					$context['user']['popup_messages'] = true;
3271
+		} else {
3272
+					$context['user']['popup_messages'] = false;
3273
+		}
3092 3274
 		$_SESSION['unread_messages'] = $user_info['unread_messages'];
3093 3275
 
3094
-		if (allowedTo('moderate_forum'))
3095
-			$context['unapproved_members'] = (!empty($modSettings['registration_method']) && ($modSettings['registration_method'] == 2 || (!empty($modSettings['coppaType']) && $modSettings['coppaType'] == 2))) || !empty($modSettings['approveAccountDeletion']) ? $modSettings['unapprovedMembers'] : 0;
3276
+		if (allowedTo('moderate_forum')) {
3277
+					$context['unapproved_members'] = (!empty($modSettings['registration_method']) && ($modSettings['registration_method'] == 2 || (!empty($modSettings['coppaType']) && $modSettings['coppaType'] == 2))) || !empty($modSettings['approveAccountDeletion']) ? $modSettings['unapprovedMembers'] : 0;
3278
+		}
3096 3279
 
3097 3280
 		$context['user']['avatar'] = array();
3098 3281
 
3099 3282
 		// Check for gravatar first since we might be forcing them...
3100 3283
 		if (($modSettings['gravatarEnabled'] && substr($user_info['avatar']['url'], 0, 11) == 'gravatar://') || !empty($modSettings['gravatarOverride']))
3101 3284
 		{
3102
-			if (!empty($modSettings['gravatarAllowExtraEmail']) && stristr($user_info['avatar']['url'], 'gravatar://') && strlen($user_info['avatar']['url']) > 11)
3103
-				$context['user']['avatar']['href'] = get_gravatar_url($smcFunc['substr']($user_info['avatar']['url'], 11));
3104
-			else
3105
-				$context['user']['avatar']['href'] = get_gravatar_url($user_info['email']);
3285
+			if (!empty($modSettings['gravatarAllowExtraEmail']) && stristr($user_info['avatar']['url'], 'gravatar://') && strlen($user_info['avatar']['url']) > 11) {
3286
+							$context['user']['avatar']['href'] = get_gravatar_url($smcFunc['substr']($user_info['avatar']['url'], 11));
3287
+			} else {
3288
+							$context['user']['avatar']['href'] = get_gravatar_url($user_info['email']);
3289
+			}
3106 3290
 		}
3107 3291
 		// Uploaded?
3108
-		elseif ($user_info['avatar']['url'] == '' && !empty($user_info['avatar']['id_attach']))
3109
-			$context['user']['avatar']['href'] = $user_info['avatar']['custom_dir'] ? $modSettings['custom_avatar_url'] . '/' . $user_info['avatar']['filename'] : $scripturl . '?action=dlattach;attach=' . $user_info['avatar']['id_attach'] . ';type=avatar';
3292
+		elseif ($user_info['avatar']['url'] == '' && !empty($user_info['avatar']['id_attach'])) {
3293
+					$context['user']['avatar']['href'] = $user_info['avatar']['custom_dir'] ? $modSettings['custom_avatar_url'] . '/' . $user_info['avatar']['filename'] : $scripturl . '?action=dlattach;attach=' . $user_info['avatar']['id_attach'] . ';type=avatar';
3294
+		}
3110 3295
 		// Full URL?
3111
-		elseif (strpos($user_info['avatar']['url'], 'http://') === 0 || strpos($user_info['avatar']['url'], 'https://') === 0)
3112
-			$context['user']['avatar']['href'] = $user_info['avatar']['url'];
3296
+		elseif (strpos($user_info['avatar']['url'], 'http://') === 0 || strpos($user_info['avatar']['url'], 'https://') === 0) {
3297
+					$context['user']['avatar']['href'] = $user_info['avatar']['url'];
3298
+		}
3113 3299
 		// Otherwise we assume it's server stored.
3114
-		elseif ($user_info['avatar']['url'] != '')
3115
-			$context['user']['avatar']['href'] = $modSettings['avatar_url'] . '/' . $smcFunc['htmlspecialchars']($user_info['avatar']['url']);
3300
+		elseif ($user_info['avatar']['url'] != '') {
3301
+					$context['user']['avatar']['href'] = $modSettings['avatar_url'] . '/' . $smcFunc['htmlspecialchars']($user_info['avatar']['url']);
3302
+		}
3116 3303
 		// No avatar at all? Fine, we have a big fat default avatar ;)
3117
-		else
3118
-			$context['user']['avatar']['href'] = $modSettings['avatar_url'] . '/default.png';
3304
+		else {
3305
+					$context['user']['avatar']['href'] = $modSettings['avatar_url'] . '/default.png';
3306
+		}
3119 3307
 
3120
-		if (!empty($context['user']['avatar']))
3121
-			$context['user']['avatar']['image'] = '<img src="' . $context['user']['avatar']['href'] . '" alt="" class="avatar">';
3308
+		if (!empty($context['user']['avatar'])) {
3309
+					$context['user']['avatar']['image'] = '<img src="' . $context['user']['avatar']['href'] . '" alt="" class="avatar">';
3310
+		}
3122 3311
 
3123 3312
 		// Figure out how long they've been logged in.
3124 3313
 		$context['user']['total_time_logged_in'] = array(
@@ -3126,8 +3315,7 @@  discard block
 block discarded – undo
3126 3315
 			'hours' => floor(($user_info['total_time_logged_in'] % 86400) / 3600),
3127 3316
 			'minutes' => floor(($user_info['total_time_logged_in'] % 3600) / 60)
3128 3317
 		);
3129
-	}
3130
-	else
3318
+	} else
3131 3319
 	{
3132 3320
 		$context['user']['messages'] = 0;
3133 3321
 		$context['user']['unread_messages'] = 0;
@@ -3135,12 +3323,14 @@  discard block
 block discarded – undo
3135 3323
 		$context['user']['total_time_logged_in'] = array('days' => 0, 'hours' => 0, 'minutes' => 0);
3136 3324
 		$context['user']['popup_messages'] = false;
3137 3325
 
3138
-		if (!empty($modSettings['registration_method']) && $modSettings['registration_method'] == 1)
3139
-			$txt['welcome_guest'] .= $txt['welcome_guest_activate'];
3326
+		if (!empty($modSettings['registration_method']) && $modSettings['registration_method'] == 1) {
3327
+					$txt['welcome_guest'] .= $txt['welcome_guest_activate'];
3328
+		}
3140 3329
 
3141 3330
 		// If we've upgraded recently, go easy on the passwords.
3142
-		if (!empty($modSettings['disableHashTime']) && ($modSettings['disableHashTime'] == 1 || time() < $modSettings['disableHashTime']))
3143
-			$context['disable_login_hashing'] = true;
3331
+		if (!empty($modSettings['disableHashTime']) && ($modSettings['disableHashTime'] == 1 || time() < $modSettings['disableHashTime'])) {
3332
+					$context['disable_login_hashing'] = true;
3333
+		}
3144 3334
 	}
3145 3335
 
3146 3336
 	// Setup the main menu items.
@@ -3153,8 +3343,8 @@  discard block
 block discarded – undo
3153 3343
 	$context['show_pm_popup'] = $context['user']['popup_messages'] && !empty($options['popup_messages']) && (!isset($_REQUEST['action']) || $_REQUEST['action'] != 'pm');
3154 3344
 
3155 3345
 	// 2.1+: Add the PM popup here instead. Theme authors can still override it simply by editing/removing the 'fPmPopup' in the array.
3156
-	if ($context['show_pm_popup'])
3157
-		addInlineJavaScript('
3346
+	if ($context['show_pm_popup']) {
3347
+			addInlineJavaScript('
3158 3348
 		jQuery(document).ready(function($) {
3159 3349
 			new smc_Popup({
3160 3350
 				heading: ' . JavaScriptEscape($txt['show_personal_messages_heading']) . ',
@@ -3162,15 +3352,17 @@  discard block
 block discarded – undo
3162 3352
 				icon_class: \'generic_icons mail_new\'
3163 3353
 			});
3164 3354
 		});');
3355
+	}
3165 3356
 
3166 3357
 	// Add a generic "Are you sure?" confirmation message.
3167 3358
 	addInlineJavaScript('
3168 3359
 	var smf_you_sure =' . JavaScriptEscape($txt['quickmod_confirm']) .';');
3169 3360
 
3170 3361
 	// Now add the capping code for avatars.
3171
-	if (!empty($modSettings['avatar_max_width_external']) && !empty($modSettings['avatar_max_height_external']) && !empty($modSettings['avatar_action_too_large']) && $modSettings['avatar_action_too_large'] == 'option_css_resize')
3172
-		addInlineCss('
3362
+	if (!empty($modSettings['avatar_max_width_external']) && !empty($modSettings['avatar_max_height_external']) && !empty($modSettings['avatar_action_too_large']) && $modSettings['avatar_action_too_large'] == 'option_css_resize') {
3363
+			addInlineCss('
3173 3364
 img.avatar { max-width: ' . $modSettings['avatar_max_width_external'] . 'px; max-height: ' . $modSettings['avatar_max_height_external'] . 'px; }');
3365
+	}
3174 3366
 
3175 3367
 	// This looks weird, but it's because BoardIndex.php references the variable.
3176 3368
 	$context['common_stats']['latest_member'] = array(
@@ -3187,11 +3379,13 @@  discard block
 block discarded – undo
3187 3379
 	);
3188 3380
 	$context['common_stats']['boardindex_total_posts'] = sprintf($txt['boardindex_total_posts'], $context['common_stats']['total_posts'], $context['common_stats']['total_topics'], $context['common_stats']['total_members']);
3189 3381
 
3190
-	if (empty($settings['theme_version']))
3191
-		addJavaScriptVar('smf_scripturl', $scripturl);
3382
+	if (empty($settings['theme_version'])) {
3383
+			addJavaScriptVar('smf_scripturl', $scripturl);
3384
+	}
3192 3385
 
3193
-	if (!isset($context['page_title']))
3194
-		$context['page_title'] = '';
3386
+	if (!isset($context['page_title'])) {
3387
+			$context['page_title'] = '';
3388
+	}
3195 3389
 
3196 3390
 	// Set some specific vars.
3197 3391
 	$context['page_title_html_safe'] = $smcFunc['htmlspecialchars'](un_htmlspecialchars($context['page_title'])) . (!empty($context['current_page']) ? ' - ' . $txt['page'] . ' ' . ($context['current_page'] + 1) : '');
@@ -3201,21 +3395,23 @@  discard block
 block discarded – undo
3201 3395
 	$context['meta_tags'][] = array('property' => 'og:site_name', 'content' => $context['forum_name']);
3202 3396
 	$context['meta_tags'][] = array('property' => 'og:title', 'content' => $context['page_title_html_safe']);
3203 3397
 
3204
-	if (!empty($context['meta_keywords']))
3205
-		$context['meta_tags'][] = array('name' => 'keywords', 'content' => $context['meta_keywords']);
3398
+	if (!empty($context['meta_keywords'])) {
3399
+			$context['meta_tags'][] = array('name' => 'keywords', 'content' => $context['meta_keywords']);
3400
+	}
3206 3401
 
3207
-	if (!empty($context['canonical_url']))
3208
-		$context['meta_tags'][] = array('property' => 'og:url', 'content' => $context['canonical_url']);
3402
+	if (!empty($context['canonical_url'])) {
3403
+			$context['meta_tags'][] = array('property' => 'og:url', 'content' => $context['canonical_url']);
3404
+	}
3209 3405
 
3210
-	if (!empty($settings['og_image']))
3211
-		$context['meta_tags'][] = array('property' => 'og:image', 'content' => $settings['og_image']);
3406
+	if (!empty($settings['og_image'])) {
3407
+			$context['meta_tags'][] = array('property' => 'og:image', 'content' => $settings['og_image']);
3408
+	}
3212 3409
 
3213 3410
 	if (!empty($context['meta_description']))
3214 3411
 	{
3215 3412
 		$context['meta_tags'][] = array('property' => 'og:description', 'content' => $context['meta_description']);
3216 3413
 		$context['meta_tags'][] = array('name' => 'description', 'content' => $context['meta_description']);
3217
-	}
3218
-	else
3414
+	} else
3219 3415
 	{
3220 3416
 		$context['meta_tags'][] = array('property' => 'og:description', 'content' => $context['page_title_html_safe']);
3221 3417
 		$context['meta_tags'][] = array('name' => 'description', 'content' => $context['page_title_html_safe']);
@@ -3240,8 +3436,9 @@  discard block
 block discarded – undo
3240 3436
 	$memory_needed = memoryReturnBytes($needed);
3241 3437
 
3242 3438
 	// should we account for how much is currently being used?
3243
-	if ($in_use)
3244
-		$memory_needed += function_exists('memory_get_usage') ? memory_get_usage() : (2 * 1048576);
3439
+	if ($in_use) {
3440
+			$memory_needed += function_exists('memory_get_usage') ? memory_get_usage() : (2 * 1048576);
3441
+	}
3245 3442
 
3246 3443
 	// if more is needed, request it
3247 3444
 	if ($memory_current < $memory_needed)
@@ -3264,8 +3461,9 @@  discard block
 block discarded – undo
3264 3461
  */
3265 3462
 function memoryReturnBytes($val)
3266 3463
 {
3267
-	if (is_integer($val))
3268
-		return $val;
3464
+	if (is_integer($val)) {
3465
+			return $val;
3466
+	}
3269 3467
 
3270 3468
 	// Separate the number from the designator
3271 3469
 	$val = trim($val);
@@ -3301,10 +3499,11 @@  discard block
 block discarded – undo
3301 3499
 		header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
3302 3500
 
3303 3501
 		// Are we debugging the template/html content?
3304
-		if (!isset($_REQUEST['xml']) && isset($_GET['debug']) && !isBrowser('ie'))
3305
-			header('Content-Type: application/xhtml+xml');
3306
-		elseif (!isset($_REQUEST['xml']))
3307
-			header('Content-Type: text/html; charset=' . (empty($context['character_set']) ? 'ISO-8859-1' : $context['character_set']));
3502
+		if (!isset($_REQUEST['xml']) && isset($_GET['debug']) && !isBrowser('ie')) {
3503
+					header('Content-Type: application/xhtml+xml');
3504
+		} elseif (!isset($_REQUEST['xml'])) {
3505
+					header('Content-Type: text/html; charset=' . (empty($context['character_set']) ? 'ISO-8859-1' : $context['character_set']));
3506
+		}
3308 3507
 	}
3309 3508
 
3310 3509
 	header('Content-Type: text/' . (isset($_REQUEST['xml']) ? 'xml' : 'html') . '; charset=' . (empty($context['character_set']) ? 'ISO-8859-1' : $context['character_set']));
@@ -3313,8 +3512,9 @@  discard block
 block discarded – undo
3313 3512
 	if ($context['in_maintenance'] && $context['user']['is_admin'])
3314 3513
 	{
3315 3514
 		$position = array_search('body', $context['template_layers']);
3316
-		if ($position === false)
3317
-			$position = array_search('main', $context['template_layers']);
3515
+		if ($position === false) {
3516
+					$position = array_search('main', $context['template_layers']);
3517
+		}
3318 3518
 
3319 3519
 		if ($position !== false)
3320 3520
 		{
@@ -3342,23 +3542,25 @@  discard block
 block discarded – undo
3342 3542
 
3343 3543
 			foreach ($securityFiles as $i => $securityFile)
3344 3544
 			{
3345
-				if (!file_exists($boarddir . '/' . $securityFile))
3346
-					unset($securityFiles[$i]);
3545
+				if (!file_exists($boarddir . '/' . $securityFile)) {
3546
+									unset($securityFiles[$i]);
3547
+				}
3347 3548
 			}
3348 3549
 
3349 3550
 			// We are already checking so many files...just few more doesn't make any difference! :P
3350
-			if (!empty($modSettings['currentAttachmentUploadDir']))
3351
-				$path = $modSettings['attachmentUploadDir'][$modSettings['currentAttachmentUploadDir']];
3352
-
3353
-			else
3354
-				$path = $modSettings['attachmentUploadDir'];
3551
+			if (!empty($modSettings['currentAttachmentUploadDir'])) {
3552
+							$path = $modSettings['attachmentUploadDir'][$modSettings['currentAttachmentUploadDir']];
3553
+			} else {
3554
+							$path = $modSettings['attachmentUploadDir'];
3555
+			}
3355 3556
 
3356 3557
 			secureDirectory($path, true);
3357 3558
 			secureDirectory($cachedir);
3358 3559
 
3359 3560
 			// If agreement is enabled, at least the english version shall exists
3360
-			if ($modSettings['requireAgreement'])
3361
-				$agreement = !file_exists($boarddir . '/agreement.txt');
3561
+			if ($modSettings['requireAgreement']) {
3562
+							$agreement = !file_exists($boarddir . '/agreement.txt');
3563
+			}
3362 3564
 
3363 3565
 			if (!empty($securityFiles) || (!empty($modSettings['cache_enable']) && !is_writable($cachedir)) || !empty($agreement))
3364 3566
 			{
@@ -3373,18 +3575,21 @@  discard block
 block discarded – undo
3373 3575
 					echo '
3374 3576
 				', $txt['not_removed'], '<strong>', $securityFile, '</strong>!<br>';
3375 3577
 
3376
-					if ($securityFile == 'Settings.php~' || $securityFile == 'Settings_bak.php~')
3377
-						echo '
3578
+					if ($securityFile == 'Settings.php~' || $securityFile == 'Settings_bak.php~') {
3579
+											echo '
3378 3580
 				', sprintf($txt['not_removed_extra'], $securityFile, substr($securityFile, 0, -1)), '<br>';
3581
+					}
3379 3582
 				}
3380 3583
 
3381
-				if (!empty($modSettings['cache_enable']) && !is_writable($cachedir))
3382
-					echo '
3584
+				if (!empty($modSettings['cache_enable']) && !is_writable($cachedir)) {
3585
+									echo '
3383 3586
 				<strong>', $txt['cache_writable'], '</strong><br>';
3587
+				}
3384 3588
 
3385
-				if (!empty($agreement))
3386
-					echo '
3589
+				if (!empty($agreement)) {
3590
+									echo '
3387 3591
 				<strong>', $txt['agreement_missing'], '</strong><br>';
3592
+				}
3388 3593
 
3389 3594
 				echo '
3390 3595
 			</p>
@@ -3399,16 +3604,18 @@  discard block
 block discarded – undo
3399 3604
 				<div class="windowbg alert" style="margin: 2ex; padding: 2ex; border: 2px dashed red;">
3400 3605
 					', sprintf($txt['you_are_post_banned'], $user_info['is_guest'] ? $txt['guest_title'] : $user_info['name']);
3401 3606
 
3402
-			if (!empty($_SESSION['ban']['cannot_post']['reason']))
3403
-				echo '
3607
+			if (!empty($_SESSION['ban']['cannot_post']['reason'])) {
3608
+							echo '
3404 3609
 					<div style="padding-left: 4ex; padding-top: 1ex;">', $_SESSION['ban']['cannot_post']['reason'], '</div>';
3610
+			}
3405 3611
 
3406
-			if (!empty($_SESSION['ban']['expire_time']))
3407
-				echo '
3612
+			if (!empty($_SESSION['ban']['expire_time'])) {
3613
+							echo '
3408 3614
 					<div>', sprintf($txt['your_ban_expires'], timeformat($_SESSION['ban']['expire_time'], false)), '</div>';
3409
-			else
3410
-				echo '
3615
+			} else {
3616
+							echo '
3411 3617
 					<div>', $txt['your_ban_expires_never'], '</div>';
3618
+			}
3412 3619
 
3413 3620
 			echo '
3414 3621
 				</div>';
@@ -3424,8 +3631,9 @@  discard block
 block discarded – undo
3424 3631
 	global $forum_copyright, $software_year, $forum_version;
3425 3632
 
3426 3633
 	// Don't display copyright for things like SSI.
3427
-	if (!isset($forum_version) || !isset($software_year))
3428
-		return;
3634
+	if (!isset($forum_version) || !isset($software_year)) {
3635
+			return;
3636
+	}
3429 3637
 
3430 3638
 	// Put in the version...
3431 3639
 	printf($forum_copyright, $forum_version, $software_year);
@@ -3443,9 +3651,10 @@  discard block
 block discarded – undo
3443 3651
 	$context['load_time'] = comma_format(round(array_sum(explode(' ', microtime())) - array_sum(explode(' ', $time_start)), 3));
3444 3652
 	$context['load_queries'] = $db_count;
3445 3653
 
3446
-	foreach (array_reverse($context['template_layers']) as $layer)
3447
-		loadSubTemplate($layer . '_below', true);
3448
-}
3654
+	foreach (array_reverse($context['template_layers']) as $layer) {
3655
+			loadSubTemplate($layer . '_below', true);
3656
+	}
3657
+	}
3449 3658
 
3450 3659
 /**
3451 3660
  * Output the Javascript files
@@ -3476,8 +3685,7 @@  discard block
 block discarded – undo
3476 3685
 			{
3477 3686
 				echo '
3478 3687
 		var ', $key, ';';
3479
-			}
3480
-			else
3688
+			} else
3481 3689
 			{
3482 3690
 				echo '
3483 3691
 		var ', $key, ' = ', $value, ';';
@@ -3492,26 +3700,27 @@  discard block
 block discarded – undo
3492 3700
 	foreach ($context['javascript_files'] as $id => $js_file)
3493 3701
 	{
3494 3702
 		// Last minute call! allow theme authors to disable single files.
3495
-		if (!empty($settings['disable_files']) && in_array($id, $settings['disable_files']))
3496
-			continue;
3703
+		if (!empty($settings['disable_files']) && in_array($id, $settings['disable_files'])) {
3704
+					continue;
3705
+		}
3497 3706
 
3498 3707
 		// By default all files don't get minimized unless the file explicitly says so!
3499 3708
 		if (!empty($js_file['options']['minimize']) && !empty($modSettings['minimize_files']))
3500 3709
 		{
3501
-			if ($do_deferred && !empty($js_file['options']['defer']))
3502
-				$toMinifyDefer[] = $js_file;
3503
-
3504
-			elseif (!$do_deferred && empty($js_file['options']['defer']))
3505
-				$toMinify[] = $js_file;
3710
+			if ($do_deferred && !empty($js_file['options']['defer'])) {
3711
+							$toMinifyDefer[] = $js_file;
3712
+			} elseif (!$do_deferred && empty($js_file['options']['defer'])) {
3713
+							$toMinify[] = $js_file;
3714
+			}
3506 3715
 
3507 3716
 			// Grab a random seed.
3508
-			if (!isset($minSeed))
3509
-				$minSeed = $js_file['options']['seed'];
3510
-		}
3511
-
3512
-		elseif ((!$do_deferred && empty($js_file['options']['defer'])) || ($do_deferred && !empty($js_file['options']['defer'])))
3513
-			echo '
3717
+			if (!isset($minSeed)) {
3718
+							$minSeed = $js_file['options']['seed'];
3719
+			}
3720
+		} elseif ((!$do_deferred && empty($js_file['options']['defer'])) || ($do_deferred && !empty($js_file['options']['defer']))) {
3721
+					echo '
3514 3722
 	<script src="', $js_file['fileUrl'], '"', !empty($js_file['options']['async']) ? ' async="async"' : '', '></script>';
3723
+		}
3515 3724
 	}
3516 3725
 
3517 3726
 	if ((!$do_deferred && !empty($toMinify)) || ($do_deferred && !empty($toMinifyDefer)))
@@ -3519,14 +3728,14 @@  discard block
 block discarded – undo
3519 3728
 		$result = custMinify(($do_deferred ? $toMinifyDefer : $toMinify), 'js', $do_deferred);
3520 3729
 
3521 3730
 		// Minify process couldn't work, print each individual files.
3522
-		if (!empty($result) && is_array($result))
3523
-			foreach ($result as $minFailedFile)
3731
+		if (!empty($result) && is_array($result)) {
3732
+					foreach ($result as $minFailedFile)
3524 3733
 				echo '
3525 3734
 	<script src="', $minFailedFile['fileUrl'], '"', !empty($minFailedFile['options']['async']) ? ' async="async"' : '', '></script>';
3526
-
3527
-		else
3528
-			echo '
3735
+		} else {
3736
+					echo '
3529 3737
 	<script src="', $settings['theme_url'] ,'/scripts/minified', ($do_deferred ? '_deferred' : '') ,'.js', $minSeed ,'"></script>';
3738
+		}
3530 3739
 	}
3531 3740
 
3532 3741
 	// Inline JavaScript - Actually useful some times!
@@ -3537,8 +3746,9 @@  discard block
 block discarded – undo
3537 3746
 			echo '
3538 3747
 <script>';
3539 3748
 
3540
-			foreach ($context['javascript_inline']['defer'] as $js_code)
3541
-				echo $js_code;
3749
+			foreach ($context['javascript_inline']['defer'] as $js_code) {
3750
+							echo $js_code;
3751
+			}
3542 3752
 
3543 3753
 			echo '
3544 3754
 </script>';
@@ -3549,8 +3759,9 @@  discard block
 block discarded – undo
3549 3759
 			echo '
3550 3760
 	<script>';
3551 3761
 
3552
-			foreach ($context['javascript_inline']['standard'] as $js_code)
3553
-				echo $js_code;
3762
+			foreach ($context['javascript_inline']['standard'] as $js_code) {
3763
+							echo $js_code;
3764
+			}
3554 3765
 
3555 3766
 			echo '
3556 3767
 	</script>';
@@ -3575,8 +3786,9 @@  discard block
 block discarded – undo
3575 3786
 	foreach ($context['css_files'] as $id => $file)
3576 3787
 	{
3577 3788
 		// Last minute call! allow theme authors to disable single files.
3578
-		if (!empty($settings['disable_files']) && in_array($id, $settings['disable_files']))
3579
-			continue;
3789
+		if (!empty($settings['disable_files']) && in_array($id, $settings['disable_files'])) {
3790
+					continue;
3791
+		}
3580 3792
 
3581 3793
 		// By default all files don't get minimized unless the file explicitly says so!
3582 3794
 		if (!empty($file['options']['minimize']) && !empty($modSettings['minimize_files']))
@@ -3584,12 +3796,12 @@  discard block
 block discarded – undo
3584 3796
 			$toMinify[] = $file;
3585 3797
 
3586 3798
 			// Grab a random seed.
3587
-			if (!isset($minSeed))
3588
-				$minSeed = $file['options']['seed'];
3799
+			if (!isset($minSeed)) {
3800
+							$minSeed = $file['options']['seed'];
3801
+			}
3802
+		} else {
3803
+					$normal[] = $file['fileUrl'];
3589 3804
 		}
3590
-
3591
-		else
3592
-			$normal[] = $file['fileUrl'];
3593 3805
 	}
3594 3806
 
3595 3807
 	if (!empty($toMinify))
@@ -3597,28 +3809,30 @@  discard block
 block discarded – undo
3597 3809
 		$result = custMinify($toMinify, 'css');
3598 3810
 
3599 3811
 		// Minify process couldn't work, print each individual files.
3600
-		if (!empty($result) && is_array($result))
3601
-			foreach ($result as $minFailedFile)
3812
+		if (!empty($result) && is_array($result)) {
3813
+					foreach ($result as $minFailedFile)
3602 3814
 				echo '
3603 3815
 	<link rel="stylesheet" href="', $minFailedFile['fileUrl'], '">';
3604
-
3605
-		else
3606
-			echo '
3816
+		} else {
3817
+					echo '
3607 3818
 	<link rel="stylesheet" href="', $settings['theme_url'] ,'/css/minified.css', $minSeed ,'">';
3819
+		}
3608 3820
 	}
3609 3821
 
3610 3822
 	// Print the rest after the minified files.
3611
-	if (!empty($normal))
3612
-		foreach ($normal as $nf)
3823
+	if (!empty($normal)) {
3824
+			foreach ($normal as $nf)
3613 3825
 			echo '
3614 3826
 	<link rel="stylesheet" href="', $nf ,'">';
3827
+	}
3615 3828
 
3616 3829
 	if ($db_show_debug === true)
3617 3830
 	{
3618 3831
 		// Try to keep only what's useful.
3619 3832
 		$repl = array($boardurl . '/Themes/' => '', $boardurl . '/' => '');
3620
-		foreach ($context['css_files'] as $file)
3621
-			$context['debug']['sheets'][] = strtr($file['fileName'], $repl);
3833
+		foreach ($context['css_files'] as $file) {
3834
+					$context['debug']['sheets'][] = strtr($file['fileName'], $repl);
3835
+		}
3622 3836
 	}
3623 3837
 
3624 3838
 	if (!empty($context['css_header']))
@@ -3626,9 +3840,10 @@  discard block
 block discarded – undo
3626 3840
 		echo '
3627 3841
 	<style>';
3628 3842
 
3629
-		foreach ($context['css_header'] as $css)
3630
-			echo $css .'
3843
+		foreach ($context['css_header'] as $css) {
3844
+					echo $css .'
3631 3845
 	';
3846
+		}
3632 3847
 
3633 3848
 		echo'
3634 3849
 	</style>';
@@ -3652,15 +3867,17 @@  discard block
 block discarded – undo
3652 3867
 	$type = !empty($type) && in_array($type, $types) ? $type : false;
3653 3868
 	$data = !empty($data) ? $data : false;
3654 3869
 
3655
-	if (empty($type) || empty($data))
3656
-		return false;
3870
+	if (empty($type) || empty($data)) {
3871
+			return false;
3872
+	}
3657 3873
 
3658 3874
 	// Did we already did this?
3659 3875
 	$toCache = cache_get_data('minimized_'. $settings['theme_id'] .'_'. $type, 86400);
3660 3876
 
3661 3877
 	// Already done?
3662
-	if (!empty($toCache))
3663
-		return true;
3878
+	if (!empty($toCache)) {
3879
+			return true;
3880
+	}
3664 3881
 
3665 3882
 	// No namespaces, sorry!
3666 3883
 	$classType = 'MatthiasMullie\\Minify\\'. strtoupper($type);
@@ -3742,8 +3959,9 @@  discard block
 block discarded – undo
3742 3959
 	global $modSettings, $smcFunc;
3743 3960
 
3744 3961
 	// Just make up a nice hash...
3745
-	if ($new)
3746
-		return sha1(md5($filename . time()) . mt_rand());
3962
+	if ($new) {
3963
+			return sha1(md5($filename . time()) . mt_rand());
3964
+	}
3747 3965
 
3748 3966
 	// Just make sure that attachment id is only a int
3749 3967
 	$attachment_id = (int) $attachment_id;
@@ -3760,23 +3978,25 @@  discard block
 block discarded – undo
3760 3978
 				'id_attach' => $attachment_id,
3761 3979
 			));
3762 3980
 
3763
-		if ($smcFunc['db_num_rows']($request) === 0)
3764
-			return false;
3981
+		if ($smcFunc['db_num_rows']($request) === 0) {
3982
+					return false;
3983
+		}
3765 3984
 
3766 3985
 		list ($file_hash) = $smcFunc['db_fetch_row']($request);
3767 3986
 		$smcFunc['db_free_result']($request);
3768 3987
 	}
3769 3988
 
3770 3989
 	// Still no hash? mmm...
3771
-	if (empty($file_hash))
3772
-		$file_hash = sha1(md5($filename . time()) . mt_rand());
3990
+	if (empty($file_hash)) {
3991
+			$file_hash = sha1(md5($filename . time()) . mt_rand());
3992
+	}
3773 3993
 
3774 3994
 	// Are we using multiple directories?
3775
-	if (is_array($modSettings['attachmentUploadDir']))
3776
-		$path = $modSettings['attachmentUploadDir'][$dir];
3777
-
3778
-	else
3779
-		$path = $modSettings['attachmentUploadDir'];
3995
+	if (is_array($modSettings['attachmentUploadDir'])) {
3996
+			$path = $modSettings['attachmentUploadDir'][$dir];
3997
+	} else {
3998
+			$path = $modSettings['attachmentUploadDir'];
3999
+	}
3780 4000
 
3781 4001
 	return $path . '/' . $attachment_id . '_' . $file_hash .'.dat';
3782 4002
 }
@@ -3791,8 +4011,9 @@  discard block
 block discarded – undo
3791 4011
 function ip2range($fullip)
3792 4012
 {
3793 4013
 	// Pretend that 'unknown' is 255.255.255.255. (since that can't be an IP anyway.)
3794
-	if ($fullip == 'unknown')
3795
-		$fullip = '255.255.255.255';
4014
+	if ($fullip == 'unknown') {
4015
+			$fullip = '255.255.255.255';
4016
+	}
3796 4017
 
3797 4018
 	$ip_parts = explode('-', $fullip);
3798 4019
 	$ip_array = array();
@@ -3816,10 +4037,11 @@  discard block
 block discarded – undo
3816 4037
 		$ip_array['low'] = $ip_parts[0];
3817 4038
 		$ip_array['high'] = $ip_parts[1];
3818 4039
 		return $ip_array;
3819
-	}
3820
-	elseif (count($ip_parts) == 2) // if ip 22.22.*-22.22.*
4040
+	} elseif (count($ip_parts) == 2) {
4041
+		// if ip 22.22.*-22.22.*
3821 4042
 	{
3822 4043
 		$valid_low = isValidIP($ip_parts[0]);
4044
+	}
3823 4045
 		$valid_high = isValidIP($ip_parts[1]);
3824 4046
 		$count = 0;
3825 4047
 		$mode = (preg_match('/:/',$ip_parts[0]) > 0 ? ':' : '.');
@@ -3834,7 +4056,9 @@  discard block
 block discarded – undo
3834 4056
 				$ip_parts[0] .= $mode . $min;
3835 4057
 				$valid_low = isValidIP($ip_parts[0]);
3836 4058
 				$count++;
3837
-				if ($count > 9) break;
4059
+				if ($count > 9) {
4060
+					break;
4061
+				}
3838 4062
 			}
3839 4063
 		}
3840 4064
 
@@ -3848,7 +4072,9 @@  discard block
 block discarded – undo
3848 4072
 				$ip_parts[1] .= $mode . $max;
3849 4073
 				$valid_high = isValidIP($ip_parts[1]);
3850 4074
 				$count++;
3851
-				if ($count > 9) break;
4075
+				if ($count > 9) {
4076
+					break;
4077
+				}
3852 4078
 			}
3853 4079
 		}
3854 4080
 
@@ -3873,46 +4099,54 @@  discard block
 block discarded – undo
3873 4099
 {
3874 4100
 	global $modSettings;
3875 4101
 
3876
-	if (($host = cache_get_data('hostlookup-' . $ip, 600)) !== null)
3877
-		return $host;
4102
+	if (($host = cache_get_data('hostlookup-' . $ip, 600)) !== null) {
4103
+			return $host;
4104
+	}
3878 4105
 	$t = microtime();
3879 4106
 
3880 4107
 	// Try the Linux host command, perhaps?
3881 4108
 	if (!isset($host) && (strpos(strtolower(PHP_OS), 'win') === false || strpos(strtolower(PHP_OS), 'darwin') !== false) && mt_rand(0, 1) == 1)
3882 4109
 	{
3883
-		if (!isset($modSettings['host_to_dis']))
3884
-			$test = @shell_exec('host -W 1 ' . @escapeshellarg($ip));
3885
-		else
3886
-			$test = @shell_exec('host ' . @escapeshellarg($ip));
4110
+		if (!isset($modSettings['host_to_dis'])) {
4111
+					$test = @shell_exec('host -W 1 ' . @escapeshellarg($ip));
4112
+		} else {
4113
+					$test = @shell_exec('host ' . @escapeshellarg($ip));
4114
+		}
3887 4115
 
3888 4116
 		// Did host say it didn't find anything?
3889
-		if (strpos($test, 'not found') !== false)
3890
-			$host = '';
4117
+		if (strpos($test, 'not found') !== false) {
4118
+					$host = '';
4119
+		}
3891 4120
 		// Invalid server option?
3892
-		elseif ((strpos($test, 'invalid option') || strpos($test, 'Invalid query name 1')) && !isset($modSettings['host_to_dis']))
3893
-			updateSettings(array('host_to_dis' => 1));
4121
+		elseif ((strpos($test, 'invalid option') || strpos($test, 'Invalid query name 1')) && !isset($modSettings['host_to_dis'])) {
4122
+					updateSettings(array('host_to_dis' => 1));
4123
+		}
3894 4124
 		// Maybe it found something, after all?
3895
-		elseif (preg_match('~\s([^\s]+?)\.\s~', $test, $match) == 1)
3896
-			$host = $match[1];
4125
+		elseif (preg_match('~\s([^\s]+?)\.\s~', $test, $match) == 1) {
4126
+					$host = $match[1];
4127
+		}
3897 4128
 	}
3898 4129
 
3899 4130
 	// This is nslookup; usually only Windows, but possibly some Unix?
3900 4131
 	if (!isset($host) && stripos(PHP_OS, 'win') !== false && strpos(strtolower(PHP_OS), 'darwin') === false && mt_rand(0, 1) == 1)
3901 4132
 	{
3902 4133
 		$test = @shell_exec('nslookup -timeout=1 ' . @escapeshellarg($ip));
3903
-		if (strpos($test, 'Non-existent domain') !== false)
3904
-			$host = '';
3905
-		elseif (preg_match('~Name:\s+([^\s]+)~', $test, $match) == 1)
3906
-			$host = $match[1];
4134
+		if (strpos($test, 'Non-existent domain') !== false) {
4135
+					$host = '';
4136
+		} elseif (preg_match('~Name:\s+([^\s]+)~', $test, $match) == 1) {
4137
+					$host = $match[1];
4138
+		}
3907 4139
 	}
3908 4140
 
3909 4141
 	// This is the last try :/.
3910
-	if (!isset($host) || $host === false)
3911
-		$host = @gethostbyaddr($ip);
4142
+	if (!isset($host) || $host === false) {
4143
+			$host = @gethostbyaddr($ip);
4144
+	}
3912 4145
 
3913 4146
 	// It took a long time, so let's cache it!
3914
-	if (array_sum(explode(' ', microtime())) - array_sum(explode(' ', $t)) > 0.5)
3915
-		cache_put_data('hostlookup-' . $ip, $host, 600);
4147
+	if (array_sum(explode(' ', microtime())) - array_sum(explode(' ', $t)) > 0.5) {
4148
+			cache_put_data('hostlookup-' . $ip, $host, 600);
4149
+	}
3916 4150
 
3917 4151
 	return $host;
3918 4152
 }
@@ -3948,20 +4182,21 @@  discard block
 block discarded – undo
3948 4182
 			{
3949 4183
 				$encrypted = substr(crypt($word, 'uk'), 2, $max_chars);
3950 4184
 				$total = 0;
3951
-				for ($i = 0; $i < $max_chars; $i++)
3952
-					$total += $possible_chars[ord($encrypted{$i})] * pow(63, $i);
4185
+				for ($i = 0; $i < $max_chars; $i++) {
4186
+									$total += $possible_chars[ord($encrypted{$i})] * pow(63, $i);
4187
+				}
3953 4188
 				$returned_ints[] = $max_chars == 4 ? min($total, 16777215) : $total;
3954 4189
 			}
3955 4190
 		}
3956 4191
 		return array_unique($returned_ints);
3957
-	}
3958
-	else
4192
+	} else
3959 4193
 	{
3960 4194
 		// Trim characters before and after and add slashes for database insertion.
3961 4195
 		$returned_words = array();
3962
-		foreach ($words as $word)
3963
-			if (($word = trim($word, '-_\'')) !== '')
4196
+		foreach ($words as $word) {
4197
+					if (($word = trim($word, '-_\'')) !== '')
3964 4198
 				$returned_words[] = $max_chars === null ? $word : substr($word, 0, $max_chars);
4199
+		}
3965 4200
 
3966 4201
 		// Filter out all words that occur more than once.
3967 4202
 		return array_unique($returned_words);
@@ -3983,16 +4218,18 @@  discard block
 block discarded – undo
3983 4218
 	global $settings, $txt;
3984 4219
 
3985 4220
 	// Does the current loaded theme have this and we are not forcing the usage of this function?
3986
-	if (function_exists('template_create_button') && !$force_use)
3987
-		return template_create_button($name, $alt, $label = '', $custom = '');
4221
+	if (function_exists('template_create_button') && !$force_use) {
4222
+			return template_create_button($name, $alt, $label = '', $custom = '');
4223
+	}
3988 4224
 
3989
-	if (!$settings['use_image_buttons'])
3990
-		return $txt[$alt];
3991
-	elseif (!empty($settings['use_buttons']))
3992
-		return '<span class="generic_icons ' . $name . '" alt="' . $txt[$alt] . '"></span>' . ($label != '' ? '&nbsp;<strong>' . $txt[$label] . '</strong>' : '');
3993
-	else
3994
-		return '<img src="' . $settings['lang_images_url'] . '/' . $name . '" alt="' . $txt[$alt] . '" ' . $custom . '>';
3995
-}
4225
+	if (!$settings['use_image_buttons']) {
4226
+			return $txt[$alt];
4227
+	} elseif (!empty($settings['use_buttons'])) {
4228
+			return '<span class="generic_icons ' . $name . '" alt="' . $txt[$alt] . '"></span>' . ($label != '' ? '&nbsp;<strong>' . $txt[$label] . '</strong>' : '');
4229
+	} else {
4230
+			return '<img src="' . $settings['lang_images_url'] . '/' . $name . '" alt="' . $txt[$alt] . '" ' . $custom . '>';
4231
+	}
4232
+	}
3996 4233
 
3997 4234
 /**
3998 4235
  * Sets up all of the top menu buttons
@@ -4035,9 +4272,10 @@  discard block
 block discarded – undo
4035 4272
 	var user_menus = new smc_PopupMenu();
4036 4273
 	user_menus.add("profile", "' . $scripturl . '?action=profile;area=popup");
4037 4274
 	user_menus.add("alerts", "' . $scripturl . '?action=profile;area=alerts_popup;u='. $context['user']['id'] .'");', true);
4038
-		if ($context['allow_pm'])
4039
-			addInlineJavaScript('
4275
+		if ($context['allow_pm']) {
4276
+					addInlineJavaScript('
4040 4277
 	user_menus.add("pm", "' . $scripturl . '?action=pm;sa=popup");', true);
4278
+		}
4041 4279
 
4042 4280
 		if (!empty($modSettings['enable_ajax_alerts']))
4043 4281
 		{
@@ -4197,88 +4435,96 @@  discard block
 block discarded – undo
4197 4435
 
4198 4436
 		// Now we put the buttons in the context so the theme can use them.
4199 4437
 		$menu_buttons = array();
4200
-		foreach ($buttons as $act => $button)
4201
-			if (!empty($button['show']))
4438
+		foreach ($buttons as $act => $button) {
4439
+					if (!empty($button['show']))
4202 4440
 			{
4203 4441
 				$button['active_button'] = false;
4442
+		}
4204 4443
 
4205 4444
 				// This button needs some action.
4206
-				if (isset($button['action_hook']))
4207
-					$needs_action_hook = true;
4445
+				if (isset($button['action_hook'])) {
4446
+									$needs_action_hook = true;
4447
+				}
4208 4448
 
4209 4449
 				// Make sure the last button truly is the last button.
4210 4450
 				if (!empty($button['is_last']))
4211 4451
 				{
4212
-					if (isset($last_button))
4213
-						unset($menu_buttons[$last_button]['is_last']);
4452
+					if (isset($last_button)) {
4453
+											unset($menu_buttons[$last_button]['is_last']);
4454
+					}
4214 4455
 					$last_button = $act;
4215 4456
 				}
4216 4457
 
4217 4458
 				// Go through the sub buttons if there are any.
4218
-				if (!empty($button['sub_buttons']))
4219
-					foreach ($button['sub_buttons'] as $key => $subbutton)
4459
+				if (!empty($button['sub_buttons'])) {
4460
+									foreach ($button['sub_buttons'] as $key => $subbutton)
4220 4461
 					{
4221 4462
 						if (empty($subbutton['show']))
4222 4463
 							unset($button['sub_buttons'][$key]);
4464
+				}
4223 4465
 
4224 4466
 						// 2nd level sub buttons next...
4225 4467
 						if (!empty($subbutton['sub_buttons']))
4226 4468
 						{
4227 4469
 							foreach ($subbutton['sub_buttons'] as $key2 => $sub_button2)
4228 4470
 							{
4229
-								if (empty($sub_button2['show']))
4230
-									unset($button['sub_buttons'][$key]['sub_buttons'][$key2]);
4471
+								if (empty($sub_button2['show'])) {
4472
+																	unset($button['sub_buttons'][$key]['sub_buttons'][$key2]);
4473
+								}
4231 4474
 							}
4232 4475
 						}
4233 4476
 					}
4234 4477
 
4235 4478
 				// Does this button have its own icon?
4236
-				if (isset($button['icon']) && file_exists($settings['theme_dir'] . '/images/' . $button['icon']))
4237
-					$button['icon'] = '<img src="' . $settings['images_url'] . '/' . $button['icon'] . '" alt="">';
4238
-				elseif (isset($button['icon']) && file_exists($settings['default_theme_dir'] . '/images/' . $button['icon']))
4239
-					$button['icon'] = '<img src="' . $settings['default_images_url'] . '/' . $button['icon'] . '" alt="">';
4240
-				elseif (isset($button['icon']))
4241
-					$button['icon'] = '<span class="generic_icons ' . $button['icon'] . '"></span>';
4242
-				else
4243
-					$button['icon'] = '<span class="generic_icons ' . $act . '"></span>';
4479
+				if (isset($button['icon']) && file_exists($settings['theme_dir'] . '/images/' . $button['icon'])) {
4480
+									$button['icon'] = '<img src="' . $settings['images_url'] . '/' . $button['icon'] . '" alt="">';
4481
+				} elseif (isset($button['icon']) && file_exists($settings['default_theme_dir'] . '/images/' . $button['icon'])) {
4482
+									$button['icon'] = '<img src="' . $settings['default_images_url'] . '/' . $button['icon'] . '" alt="">';
4483
+				} elseif (isset($button['icon'])) {
4484
+									$button['icon'] = '<span class="generic_icons ' . $button['icon'] . '"></span>';
4485
+				} else {
4486
+									$button['icon'] = '<span class="generic_icons ' . $act . '"></span>';
4487
+				}
4244 4488
 
4245 4489
 				$menu_buttons[$act] = $button;
4246 4490
 			}
4247 4491
 
4248
-		if (!empty($modSettings['cache_enable']) && $modSettings['cache_enable'] >= 2)
4249
-			cache_put_data('menu_buttons-' . implode('_', $user_info['groups']) . '-' . $user_info['language'], $menu_buttons, $cacheTime);
4492
+		if (!empty($modSettings['cache_enable']) && $modSettings['cache_enable'] >= 2) {
4493
+					cache_put_data('menu_buttons-' . implode('_', $user_info['groups']) . '-' . $user_info['language'], $menu_buttons, $cacheTime);
4494
+		}
4250 4495
 	}
4251 4496
 
4252 4497
 	$context['menu_buttons'] = $menu_buttons;
4253 4498
 
4254 4499
 	// Logging out requires the session id in the url.
4255
-	if (isset($context['menu_buttons']['logout']))
4256
-		$context['menu_buttons']['logout']['href'] = sprintf($context['menu_buttons']['logout']['href'], $context['session_var'], $context['session_id']);
4500
+	if (isset($context['menu_buttons']['logout'])) {
4501
+			$context['menu_buttons']['logout']['href'] = sprintf($context['menu_buttons']['logout']['href'], $context['session_var'], $context['session_id']);
4502
+	}
4257 4503
 
4258 4504
 	// Figure out which action we are doing so we can set the active tab.
4259 4505
 	// Default to home.
4260 4506
 	$current_action = 'home';
4261 4507
 
4262
-	if (isset($context['menu_buttons'][$context['current_action']]))
4263
-		$current_action = $context['current_action'];
4264
-	elseif ($context['current_action'] == 'search2')
4265
-		$current_action = 'search';
4266
-	elseif ($context['current_action'] == 'theme')
4267
-		$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';
4268
-	elseif ($context['current_action'] == 'register2')
4269
-		$current_action = 'register';
4270
-	elseif ($context['current_action'] == 'login2' || ($user_info['is_guest'] && $context['current_action'] == 'reminder'))
4271
-		$current_action = 'login';
4272
-	elseif ($context['current_action'] == 'groups' && $context['allow_moderation_center'])
4273
-		$current_action = 'moderate';
4508
+	if (isset($context['menu_buttons'][$context['current_action']])) {
4509
+			$current_action = $context['current_action'];
4510
+	} elseif ($context['current_action'] == 'search2') {
4511
+			$current_action = 'search';
4512
+	} elseif ($context['current_action'] == 'theme') {
4513
+			$current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';
4514
+	} elseif ($context['current_action'] == 'register2') {
4515
+			$current_action = 'register';
4516
+	} elseif ($context['current_action'] == 'login2' || ($user_info['is_guest'] && $context['current_action'] == 'reminder')) {
4517
+			$current_action = 'login';
4518
+	} elseif ($context['current_action'] == 'groups' && $context['allow_moderation_center']) {
4519
+			$current_action = 'moderate';
4520
+	}
4274 4521
 
4275 4522
 	// There are certain exceptions to the above where we don't want anything on the menu highlighted.
4276 4523
 	if ($context['current_action'] == 'profile' && !empty($context['user']['is_owner']))
4277 4524
 	{
4278 4525
 		$current_action = !empty($_GET['area']) && $_GET['area'] == 'showalerts' ? 'self_alerts' : 'self_profile';
4279 4526
 		$context[$current_action] = true;
4280
-	}
4281
-	elseif ($context['current_action'] == 'pm')
4527
+	} elseif ($context['current_action'] == 'pm')
4282 4528
 	{
4283 4529
 		$current_action = 'self_pm';
4284 4530
 		$context['self_pm'] = true;
@@ -4319,12 +4565,14 @@  discard block
 block discarded – undo
4319 4565
 	}
4320 4566
 
4321 4567
 	// Not all actions are simple.
4322
-	if (!empty($needs_action_hook))
4323
-		call_integration_hook('integrate_current_action', array(&$current_action));
4568
+	if (!empty($needs_action_hook)) {
4569
+			call_integration_hook('integrate_current_action', array(&$current_action));
4570
+	}
4324 4571
 
4325
-	if (isset($context['menu_buttons'][$current_action]))
4326
-		$context['menu_buttons'][$current_action]['active_button'] = true;
4327
-}
4572
+	if (isset($context['menu_buttons'][$current_action])) {
4573
+			$context['menu_buttons'][$current_action]['active_button'] = true;
4574
+	}
4575
+	}
4328 4576
 
4329 4577
 /**
4330 4578
  * Generate a random seed and ensure it's stored in settings.
@@ -4348,30 +4596,35 @@  discard block
 block discarded – undo
4348 4596
 	global $modSettings, $settings, $boarddir, $sourcedir, $db_show_debug;
4349 4597
 	global $context, $txt;
4350 4598
 
4351
-	if ($db_show_debug === true)
4352
-		$context['debug']['hooks'][] = $hook;
4599
+	if ($db_show_debug === true) {
4600
+			$context['debug']['hooks'][] = $hook;
4601
+	}
4353 4602
 
4354 4603
 	// Need to have some control.
4355
-	if (!isset($context['instances']))
4356
-		$context['instances'] = array();
4604
+	if (!isset($context['instances'])) {
4605
+			$context['instances'] = array();
4606
+	}
4357 4607
 
4358 4608
 	$results = array();
4359
-	if (empty($modSettings[$hook]))
4360
-		return $results;
4609
+	if (empty($modSettings[$hook])) {
4610
+			return $results;
4611
+	}
4361 4612
 
4362 4613
 	$functions = explode(',', $modSettings[$hook]);
4363 4614
 	// Loop through each function.
4364 4615
 	foreach ($functions as $function)
4365 4616
 	{
4366 4617
 		// Hook has been marked as "disabled". Skip it!
4367
-		if (strpos($function, '!') !== false)
4368
-			continue;
4618
+		if (strpos($function, '!') !== false) {
4619
+					continue;
4620
+		}
4369 4621
 
4370 4622
 		$call = call_helper($function, true);
4371 4623
 
4372 4624
 		// Is it valid?
4373
-		if (!empty($call))
4374
-			$results[$function] = call_user_func_array($call, $parameters);
4625
+		if (!empty($call)) {
4626
+					$results[$function] = call_user_func_array($call, $parameters);
4627
+		}
4375 4628
 
4376 4629
 		// Whatever it was suppose to call, it failed :(
4377 4630
 		elseif (!empty($function))
@@ -4387,8 +4640,9 @@  discard block
 block discarded – undo
4387 4640
 			}
4388 4641
 
4389 4642
 			// "Assume" the file resides on $boarddir somewhere...
4390
-			else
4391
-				log_error(sprintf($txt['hook_fail_call_to'], $function, $boarddir), 'general');
4643
+			else {
4644
+							log_error(sprintf($txt['hook_fail_call_to'], $function, $boarddir), 'general');
4645
+			}
4392 4646
 		}
4393 4647
 	}
4394 4648
 
@@ -4410,12 +4664,14 @@  discard block
 block discarded – undo
4410 4664
 	global $smcFunc, $modSettings;
4411 4665
 
4412 4666
 	// Any objects?
4413
-	if ($object)
4414
-		$function = $function . '#';
4667
+	if ($object) {
4668
+			$function = $function . '#';
4669
+	}
4415 4670
 
4416 4671
 	// Any files  to load?
4417
-	if (!empty($file) && is_string($file))
4418
-		$function = $file . (!empty($function) ? '|' . $function : '');
4672
+	if (!empty($file) && is_string($file)) {
4673
+			$function = $file . (!empty($function) ? '|' . $function : '');
4674
+	}
4419 4675
 
4420 4676
 	// Get the correct string.
4421 4677
 	$integration_call = $function;
@@ -4437,13 +4693,14 @@  discard block
 block discarded – undo
4437 4693
 		if (!empty($current_functions))
4438 4694
 		{
4439 4695
 			$current_functions = explode(',', $current_functions);
4440
-			if (in_array($integration_call, $current_functions))
4441
-				return;
4696
+			if (in_array($integration_call, $current_functions)) {
4697
+							return;
4698
+			}
4442 4699
 
4443 4700
 			$permanent_functions = array_merge($current_functions, array($integration_call));
4701
+		} else {
4702
+					$permanent_functions = array($integration_call);
4444 4703
 		}
4445
-		else
4446
-			$permanent_functions = array($integration_call);
4447 4704
 
4448 4705
 		updateSettings(array($hook => implode(',', $permanent_functions)));
4449 4706
 	}
@@ -4452,8 +4709,9 @@  discard block
 block discarded – undo
4452 4709
 	$functions = empty($modSettings[$hook]) ? array() : explode(',', $modSettings[$hook]);
4453 4710
 
4454 4711
 	// Do nothing, if it's already there.
4455
-	if (in_array($integration_call, $functions))
4456
-		return;
4712
+	if (in_array($integration_call, $functions)) {
4713
+			return;
4714
+	}
4457 4715
 
4458 4716
 	$functions[] = $integration_call;
4459 4717
 	$modSettings[$hook] = implode(',', $functions);
@@ -4476,12 +4734,14 @@  discard block
 block discarded – undo
4476 4734
 	global $smcFunc, $modSettings;
4477 4735
 
4478 4736
 	// Any objects?
4479
-	if ($object)
4480
-		$function = $function . '#';
4737
+	if ($object) {
4738
+			$function = $function . '#';
4739
+	}
4481 4740
 
4482 4741
 	// Any files  to load?
4483
-	if (!empty($file) && is_string($file))
4484
-		$function = $file . '|' . $function;
4742
+	if (!empty($file) && is_string($file)) {
4743
+			$function = $file . '|' . $function;
4744
+	}
4485 4745
 
4486 4746
 	// Get the correct string.
4487 4747
 	$integration_call = $function;
@@ -4502,16 +4762,18 @@  discard block
 block discarded – undo
4502 4762
 	{
4503 4763
 		$current_functions = explode(',', $current_functions);
4504 4764
 
4505
-		if (in_array($integration_call, $current_functions))
4506
-			updateSettings(array($hook => implode(',', array_diff($current_functions, array($integration_call)))));
4765
+		if (in_array($integration_call, $current_functions)) {
4766
+					updateSettings(array($hook => implode(',', array_diff($current_functions, array($integration_call)))));
4767
+		}
4507 4768
 	}
4508 4769
 
4509 4770
 	// Turn the function list into something usable.
4510 4771
 	$functions = empty($modSettings[$hook]) ? array() : explode(',', $modSettings[$hook]);
4511 4772
 
4512 4773
 	// You can only remove it if it's available.
4513
-	if (!in_array($integration_call, $functions))
4514
-		return;
4774
+	if (!in_array($integration_call, $functions)) {
4775
+			return;
4776
+	}
4515 4777
 
4516 4778
 	$functions = array_diff($functions, array($integration_call));
4517 4779
 	$modSettings[$hook] = implode(',', $functions);
@@ -4532,17 +4794,20 @@  discard block
 block discarded – undo
4532 4794
 	global $context, $smcFunc, $txt, $db_show_debug;
4533 4795
 
4534 4796
 	// Really?
4535
-	if (empty($string))
4536
-		return false;
4797
+	if (empty($string)) {
4798
+			return false;
4799
+	}
4537 4800
 
4538 4801
 	// An array? should be a "callable" array IE array(object/class, valid_callable).
4539 4802
 	// A closure? should be a callable one.
4540
-	if (is_array($string) || $string instanceof Closure)
4541
-		return $return ? $string : (is_callable($string) ? call_user_func($string) : false);
4803
+	if (is_array($string) || $string instanceof Closure) {
4804
+			return $return ? $string : (is_callable($string) ? call_user_func($string) : false);
4805
+	}
4542 4806
 
4543 4807
 	// No full objects, sorry! pass a method or a property instead!
4544
-	if (is_object($string))
4545
-		return false;
4808
+	if (is_object($string)) {
4809
+			return false;
4810
+	}
4546 4811
 
4547 4812
 	// Stay vitaminized my friends...
4548 4813
 	$string = $smcFunc['htmlspecialchars']($smcFunc['htmltrim']($string));
@@ -4551,8 +4816,9 @@  discard block
 block discarded – undo
4551 4816
 	$string = load_file($string);
4552 4817
 
4553 4818
 	// Loaded file failed
4554
-	if (empty($string))
4555
-		return false;
4819
+	if (empty($string)) {
4820
+			return false;
4821
+	}
4556 4822
 
4557 4823
 	// Found a method.
4558 4824
 	if (strpos($string, '::') !== false)
@@ -4573,8 +4839,9 @@  discard block
 block discarded – undo
4573 4839
 				// Add another one to the list.
4574 4840
 				if ($db_show_debug === true)
4575 4841
 				{
4576
-					if (!isset($context['debug']['instances']))
4577
-						$context['debug']['instances'] = array();
4842
+					if (!isset($context['debug']['instances'])) {
4843
+											$context['debug']['instances'] = array();
4844
+					}
4578 4845
 
4579 4846
 					$context['debug']['instances'][$class] = $class;
4580 4847
 				}
@@ -4584,13 +4851,15 @@  discard block
 block discarded – undo
4584 4851
 		}
4585 4852
 
4586 4853
 		// Right then. This is a call to a static method.
4587
-		else
4588
-			$func = array($class, $method);
4854
+		else {
4855
+					$func = array($class, $method);
4856
+		}
4589 4857
 	}
4590 4858
 
4591 4859
 	// Nope! just a plain regular function.
4592
-	else
4593
-		$func = $string;
4860
+	else {
4861
+			$func = $string;
4862
+	}
4594 4863
 
4595 4864
 	// Right, we got what we need, time to do some checks.
4596 4865
 	if (!is_callable($func, false, $callable_name))
@@ -4606,17 +4875,18 @@  discard block
 block discarded – undo
4606 4875
 	else
4607 4876
 	{
4608 4877
 		// What are we gonna do about it?
4609
-		if ($return)
4610
-			return $func;
4878
+		if ($return) {
4879
+					return $func;
4880
+		}
4611 4881
 
4612 4882
 		// If this is a plain function, avoid the heat of calling call_user_func().
4613 4883
 		else
4614 4884
 		{
4615
-			if (is_array($func))
4616
-				call_user_func($func);
4617
-
4618
-			else
4619
-				$func();
4885
+			if (is_array($func)) {
4886
+							call_user_func($func);
4887
+			} else {
4888
+							$func();
4889
+			}
4620 4890
 		}
4621 4891
 	}
4622 4892
 }
@@ -4633,31 +4903,34 @@  discard block
 block discarded – undo
4633 4903
 {
4634 4904
 	global $sourcedir, $txt, $boarddir, $settings;
4635 4905
 
4636
-	if (empty($string))
4637
-		return false;
4906
+	if (empty($string)) {
4907
+			return false;
4908
+	}
4638 4909
 
4639 4910
 	if (strpos($string, '|') !== false)
4640 4911
 	{
4641 4912
 		list ($file, $string) = explode('|', $string);
4642 4913
 
4643 4914
 		// Match the wildcards to their regular vars.
4644
-		if (empty($settings['theme_dir']))
4645
-			$absPath = strtr(trim($file), array('$boarddir' => $boarddir, '$sourcedir' => $sourcedir));
4646
-
4647
-		else
4648
-			$absPath = strtr(trim($file), array('$boarddir' => $boarddir, '$sourcedir' => $sourcedir, '$themedir' => $settings['theme_dir']));
4915
+		if (empty($settings['theme_dir'])) {
4916
+					$absPath = strtr(trim($file), array('$boarddir' => $boarddir, '$sourcedir' => $sourcedir));
4917
+		} else {
4918
+					$absPath = strtr(trim($file), array('$boarddir' => $boarddir, '$sourcedir' => $sourcedir, '$themedir' => $settings['theme_dir']));
4919
+		}
4649 4920
 
4650 4921
 		// Load the file if it can be loaded.
4651
-		if (file_exists($absPath))
4652
-			require_once($absPath);
4922
+		if (file_exists($absPath)) {
4923
+					require_once($absPath);
4924
+		}
4653 4925
 
4654 4926
 		// No? try a fallback to $sourcedir
4655 4927
 		else
4656 4928
 		{
4657 4929
 			$absPath = $sourcedir .'/'. $file;
4658 4930
 
4659
-			if (file_exists($absPath))
4660
-				require_once($absPath);
4931
+			if (file_exists($absPath)) {
4932
+							require_once($absPath);
4933
+			}
4661 4934
 
4662 4935
 			// Sorry, can't do much for you at this point.
4663 4936
 			else
@@ -4684,8 +4957,9 @@  discard block
 block discarded – undo
4684 4957
 	global $user_info, $smcFunc;
4685 4958
 
4686 4959
 	// Make sure we have something to work with.
4687
-	if (empty($topic))
4688
-		return array();
4960
+	if (empty($topic)) {
4961
+			return array();
4962
+	}
4689 4963
 
4690 4964
 
4691 4965
 	// We already know the number of likes per message, we just want to know whether the current user liked it or not.
@@ -4708,8 +4982,9 @@  discard block
 block discarded – undo
4708 4982
 				'topic' => $topic,
4709 4983
 			)
4710 4984
 		);
4711
-		while ($row = $smcFunc['db_fetch_assoc']($request))
4712
-			$temp[] = (int) $row['content_id'];
4985
+		while ($row = $smcFunc['db_fetch_assoc']($request)) {
4986
+					$temp[] = (int) $row['content_id'];
4987
+		}
4713 4988
 
4714 4989
 		cache_put_data($cache_key, $temp, $ttl);
4715 4990
 	}
@@ -4730,8 +5005,9 @@  discard block
 block discarded – undo
4730 5005
 {
4731 5006
 	global $context;
4732 5007
 
4733
-	if (empty($string))
4734
-		return $string;
5008
+	if (empty($string)) {
5009
+			return $string;
5010
+	}
4735 5011
 
4736 5012
 	// UTF-8 occurences of MS special characters
4737 5013
 	$findchars_utf8 = array(
@@ -4772,10 +5048,11 @@  discard block
 block discarded – undo
4772 5048
 		'--',	// &mdash;
4773 5049
 	);
4774 5050
 
4775
-	if ($context['utf8'])
4776
-		$string = str_replace($findchars_utf8, $replacechars, $string);
4777
-	else
4778
-		$string = str_replace($findchars_iso, $replacechars, $string);
5051
+	if ($context['utf8']) {
5052
+			$string = str_replace($findchars_utf8, $replacechars, $string);
5053
+	} else {
5054
+			$string = str_replace($findchars_iso, $replacechars, $string);
5055
+	}
4779 5056
 
4780 5057
 	return $string;
4781 5058
 }
@@ -4794,49 +5071,59 @@  discard block
 block discarded – undo
4794 5071
 {
4795 5072
 	global $context;
4796 5073
 
4797
-	if (!isset($matches[2]))
4798
-		return '';
5074
+	if (!isset($matches[2])) {
5075
+			return '';
5076
+	}
4799 5077
 
4800 5078
 	$num = $matches[2][0] === 'x' ? hexdec(substr($matches[2], 1)) : (int) $matches[2];
4801 5079
 
4802 5080
 	// remove left to right / right to left overrides
4803
-	if ($num === 0x202D || $num === 0x202E)
4804
-		return '';
5081
+	if ($num === 0x202D || $num === 0x202E) {
5082
+			return '';
5083
+	}
4805 5084
 
4806 5085
 	// Quote, Ampersand, Apostrophe, Less/Greater Than get html replaced
4807
-	if (in_array($num, array(0x22, 0x26, 0x27, 0x3C, 0x3E)))
4808
-		return '&#' . $num . ';';
5086
+	if (in_array($num, array(0x22, 0x26, 0x27, 0x3C, 0x3E))) {
5087
+			return '&#' . $num . ';';
5088
+	}
4809 5089
 
4810 5090
 	if (empty($context['utf8']))
4811 5091
 	{
4812 5092
 		// no control characters
4813
-		if ($num < 0x20)
4814
-			return '';
5093
+		if ($num < 0x20) {
5094
+					return '';
5095
+		}
4815 5096
 		// text is text
4816
-		elseif ($num < 0x80)
4817
-			return chr($num);
5097
+		elseif ($num < 0x80) {
5098
+					return chr($num);
5099
+		}
4818 5100
 		// all others get html-ised
4819
-		else
4820
-			return '&#' . $matches[2] . ';';
4821
-	}
4822
-	else
5101
+		else {
5102
+					return '&#' . $matches[2] . ';';
5103
+		}
5104
+	} else
4823 5105
 	{
4824 5106
 		// <0x20 are control characters, 0x20 is a space, > 0x10FFFF is past the end of the utf8 character set
4825 5107
 		// 0xD800 >= $num <= 0xDFFF are surrogate markers (not valid for utf8 text)
4826
-		if ($num < 0x20 || $num > 0x10FFFF || ($num >= 0xD800 && $num <= 0xDFFF))
4827
-			return '';
5108
+		if ($num < 0x20 || $num > 0x10FFFF || ($num >= 0xD800 && $num <= 0xDFFF)) {
5109
+					return '';
5110
+		}
4828 5111
 		// <0x80 (or less than 128) are standard ascii characters a-z A-Z 0-9 and punctuation
4829
-		elseif ($num < 0x80)
4830
-			return chr($num);
5112
+		elseif ($num < 0x80) {
5113
+					return chr($num);
5114
+		}
4831 5115
 		// <0x800 (2048)
4832
-		elseif ($num < 0x800)
4833
-			return chr(($num >> 6) + 192) . chr(($num & 63) + 128);
5116
+		elseif ($num < 0x800) {
5117
+					return chr(($num >> 6) + 192) . chr(($num & 63) + 128);
5118
+		}
4834 5119
 		// < 0x10000 (65536)
4835
-		elseif ($num < 0x10000)
4836
-			return chr(($num >> 12) + 224) . chr((($num >> 6) & 63) + 128) . chr(($num & 63) + 128);
5120
+		elseif ($num < 0x10000) {
5121
+					return chr(($num >> 12) + 224) . chr((($num >> 6) & 63) + 128) . chr(($num & 63) + 128);
5122
+		}
4837 5123
 		// <= 0x10FFFF (1114111)
4838
-		else
4839
-			return chr(($num >> 18) + 240) . chr((($num >> 12) & 63) + 128) . chr((($num >> 6) & 63) + 128) . chr(($num & 63) + 128);
5124
+		else {
5125
+					return chr(($num >> 18) + 240) . chr((($num >> 12) & 63) + 128) . chr((($num >> 6) & 63) + 128) . chr(($num & 63) + 128);
5126
+		}
4840 5127
 	}
4841 5128
 }
4842 5129
 
@@ -4852,28 +5139,34 @@  discard block
 block discarded – undo
4852 5139
  */
4853 5140
 function fixchar__callback($matches)
4854 5141
 {
4855
-	if (!isset($matches[1]))
4856
-		return '';
5142
+	if (!isset($matches[1])) {
5143
+			return '';
5144
+	}
4857 5145
 
4858 5146
 	$num = $matches[1][0] === 'x' ? hexdec(substr($matches[1], 1)) : (int) $matches[1];
4859 5147
 
4860 5148
 	// <0x20 are control characters, > 0x10FFFF is past the end of the utf8 character set
4861 5149
 	// 0xD800 >= $num <= 0xDFFF are surrogate markers (not valid for utf8 text), 0x202D-E are left to right overrides
4862
-	if ($num < 0x20 || $num > 0x10FFFF || ($num >= 0xD800 && $num <= 0xDFFF) || $num === 0x202D || $num === 0x202E)
4863
-		return '';
5150
+	if ($num < 0x20 || $num > 0x10FFFF || ($num >= 0xD800 && $num <= 0xDFFF) || $num === 0x202D || $num === 0x202E) {
5151
+			return '';
5152
+	}
4864 5153
 	// <0x80 (or less than 128) are standard ascii characters a-z A-Z 0-9 and punctuation
4865
-	elseif ($num < 0x80)
4866
-		return chr($num);
5154
+	elseif ($num < 0x80) {
5155
+			return chr($num);
5156
+	}
4867 5157
 	// <0x800 (2048)
4868
-	elseif ($num < 0x800)
4869
-		return chr(($num >> 6) + 192) . chr(($num & 63) + 128);
5158
+	elseif ($num < 0x800) {
5159
+			return chr(($num >> 6) + 192) . chr(($num & 63) + 128);
5160
+	}
4870 5161
 	// < 0x10000 (65536)
4871
-	elseif ($num < 0x10000)
4872
-		return chr(($num >> 12) + 224) . chr((($num >> 6) & 63) + 128) . chr(($num & 63) + 128);
5162
+	elseif ($num < 0x10000) {
5163
+			return chr(($num >> 12) + 224) . chr((($num >> 6) & 63) + 128) . chr(($num & 63) + 128);
5164
+	}
4873 5165
 	// <= 0x10FFFF (1114111)
4874
-	else
4875
-		return chr(($num >> 18) + 240) . chr((($num >> 12) & 63) + 128) . chr((($num >> 6) & 63) + 128) . chr(($num & 63) + 128);
4876
-}
5166
+	else {
5167
+			return chr(($num >> 18) + 240) . chr((($num >> 12) & 63) + 128) . chr((($num >> 6) & 63) + 128) . chr(($num & 63) + 128);
5168
+	}
5169
+	}
4877 5170
 
4878 5171
 /**
4879 5172
  * Strips out invalid html entities, replaces others with html style &#123; codes
@@ -4886,17 +5179,19 @@  discard block
 block discarded – undo
4886 5179
  */
4887 5180
 function entity_fix__callback($matches)
4888 5181
 {
4889
-	if (!isset($matches[2]))
4890
-		return '';
5182
+	if (!isset($matches[2])) {
5183
+			return '';
5184
+	}
4891 5185
 
4892 5186
 	$num = $matches[2][0] === 'x' ? hexdec(substr($matches[2], 1)) : (int) $matches[2];
4893 5187
 
4894 5188
 	// we don't allow control characters, characters out of range, byte markers, etc
4895
-	if ($num < 0x20 || $num > 0x10FFFF || ($num >= 0xD800 && $num <= 0xDFFF) || $num == 0x202D || $num == 0x202E)
4896
-		return '';
4897
-	else
4898
-		return '&#' . $num . ';';
4899
-}
5189
+	if ($num < 0x20 || $num > 0x10FFFF || ($num >= 0xD800 && $num <= 0xDFFF) || $num == 0x202D || $num == 0x202E) {
5190
+			return '';
5191
+	} else {
5192
+			return '&#' . $num . ';';
5193
+	}
5194
+	}
4900 5195
 
4901 5196
 /**
4902 5197
  * Return a Gravatar URL based on
@@ -4920,18 +5215,23 @@  discard block
 block discarded – undo
4920 5215
 		$ratings = array('G', 'PG', 'R', 'X');
4921 5216
 		$defaults = array('mm', 'identicon', 'monsterid', 'wavatar', 'retro', 'blank');
4922 5217
 		$url_params = array();
4923
-		if (!empty($modSettings['gravatarMaxRating']) && in_array($modSettings['gravatarMaxRating'], $ratings))
4924
-			$url_params[] = 'rating=' . $modSettings['gravatarMaxRating'];
4925
-		if (!empty($modSettings['gravatarDefault']) && in_array($modSettings['gravatarDefault'], $defaults))
4926
-			$url_params[] = 'default=' . $modSettings['gravatarDefault'];
4927
-		if (!empty($modSettings['avatar_max_width_external']))
4928
-			$size_string = (int) $modSettings['avatar_max_width_external'];
4929
-		if (!empty($modSettings['avatar_max_height_external']) && !empty($size_string))
4930
-			if ((int) $modSettings['avatar_max_height_external'] < $size_string)
5218
+		if (!empty($modSettings['gravatarMaxRating']) && in_array($modSettings['gravatarMaxRating'], $ratings)) {
5219
+					$url_params[] = 'rating=' . $modSettings['gravatarMaxRating'];
5220
+		}
5221
+		if (!empty($modSettings['gravatarDefault']) && in_array($modSettings['gravatarDefault'], $defaults)) {
5222
+					$url_params[] = 'default=' . $modSettings['gravatarDefault'];
5223
+		}
5224
+		if (!empty($modSettings['avatar_max_width_external'])) {
5225
+					$size_string = (int) $modSettings['avatar_max_width_external'];
5226
+		}
5227
+		if (!empty($modSettings['avatar_max_height_external']) && !empty($size_string)) {
5228
+					if ((int) $modSettings['avatar_max_height_external'] < $size_string)
4931 5229
 				$size_string = $modSettings['avatar_max_height_external'];
5230
+		}
4932 5231
 
4933
-		if (!empty($size_string))
4934
-			$url_params[] = 's=' . $size_string;
5232
+		if (!empty($size_string)) {
5233
+					$url_params[] = 's=' . $size_string;
5234
+		}
4935 5235
 	}
4936 5236
 	$http_method = !empty($modSettings['force_ssl']) && $modSettings['force_ssl'] == 2 ? 'https://secure' : 'http://www';
4937 5237
 
@@ -4950,22 +5250,26 @@  discard block
 block discarded – undo
4950 5250
 	static $timezones = null, $lastwhen = null;
4951 5251
 
4952 5252
 	// No point doing this over if we already did it once
4953
-	if (!empty($timezones) && $when == $lastwhen)
4954
-		return $timezones;
4955
-	else
4956
-		$lastwhen = $when;
5253
+	if (!empty($timezones) && $when == $lastwhen) {
5254
+			return $timezones;
5255
+	} else {
5256
+			$lastwhen = $when;
5257
+	}
4957 5258
 
4958 5259
 	// Parseable datetime string?
4959
-	if (is_int($timestamp = strtotime($when)))
4960
-		$when = $timestamp;
5260
+	if (is_int($timestamp = strtotime($when))) {
5261
+			$when = $timestamp;
5262
+	}
4961 5263
 
4962 5264
 	// A Unix timestamp?
4963
-	elseif (is_numeric($when))
4964
-		$when = intval($when);
5265
+	elseif (is_numeric($when)) {
5266
+			$when = intval($when);
5267
+	}
4965 5268
 
4966 5269
 	// Invalid value? Just get current Unix timestamp.
4967
-	else
4968
-		$when = time();
5270
+	else {
5271
+			$when = time();
5272
+	}
4969 5273
 
4970 5274
 	// We'll need these too
4971 5275
 	$date_when = date_create('@' . $when);
@@ -5029,8 +5333,9 @@  discard block
 block discarded – undo
5029 5333
 	foreach ($priority_countries as $country)
5030 5334
 	{
5031 5335
 		$country_tzids = @timezone_identifiers_list(DateTimeZone::PER_COUNTRY, strtoupper(trim($country)));
5032
-		if (!empty($country_tzids))
5033
-			$priority_tzids = array_merge($priority_tzids, $country_tzids);
5336
+		if (!empty($country_tzids)) {
5337
+					$priority_tzids = array_merge($priority_tzids, $country_tzids);
5338
+		}
5034 5339
 	}
5035 5340
 
5036 5341
 	// Process the preferred timezones first, then the rest.
@@ -5040,8 +5345,9 @@  discard block
 block discarded – undo
5040 5345
 	foreach ($tzids as $tzid)
5041 5346
 	{
5042 5347
 		// We don't want UTC right now
5043
-		if ($tzid == 'UTC')
5044
-			continue;
5348
+		if ($tzid == 'UTC') {
5349
+					continue;
5350
+		}
5045 5351
 
5046 5352
 		$tz = timezone_open($tzid);
5047 5353
 
@@ -5056,12 +5362,14 @@  discard block
 block discarded – undo
5056 5362
 		$tzgeo = timezone_location_get($tz);
5057 5363
 
5058 5364
 		// Don't overwrite our preferred tzids
5059
-		if (empty($zones[$tzkey]['tzid']))
5060
-			$zones[$tzkey]['tzid'] = $tzid;
5365
+		if (empty($zones[$tzkey]['tzid'])) {
5366
+					$zones[$tzkey]['tzid'] = $tzid;
5367
+		}
5061 5368
 
5062 5369
 		// A time zone from a prioritized country?
5063
-		if (in_array($tzid, $priority_tzids))
5064
-			$priority_zones[$tzkey] = true;
5370
+		if (in_array($tzid, $priority_tzids)) {
5371
+					$priority_zones[$tzkey] = true;
5372
+		}
5065 5373
 
5066 5374
 		// Keep track of the location and offset for this tzid
5067 5375
 		$tzid_parts = explode('/', $tzid);
@@ -5083,15 +5391,17 @@  discard block
 block discarded – undo
5083 5391
 
5084 5392
 		date_timezone_set($date_when, timezone_open($tzvalue['tzid']));
5085 5393
 
5086
-		if (!empty($timezone_descriptions[$tzvalue['tzid']]))
5087
-			$desc = $timezone_descriptions[$tzvalue['tzid']];
5088
-		else
5089
-			$desc = implode(', ', array_unique($tzvalue['locations']));
5394
+		if (!empty($timezone_descriptions[$tzvalue['tzid']])) {
5395
+					$desc = $timezone_descriptions[$tzvalue['tzid']];
5396
+		} else {
5397
+					$desc = implode(', ', array_unique($tzvalue['locations']));
5398
+		}
5090 5399
 
5091
-		if (isset($priority_zones[$tzkey]))
5092
-			$priority_timezones[$tzvalue['tzid']] = $tzinfo[0]['abbr'] . ' - ' . $desc . ' [UTC' . date_format($date_when, 'P') . ']';
5093
-		else
5094
-			$timezones[$tzvalue['tzid']] = $tzinfo[0]['abbr'] . ' - ' . $desc . ' [UTC' . date_format($date_when, 'P') . ']';
5400
+		if (isset($priority_zones[$tzkey])) {
5401
+					$priority_timezones[$tzvalue['tzid']] = $tzinfo[0]['abbr'] . ' - ' . $desc . ' [UTC' . date_format($date_when, 'P') . ']';
5402
+		} else {
5403
+					$timezones[$tzvalue['tzid']] = $tzinfo[0]['abbr'] . ' - ' . $desc . ' [UTC' . date_format($date_when, 'P') . ']';
5404
+		}
5095 5405
 	}
5096 5406
 
5097 5407
 	$timezones = array_merge(
@@ -5145,9 +5455,9 @@  discard block
 block discarded – undo
5145 5455
 			'Indian/Kerguelen' => 'TFT',
5146 5456
 		);
5147 5457
 
5148
-		if (!empty($missing_tz_abbrs[$tzid]))
5149
-			$tz_abbrev = $missing_tz_abbrs[$tzid];
5150
-		else
5458
+		if (!empty($missing_tz_abbrs[$tzid])) {
5459
+					$tz_abbrev = $missing_tz_abbrs[$tzid];
5460
+		} else
5151 5461
 		{
5152 5462
 			// Russia likes to experiment with time zones often, and names them as offsets from Moscow
5153 5463
 			$tz_location = timezone_location_get(timezone_open($tzid));
@@ -5175,8 +5485,9 @@  discard block
 block discarded – undo
5175 5485
  */
5176 5486
 function inet_ptod($ip_address)
5177 5487
 {
5178
-	if (!isValidIP($ip_address))
5179
-		return $ip_address;
5488
+	if (!isValidIP($ip_address)) {
5489
+			return $ip_address;
5490
+	}
5180 5491
 
5181 5492
 	$bin = inet_pton($ip_address);
5182 5493
 	return $bin;
@@ -5188,13 +5499,15 @@  discard block
 block discarded – undo
5188 5499
  */
5189 5500
 function inet_dtop($bin)
5190 5501
 {
5191
-	if(empty($bin))
5192
-		return '';
5502
+	if(empty($bin)) {
5503
+			return '';
5504
+	}
5193 5505
 
5194 5506
 	global $db_type;
5195 5507
 
5196
-	if ($db_type == 'postgresql')
5197
-		return $bin;
5508
+	if ($db_type == 'postgresql') {
5509
+			return $bin;
5510
+	}
5198 5511
 
5199 5512
 	$ip_address = inet_ntop($bin);
5200 5513
 
@@ -5219,26 +5532,32 @@  discard block
 block discarded – undo
5219 5532
  */
5220 5533
 function _safe_serialize($value)
5221 5534
 {
5222
-	if(is_null($value))
5223
-		return 'N;';
5535
+	if(is_null($value)) {
5536
+			return 'N;';
5537
+	}
5224 5538
 
5225
-	if(is_bool($value))
5226
-		return 'b:'. (int) $value .';';
5539
+	if(is_bool($value)) {
5540
+			return 'b:'. (int) $value .';';
5541
+	}
5227 5542
 
5228
-	if(is_int($value))
5229
-		return 'i:'. $value .';';
5543
+	if(is_int($value)) {
5544
+			return 'i:'. $value .';';
5545
+	}
5230 5546
 
5231
-	if(is_float($value))
5232
-		return 'd:'. str_replace(',', '.', $value) .';';
5547
+	if(is_float($value)) {
5548
+			return 'd:'. str_replace(',', '.', $value) .';';
5549
+	}
5233 5550
 
5234
-	if(is_string($value))
5235
-		return 's:'. strlen($value) .':"'. $value .'";';
5551
+	if(is_string($value)) {
5552
+			return 's:'. strlen($value) .':"'. $value .'";';
5553
+	}
5236 5554
 
5237 5555
 	if(is_array($value))
5238 5556
 	{
5239 5557
 		$out = '';
5240
-		foreach($value as $k => $v)
5241
-			$out .= _safe_serialize($k) . _safe_serialize($v);
5558
+		foreach($value as $k => $v) {
5559
+					$out .= _safe_serialize($k) . _safe_serialize($v);
5560
+		}
5242 5561
 
5243 5562
 		return 'a:'. count($value) .':{'. $out .'}';
5244 5563
 	}
@@ -5264,8 +5583,9 @@  discard block
 block discarded – undo
5264 5583
 
5265 5584
 	$out = _safe_serialize($value);
5266 5585
 
5267
-	if (isset($mbIntEnc))
5268
-		mb_internal_encoding($mbIntEnc);
5586
+	if (isset($mbIntEnc)) {
5587
+			mb_internal_encoding($mbIntEnc);
5588
+	}
5269 5589
 
5270 5590
 	return $out;
5271 5591
 }
@@ -5282,8 +5602,9 @@  discard block
 block discarded – undo
5282 5602
 function _safe_unserialize($str)
5283 5603
 {
5284 5604
 	// Input  is not a string.
5285
-	if(empty($str) || !is_string($str))
5286
-		return false;
5605
+	if(empty($str) || !is_string($str)) {
5606
+			return false;
5607
+	}
5287 5608
 
5288 5609
 	$stack = array();
5289 5610
 	$expected = array();
@@ -5299,43 +5620,38 @@  discard block
 block discarded – undo
5299 5620
 	while($state != 1)
5300 5621
 	{
5301 5622
 		$type = isset($str[0]) ? $str[0] : '';
5302
-		if($type == '}')
5303
-			$str = substr($str, 1);
5304
-
5305
-		else if($type == 'N' && $str[1] == ';')
5623
+		if($type == '}') {
5624
+					$str = substr($str, 1);
5625
+		} else if($type == 'N' && $str[1] == ';')
5306 5626
 		{
5307 5627
 			$value = null;
5308 5628
 			$str = substr($str, 2);
5309
-		}
5310
-		else if($type == 'b' && preg_match('/^b:([01]);/', $str, $matches))
5629
+		} else if($type == 'b' && preg_match('/^b:([01]);/', $str, $matches))
5311 5630
 		{
5312 5631
 			$value = $matches[1] == '1' ? true : false;
5313 5632
 			$str = substr($str, 4);
5314
-		}
5315
-		else if($type == 'i' && preg_match('/^i:(-?[0-9]+);(.*)/s', $str, $matches))
5633
+		} else if($type == 'i' && preg_match('/^i:(-?[0-9]+);(.*)/s', $str, $matches))
5316 5634
 		{
5317 5635
 			$value = (int)$matches[1];
5318 5636
 			$str = $matches[2];
5319
-		}
5320
-		else if($type == 'd' && preg_match('/^d:(-?[0-9]+\.?[0-9]*(E[+-][0-9]+)?);(.*)/s', $str, $matches))
5637
+		} else if($type == 'd' && preg_match('/^d:(-?[0-9]+\.?[0-9]*(E[+-][0-9]+)?);(.*)/s', $str, $matches))
5321 5638
 		{
5322 5639
 			$value = (float)$matches[1];
5323 5640
 			$str = $matches[3];
5324
-		}
5325
-		else if($type == 's' && preg_match('/^s:([0-9]+):"(.*)/s', $str, $matches) && substr($matches[2], (int)$matches[1], 2) == '";')
5641
+		} else if($type == 's' && preg_match('/^s:([0-9]+):"(.*)/s', $str, $matches) && substr($matches[2], (int)$matches[1], 2) == '";')
5326 5642
 		{
5327 5643
 			$value = substr($matches[2], 0, (int)$matches[1]);
5328 5644
 			$str = substr($matches[2], (int)$matches[1] + 2);
5329
-		}
5330
-		else if($type == 'a' && preg_match('/^a:([0-9]+):{(.*)/s', $str, $matches))
5645
+		} else if($type == 'a' && preg_match('/^a:([0-9]+):{(.*)/s', $str, $matches))
5331 5646
 		{
5332 5647
 			$expectedLength = (int)$matches[1];
5333 5648
 			$str = $matches[2];
5334 5649
 		}
5335 5650
 
5336 5651
 		// Object or unknown/malformed type.
5337
-		else
5338
-			return false;
5652
+		else {
5653
+					return false;
5654
+		}
5339 5655
 
5340 5656
 		switch($state)
5341 5657
 		{
@@ -5363,8 +5679,9 @@  discard block
 block discarded – undo
5363 5679
 				if($type == '}')
5364 5680
 				{
5365 5681
 					// Array size is less than expected.
5366
-					if(count($list) < end($expected))
5367
-						return false;
5682
+					if(count($list) < end($expected)) {
5683
+											return false;
5684
+					}
5368 5685
 
5369 5686
 					unset($list);
5370 5687
 					$list = &$stack[count($stack)-1];
@@ -5373,8 +5690,9 @@  discard block
 block discarded – undo
5373 5690
 					// Go to terminal state if we're at the end of the root array.
5374 5691
 					array_pop($expected);
5375 5692
 
5376
-					if(count($expected) == 0)
5377
-						$state = 1;
5693
+					if(count($expected) == 0) {
5694
+											$state = 1;
5695
+					}
5378 5696
 
5379 5697
 					break;
5380 5698
 				}
@@ -5382,8 +5700,9 @@  discard block
 block discarded – undo
5382 5700
 				if($type == 'i' || $type == 's')
5383 5701
 				{
5384 5702
 					// Array size exceeds expected length.
5385
-					if(count($list) >= end($expected))
5386
-						return false;
5703
+					if(count($list) >= end($expected)) {
5704
+											return false;
5705
+					}
5387 5706
 
5388 5707
 					$key = $value;
5389 5708
 					$state = 3;
@@ -5417,8 +5736,9 @@  discard block
 block discarded – undo
5417 5736
 	}
5418 5737
 
5419 5738
 	// Trailing data in input.
5420
-	if(!empty($str))
5421
-		return false;
5739
+	if(!empty($str)) {
5740
+			return false;
5741
+	}
5422 5742
 
5423 5743
 	return $data;
5424 5744
 }
@@ -5441,8 +5761,9 @@  discard block
 block discarded – undo
5441 5761
 
5442 5762
 	$out = _safe_unserialize($str);
5443 5763
 
5444
-	if (isset($mbIntEnc))
5445
-		mb_internal_encoding($mbIntEnc);
5764
+	if (isset($mbIntEnc)) {
5765
+			mb_internal_encoding($mbIntEnc);
5766
+	}
5446 5767
 
5447 5768
 	return $out;
5448 5769
 }
@@ -5457,12 +5778,14 @@  discard block
 block discarded – undo
5457 5778
 function smf_chmod($file, $value = 0)
5458 5779
 {
5459 5780
 	// No file? no checks!
5460
-	if (empty($file))
5461
-		return false;
5781
+	if (empty($file)) {
5782
+			return false;
5783
+	}
5462 5784
 
5463 5785
 	// Already writable?
5464
-	if (is_writable($file))
5465
-		return true;
5786
+	if (is_writable($file)) {
5787
+			return true;
5788
+	}
5466 5789
 
5467 5790
 	// Do we have a file or a dir?
5468 5791
 	$isDir = is_dir($file);
@@ -5478,10 +5801,9 @@  discard block
 block discarded – undo
5478 5801
 		{
5479 5802
 			$isWritable = true;
5480 5803
 			break;
5804
+		} else {
5805
+					@chmod($file, $val);
5481 5806
 		}
5482
-
5483
-		else
5484
-			@chmod($file, $val);
5485 5807
 	}
5486 5808
 
5487 5809
 	return $isWritable;
@@ -5500,8 +5822,9 @@  discard block
 block discarded – undo
5500 5822
 	global $txt;
5501 5823
 
5502 5824
 	// Come on...
5503
-	if (empty($json) || !is_string($json))
5504
-		return array();
5825
+	if (empty($json) || !is_string($json)) {
5826
+			return array();
5827
+	}
5505 5828
 
5506 5829
 	$returnArray = @json_decode($json, $returnAsArray);
5507 5830
 
@@ -5539,11 +5862,11 @@  discard block
 block discarded – undo
5539 5862
 		$jsonDebug = $jsonDebug[0];
5540 5863
 		loadLanguage('Errors');
5541 5864
 
5542
-		if (!empty($jsonDebug))
5543
-			log_error($txt['json_'. $jsonError], 'critical', $jsonDebug['file'], $jsonDebug['line']);
5544
-
5545
-		else
5546
-			log_error($txt['json_'. $jsonError], 'critical');
5865
+		if (!empty($jsonDebug)) {
5866
+					log_error($txt['json_'. $jsonError], 'critical', $jsonDebug['file'], $jsonDebug['line']);
5867
+		} else {
5868
+					log_error($txt['json_'. $jsonError], 'critical');
5869
+		}
5547 5870
 
5548 5871
 		// Everyone expects an array.
5549 5872
 		return array();
@@ -5573,8 +5896,9 @@  discard block
 block discarded – undo
5573 5896
 	global $db_show_debug, $modSettings;
5574 5897
 
5575 5898
 	// Defensive programming anyone?
5576
-	if (empty($data))
5577
-		return false;
5899
+	if (empty($data)) {
5900
+			return false;
5901
+	}
5578 5902
 
5579 5903
 	// Don't need extra stuff...
5580 5904
 	$db_show_debug = false;
@@ -5582,11 +5906,11 @@  discard block
 block discarded – undo
5582 5906
 	// Kill anything else.
5583 5907
 	ob_end_clean();
5584 5908
 
5585
-	if (!empty($modSettings['CompressedOutput']))
5586
-		@ob_start('ob_gzhandler');
5587
-
5588
-	else
5589
-		ob_start();
5909
+	if (!empty($modSettings['CompressedOutput'])) {
5910
+			@ob_start('ob_gzhandler');
5911
+	} else {
5912
+			ob_start();
5913
+	}
5590 5914
 
5591 5915
 	// Set the header.
5592 5916
 	header($type);
@@ -5618,8 +5942,9 @@  discard block
 block discarded – undo
5618 5942
 	static $done = false;
5619 5943
 
5620 5944
 	// If we don't need to do anything, don't
5621
-	if (!$update && $done)
5622
-		return;
5945
+	if (!$update && $done) {
5946
+			return;
5947
+	}
5623 5948
 
5624 5949
 	// Should we get a new copy of the official list of TLDs?
5625 5950
 	if ($update)
@@ -5640,10 +5965,11 @@  discard block
 block discarded – undo
5640 5965
 		// Clean $tlds and convert it to an array
5641 5966
 		$tlds = array_filter(explode("\n", strtolower($tlds)), function($line) {
5642 5967
 			$line = trim($line);
5643
-			if (empty($line) || strpos($line, '#') !== false || strpos($line, ' ') !== false)
5644
-				return false;
5645
-			else
5646
-				return true;
5968
+			if (empty($line) || strpos($line, '#') !== false || strpos($line, ' ') !== false) {
5969
+							return false;
5970
+			} else {
5971
+							return true;
5972
+			}
5647 5973
 		});
5648 5974
 
5649 5975
 		// Convert Punycode to Unicode
@@ -5697,8 +6023,9 @@  discard block
 block discarded – undo
5697 6023
 						$idx += $digit * $w;
5698 6024
 						$t = ($k <= $bias) ? $tmin : (($k >= $bias + $tmax) ? $tmax : ($k - $bias));
5699 6025
 
5700
-						if ($digit < $t)
5701
-							break;
6026
+						if ($digit < $t) {
6027
+													break;
6028
+						}
5702 6029
 
5703 6030
 						$w = (int) ($w * ($base - $t));
5704 6031
 					}
@@ -5707,8 +6034,9 @@  discard block
 block discarded – undo
5707 6034
 					$delta = intval($is_first ? ($delta / $damp) : ($delta / 2));
5708 6035
 					$delta += intval($delta / ($deco_len + 1));
5709 6036
 
5710
-					for ($k = 0; $delta > (($base - $tmin) * $tmax) / 2; $k += $base)
5711
-						$delta = intval($delta / ($base - $tmin));
6037
+					for ($k = 0; $delta > (($base - $tmin) * $tmax) / 2; $k += $base) {
6038
+											$delta = intval($delta / ($base - $tmin));
6039
+					}
5712 6040
 
5713 6041
 					$bias = intval($k + ($base - $tmin + 1) * $delta / ($delta + $skew));
5714 6042
 					$is_first = false;
@@ -5717,8 +6045,9 @@  discard block
 block discarded – undo
5717 6045
 
5718 6046
 					if ($deco_len > 0)
5719 6047
 					{
5720
-						for ($i = $deco_len; $i > $idx; $i--)
5721
-							$decoded[$i] = $decoded[($i - 1)];
6048
+						for ($i = $deco_len; $i > $idx; $i--) {
6049
+													$decoded[$i] = $decoded[($i - 1)];
6050
+						}
5722 6051
 					}
5723 6052
 					$decoded[$idx++] = $char;
5724 6053
 				}
@@ -5726,24 +6055,29 @@  discard block
 block discarded – undo
5726 6055
 				foreach ($decoded as $k => $v)
5727 6056
 				{
5728 6057
 					// 7bit are transferred literally
5729
-					if ($v < 128)
5730
-						$output .= chr($v);
6058
+					if ($v < 128) {
6059
+											$output .= chr($v);
6060
+					}
5731 6061
 
5732 6062
 					// 2 bytes
5733
-					elseif ($v < (1 << 11))
5734
-						$output .= chr(192+($v >> 6)) . chr(128+($v & 63));
6063
+					elseif ($v < (1 << 11)) {
6064
+											$output .= chr(192+($v >> 6)) . chr(128+($v & 63));
6065
+					}
5735 6066
 
5736 6067
 					// 3 bytes
5737
-					elseif ($v < (1 << 16))
5738
-						$output .= chr(224+($v >> 12)) . chr(128+(($v >> 6) & 63)) . chr(128+($v & 63));
6068
+					elseif ($v < (1 << 16)) {
6069
+											$output .= chr(224+($v >> 12)) . chr(128+(($v >> 6) & 63)) . chr(128+($v & 63));
6070
+					}
5739 6071
 
5740 6072
 					// 4 bytes
5741
-					elseif ($v < (1 << 21))
5742
-						$output .= chr(240+($v >> 18)) . chr(128+(($v >> 12) & 63)) . chr(128+(($v >> 6) & 63)) . chr(128+($v & 63));
6073
+					elseif ($v < (1 << 21)) {
6074
+											$output .= chr(240+($v >> 18)) . chr(128+(($v >> 12) & 63)) . chr(128+(($v >> 6) & 63)) . chr(128+($v & 63));
6075
+					}
5743 6076
 
5744 6077
 					//  'Conversion from UCS-4 to UTF-8 failed: malformed input at byte '.$k
5745
-					else
5746
-						$output .= $safe_char;
6078
+					else {
6079
+											$output .= $safe_char;
6080
+					}
5747 6081
 				}
5748 6082
 
5749 6083
 				$output_parts[] = $output;
@@ -5838,8 +6172,7 @@  discard block
 block discarded – undo
5838 6172
 
5839 6173
 		$strlen = 'mb_strlen';
5840 6174
 		$substr = 'mb_substr';
5841
-	}
5842
-	else
6175
+	} else
5843 6176
 	{
5844 6177
 		$strlen = $smcFunc['strlen'];
5845 6178
 		$substr = $smcFunc['substr'];
@@ -5853,20 +6186,21 @@  discard block
 block discarded – undo
5853 6186
 
5854 6187
 		$first = $substr($string, 0, 1);
5855 6188
 
5856
-		if (empty($index[$first]))
5857
-			$index[$first] = array();
6189
+		if (empty($index[$first])) {
6190
+					$index[$first] = array();
6191
+		}
5858 6192
 
5859 6193
 		if ($strlen($string) > 1)
5860 6194
 		{
5861 6195
 			// Sanity check on recursion
5862
-			if ($depth > 99)
5863
-				$index[$first][$substr($string, 1)] = '';
5864
-
5865
-			else
5866
-				$index[$first] = $add_string_to_index($substr($string, 1), $index[$first]);
6196
+			if ($depth > 99) {
6197
+							$index[$first][$substr($string, 1)] = '';
6198
+			} else {
6199
+							$index[$first] = $add_string_to_index($substr($string, 1), $index[$first]);
6200
+			}
6201
+		} else {
6202
+					$index[$first][''] = '';
5867 6203
 		}
5868
-		else
5869
-			$index[$first][''] = '';
5870 6204
 
5871 6205
 		$depth--;
5872 6206
 		return $index;
@@ -5889,9 +6223,9 @@  discard block
 block discarded – undo
5889 6223
 			$key_regex = preg_quote($key, $delim);
5890 6224
 			$new_key = $key;
5891 6225
 
5892
-			if (empty($value))
5893
-				$sub_regex = '';
5894
-			else
6226
+			if (empty($value)) {
6227
+							$sub_regex = '';
6228
+			} else
5895 6229
 			{
5896 6230
 				$sub_regex = $index_to_regex($value, $delim);
5897 6231
 
@@ -5899,22 +6233,22 @@  discard block
 block discarded – undo
5899 6233
 				{
5900 6234
 					$new_key_array = explode('(?'.'>', $sub_regex);
5901 6235
 					$new_key .= $new_key_array[0];
6236
+				} else {
6237
+									$sub_regex = '(?'.'>' . $sub_regex . ')';
5902 6238
 				}
5903
-				else
5904
-					$sub_regex = '(?'.'>' . $sub_regex . ')';
5905 6239
 			}
5906 6240
 
5907
-			if ($depth > 1)
5908
-				$regex[$new_key] = $key_regex . $sub_regex;
5909
-			else
6241
+			if ($depth > 1) {
6242
+							$regex[$new_key] = $key_regex . $sub_regex;
6243
+			} else
5910 6244
 			{
5911 6245
 				if (($length += strlen($key_regex) + 1) < $max_length || empty($regex))
5912 6246
 				{
5913 6247
 					$regex[$new_key] = $key_regex . $sub_regex;
5914 6248
 					unset($index[$key]);
6249
+				} else {
6250
+									break;
5915 6251
 				}
5916
-				else
5917
-					break;
5918 6252
 			}
5919 6253
 		}
5920 6254
 
@@ -5923,10 +6257,11 @@  discard block
 block discarded – undo
5923 6257
 			$l1 = $strlen($k1);
5924 6258
 			$l2 = $strlen($k2);
5925 6259
 
5926
-			if ($l1 == $l2)
5927
-				return strcmp($k1, $k2) > 0 ? 1 : -1;
5928
-			else
5929
-				return $l1 > $l2 ? -1 : 1;
6260
+			if ($l1 == $l2) {
6261
+							return strcmp($k1, $k2) > 0 ? 1 : -1;
6262
+			} else {
6263
+							return $l1 > $l2 ? -1 : 1;
6264
+			}
5930 6265
 		});
5931 6266
 
5932 6267
 		$depth--;
@@ -5937,15 +6272,18 @@  discard block
 block discarded – undo
5937 6272
 	$index = array();
5938 6273
 	$regexes = array();
5939 6274
 
5940
-	foreach ($strings as $string)
5941
-		$index = $add_string_to_index($string, $index);
6275
+	foreach ($strings as $string) {
6276
+			$index = $add_string_to_index($string, $index);
6277
+	}
5942 6278
 
5943
-	while (!empty($index))
5944
-		$regexes[] = '(?'.'>' . $index_to_regex($index, $delim) . ')';
6279
+	while (!empty($index)) {
6280
+			$regexes[] = '(?'.'>' . $index_to_regex($index, $delim) . ')';
6281
+	}
5945 6282
 
5946 6283
 	// Restore PHP's internal character encoding to whatever it was originally
5947
-	if (!empty($current_encoding))
5948
-		mb_internal_encoding($current_encoding);
6284
+	if (!empty($current_encoding)) {
6285
+			mb_internal_encoding($current_encoding);
6286
+	}
5949 6287
 
5950 6288
 	return $regexes;
5951 6289
 }
Please login to merge, or discard this patch.
Sources/CacheAPI-memcache.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
 			$server = trim($servers[array_rand($servers)]);
62 62
 
63 63
 			// Normal host names do not contain slashes, while e.g. unix sockets do. Assume alternative transport pipe with port 0.
64
-			if (strpos($server,'/') !== false)
64
+			if (strpos($server, '/') !== false)
65 65
 				$host = $server;
66 66
 			else
67 67
 			{
Please login to merge, or discard this patch.
Braces   +19 added lines, -14 removed lines patch added patch discarded remove patch
@@ -11,8 +11,9 @@  discard block
 block discarded – undo
11 11
  * @version 2.1 Beta 4
12 12
  */
13 13
 
14
-if (!defined('SMF'))
14
+if (!defined('SMF')) {
15 15
 	die('Hacking attempt...');
16
+}
16 17
 
17 18
 /**
18 19
  * Our Cache API class
@@ -34,8 +35,9 @@  discard block
 block discarded – undo
34 35
 
35 36
 		$supported = class_exists('memcache');
36 37
 
37
-		if ($test)
38
-			return $supported;
38
+		if ($test) {
39
+					return $supported;
40
+		}
39 41
 		return parent::isSupported() && $supported && !empty($cache_memcached);
40 42
 	}
41 43
 
@@ -61,9 +63,9 @@  discard block
 block discarded – undo
61 63
 			$server = trim($servers[array_rand($servers)]);
62 64
 
63 65
 			// Normal host names do not contain slashes, while e.g. unix sockets do. Assume alternative transport pipe with port 0.
64
-			if (strpos($server,'/') !== false)
65
-				$host = $server;
66
-			else
66
+			if (strpos($server,'/') !== false) {
67
+							$host = $server;
68
+			} else
67 69
 			{
68 70
 				$server = explode(':', $server);
69 71
 				$host = $server[0];
@@ -71,10 +73,11 @@  discard block
 block discarded – undo
71 73
 			}
72 74
 
73 75
 			// Don't wait too long: yes, we want the server, but we might be able to run the query faster!
74
-			if (empty($db_persist))
75
-				$connected = $this->memcache->connect($host, $port);
76
-			else
77
-				$connected = $this->memcache->pconnect($host, $port);
76
+			if (empty($db_persist)) {
77
+							$connected = $this->memcache->connect($host, $port);
78
+			} else {
79
+							$connected = $this->memcache->pconnect($host, $port);
80
+			}
78 81
 		}
79 82
 
80 83
 		return $connected;
@@ -90,8 +93,9 @@  discard block
 block discarded – undo
90 93
 		$value = $this->memcache->get($key);
91 94
 
92 95
 		// $value should return either data or false (from failure, key not found or empty array).
93
-		if ($value === false)
94
-			return null;
96
+		if ($value === false) {
97
+					return null;
98
+		}
95 99
 		return $value;
96 100
 	}
97 101
 
@@ -132,8 +136,9 @@  discard block
 block discarded – undo
132 136
 		$config_vars[] = $txt['cache_memcache_settings'];
133 137
 		$config_vars[] = array('cache_memcached', $txt['cache_memcache_servers'], 'file', 'text', 0, 'cache_memcached', 'postinput' => '<br /><div class="smalltext"><em>' . $txt['cache_memcache_servers_subtext'] . '</em></div>');
134 138
 
135
-		if (!isset($context['settings_post_javascript']))
136
-			$context['settings_post_javascript'] = '';
139
+		if (!isset($context['settings_post_javascript'])) {
140
+					$context['settings_post_javascript'] = '';
141
+		}
137 142
 
138 143
 		$context['settings_post_javascript'] .= '
139 144
 			$("#cache_accelerator").change(function (e) {
Please login to merge, or discard this patch.
Sources/tasks/GroupAct-Notify.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,10 +19,10 @@
 block discarded – undo
19 19
  */
20 20
 class GroupAct_Notify_Background extends SMF_BackgroundTask
21 21
 {
22
-    /**
23
-     * This executes the task - loads up the information, puts the email in the queue and inserts alerts as needed.
24
-     * @return bool Always returns true
25
-     */
22
+	/**
23
+	 * This executes the task - loads up the information, puts the email in the queue and inserts alerts as needed.
24
+	 * @return bool Always returns true
25
+	 */
26 26
 	public function execute()
27 27
 	{
28 28
 		global $sourcedir, $smcFunc, $language, $modSettings;
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -132,8 +132,9 @@  discard block
 block discarded – undo
132 132
 						'GROUPNAME' => $user['group_name'],
133 133
 					);
134 134
 
135
-					if (!empty($custom_reason))
136
-						$replacements['REASON'] = $custom_reason;
135
+					if (!empty($custom_reason)) {
136
+											$replacements['REASON'] = $custom_reason;
137
+					}
137 138
 
138 139
 					$emaildata = loadEmailTemplate($email_template_name, $replacements, $user['language']);
139 140
 
@@ -142,8 +143,8 @@  discard block
 block discarded – undo
142 143
 			}
143 144
 
144 145
 			// Insert the alerts if any
145
-			if (!empty($alert_rows))
146
-				$smcFunc['db_insert']('',
146
+			if (!empty($alert_rows)) {
147
+							$smcFunc['db_insert']('',
147 148
 					'{db_prefix}user_alerts',
148 149
 					array(
149 150
 						'alert_time' => 'int', 'id_member' => 'int', 'content_type' => 'string',
@@ -152,6 +153,7 @@  discard block
 block discarded – undo
152 153
 					$alert_rows,
153 154
 					array()
154 155
 				);
156
+			}
155 157
 		}
156 158
 
157 159
 		return true;
Please login to merge, or discard this patch.
Sources/tasks/MsgReportReply-Notify.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
 class MsgReportReply_Notify_Background extends SMF_BackgroundTask
21 21
 {
22 22
 	/**
23
-     * This executes the task - loads up the information, puts the email in the queue and inserts alerts as needed.
23
+	 * This executes the task - loads up the information, puts the email in the queue and inserts alerts as needed.
24 24
 	 * @return bool Always returns true.
25 25
 	 */
26 26
 	public function execute()
Please login to merge, or discard this patch.
Braces   +21 added lines, -14 removed lines patch added patch discarded remove patch
@@ -40,8 +40,9 @@  discard block
 block discarded – undo
40 40
 				'last_comment' => $this->_details['comment_id'],
41 41
 			)
42 42
 		);
43
-		while ($row = $smcFunc['db_fetch_row']($request))
44
-			$possible_members[] = $row[0];
43
+		while ($row = $smcFunc['db_fetch_row']($request)) {
44
+					$possible_members[] = $row[0];
45
+		}
45 46
 		$smcFunc['db_free_result']($request);
46 47
 
47 48
 		// Presumably, there are some people?
@@ -50,8 +51,9 @@  discard block
 block discarded – undo
50 51
 			$possible_members = array_flip(array_flip($possible_members));
51 52
 			$possible_members = array_diff($possible_members, array($this->_details['sender_id']));
52 53
 		}
53
-		if (empty($possible_members))
54
-			return true;
54
+		if (empty($possible_members)) {
55
+					return true;
56
+		}
55 57
 
56 58
 		// We need to know who can moderate this board - and therefore who can see this report.
57 59
 		// First up, people who have moderate_board in the board this topic was in.
@@ -67,8 +69,9 @@  discard block
 block discarded – undo
67 69
 				'current_board' => $this->_details['board_id'],
68 70
 			)
69 71
 		);
70
-		while ($row = $smcFunc['db_fetch_assoc']($request))
71
-			$members[] = $row['id_member'];
72
+		while ($row = $smcFunc['db_fetch_assoc']($request)) {
73
+					$members[] = $row['id_member'];
74
+		}
72 75
 		$smcFunc['db_free_result']($request);
73 76
 
74 77
 		// Thirdly, anyone assigned to be a moderator of this group as a group->board moderator.
@@ -85,8 +88,9 @@  discard block
 block discarded – undo
85 88
 			)
86 89
 		);
87 90
 
88
-		while ($row = $smcFunc['db_fetch_assoc']($request))
89
-			$members[] = $row['id_member'];
91
+		while ($row = $smcFunc['db_fetch_assoc']($request)) {
92
+					$members[] = $row['id_member'];
93
+		}
90 94
 		$smcFunc['db_free_result']($request);
91 95
 
92 96
 		// So now we have two lists: the people who replied to a report in the past,
@@ -108,8 +112,9 @@  discard block
 block discarded – undo
108 112
 		{
109 113
 			foreach ($alert_bits as $type => $bitvalue)
110 114
 			{
111
-				if ($pref_option['msg_report_reply'] & $bitvalue)
112
-					$notifies[$type][] = $member;
115
+				if ($pref_option['msg_report_reply'] & $bitvalue) {
116
+									$notifies[$type][] = $member;
117
+				}
113 118
 			}
114 119
 		}
115 120
 
@@ -170,8 +175,9 @@  discard block
 block discarded – undo
170 175
 			);
171 176
 			while ($row = $smcFunc['db_fetch_assoc']($request))
172 177
 			{
173
-				if (empty($row['lngfile']))
174
-					$row['lngfile'] = $language;
178
+				if (empty($row['lngfile'])) {
179
+									$row['lngfile'] = $language;
180
+				}
175 181
 				$emails[$row['lngfile']][$row['id_member']] = $row['email_address'];
176 182
 			}
177 183
 			$smcFunc['db_free_result']($request);
@@ -203,8 +209,9 @@  discard block
 block discarded – undo
203 209
 				$emaildata = loadEmailTemplate('reply_to_moderator', $replacements, empty($modSettings['userLanguage']) ? $language : $this_lang);
204 210
 
205 211
 				// And do the actual sending...
206
-				foreach ($recipients as $id_member => $email_address)
207
-					sendmail($email_address, $emaildata['subject'], $emaildata['body'], null, 'rptrpy' . $this->_details['comment_id'], $emaildata['is_html'], 3);
212
+				foreach ($recipients as $id_member => $email_address) {
213
+									sendmail($email_address, $emaildata['subject'], $emaildata['body'], null, 'rptrpy' . $this->_details['comment_id'], $emaildata['is_html'], 3);
214
+				}
208 215
 			}
209 216
 		}
210 217
 
Please login to merge, or discard this patch.