mirror of
https://github.com/phpbb/phpbb.git
synced 2025-09-11 08:40:44 +02:00
Compare commits
840 Commits
release-3.
...
release-3.
Author | SHA1 | Date | |
---|---|---|---|
|
ece4a2edb7 | ||
|
9f073e4c75 | ||
|
9279c8f5ee | ||
|
296fadfca4 | ||
|
3c64cccecc | ||
|
2f5692d4bb | ||
|
3da72e9864 | ||
|
19237f5613 | ||
|
10172887fd | ||
|
55aaa596d7 | ||
|
6ed63088fe | ||
|
3dfcb212dc | ||
|
3036db481a | ||
|
a3517232f9 | ||
|
a9c091fad4 | ||
|
a65b432165 | ||
|
d9a32ce614 | ||
|
35e18a49a9 | ||
|
d883535b10 | ||
|
e68c1fb9e4 | ||
|
dd6955f833 | ||
|
36a568fd56 | ||
|
338d29072f | ||
|
5c8c7b1352 | ||
|
7988045bda | ||
|
5d0aa8e516 | ||
|
2c12f31cdf | ||
|
81d5327e44 | ||
|
e5364088c3 | ||
|
625333ea2e | ||
|
6203ef0c61 | ||
|
c9f9e66328 | ||
|
d30dc11f3e | ||
|
49afc1f2dc | ||
|
30475856c4 | ||
|
fce385e5bc | ||
|
9c2930178f | ||
|
a50d1a3576 | ||
|
2a76b7e869 | ||
|
35b18676cd | ||
|
ac8ebfabc7 | ||
|
f1414386d7 | ||
|
80fafdeb1a | ||
|
155c93d71a | ||
|
d26606f986 | ||
|
19a47dfbbc | ||
|
2011085c29 | ||
|
d8ddda5121 | ||
|
791c4136f7 | ||
|
d22e7ce9df | ||
|
f616c4e7a0 | ||
|
7eaedcc8de | ||
|
b10757ef14 | ||
|
f6f300d3f9 | ||
|
b789758f1b | ||
|
9ab5ad2986 | ||
|
643a86504a | ||
|
0261a9acff | ||
|
037b95eccc | ||
|
de4dff8bb0 | ||
|
9240ddbfa7 | ||
|
515c27270f | ||
|
6036b948ff | ||
|
275dabbc4f | ||
|
9ead56acb3 | ||
|
c494abc8c7 | ||
|
701bf571df | ||
|
42dd60edad | ||
|
13f30e8d9d | ||
|
efa96e1817 | ||
|
8cb9004ab3 | ||
|
440e699bc5 | ||
|
bad91d8e74 | ||
|
5d5049710c | ||
|
09d15db1fa | ||
|
819accedc8 | ||
|
b96c050695 | ||
|
8bfe1b2f54 | ||
|
a97ebe78bf | ||
|
3503d7f47b | ||
|
d0b9864563 | ||
|
1c7b568771 | ||
|
ea1e2ed362 | ||
|
896b43aa5b | ||
|
efbf14f029 | ||
|
ee875c0a43 | ||
|
7ec6254078 | ||
|
70be7e109f | ||
|
86fa185a1b | ||
|
95e1d4e9db | ||
|
f71a9d369c | ||
|
92d17cbff3 | ||
|
f81e8e9901 | ||
|
725db1ba29 | ||
|
2592fbf8e9 | ||
|
44b509b2b2 | ||
|
07fb16edb5 | ||
|
3a60414592 | ||
|
8861e26034 | ||
|
1960629240 | ||
|
b0e273b95f | ||
|
e5afe39987 | ||
|
e6791e376d | ||
|
b5b65c214d | ||
|
1fcb269616 | ||
|
74e9245df3 | ||
|
1019226dfa | ||
|
041b7be77e | ||
|
4b3d807293 | ||
|
8393b8e755 | ||
|
12bf9b42fa | ||
|
cf556f92c9 | ||
|
23ea588880 | ||
|
164054f067 | ||
|
cf303c3478 | ||
|
faf232219e | ||
|
59177a86c4 | ||
|
8f7e85604b | ||
|
239e6016a3 | ||
|
643970dce4 | ||
|
226743d10b | ||
|
0488d70062 | ||
|
12dbcc7f1e | ||
|
09d49fb7b2 | ||
|
afbaa6979b | ||
|
e52d23848a | ||
|
8d15f1b02e | ||
|
c0718fae96 | ||
|
a960bd6790 | ||
|
9d542aec1e | ||
|
5ccbe06911 | ||
|
c34ee343ba | ||
|
58842b5ca8 | ||
|
8cb0e30afc | ||
|
2dd71f6520 | ||
|
665f38d42f | ||
|
8d45901657 | ||
|
3a67604900 | ||
|
1a8db76a20 | ||
|
b82c77b38f | ||
|
8cf0b79a47 | ||
|
a21b367b21 | ||
|
cdf7ff1797 | ||
|
6293bbf099 | ||
|
2aa994b5ad | ||
|
de70b17b1d | ||
|
29a6aec9ad | ||
|
4788705a9a | ||
|
31fbc40a09 | ||
|
bc0453c93a | ||
|
edf60bcd55 | ||
|
6e77ca7c99 | ||
|
57547c7e20 | ||
|
90fc8fe59f | ||
|
00c54f8a7c | ||
|
aceca2566b | ||
|
45b910f9b4 | ||
|
1ce8a1d7ee | ||
|
bdf21e45ca | ||
|
09621342a5 | ||
|
7a6d3ec61b | ||
|
249d8ede12 | ||
|
7a4b4c7599 | ||
|
4b6b41a1e5 | ||
|
f1f2ab92b1 | ||
|
f394fd250e | ||
|
534d966957 | ||
|
ef297ec63e | ||
|
ef8160e8a2 | ||
|
41ef41ac63 | ||
|
156ae40d6f | ||
|
2a48284fc9 | ||
|
8442b19e59 | ||
|
9bce716081 | ||
|
4e630ef160 | ||
|
3ec941937a | ||
|
a14d00b8e9 | ||
|
03a35581c4 | ||
|
1808a61fe3 | ||
|
ea5ae09c7d | ||
|
04bb44ce33 | ||
|
293f66d4ed | ||
|
2b2286a46c | ||
|
de1e343c5b | ||
|
03e382f99c | ||
|
be9eb57785 | ||
|
30093d6e86 | ||
|
018419b36c | ||
|
444fa29beb | ||
|
21639d5d54 | ||
|
dc63db1860 | ||
|
efdd1e623e | ||
|
6536a36208 | ||
|
f2967b6669 | ||
|
0ceb77fb99 | ||
|
a0da2408e7 | ||
|
b803fc4351 | ||
|
786fcbf212 | ||
|
57209a1e68 | ||
|
14e727b834 | ||
|
0df3f1c5d0 | ||
|
a84b97f58e | ||
|
c5481371b9 | ||
|
b81a5afc25 | ||
|
084e1ae560 | ||
|
51bc9540cf | ||
|
17e050e109 | ||
|
42101fe8d4 | ||
|
b1b530f92c | ||
|
3477b5e5a8 | ||
|
b8b342be2d | ||
|
313cf7297c | ||
|
9391d423c0 | ||
|
dc4d0677b9 | ||
|
10d4f8c35e | ||
|
ccf83dd69b | ||
|
fff9f6611e | ||
|
2516b1e8f1 | ||
|
a820ff1ebc | ||
|
1789e0948b | ||
|
b9324577ac | ||
|
0397b46217 | ||
|
9c8aab4d32 | ||
|
ad073d22b9 | ||
|
dd53d0576d | ||
|
9040f18d7c | ||
|
dbc7a69ad2 | ||
|
2203bc204e | ||
|
e8830f605f | ||
|
a618e22fca | ||
|
2768db44f5 | ||
|
9c85c6c318 | ||
|
5bcdfe94dd | ||
|
57eb50812f | ||
|
1337f86123 | ||
|
841d11c6cd | ||
|
992b58d468 | ||
|
0ed66ad0e8 | ||
|
6f809416ba | ||
|
115ee7f3b8 | ||
|
c7f65fba62 | ||
|
d1980f6ad6 | ||
|
5a9dd1994f | ||
|
99a271f34b | ||
|
e5205ba2f8 | ||
|
4325bbf4c6 | ||
|
9120c7691e | ||
|
4dafcc2525 | ||
|
c2169f6899 | ||
|
2005c339ff | ||
|
70d88965c7 | ||
|
97d4f168f5 | ||
|
dad37a4329 | ||
|
c551b46115 | ||
|
81eeafbb8d | ||
|
95e011ccbe | ||
|
5efdbfa5e4 | ||
|
71afba0ded | ||
|
ba6943a6a0 | ||
|
3b7a6a3efa | ||
|
ff8d523768 | ||
|
da395edbca | ||
|
321d0d9b56 | ||
|
b652e1a1bb | ||
|
24f1896b3c | ||
|
a79b3490c2 | ||
|
668c61686b | ||
|
aee79c6cdb | ||
|
89a6cb2886 | ||
|
fbe8086697 | ||
|
f563647e4b | ||
|
bd1fb91dd2 | ||
|
0ec8e9dbff | ||
|
cd61de4bfd | ||
|
ee6783109a | ||
|
025de9ee19 | ||
|
bb7e86c2b1 | ||
|
d380a1a36f | ||
|
c11607bdd1 | ||
|
01d90e59a8 | ||
|
89a0cbc57e | ||
|
785c75254e | ||
|
f3af5945e3 | ||
|
6df721b215 | ||
|
f9953fc339 | ||
|
97cf433dea | ||
|
efe25a0b49 | ||
|
d67fae0f09 | ||
|
b74530259f | ||
|
470b79c9e3 | ||
|
2f95a67765 | ||
|
f6cf8782c8 | ||
|
17dc8c6c5c | ||
|
d3091da5ea | ||
|
45f39c6d1f | ||
|
b2d589634a | ||
|
d3d8793c1f | ||
|
8910ec98d7 | ||
|
7a061cfc6e | ||
|
6548a3094f | ||
|
459e8dc095 | ||
|
8f3fba8858 | ||
|
20d3d279ce | ||
|
825aef72e8 | ||
|
8cb95b3b84 | ||
|
8e1e48a7b6 | ||
|
340a8f19d6 | ||
|
cd5c01ac2d | ||
|
ef154b78a1 | ||
|
afcf9cbc86 | ||
|
c3265c9138 | ||
|
11c5a66213 | ||
|
17f5c6bf71 | ||
|
4b2690f792 | ||
|
e047b286d8 | ||
|
ed6bd50ab8 | ||
|
9c2d73c3f9 | ||
|
345e8e084f | ||
|
a962e78854 | ||
|
35d5d527db | ||
|
f894da0d25 | ||
|
62288b3c05 | ||
|
3feeb382c5 | ||
|
f832f5a4ee | ||
|
c0b3239bf3 | ||
|
508b06063f | ||
|
225892f506 | ||
|
326ff46ef7 | ||
|
4aef6ea979 | ||
|
d2a3496149 | ||
|
879c92e8a2 | ||
|
2ae6b8a5ed | ||
|
2cf586a372 | ||
|
99164cd20b | ||
|
1628a28e0c | ||
|
aa21bc2a73 | ||
|
cb7bb31129 | ||
|
c9733ad719 | ||
|
d7aa3aab5e | ||
|
95a74c7472 | ||
|
23363efaaa | ||
|
3e7a0a3746 | ||
|
24cf7f1d29 | ||
|
fd55d64996 | ||
|
5e52734c24 | ||
|
0fc37fb397 | ||
|
17991823ea | ||
|
3f91405acb | ||
|
e14c3f3b77 | ||
|
d5dc70cbe3 | ||
|
5cc1eb27c7 | ||
|
a45f03a5af | ||
|
b0fd3b2bf0 | ||
|
10453b6752 | ||
|
99c102344e | ||
|
16ae99eec8 | ||
|
38c2d4da35 | ||
|
ccd2ca55d4 | ||
|
fa003bb5fd | ||
|
b6999237f4 | ||
|
d9fef488af | ||
|
519db8e3b2 | ||
|
02f7baa0a5 | ||
|
b8ddd32922 | ||
|
7779dae2cc | ||
|
fa2edf5187 | ||
|
37fa5e56f3 | ||
|
82fff947c6 | ||
|
51f8f642de | ||
|
ba576f823b | ||
|
74c4b92760 | ||
|
6bfca76f1c | ||
|
8f690d3475 | ||
|
56c3a66c28 | ||
|
f4bdfda69d | ||
|
1d9fb6b4ec | ||
|
0cfa843677 | ||
|
2bf4e8d3d0 | ||
|
730d2d5d19 | ||
|
80149d0c87 | ||
|
cd4958f72c | ||
|
2c7495e1c7 | ||
|
57ba746f51 | ||
|
dfb7cc625a | ||
|
8af9a0054c | ||
|
e3d81812fa | ||
|
1a09f9005c | ||
|
7ae12df3d2 | ||
|
48d767a36e | ||
|
1842323ca9 | ||
|
1ce0c76e14 | ||
|
bf6d501ab1 | ||
|
138f123bd8 | ||
|
69cbb4ac1d | ||
|
9b9f30bbb9 | ||
|
6f81a2f5b8 | ||
|
74bc2d130d | ||
|
5b9c835127 | ||
|
0ad81a4cdc | ||
|
8e59699424 | ||
|
88cad5523e | ||
|
cafe74a88d | ||
|
7f8968595b | ||
|
29723c97c6 | ||
|
74ae7d0339 | ||
|
050fb83dfe | ||
|
e596d2ca7e | ||
|
f351914137 | ||
|
4cf059e38f | ||
|
8f1f42cc6c | ||
|
895501743d | ||
|
593ac9ed43 | ||
|
cb4e72298b | ||
|
f88e89900f | ||
|
fc47fa06a3 | ||
|
799be4469a | ||
|
ede3963951 | ||
|
b89320ad39 | ||
|
77e00d14a1 | ||
|
92cdf08d48 | ||
|
6a3ee0996e | ||
|
26d01d4408 | ||
|
0cb83f99ab | ||
|
7520b27639 | ||
|
007457f182 | ||
|
f856cc2ef6 | ||
|
3ce5b1d386 | ||
|
372698218a | ||
|
e08e22ca12 | ||
|
58e35759d9 | ||
|
b531e02871 | ||
|
a29a9266e3 | ||
|
39c62cd175 | ||
|
6f41f96444 | ||
|
3eda9cfc07 | ||
|
d13ce7f560 | ||
|
74bca1d97b | ||
|
cd60073a52 | ||
|
4cd88199c9 | ||
|
a72ea2bc98 | ||
|
6f40960071 | ||
|
43818289fe | ||
|
0d3697e40c | ||
|
c67633577f | ||
|
aef3652d7a | ||
|
a9d7b1f9a1 | ||
|
c4d3c5320e | ||
|
f5633d281e | ||
|
3e43b53a63 | ||
|
06ae98b1e5 | ||
|
92e1681761 | ||
|
37c7668193 | ||
|
a7077c9149 | ||
|
c68973a9e0 | ||
|
64d62038cd | ||
|
6155707071 | ||
|
2359d1e268 | ||
|
fb43029935 | ||
|
d03366fba2 | ||
|
eb1f15bc8b | ||
|
810016ce94 | ||
|
4be9c70827 | ||
|
4fae5eef68 | ||
|
6894477b60 | ||
|
665982bb32 | ||
|
cfaf0e1e96 | ||
|
93c4cdd1de | ||
|
a7d7083d75 | ||
|
aeb896399c | ||
|
3091efc501 | ||
|
b2b057910e | ||
|
3d893c8222 | ||
|
e8686d9dad | ||
|
815dd3591b | ||
|
39f8592312 | ||
|
f1a53659bd | ||
|
f7286e1abe | ||
|
c0ffc8386c | ||
|
69f943c8d6 | ||
|
14af18cb1b | ||
|
9830453487 | ||
|
f31da015fc | ||
|
3302305cd4 | ||
|
9d7b144c54 | ||
|
e543effc64 | ||
|
cf044c363b | ||
|
4d760630c3 | ||
|
c79992d1cc | ||
|
dee836315c | ||
|
9553b2239c | ||
|
0a5d2a84d1 | ||
|
0579795a17 | ||
|
65921ae67a | ||
|
b371d62dd3 | ||
|
00f792f16f | ||
|
4c765bb206 | ||
|
6370ef2705 | ||
|
52bd8c307f | ||
|
f00f3ad8ea | ||
|
91155d1330 | ||
|
2d989d4322 | ||
|
edd5866a6e | ||
|
2b3effb13c | ||
|
f3c9133a6c | ||
|
0d3e9bf446 | ||
|
1a19388aa3 | ||
|
2918fbc970 | ||
|
945a63d204 | ||
|
0b1199f7b2 | ||
|
18ca3a32bc | ||
|
d6c3e7785d | ||
|
a63490f744 | ||
|
75a44a6970 | ||
|
bb40789552 | ||
|
baac9e5d15 | ||
|
cf49b5f46f | ||
|
da8cac280c | ||
|
6d913d3646 | ||
|
319d12bedf | ||
|
d0bbb3f7f0 | ||
|
020106eeb9 | ||
|
17451e0842 | ||
|
5e3f73c498 | ||
|
983b3d7f64 | ||
|
219bdbaf70 | ||
|
2e9e0a7d78 | ||
|
fa23def774 | ||
|
8b99f04943 | ||
|
8795362879 | ||
|
ba1464b6e0 | ||
|
cd184e4912 | ||
|
c8399b8e30 | ||
|
88b31c2ab3 | ||
|
8f6cfc77d2 | ||
|
cfb5135805 | ||
|
ff0839e76b | ||
|
cc227cc6f6 | ||
|
fa1d9a4571 | ||
|
8d33dea2cd | ||
|
7813135365 | ||
|
cafefe9379 | ||
|
27279afa1e | ||
|
607761e830 | ||
|
7e18d2b861 | ||
|
4effe8fb8b | ||
|
234edf674c | ||
|
e40abfbde9 | ||
|
1657339e6d | ||
|
d86fccf9c9 | ||
|
893469c652 | ||
|
c3f3435228 | ||
|
ab8ecf5b92 | ||
|
3100b9bb7c | ||
|
768932a3f2 | ||
|
8cf22f5529 | ||
|
7fa14e654a | ||
|
d16b160d5c | ||
|
cdacbd07f8 | ||
|
dda1e13126 | ||
|
1f677d5de3 | ||
|
4e69fe6859 | ||
|
3ad5c45097 | ||
|
39f6d58315 | ||
|
f7c1341402 | ||
|
e43b7813a5 | ||
|
1dc1583b92 | ||
|
091119605a | ||
|
75ef0fde82 | ||
|
b957639abb | ||
|
8017469e59 | ||
|
57d157a723 | ||
|
3a92623dfa | ||
|
ee91656968 | ||
|
4c1bde350a | ||
|
4b42646f36 | ||
|
6d9e9d1901 | ||
|
3cd8c2507d | ||
|
6698a9cbd6 | ||
|
88aacd0f2c | ||
|
b515f5462e | ||
|
f94f872624 | ||
|
d4bbfae0d5 | ||
|
cacb9f2ec5 | ||
|
b38fbc6d25 | ||
|
12882084d4 | ||
|
b4dcd4193e | ||
|
26e84b12e8 | ||
|
86f8851c40 | ||
|
b197ea56c2 | ||
|
dad7aa9593 | ||
|
13b718e720 | ||
|
b571b3e032 | ||
|
81f9385477 | ||
|
e0869b39a3 | ||
|
138d1050fc | ||
|
a1febdd429 | ||
|
4bc11db0ff | ||
|
5b66413f69 | ||
|
cc2ecc9171 | ||
|
79ad3a3f32 | ||
|
fc2af460ee | ||
|
19ce73c884 | ||
|
8a84f42f7d | ||
|
7965387201 | ||
|
0df7e5eefa | ||
|
12530a763b | ||
|
9c0f75fd65 | ||
|
410028eecf | ||
|
94fead702a | ||
|
1b390f0b49 | ||
|
c8564e6ce9 | ||
|
1ad97424a4 | ||
|
9006984d5a | ||
|
7b3f6cb219 | ||
|
05515e0510 | ||
|
eb8b1c333f | ||
|
94a0b7ef2e | ||
|
92373e6d46 | ||
|
d28ec48675 | ||
|
3801101f3b | ||
|
4e2437a6c1 | ||
|
85bdc65df1 | ||
|
cf5f0cce83 | ||
|
1061e881bd | ||
|
5c7f5f0516 | ||
|
d938d5d399 | ||
|
bcaf65d7cd | ||
|
8e5eacf692 | ||
|
1daefc6177 | ||
|
a73bc353d6 | ||
|
6cde745e28 | ||
|
0f2e45800e | ||
|
0d41385344 | ||
|
dc9a771473 | ||
|
0d4089da7f | ||
|
d602f74866 | ||
|
34491f5569 | ||
|
7ae871dfae | ||
|
afc35f610d | ||
|
e4e854863f | ||
|
c0507c6a9e | ||
|
29a23ae217 | ||
|
2ffdf56bfe | ||
|
d221d2f7e8 | ||
|
4499be5795 | ||
|
4f8bb02a57 | ||
|
4491746c73 | ||
|
7a36c3b34b | ||
|
81f682a812 | ||
|
53e0e3240c | ||
|
efc443aac9 | ||
|
03da3c7c4c | ||
|
d4f1b92479 | ||
|
0d104b00c8 | ||
|
e7ab7f5f7a | ||
|
fa5c7f6440 | ||
|
5d66faafc1 | ||
|
540ca1a8d8 | ||
|
91b415dd01 | ||
|
4592076366 | ||
|
9f9e4ad3d8 | ||
|
15d0fe7d9f | ||
|
dc149a43e4 | ||
|
3c7dfc7e19 | ||
|
57accade85 | ||
|
1680b3a2a7 | ||
|
b18b3363e9 | ||
|
6330153937 | ||
|
106cec9a92 | ||
|
a91131c55e | ||
|
a6dd3d0c65 | ||
|
02a8cebd65 | ||
|
702985c927 | ||
|
a7e709d920 | ||
|
2a0c9e4026 | ||
|
c211492092 | ||
|
2973ccbd48 | ||
|
386883cda1 | ||
|
7a40ab8f7a | ||
|
83fa6cffc3 | ||
|
18f19b03ab | ||
|
66553fb857 | ||
|
cad3e4cb45 | ||
|
3df8b214cc | ||
|
f9dbe33fa7 | ||
|
b85cd7a431 | ||
|
32e15315a8 | ||
|
abc0c336af | ||
|
43fc8142f5 | ||
|
04e8468d28 | ||
|
eb4660f4ef | ||
|
f997199679 | ||
|
ec3f4db425 | ||
|
66867b5ac0 | ||
|
cc87d553d0 | ||
|
08ca84a3e7 | ||
|
bb7e8bb424 | ||
|
edb745e951 | ||
|
5653be8e16 | ||
|
7ebec68616 | ||
|
e0bb46c852 | ||
|
d59a894cd3 | ||
|
25902c3bfc | ||
|
bd2fd4ec1d | ||
|
9c6339fb57 | ||
|
b960dd4e0d | ||
|
381ebcf195 | ||
|
c38b083057 | ||
|
65ec47abfa | ||
|
7e01850a42 | ||
|
efc7aa00cd | ||
|
f51b2f8fec | ||
|
0648923b19 | ||
|
49c89023fc | ||
|
106cf14d27 | ||
|
b4949675bf | ||
|
627e2644a2 | ||
|
13ca659f1f | ||
|
afa377d028 | ||
|
7c84cb5f5f | ||
|
d80be455b9 | ||
|
e9ae88338b | ||
|
82fa4eff7e | ||
|
825d44fcc2 | ||
|
03b1f500e7 | ||
|
0f86034f03 | ||
|
b3cdd1d169 | ||
|
dcceeb8012 | ||
|
83f955a2c5 | ||
|
e327baaa89 | ||
|
2bba22e9d3 | ||
|
2231488543 | ||
|
0690e9f103 | ||
|
7f56c05f24 | ||
|
b0940f52e5 | ||
|
91b20ddba5 | ||
|
16c5352a12 | ||
|
1ace10ab92 | ||
|
7f7a0d8b9f | ||
|
e9319ee2aa | ||
|
bb733b0204 | ||
|
8ebc8ec182 | ||
|
4b2ff05a3b | ||
|
1ff0f221fa | ||
|
b7459cc5f7 | ||
|
b1608ae860 | ||
|
fdfd4ce5fd | ||
|
f926acf1b8 | ||
|
e11f9afdce | ||
|
271c277ecc | ||
|
ae8eee16cc | ||
|
99db533524 | ||
|
0e85704d75 | ||
|
91fd6df430 | ||
|
db352c17f8 | ||
|
d60ffdd55c | ||
|
773561f862 | ||
|
e4707a8be7 | ||
|
e6572b766f | ||
|
9efb080875 | ||
|
00f7db66f2 | ||
|
fd728c2815 | ||
|
5b5c227423 | ||
|
919ba8eb3f | ||
|
f2110183e0 | ||
|
1fa77c2fd5 | ||
|
787245a113 | ||
|
71df03960c | ||
|
5fefdecc50 | ||
|
b2a65ac76d | ||
|
cf4e6d8a3e | ||
|
02bba23844 | ||
|
a275d17625 | ||
|
f22081d21e | ||
|
b261a1a31a | ||
|
5eeb870442 | ||
|
ca2d6a01f1 | ||
|
8ec737e9c4 | ||
|
f610f44a4e | ||
|
0c93e92eef | ||
|
77c9422630 | ||
|
7e4460dbc9 | ||
|
c916d49ddd | ||
|
0d602e1722 | ||
|
fa253b8b58 | ||
|
7ca9c33157 | ||
|
d8ac2cc5f0 | ||
|
f5d86d0604 | ||
|
cb7604dcd8 | ||
|
96eab49a7a | ||
|
984fd07319 | ||
|
cf4b639be5 | ||
|
b9b1e13e70 | ||
|
ffa6f3448f | ||
|
44c8126323 | ||
|
172e3c07d6 | ||
|
fe0932fdf0 | ||
|
84ff04056a | ||
|
1ae42ae6ba | ||
|
cdc23a9877 | ||
|
f249287dc9 | ||
|
a5ef6c3b20 | ||
|
d59482366a | ||
|
0e067ec3c2 | ||
|
fc5a68c2cf | ||
|
9f3b159998 | ||
|
29df4b5c60 | ||
|
1ffa586583 | ||
|
237af043d6 | ||
|
18fb3d86cd | ||
|
578f9dffa6 | ||
|
fd7e29131e | ||
|
b7069f395b | ||
|
e0ecd3e118 | ||
|
d5c2bbf620 | ||
|
8c01ed578d | ||
|
ad5ed9d0ee | ||
|
1320bb7bf8 | ||
|
6a4ca8cad9 | ||
|
67fde80fbb | ||
|
ee2d4f627a | ||
|
b43907d69e | ||
|
e2fe25fbdc | ||
|
4e85731a5f | ||
|
c4c22d4421 | ||
|
7de078b26e | ||
|
d37e8dd6d3 | ||
|
d3f1b60292 | ||
|
6458a1a16a | ||
|
4ac9bde2d1 | ||
|
882cb084d7 | ||
|
dd0606a317 | ||
|
1b0821a11b | ||
|
bb1b52947e | ||
|
bd6e27d9c5 | ||
|
aa0c70058b | ||
|
79f757d4b7 | ||
|
1e8c257bd4 | ||
|
bf3bac8772 | ||
|
bf61602a28 |
28
.gitignore
vendored
28
.gitignore
vendored
@@ -1,12 +1,18 @@
|
||||
*~
|
||||
phpunit.xml
|
||||
phpBB/cache/*.php
|
||||
phpBB/cache/queue.php.lock
|
||||
phpBB/config.php
|
||||
phpBB/files/*
|
||||
phpBB/images/avatars/gallery/*
|
||||
phpBB/images/avatars/upload/*
|
||||
phpBB/store/*
|
||||
tests/phpbb_unit_tests.sqlite2
|
||||
tests/test_config.php
|
||||
tests/utf/data/*.txt
|
||||
/phpunit.xml
|
||||
/phpBB/cache/*.html
|
||||
/phpBB/cache/*.php
|
||||
/phpBB/cache/queue.php.lock
|
||||
/phpBB/composer.phar
|
||||
/phpBB/config.php
|
||||
/phpBB/config_dev.php
|
||||
/phpBB/config_test.php
|
||||
/phpBB/ext/*
|
||||
/phpBB/files/*
|
||||
/phpBB/images/avatars/gallery/*
|
||||
/phpBB/images/avatars/upload/*
|
||||
/phpBB/store/*
|
||||
/phpBB/vendor
|
||||
/tests/phpbb_unit_tests.sqlite2
|
||||
/tests/test_config.php
|
||||
/tests/tmp/*
|
||||
|
27
.travis.yml
Normal file
27
.travis.yml
Normal file
@@ -0,0 +1,27 @@
|
||||
language: php
|
||||
php:
|
||||
- 5.2
|
||||
- 5.3.3
|
||||
- 5.3
|
||||
- 5.4
|
||||
|
||||
env:
|
||||
- DB=mysql
|
||||
- DB=postgres
|
||||
|
||||
before_script:
|
||||
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS phpbb_tests;' -U postgres; fi"
|
||||
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'create database phpbb_tests;' -U postgres; fi"
|
||||
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'create database IF NOT EXISTS phpbb_tests;'; fi"
|
||||
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.2' ]; then pear install --force phpunit/DbUnit; else pyrus install --force phpunit/DbUnit; fi"
|
||||
- phpenv rehash
|
||||
|
||||
script:
|
||||
- phpunit --configuration travis/phpunit-$DB-travis.xml
|
||||
|
||||
notifications:
|
||||
email:
|
||||
recipients:
|
||||
- dev-team@phpbb.com
|
||||
on_success: change
|
||||
on_failure: change
|
@@ -15,6 +15,12 @@ Find support and lots more on [phpBB.com](http://www.phpbb.com)! Discuss the dev
|
||||
3. [Read our Git Contribution Guidelines](http://wiki.phpbb.com/Git); if you're new to git, also read [the introduction guide](http://wiki.phpbb.com/display/DEV/Working+with+Git)
|
||||
4. Send us a pull request
|
||||
|
||||
## AUTOMATED TESTING
|
||||
|
||||
We have unit and functional tests in order to prevent regressions. You can view the bamboo continuous integration [here](http://bamboo.phpbb.com) or check our travis build below.
|
||||
develop - [](http://travis-ci.org/phpbb/phpbb3)
|
||||
develop-olympus - [](http://travis-ci.org/phpbb/phpbb3)
|
||||
|
||||
## LICENSE
|
||||
|
||||
[GNU General Public License v2](http://opensource.org/licenses/gpl-2.0.php)
|
||||
|
@@ -2,9 +2,9 @@
|
||||
|
||||
<project name="phpBB" description="The phpBB forum software" default="all" basedir="../">
|
||||
<!-- a few settings for the build -->
|
||||
<property name="newversion" value="3.0.9-RC2" />
|
||||
<property name="prevversion" value="3.0.9-RC1" />
|
||||
<property name="olderversions" value="3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.0.6, 3.0.7, 3.0.7-PL1, 3.0.8" />
|
||||
<property name="newversion" value="3.0.11-RC2" />
|
||||
<property name="prevversion" value="3.0.10" />
|
||||
<property name="olderversions" value="3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.0.6, 3.0.7, 3.0.7-PL1, 3.0.8, 3.0.9, 3.0.11-RC1" />
|
||||
<!-- no configuration should be needed beyond this point -->
|
||||
|
||||
<property name="oldversions" value="${olderversions}, ${prevversion}" />
|
||||
@@ -49,19 +49,16 @@
|
||||
--coverage-clover build/logs/clover.xml
|
||||
--coverage-html build/coverage"
|
||||
passthru="true" />
|
||||
</target>
|
||||
|
||||
|
||||
<!-- Does not allow changing the working directory to tests/
|
||||
so this approach does not work for us unfortunately
|
||||
<phpunit codecoverage="true" haltonfailure="true">
|
||||
<formatter todir="build/logs" type="xml"/>
|
||||
<batchtest>
|
||||
<fileset dir="tests">
|
||||
<include name="all_tests.php"/>
|
||||
</fileset>
|
||||
</batchtest>
|
||||
</phpunit>
|
||||
-->
|
||||
<target name="test-slow" depends="clean,prepare">
|
||||
<exec dir="."
|
||||
command="phpunit --log-junit build/logs/phpunit.xml
|
||||
--configuration phpunit.xml.all
|
||||
--group slow
|
||||
--coverage-clover build/logs/clover-slow.xml
|
||||
--coverage-html build/coverage-slow"
|
||||
passthru="true" />
|
||||
</target>
|
||||
|
||||
<target name="docs">
|
||||
@@ -122,6 +119,29 @@
|
||||
<target name="create-package" depends="prepare-new-version,old-version-diffs">
|
||||
<exec dir="build" command="php -f package.php '${versions}' > logs/package.log" escape="false" />
|
||||
<exec dir="build" command="php -f build_diff.php '${prevversion}' '${newversion}' > logs/build_diff.log" escape="false" />
|
||||
|
||||
<exec dir="build" escape="false"
|
||||
command="diff -crNEBwd old_versions/release-${prevversion}/language new_version/phpBB3/language >
|
||||
save/save_${prevversion}_to_${newversion}/language/phpbb-${prevversion}_to_${newversion}_language.patch" />
|
||||
<exec dir="build" escape="false"
|
||||
command="diff -crNEBwd old_versions/release-${prevversion}/styles/prosilver new_version/phpBB3/styles/prosilver >
|
||||
save/save_${prevversion}_to_${newversion}/prosilver/phpbb-${prevversion}_to_${newversion}_prosilver.patch" />
|
||||
<exec dir="build" escape="false"
|
||||
command="diff -crNEBwd old_versions/release-${prevversion}/styles/subsilver2 new_version/phpBB3/styles/subsilver2 >
|
||||
save/save_${prevversion}_to_${newversion}/subsilver2/phpbb-${prevversion}_to_${newversion}_subsilver2.patch" />
|
||||
|
||||
<exec dir="build" escape="false"
|
||||
command="git shortlog --summary --numbered release-${prevversion}...HEAD >
|
||||
save/save_${prevversion}_to_${newversion}/phpbb-${prevversion}_to_${newversion}_git_shortlog.txt" />
|
||||
<exec dir="build" escape="false"
|
||||
command="git diff --stat release-${prevversion}...HEAD >
|
||||
save/save_${prevversion}_to_${newversion}/phpbb-${prevversion}_to_${newversion}_git_diffstat.txt" />
|
||||
</target>
|
||||
|
||||
<target name="changelog" depends="prepare">
|
||||
<exec dir="build" escape="false"
|
||||
command="php -f build_changelog.php '${newversion}' >
|
||||
save/changelog_${newversion}.html" />
|
||||
</target>
|
||||
|
||||
<!--
|
||||
|
53
build/build_changelog.php
Executable file
53
build/build_changelog.php
Executable file
@@ -0,0 +1,53 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package build
|
||||
* @copyright (c) 2011 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
if ($_SERVER['argc'] != 2)
|
||||
{
|
||||
echo "Please specify the new version as argument (e.g. build_changelog.php '1.0.2').\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
$fixVersion = $_SERVER['argv'][1];
|
||||
|
||||
$query = 'project = PHPBB3
|
||||
AND resolution = Fixed
|
||||
AND fixVersion = "' . $fixVersion . '"
|
||||
AND status IN ("Unverified Fix", Closed)';
|
||||
|
||||
$url = 'http://tracker.phpbb.com/sr/jira.issueviews:searchrequest-xml/temp/SearchRequest.xml?jqlQuery=' . urlencode($query) . '&tempMax=1000';
|
||||
$xml = simplexml_load_string(file_get_contents($url));
|
||||
|
||||
foreach ($xml->xpath('//item') as $item)
|
||||
{
|
||||
$key = (string) $item->key;
|
||||
|
||||
$keyUrl = 'http://tracker.phpbb.com/browse/' . $key;
|
||||
$keyLink = '<a href="' . $keyUrl . '">' . $key . '</a>';
|
||||
|
||||
$value = str_replace($key, $keyLink, htmlspecialchars($item->title));
|
||||
$value = str_replace(']', '] -', $value);
|
||||
|
||||
$types[(string) $item->type][$key] = $value;
|
||||
}
|
||||
|
||||
ksort($types);
|
||||
foreach ($types as $type => $tickets)
|
||||
{
|
||||
echo "<h4>$type</h4>\n";
|
||||
echo "<ul>\n";
|
||||
|
||||
uksort($tickets, 'strnatcasecmp');
|
||||
|
||||
foreach ($tickets as $ticket)
|
||||
{
|
||||
echo "<li>$ticket</li>\n";
|
||||
}
|
||||
echo "</ul>\n";
|
||||
}
|
@@ -3,9 +3,8 @@
|
||||
/**
|
||||
*
|
||||
* @package build
|
||||
* @version $Id$
|
||||
* @copyright (c) 2010 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -388,7 +387,7 @@ function build_header($mode, $filenames, $header)
|
||||
$html .= "## {$filename['phpbb_filename']}\n";
|
||||
}
|
||||
}
|
||||
$html .= "## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2 \n";
|
||||
$html .= "## License: http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 \n";
|
||||
$html .= "############################################################## \n";
|
||||
$html .= "\n";
|
||||
|
||||
|
@@ -2,9 +2,8 @@
|
||||
/**
|
||||
*
|
||||
* @package build
|
||||
* @version $Id$
|
||||
* @copyright (c) 2010 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
|
@@ -2,10 +2,9 @@
|
||||
/**
|
||||
*
|
||||
* @package build
|
||||
* @version $Id$
|
||||
* @copyright (c) 2000 Geoffrey T. Dairiki <dairiki@dairiki.org>
|
||||
* @copyright (c) 2010 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
|
@@ -3,9 +3,8 @@
|
||||
/**
|
||||
*
|
||||
* @package build
|
||||
* @version $Id$
|
||||
* @copyright (c) 2010 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
|
@@ -11,14 +11,30 @@
|
||||
#
|
||||
# ln -s ../../git-tools/hooks/commit-msg \\
|
||||
# .git/hooks/commit-msg
|
||||
#
|
||||
# You can configure whether invalid commit messages abort commits:
|
||||
#
|
||||
# git config phpbb.hooks.commit-msg.fatal true (abort)
|
||||
# git config phpbb.hooks.commit-msg.fatal false (warn only, do not abort)
|
||||
#
|
||||
# The default is to warn only.
|
||||
#
|
||||
# Warning/error messages use color by default if the output is a terminal
|
||||
# ("output" here is normally standard error when you run git commit).
|
||||
# To force or disable the use of color:
|
||||
#
|
||||
# git config phpbb.hooks.commit-msg.color true (force color output)
|
||||
# git config phpbb.hooks.commit-msg.color false (disable color output)
|
||||
|
||||
config_ns="phpbb.hooks.commit-msg";
|
||||
|
||||
if [ "$(git config --bool $config_ns.fatal)" = "false" ]
|
||||
if [ "$(git config --bool $config_ns.fatal)" = "true" ]
|
||||
then
|
||||
fatal=0;
|
||||
else
|
||||
fatal=1;
|
||||
severity=Error;
|
||||
else
|
||||
fatal=0;
|
||||
severity=Warning;
|
||||
fi
|
||||
|
||||
debug_level=$(git config --int $config_ns.debug || echo 0);
|
||||
@@ -47,14 +63,68 @@ debug()
|
||||
|
||||
quit()
|
||||
{
|
||||
if [ $1 -gt 0 ] && [ $1 -ne $ERR_UNKNOWN ] && [ $fatal -eq 0 ]
|
||||
if [ $1 -eq 0 ] || [ $1 -eq $ERR_UNKNOWN ]
|
||||
then
|
||||
# success
|
||||
exit 0;
|
||||
elif [ $fatal -eq 0 ]
|
||||
then
|
||||
# problems found but fatal is false
|
||||
complain 'Please run `git commit --amend` and fix the problems mentioned.' 1>&2
|
||||
exit 0;
|
||||
else
|
||||
complain "Aborting commit." 1>&2
|
||||
exit $1;
|
||||
fi
|
||||
}
|
||||
|
||||
use_color()
|
||||
{
|
||||
if [ -z "$use_color_cached" ]
|
||||
then
|
||||
case $(git config --bool $config_ns.color)
|
||||
in
|
||||
false)
|
||||
use_color_cached=1
|
||||
;;
|
||||
true)
|
||||
use_color_cached=0
|
||||
;;
|
||||
*)
|
||||
# tty detection in shell:
|
||||
# http://hwi.ath.cx/jsh/list/shext/isatty.sh.html
|
||||
tty 0>/dev/stdout >/dev/null 2>&1
|
||||
use_color_cached=$?
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
# return value is the flag inverted -
|
||||
# if return value is 0, this means use color
|
||||
return $use_color_cached
|
||||
}
|
||||
|
||||
complain()
|
||||
{
|
||||
if use_color
|
||||
then
|
||||
# Careful: our argument may include arguments to echo like -n
|
||||
# ANSI color codes:
|
||||
# http://pueblo.sourceforge.net/doc/manual/ansi_color_codes.html
|
||||
printf "\033[31m\033[1m"
|
||||
if [ "$1" = "-n" ]
|
||||
then
|
||||
echo "$@"
|
||||
printf "\033[0m"
|
||||
else
|
||||
# This will print one trailing space.
|
||||
# Not sure how to avoid this at the moment.
|
||||
echo "$@" $(printf "\033[0m")
|
||||
fi
|
||||
else
|
||||
echo "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
# Check for empty commit message
|
||||
if ! grep -qv '^#' "$1"
|
||||
then
|
||||
@@ -70,9 +140,9 @@ msg=$(grep -v '^#' "$1" |grep -nE '.{81,}')
|
||||
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
echo "The following lines are greater than 80 characters long:" >&2;
|
||||
echo >&2
|
||||
echo "$msg" >&2;
|
||||
complain "The following lines are greater than 80 characters long:" >&2;
|
||||
complain >&2
|
||||
complain "$msg" >&2;
|
||||
|
||||
quit $ERR_LENGTH;
|
||||
fi
|
||||
@@ -126,9 +196,9 @@ do
|
||||
# Don't be too strict.
|
||||
# Commits may be temporary, intended to be squashed later.
|
||||
# Just issue a warning here.
|
||||
echo "Warning: heading should be a sentence beginning with a capital letter." 1>&2
|
||||
echo "You entered:" 1>&2
|
||||
echo "$line" 1>&2
|
||||
complain "$severity: heading should be a sentence beginning with a capital letter." 1>&2
|
||||
complain "You entered:" 1>&2
|
||||
complain "$line" 1>&2
|
||||
fi
|
||||
# restore exit code
|
||||
(exit $result)
|
||||
@@ -160,7 +230,7 @@ do
|
||||
echo "$line" | grep -Eq "^#";
|
||||
;;
|
||||
*)
|
||||
echo "Unrecognised token $expect" >&2;
|
||||
complain "Unrecognised token $expect" >&2;
|
||||
quit $err;
|
||||
;;
|
||||
esac
|
||||
@@ -231,7 +301,7 @@ do
|
||||
expecting="eof";
|
||||
;;
|
||||
*)
|
||||
echo "Unrecognised token $expect" >&2;
|
||||
complain "Unrecognised token $expect" >&2;
|
||||
quit 254;
|
||||
;;
|
||||
esac
|
||||
@@ -245,11 +315,11 @@ do
|
||||
else
|
||||
# None of the expected line formats matched
|
||||
# Guess we'll call it a day here then
|
||||
echo "Syntax error on line $i:" >&2;
|
||||
echo ">> $line" >&2;
|
||||
echo -n "Expecting: " >&2;
|
||||
echo "$expecting" | sed 's/ /, /g' >&2;
|
||||
exit $err;
|
||||
complain "Syntax error on line $i:" >&2;
|
||||
complain ">> $line" >&2;
|
||||
complain -n "Expecting: " >&2;
|
||||
complain "$expecting" | sed 's/ /, /g' >&2;
|
||||
quit $err;
|
||||
fi
|
||||
|
||||
i=$(( $i + 1 ));
|
||||
@@ -258,7 +328,7 @@ done
|
||||
# If EOF is expected exit cleanly
|
||||
echo "$expecting" | grep -q "eof" || (
|
||||
# Unexpected EOF, error
|
||||
echo "Unexpected EOF encountered" >&2;
|
||||
complain "Unexpected EOF encountered" >&2;
|
||||
quit $ERR_EOF;
|
||||
) && (
|
||||
# Do post scan checks
|
||||
@@ -269,8 +339,8 @@ echo "$expecting" | grep -q "eof" || (
|
||||
|
||||
if [ ! -z "$dupes" ]
|
||||
then
|
||||
echo "The following tickets are repeated:" >&2;
|
||||
echo "$dupes" | sed 's/ /\n/g;s/^/* /g' >&2;
|
||||
complain "The following tickets are repeated:" >&2;
|
||||
complain "$dupes" | sed 's/ /\n/g;s/^/* /g' >&2;
|
||||
quit $ERR_FOOTER;
|
||||
fi
|
||||
fi
|
||||
@@ -278,8 +348,8 @@ echo "$expecting" | grep -q "eof" || (
|
||||
if [ $ticket -gt 0 ]
|
||||
then
|
||||
echo "$tickets" | grep -Eq "\bPHPBB3-$ticket\b" || (
|
||||
echo "Ticket ID [$ticket] of branch missing from list of tickets:" >&2;
|
||||
echo "$tickets" | sed 's/ /\n/g;s/^/* /g' >&2;
|
||||
complain "Ticket ID [$ticket] of branch missing from list of tickets:" >&2;
|
||||
complain "$tickets" | sed 's/ /\n/g;s/^/* /g' >&2;
|
||||
quit $ERR_FOOTER;
|
||||
) || exit $?;
|
||||
fi
|
||||
|
@@ -12,8 +12,17 @@
|
||||
# ln -s ../../git-tools/hooks/pre-commit \\
|
||||
# .git/hooks/pre-commit
|
||||
|
||||
# NOTE: this is run through /usr/bin/env
|
||||
PHP_BIN=php
|
||||
if [ -z "$PHP_BIN" ]
|
||||
then
|
||||
PHP_BIN=php
|
||||
fi
|
||||
|
||||
if [ "$(echo -e test)" = test ]
|
||||
then
|
||||
echo_e="echo -e"
|
||||
else
|
||||
echo_e="echo"
|
||||
fi
|
||||
|
||||
# necessary check for initial commit
|
||||
if git rev-parse --verify HEAD >/dev/null 2>&1
|
||||
@@ -27,7 +36,7 @@ fi
|
||||
error=0
|
||||
errors=""
|
||||
|
||||
if ! which $PHP_BIN >/dev/null 2>&1
|
||||
if ! which "$PHP_BIN" >/dev/null 2>&1
|
||||
then
|
||||
echo "PHP Syntax check failed:"
|
||||
echo "PHP binary does not exist or is not in path: $PHP_BIN"
|
||||
@@ -64,7 +73,13 @@ do
|
||||
|
||||
# check the staged file content for syntax errors
|
||||
# using php -l (lint)
|
||||
result=$(git cat-file -p $sha | /usr/bin/env $PHP_BIN -l 2>/dev/null)
|
||||
# note: if display_errors=stderr in php.ini,
|
||||
# parse errors are printed on stderr; otherwise
|
||||
# they are printed on stdout.
|
||||
# we filter everything other than parse errors
|
||||
# with a grep below, therefore it should be safe
|
||||
# to combine stdout and stderr in all circumstances
|
||||
result=$(git cat-file -p $sha | "$PHP_BIN" -l 2>&1)
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
error=1
|
||||
@@ -76,7 +91,45 @@ unset IFS
|
||||
|
||||
if [ $error -eq 1 ]
|
||||
then
|
||||
echo -e "PHP Syntax check failed:";
|
||||
echo -e "$errors" | grep "^Parse error:"
|
||||
echo "PHP Syntax check failed:"
|
||||
# php "display errors" (display_errors php.ini value)
|
||||
# and "log errors" (log_errors php.ini value).
|
||||
# these are independent settings - see main/main.c in php source.
|
||||
# the "log errors" setting produces output which
|
||||
# starts with "PHP Parse error:"; the "display errors"
|
||||
# setting produces output starting with "Parse error:".
|
||||
# if both are turned on php dumps the parse error twice.
|
||||
# therefore here we try to grep for one version and
|
||||
# if that yields no results grep for the other version.
|
||||
#
|
||||
# other fun php facts:
|
||||
#
|
||||
# 1. in cli, display_errors and log_errors have different
|
||||
# destinations by default. display_errors prints to
|
||||
# standard output and log_errors prints to standard error.
|
||||
# whether these destinations make sense is left
|
||||
# as an exercise for the reader.
|
||||
# 2. as mentioned above, with all output turned on
|
||||
# php will print parse errors twice, one time on stdout
|
||||
# and one time on stderr.
|
||||
# 3. it is possible to set both display_errors and log_errors
|
||||
# to off. if this is done php will print the text
|
||||
# "Errors parsing <file>" but will not say what
|
||||
# the errors are. useful behavior, this.
|
||||
# 4. on my system display_errors defaults to on and
|
||||
# log_errors defaults to off, therefore providing
|
||||
# by default one copy of messages. your mileage may vary.
|
||||
# 5. by setting display_errors=stderr and log_errors=on,
|
||||
# both sets of messages will be printed on stderr.
|
||||
# 6. php-cgi binary, given display_errors=stderr and
|
||||
# log_errors=on, still prints both sets of messages
|
||||
# on stderr, but formats one set as an html fragment.
|
||||
# 7. your entry here? ;)
|
||||
$echo_e "$errors" | grep "^Parse error:"
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
# match failed
|
||||
$echo_e "$errors" | grep "^PHP Parse error:"
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
|
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @package phpBB3
|
||||
* @copyright (c) 2011 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
|
@@ -4,7 +4,7 @@
|
||||
*
|
||||
* @package phpBB3
|
||||
* @copyright (c) 2011 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 3.8 KiB |
BIN
phpBB/adm/images/phpbb_logo.png
Normal file
BIN
phpBB/adm/images/phpbb_logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.1 KiB |
@@ -199,6 +199,7 @@ function adm_page_footer($copyright_html = true)
|
||||
'DEBUG_OUTPUT' => (defined('DEBUG')) ? $debug_output : '',
|
||||
'TRANSLATION_INFO' => (!empty($user->lang['TRANSLATION_INFO'])) ? $user->lang['TRANSLATION_INFO'] : '',
|
||||
'S_COPYRIGHT_HTML' => $copyright_html,
|
||||
'CREDIT_LINE' => $user->lang('POWERED_BY', '<a href="http://www.phpbb.com/">phpBB</a>® Forum Software © phpBB Group'),
|
||||
'VERSION' => $config['version'])
|
||||
);
|
||||
|
||||
|
@@ -74,7 +74,7 @@
|
||||
<fieldset class="tabulated">
|
||||
<legend>{L_TITLE}</legend>
|
||||
|
||||
<table cellspacing="1">
|
||||
<table cellspacing="1" id="smilies">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="{COLSPAN}">{L_CONFIG}</th>
|
||||
@@ -94,7 +94,7 @@
|
||||
<td>{L_ORDER}</td>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_ADD -->
|
||||
<td>{L_ADD}</td>
|
||||
<td>{L_ADD} <a href="#" onclick="marklist('smilies', 'add_img', true); return false;">({L_MARK_ALL})</a></td>
|
||||
<!-- ENDIF -->
|
||||
</tr>
|
||||
</thead>
|
||||
|
@@ -34,6 +34,36 @@
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF S_MBSTRING_LOADED -->
|
||||
<!-- IF S_MBSTRING_FUNC_OVERLOAD_FAIL -->
|
||||
<div class="errorbox">
|
||||
<h3>{L_ERROR_MBSTRING_FUNC_OVERLOAD}</h3>
|
||||
<p>{L_ERROR_MBSTRING_FUNC_OVERLOAD_EXPLAIN}</p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF S_MBSTRING_ENCODING_TRANSLATION_FAIL -->
|
||||
<div class="errorbox">
|
||||
<h3>{L_ERROR_MBSTRING_ENCODING_TRANSLATION}</h3>
|
||||
<p>{L_ERROR_MBSTRING_ENCODING_TRANSLATION_EXPLAIN}</p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF S_MBSTRING_HTTP_INPUT_FAIL -->
|
||||
<div class="errorbox">
|
||||
<h3>{L_ERROR_MBSTRING_HTTP_INPUT}</h3>
|
||||
<p>{L_ERROR_MBSTRING_HTTP_INPUT_EXPLAIN}</p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF S_MBSTRING_HTTP_OUTPUT_FAIL -->
|
||||
<div class="errorbox">
|
||||
<h3>{L_ERROR_MBSTRING_HTTP_OUTPUT}</h3>
|
||||
<p>{L_ERROR_MBSTRING_HTTP_OUTPUT_EXPLAIN}</p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF S_WRITABLE_CONFIG -->
|
||||
<div class="errorbox notice">
|
||||
<p>{L_WRITABLE_CONFIG}</p>
|
||||
|
@@ -63,6 +63,10 @@
|
||||
<dt><label for="field_required">{L_REQUIRED_FIELD}:</label><br /><span>{L_REQUIRED_FIELD_EXPLAIN}</span></dt>
|
||||
<dd><input type="checkbox" class="radio" id="field_required" name="field_required" value="1"<!-- IF S_FIELD_REQUIRED --> checked="checked"<!-- ENDIF --> /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="field_show_novalue">{L_SHOW_NOVALUE_FIELD}:</label><br /><span>{L_SHOW_NOVALUE_FIELD_EXPLAIN}</span></dt>
|
||||
<dd><input type="checkbox" class="radio" id="field_show_novalue" name="field_show_novalue" value="1"<!-- IF S_FIELD_SHOW_NOVALUE --> checked="checked"<!-- ENDIF --> /></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="field_hide">{L_HIDE_PROFILE_FIELD}:</label><br /><span>{L_HIDE_PROFILE_FIELD_EXPLAIN}</span></dt>
|
||||
<dd><input type="checkbox" class="radio" id="field_hide" name="field_hide" value="1"<!-- IF S_FIELD_HIDE --> checked="checked"<!-- ENDIF --> /></dd>
|
||||
|
@@ -35,7 +35,7 @@
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="special_rank">{L_RANK_SPECIAL}:</label></dt>
|
||||
<dd><label><input onclick="dE('posts', -1)" type="radio" class="radio" name="special_rank" value="1" id="special_rank"<!-- IF S_SPECIAL_RANK --> checked="checked"<!-- ENDIF --> />{L_YES}</label>
|
||||
<dd><label><input onclick="dE('posts', -1)" type="radio" class="radio" name="special_rank" value="1" id="special_rank"<!-- IF S_SPECIAL_RANK --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
<label><input onclick="dE('posts', 1)" type="radio" class="radio" name="special_rank" value="0"<!-- IF not S_SPECIAL_RANK --> checked="checked"<!-- ENDIF --> /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
<!-- IF S_SPECIAL_RANK --><div id="posts" style="display: none;"><!-- ELSE --><div id="posts"><!-- ENDIF -->
|
||||
|
@@ -402,6 +402,12 @@
|
||||
<td class="row3" colspan="{$COLSPAN}"><strong>{L_INSTALLED}</strong></td>
|
||||
</tr>
|
||||
<!-- BEGIN installed -->
|
||||
<!-- IF installed.S_INACTIVE and not $INACTIVE_STYLES -->
|
||||
<!-- DEFINE $INACTIVE_STYLES = 1 -->
|
||||
<tr>
|
||||
<td class="row3" colspan="{$COLSPAN}"><strong>{L_INACTIVE_STYLES}</strong></td>
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
<tr>
|
||||
<td><strong>{installed.NAME}</strong><!-- IF installed.S_DEFAULT_STYLE --> *<!-- ENDIF --></td>
|
||||
<!-- IF S_STYLE -->
|
||||
|
@@ -13,7 +13,7 @@
|
||||
<fieldset>
|
||||
<legend>{L_SELECT_USER}</legend>
|
||||
<dl>
|
||||
<dt><label for="username">{L_FIND_USERNAME}:</label></dt>
|
||||
<dt><label for="username">{L_ENTER_USERNAME}:</label></dt>
|
||||
<dd><input class="text medium" type="text" id="username" name="username" /></dd>
|
||||
<dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</dd>
|
||||
<dd class="full" style="text-align: left;"><label><input type="checkbox" class="radio" id="anonymous" name="u" value="{ANONYMOUS_USER_ID}" /> {L_SELECT_ANONYMOUS}</label></dd>
|
||||
|
@@ -135,19 +135,24 @@
|
||||
</form>
|
||||
|
||||
<!-- IF not S_OWN_ACCOUNT -->
|
||||
<form id="user_delete" method="post" action="{U_ACTION}">
|
||||
<fieldset>
|
||||
<legend>{L_DELETE_USER}</legend>
|
||||
<dl>
|
||||
<dt><label for="delete_type">{L_DELETE_USER}:</label><br /><span>{L_DELETE_USER_EXPLAIN}</span></dt>
|
||||
<dd><select id="delete_type" name="delete_type"><option class="sep" value="">{L_SELECT_OPTION}</option><option value="retain">{L_RETAIN_POSTS}</option><option value="remove">{L_DELETE_POSTS}</option></select></dd>
|
||||
</dl>
|
||||
<p class="quick">
|
||||
<input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
|
||||
<input type="hidden" name="delete" value="1" />
|
||||
{S_FORM_TOKEN}
|
||||
</p>
|
||||
</fieldset>
|
||||
</form>
|
||||
<form id="user_delete" method="post" action="{U_ACTION}">
|
||||
<fieldset>
|
||||
<legend>{L_DELETE_USER}</legend>
|
||||
<dl>
|
||||
<dt><label for="delete_type">{L_DELETE_USER}:</label><br /><span>{L_DELETE_USER_EXPLAIN}</span></dt>
|
||||
<dd>
|
||||
<!-- IF USER_HAS_POSTS -->
|
||||
<select id="delete_type" name="delete_type"><option class="sep" value="">{L_SELECT_OPTION}</option><option value="retain">{L_RETAIN_POSTS}</option><option value="remove">{L_DELETE_POSTS}</option></select></dd>
|
||||
<!-- ELSE -->
|
||||
{L_USER_NO_POSTS_TO_DELETE}<input type="hidden" id="delete_type" name="delete_type" value="retain" />
|
||||
<!-- ENDIF -->
|
||||
</dl>
|
||||
<p class="quick">
|
||||
<input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
|
||||
<input type="hidden" name="delete" value="1" />
|
||||
{S_FORM_TOKEN}
|
||||
</p>
|
||||
</fieldset>
|
||||
</form>
|
||||
<!-- ENDIF -->
|
||||
<!-- ENDIF -->
|
||||
|
@@ -22,9 +22,8 @@
|
||||
w: '{LA_BBCODE_W_HELP}',
|
||||
s: '{LA_BBCODE_S_HELP}',
|
||||
f: '{LA_BBCODE_F_HELP}',
|
||||
e: '{LA_BBCODE_E_HELP}',
|
||||
y: '{LA_BBCODE_Y_HELP}',
|
||||
d: '{LA_BBCODE_D_HELP}',
|
||||
t: '{LA_BBCODE_T_HELP}',
|
||||
tip: '{L_STYLES_TIP}'
|
||||
<!-- BEGIN custom_tags -->
|
||||
,cb_{custom_tags.BBCODE_ID}: '{custom_tags.A_BBCODE_HELPLINE}'
|
||||
@@ -56,7 +55,7 @@
|
||||
<input type="button" class="button2" accesskey="c" name="addbbcode8" value="Code" style="width: 40px" onclick="bbstyle(8)" onmouseover="helpline('c')" onmouseout="helpline('tip')" />
|
||||
<input type="button" class="button2" accesskey="l" name="addbbcode10" value="List" style="width: 40px" onclick="bbstyle(10)" onmouseover="helpline('l')" onmouseout="helpline('tip')" />
|
||||
<input type="button" class="button2" accesskey="o" name="addbbcode12" value="List=" style="width: 40px" onclick="bbstyle(12)" onmouseover="helpline('o')" onmouseout="helpline('tip')" />
|
||||
<input type="button" class="button2" accesskey="y" name="addlitsitem" value="[*]" style="width: 40px" onclick="bbstyle(-1)" onmouseover="helpline('e')" onmouseout="helpline('tip')" />
|
||||
<input type="button" class="button2" accesskey="y" name="addlistitem" value="[*]" style="width: 40px" onclick="bbstyle(-1)" onmouseover="helpline('y')" onmouseout="helpline('tip')" />
|
||||
<!-- IF S_BBCODE_IMG -->
|
||||
<input type="button" class="button2" accesskey="p" name="addbbcode14" value="Img" style="width: 40px" onclick="bbstyle(14)" onmouseover="helpline('p')" onmouseout="helpline('tip')" />
|
||||
<!-- ENDIF -->
|
||||
|
@@ -142,15 +142,15 @@ li {
|
||||
#page-header {
|
||||
clear: both;
|
||||
text-align: right;
|
||||
background: url("../images/phpbb_logo.gif") top left no-repeat;
|
||||
height: 49px;
|
||||
background: url("../images/phpbb_logo.png") top left no-repeat;
|
||||
height: 54px;
|
||||
font-size: 0.85em;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.rtl #page-header {
|
||||
text-align: left;
|
||||
background: url("../images/phpbb_logo.gif") top right no-repeat;
|
||||
background: url("../images/phpbb_logo.png") top right no-repeat;
|
||||
}
|
||||
|
||||
#page-header h1 {
|
||||
@@ -899,12 +899,15 @@ html>body dd label input { vertical-align: text-bottom;} /* Tweak for Moz to ali
|
||||
dd input {
|
||||
font-size: 1.00em;
|
||||
max-width: 100%;
|
||||
margin: 2px 0;
|
||||
}
|
||||
|
||||
dd select {
|
||||
font-size: 100%;
|
||||
font-size: 1em;
|
||||
width: auto;
|
||||
max-width: 100%;
|
||||
margin: 2px 0;
|
||||
}
|
||||
|
||||
dd textarea {
|
||||
@@ -912,11 +915,6 @@ dd textarea {
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
dd select {
|
||||
width: auto;
|
||||
font-size: 1.00em;
|
||||
}
|
||||
|
||||
fieldset dl {
|
||||
margin-bottom: 10px;
|
||||
font-size: 0.85em;
|
||||
|
@@ -8,7 +8,7 @@
|
||||
</div>
|
||||
|
||||
<div id="page-footer">
|
||||
Powered by <a href="http://www.phpbb.com/">phpBB</a> © phpBB Group
|
||||
Powered by <a href="http://www.phpbb.com/">phpBB</a>® Forum Software © phpBB Group
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@@ -43,6 +43,11 @@
|
||||
<p>{WARNING_MSG}</p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<div class="errorbox" style="margin-top: 0;">
|
||||
<h3>{L_NOTICE}</h3>
|
||||
<p>{L_BACKUP_NOTICE}</p>
|
||||
</div>
|
||||
|
||||
<form id="install_update" method="post" action="{U_ACTION}">
|
||||
|
||||
|
@@ -15,12 +15,12 @@
|
||||
// <![CDATA[
|
||||
function resize_panel()
|
||||
{
|
||||
var block = document.getElementById('codepanel');
|
||||
var block = document.getElementById('diff_content');
|
||||
var height;
|
||||
|
||||
if (window.innerHeight)
|
||||
{
|
||||
height = window.innerHeight - 150;
|
||||
height = window.innerHeight - 200;
|
||||
block.style.height = height + 'px';
|
||||
}
|
||||
else
|
||||
@@ -119,6 +119,7 @@ table.hrdiff {
|
||||
overflow: hidden;
|
||||
border-bottom: 1px solid #999;
|
||||
table-layout: fixed;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
table.hrdiff th {
|
||||
@@ -128,7 +129,8 @@ table.hrdiff th {
|
||||
font-family: Verdana,Helvetica,sans-serif;
|
||||
font-size: 11px;
|
||||
border-bottom: 1px solid #999;
|
||||
background: transparent;
|
||||
border-right: 1px solid #999;
|
||||
background: #D9D9D9;
|
||||
}
|
||||
|
||||
table.hrdiff thead th {
|
||||
@@ -142,29 +144,23 @@ table.hrdiff tr:first-child th {
|
||||
}
|
||||
|
||||
table.hrdiff tbody th {
|
||||
padding: 2em 1px 1px 1px;
|
||||
font-size: 80%;
|
||||
border-top: 1px solid #999;
|
||||
}
|
||||
|
||||
table.hrdiff tbody td.old {
|
||||
border-left: 1px solid #999;
|
||||
border-right: 1px solid #999;
|
||||
}
|
||||
table.hrdiff tbody td.new {
|
||||
table.hrdiff tbody td {
|
||||
border-right: 1px solid #999;
|
||||
}
|
||||
|
||||
table.hrdiff td pre {
|
||||
overflow: auto;
|
||||
display: block;
|
||||
width: 100%;
|
||||
overflow: auto;
|
||||
display: block;
|
||||
font-family: "Consolas", monospace;
|
||||
font-size: 1.1em;
|
||||
white-space: pre-wrap; /* css-3 */
|
||||
word-wrap: break-word; /* Internet Explorer 5.5+ */
|
||||
}
|
||||
|
||||
table.hrdiff .unmodified {
|
||||
background: #fff;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
table.hrdiff .added {
|
||||
|
@@ -9,7 +9,7 @@
|
||||
|
||||
<div id="page-footer">
|
||||
<!-- IF S_COPYRIGHT_HTML -->
|
||||
Powered by <a href="http://www.phpbb.com/">phpBB</a> © phpBB Group
|
||||
{CREDIT_LINE}
|
||||
<!-- IF TRANSLATION_INFO --><br />{TRANSLATION_INFO}<!-- ENDIF -->
|
||||
<!-- ENDIF -->
|
||||
|
||||
|
@@ -5,7 +5,7 @@
|
||||
<div id="page-footer">
|
||||
|
||||
<!-- IF S_COPYRIGHT_HTML -->
|
||||
<br />Powered by <a href="http://www.phpbb.com/">phpBB</a> © phpBB Group
|
||||
<br />{CREDIT_LINE}
|
||||
<!-- IF TRANSLATION_INFO --><br />{TRANSLATION_INFO}<!-- ENDIF -->
|
||||
<!-- ENDIF -->
|
||||
|
||||
|
@@ -1,15 +1,11 @@
|
||||
<?php
|
||||
// -------------------------------------------------------------
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// FILENAME : add_permissions.php
|
||||
// STARTED : Sat Nov 06, 2004
|
||||
// COPYRIGHT : <20> 2004 phpBB Group
|
||||
// WWW : http://www.phpbb.com/
|
||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
||||
//
|
||||
// -------------------------------------------------------------
|
||||
/**
|
||||
*
|
||||
* @package phpBB3
|
||||
* @copyright (c) 2004 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
//
|
||||
// Security message:
|
||||
|
@@ -1,15 +1,11 @@
|
||||
<?php
|
||||
// -------------------------------------------------------------
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// FILENAME : calc_email_hash.php
|
||||
// STARTED : Tue Feb 03, 2004
|
||||
// COPYRIGHT : <20> 2004 phpBB Group
|
||||
// WWW : http://www.phpbb.com/
|
||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
||||
//
|
||||
// -------------------------------------------------------------
|
||||
/**
|
||||
*
|
||||
* @package phpBB3
|
||||
* @copyright (c) 2004 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
//
|
||||
// Security message:
|
||||
|
@@ -1,23 +1,11 @@
|
||||
<?php
|
||||
/***************************************************************************
|
||||
* merge_clean_posts.php
|
||||
* -------------------
|
||||
* begin : Tuesday, February 25, 2003
|
||||
* copyright : (C) 2003 The phpBB Group
|
||||
* email : support@phpbb.com
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
***************************************************************************/
|
||||
/**
|
||||
*
|
||||
* @package phpBB3
|
||||
* @copyright (c) 2003 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
//
|
||||
// Security message:
|
||||
|
@@ -2,14 +2,11 @@
|
||||
/**
|
||||
*
|
||||
* @package phpBB3
|
||||
* @version $Id$
|
||||
* @copyright (c) 2009, 2010 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* This script will check your database for potentially dangerous flash BBCode tags
|
||||
*
|
||||
*/
|
||||
|
||||
//
|
||||
|
@@ -2,9 +2,8 @@
|
||||
/**
|
||||
*
|
||||
* @package phpBB3
|
||||
* @version $Id$
|
||||
* @copyright (c) 2006 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
* This file creates new schema files for every database.
|
||||
* The filenames will be prefixed with an underscore to not overwrite the current schema files.
|
||||
@@ -12,11 +11,7 @@
|
||||
* If you overwrite the original schema files please make sure you save the file with UNIX linefeeds.
|
||||
*/
|
||||
|
||||
die("Please read the first lines of this script for instructions on how to enable it");
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
$schema_path = './../install/schemas/';
|
||||
$schema_path = dirname(__FILE__) . '/../install/schemas/';
|
||||
|
||||
if (!is_writable($schema_path))
|
||||
{
|
||||
@@ -242,7 +237,7 @@ $supported_dbms = array('firebird', 'mssql', 'mysql_40', 'mysql_41', 'oracle', '
|
||||
|
||||
foreach ($supported_dbms as $dbms)
|
||||
{
|
||||
$fp = fopen($schema_path . '_' . $dbms . '_schema.sql', 'wt');
|
||||
$fp = fopen($schema_path . $dbms . '_schema.sql', 'wt');
|
||||
|
||||
$line = '';
|
||||
|
||||
@@ -251,32 +246,43 @@ foreach ($supported_dbms as $dbms)
|
||||
{
|
||||
case 'mysql_40':
|
||||
case 'mysql_41':
|
||||
$line = "#\n# \$I" . "d: $\n#\n\n";
|
||||
case 'firebird':
|
||||
case 'sqlite':
|
||||
fwrite($fp, "# DO NOT EDIT THIS FILE, IT IS GENERATED\n");
|
||||
fwrite($fp, "#\n");
|
||||
fwrite($fp, "# To change the contents of this file, edit\n");
|
||||
fwrite($fp, "# phpBB/develop/create_schema_files.php and\n");
|
||||
fwrite($fp, "# run it.\n");
|
||||
break;
|
||||
|
||||
case 'mssql':
|
||||
case 'oracle':
|
||||
case 'postgres':
|
||||
fwrite($fp, "/*\n");
|
||||
fwrite($fp, " * DO NOT EDIT THIS FILE, IT IS GENERATED\n");
|
||||
fwrite($fp, " *\n");
|
||||
fwrite($fp, " * To change the contents of this file, edit\n");
|
||||
fwrite($fp, " * phpBB/develop/create_schema_files.php and\n");
|
||||
fwrite($fp, " * run it.\n");
|
||||
fwrite($fp, " */\n\n");
|
||||
break;
|
||||
}
|
||||
|
||||
switch ($dbms)
|
||||
{
|
||||
case 'firebird':
|
||||
$line = "#\n# \$I" . "d: $\n#\n\n";
|
||||
$line .= custom_data('firebird') . "\n";
|
||||
break;
|
||||
|
||||
case 'sqlite':
|
||||
$line = "#\n# \$I" . "d: $\n#\n\n";
|
||||
$line .= "BEGIN TRANSACTION;\n\n";
|
||||
break;
|
||||
|
||||
case 'mssql':
|
||||
$line = "/*\n\n \$I" . "d: $\n\n*/\n\n";
|
||||
// no need to do this, no transaction support for schema changes
|
||||
//$line .= "BEGIN TRANSACTION\nGO\n\n";
|
||||
break;
|
||||
|
||||
case 'oracle':
|
||||
$line = "/*\n\n \$I" . "d: $\n\n*/\n\n";
|
||||
$line .= custom_data('oracle') . "\n";
|
||||
break;
|
||||
|
||||
case 'postgres':
|
||||
$line = "/*\n\n \$I" . "d: $\n\n*/\n\n";
|
||||
$line .= "BEGIN;\n\n";
|
||||
$line .= custom_data('postgres') . "\n";
|
||||
break;
|
||||
@@ -1223,7 +1229,6 @@ function get_schema_struct()
|
||||
|
||||
$schema_data['phpbb_login_attempts'] = array(
|
||||
'COLUMNS' => array(
|
||||
'attempt_id' => array('UINT', NULL, 'auto_increment'),
|
||||
'attempt_ip' => array('VCHAR:40', ''),
|
||||
'attempt_browser' => array('VCHAR:150', ''),
|
||||
'attempt_forwarded_for' => array('VCHAR:255', ''),
|
||||
@@ -1232,7 +1237,6 @@ function get_schema_struct()
|
||||
'username' => array('VCHAR_UNI:255', 0),
|
||||
'username_clean' => array('VCHAR_CI', 0),
|
||||
),
|
||||
'PRIMARY_KEY' => 'attempt_id',
|
||||
'KEYS' => array(
|
||||
'att_ip' => array('INDEX', array('attempt_ip', 'attempt_time')),
|
||||
'att_for' => array('INDEX', array('attempt_forwarded_for', 'attempt_time')),
|
||||
@@ -1444,6 +1448,7 @@ function get_schema_struct()
|
||||
'field_default_value' => array('VCHAR_UNI', ''),
|
||||
'field_validation' => array('VCHAR_UNI:20', ''),
|
||||
'field_required' => array('BOOL', 0),
|
||||
'field_show_novalue' => array('BOOL', 0),
|
||||
'field_show_on_reg' => array('BOOL', 0),
|
||||
'field_show_on_vt' => array('BOOL', 0),
|
||||
'field_show_profile' => array('BOOL', 0),
|
||||
|
137
phpBB/develop/create_search_index.php
Normal file
137
phpBB/develop/create_search_index.php
Normal file
@@ -0,0 +1,137 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package phpBB3
|
||||
* @copyright (c) 2011 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
if (php_sapi_name() != 'cli')
|
||||
{
|
||||
die("This program must be run from the command line.\n");
|
||||
}
|
||||
|
||||
if ($argc < 2)
|
||||
{
|
||||
echo 'Usage: php ' . basename(__FILE__) . " index_type [batch_size]\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
$class_name = basename($argv[1]);
|
||||
|
||||
define('IN_PHPBB', true);
|
||||
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : '../';
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
require($phpbb_root_path . 'common.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/acp/acp_search.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/search/' . $class_name . '.' . $phpEx);
|
||||
|
||||
$user->session_begin();
|
||||
$auth->acl($user->data);
|
||||
$user->setup('acp/search');
|
||||
|
||||
$search_name = ucfirst(strtolower(str_replace('_', ' ', $class_name)));
|
||||
$search_errors = array();
|
||||
$search = new $class_name($search_errors);
|
||||
|
||||
$batch_size = isset($argv[2]) ? $argv[2] : 2000;
|
||||
|
||||
if (method_exists($search, 'create_index'))
|
||||
{
|
||||
if ($error = $search->create_index(null, ''))
|
||||
{
|
||||
var_dump($error);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = 'SELECT forum_id, enable_indexing
|
||||
FROM ' . FORUMS_TABLE;
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$forums[$row['forum_id']] = (bool) $row['enable_indexing'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$sql = 'SELECT post_id
|
||||
FROM ' . POSTS_TABLE . '
|
||||
ORDER BY post_id DESC';
|
||||
$result = $db->sql_query_limit($sql, 1);
|
||||
$max_post_id = (int) $db->sql_fetchfield('post_id');
|
||||
|
||||
$post_counter = 0;
|
||||
while ($post_counter <= $max_post_id)
|
||||
{
|
||||
$row_count = 0;
|
||||
$time = time();
|
||||
|
||||
printf("Processing posts with %d <= post_id <= %d\n",
|
||||
$post_counter + 1,
|
||||
$post_counter + $batch_size
|
||||
);
|
||||
|
||||
$sql = 'SELECT post_id, post_subject, post_text, poster_id, forum_id
|
||||
FROM ' . POSTS_TABLE . '
|
||||
WHERE post_id >= ' . (int) ($post_counter + 1) . '
|
||||
AND post_id <= ' . (int) ($post_counter + $batch_size);
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$buffer = $db->sql_buffer_nested_transactions();
|
||||
|
||||
if ($buffer)
|
||||
{
|
||||
$rows = $db->sql_fetchrowset($result);
|
||||
$rows[] = false; // indicate end of array for while loop below
|
||||
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
$i = 0;
|
||||
while ($row = ($buffer ? $rows[$i++] : $db->sql_fetchrow($result)))
|
||||
{
|
||||
// Indexing enabled for this forum or global announcement?
|
||||
// Global announcements get indexed by default.
|
||||
if (!$row['forum_id'] || !empty($forums[$row['forum_id']]))
|
||||
{
|
||||
++$row_count;
|
||||
|
||||
$search->index('post',
|
||||
$row['post_id'],
|
||||
$row['post_text'],
|
||||
$row['post_subject'],
|
||||
$row['poster_id'],
|
||||
$row['forum_id']
|
||||
);
|
||||
|
||||
if ($row_count % 10 == 0)
|
||||
{
|
||||
echo '.';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$delta = (time() - $time);
|
||||
$delta = $delta <= 0 ? 1 : $delta;
|
||||
printf(" %d posts/sec\n", $row_count / $delta);
|
||||
|
||||
if (!$buffer)
|
||||
{
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
$post_counter += $batch_size;
|
||||
}
|
||||
}
|
||||
|
||||
$search->tidy();
|
||||
|
||||
add_log('admin', 'LOG_SEARCH_INDEX_CREATED', $search_name);
|
||||
|
||||
echo $user->lang['SEARCH_INDEX_CREATED'] . "\n";
|
||||
echo 'Peak Memory Usage: ' . get_formatted_filesize(memory_get_peak_usage()) . "\n";
|
||||
|
||||
exit(0);
|
@@ -1,19 +1,13 @@
|
||||
<?php
|
||||
// -------------------------------------------------------------
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// FILENAME : create_variable_overview.php
|
||||
// STARTED : Fri Aug 15 2003
|
||||
// COPYRIGHT : <20> 2003 phpBB Group
|
||||
// WWW : http://www.phpbb.com/
|
||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
||||
//
|
||||
// -------------------------------------------------------------
|
||||
|
||||
/*
|
||||
This script generates an index of some template vars and their use within the templates.
|
||||
It writes down all language variables used by various templates.
|
||||
/**
|
||||
*
|
||||
* @package phpBB3
|
||||
* @copyright (c) 2003 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
* This script generates an index of some template vars and their use within the templates.
|
||||
* It writes down all language variables used by various templates.
|
||||
*
|
||||
*/
|
||||
|
||||
//
|
||||
@@ -83,7 +77,7 @@ $html_skeleton .= '<br><br><a name="ref"></a><b>References: </b>{SEE_FILES}';
|
||||
|
||||
$html_skeleton .= '
|
||||
<br><br>
|
||||
<div class="copyright" align="center">Powered by phpBB 2.2 © <a href="http://www.phpbb.com/" target="_phpbb" class="copyright">phpBB Group</a>, 2003</div>
|
||||
<div class="copyright" align="center">Powered by <a href="http://www.phpbb.com/">phpBB</a>® Forum Software © phpBB Group</div>
|
||||
|
||||
<br clear="all" /></td>
|
||||
</tr>
|
||||
@@ -405,7 +399,7 @@ $html_data .= '<br><li><a href="./lang_index.html" class="gen">Appendix A: Langu
|
||||
|
||||
$html_data .= '
|
||||
</ol><br><br>
|
||||
<div class="copyright" align="center">Powered by phpBB 2.2 © <a href="http://www.phpbb.com/" target="_phpbb" class="copyright">phpBB Group</a>, 2003</div>
|
||||
<div class="copyright" align="center">Powered by <a href="http://www.phpbb.com/">phpBB</a>® Forum Software © phpBB Group</div>
|
||||
|
||||
<br clear="all" /></td>
|
||||
</tr>
|
||||
@@ -528,7 +522,7 @@ foreach ($lang_fp as $filepointer)
|
||||
|
||||
$html_data .= '
|
||||
<br><br>
|
||||
<div class="copyright" align="center">Powered by <a href="http://www.phpbb.com/">phpBB</a> © phpBB Group</div>
|
||||
<div class="copyright" align="center">Powered by <a href="http://www.phpbb.com/">phpBB</a>® Forum Software © phpBB Group</div>
|
||||
|
||||
<br clear="all" /></td>
|
||||
</tr>
|
||||
|
@@ -1,15 +1,12 @@
|
||||
<?php
|
||||
// -------------------------------------------------------------
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// FILENAME : fill.php
|
||||
// STARTED : Mon Sep 15, 2003
|
||||
// COPYRIGHT : <20> 2001, 2003 phpBB Group
|
||||
// WWW : http://www.phpbb.com/
|
||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
||||
//
|
||||
// -------------------------------------------------------------
|
||||
/**
|
||||
*
|
||||
* @package phpBB3
|
||||
* @copyright (c) 2001, 2003 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
//
|
||||
// Security message:
|
||||
//
|
||||
|
@@ -2,9 +2,8 @@
|
||||
/**
|
||||
*
|
||||
* @package phpBB3
|
||||
* @version $Id$
|
||||
* @copyright (c) 2005 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
|
@@ -2,9 +2,8 @@
|
||||
/**
|
||||
*
|
||||
* @package phpBB3
|
||||
* @version $Id$
|
||||
* @copyright (c) 2005 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
|
@@ -2,9 +2,8 @@
|
||||
/**
|
||||
*
|
||||
* @package phpBB3
|
||||
* @version $Id$
|
||||
* @copyright (c) 2005 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
|
@@ -1,15 +1,11 @@
|
||||
<?php
|
||||
// -------------------------------------------------------------
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// FILENAME : merge_attachment_tables.php
|
||||
// STARTED : Tue Nov 04, 2003
|
||||
// COPYRIGHT : <20> 2001, 2003 phpBB Group
|
||||
// WWW : http://www.phpbb.com/
|
||||
// LICENCE : GPL vs2.0 [ see /docs/COPYING ]
|
||||
//
|
||||
// -------------------------------------------------------------
|
||||
/**
|
||||
*
|
||||
* @package phpBB3
|
||||
* @copyright (c) 2001, 2003 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
//
|
||||
// Security message:
|
||||
|
@@ -1,23 +1,11 @@
|
||||
<?php
|
||||
/***************************************************************************
|
||||
* merge_clean_posts.php
|
||||
* -------------------
|
||||
* begin : Tuesday, February 25, 2003
|
||||
* copyright : (C) 2003 The phpBB Group
|
||||
* email : support@phpbb.com
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
***************************************************************************/
|
||||
/**
|
||||
*
|
||||
* @package phpBB3
|
||||
* @copyright (c) 2003 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
//
|
||||
// Security message:
|
||||
|
@@ -2,15 +2,13 @@
|
||||
/**
|
||||
*
|
||||
* @package phpBB3
|
||||
* @version $Id$
|
||||
* @copyright (c) 2006 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
* This file creates SQL statements to upgrade phpBB on MySQL 3.x/4.0.x to 4.1.x/5.x
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
//
|
||||
// Security message:
|
||||
//
|
||||
|
@@ -2,9 +2,8 @@
|
||||
/**
|
||||
*
|
||||
* @package phpBB3
|
||||
* @version $Id$
|
||||
* @copyright (c) 2005 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
|
@@ -13,7 +13,7 @@
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>.
|
||||
* along with this program. If not, see <http://opensource.org/licenses/gpl-2.0.php>
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -23,10 +23,10 @@ involved in phpBB.
|
||||
phpBB Lead Developer: naderman (Nils Adermann)
|
||||
|
||||
phpBB Developers: Acyd Burn (Meik Sievertsen) [Lead 09/2005 - 01/2010]
|
||||
Arty (Vjacheslav Trushkin)
|
||||
bantu (Andreas Fischer)
|
||||
ckwalsh (Cullen Walsh)
|
||||
imkingdavid (David King)
|
||||
igorw (Igor Wiedler)
|
||||
kellanved (Henry Sudhof)
|
||||
nickvergessen (Joas Schilling)
|
||||
Oleg (Oleg Pudeyev)
|
||||
rxu (Ruslan Uzdenov)
|
||||
@@ -48,9 +48,11 @@ phpBB Developers: A_Jelly_Doughnut (Josh Woody) [01/2010 - 11/2010]
|
||||
APTX (Marek A. Ruszczyński) [12/2007 - 04/2011]
|
||||
Ashe (Ludovic Arnaud) [10/2002 - 11/2003, 06/2006 - 10/2006]
|
||||
BartVB (Bart van Bragt) [11/2000 - 03/2006]
|
||||
ckwalsh (Cullen Walsh) [01/2010 - 07/2011]
|
||||
DavidMJ (David M.) [12/2005 - 08/2009]
|
||||
dhn (Dominik Dröscher) [05/2007 - 01/2011]
|
||||
GrahamJE (Graham Eames) [09/2005 - 11/2006]
|
||||
kellanved (Henry Sudhof) [04/2007 - 03/2011]
|
||||
TerraFrost (Jim Wigginton) [04/2009 - 01/2011]
|
||||
Vic D'Elfant (Vic D'Elfant) [04/2007 - 04/2009]
|
||||
|
||||
|
@@ -53,6 +53,8 @@
|
||||
<ol>
|
||||
<li><a href="#changelog">Changelog</a>
|
||||
<ol style="list-style-type: lower-roman;">
|
||||
<li><a href="#v3010">Changes since 3.0.10</a></li>
|
||||
<li><a href="#v309">Changes since 3.0.9</a></li>
|
||||
<li><a href="#v308">Changes since 3.0.8</a></li>
|
||||
<li><a href="#v307-PL1">Changes since 3.0.7-PL1</a></li>
|
||||
<li><a href="#v307">Changes since 3.0.7</a></li>
|
||||
@@ -90,7 +92,268 @@
|
||||
|
||||
<div class="content">
|
||||
|
||||
<a name="v308"></a><h3>1.i. Changes since 3.0.8</h3>
|
||||
<a name="v3010"></a><h3>1.i. Changes since 3.0.10</h3>
|
||||
|
||||
<h4>Bug</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-7432">PHPBB3-7432</a>] - Unclear language for Inactive Users on ACP main page</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8652">PHPBB3-8652</a>] - Duplicate Emails Sent When Subscribed to Forum and Topic</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9079">PHPBB3-9079</a>] - Display backtrace on all E_USER_ERROR errors, not only SQL errors (when DEBUG_EXTRA is enabled)</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9084">PHPBB3-9084</a>] - Unable to display 'option equal to non entered value' if dropdown CPF is not required</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9089">PHPBB3-9089</a>] - PM message title box not accessible via Tab key</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9220">PHPBB3-9220</a>] - Blue border width when table in a div</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9681">PHPBB3-9681</a>] - Password length not in security settings</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9813">PHPBB3-9813</a>] - fulltext_native.php on innodb loading deadly slow for big indexes</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9831">PHPBB3-9831</a>] - Cannot change default of Boolean checkbox custom profile field</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10094">PHPBB3-10094</a>] - Clear cache before phpBB installation</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10129">PHPBB3-10129</a>] - Missing apostrophes in ACP user management -> permissions</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10349">PHPBB3-10349</a>] - Unit tests do not remove comments from schemas</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10399">PHPBB3-10399</a>] - Special characters aren't parsed in style component variables</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10401">PHPBB3-10401</a>] - auth_ldap has an incorrect return value in login_ldap()</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10407">PHPBB3-10407</a>] - Incorrect check for empty image file paths during conversion</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10428">PHPBB3-10428</a>] - optionget/optionset functions in session.php and acp_users.php incorrectly check whether $data is at its default value</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10456">PHPBB3-10456</a>] - Subsilver2 does not define $CAPTCHA_TAB_INDEX</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10508">PHPBB3-10508</a>] - Marking forums as read displays misleading language</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10511">PHPBB3-10511</a>] - Grammar defect in permissions language</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10512">PHPBB3-10512</a>] - Test failure when no default timezone is set in php</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10532">PHPBB3-10532</a>] - Out of range $start causes a page with no search results but with pagination</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10538">PHPBB3-10538</a>] - Special character are not correctly parsed for SMTP protocol</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10542">PHPBB3-10542</a>] - Incorrect class="postlink" in styles/subsilver2/template/faq_body.html</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10546">PHPBB3-10546</a>] - Argument missing for adm_back_link() in acp_captcha.php</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10561">PHPBB3-10561</a>] - All users can choose deactivated styles.</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10569">PHPBB3-10569</a>] - template/ucp_main_front.html does not correctly handle active topic with the name "0"</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10580">PHPBB3-10580</a>] - Default tz in registration dropdown not the same as the board default tz</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10589">PHPBB3-10589</a>] - user_birthday does not use table alias in $leap_year_birthdays variable definition</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10605">PHPBB3-10605</a>] - Orpahned privmsgs are left in the prvmsgs table, with no ties in privmsgs_to table</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10606">PHPBB3-10606</a>] - $s_hidden_fields -> incorrect array name (3 files affected)</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10611">PHPBB3-10611</a>] - Add a check for selected tables existence for ACP database backup tool</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10615">PHPBB3-10615</a>] - Static calls in utf normalizer yield E_STRICT spam on php 5.4</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10630">PHPBB3-10630</a>] - Prune Users produced unnecessarily long query; Got a packet bigger than 'max_allowed_packet' bytes</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10633">PHPBB3-10633</a>] - Users are able to get the real filename of attachment</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10639">PHPBB3-10639</a>] - negative value of ranks message</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10658">PHPBB3-10658</a>] - Rank-item is not shown on team-list</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10675">PHPBB3-10675</a>] - Use more descriptive message when disk is out of space</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10684">PHPBB3-10684</a>] - Function user_notification() prevents notifications for users with stale bans</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10689">PHPBB3-10689</a>] - Bug in the popup " Find a member" when select by letter.</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10691">PHPBB3-10691</a>] - Search index creation CLI script incorrectly calculates indexing speed</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10699">PHPBB3-10699</a>] - Long h2 title breaks div.minitabs in MCP</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10708">PHPBB3-10708</a>] - After a conversion, passwords with UTF8 characters do not work when user_pass_convert is set.</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10717">PHPBB3-10717</a>] - memberlist_view.html: including admin defined profile fields doesnt work</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10723">PHPBB3-10723</a>] - Do not use SQLite on PHP 5.4 in Tests on Travis</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10731">PHPBB3-10731</a>] - JS function addquote() works incorrectly in Opera</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10751">PHPBB3-10751</a>] - MS SQL Error when searching Admin Log</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10760">PHPBB3-10760</a>] - In pre-commit git hook, syntax error is thrown, but is not specifically described</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10767">PHPBB3-10767</a>] - Git hooks do not work properly with git GUIs</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10774">PHPBB3-10774</a>] - db_tools::create_unique_index does not use specified index names on MySQL</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10790">PHPBB3-10790</a>] - Strict comparison on user_id for sending pms</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10797">PHPBB3-10797</a>] - Template var for user rank not filled</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10835">PHPBB3-10835</a>] - Misleading message in UCP when no permission to change password</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10846">PHPBB3-10846</a>] - Missing alias for MAX(post_id) in SQL query in acp_main.php</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10849">PHPBB3-10849</a>] - Missing BBCode Help Text in subsilver2</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10858">PHPBB3-10858</a>] - $db->sql_fetchfield returns false with mssqlnative</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10860">PHPBB3-10860</a>] - Side-by-side diff styling javascript bug</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10881">PHPBB3-10881</a>] - Some files use 0xA9 as the copyright symbol which is neither ASCII nor the UTF8 copyright symbol.</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10887">PHPBB3-10887</a>] - Auto increment tests depend on varbinary handling</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10889">PHPBB3-10889</a>] - Default value for c_char_size in database unit tests is an empty string instead of a char(4)</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10890">PHPBB3-10890</a>] - test_sql_fetchrow_returns_false_when_empty() fails on MSSQL and Oracle</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10908">PHPBB3-10908</a>] - No remote avatar size limit results in files limited only by PHP memory limit</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10913">PHPBB3-10913</a>] - Admin is logged out when accessing any url under adm/ without session id</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10441">PHPBB3-10441</a>] - Update to docs/README.html</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10773">PHPBB3-10773</a>] - ACP phpBB logo needs registered trademark symbol</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10935">PHPBB3-10935</a>] - Limit number of PM rules per user</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10937">PHPBB3-10937</a>] - Comment removal functions: Backward compatibility broken</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10950">PHPBB3-10950</a>] - Deleting user with undelivered PMs causes SQL error</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10952">PHPBB3-10952</a>] - includes/constants.php version number incorrect</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10965">PHPBB3-10965</a>] - Dropdown CPF now shows in profile when no value is selected</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10978">PHPBB3-10978</a>] - Typo in prosilvers ucp_groups_membership.html</li>
|
||||
</ul>
|
||||
<h4>Improvement</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8599">PHPBB3-8599</a>] - Add "Select All" to "Add multiple smilies" screen</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8636">PHPBB3-8636</a>] - Add resync option to topic_view moderation page</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9876">PHPBB3-9876</a>] - Names and descriptions for roles "Newly registered User" in "User roles" and "Forum roles" must be different</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9914">PHPBB3-9914</a>] - Add backup warning to Automatic DB Updater</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9916">PHPBB3-9916</a>] - License in header not linking to version 2 of GNU GPL</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10093">PHPBB3-10093</a>] - Make commit-msg hook always not fatal</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10162">PHPBB3-10162</a>] - Allow TLDs over 6 characters in email addresses</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10280">PHPBB3-10280</a>] - Change the ACP user activation display</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10308">PHPBB3-10308</a>] - Disable Retain/Delete Posts selection if the user has no posts.</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10453">PHPBB3-10453</a>] - PM viewmessage page is misplacing the online icon</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10492">PHPBB3-10492</a>] - Port functional tests to develop-olympus</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10507">PHPBB3-10507</a>] - Sort installed styles list in admin control panel - styles</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10550">PHPBB3-10550</a>] - Sort not installed styles list in admin control panel - styles</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10563">PHPBB3-10563</a>] - ACP usability improvement: show deactivated styles below active styles in styles list</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10565">PHPBB3-10565</a>] - Performance: Unneeded GROUP BY in update_forum_tracking_info</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10607">PHPBB3-10607</a>] - phpBB Credit Line Hardcoded</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10653">PHPBB3-10653</a>] - Add ability to count table rows to database abstraction layer</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10730">PHPBB3-10730</a>] - Add label tags around "select" text in post splitting UI in MCP</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10764">PHPBB3-10764</a>] - FAQ mentions SourceForge</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10812">PHPBB3-10812</a>] - Installer should not display register globals UI for php 5.4+</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10815">PHPBB3-10815</a>] - Enable Feeds by default</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10819">PHPBB3-10819</a>] - Improve side-by-side diff styling</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10834">PHPBB3-10834</a>] - Backport general development language changes in readme files</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10836">PHPBB3-10836</a>] - Enable Avatars by default</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10891">PHPBB3-10891</a>] - Allow specifying test config file name via environment variable</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10892">PHPBB3-10892</a>] - Cosmetic improvements to RUNNING_TESTS.txt</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10898">PHPBB3-10898</a>] - Do not write ?> into config.php to avoid whitespace output</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10925">PHPBB3-10925</a>] - Clarify that SQLite3 is not supported for phpBB 3.0.x</li>
|
||||
</ul>
|
||||
<h4>New Feature</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10616">PHPBB3-10616</a>] - Add template inheritance by default</li>
|
||||
</ul>
|
||||
<h4>Sub-task</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10907">PHPBB3-10907</a>] - Mark (var)binary tests as incomplete on non-MySQL DBMSes</li>
|
||||
</ul>
|
||||
<h4>Task</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9896">PHPBB3-9896</a>] - Update links in docs/readme.html</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10434">PHPBB3-10434</a>] - Add a script that allows creating a search index from CLI</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10455">PHPBB3-10455</a>] - Remove NOTE from header files</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10694">PHPBB3-10694</a>] - Update notification in ACP (Olympus) for increase of minimum PHP version to 5.3.2</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10718">PHPBB3-10718</a>] - Add Travis CI</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10788">PHPBB3-10788</a>] - Update docs/AUTHORS for 3.0.11-RC1</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10909">PHPBB3-10909</a>] - Update Travis Test Configuration: Travis no longer supports PHP 5.3.2</li>
|
||||
</ul>
|
||||
|
||||
<a name="v309"></a><h3>1.ii. Changes since 3.0.9</h3>
|
||||
|
||||
<h4>Bug</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-5506">PHPBB3-5506</a>] - Deleting all items from last page results in empty list display</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-6458">PHPBB3-6458</a>] - Width of Topics and Posts columns in Board Index is causing problems with language packs</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-7138">PHPBB3-7138</a>] - Cannot display simple header/footer with trigger_error()</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-7291">PHPBB3-7291</a>] - Broken links of char selection in memberlist</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-7932">PHPBB3-7932</a>] - Fix font size in select boxes</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8094">PHPBB3-8094</a>] - Text in the forums.php and install.php not matching</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8173">PHPBB3-8173</a>] - Redundant BBCode helpline in JS</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8177">PHPBB3-8177</a>] - February 29th birthdays not shown in non-leap year</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8571">PHPBB3-8571</a>] - Users can make their age a negative number on memberlist</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8691">PHPBB3-8691</a>] - Error creating log_time index</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8937">PHPBB3-8937</a>] - Code tags - single space indent</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9008">PHPBB3-9008</a>] - Incorrect unread topic tracking for unapproved topics</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9066">PHPBB3-9066</a>] - Invalid Prefix Names Allowed</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9416">PHPBB3-9416</a>] - HTML entities in poll titles and options incorrectly re-encoded</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9525">PHPBB3-9525</a>] - Minimum characters per post/message should never be '0'</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9645">PHPBB3-9645</a>] - XHTML error on phpinfo page in ACP</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9776">PHPBB3-9776</a>] - When deleting and recreating a poll, old options aren't deleted and reappear with the new ones</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9956">PHPBB3-9956</a>] - No error message displayed when disapprove reason is invalid or empty</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9976">PHPBB3-9976</a>] - Direct post links open the wrong page of viewtopic when multiple posts are posted in the same second</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9978">PHPBB3-9978</a>] - Missing semicolons in // <![CDATA[ part of overall_header.html</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10087">PHPBB3-10087</a>] - Limited browser support for ban exclusion emphasis</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10157">PHPBB3-10157</a>] - Missing error handling when a custom profile field is not defined for current language</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10166">PHPBB3-10166</a>] - Post-admin activation email confusingly refers to username</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10187">PHPBB3-10187</a>] - XHTML error in ucp_groups_manage.html</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10190">PHPBB3-10190</a>] - Misleading information about permissions displayed after editing forum settings</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10212">PHPBB3-10212</a>] - Captcha not displayed when username not exists</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10216">PHPBB3-10216</a>] - Updater's failed query language grammatically incorrect</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10226">PHPBB3-10226</a>] - Mysqli dbal extension does not allow connection via pipes</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10227">PHPBB3-10227</a>] - Mysqli dbal extension does not allow persistent connection for PHP >= 5.3.0</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10237">PHPBB3-10237</a>] - Unwatching a forum/topic does not check for correct hash parameter</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10240">PHPBB3-10240</a>] - Word filter evasion</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10253">PHPBB3-10253</a>] - IE9 Quote problem</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10255">PHPBB3-10255</a>] - gitignore ignores too much</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10257">PHPBB3-10257</a>] - AAAA record parsing fails on older versions of Windows</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10259">PHPBB3-10259</a>] - Incorrect email on joining Open group</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10265">PHPBB3-10265</a>] - Unit test tests/random/mt_rand.php is not run because of missing _test suffix.</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10266">PHPBB3-10266</a>] - Poor navigation links after reporting a post</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10267">PHPBB3-10267</a>] - Missing strlen() on $table_prefix in db tools index name length check</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10274">PHPBB3-10274</a>] - Hardcoded module ID in "Re-check version" link on ACP front page</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10275">PHPBB3-10275</a>] - Wrong information about sent passwords in FAQ</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10292">PHPBB3-10292</a>] - Whitespace inconsistency in acp_ranks</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10293">PHPBB3-10293</a>] - Jumpbox allows jumping to invalid forums in prosilver</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10294">PHPBB3-10294</a>] - sqlsrv_rows_affected non-functional in MSSQLNative.php</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10296">PHPBB3-10296</a>] - incorrect cross join in SQL Server</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10298">PHPBB3-10298</a>] - EMBED Tag Not Closed Properly In subSilver2 attachment.html</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10299">PHPBB3-10299</a>] - Typo in comment about $max_store_length in truncate_string() (in functions_content.php)</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10303">PHPBB3-10303</a>] - send_status_line() doesn't validate user input</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10304">PHPBB3-10304</a>] - Bad url in U_ICQ on /ucp_mp_viewmessage.php</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10307">PHPBB3-10307</a>] - Return value of $db->sql_fetchrow() on empty tables is not consistent</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10309">PHPBB3-10309</a>] - Utf tests download data into temporary locations deep in source tree</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10320">PHPBB3-10320</a>] - "Most active topic" can leak topic title of topics in password-protected forums</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10321">PHPBB3-10321</a>] - Link to page 1 of the Memberlist has a useless question mark at the end</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10324">PHPBB3-10324</a>] - XHTML error in Prosilver - MCP - User Notes</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10339">PHPBB3-10339</a>] - Typo in prosilver's mcp_front.html</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10341">PHPBB3-10341</a>] - Topic title of "0" does not show as "Most active topic"</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10351">PHPBB3-10351</a>] - Invalid syntax for Oracle's sql_column_remove()</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10352">PHPBB3-10352</a>] - Missing break for Oracle's sql_table_drop()</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10365">PHPBB3-10365</a>] - Moderators can view forbidden information</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10377">PHPBB3-10377</a>] - All moderators can change topic type</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10394">PHPBB3-10394</a>] - Tests use call-time pass by reference which results in Fatal error on PHP 5.4</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10397">PHPBB3-10397</a>] - Pagination code inconsistency </li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10400">PHPBB3-10400</a>] - '0' (zero) not allowed as forum name</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10413">PHPBB3-10413</a>] - Make create_schema_files usable</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10416">PHPBB3-10416</a>] - Use dbport in phpbb_database_test_connection_manager::connect()</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10420">PHPBB3-10420</a>] - Update startup to account for PHP 5.4</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10421">PHPBB3-10421</a>] - Interchanged parameters in includes/acp/acp_users.php</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10422">PHPBB3-10422</a>] - Unnecessary <!-- IF --> statement in viewtopic_body.html</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10435">PHPBB3-10435</a>] - Topic count mismatch on viewforum</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10437">PHPBB3-10437</a>] - Announcements on moderation queue are not hidden</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10446">PHPBB3-10446</a>] - Unencoded 8bit characters in email headers</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10452">PHPBB3-10452</a>] - XHTML error when printing a PM</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10461">PHPBB3-10461</a>] - MCP's recent actions list is empty</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10479">PHPBB3-10479</a>] - Remove PostgreSQL version numbers from driver's language string</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10485">PHPBB3-10485</a>] - XHTML error in Prosilver - index and viewforum</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10488">PHPBB3-10488</a>] - Database updater for 3.0.10-RC1 overwrites config variable email_max_chunk_size without checking for custom value</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10497">PHPBB3-10497</a>] - SQL error when guest visits forum with unread topic</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10319">PHPBB3-10319</a>] - Missing hidden fields in search form</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10501">PHPBB3-10501</a>] - Description of table prefix is wrong</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10502">PHPBB3-10502</a>] - CHANGELOG.html has a typo: 'red' should be 'read'.</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10503">PHPBB3-10503</a>] - Debug error when previewing edits</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10504">PHPBB3-10504</a>] - MCP Layout STILL broken in ProSilver when screen is resized to less 1200 pixels</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10531">PHPBB3-10531</a>] - Last remaining style can be uninstalled</li>
|
||||
</ul>
|
||||
<h4>Improvement</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8616">PHPBB3-8616</a>] - Add direct link to PM to notification message</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9036">PHPBB3-9036</a>] - Forums that can be listed but not read expose forum information</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9297">PHPBB3-9297</a>] - Add support for Extended Passive Mode (EPSV) in class ftp_fsock to better support IPv6 connections.</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9307">PHPBB3-9307</a>] - Mass email $max_chunk_size</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9361">PHPBB3-9361</a>] - Edit account settings - Improved clarification needed</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9778">PHPBB3-9778</a>] - Member Search from the Admin Control Panel is not Intuitive</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9898">PHPBB3-9898</a>] - Readme needs updating to reflect more opening for patches</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9995">PHPBB3-9995</a>] - Unnecessary coding in display_forums() in functions_display.php</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10032">PHPBB3-10032</a>] - BBCode Add List Item Control Name Contains Typo</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10074">PHPBB3-10074</a>] - Change default value of 'Set as special rank' to No for Add new rank</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10185">PHPBB3-10185</a>] - Board startdate not being set</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10189">PHPBB3-10189</a>] - Add "automatically generated" comment into schema-files.</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10199">PHPBB3-10199</a>] - Performance: viewtopic has a useless join</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10222">PHPBB3-10222</a>] - Also build language and styles changes in diff/patch format</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10239">PHPBB3-10239</a>] - Add "Are you sure" confirmation to backup restore in ACP</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10243">PHPBB3-10243</a>] - Add gmgetdate() wrapper for getdate() which returns dates in UTC.</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10245">PHPBB3-10245</a>] - Messenger uses output buffering for error collection, should use error collector instead</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10246">PHPBB3-10246</a>] - Remove VCS section from docs/coding-guidelines.html</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10254">PHPBB3-10254</a>] - Remove style names from themes and fix some information on it</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10263">PHPBB3-10263</a>] - Add phpbb_version_compare() wrapper for version_compare()</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10278">PHPBB3-10278</a>] - Improve timeout handling in get_remote_file()</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10315">PHPBB3-10315</a>] - Radio Buttons in ACP are clipped in Safari - Fix suggested</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10327">PHPBB3-10327</a>] - Use "ALTER TABLE ... ADD INDEX" instead of "CREATE INDEX"</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10334">PHPBB3-10334</a>] - Birthday List display not dependent on user privileges</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10335">PHPBB3-10335</a>] - Responses to bots should have extra header to be used by reverse proxies</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10346">PHPBB3-10346</a>] - Add drop_tables key for database updater</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10354">PHPBB3-10354</a>] - When template tests are skipped because cache is not writable, print cache directory path</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10369">PHPBB3-10369</a>] - Change error collector to always report errfile and errline</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10370">PHPBB3-10370</a>] - Various improvements for get_backtrace()</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10402">PHPBB3-10402</a>] - Displaying report texts with linebreaks and clickable links</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10419">PHPBB3-10419</a>] - Add mbstring PHP ini parameters checks to ACP</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10430">PHPBB3-10430</a>] - Some typos and the like in docs/coding-guidelines.html</li>
|
||||
</ul>
|
||||
<h4>New Feature</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8240">PHPBB3-8240</a>] - Request: db_tools to have two additional functions, table list and column list</li>
|
||||
</ul>
|
||||
<h4>Task</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9689">PHPBB3-9689</a>] - Scripts and utilities</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10003">PHPBB3-10003</a>] - Resolve db_tools proliferation</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10313">PHPBB3-10313</a>] - Include slow unit tests when running build script</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10483">PHPBB3-10483</a>] - Test suite does not run with MySQL strict mode</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10486">PHPBB3-10486</a>] - Create git shortlog and git diff --stat in build script</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10480">PHPBB3-10480</a>] - Automate changelog building</li>
|
||||
</ul>
|
||||
|
||||
<a name="v308"></a><h3>1.iii. Changes since 3.0.8</h3>
|
||||
|
||||
<h4> Bug
|
||||
</h4>
|
||||
@@ -207,6 +470,8 @@
|
||||
</li>
|
||||
<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-10021'>PHPBB3-10021</a>] - "Find a member" generates SQL error when large dates are entered
|
||||
</li>
|
||||
<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-10029'>PHPBB3-10029</a>] - No such thing as $_SERVER['HTTP_VERSION']
|
||||
</li>
|
||||
<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-10033'>PHPBB3-10033</a>] - "Disallow usernames" does not check already disallowed names
|
||||
</li>
|
||||
<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-10035'>PHPBB3-10035</a>] - ACP template edit feature allows to read any files on webserver and to upload/execute any script on it
|
||||
@@ -285,7 +550,9 @@
|
||||
</li>
|
||||
<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-10178'>PHPBB3-10178</a>] - build.xml does not specify path to find - breaks on FreeBSD
|
||||
</li>
|
||||
<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-10188'>PHPBB3-10188</a>] - Wrong handling of output_buffering value in message handler
|
||||
<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-10188'>PHPBB3-10188</a>] - Broken compressed output when errors/warnings are handled by phpbb and output_buffering is set to 4096 and phpbb gzip is enabled
|
||||
</li>
|
||||
<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-10191'>PHPBB3-10191</a>] - Duplicate output when output_handler is set in php.ini
|
||||
</li>
|
||||
<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-10192'>PHPBB3-10192</a>] - Missing semicolon in MySQL Upgrader
|
||||
</li>
|
||||
@@ -301,6 +568,10 @@
|
||||
</li>
|
||||
<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-10211'>PHPBB3-10211</a>] - Missing space on the recent PHPBB3-9992 changes
|
||||
</li>
|
||||
<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-10213'>PHPBB3-10213</a>] - IP limit index name too long on Oracle
|
||||
</li>
|
||||
<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-10214'>PHPBB3-10214</a>] - Cannot configure Q&A on Oracle
|
||||
</li>
|
||||
<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-10218'>PHPBB3-10218</a>] - STRIP is not defined in style.php causing a notice to be thrown
|
||||
</li>
|
||||
<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-10219'>PHPBB3-10219</a>] - Inappropriate character in web.config file
|
||||
@@ -309,6 +580,26 @@
|
||||
</li>
|
||||
<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-10221'>PHPBB3-10221</a>] - Inconsistent usage of "Seconds" in ACP Settings
|
||||
</li>
|
||||
<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-7729'>PHPBB3-7729</a>] - Prevent date/time functions from throwing E_WARNING on PHP 5.3 by setting a default timezone
|
||||
</li>
|
||||
<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-10188'>PHPBB3-10188</a>] - Broken compressed output when errors/warnings are handled by phpbb and output_buffering is set to 4096 and phpbb gzip is enabled
|
||||
</li>
|
||||
<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-10223'>PHPBB3-10223</a>] - Updater references startup.php from board path
|
||||
</li>
|
||||
<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-10228'>PHPBB3-10228</a>] - Typo in 3.0.9-RC1 user registration settings
|
||||
</li>
|
||||
<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-10229'>PHPBB3-10229</a>] - On languge/acp/styles.php "%s" should be "%s"
|
||||
</li>
|
||||
<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-10232'>PHPBB3-10232</a>] - Search within topic/forum searches all posts
|
||||
</li>
|
||||
<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-10233'>PHPBB3-10233</a>] - IE Emulation fix breaks posting layout when PMing
|
||||
</li>
|
||||
<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-10234'>PHPBB3-10234</a>] - msg_handler() reports E_WARNING as "PHP Notice: "
|
||||
</li>
|
||||
<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-10247'>PHPBB3-10247</a>] - mediumint(8) too small for phpbb_login_attempts.attempt_id
|
||||
</li>
|
||||
<li>[<a href='http://tracker.phpbb.com/browse/PHPBB3-10250'>PHPBB3-10250</a>] - phpBB Logo needs the Registered Trademark Symbol
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h4> Improvement
|
||||
@@ -430,7 +721,7 @@
|
||||
</ul>
|
||||
|
||||
|
||||
<a name="v307-PL1"></a><h3>1.ii. Changes since 3.0.7-PL1</h3>
|
||||
<a name="v307-PL1"></a><h3>1.iv. Changes since 3.0.7-PL1</h3>
|
||||
<h4> Security
|
||||
</h4>
|
||||
<ul>
|
||||
@@ -888,13 +1179,13 @@
|
||||
</ul>
|
||||
|
||||
|
||||
<a name="v307"></a><h3>1.iii. Changes since 3.0.7</h3>
|
||||
<a name="v307"></a><h3>1.iv. Changes since 3.0.7</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Sec] Do not expose forum content of forums with ACL entries but no actual permission in ATOM Feeds. (Bug #58595)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v306"></a><h3>1.iv. Changes since 3.0.6</h3>
|
||||
<a name="v306"></a><h3>1.vi. Changes since 3.0.6</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Allow ban reason and length to be selected and copied in ACP and subsilver2 MCP. (Bug #51095)</li>
|
||||
@@ -998,7 +1289,7 @@
|
||||
|
||||
</ul>
|
||||
|
||||
<a name="v305"></a><h3>1.v. Changes since 3.0.5</h3>
|
||||
<a name="v305"></a><h3>1.vii. Changes since 3.0.5</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Allow whitespaces in avatar gallery names. (Bug #44955)</li>
|
||||
@@ -1220,7 +1511,7 @@
|
||||
<li>[Feature] Send anonymous statistical information to phpBB on installation and update (optional).</li>
|
||||
</ul>
|
||||
|
||||
<a name="v304"></a><h3>1.vi. Changes since 3.0.4</h3>
|
||||
<a name="v304"></a><h3>1.viii. Changes since 3.0.4</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Delete user entry from ban list table upon user deletion (Bug #40015 - Patch by TerraFrost)</li>
|
||||
@@ -1309,7 +1600,7 @@
|
||||
<li>[Sec] Only use forum id supplied for posting if global announcement detected. (Reported by nickvergessen)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v303"></a><h3>1.vii. Changes since 3.0.3</h3>
|
||||
<a name="v303"></a><h3>1.ix. Changes since 3.0.3</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Allow mixed-case template directories to be inherited (Bug #36725)</li>
|
||||
@@ -1341,7 +1632,7 @@
|
||||
<li>[Sec] Ask for forum password if post within passworded forum quoted in private message. (Reported by nickvergessen)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v302"></a><h3>1.viii. Changes since 3.0.2</h3>
|
||||
<a name="v302"></a><h3>1.x. Changes since 3.0.2</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Correctly set topic starter if first post in topic removed (Bug #30575 - Patch by blueray2048)</li>
|
||||
@@ -1440,7 +1731,7 @@
|
||||
<li>[Sec Precaution] Stricter validation of the HTTP_HOST header (Thanks to Techie-Micheal et al for pointing out possible issues in derived code)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v301"></a><h3>1.ix. Changes since 3.0.1</h3>
|
||||
<a name="v301"></a><h3>1.xi. Changes since 3.0.1</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Ability to set permissions on non-mysql dbms (Bug #24955)</li>
|
||||
@@ -1488,7 +1779,7 @@
|
||||
<li>[Sec] Only allow urls gone through redirect() being used within login_box(). (thanks nookieman)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v300"></a><h3>1.x Changes since 3.0.0</h3>
|
||||
<a name="v300"></a><h3>1.xii Changes since 3.0.0</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Change] Validate birthdays (Bug #15004)</li>
|
||||
@@ -1559,7 +1850,7 @@
|
||||
<li>[Fix] Find and display colliding usernames correctly when converting from one database to another (Bug #23925)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v30rc8"></a><h3>1.xi. Changes since 3.0.RC8</h3>
|
||||
<a name="v30rc8"></a><h3>1.xiii. Changes since 3.0.RC8</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Cleaned usernames contain only single spaces, so "a_name" and "a__name" are treated as the same name (Bug #15634)</li>
|
||||
@@ -1568,7 +1859,7 @@
|
||||
<li>[Fix] Call garbage_collection() within database updater to correctly close connections (affects Oracle for example)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v30rc7"></a><h3>1.xii. Changes since 3.0.RC7</h3>
|
||||
<a name="v30rc7"></a><h3>1.xiv. Changes since 3.0.RC7</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Fixed MSSQL related bug in the update system</li>
|
||||
@@ -1603,7 +1894,7 @@
|
||||
<li>[Fix] No duplication of active topics (Bug #15474)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v30rc6"></a><h3>1.xiii. Changes since 3.0.RC6</h3>
|
||||
<a name="v30rc6"></a><h3>1.xv. Changes since 3.0.RC6</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Submitting language changes using acp_language (Bug #14736)</li>
|
||||
@@ -1613,7 +1904,7 @@
|
||||
<li>[Fix] Able to request new password (Bug #14743)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v30rc5"></a><h3>1.xiv. Changes since 3.0.RC5</h3>
|
||||
<a name="v30rc5"></a><h3>1.xvi. Changes since 3.0.RC5</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Feature] Removing constant PHPBB_EMBEDDED in favor of using an exit_handler(); the constant was meant to achive this more or less.</li>
|
||||
@@ -1676,7 +1967,7 @@
|
||||
<li>[Sec] New password hashing mechanism for storing passwords (#i42)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v30rc4"></a><h3>1.xv. Changes since 3.0.RC4</h3>
|
||||
<a name="v30rc4"></a><h3>1.xvii. Changes since 3.0.RC4</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] MySQL, PostgreSQL and SQLite related database fixes (Bug #13862)</li>
|
||||
@@ -1727,7 +2018,7 @@
|
||||
<li>[Fix] odbc_autocommit causing existing result sets to be dropped (Bug #14182)</li>
|
||||
</ul>
|
||||
|
||||
<a name="v30rc3"></a><h3>1.xvi. Changes since 3.0.RC3</h3>
|
||||
<a name="v30rc3"></a><h3>1.xviii. Changes since 3.0.RC3</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Fixing some subsilver2 and prosilver style issues</li>
|
||||
@@ -1836,7 +2127,7 @@
|
||||
|
||||
</ul>
|
||||
|
||||
<a name="v30rc2"></a><h3>1.xvii. Changes since 3.0.RC2</h3>
|
||||
<a name="v30rc2"></a><h3>1.xviv. Changes since 3.0.RC2</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] Re-allow searching within the memberlist</li>
|
||||
@@ -1882,7 +2173,7 @@
|
||||
|
||||
</ul>
|
||||
|
||||
<a name="v30rc1"></a><h3>1.xviii. Changes since 3.0.RC1</h3>
|
||||
<a name="v30rc1"></a><h3>1.xx. Changes since 3.0.RC1</h3>
|
||||
|
||||
<ul>
|
||||
<li>[Fix] (X)HTML issues within the templates (Bug #11255, #11255)</li>
|
||||
@@ -2017,7 +2308,7 @@
|
||||
|
||||
<div class="content">
|
||||
|
||||
<p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-license.php">GPL</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
|
||||
<p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-2.0.php">GNU General Public License v2</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
@@ -110,7 +110,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
|
||||
<div class="content">
|
||||
|
||||
<p>We provide the software, we have absolutely nothing to do with any board that runs it (beyond phpbb.com of course!) and we also do not host any site. The GPL grants the user an unlimited right of use subject to their adherence of that licence. Therefore we cannot prevent, dictate, control or otherwise limit the use of phpBB software. So please do not contact us for such matters.</p>
|
||||
<p>We provide the software, we have absolutely nothing to do with any board that runs it (beyond phpbb.com of course!) and we also do not host any site. The GPL grants the user an unlimited right of use subject to their adherence of that license. Therefore we cannot prevent, dictate, control or otherwise limit the use of phpBB software. So please do not contact us for such matters.</p>
|
||||
|
||||
<p>If you have a problem with a given board please take it up with them, not us. We are not and cannot be held legally responsible for any third party use of this software (much like Microsoft et al cannot be held responsible for the use of Windows in illegal activities, etc.). Additionally we do <strong>not</strong> track the use of phpBB software in any way. So please do not ask us for details on a "given" board we will not be able to help you. If any law firms or lawyers out there send us writs, cease and desist orders, etc. for third party website use of this software we reserve the right to charge for time wasted dealing with such issues...</p>
|
||||
|
||||
@@ -328,7 +328,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
|
||||
<div class="content">
|
||||
|
||||
<p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-license.php">GPL</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
|
||||
<p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-2.0.php">GNU General Public License v2</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
@@ -82,7 +82,7 @@
|
||||
<li><a href="#webserver_configuration">Webserver configuration</a></li>
|
||||
</ol>
|
||||
</li>
|
||||
<li><a href="#disclaimer">Disclaimer</a></li>
|
||||
<li><a href="#disclaimer">Copyright and disclaimer</a></li>
|
||||
</ol>
|
||||
|
||||
</div>
|
||||
@@ -139,15 +139,15 @@
|
||||
<ul>
|
||||
<li>MySQL 3.23 or above (MySQLi supported)</li>
|
||||
<li>PostgreSQL 7.3+</li>
|
||||
<li>SQLite 2.8.2+</li>
|
||||
<li>SQLite 2.8.2+ (SQLite 3 is not supported)</li>
|
||||
<li>Firebird 2.1+</li>
|
||||
<li>MS SQL Server 2000 or above (directly or via ODBC)</li>
|
||||
<li>MS SQL Server 2000 or above (directly or via ODBC or the native adapter)</li>
|
||||
<li>Oracle</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><strong>PHP 4.3.3+ (>=4.3.3, >4.4.x, >5.x.x, >6.0-dev (compatible))</strong> with support for the database you intend to use.</li>
|
||||
<li><strong>PHP 4.3.3+ (>=4.3.3, >=4.4.x, >=5.x.x, >=5.4.x)</strong> with support for the database you intend to use.</li>
|
||||
<li>getimagesize() function need to be enabled.</li>
|
||||
<li>These optional presence of the following modules within PHP will provide access to additional features, but they are not required.
|
||||
<li>Presence of the following modules within PHP will provide access to additional features, but they are not required:
|
||||
<ul>
|
||||
<li>zlib Compression support</li>
|
||||
<li>Remote FTP support</li>
|
||||
@@ -182,7 +182,7 @@
|
||||
|
||||
<p>All .php, .inc, .sql, .cfg, .html and .txt files should be uploaded in <strong>ASCII</strong> mode, while all graphics should be uploaded in <strong>BINARY</strong> mode. If you are unfamiliar with what this means please refer to your FTP client documentation. In most cases this is all handled transparantly by your ftp client but if you encounter problems later you should be sure the files where uploaded correctly as described here.</p>
|
||||
|
||||
<p>phpBB3 comes supplied with english as its standard language. However a number of separate packs for different languages are available. If you are not a native english speaker you may wish to install one or more of these packages before continuing. The installation process below will allow you to select a default language from those available (you can of course change this default at a later stage). For more details of language packs, where to obtain them and how to install them please see the <a href="README.html#i18n">README</a>.</p>
|
||||
<p>phpBB3 comes supplied with British English as its standard language. However a number of separate packs for different languages are available. If you are not a native English speaker you may wish to install one or more of these packages before continuing. The installation process below will allow you to select a default language from those available (you can of course change this default at a later stage). For more details of language packs, where to obtain them and how to install them please see the <a href="README.html#i18n">README</a>.</p>
|
||||
|
||||
<p>Once all the files have been uploaded to your site you should point your browser at this location with the addition of <code>install/</code>. For example if your domain name is <em>www.mydomain.tld</em> and you placed phpBB3 in a directory /phpBB3 off your web root you would enter <em>http://www.mydomain.tld/phpBB3/install/</em> or (alternatively) <em>http://www.mydomain.tld/phpBB3/install/index.php</em> into your browser. When you have done this you should see the phpBB3 Installation screen appear.</p>
|
||||
|
||||
@@ -274,7 +274,7 @@
|
||||
|
||||
<p>This package is meant for those wanting to only replace changed files from a previous version to the latest version. This package normally contains the changed files from up to five previous versions.</p>
|
||||
|
||||
<p>This package contains a number of archives, each contains the files changed from a given release to the latest version. You should select the appropriate archive for your current version, e.g. if you currently have <samp>3.0.8</samp> you should select the phpBB-3.0.8_to_3.0.9.zip/tar.gz file.</p>
|
||||
<p>This package contains a number of archives, each contains the files changed from a given release to the latest version. You should select the appropriate archive for your current version, e.g. if you currently have <samp>3.0.10</samp> you should select the phpBB-3.0.10_to_3.0.11.zip/tar.gz file.</p>
|
||||
|
||||
<p>The directory structure has been preserved enabling you (if you wish) to simply upload the contents of the archive to the appropriate location on your server, i.e. simply overwrite the existing files with the new versions. Do not forget that if you have installed any MODs these files will overwrite the originals possibly destroying them in the process. You will need to re-add MODs to any affected file before uploading.</p>
|
||||
|
||||
@@ -286,7 +286,7 @@
|
||||
|
||||
<p>The patch file is one solution for those with many Modifications (MODs) or other changes who do not want to re-add them back to all the changed files if they use the method explained above. To use this you will need command line access to a standard UNIX type <strong>patch</strong> application. If you do not have access to such an application but still want to use this update approach, we strongly recommend the <a href="#update_auto">Automatic update package</a> explained below. It is also the recommended update method.</p>
|
||||
|
||||
<p>A number of patch files are provided to allow you to update from previous stable releases. Select the correct patch, e.g. if your current version is <samp>3.0.8</samp> you need the phpBB-3.0.8_to_3.0.9.patch file. Place the correct patch in the parent directory containing the phpBB3 core files (i.e. index.php, viewforum.php, etc.). With this done you should run the following command: <strong>patch -cl -d [PHPBB DIRECTORY] -p1 < [PATCH NAME]</strong> (where PHPBB DIRECTORY is the directory name your phpBB Installation resides in, for example phpBB3, and where PATCH NAME is the relevant filename of the selected patch file). This should complete quickly, hopefully without any HUNK FAILED comments.</p>
|
||||
<p>A number of patch files are provided to allow you to update from previous stable releases. Select the correct patch, e.g. if your current version is <samp>3.0.10</samp> you need the phpBB-3.0.10_to_3.0.11.patch file. Place the correct patch in the parent directory containing the phpBB3 core files (i.e. index.php, viewforum.php, etc.). With this done you should run the following command: <strong>patch -cl -d [PHPBB DIRECTORY] -p1 < [PATCH NAME]</strong> (where PHPBB DIRECTORY is the directory name your phpBB Installation resides in, for example phpBB3, and where PATCH NAME is the relevant filename of the selected patch file). This should complete quickly, hopefully without any HUNK FAILED comments.</p>
|
||||
|
||||
<p>If you do get failures you should look at using the <a href="#update_files">Changed files only</a> package to replace the files which failed to patch, please note that you will need to manually re-add any Modifications (MODs) to these particular files. Alternatively if you know how you can examine the .rej files to determine what failed where and make manual adjustments to the relevant source.</p>
|
||||
|
||||
@@ -431,7 +431,7 @@
|
||||
|
||||
<div class="content">
|
||||
|
||||
<p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-license.php">GPL</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
|
||||
<p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-2.0.php">GNU General Public License v2</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
@@ -54,7 +54,7 @@
|
||||
<li><a href="#install">Installing phpBB3</a></li>
|
||||
<li><a href="#run">Running phpBB3</a>
|
||||
<ol style="list-style-type: lower-roman;">
|
||||
<li><a href="#i18n">Internationalisation (i18n)</a></li>
|
||||
<li><a href="#i18n">Languages (Internationalisation - i18n)</a></li>
|
||||
<li><a href="#styles">Styles</a></li>
|
||||
<li><a href="#mods">Modifications</a></li>
|
||||
</ol>
|
||||
@@ -62,8 +62,9 @@
|
||||
<li><a href="#help">Getting help with phpBB3</a>
|
||||
<ol style="list-style-type: lower-roman;">
|
||||
<li><a href="#docs">Documentation</a></li>
|
||||
<li><a href="#kb">Knowledge Base</a></li>
|
||||
<li><a href="#website">Community Forums</a></li>
|
||||
<li><a href="#irc">Internet Relay Chat</a></li>
|
||||
<li><a href="#irc">Internet Relay Chat (IRC)</a></li>
|
||||
</ol>
|
||||
</li>
|
||||
<li><a href="#status">Status of this version</a></li>
|
||||
@@ -106,6 +107,7 @@
|
||||
|
||||
<ul>
|
||||
<li>Updates from phpBB3 RC1 to the latest version</li>
|
||||
<li>Note: if using the <em>Automatic Update Package</em>, updates are supported from phpBB 3.0.2 onward. To update a pre-3.0.2 installation, first update to 3.0.2 and then update to the current version.</li>
|
||||
<li>Conversions from phpBB 2.0.x to the latest version</li>
|
||||
<li>New installations of phpBB3 - always only the latest released version</li>
|
||||
</ul>
|
||||
@@ -126,41 +128,41 @@
|
||||
|
||||
<div class="content">
|
||||
|
||||
<p>Once installed phpBB is easily managed by both admin and moderator control panels. If you need help or advice with phpBB please see <a href="#help">Section 3</a> below.</p>
|
||||
<p>Once installed, phpBB is easily managed via the Administration and Moderator Control Panels. If you need help or advice with phpBB, please see <a href="#help">Section 3</a> below.</p>
|
||||
|
||||
<a name="i18n"></a><h3>2.i. Internationalisation (i18n)</h3>
|
||||
<a name="i18n"></a><h3>2.i. Languages (Internationalisation - i18n)</h3>
|
||||
|
||||
<p>A number of language packs and style localisations are available. You can find them on our official download page:</p>
|
||||
<p>A number of language packs with included style localisations are available. You can find them listed in the <a href="http://www.phpbb.com/languages/">Language Packs</a> pages of our downloads section or from the <a href="http://www.phpbb.com/customise/db/language_packs-25/">Language Packs</a> section of the <a href="http://www.phpbb.com/customise/db/">Customisation Database</a>.</p>
|
||||
|
||||
<p><a href="http://www.phpbb.com/downloads/">http://www.phpbb.com/downloads/</a></p>
|
||||
<p>For more information about language packs, please see: <a href="http://www.phpbb.com/languages/">http://www.phpbb.com/languages/</a></p>
|
||||
|
||||
<p>This is the <em>official</em> location for all supported language sets. If you download a package from a 3rd party site you do so with the understanding that we cannot offer support. So please, do not ask for help in these cases!</p>
|
||||
|
||||
<p>Installation of these packages is straightforward, simply download the required language pack and unarchive it into the <samp>languages/</samp> folder. Please ensure you retain the directory structure when doing this! Once uploaded go to the <code>Admin->System->Language Packs</code> and install the now appeared new language pack. To install the style imageset you should download the imageset for your language and unarchive the file/s into the relevant imageset directory (styles/prosilver/imageset or styles/subsilver2/imageset), again you must retain the directory structure. Once installed the imageset will become immediately available.</p>
|
||||
<p>Installation of these packages is straightforward: simply download the required language pack, uncompress (unzip) it and via FTP transfer the included <code>language</code> and <code>styles</code> folders to the root of your board installation. The language can then be installed via the Administration Control Panel of your board: <code>System tab -> General Tasks -> Language packs</code>. A more detailed description of the process is in the Knowledge Base article, <a href="http://www.phpbb.com/kb/article/how-to-install-a-language-pack/">How to Install a Language Pack</a>.</p>
|
||||
|
||||
<p>If your language is not available please visit our forums where you will find a topic listing translations currently available or in preparation. This topic also gives you information should you wish to volunteer to translate a language not currently listed.</p>
|
||||
<p>If your language is not available, please visit our <a href="http://www.phpbb.com/community/viewforum.php?f=66">[3.0.x] Translations</a> forum where you will find topics on translations in progress. Should you wish to volunteer to translate a language not currently available or assist in maintaining an existing language pack, you can <a href="http://www.phpbb.com/languages/apply.php">Apply to become a translator</a>.</p>
|
||||
|
||||
<a name="styles"></a><h3>2.ii. Styles</h3>
|
||||
|
||||
<p>Although phpBB Group are rather proud of the included styles we realise that it may not be to everyones tastes. Therefore phpBB3 allows styles to be switched with relative ease. Firstly you need to locate and download a style you like. We maintain such a site at</p>
|
||||
<p>Although the phpBB Group is rather proud of the included styles, we realise that they may not be to everyone's taste. Therefore, phpBB3 allows styles to be switched with relative ease. First, you need to locate and download a style you like. You can find them listed in the <a href="http://www.phpbb.com/customise/db/styles-2/">Styles</a> section of our <a href="http://www.phpbb.com/customise/db/">Customisation Database</a>.</p>
|
||||
|
||||
<p><a href="http://www.phpbb.com/styles/">http://www.phpbb.com/styles/</a></p>
|
||||
<p>For more information about styles, please see: <a href="http://www.phpbb.com/styles/">http://www.phpbb.com/styles/</a></p>
|
||||
|
||||
<p><strong>Please note</strong> that 3rd party styles downloaded for versions of phpBB2 will <strong>not</strong> work in phpBB3.</p>
|
||||
<p><strong>Please note</strong> that 3rd party styles downloaded for versions of phpBB2 will <strong>not</strong> work in phpBB3. It is also important to ensure that the style is updated to match the current version of the phpBB software you are using.</p>
|
||||
|
||||
<p>Once you have downloaded a style the usual next step is to unarchive (or upload the unarchived contents of) the package into your <samp>styles/</samp> directory. You then need to visit <code>Administration -> Styles</code>, you should see the new style available, click install and it will become available for all your users.</p>
|
||||
<p>Once you have downloaded a style, the usual next step is to unarchive (or upload the unarchived contents of) the package into your <code>styles/</code> directory. You then need to visit <code>Administration Control Panel -> Styles tab</code> where you should see the new style available. Click "Install" to install the style.</p>
|
||||
|
||||
<p><strong>Please note</strong> that if you create your own style or modify existing ones, please remember to enable the "Recompile stale style components" setting within the <code>Admin->General->Load Settings</code> screen. This setting allows the cache to detect changes made to the style and automatically refresh it. If this setting is disabled, you will not see your changes taking effect.</p>
|
||||
<p><strong>Please note</strong> that to improve efficiency, the software caches certain data. For this reason, if you create your own style or modify existing ones, please remember to "Refresh" the appropriate style components <code>Administration Control Panel -> Styles tab -> Style Components</code> screen. You may also need to reload the page you have changed in your web browser to overcome browser caching. If the changed components are not refreshed you will not see your changes taking effect.</p>
|
||||
|
||||
<a name="mods"></a><h3>2.iii. Modifications</h3>
|
||||
|
||||
<p>Although not officially supported by phpBB Group, phpBB has a thriving modification scene. These third party modifications to the standard phpBB extend its capabilities still further and can be found at:</p>
|
||||
<p>Although not officially supported by the phpBB Group, phpBB has a thriving modification scene. These third party modifications to the standard phpBB software, known as <strong>MODs</strong>, extend its capabilities still further. You can browse through many of the MODs in the <a href="http://www.phpbb.com/customise/db/modifications-1/">Modifications</a> section of our <a href="http://www.phpbb.com/customise/db/">Customisation Database</a>.</p>
|
||||
|
||||
<p><a href="http://www.phpbb.com/mods/">http://www.phpbb.com/mods/</a></p>
|
||||
<p>For more information about MODs, please see: <a href="http://www.phpbb.com/mods/">http://www.phpbb.com/mods/</a></p>
|
||||
|
||||
<p><strong>Please remember</strong> that any bugs or other issues that occur after you have added any modification should <strong>NOT</strong> be reported to the bug tracker (see below). First remove the modification and see if the problem is resolved.</p>
|
||||
<p><strong>Please remember</strong> that any bugs or other issues that occur after you have added any modification should <strong>NOT</strong> be reported to the bug tracker (see below). First remove the MOD and see if the problem is resolved. Any support for a MOD should only be sought in the "Discussion/Support" forum for that MOD.</p>
|
||||
|
||||
<p>Also remember that any modifications which modify the database in any way may render upgrading your forum to future versions more difficult unless we state otherwise. With all this said many users have and continue to utilise many of the mods already available with great success.</p>
|
||||
<p>Also remember that any modifications, particularly those which modify the database in any way, may render upgrading your forum to future versions more difficult. With all this said, many users have and continue to utilise many of the MODs already available with great success.</p>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -188,17 +190,25 @@
|
||||
|
||||
<p>This covers everything from installation through setting permissions and managing users.</p>
|
||||
|
||||
<a name="website"></a><h3>3.ii. Community Forums</h3>
|
||||
<a name="kb"></a><h3>3.ii. Knowledge Base</h3>
|
||||
|
||||
<p>phpBB Group maintains a thriving community where a number of people have generously decided to donate their time to help support users. This site can be found at:</p>
|
||||
<p>The Knowledge Base consists of a number of detailed articles on some common issues phpBB users may encounter while using the product. The Knowledge Base can be found at:</p>
|
||||
|
||||
<p><a href="http://www.phpbb.com/">http://www.phpbb.com/</a></p>
|
||||
<p><a href="http://www.phpbb.com/kb/">http://www.phpbb.com/kb/</a></p>
|
||||
|
||||
<a name="website"></a><h3>3.iii. Community Forums</h3>
|
||||
|
||||
<p>The phpBB Group maintains a thriving community where a number of people have generously decided to donate their time to help support users. This site can be found at:</p>
|
||||
|
||||
<p><a href="http://www.phpbb.com/community/">http://www.phpbb.com/community/</a></p>
|
||||
|
||||
<p>If you do seek help via our forums please be sure to do a Search before posting. This may well save both you and us time and allow the developer, moderator and support groups to spend more time responding to people with unknown issues and problems. Please also remember that phpBB is an entirely volunteer effort, no one receives any compensation for the time they give, this includes moderators as well as developers. So please be respectful and mindful when awaiting responses.</p>
|
||||
|
||||
<a name="irc"></a><h3>3.iii Internet Relay Chat</h3>
|
||||
<a name="irc"></a><h3>3.iv Internet Relay Chat</h3>
|
||||
|
||||
<p>Another place you may find help is our IRC channel. This operates on the Freenode IRC network, <em>irc.freenode.net</em> and the channel is <em>#phpbb</em> and can be accessed by any good IRC client such as mIRC, XChat, etc. Again, please do not abuse this service and be respectful of other users.</p>
|
||||
<p>Another place you may find help is our IRC channel. This operates on the Freenode IRC network, <a href="irc://irc.freenode.net">irc.freenode.net</a> and the channel is <em>#phpbb</em> and can be accessed by any decent IRC client such as mIRC, XChat, etc. Again, please do not abuse this service and be respectful of other users.</p>
|
||||
|
||||
<p>There are other IRC channels available, please see <a href="http://www.phpbb.com/support/irc/">http://www.phpbb.com/support/irc/</a> for the complete list.</p>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -216,13 +226,13 @@
|
||||
|
||||
<div class="content">
|
||||
|
||||
<p>This is the third stable release of phpBB. The 3.0.x line is essentially feature frozen, with only point releases seeing fixes for bugs and security issues, though feature alterations and minor feature additions may be done if deemed absolutely required. Our next major release will be phpBB 3.2 and the planning phase has begun (the unstable development version is 3.1). Please do not post questions asking when 3.2 will be available, no release date has been set.</p>
|
||||
<p>This is the third stable release of phpBB. The 3.0.x line is essentially feature frozen, with only point releases seeing fixes for bugs and security issues, though feature alterations and minor feature additions may be done if deemed absolutely required. Our next major release will be phpBB 3.1. Please do not post questions asking when 3.1 will be available, no release date has been set.</p>
|
||||
|
||||
<p>For those interested in the development of phpBB should keep an eye on the community forums to see how things are progressing:</p>
|
||||
<p>Those interested in the development of phpBB should keep an eye on the development forums to see how things are progressing:</p>
|
||||
|
||||
<p><a href="http://area51.phpbb.com/phpBB/">http://area51.phpbb.com/phpBB/</a></p>
|
||||
|
||||
<p>Please note that this forum should <strong>NOT</strong> be used to obtain support for or ask questions about phpBB 2.0.x or phpBB 3.0.x, the main community forums are the place for this. Any such posts will be locked and go unanswered.</p>
|
||||
<p>Please note that the development forums should <strong>NOT</strong> be used to seek support for or ask questions about phpBB 2.0.x or phpBB 3.0.x, the main community forums are the place for this. Any such posts will be locked and go unanswered.</p>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -240,20 +250,20 @@
|
||||
|
||||
<div class="content">
|
||||
|
||||
<p>The phpBB Group uses a bug tracking system to store, list and manage all reported bugs, it can be found at the location listed below. Please <strong>DO NOT</strong> post bug reports to our forums, they will be locked. In addition please <strong>DO NOT</strong> use the bug tracker for support requests. Posting such a request will only see you directed to the support forums (while taking time away from working on real bugs).</p>
|
||||
<p>The phpBB Group uses a bug tracking system to store, list and manage all reported bugs, it can be found at the location listed below. Please <strong>DO NOT</strong> post bug reports to our forums. In addition please <strong>DO NOT</strong> use the bug tracker for support requests. Posting such a request will only see you directed to the support forums (while taking time away from working on real bugs).</p>
|
||||
|
||||
<p><a href="http://tracker.phpbb.com/">http://tracker.phpbb.com/</a></p>
|
||||
<p><a href="http://tracker.phpbb.com/browse/PHPBB3">http://tracker.phpbb.com/browse/PHPBB3</a></p>
|
||||
|
||||
<p>While we very much appreciate receiving bug reports (the more reports the more stable phpBB will be) we ask you carry out a few steps before adding new entries:</p>
|
||||
|
||||
<ul>
|
||||
<li>Firstly determine if your bug is reproduceable, how to determine this depends on the bug in question. Only if the bug is reproduceable it is likely to be a problem with phpBB3 (or in some way connected). If something cannot be reproduced it may turn out to have been your hosting provider working on something, a user doing something silly, etc. Bug reports for non-reproduceable events can slow down our attempts to fix real, reproduceable issues<br /><br /></li>
|
||||
<li>Next please read or search through the existing bug reports to see if <em>your</em> bug (or one very similar to it) is already listed. If it is please add to that existing bug rather than creating a new duplicate entry (all this does is slow us down).<br /><br /></li>
|
||||
<li>Check the forums (use search!) to see if people have discussed anything that sounds similar to what you are seeing. However, as noted above please <strong>DO NOT</strong> post your particular bug to the forum unless it's non-reproduceable or you are sure it's related to something you have done rather phpBB3<br /><br /></li>
|
||||
<li>First, determine if your bug is reproduceable; how to determine this depends on the bug in question. Only if the bug is reproduceable is it likely to be a problem with phpBB3 (or in some way connected). If something cannot be reproduced it may turn out to have been your hosting provider working on something, a user doing something silly, etc. Bug reports for non-reproduceable events can slow down our attempts to fix real, reproduceable issues<br /><br /></li>
|
||||
<li>Next, please read or search through the existing bug reports to see if <em>your</em> bug (or one very similar to it) is already listed. If it is please add to that existing bug rather than creating a new duplicate entry (all this does is slow us down).<br /><br /></li>
|
||||
<li>Check the forums (use search!) to see if people have discussed anything that sounds similar to what you are seeing. However, as noted above please <strong>DO NOT</strong> post your particular bug to the forum unless it's non-reproduceable or you are sure it’s related to something you have done rather than phpBB3<br /><br /></li>
|
||||
<li>If no existing bug exists then please feel free to add it</li>
|
||||
</ul>
|
||||
|
||||
<p>If you do post a new bug (i.e. one that isn't already listed in the bug tracker) firstly make sure you have logged in (your username and password are the same as for the community forums) then please include the following details:</p>
|
||||
<p>If you do post a new bug (i.e. one that isn't already listed in the bug tracker) first make sure that you have logged in (your username and password are the same as for the community forums) then please include the following details:</p>
|
||||
|
||||
<ul>
|
||||
<li>Your server type/version, e.g. Apache 1.3.28, IIS 4, Sambar, etc.</li>
|
||||
@@ -261,9 +271,11 @@
|
||||
<li>DB type/version, e.g. MySQL 4.0.1, PostgreSQL 7.3.2, MSSQL Server 2000 SP1, etc.</li>
|
||||
</ul>
|
||||
|
||||
<p>The relevant database type/version is listed within the administration control panel</p>
|
||||
<p>The relevant database type/version is listed within the administration control panel.</p>
|
||||
|
||||
<p>Please also be as detailed as you can in your report, if possible list the steps required to duplicate the problem. If you have a fix which you are <strong>VERY SURE</strong> works (and is consistent with our <a href="coding-guidelines.html">coding guidelines</a>) and does not introduce further problems or incompatibilities please let us know. However only include it in the bug report if you really must, if we need it we'll ask you for it.</p>
|
||||
<p>Please also be as detailed as you can in your report, if possible list the steps required to duplicate the problem. If you have a patch that fixes the issue, please attach it to the ticket or submit a pull request <a href="https://github.com/phpbb/phpbb3">on GitHub</a>.</p>
|
||||
|
||||
<p>If you create a patch, it is very much appreciated (but not required) if you follow the phpBB coding guidelines. Please note that the coding guidelines are somewhat different between different versions of phpBB. For phpBB 3.0.x the coding guidelines may be found here: <a href="http://area51.phpbb.com/docs/30x/coding-guidelines.html">http://area51.phpbb.com/docs/30x/coding-guidelines.html</a></p>
|
||||
|
||||
<p>Once a bug has been submitted you will be emailed any follow up comments added to it. <strong>Please</strong> if you are requested to supply additional information, do so! It is frustrating for us to receive bug reports, ask for additional information but get nothing. In these cases we have a policy of closing the bug, which may leave a very real problem in place. Obviously we would rather not have this situation arise.</p>
|
||||
|
||||
@@ -289,7 +301,7 @@
|
||||
|
||||
<div class="content">
|
||||
|
||||
<p>This list is not complete but does represent those bugs which may effect users on a wider scale. Other bugs listed in the tracker have typically been shown to be limited to certain setups or methods of installation, updating and/or conversions.</p>
|
||||
<p>This list is not complete but does represent those bugs which may affect users on a wider scale. Other bugs listed in the tracker have typically been shown to be limited to certain setups or methods of installation, updating and/or conversions.</p>
|
||||
|
||||
<ul>
|
||||
<li>Conversions may fail to complete on large boards under some hosts</li>
|
||||
@@ -317,7 +329,7 @@
|
||||
|
||||
<p>Please remember that running any application on a developmental version of PHP can lead to strange/unexpected results which may appear to be bugs in the application (which may not be true). Therefore we recommend you upgrade to the newest stable version of PHP before running phpBB3. If you are running a developmental version of PHP please check any bugs you find on a system running a stable release before submitting.</p>
|
||||
|
||||
<p>This board has been developed and tested under Linux and Windows (amongst others) running Apache using MySQL 3.23, 4.x, 5.x, MSSQL Server 2000, PostgreSQL 7.x, Oracle 8, SQLite and Firebird. Versions of PHP used range from 4.3.3 to 6.0.0-dev without problem. </p>
|
||||
<p>This board has been developed and tested under Linux and Windows (amongst others) running Apache using MySQL 3.23, 4.x, 5.x, MSSQL Server 2000, PostgreSQL 7.x, Oracle 8, SQLite 2 and Firebird. Versions of PHP used range from 4.3.3 to 5.4.x without problem. </p>
|
||||
|
||||
<a name="phpsec"></a><h3>7.i. Notice on PHP security issues</h3>
|
||||
|
||||
@@ -339,7 +351,7 @@
|
||||
|
||||
<div class="content">
|
||||
|
||||
<p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-license.php">GPL</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
|
||||
<p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-2.0.php">GNU General Public License v2</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright © <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
@@ -275,7 +275,7 @@ $auth_admin = new auth_admin();
|
||||
|
||||
<div class="content">
|
||||
|
||||
<p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-license.php">GPL</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
|
||||
<p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-2.0.php">GNU General Public License v2</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
@@ -87,12 +87,6 @@
|
||||
<li><a href="#writingstyle">Writing Style</a></li>
|
||||
</ol>
|
||||
</li>
|
||||
<li><a href="#vcs">VCS Guidelines</a>
|
||||
<ol style="list-style-type: lower-roman;">
|
||||
<li><a href="#repostruct">Repository structure</a></li>
|
||||
<li><a href="#commitmessage">Commit Messages and Repository Rules</a></li>
|
||||
</ol>
|
||||
</li>
|
||||
<li><a href="#disclaimer">Copyright and disclaimer</a></li>
|
||||
</ol>
|
||||
|
||||
@@ -135,9 +129,8 @@
|
||||
/**
|
||||
*
|
||||
* @package {PACKAGENAME}
|
||||
* @version $Id: $
|
||||
* @copyright (c) 2007 phpBB Group
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
</pre></div>
|
||||
@@ -468,12 +461,12 @@ do_stuff($str);
|
||||
$post_url = $phpbb_root_path . 'posting.' . $phpEx . '?mode=' . $mode . '&amp;start=' . $start;
|
||||
</pre></div>
|
||||
|
||||
<p class="good">// Double quotes are sometimes needed to not overcroud the line with concentinations</p>
|
||||
<p class="good">// Double quotes are sometimes needed to not overcrowd the line with concatenations.</p>
|
||||
<div class="codebox"><pre>
|
||||
$post_url = "{$phpbb_root_path}posting.$phpEx?mode=$mode&amp;start=$start";
|
||||
</pre></div>
|
||||
|
||||
<p>In SQL Statements mixing single and double quotes is partly allowed (following the guidelines listed here about SQL Formatting), else it should be tryed to only use one method - mostly single quotes.</p>
|
||||
<p>In SQL statements mixing single and double quotes is partly allowed (following the guidelines listed here about SQL formatting), else one should try to only use one method - mostly single quotes.</p>
|
||||
|
||||
<h4>Associative array keys:</h4>
|
||||
<p>In PHP, it's legal to use a literal string as a key to an associative array without quoting that string. We don't want to do this -- the string should always be quoted to avoid confusion. Note that this is only when we're using a literal, not when we're using a variable, examples:</p>
|
||||
@@ -502,7 +495,7 @@ $foo = $assoc_array[$var];
|
||||
<p>Each complex function should be preceded by a comment that tells a programmer everything they need to know to use that function. The meaning of every parameter, the expected input, and the output are required as a minimal comment. The function's behaviour in error conditions (and what those error conditions are) should also be present - but mostly included within the comment about the output.<br /><br />Especially important to document are any assumptions the code makes, or preconditions for its proper operation. Any one of the developers should be able to look at any part of the application and figure out what's going on in a reasonable amount of time.<br /><br />Avoid using <code>/* */</code> comment blocks for one-line comments, <code>//</code> should be used for one/two-liners.</p>
|
||||
|
||||
<h4>Magic numbers:</h4>
|
||||
<p>Don't use them. Use named constants for any literal value other than obvious special cases. Basically, it's ok to check if an array has 0 elements by using the literal 0. It's not ok to assign some special meaning to a number and then use it everywhere as a literal. This hurts readability AND maintainability. The constants <code>true</code> and <code>false</code> should be used in place of the literals 1 and 0 -- even though they have the same values (but not type!), it's more obvious what the actual logic is when you use the named constants. Typecast variables where it is needed, do not rely on the correct variable type (PHP is currently very loose on typecasting which can lead to security problems if a developer does not have a very close eye to it).</p>
|
||||
<p>Don't use them. Use named constants for any literal value other than obvious special cases. Basically, it's ok to check if an array has 0 elements by using the literal 0. It's not ok to assign some special meaning to a number and then use it everywhere as a literal. This hurts readability AND maintainability. The constants <code>true</code> and <code>false</code> should be used in place of the literals 1 and 0 -- even though they have the same values (but not type!), it's more obvious what the actual logic is when you use the named constants. Typecast variables where it is needed, do not rely on the correct variable type (PHP is currently very loose on typecasting which can lead to security problems if a developer does not keep a very close eye on it).</p>
|
||||
|
||||
<h4>Shortcut operators:</h4>
|
||||
<p>The only shortcut operators that cause readability problems are the shortcut increment <code>$i++</code> and decrement <code>$j--</code> operators. These operators should not be used as part of an expression. They can, however, be used on their own line. Using them in expressions is just not worth the headaches when debugging, examples:</p>
|
||||
@@ -671,7 +664,7 @@ $sql = 'SELECT *
|
||||
</pre></div>
|
||||
|
||||
<h4>SQL Quotes: </h4>
|
||||
<p>Double quotes where applicable (The variables in these examples are typecasted to integers before) ... examples: </p>
|
||||
<p>Use double quotes where applicable. (The variables in these examples are typecasted to integers beforehand.) Examples: </p>
|
||||
|
||||
<p class="bad">// These are wrong.</p>
|
||||
<div class="codebox"><pre>
|
||||
@@ -832,7 +825,7 @@ SELECT FROM phpbb_forums WHERE forum_id <strong><></strong> 1
|
||||
|
||||
<h4>sql_build_query():</h4>
|
||||
|
||||
<p>The <code>$db->sql_build_query()</code> function is responsible for building sql statements for select and select distinct queries if you need to JOIN on more than one table or retrieving data from more than one table while doing a JOIN. This needs to be used to make sure the resulting statement is working on all supported db's. Instead of explaining every possible combination, i will give a short example:</p>
|
||||
<p>The <code>$db->sql_build_query()</code> function is responsible for building sql statements for SELECT and SELECT DISTINCT queries if you need to JOIN on more than one table or retrieve data from more than one table while doing a JOIN. This needs to be used to make sure the resulting statement is working on all supported db's. Instead of explaining every possible combination, I will give a short example:</p>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
$sql_array = array(
|
||||
@@ -917,7 +910,7 @@ for ($i = 0, $size = sizeof($post_data); $i < $size; $i++)
|
||||
</pre></div>
|
||||
|
||||
<h4>Use of in_array(): </h4>
|
||||
<p>Try to avoid using in_array() on huge arrays, and try to not place them into loops if the array to check consist of more than 20 entries. in_array() can be very time consuming and uses a lot of cpu processing time. For little checks it is not noticable, but if checked against a huge array within a loop those checks alone can be a bunch of seconds. If you need this functionality, try using isset() on the arrays keys instead, actually shifting the values into keys and vice versa. A call to <code>isset($array[$var])</code> is a lot faster than <code>in_array($var, array_keys($array))</code> for example.</p>
|
||||
<p>Try to avoid using in_array() on huge arrays, and try to not place them into loops if the array to check consist of more than 20 entries. in_array() can be very time consuming and uses a lot of cpu processing time. For little checks it is not noticeable, but if checked against a huge array within a loop those checks alone can take several seconds. If you need this functionality, try using isset() on the arrays keys instead, actually shifting the values into keys and vice versa. A call to <code>isset($array[$var])</code> is a lot faster than <code>in_array($var, array_keys($array))</code> for example.</p>
|
||||
|
||||
|
||||
<a name="general"></a><h3>2.v. General Guidelines</h3>
|
||||
@@ -930,7 +923,7 @@ for ($i = 0, $size = sizeof($post_data); $i < $size; $i++)
|
||||
<p>No attempt should be made to remove any copyright information (either contained within the source or displayed interactively when the source is run/compiled), neither should the copyright information be altered in any way (it may be added to).</p>
|
||||
|
||||
<h4>Variables: </h4>
|
||||
<p>Make use of the <code>request_var()</code> function for anything except for submit or single checking params. </p>
|
||||
<p>Make use of the <code>request_var()</code> function for anything except for submit or single checking params.</p>
|
||||
<p>The request_var function determines the type to set from the second parameter (which determines the default value too). If you need to get a scalar variable type, you need to tell this the request_var function explicitly. Examples:</p>
|
||||
|
||||
<p class="bad">// Old method, do not use it</p>
|
||||
@@ -997,7 +990,7 @@ $user->setup();
|
||||
<p>The <code>$user->setup()</code> call can be used to pass on additional language definition and a custom style (used in viewforum).</p>
|
||||
|
||||
<h4>Errors and messages: </h4>
|
||||
<p>All messages/errors should be outputed by calling <code>trigger_error()</code> using the appropriate message type and language string. Example:</p>
|
||||
<p>All messages/errors should be outputted by calling <code>trigger_error()</code> using the appropriate message type and language string. Example:</p>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
trigger_error('NO_FORUM');
|
||||
@@ -1015,7 +1008,7 @@ trigger_error('NO_MODE', E_USER_ERROR);
|
||||
|
||||
<p>All urls pointing to internal files need to be prepended by the <code>$phpbb_root_path</code> variable. Within the administration control panel all urls pointing to internal files need to be prepended by the <code>$phpbb_admin_path</code> variable. This makes sure the path is always correct and users being able to just rename the admin folder and the acp still working as intended (though some links will fail and the code need to be slightly adjusted).</p>
|
||||
|
||||
<p>The <code>append_sid()</code> function from 2.0.x is available too, though does not handle url alterations automatically. Please have a look at the code documentation if you want to get more details on how to use append_sid(). A sample call to append_sid() can look like this:</p>
|
||||
<p>The <code>append_sid()</code> function from 2.0.x is available too, though it does not handle url alterations automatically. Please have a look at the code documentation if you want to get more details on how to use append_sid(). A sample call to append_sid() can look like this:</p>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;g=' . $row['group_id'])
|
||||
@@ -1023,7 +1016,7 @@ append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;
|
||||
|
||||
<h4>General function usage: </h4>
|
||||
|
||||
<p>Some of these functions are only chosen over others because of personal preference and having no other benefit than to be consistent over the code.</p>
|
||||
<p>Some of these functions are only chosen over others because of personal preference and have no benefit other than maintaining consistency throughout the code.</p>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
@@ -1073,7 +1066,7 @@ append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;
|
||||
required_imageset = prosilver
|
||||
</pre></div>
|
||||
<a name="genstyling"></a><h3>3.2. General Styling Rules</h3>
|
||||
<p>Templates should be produced in a consistent manner. Where appropriate they should be based off an existing copy, e.g. index, viewforum or viewtopic (the combination of which implement a range of conditional and variable forms). Please also note that the intendation and coding guidelines also apply to templates where possible.</p>
|
||||
<p>Templates should be produced in a consistent manner. Where appropriate they should be based off an existing copy, e.g. index, viewforum or viewtopic (the combination of which implement a range of conditional and variable forms). Please also note that the indentation and coding guidelines also apply to templates where possible.</p>
|
||||
|
||||
<p>The outer table class <code>forumline</code> has gone and is replaced with <code>tablebg</code>.</p>
|
||||
<p>When writing <code><table></code> the order <code><table class="" cellspacing="" cellpadding="" border="" align=""></code> creates consistency and allows everyone to easily see which table produces which "look". The same applies to most other tags for which additional parameters can be set, consistency is the major aim here.</p>
|
||||
@@ -1093,7 +1086,7 @@ append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;
|
||||
|
||||
<p>Row colours/classes are now defined by the template, use an <code>IF S_ROW_COUNT</code> switch, see viewtopic or viewforum for an example.</p>
|
||||
|
||||
<p>Remember block level ordering is important ... while not all pages validate as XHTML 1.0 Strict compliant it is something we're trying to work too.</p>
|
||||
<p>Remember block level ordering is important ... while not all pages validate as XHTML 1.0 Strict compliant it is something we're trying to work on.</p>
|
||||
|
||||
<p>Use a standard cellpadding of 2 and cellspacing of 0 on outer tables. Inner tables can vary from 0 to 3 or even 4 depending on the need.</p>
|
||||
|
||||
@@ -1142,12 +1135,12 @@ append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;
|
||||
<a name="templates"></a><h3>4.i. General Templating</h3>
|
||||
|
||||
<h4>File naming</h4>
|
||||
<p>Firstly templates now take the suffix ".html" rather than ".tpl". This was done simply to make the lifes of some people easier wrt syntax highlighting, etc.</p>
|
||||
<p>Firstly templates now take the suffix ".html" rather than ".tpl". This was done simply to make the lives of some people easier wrt syntax highlighting, etc.</p>
|
||||
|
||||
<h4>Variables</h4>
|
||||
<p>All template variables should be named appropriately (using underscores for spaces), language entries should be prefixed with L_, system data with S_, urls with U_, javascript urls with UA_, language to be put in javascript statements with LA_, all other variables should be presented 'as is'.</p>
|
||||
|
||||
<p>L_* template variables are automatically tried to be mapped to the corresponding language entry if the code does not set (and therefore overwrite) this variable specifically. For example <code>{L_USERNAME}</code> maps to <code>$user->lang['USERNAME']</code>. The LA_* template variables are handled within the same way, but properly escaped to be put in javascript code. This should reduce the need to assign loads of new lang vars in Modifications.
|
||||
<p>L_* template variables are automatically mapped to the corresponding language entry if the code does not set (and therefore overwrite) this variable specifically and if the language entry exists. For example <code>{L_USERNAME}</code> maps to <code>$user->lang['USERNAME']</code>. The LA_* template variables are handled within the same way, but properly escaped so they can be put in javascript code. This should reduce the need to assign loads of new language variables in MODifications.
|
||||
</p>
|
||||
|
||||
<h4>Blocks/Loops</h4>
|
||||
@@ -1430,9 +1423,9 @@ div
|
||||
<span class="comment"><!-- END l_block1 --></span>
|
||||
</pre></div>
|
||||
|
||||
<p>Here we open the loop l_block1 and doing some things if the value S_SELECTED within the current loop iteration is true, else we write the blocks link and title. Here, you see <code>{l_block1.L_TITLE}</code> referenced - you remember that L_* variables get automatically assigned the corresponding language entry? This is true, but not within loops. The L_TITLE variable within the loop l_block1 is assigned within the code itself.</p>
|
||||
<p>Here we open the loop l_block1 and do some things if the value S_SELECTED within the current loop iteration is true, else we write the blocks link and title. Here, you see <code>{l_block1.L_TITLE}</code> referenced - you remember that L_* variables get automatically assigned the corresponding language entry? This is true, but not within loops. The L_TITLE variable within the loop l_block1 is assigned within the code itself.</p>
|
||||
|
||||
<p>Let's have a closer look to the markup:</p>
|
||||
<p>Let's have a closer look at the markup:</p>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
<span class="comment"><!-- BEGIN l_block1 --></span>
|
||||
@@ -1526,7 +1519,7 @@ div
|
||||
</ul> <span class="comment"><!-- written on third iteration --></span>
|
||||
</pre></div>
|
||||
|
||||
<p>Just always remember that processing is taking place from up to down.</p>
|
||||
<p>Just always remember that processing is taking place from top to bottom.</p>
|
||||
|
||||
<h4>Forms</h4>
|
||||
<p>If a form is used for a non-trivial operation (i.e. more than a jumpbox), then it should include the <code>{S_FORM_TOKEN}</code> template variable.</p>
|
||||
@@ -1542,11 +1535,9 @@ div
|
||||
</pre></div><br />
|
||||
|
||||
<a name="inheritance"></a><h3>4.ii. Template Inheritance</h3>
|
||||
<p>When basing a new template on an existing one, it is not necessary to provide all template files. By declaring the template to be "<strong>inheriting</strong>" in the template configuration file.</p>
|
||||
<p>When basing a new style on an existing one, it is not necessary to provide all the template files. By declaring the base style name in the <strong>inherit_from</strong> field in the template configuration file, the style can be set to inherit template files from the base style. The limitation on this is that the base style has to be installed and complete, meaning that it is not itself inheriting.</p>
|
||||
|
||||
<p>The limitation on this is that the base style has to be installed and complete, meaning that it is not itself inheriting.</p>
|
||||
|
||||
<p>The effect of doing so is that the template engine will use the files in the new template where they exist, but fall back to files in the base template otherwise. Declaring a style to be inheriting also causes it to use some of the configuration settings of the base style, notably database storage.</p>
|
||||
<p>The effect of doing so is that the template engine will use the template files in the new style where they exist, but fall back to files in the base style otherwise. Declaring a style to inherit from another also causes it to use some of the configuration settings of the base style, notably database storage.</p>
|
||||
|
||||
<p>We strongly encourage the use of inheritance for styles based on the bundled styles, as it will ease the update procedure.</p>
|
||||
|
||||
@@ -1673,7 +1664,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
|
||||
|
||||
<h4>Encoding:</h4>
|
||||
|
||||
<p>With phpBB3, the output encoding for the forum in now UTF-8, a Universal Character Encoding by the Unicode Consortium that is by design a superset to US-ASCII and ISO-8859-1. By using one character set which simultaenously supports all scripts which previously would have required different encodings (eg: ISO-8859-1 to ISO-8859-15 (Latin, Greek, Cyrillic, Thai, Hebrew, Arabic); GB2312 (Simplified Chinese); Big5 (Traditional Chinese), EUC-JP (Japanese), EUC-KR (Korean), VISCII (Vietnamese); et cetera), this removes the need to convert between encodings and improves the accessibility of multilingual forums.</p>
|
||||
<p>With phpBB3, the output encoding for the forum in now UTF-8, a Universal Character Encoding by the Unicode Consortium that is by design a superset to US-ASCII and ISO-8859-1. By using one character set which simultaenously supports all scripts which previously would have required different encodings (eg: ISO-8859-1 to ISO-8859-15 (Latin, Greek, Cyrillic, Thai, Hebrew, Arabic); GB2312 (Simplified Chinese); Big5 (Traditional Chinese), EUC-JP (Japanese), EUC-KR (Korean), VISCII (Vietnamese); et cetera), we remove the need to convert between encodings and improves the accessibility of multilingual forums.</p>
|
||||
|
||||
<p>The impact is that the language files for phpBB must now also be encoded as UTF-8, with a caveat that the files must <strong>not contain</strong> a <acronym title="Byte-Order-Mark">BOM</acronym> for compatibility reasons with non-Unicode aware versions of PHP. For those with forums using the Latin character set (ie: most European languages), this change is transparent since UTF-8 is superset to US-ASCII and ISO-8859-1.</p>
|
||||
|
||||
@@ -2323,58 +2314,14 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
|
||||
|
||||
<hr />
|
||||
|
||||
<a name="vcs"></a><h2>7. VCS Guidelines</h2>
|
||||
<a name="disclaimer"></a><h2>8. Copyright and disclaimer</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
|
||||
<div class="content">
|
||||
|
||||
<p>The version control system for phpBB3 is git. The repository is available at <a href="http://github.com/phpbb/phpbb3" title="repository">http://github.com/phpbb/phpbb3</a>.</p>
|
||||
|
||||
<a name="repostruct"></a><h3>7.i. Repository Structure</h3>
|
||||
|
||||
<ul>
|
||||
<li><strong>develop</strong><br />The latest unstable development version with new features etc.</li>
|
||||
<li><strong>develop-*</strong><br />Development branches of stable phpBB releases. Branched off of <code>develop</code> at the time of feature freeze.
|
||||
<ul>
|
||||
<li><strong>phpBB3.0</strong><code>develop-olympus</code><br />Development branch of the stable 3.0 line. Bug fixes are applied here.</li>
|
||||
<li><strong>phpBB3.1</strong><code>develop-ascraeus</code><br />Development branch of the stable 3.1 line. Bug fixes are applied here.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><strong>master</strong><br />A branch containing all stable phpBB3 release points</li>
|
||||
<li><strong>tags</strong><br />Released versions. Stable ones get merged into the master branch.
|
||||
<ul>
|
||||
<li><code>release-3.Y-BX</code><br />Beta release X of the 3.Y line.</li>
|
||||
<li><code>release-3.Y-RCX</code><br />Release candidate X of the 3.Y line.</li>
|
||||
<li><code>release-3.Y.Z-RCX</code><br />Release candidate X of the stable 3.Y.Z release.</li>
|
||||
<li><code>release-3.0.X</code><br />Stable <strong>3.0.X</strong> release.</li>
|
||||
<li><code>release-2.0.X</code><br />Old stable 2.0.X release.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<a name="commitmessage"></a><h3>7.ii. Commit Messages and Repository Rules</h3>
|
||||
|
||||
<p>Information on repository rules, such as commit messages can be found at <a href="http://wiki.phpbb.com/display/DEV/Git" title="phpBB Git Information">http://wiki.phpbb.com/display/DEV/Git</a>.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<a name="disclaimer"></a><h2>9. Copyright and disclaimer</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
|
||||
<div class="content">
|
||||
|
||||
<p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-license.php">GPL</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
|
||||
<p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-2.0.php">GNU General Public License v2</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
@@ -867,7 +867,7 @@ function phpbb_hook_register(&$hook)
|
||||
|
||||
<div class="content">
|
||||
|
||||
<p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-license.php">GPL</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
|
||||
<p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-2.0.php">GNU General Public License v2</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
@@ -424,7 +424,7 @@ function send_file_to_browser($attachment, $upload_dir, $category)
|
||||
if (!@file_exists($filename))
|
||||
{
|
||||
send_status_line(404, 'Not Found');
|
||||
trigger_error($user->lang['ERROR_NO_ATTACHMENT'] . '<br /><br />' . sprintf($user->lang['FILE_NOT_FOUND_404'], $filename));
|
||||
trigger_error('ERROR_NO_ATTACHMENT');
|
||||
}
|
||||
|
||||
// Correct the mime type - we force application/octetstream for all files, except images
|
||||
|
@@ -173,6 +173,12 @@ if (defined('DEBUG_EXTRA') && request_var('explain', 0) && $auth->acl_get('a_'))
|
||||
header("Content-Type: application/atom+xml; charset=UTF-8");
|
||||
header("Last-Modified: " . gmdate('D, d M Y H:i:s', $feed_updated_time) . ' GMT');
|
||||
|
||||
if (!empty($user->data['is_bot']))
|
||||
{
|
||||
// Let reverse proxies know we detected a bot.
|
||||
header('X-PHPBB-IS-BOT: yes');
|
||||
}
|
||||
|
||||
echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n";
|
||||
echo '<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="' . $global_vars['FEED_LANG'] . '">' . "\n";
|
||||
echo '<link rel="self" type="application/atom+xml" href="' . $global_vars['SELF_LINK'] . '" />' . "\n\n";
|
||||
@@ -604,30 +610,9 @@ class phpbb_feed_base
|
||||
|
||||
function get_passworded_forums()
|
||||
{
|
||||
global $db, $user;
|
||||
global $user;
|
||||
|
||||
// Exclude passworded forums
|
||||
$sql = 'SELECT f.forum_id, fa.user_id
|
||||
FROM ' . FORUMS_TABLE . ' f
|
||||
LEFT JOIN ' . FORUMS_ACCESS_TABLE . " fa
|
||||
ON (fa.forum_id = f.forum_id
|
||||
AND fa.session_id = '" . $db->sql_escape($user->session_id) . "')
|
||||
WHERE f.forum_password <> ''";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$forum_ids = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$forum_id = (int) $row['forum_id'];
|
||||
|
||||
if ($row['user_id'] != $user->data['user_id'])
|
||||
{
|
||||
$forum_ids[$forum_id] = $forum_id;
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
return $forum_ids;
|
||||
return $user->get_passworded_forums();
|
||||
}
|
||||
|
||||
function get_item()
|
||||
|
@@ -175,12 +175,21 @@ class acp_ban
|
||||
}
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$banned_options = '';
|
||||
$banned_options = $excluded_options = array();
|
||||
$ban_length = $ban_reasons = $ban_give_reasons = array();
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$banned_options .= '<option' . (($row['ban_exclude']) ? ' class="sep"' : '') . ' value="' . $row['ban_id'] . '">' . $row[$field] . '</option>';
|
||||
$option = '<option value="' . $row['ban_id'] . '">' . $row[$field] . '</option>';
|
||||
|
||||
if ($row['ban_exclude'])
|
||||
{
|
||||
$excluded_options[] = $option;
|
||||
}
|
||||
else
|
||||
{
|
||||
$banned_options[] = $option;
|
||||
}
|
||||
|
||||
$time_length = ($row['ban_end']) ? ($row['ban_end'] - $row['ban_start']) / 60 : 0;
|
||||
|
||||
@@ -241,11 +250,26 @@ class acp_ban
|
||||
}
|
||||
}
|
||||
|
||||
$options = '';
|
||||
if ($excluded_options)
|
||||
{
|
||||
$options .= '<optgroup label="' . $user->lang['OPTIONS_EXCLUDED'] . '">';
|
||||
$options .= implode('', $excluded_options);
|
||||
$options .= '</optgroup>';
|
||||
}
|
||||
|
||||
if ($banned_options)
|
||||
{
|
||||
$options .= '<optgroup label="' . $user->lang['OPTIONS_BANNED'] . '">';
|
||||
$options .= implode('', $banned_options);
|
||||
$options .= '</optgroup>';
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_BAN_END_OPTIONS' => $ban_end_options,
|
||||
'S_BANNED_OPTIONS' => ($banned_options) ? true : false,
|
||||
'BANNED_OPTIONS' => $banned_options)
|
||||
);
|
||||
'S_BANNED_OPTIONS' => ($banned_options || $excluded_options) ? true : false,
|
||||
'BANNED_OPTIONS' => $options,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -188,7 +188,7 @@ class acp_board
|
||||
'hot_threshold' => array('lang' => 'HOT_THRESHOLD', 'validate' => 'int:0', 'type' => 'text:3:4', 'explain' => true),
|
||||
'max_poll_options' => array('lang' => 'MAX_POLL_OPTIONS', 'validate' => 'int:2:127', 'type' => 'text:4:4', 'explain' => false),
|
||||
'max_post_chars' => array('lang' => 'CHAR_LIMIT', 'validate' => 'int:0', 'type' => 'text:4:6', 'explain' => true),
|
||||
'min_post_chars' => array('lang' => 'MIN_CHAR_LIMIT', 'validate' => 'int:0', 'type' => 'text:4:6', 'explain' => true),
|
||||
'min_post_chars' => array('lang' => 'MIN_CHAR_LIMIT', 'validate' => 'int:1', 'type' => 'text:4:6', 'explain' => true),
|
||||
'max_post_smilies' => array('lang' => 'SMILIES_LIMIT', 'validate' => 'int:0', 'type' => 'text:4:4', 'explain' => true),
|
||||
'max_post_urls' => array('lang' => 'MAX_POST_URLS', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true),
|
||||
'max_post_font_size' => array('lang' => 'MAX_POST_FONT_SIZE', 'validate' => 'int:0', 'type' => 'text:5:4', 'explain' => true, 'append' => ' %'),
|
||||
@@ -234,7 +234,7 @@ class acp_board
|
||||
'max_name_chars' => array('lang' => 'USERNAME_LENGTH', 'validate' => 'int:8:180', 'type' => false, 'method' => false, 'explain' => false,),
|
||||
'max_pass_chars' => array('lang' => 'PASSWORD_LENGTH', 'validate' => 'int:8:255', 'type' => false, 'method' => false, 'explain' => false,),
|
||||
|
||||
'require_activation' => array('lang' => 'ACC_ACTIVATION', 'validate' => 'int', 'type' => 'custom', 'method' => 'select_acc_activation', 'explain' => true),
|
||||
'require_activation' => array('lang' => 'ACC_ACTIVATION', 'validate' => 'int', 'type' => 'select', 'method' => 'select_acc_activation', 'explain' => true),
|
||||
'new_member_post_limit' => array('lang' => 'NEW_MEMBER_POST_LIMIT', 'validate' => 'int:0:255', 'type' => 'text:4:4', 'explain' => true, 'append' => ' ' . $user->lang['POSTS']),
|
||||
'new_member_group_default'=> array('lang' => 'NEW_MEMBER_GROUP_DEFAULT', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'min_name_chars' => array('lang' => 'USERNAME_LENGTH', 'validate' => 'int:1', 'type' => 'custom:5:180', 'method' => 'username_length', 'explain' => true),
|
||||
@@ -383,6 +383,8 @@ class acp_board
|
||||
'referer_validation' => array('lang' => 'REFERER_VALID', 'validate' => 'int:0:3','type' => 'custom', 'method' => 'select_ref_check', 'explain' => true),
|
||||
'check_dnsbl' => array('lang' => 'CHECK_DNSBL', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'email_check_mx' => array('lang' => 'EMAIL_CHECK_MX', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'max_pass_chars' => array('lang' => 'PASSWORD_LENGTH', 'validate' => 'int:8:255', 'type' => false, 'method' => false, 'explain' => false,),
|
||||
'min_pass_chars' => array('lang' => 'PASSWORD_LENGTH', 'validate' => 'int:1', 'type' => 'custom', 'method' => 'password_length', 'explain' => true),
|
||||
'pass_complex' => array('lang' => 'PASSWORD_TYPE', 'validate' => 'string', 'type' => 'select', 'method' => 'select_password_chars', 'explain' => true),
|
||||
'chg_passforce' => array('lang' => 'FORCE_PASS_CHANGE', 'validate' => 'int:0', 'type' => 'text:3:3', 'explain' => true, 'append' => ' ' . $user->lang['DAYS']),
|
||||
'max_login_attempts' => array('lang' => 'MAX_LOGIN_ATTEMPTS', 'validate' => 'int:0', 'type' => 'text:3:3', 'explain' => true),
|
||||
@@ -768,24 +770,28 @@ class acp_board
|
||||
/**
|
||||
* Select account activation method
|
||||
*/
|
||||
function select_acc_activation($value, $key = '')
|
||||
function select_acc_activation($selected_value, $value)
|
||||
{
|
||||
global $user, $config;
|
||||
|
||||
$radio_ary = array(
|
||||
USER_ACTIVATION_DISABLE => 'ACC_DISABLE',
|
||||
USER_ACTIVATION_NONE => 'ACC_NONE',
|
||||
$act_ary = array(
|
||||
'ACC_DISABLE' => USER_ACTIVATION_DISABLE,
|
||||
'ACC_NONE' => USER_ACTIVATION_NONE,
|
||||
);
|
||||
|
||||
if ($config['email_enable'])
|
||||
{
|
||||
$radio_ary[USER_ACTIVATION_SELF] = 'ACC_USER';
|
||||
$radio_ary[USER_ACTIVATION_ADMIN] = 'ACC_ADMIN';
|
||||
$act_ary['ACC_USER'] = USER_ACTIVATION_SELF;
|
||||
$act_ary['ACC_ADMIN'] = USER_ACTIVATION_ADMIN;
|
||||
}
|
||||
$act_options = '';
|
||||
|
||||
foreach ($act_ary as $key => $value)
|
||||
{
|
||||
$selected = ($selected_value == $value) ? ' selected="selected"' : '';
|
||||
$act_options .= '<option value="' . $value . '"' . $selected . '>' . $user->lang[$key] . '</option>';
|
||||
}
|
||||
|
||||
$radio_text = h_radio('config[require_activation]', $radio_ary, $value, 'require_activation', $key, '<br />');
|
||||
|
||||
return $radio_text;
|
||||
return $act_options;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -96,7 +96,7 @@ class acp_captcha
|
||||
}
|
||||
else if ($submit)
|
||||
{
|
||||
trigger_error($user->lang['FORM_INVALID'] . adm_back_link(), E_USER_WARNING);
|
||||
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -21,6 +21,7 @@ if (!defined('IN_PHPBB'))
|
||||
*/
|
||||
class acp_database
|
||||
{
|
||||
var $db_tools;
|
||||
var $u_action;
|
||||
|
||||
function main($id, $mode)
|
||||
@@ -28,6 +29,12 @@ class acp_database
|
||||
global $cache, $db, $user, $auth, $template, $table_prefix;
|
||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||
|
||||
if (!class_exists('phpbb_db_tools'))
|
||||
{
|
||||
require($phpbb_root_path . 'includes/db/db_tools.' . $phpEx);
|
||||
}
|
||||
$this->db_tools = new phpbb_db_tools($db);
|
||||
|
||||
$user->add_lang('acp/database');
|
||||
|
||||
$this->tpl_name = 'acp_database';
|
||||
@@ -50,7 +57,7 @@ class acp_database
|
||||
{
|
||||
case 'download':
|
||||
$type = request_var('type', '');
|
||||
$table = request_var('table', array(''));
|
||||
$table = array_intersect($this->db_tools->sql_list_tables(), request_var('table', array('')));
|
||||
$format = request_var('method', '');
|
||||
$where = request_var('where', '');
|
||||
|
||||
@@ -173,8 +180,7 @@ class acp_database
|
||||
break;
|
||||
|
||||
default:
|
||||
include($phpbb_root_path . 'includes/functions_install.' . $phpEx);
|
||||
$tables = get_tables($db);
|
||||
$tables = $this->db_tools->sql_list_tables();
|
||||
asort($tables);
|
||||
foreach ($tables as $table_name)
|
||||
{
|
||||
@@ -221,6 +227,7 @@ class acp_database
|
||||
case 'submit':
|
||||
$delete = request_var('delete', '');
|
||||
$file = request_var('file', '');
|
||||
$download = request_var('download', '');
|
||||
|
||||
if (!preg_match('#^backup_\d{10,}_[a-z\d]{16}\.(sql(?:\.(?:gz|bz2))?)$#', $file, $matches))
|
||||
{
|
||||
@@ -247,10 +254,8 @@ class acp_database
|
||||
confirm_box(false, $user->lang['DELETE_SELECTED_BACKUP'], build_hidden_fields(array('delete' => $delete, 'file' => $file)));
|
||||
}
|
||||
}
|
||||
else
|
||||
else if ($download || confirm_box(true))
|
||||
{
|
||||
$download = request_var('download', '');
|
||||
|
||||
if ($download)
|
||||
{
|
||||
$name = $matches[0];
|
||||
@@ -411,6 +416,10 @@ class acp_database
|
||||
trigger_error($user->lang['RESTORE_SUCCESS'] . adm_back_link($this->u_action));
|
||||
break;
|
||||
}
|
||||
else if (!$download)
|
||||
{
|
||||
confirm_box(false, $user->lang['RESTORE_SELECTED_BACKUP'], build_hidden_fields(array('file' => $file)));
|
||||
}
|
||||
|
||||
default:
|
||||
$methods = array('sql');
|
||||
|
@@ -136,8 +136,9 @@ class acp_email
|
||||
|
||||
$i = $j = 0;
|
||||
|
||||
// Send with BCC, no more than 50 recipients for one mail (to not exceed the limit)
|
||||
$max_chunk_size = 50;
|
||||
// Send with BCC
|
||||
// Maximum number of bcc recipients
|
||||
$max_chunk_size = (int) $config['email_max_chunk_size'];
|
||||
$email_list = array();
|
||||
$old_lang = $row['user_lang'];
|
||||
$old_notify_type = $row['user_notify_type'];
|
||||
@@ -194,10 +195,7 @@ class acp_email
|
||||
|
||||
$messenger->template('admin_send_email', $used_lang);
|
||||
|
||||
$messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']);
|
||||
$messenger->headers('X-AntiAbuse: User_id - ' . $user->data['user_id']);
|
||||
$messenger->headers('X-AntiAbuse: Username - ' . $user->data['username']);
|
||||
$messenger->headers('X-AntiAbuse: User IP - ' . $user->ip);
|
||||
$messenger->anti_abuse_headers($config, $user);
|
||||
|
||||
$messenger->subject(htmlspecialchars_decode($subject));
|
||||
$messenger->set_mail_priority($priority);
|
||||
|
@@ -212,15 +212,11 @@ class acp_forums
|
||||
|
||||
$message = ($action == 'add') ? $user->lang['FORUM_CREATED'] : $user->lang['FORUM_UPDATED'];
|
||||
|
||||
// Redirect to permissions
|
||||
if ($auth->acl_get('a_fauth') && !$copied_permissions)
|
||||
{
|
||||
$message .= '<br /><br />' . sprintf($user->lang['REDIRECT_ACL'], '<a href="' . append_sid("{$phpbb_admin_path}index.$phpEx", 'i=permissions' . $acl_url) . '">', '</a>');
|
||||
}
|
||||
|
||||
// redirect directly to permission settings screen if authed
|
||||
if ($action == 'add' && !$copied_permissions && $auth->acl_get('a_fauth'))
|
||||
{
|
||||
$message .= '<br /><br />' . sprintf($user->lang['REDIRECT_ACL'], '<a href="' . append_sid("{$phpbb_admin_path}index.$phpEx", 'i=permissions' . $acl_url) . '">', '</a>');
|
||||
|
||||
meta_refresh(4, append_sid("{$phpbb_admin_path}index.$phpEx", 'i=permissions' . $acl_url));
|
||||
}
|
||||
|
||||
@@ -875,7 +871,7 @@ class acp_forums
|
||||
|
||||
$errors = array();
|
||||
|
||||
if (!$forum_data['forum_name'])
|
||||
if ($forum_data['forum_name'] == '')
|
||||
{
|
||||
$errors[] = $user->lang['FORUM_NAME_EMPTY'];
|
||||
}
|
||||
|
@@ -118,10 +118,7 @@ class acp_inactive
|
||||
|
||||
$messenger->to($row['user_email'], $row['username']);
|
||||
|
||||
$messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']);
|
||||
$messenger->headers('X-AntiAbuse: User_id - ' . $user->data['user_id']);
|
||||
$messenger->headers('X-AntiAbuse: Username - ' . $user->data['username']);
|
||||
$messenger->headers('X-AntiAbuse: User IP - ' . $user->ip);
|
||||
$messenger->anti_abuse_headers($config, $user);
|
||||
|
||||
$messenger->assign_vars(array(
|
||||
'USERNAME' => htmlspecialchars_decode($row['username']))
|
||||
@@ -209,10 +206,7 @@ class acp_inactive
|
||||
$messenger->to($row['user_email'], $row['username']);
|
||||
$messenger->im($row['user_jabber'], $row['username']);
|
||||
|
||||
$messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']);
|
||||
$messenger->headers('X-AntiAbuse: User_id - ' . $user->data['user_id']);
|
||||
$messenger->headers('X-AntiAbuse: Username - ' . $user->data['username']);
|
||||
$messenger->headers('X-AntiAbuse: User IP - ' . $user->ip);
|
||||
$messenger->anti_abuse_headers($config, $user);
|
||||
|
||||
$messenger->assign_vars(array(
|
||||
'USERNAME' => htmlspecialchars_decode($row['username']),
|
||||
@@ -301,7 +295,7 @@ class acp_inactive
|
||||
'PAGINATION' => generate_pagination($this->u_action . "&$u_sort_param&users_per_page=$per_page", $inactive_count, $per_page, $start, true),
|
||||
'USERS_PER_PAGE' => $per_page,
|
||||
|
||||
'U_ACTION' => $this->u_action . '&start=' . $start,
|
||||
'U_ACTION' => $this->u_action . "&$u_sort_param&users_per_page=$per_page&start=$start",
|
||||
));
|
||||
|
||||
$this->tpl_name = 'acp_inactive';
|
||||
|
@@ -919,6 +919,9 @@ class acp_language
|
||||
$default_lang_id = (int) $db->sql_fetchfield('lang_id');
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// We want to notify the admin that custom profile fields need to be updated for the new language.
|
||||
$notify_cpf_update = false;
|
||||
|
||||
// From the mysql documentation:
|
||||
// Prior to MySQL 4.0.14, the target table of the INSERT statement cannot appear in the FROM clause of the SELECT part of the query. This limitation is lifted in 4.0.14.
|
||||
// Due to this we stay on the safe side if we do the insertion "the manual way"
|
||||
@@ -932,6 +935,7 @@ class acp_language
|
||||
{
|
||||
$row['lang_id'] = $lang_id;
|
||||
$db->sql_query('INSERT INTO ' . PROFILE_LANG_TABLE . ' ' . $db->sql_build_array('INSERT', $row));
|
||||
$notify_cpf_update = true;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
@@ -944,12 +948,15 @@ class acp_language
|
||||
{
|
||||
$row['lang_id'] = $lang_id;
|
||||
$db->sql_query('INSERT INTO ' . PROFILE_FIELDS_LANG_TABLE . ' ' . $db->sql_build_array('INSERT', $row));
|
||||
$notify_cpf_update = true;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
add_log('admin', 'LOG_LANGUAGE_PACK_INSTALLED', $lang_pack['name']);
|
||||
|
||||
trigger_error(sprintf($user->lang['LANGUAGE_PACK_INSTALLED'], $lang_pack['name']) . adm_back_link($this->u_action));
|
||||
$message = sprintf($user->lang['LANGUAGE_PACK_INSTALLED'], $lang_pack['name']);
|
||||
$message .= ($notify_cpf_update) ? '<br /><br />' . $user->lang['LANGUAGE_PACK_CPF_UPDATE'] : '';
|
||||
trigger_error($message . adm_back_link($this->u_action));
|
||||
|
||||
break;
|
||||
|
||||
|
@@ -127,12 +127,12 @@ class acp_logs
|
||||
// Grab log data
|
||||
$log_data = array();
|
||||
$log_count = 0;
|
||||
view_log($mode, $log_data, $log_count, $config['topics_per_page'], $start, $forum_id, 0, 0, $sql_where, $sql_sort, $keywords);
|
||||
$start = view_log($mode, $log_data, $log_count, $config['topics_per_page'], $start, $forum_id, 0, 0, $sql_where, $sql_sort, $keywords);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'L_TITLE' => $l_title,
|
||||
'L_EXPLAIN' => $l_title_explain,
|
||||
'U_ACTION' => $this->u_action,
|
||||
'U_ACTION' => $this->u_action . "&$u_sort_param$keywords_param&start=$start",
|
||||
|
||||
'S_ON_PAGE' => on_page($log_count, $config['topics_per_page'], $start),
|
||||
'PAGINATION' => generate_pagination($this->u_action . "&$u_sort_param$keywords_param", $log_count, $config['topics_per_page'], $start, true),
|
||||
|
@@ -201,7 +201,7 @@ class acp_main
|
||||
// No maximum post id? :o
|
||||
if (!$max_post_id)
|
||||
{
|
||||
$sql = 'SELECT MAX(post_id)
|
||||
$sql = 'SELECT MAX(post_id) as max_post_id
|
||||
FROM ' . POSTS_TABLE;
|
||||
$result = $db->sql_query($sql);
|
||||
$max_post_id = (int) $db->sql_fetchfield('max_post_id');
|
||||
@@ -398,11 +398,11 @@ class acp_main
|
||||
// Version check
|
||||
$user->add_lang('install');
|
||||
|
||||
if ($auth->acl_get('a_server') && version_compare(PHP_VERSION, '5.2.0', '<'))
|
||||
if ($auth->acl_get('a_server') && version_compare(PHP_VERSION, '5.3.2', '<'))
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_PHP_VERSION_OLD' => true,
|
||||
'L_PHP_VERSION_OLD' => sprintf($user->lang['PHP_VERSION_OLD'], '<a href="http://www.phpbb.com/community/viewtopic.php?f=14&t=1958605">', '</a>'),
|
||||
'L_PHP_VERSION_OLD' => sprintf($user->lang['PHP_VERSION_OLD'], '<a href="http://www.phpbb.com/community/viewtopic.php?f=14&t=2152375">', '</a>'),
|
||||
));
|
||||
}
|
||||
|
||||
@@ -415,11 +415,8 @@ class acp_main
|
||||
{
|
||||
$latest_version_info = explode("\n", $latest_version_info);
|
||||
|
||||
$latest_version = str_replace('rc', 'RC', strtolower(trim($latest_version_info[0])));
|
||||
$current_version = str_replace('rc', 'RC', strtolower($config['version']));
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_VERSION_UP_TO_DATE' => version_compare($current_version, $latest_version, '<') ? false : true,
|
||||
'S_VERSION_UP_TO_DATE' => phpbb_version_compare(trim($latest_version_info[0]), $config['version'], '<='),
|
||||
));
|
||||
}
|
||||
|
||||
@@ -521,7 +518,7 @@ class acp_main
|
||||
'U_ADMIN_LOG' => append_sid("{$phpbb_admin_path}index.$phpEx", 'i=logs&mode=admin'),
|
||||
'U_INACTIVE_USERS' => append_sid("{$phpbb_admin_path}index.$phpEx", 'i=inactive&mode=list'),
|
||||
'U_VERSIONCHECK' => append_sid("{$phpbb_admin_path}index.$phpEx", 'i=update&mode=version_check'),
|
||||
'U_VERSIONCHECK_FORCE' => append_sid("{$phpbb_admin_path}index.$phpEx", 'i=1&versioncheck_force=1'),
|
||||
'U_VERSIONCHECK_FORCE' => append_sid("{$phpbb_admin_path}index.$phpEx", 'versioncheck_force=1'),
|
||||
|
||||
'S_ACTION_OPTIONS' => ($auth->acl_get('a_board')) ? true : false,
|
||||
'S_FOUNDER' => ($user->data['user_type'] == USER_FOUNDER) ? true : false,
|
||||
@@ -603,6 +600,17 @@ class acp_main
|
||||
$template->assign_var('S_WRITABLE_CONFIG', (bool) (@fileperms($phpbb_root_path . 'config.' . $phpEx) & 0x0002));
|
||||
}
|
||||
|
||||
if (extension_loaded('mbstring'))
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_MBSTRING_LOADED' => true,
|
||||
'S_MBSTRING_FUNC_OVERLOAD_FAIL' => (intval(@ini_get('mbstring.func_overload')) & (MB_OVERLOAD_MAIL | MB_OVERLOAD_STRING)),
|
||||
'S_MBSTRING_ENCODING_TRANSLATION_FAIL' => (@ini_get('mbstring.encoding_translation') != 0),
|
||||
'S_MBSTRING_HTTP_INPUT_FAIL' => (@ini_get('mbstring.http_input') != 'pass'),
|
||||
'S_MBSTRING_HTTP_OUTPUT_FAIL' => (@ini_get('mbstring.http_output') != 'pass'),
|
||||
));
|
||||
}
|
||||
|
||||
// Fill dbms version if not yet filled
|
||||
if (empty($config['dbms_version']))
|
||||
{
|
||||
|
@@ -67,6 +67,9 @@ class acp_php_info
|
||||
$output = preg_replace('#<img border="0"#i', '<img', $output);
|
||||
$output = str_replace(array('class="e"', 'class="v"', 'class="h"', '<hr />', '<font', '</font>'), array('class="row1"', 'class="row2"', '', '', '<span', '</span>'), $output);
|
||||
|
||||
// Fix invalid anchor names (eg "module_Zend Optimizer")
|
||||
$output = preg_replace_callback('#<a name="([^"]+)">#', array($this, 'remove_spaces'), $output);
|
||||
|
||||
if (empty($output))
|
||||
{
|
||||
trigger_error('NO_PHPINFO_AVAILABLE', E_USER_WARNING);
|
||||
@@ -79,6 +82,11 @@ class acp_php_info
|
||||
|
||||
$template->assign_var('PHPINFO', $output);
|
||||
}
|
||||
|
||||
function remove_spaces($matches)
|
||||
{
|
||||
return '<a name="' . str_replace(' ', '_', $matches[1]) . '">';
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
@@ -365,6 +365,7 @@ class acp_profile
|
||||
$field_row = array_merge($default_values[$field_type], array(
|
||||
'field_ident' => str_replace(' ', '_', utf8_clean_string(request_var('field_ident', '', true))),
|
||||
'field_required' => 0,
|
||||
'field_show_novalue'=> 0,
|
||||
'field_hide' => 0,
|
||||
'field_show_profile'=> 0,
|
||||
'field_no_view' => 0,
|
||||
@@ -380,7 +381,7 @@ class acp_profile
|
||||
|
||||
// $exclude contains the data we gather in each step
|
||||
$exclude = array(
|
||||
1 => array('field_ident', 'lang_name', 'lang_explain', 'field_option_none', 'field_show_on_reg', 'field_show_on_vt', 'field_required', 'field_hide', 'field_show_profile', 'field_no_view'),
|
||||
1 => array('field_ident', 'lang_name', 'lang_explain', 'field_option_none', 'field_show_on_reg', 'field_show_on_vt', 'field_required', 'field_show_novalue', 'field_hide', 'field_show_profile', 'field_no_view'),
|
||||
2 => array('field_length', 'field_maxlen', 'field_minlen', 'field_validation', 'field_novalue', 'field_default_value'),
|
||||
3 => array('l_lang_name', 'l_lang_explain', 'l_lang_default_value', 'l_lang_options')
|
||||
);
|
||||
@@ -405,6 +406,7 @@ class acp_profile
|
||||
// Visibility Options...
|
||||
$visibility_ary = array(
|
||||
'field_required',
|
||||
'field_show_novalue',
|
||||
'field_show_on_reg',
|
||||
'field_show_on_vt',
|
||||
'field_show_profile',
|
||||
@@ -504,11 +506,34 @@ class acp_profile
|
||||
}
|
||||
}
|
||||
}
|
||||
/* else if ($field_type == FIELD_BOOL && $key == 'field_default_value')
|
||||
else if ($field_type == FIELD_BOOL && $key == 'field_default_value')
|
||||
{
|
||||
// Get the number of options if this key is 'field_maxlen'
|
||||
$var = request_var('field_default_value', 0);
|
||||
}*/
|
||||
// 'field_length' == 1 defines radio buttons. Possible values are 1 or 2 only.
|
||||
// 'field_length' == 2 defines checkbox. Possible values are 0 or 1 only.
|
||||
// If we switch the type on step 2, we have to adjust field value.
|
||||
// 1 is a common value for the checkbox and radio buttons.
|
||||
|
||||
// Adjust unchecked checkbox value.
|
||||
// If we return or save settings from 2nd/3rd page
|
||||
// and the checkbox is unchecked, set the value to 0.
|
||||
if (isset($_REQUEST['step']) && !isset($_REQUEST[$key]))
|
||||
{
|
||||
$var = 0;
|
||||
}
|
||||
|
||||
// If we switch to the checkbox type but former radio buttons value was 2,
|
||||
// which is not the case for the checkbox, set it to 0 (unchecked).
|
||||
if ($cp->vars['field_length'] == 2 && $var == 2)
|
||||
{
|
||||
$var = 0;
|
||||
}
|
||||
// If we switch to the radio buttons but the former checkbox value was 0,
|
||||
// which is not the case for the radio buttons, set it to 0.
|
||||
else if ($cp->vars['field_length'] == 1 && $var == 0)
|
||||
{
|
||||
$var = 2;
|
||||
}
|
||||
}
|
||||
else if ($field_type == FIELD_INT && $key == 'field_default_value')
|
||||
{
|
||||
// Permit an empty string
|
||||
@@ -676,6 +701,10 @@ class acp_profile
|
||||
{
|
||||
$_new_key_ary[$key] = utf8_normalize_nfc(request_var($key, array(array('')), true));
|
||||
}
|
||||
else if ($field_type == FIELD_BOOL && $key == 'field_default_value')
|
||||
{
|
||||
$_new_key_ary[$key] = request_var($key, $cp->vars[$key]);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!isset($_REQUEST[$key]))
|
||||
@@ -730,6 +759,7 @@ class acp_profile
|
||||
$template->assign_vars(array(
|
||||
'S_STEP_ONE' => true,
|
||||
'S_FIELD_REQUIRED' => ($cp->vars['field_required']) ? true : false,
|
||||
'S_FIELD_SHOW_NOVALUE'=> ($cp->vars['field_show_novalue']) ? true : false,
|
||||
'S_SHOW_ON_REG' => ($cp->vars['field_show_on_reg']) ? true : false,
|
||||
'S_SHOW_ON_VT' => ($cp->vars['field_show_on_vt']) ? true : false,
|
||||
'S_FIELD_HIDE' => ($cp->vars['field_hide']) ? true : false,
|
||||
@@ -1046,6 +1076,7 @@ class acp_profile
|
||||
'field_default_value' => $cp->vars['field_default_value'],
|
||||
'field_validation' => $cp->vars['field_validation'],
|
||||
'field_required' => $cp->vars['field_required'],
|
||||
'field_show_novalue' => $cp->vars['field_show_novalue'],
|
||||
'field_show_on_reg' => $cp->vars['field_show_on_reg'],
|
||||
'field_show_on_vt' => $cp->vars['field_show_on_vt'],
|
||||
'field_hide' => $cp->vars['field_hide'],
|
||||
|
@@ -52,7 +52,7 @@ class acp_ranks
|
||||
}
|
||||
$rank_title = utf8_normalize_nfc(request_var('title', '', true));
|
||||
$special_rank = request_var('special_rank', 0);
|
||||
$min_posts = ($special_rank) ? 0 : request_var('min_posts', 0);
|
||||
$min_posts = ($special_rank) ? 0 : max(0, request_var('min_posts', 0));
|
||||
$rank_image = request_var('rank_image', '');
|
||||
|
||||
// The rank image has to be a jpg, gif or png
|
||||
@@ -199,7 +199,7 @@ class acp_ranks
|
||||
'RANK_TITLE' => (isset($ranks['rank_title'])) ? $ranks['rank_title'] : '',
|
||||
'S_FILENAME_LIST' => $filename_list,
|
||||
'RANK_IMAGE' => ($edit_img) ? $phpbb_root_path . $config['ranks_path'] . '/' . $edit_img : $phpbb_admin_path . 'images/spacer.gif',
|
||||
'S_SPECIAL_RANK' => (!isset($ranks['rank_special']) || $ranks['rank_special']) ? true : false,
|
||||
'S_SPECIAL_RANK' => (isset($ranks['rank_special']) && $ranks['rank_special']) ? true : false,
|
||||
'MIN_POSTS' => (isset($ranks['rank_min']) && !$ranks['rank_special']) ? $ranks['rank_min'] : 0)
|
||||
);
|
||||
|
||||
|
@@ -99,11 +99,11 @@ parse_css_file = {PARSE_CSS_FILE}
|
||||
$this->template_cfg .= '
|
||||
# Some configuration options
|
||||
|
||||
#
|
||||
# You can use this function to inherit templates from another template.
|
||||
# The template of the given name has to be installed.
|
||||
# Templates cannot inherit from inheriting templates.
|
||||
#';
|
||||
# Template inheritance
|
||||
# See http://blog.phpbb.com/2008/07/31/templating-just-got-easier/
|
||||
# Set value to empty or this template name to ignore template inheritance.
|
||||
inherit_from = {INHERIT_FROM}
|
||||
';
|
||||
|
||||
$this->imageset_keys = array(
|
||||
'logos' => array(
|
||||
@@ -510,6 +510,7 @@ parse_css_file = {PARSE_CSS_FILE}
|
||||
$db->sql_transaction('commit');
|
||||
|
||||
$cache->destroy('sql', STYLES_IMAGESET_DATA_TABLE);
|
||||
$cache->destroy('imageset_site_logo_md5');
|
||||
|
||||
add_log('admin', 'LOG_IMAGESET_REFRESHED', $imageset_row['imageset_name']);
|
||||
trigger_error($user->lang['IMAGESET_REFRESHED'] . adm_back_link($this->u_action));
|
||||
@@ -539,12 +540,14 @@ parse_css_file = {PARSE_CSS_FILE}
|
||||
global $user, $template, $db, $config, $phpbb_root_path, $phpEx;
|
||||
|
||||
$sql_from = '';
|
||||
$sql_sort = 'LOWER(' . $mode . '_name)';
|
||||
$style_count = array();
|
||||
|
||||
switch ($mode)
|
||||
{
|
||||
case 'style':
|
||||
$sql_from = STYLES_TABLE;
|
||||
$sql_sort = 'style_active DESC, ' . $sql_sort;
|
||||
|
||||
$sql = 'SELECT user_style, COUNT(user_style) AS style_count
|
||||
FROM ' . USERS_TABLE . '
|
||||
@@ -570,6 +573,9 @@ parse_css_file = {PARSE_CSS_FILE}
|
||||
case 'imageset':
|
||||
$sql_from = STYLES_IMAGESET_TABLE;
|
||||
break;
|
||||
|
||||
default:
|
||||
trigger_error($user->lang['NO_MODE'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
$l_prefix = strtoupper($mode);
|
||||
@@ -593,7 +599,8 @@ parse_css_file = {PARSE_CSS_FILE}
|
||||
);
|
||||
|
||||
$sql = "SELECT *
|
||||
FROM $sql_from";
|
||||
FROM $sql_from
|
||||
ORDER BY $sql_sort ASC";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$installed = array();
|
||||
@@ -629,6 +636,8 @@ parse_css_file = {PARSE_CSS_FILE}
|
||||
|
||||
'NAME' => $row[$mode . '_name'],
|
||||
'STYLE_COUNT' => ($mode == 'style' && isset($style_count[$row['style_id']])) ? $style_count[$row['style_id']] : 0,
|
||||
|
||||
'S_INACTIVE' => ($mode == 'style' && !$row['style_active']) ? true : false,
|
||||
)
|
||||
);
|
||||
}
|
||||
@@ -658,7 +667,9 @@ parse_css_file = {PARSE_CSS_FILE}
|
||||
|
||||
if ($name && !in_array($name, $installed))
|
||||
{
|
||||
$new_ary[] = array(
|
||||
// The array key is used for sorting later on.
|
||||
// $file is appended because $name doesn't have to be unique.
|
||||
$new_ary[$name . $file] = array(
|
||||
'path' => $file,
|
||||
'name' => $name,
|
||||
'copyright' => $items['copyright'],
|
||||
@@ -674,6 +685,8 @@ parse_css_file = {PARSE_CSS_FILE}
|
||||
|
||||
if (sizeof($new_ary))
|
||||
{
|
||||
ksort($new_ary);
|
||||
|
||||
foreach ($new_ary as $cfg)
|
||||
{
|
||||
$template->assign_block_vars('uninstalled', array(
|
||||
@@ -1633,6 +1646,13 @@ parse_css_file = {PARSE_CSS_FILE}
|
||||
trigger_error($user->lang['NO_' . $l_prefix] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
$s_only_component = $this->display_component_options($mode, $style_row[$mode . '_id'], $style_row);
|
||||
|
||||
if ($s_only_component)
|
||||
{
|
||||
trigger_error($user->lang['ONLY_' . $l_prefix] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
if ($update)
|
||||
{
|
||||
if ($mode == 'style')
|
||||
@@ -1677,8 +1697,6 @@ parse_css_file = {PARSE_CSS_FILE}
|
||||
trigger_error($user->lang[$message] . adm_back_link($this->u_action));
|
||||
}
|
||||
|
||||
$this->display_component_options($mode, $style_row[$mode . '_id'], $style_row);
|
||||
|
||||
$this->page_title = 'DELETE_' . $l_prefix;
|
||||
|
||||
$template->assign_vars(array(
|
||||
@@ -1764,11 +1782,14 @@ parse_css_file = {PARSE_CSS_FILE}
|
||||
|
||||
/**
|
||||
* Display the options which can be used to replace a style/template/theme/imageset
|
||||
*
|
||||
* @return boolean Returns true if the component is the only component and can not be deleted.
|
||||
*/
|
||||
function display_component_options($component, $component_id, $style_row = false, $style_id = false)
|
||||
{
|
||||
global $db, $template, $user;
|
||||
|
||||
$is_only_component = true;
|
||||
$component_in_use = array();
|
||||
if ($component != 'style')
|
||||
{
|
||||
@@ -1800,6 +1821,9 @@ parse_css_file = {PARSE_CSS_FILE}
|
||||
$s_options = '';
|
||||
if (($component != 'style') && empty($component_in_use))
|
||||
{
|
||||
// If it is not in use, there must be another component
|
||||
$is_only_component = false;
|
||||
|
||||
$sql = "SELECT {$component}_id, {$component}_name
|
||||
FROM $sql_from
|
||||
WHERE {$component}_id = {$component_id}";
|
||||
@@ -1823,6 +1847,7 @@ parse_css_file = {PARSE_CSS_FILE}
|
||||
{
|
||||
if ($row[$component . '_id'] != $component_id)
|
||||
{
|
||||
$is_only_component = false;
|
||||
$s_options .= '<option value="' . $row[$component . '_id'] . '">' . sprintf($user->lang['REPLACE_WITH_OPTION'], $row[$component . '_name']) . '</option>';
|
||||
}
|
||||
else if ($component != 'style')
|
||||
@@ -1850,6 +1875,8 @@ parse_css_file = {PARSE_CSS_FILE}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $is_only_component;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2024,9 +2051,7 @@ parse_css_file = {PARSE_CSS_FILE}
|
||||
// Export template core code
|
||||
if ($mode == 'template' || $inc_template)
|
||||
{
|
||||
$template_cfg = str_replace(array('{MODE}', '{NAME}', '{COPYRIGHT}', '{VERSION}'), array($mode, $style_row['template_name'], $style_row['template_copyright'], $config['version']), $this->template_cfg);
|
||||
|
||||
$use_template_name = '';
|
||||
$use_template_name = $style_row['template_name'];
|
||||
|
||||
// Add the inherit from variable, depending on it's use...
|
||||
if ($style_row['template_inherits_id'])
|
||||
@@ -2040,7 +2065,8 @@ parse_css_file = {PARSE_CSS_FILE}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
$template_cfg .= ($use_template_name) ? "\ninherit_from = $use_template_name" : "\n#inherit_from = ";
|
||||
$template_cfg = str_replace(array('{MODE}', '{NAME}', '{COPYRIGHT}', '{VERSION}', '{INHERIT_FROM}'), array($mode, $style_row['template_name'], $style_row['template_copyright'], $config['version'], $use_template_name), $this->template_cfg);
|
||||
|
||||
$template_cfg .= "\n\nbbcode_bitfield = {$style_row['bbcode_bitfield']}";
|
||||
|
||||
$data[] = array(
|
||||
|
@@ -37,7 +37,7 @@ class acp_update
|
||||
$errstr = '';
|
||||
$errno = 0;
|
||||
|
||||
$info = obtain_latest_version_info(request_var('versioncheck_force', false), true);
|
||||
$info = obtain_latest_version_info(request_var('versioncheck_force', false));
|
||||
|
||||
if ($info === false)
|
||||
{
|
||||
@@ -69,12 +69,9 @@ class acp_update
|
||||
|
||||
$current_version = (!empty($version_update_from)) ? $version_update_from : $config['version'];
|
||||
|
||||
$up_to_date_automatic = (version_compare(str_replace('rc', 'RC', strtolower($current_version)), str_replace('rc', 'RC', strtolower($latest_version)), '<')) ? false : true;
|
||||
$up_to_date = (version_compare(str_replace('rc', 'RC', strtolower($config['version'])), str_replace('rc', 'RC', strtolower($latest_version)), '<')) ? false : true;
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_UP_TO_DATE' => $up_to_date,
|
||||
'S_UP_TO_DATE_AUTO' => $up_to_date_automatic,
|
||||
'S_UP_TO_DATE' => phpbb_version_compare($latest_version, $config['version'], '<='),
|
||||
'S_UP_TO_DATE_AUTO' => phpbb_version_compare($latest_version, $current_version, '<='),
|
||||
'S_VERSION_CHECK' => true,
|
||||
'U_ACTION' => $this->u_action,
|
||||
'U_VERSIONCHECK_FORCE' => append_sid($this->u_action . '&versioncheck_force=1'),
|
||||
|
@@ -348,10 +348,7 @@ class acp_users
|
||||
|
||||
$messenger->to($user_row['user_email'], $user_row['username']);
|
||||
|
||||
$messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']);
|
||||
$messenger->headers('X-AntiAbuse: User_id - ' . $user->data['user_id']);
|
||||
$messenger->headers('X-AntiAbuse: Username - ' . $user->data['username']);
|
||||
$messenger->headers('X-AntiAbuse: User IP - ' . $user->ip);
|
||||
$messenger->anti_abuse_headers($config, $user);
|
||||
|
||||
$messenger->assign_vars(array(
|
||||
'WELCOME_MSG' => htmlspecialchars_decode(sprintf($user->lang['WELCOME_SUBJECT'], $config['sitename'])),
|
||||
@@ -406,10 +403,7 @@ class acp_users
|
||||
|
||||
$messenger->to($user_row['user_email'], $user_row['username']);
|
||||
|
||||
$messenger->headers('X-AntiAbuse: Board servername - ' . $config['server_name']);
|
||||
$messenger->headers('X-AntiAbuse: User_id - ' . $user->data['user_id']);
|
||||
$messenger->headers('X-AntiAbuse: Username - ' . $user->data['username']);
|
||||
$messenger->headers('X-AntiAbuse: User IP - ' . $user->ip);
|
||||
$messenger->anti_abuse_headers($config, $user);
|
||||
|
||||
$messenger->assign_vars(array(
|
||||
'USERNAME' => htmlspecialchars_decode($user_row['username']))
|
||||
@@ -818,7 +812,7 @@ class acp_users
|
||||
|
||||
// Which updates do we need to do?
|
||||
$update_username = ($user_row['username'] != $data['username']) ? $data['username'] : false;
|
||||
$update_password = ($data['new_password'] && !phpbb_check_hash($user_row['user_password'], $data['new_password'])) ? true : false;
|
||||
$update_password = ($data['new_password'] && !phpbb_check_hash($data['new_password'], $user_row['user_password'])) ? true : false;
|
||||
$update_email = ($data['email'] != $user_row['user_email']) ? $data['email'] : false;
|
||||
|
||||
if (!sizeof($error))
|
||||
@@ -1015,6 +1009,13 @@ class acp_users
|
||||
$user_row['posts_in_queue'] = (int) $db->sql_fetchfield('posts_in_queue');
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$sql = 'SELECT post_id
|
||||
FROM ' . POSTS_TABLE . '
|
||||
WHERE poster_id = '. $user_id;
|
||||
$result = $db->sql_query_limit($sql, 1);
|
||||
$user_row['user_has_posts'] = (bool) $db->sql_fetchfield('post_id');
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'L_NAME_CHARS_EXPLAIN' => sprintf($user->lang[$config['allow_name_chars'] . '_EXPLAIN'], $config['min_name_chars'], $config['max_name_chars']),
|
||||
'L_CHANGE_PASSWORD_EXPLAIN' => sprintf($user->lang[$config['pass_complex'] . '_EXPLAIN'], $config['min_pass_chars'], $config['max_pass_chars']),
|
||||
@@ -1042,6 +1043,7 @@ class acp_users
|
||||
'USER_EMAIL' => $user_row['user_email'],
|
||||
'USER_WARNINGS' => $user_row['user_warnings'],
|
||||
'USER_POSTS' => $user_row['user_posts'],
|
||||
'USER_HAS_POSTS' => $user_row['user_has_posts'],
|
||||
'USER_INACTIVE_REASON' => $inactive_reason,
|
||||
));
|
||||
|
||||
@@ -1124,7 +1126,7 @@ class acp_users
|
||||
// Grab log data
|
||||
$log_data = array();
|
||||
$log_count = 0;
|
||||
view_log('user', $log_data, $log_count, $config['topics_per_page'], $start, 0, 0, $user_id, $sql_where, $sql_sort);
|
||||
$start = view_log('user', $log_data, $log_count, $config['topics_per_page'], $start, 0, 0, $user_id, $sql_where, $sql_sort);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_FEEDBACK' => true,
|
||||
@@ -2345,47 +2347,62 @@ class acp_users
|
||||
}
|
||||
|
||||
/**
|
||||
* Optionset replacement for this module based on $user->optionset
|
||||
* Set option bit field for user options in a user row array.
|
||||
*
|
||||
* Optionset replacement for this module based on $user->optionset.
|
||||
*
|
||||
* @param array $user_row Row from the users table.
|
||||
* @param int $key Option key, as defined in $user->keyoptions property.
|
||||
* @param bool $value True to set the option, false to clear the option.
|
||||
* @param int $data Current bit field value, or false to use $user_row['user_options']
|
||||
* @return int|bool If $data is false, the bit field is modified and
|
||||
* written back to $user_row['user_options'], and
|
||||
* return value is true if the bit field changed and
|
||||
* false otherwise. If $data is not false, the new
|
||||
* bitfield value is returned.
|
||||
*/
|
||||
function optionset(&$user_row, $key, $value, $data = false)
|
||||
{
|
||||
global $user;
|
||||
|
||||
$var = ($data) ? $data : $user_row['user_options'];
|
||||
$var = ($data !== false) ? $data : $user_row['user_options'];
|
||||
|
||||
if ($value && !($var & 1 << $user->keyoptions[$key]))
|
||||
$new_var = phpbb_optionset($user->keyoptions[$key], $value, $var);
|
||||
|
||||
if ($data === false)
|
||||
{
|
||||
$var += 1 << $user->keyoptions[$key];
|
||||
}
|
||||
else if (!$value && ($var & 1 << $user->keyoptions[$key]))
|
||||
{
|
||||
$var -= 1 << $user->keyoptions[$key];
|
||||
if ($new_var != $var)
|
||||
{
|
||||
$user_row['user_options'] = $new_var;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return ($data) ? $var : false;
|
||||
}
|
||||
|
||||
if (!$data)
|
||||
{
|
||||
$user_row['user_options'] = $var;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return $var;
|
||||
return $new_var;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Optionget replacement for this module based on $user->optionget
|
||||
* Get option bit field from user options in a user row array.
|
||||
*
|
||||
* Optionget replacement for this module based on $user->optionget.
|
||||
*
|
||||
* @param array $user_row Row from the users table.
|
||||
* @param int $key option key, as defined in $user->keyoptions property.
|
||||
* @param int $data bit field value to use, or false to use $user_row['user_options']
|
||||
* @return bool true if the option is set in the bit field, false otherwise
|
||||
*/
|
||||
function optionget(&$user_row, $key, $data = false)
|
||||
{
|
||||
global $user;
|
||||
|
||||
$var = ($data) ? $data : $user_row['user_options'];
|
||||
return ($var & 1 << $user->keyoptions[$key]) ? true : false;
|
||||
$var = ($data !== false) ? $data : $user_row['user_options'];
|
||||
return phpbb_optionget($user->keyoptions[$key], $var);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -349,6 +349,14 @@ class auth
|
||||
|
||||
/**
|
||||
* Get permission listing based on user_id/options/forum_ids
|
||||
*
|
||||
* Be careful when using this function with permissions a_, m_, u_ and f_ !
|
||||
* It may not work correctly. When a user group grants an a_* permission,
|
||||
* e.g. a_foo, but the user's a_foo permission is set to "Never", then
|
||||
* the user does not in fact have the a_ permission.
|
||||
* But the user will still be listed as having the a_ permission.
|
||||
*
|
||||
* For more information see: http://tracker.phpbb.com/browse/PHPBB3-10252
|
||||
*/
|
||||
function acl_get_list($user_id = false, $opts = false, $forum_id = false)
|
||||
{
|
||||
|
@@ -72,7 +72,7 @@ function login_db($username, $password, $ip = '', $browser = '', $forwarded_for
|
||||
if (($ip && !$config['ip_login_limit_use_forwarded']) ||
|
||||
($forwarded_for && $config['ip_login_limit_use_forwarded']))
|
||||
{
|
||||
$sql = 'SELECT COUNT(attempt_id) AS attempts
|
||||
$sql = 'SELECT COUNT(*) AS attempts
|
||||
FROM ' . LOGIN_ATTEMPT_TABLE . '
|
||||
WHERE attempt_time > ' . (time() - (int) $config['ip_login_limit_time']);
|
||||
if ($config['ip_login_limit_use_forwarded'])
|
||||
@@ -107,6 +107,15 @@ function login_db($username, $password, $ip = '', $browser = '', $forwarded_for
|
||||
|
||||
if (!$row)
|
||||
{
|
||||
if ($config['ip_login_limit_max'] && $attempts >= $config['ip_login_limit_max'])
|
||||
{
|
||||
return array(
|
||||
'status' => LOGIN_ERROR_ATTEMPTS,
|
||||
'error_msg' => 'LOGIN_ERROR_ATTEMPTS',
|
||||
'user_row' => array('user_id' => ANONYMOUS),
|
||||
);
|
||||
}
|
||||
|
||||
return array(
|
||||
'status' => LOGIN_ERROR_USERNAME,
|
||||
'error_msg' => 'LOGIN_ERROR_USERNAME',
|
||||
@@ -154,7 +163,7 @@ function login_db($username, $password, $ip = '', $browser = '', $forwarded_for
|
||||
$password_old_format = (!STRIP) ? addslashes($password_old_format) : $password_old_format;
|
||||
$password_new_format = '';
|
||||
|
||||
set_var($password_new_format, stripslashes($password_old_format), 'string');
|
||||
set_var($password_new_format, stripslashes($password_old_format), 'string', true);
|
||||
|
||||
if ($password == $password_new_format)
|
||||
{
|
||||
@@ -264,4 +273,4 @@ function login_db($username, $password, $ip = '', $browser = '', $forwarded_for
|
||||
);
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
@@ -156,7 +156,11 @@ function login_ldap(&$username, &$password)
|
||||
{
|
||||
if (!@ldap_bind($ldap, htmlspecialchars_decode($config['ldap_user']), htmlspecialchars_decode($config['ldap_password'])))
|
||||
{
|
||||
return $user->lang['LDAP_NO_SERVER_CONNECTION'];
|
||||
return array(
|
||||
'status' => LOGIN_ERROR_EXTERNAL_AUTH,
|
||||
'error_msg' => 'LDAP_NO_SERVER_CONNECTION',
|
||||
'user_row' => array('user_id' => ANONYMOUS),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -584,6 +584,13 @@ class bbcode
|
||||
$code = str_replace("\t", ' ', $code);
|
||||
$code = str_replace(' ', ' ', $code);
|
||||
$code = str_replace(' ', ' ', $code);
|
||||
$code = str_replace("\n ", "\n ", $code);
|
||||
|
||||
// keep space at the beginning
|
||||
if (!empty($code) && $code[0] == ' ')
|
||||
{
|
||||
$code = ' ' . substr($code, 1);
|
||||
}
|
||||
|
||||
// remove newline at the beginning
|
||||
if (!empty($code) && $code[0] == "\n")
|
||||
|
@@ -25,7 +25,7 @@ if (!defined('IN_PHPBB'))
|
||||
*/
|
||||
|
||||
// phpBB Version
|
||||
define('PHPBB_VERSION', '3.0.9-RC2');
|
||||
define('PHPBB_VERSION', '3.0.11-RC2');
|
||||
|
||||
// QA-related
|
||||
// define('PHPBB_QA', 1);
|
||||
|
@@ -347,6 +347,66 @@ class phpbb_db_tools
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a list of tables in the database.
|
||||
*
|
||||
* @return array Array of table names (all lower case)
|
||||
*/
|
||||
function sql_list_tables()
|
||||
{
|
||||
switch ($this->db->sql_layer)
|
||||
{
|
||||
case 'mysql':
|
||||
case 'mysql4':
|
||||
case 'mysqli':
|
||||
$sql = 'SHOW TABLES';
|
||||
break;
|
||||
|
||||
case 'sqlite':
|
||||
$sql = 'SELECT name
|
||||
FROM sqlite_master
|
||||
WHERE type = "table"';
|
||||
break;
|
||||
|
||||
case 'mssql':
|
||||
case 'mssql_odbc':
|
||||
case 'mssqlnative':
|
||||
$sql = "SELECT name
|
||||
FROM sysobjects
|
||||
WHERE type='U'";
|
||||
break;
|
||||
|
||||
case 'postgres':
|
||||
$sql = 'SELECT relname
|
||||
FROM pg_stat_user_tables';
|
||||
break;
|
||||
|
||||
case 'firebird':
|
||||
$sql = 'SELECT rdb$relation_name
|
||||
FROM rdb$relations
|
||||
WHERE rdb$view_source is null
|
||||
AND rdb$system_flag = 0';
|
||||
break;
|
||||
|
||||
case 'oracle':
|
||||
$sql = 'SELECT table_name
|
||||
FROM USER_TABLES';
|
||||
break;
|
||||
}
|
||||
|
||||
$result = $this->db->sql_query($sql);
|
||||
|
||||
$tables = array();
|
||||
while ($row = $this->db->sql_fetchrow($result))
|
||||
{
|
||||
$name = current($row);
|
||||
$tables[$name] = $name;
|
||||
}
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
return $tables;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if table exists
|
||||
*
|
||||
@@ -649,6 +709,23 @@ class phpbb_db_tools
|
||||
$sqlite = true;
|
||||
}
|
||||
|
||||
// Drop tables?
|
||||
if (!empty($schema_changes['drop_tables']))
|
||||
{
|
||||
foreach ($schema_changes['drop_tables'] as $table)
|
||||
{
|
||||
// only drop table if it exists
|
||||
if ($this->sql_table_exists($table))
|
||||
{
|
||||
$result = $this->sql_table_drop($table);
|
||||
if ($this->return_statements)
|
||||
{
|
||||
$statements = array_merge($statements, $result);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Add tables?
|
||||
if (!empty($schema_changes['add_tables']))
|
||||
{
|
||||
@@ -994,34 +1071,21 @@ class phpbb_db_tools
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a specified column exist
|
||||
* Gets a list of columns of a table.
|
||||
*
|
||||
* @param string $table Table to check the column at
|
||||
* @param string $column_name The column to check
|
||||
* @param string $table Table name
|
||||
*
|
||||
* @return bool True if column exists, else false
|
||||
* @return array Array of column names (all lower case)
|
||||
*/
|
||||
function sql_column_exists($table, $column_name)
|
||||
function sql_list_columns($table)
|
||||
{
|
||||
$columns = array();
|
||||
|
||||
switch ($this->sql_layer)
|
||||
{
|
||||
case 'mysql_40':
|
||||
case 'mysql_41':
|
||||
|
||||
$sql = "SHOW COLUMNS FROM $table";
|
||||
$result = $this->db->sql_query($sql);
|
||||
|
||||
while ($row = $this->db->sql_fetchrow($result))
|
||||
{
|
||||
// lower case just in case
|
||||
if (strtolower($row['Field']) == $column_name)
|
||||
{
|
||||
$this->db->sql_freeresult($result);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
$this->db->sql_freeresult($result);
|
||||
return false;
|
||||
break;
|
||||
|
||||
// PostgreSQL has a way of doing this in a much simpler way but would
|
||||
@@ -1032,19 +1096,6 @@ class phpbb_db_tools
|
||||
WHERE c.relname = '{$table}'
|
||||
AND a.attnum > 0
|
||||
AND a.attrelid = c.oid";
|
||||
$result = $this->db->sql_query($sql);
|
||||
while ($row = $this->db->sql_fetchrow($result))
|
||||
{
|
||||
// lower case just in case
|
||||
if (strtolower($row['attname']) == $column_name)
|
||||
{
|
||||
$this->db->sql_freeresult($result);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
return false;
|
||||
break;
|
||||
|
||||
// same deal with PostgreSQL, we must perform more complex operations than
|
||||
@@ -1055,62 +1106,26 @@ class phpbb_db_tools
|
||||
FROM syscolumns c
|
||||
LEFT JOIN sysobjects o ON c.id = o.id
|
||||
WHERE o.name = '{$table}'";
|
||||
$result = $this->db->sql_query($sql);
|
||||
while ($row = $this->db->sql_fetchrow($result))
|
||||
{
|
||||
// lower case just in case
|
||||
if (strtolower($row['name']) == $column_name)
|
||||
{
|
||||
$this->db->sql_freeresult($result);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
$this->db->sql_freeresult($result);
|
||||
return false;
|
||||
break;
|
||||
|
||||
case 'oracle':
|
||||
$sql = "SELECT column_name
|
||||
FROM user_tab_columns
|
||||
WHERE LOWER(table_name) = '" . strtolower($table) . "'";
|
||||
$result = $this->db->sql_query($sql);
|
||||
while ($row = $this->db->sql_fetchrow($result))
|
||||
{
|
||||
// lower case just in case
|
||||
if (strtolower($row['column_name']) == $column_name)
|
||||
{
|
||||
$this->db->sql_freeresult($result);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
$this->db->sql_freeresult($result);
|
||||
return false;
|
||||
break;
|
||||
|
||||
case 'firebird':
|
||||
$sql = "SELECT RDB\$FIELD_NAME as FNAME
|
||||
FROM RDB\$RELATION_FIELDS
|
||||
WHERE RDB\$RELATION_NAME = '" . strtoupper($table) . "'";
|
||||
$result = $this->db->sql_query($sql);
|
||||
while ($row = $this->db->sql_fetchrow($result))
|
||||
{
|
||||
// lower case just in case
|
||||
if (strtolower($row['fname']) == $column_name)
|
||||
{
|
||||
$this->db->sql_freeresult($result);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
$this->db->sql_freeresult($result);
|
||||
return false;
|
||||
break;
|
||||
|
||||
// ugh, SQLite
|
||||
case 'sqlite':
|
||||
$sql = "SELECT sql
|
||||
FROM sqlite_master
|
||||
WHERE type = 'table'
|
||||
AND name = '{$table}'";
|
||||
|
||||
$result = $this->db->sql_query($sql);
|
||||
|
||||
if (!$result)
|
||||
@@ -1134,14 +1149,39 @@ class phpbb_db_tools
|
||||
continue;
|
||||
}
|
||||
|
||||
if (strtolower($entities[0]) == $column_name)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
$column = strtolower($entities[0]);
|
||||
$columns[$column] = $column;
|
||||
}
|
||||
return false;
|
||||
|
||||
return $columns;
|
||||
break;
|
||||
}
|
||||
|
||||
$result = $this->db->sql_query($sql);
|
||||
|
||||
while ($row = $this->db->sql_fetchrow($result))
|
||||
{
|
||||
$column = strtolower(current($row));
|
||||
$columns[$column] = $column;
|
||||
}
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
return $columns;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether a specified column exist in a table
|
||||
*
|
||||
* @param string $table Table to check
|
||||
* @param string $column_name Column to check
|
||||
*
|
||||
* @return bool True if column exists, false otherwise
|
||||
*/
|
||||
function sql_column_exists($table, $column_name)
|
||||
{
|
||||
$columns = $this->sql_list_columns($table);
|
||||
|
||||
return isset($columns[$column_name]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1788,7 +1828,7 @@ class phpbb_db_tools
|
||||
break;
|
||||
|
||||
case 'oracle':
|
||||
$statements[] = 'ALTER TABLE ' . $table_name . ' DROP ' . $column_name;
|
||||
$statements[] = 'ALTER TABLE ' . $table_name . ' DROP COLUMN ' . $column_name;
|
||||
break;
|
||||
|
||||
case 'postgres':
|
||||
@@ -1939,6 +1979,7 @@ class phpbb_db_tools
|
||||
$statements[] = "DROP SEQUENCE {$row['referenced_name']}";
|
||||
}
|
||||
$this->db->sql_freeresult($result);
|
||||
break;
|
||||
|
||||
case 'postgres':
|
||||
// PGSQL does not "tightly" bind sequences and tables, we must guess...
|
||||
@@ -2059,7 +2100,7 @@ class phpbb_db_tools
|
||||
$table_prefix = substr(CONFIG_TABLE, 0, -6); // strlen(config)
|
||||
if (strlen($table_name . $index_name) - strlen($table_prefix) > 24)
|
||||
{
|
||||
$max_length = $table_prefix + 24;
|
||||
$max_length = strlen($table_prefix) + 24;
|
||||
trigger_error("Index name '{$table_name}_$index_name' on table '$table_name' is too long. The maximum is $max_length characters.", E_USER_ERROR);
|
||||
}
|
||||
|
||||
@@ -2074,7 +2115,7 @@ class phpbb_db_tools
|
||||
|
||||
case 'mysql_40':
|
||||
case 'mysql_41':
|
||||
$statements[] = 'CREATE UNIQUE INDEX ' . $index_name . ' ON ' . $table_name . '(' . implode(', ', $column) . ')';
|
||||
$statements[] = 'ALTER TABLE ' . $table_name . ' ADD UNIQUE INDEX ' . $index_name . '(' . implode(', ', $column) . ')';
|
||||
break;
|
||||
|
||||
case 'mssql':
|
||||
@@ -2096,7 +2137,7 @@ class phpbb_db_tools
|
||||
$table_prefix = substr(CONFIG_TABLE, 0, -6); // strlen(config)
|
||||
if (strlen($table_name . $index_name) - strlen($table_prefix) > 24)
|
||||
{
|
||||
$max_length = $table_prefix + 24;
|
||||
$max_length = strlen($table_prefix) + 24;
|
||||
trigger_error("Index name '{$table_name}_$index_name' on table '$table_name' is too long. The maximum is $max_length characters.", E_USER_ERROR);
|
||||
}
|
||||
|
||||
@@ -2127,7 +2168,7 @@ class phpbb_db_tools
|
||||
}
|
||||
// no break
|
||||
case 'mysql_41':
|
||||
$statements[] = 'CREATE INDEX ' . $index_name . ' ON ' . $table_name . '(' . implode(', ', $column) . ')';
|
||||
$statements[] = 'ALTER TABLE ' . $table_name . ' ADD INDEX ' . $index_name . '(' . implode(', ', $column) . ')';
|
||||
break;
|
||||
|
||||
case 'mssql':
|
||||
|
@@ -194,6 +194,49 @@ class dbal
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Seek to given row number
|
||||
* rownum is zero-based
|
||||
*/
|
||||
function sql_rowseek($rownum, &$query_id)
|
||||
{
|
||||
global $cache;
|
||||
|
||||
if ($query_id === false)
|
||||
{
|
||||
$query_id = $this->query_result;
|
||||
}
|
||||
|
||||
if (isset($cache->sql_rowset[$query_id]))
|
||||
{
|
||||
return $cache->sql_rowseek($rownum, $query_id);
|
||||
}
|
||||
|
||||
if ($query_id === false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->sql_freeresult($query_id);
|
||||
$query_id = $this->sql_query($this->last_query_text);
|
||||
|
||||
if ($query_id === false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// We do not fetch the row for rownum == 0 because then the next resultset would be the second row
|
||||
for ($i = 0; $i < $rownum; $i++)
|
||||
{
|
||||
if (!$this->sql_fetchrow($query_id))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch field
|
||||
* if rownum is false, the current row is used, else it is pointing to the row (zero-based)
|
||||
@@ -457,6 +500,18 @@ class dbal
|
||||
return $column_name . ' | ' . (1 << $bit) . (($compare) ? ' ' . $compare : '');
|
||||
}
|
||||
|
||||
/**
|
||||
* Run LOWER() on DB column of type text (i.e. neither varchar nor char).
|
||||
*
|
||||
* @param string $column_name The column name to use
|
||||
*
|
||||
* @return string A SQL statement like "LOWER($column_name)"
|
||||
*/
|
||||
function sql_lower_text($column_name)
|
||||
{
|
||||
return "LOWER($column_name)";
|
||||
}
|
||||
|
||||
/**
|
||||
* Run more than one insert statement.
|
||||
*
|
||||
@@ -609,7 +664,7 @@ class dbal
|
||||
}
|
||||
}
|
||||
|
||||
$sql .= $this->_sql_custom_build('FROM', implode(', ', $table_array));
|
||||
$sql .= $this->_sql_custom_build('FROM', implode(' CROSS JOIN ', $table_array));
|
||||
|
||||
if (!empty($array['LEFT_JOIN']))
|
||||
{
|
||||
@@ -662,12 +717,7 @@ class dbal
|
||||
// The DEBUG_EXTRA constant is for development only!
|
||||
if ((isset($auth) && $auth->acl_get('a_')) || defined('IN_INSTALL') || defined('DEBUG_EXTRA'))
|
||||
{
|
||||
// Print out a nice backtrace...
|
||||
$backtrace = get_backtrace();
|
||||
|
||||
$message .= ($sql) ? '<br /><br />SQL<br /><br />' . htmlspecialchars($sql) : '';
|
||||
$message .= ($backtrace) ? '<br /><br />BACKTRACE<br />' . $backtrace : '';
|
||||
$message .= '<br />';
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -777,7 +827,7 @@ class dbal
|
||||
</div>
|
||||
</div>
|
||||
<div id="page-footer">
|
||||
Powered by <a href="http://www.phpbb.com/">phpBB</a> © phpBB Group
|
||||
Powered by <a href="http://www.phpbb.com/">phpBB</a>® Forum Software © phpBB Group
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
@@ -905,6 +955,41 @@ class dbal
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the estimated number of rows in a specified table.
|
||||
*
|
||||
* @param string $table_name Table name
|
||||
*
|
||||
* @return string Number of rows in $table_name.
|
||||
* Prefixed with ~ if estimated (otherwise exact).
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
function get_estimated_row_count($table_name)
|
||||
{
|
||||
return $this->get_row_count($table_name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the exact number of rows in a specified table.
|
||||
*
|
||||
* @param string $table_name Table name
|
||||
*
|
||||
* @return string Exact number of rows in $table_name.
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
function get_row_count($table_name)
|
||||
{
|
||||
$sql = 'SELECT COUNT(*) AS rows_total
|
||||
FROM ' . $this->sql_escape($table_name);
|
||||
$result = $this->sql_query($sql);
|
||||
$rows_total = $this->sql_fetchfield('rows_total');
|
||||
$this->sql_freeresult($result);
|
||||
|
||||
return $rows_total;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -359,49 +359,6 @@ class dbal_firebird extends dbal
|
||||
return (sizeof($row)) ? $row : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Seek to given row number
|
||||
* rownum is zero-based
|
||||
*/
|
||||
function sql_rowseek($rownum, &$query_id)
|
||||
{
|
||||
global $cache;
|
||||
|
||||
if ($query_id === false)
|
||||
{
|
||||
$query_id = $this->query_result;
|
||||
}
|
||||
|
||||
if (isset($cache->sql_rowset[$query_id]))
|
||||
{
|
||||
return $cache->sql_rowseek($rownum, $query_id);
|
||||
}
|
||||
|
||||
if ($query_id === false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$this->sql_freeresult($query_id);
|
||||
$query_id = $this->sql_query($this->last_query_text);
|
||||
|
||||
if ($query_id === false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// We do not fetch the row for rownum == 0 because then the next resultset would be the second row
|
||||
for ($i = 0; $i < $rownum; $i++)
|
||||
{
|
||||
if (!$this->sql_fetchrow($query_id))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get last inserted id after insert statement
|
||||
*/
|
||||
|
@@ -332,6 +332,14 @@ class dbal_mssql extends dbal
|
||||
return str_replace(array("'", "\0"), array("''", ''), $msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
function sql_lower_text($column_name)
|
||||
{
|
||||
return "LOWER(SUBSTRING($column_name, 1, DATALENGTH($column_name)))";
|
||||
}
|
||||
|
||||
/**
|
||||
* Build LIKE expression
|
||||
* @access private
|
||||
|
@@ -255,49 +255,6 @@ class dbal_mssql_odbc extends dbal
|
||||
return ($query_id !== false) ? @odbc_fetch_array($query_id) : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Seek to given row number
|
||||
* rownum is zero-based
|
||||
*/
|
||||
function sql_rowseek($rownum, &$query_id)
|
||||
{
|
||||
global $cache;
|
||||
|
||||
if ($query_id === false)
|
||||
{
|
||||
$query_id = $this->query_result;
|
||||
}
|
||||
|
||||
if (isset($cache->sql_rowset[$query_id]))
|
||||
{
|
||||
return $cache->sql_rowseek($rownum, $query_id);
|
||||
}
|
||||
|
||||
if ($query_id === false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->sql_freeresult($query_id);
|
||||
$query_id = $this->sql_query($this->last_query_text);
|
||||
|
||||
if ($query_id === false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// We do not fetch the row for rownum == 0 because then the next resultset would be the second row
|
||||
for ($i = 0; $i < $rownum; $i++)
|
||||
{
|
||||
if (!$this->sql_fetchrow($query_id))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get last inserted id after insert statement
|
||||
*/
|
||||
@@ -353,6 +310,14 @@ class dbal_mssql_odbc extends dbal
|
||||
return str_replace(array("'", "\0"), array("''", ''), $msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
function sql_lower_text($column_name)
|
||||
{
|
||||
return "LOWER(SUBSTRING($column_name, 1, DATALENGTH($column_name)))";
|
||||
}
|
||||
|
||||
/**
|
||||
* Build LIKE expression
|
||||
* @access private
|
||||
|
@@ -396,7 +396,7 @@ class dbal_mssqlnative extends dbal
|
||||
*/
|
||||
function sql_affectedrows()
|
||||
{
|
||||
return ($this->db_connect_id) ? @sqlsrv_rows_affected($this->db_connect_id) : false;
|
||||
return (!empty($this->query_result)) ? @sqlsrv_rows_affected($this->query_result) : false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -439,24 +439,6 @@ class dbal_mssqlnative extends dbal
|
||||
return $row;
|
||||
}
|
||||
|
||||
/**
|
||||
* Seek to given row number
|
||||
* rownum is zero-based
|
||||
*/
|
||||
function sql_rowseek($rownum, &$query_id)
|
||||
{
|
||||
global $cache;
|
||||
|
||||
if (isset($cache->sql_rowset[$query_id]))
|
||||
{
|
||||
return $cache->sql_rowseek($rownum, $query_id);
|
||||
}
|
||||
|
||||
$seek = new result_mssqlnative($query_id);
|
||||
$row = $seek->seek($rownum);
|
||||
return ($row = $seek->fetch()) ? $row : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get last inserted id after insert statement
|
||||
*/
|
||||
@@ -510,6 +492,14 @@ class dbal_mssqlnative extends dbal
|
||||
return str_replace(array("'", "\0"), array("''", ''), $msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
function sql_lower_text($column_name)
|
||||
{
|
||||
return "LOWER(SUBSTRING($column_name, 1, DATALENGTH($column_name)))";
|
||||
}
|
||||
|
||||
/**
|
||||
* Build LIKE expression
|
||||
* @access private
|
||||
|
@@ -318,6 +318,76 @@ class dbal_mysql extends dbal
|
||||
return @mysql_real_escape_string($msg, $this->db_connect_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the estimated number of rows in a specified table.
|
||||
*
|
||||
* @param string $table_name Table name
|
||||
*
|
||||
* @return string Number of rows in $table_name.
|
||||
* Prefixed with ~ if estimated (otherwise exact).
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
function get_estimated_row_count($table_name)
|
||||
{
|
||||
$table_status = $this->get_table_status($table_name);
|
||||
|
||||
if (isset($table_status['Engine']))
|
||||
{
|
||||
if ($table_status['Engine'] === 'MyISAM')
|
||||
{
|
||||
return $table_status['Rows'];
|
||||
}
|
||||
else if ($table_status['Engine'] === 'InnoDB' && $table_status['Rows'] > 100000)
|
||||
{
|
||||
return '~' . $table_status['Rows'];
|
||||
}
|
||||
}
|
||||
|
||||
return parent::get_row_count($table_name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the exact number of rows in a specified table.
|
||||
*
|
||||
* @param string $table_name Table name
|
||||
*
|
||||
* @return string Exact number of rows in $table_name.
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
function get_row_count($table_name)
|
||||
{
|
||||
$table_status = $this->get_table_status($table_name);
|
||||
|
||||
if (isset($table_status['Engine']) && $table_status['Engine'] === 'MyISAM')
|
||||
{
|
||||
return $table_status['Rows'];
|
||||
}
|
||||
|
||||
return parent::get_row_count($table_name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets some information about the specified table.
|
||||
*
|
||||
* @param string $table_name Table name
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @access protected
|
||||
*/
|
||||
function get_table_status($table_name)
|
||||
{
|
||||
$sql = "SHOW TABLE STATUS
|
||||
LIKE '" . $this->sql_escape($table_name) . "'";
|
||||
$result = $this->sql_query($sql);
|
||||
$table_status = $this->sql_fetchrow($result);
|
||||
$this->sql_freeresult($result);
|
||||
|
||||
return $table_status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build LIKE expression
|
||||
* @access private
|
||||
|
@@ -33,14 +33,33 @@ class dbal_mysqli extends dbal
|
||||
*/
|
||||
function sql_connect($sqlserver, $sqluser, $sqlpassword, $database, $port = false, $persistency = false , $new_link = false)
|
||||
{
|
||||
$this->persistency = $persistency;
|
||||
// Mysqli extension supports persistent connection since PHP 5.3.0
|
||||
$this->persistency = (version_compare(PHP_VERSION, '5.3.0', '>=')) ? $persistency : false;
|
||||
$this->user = $sqluser;
|
||||
$this->server = $sqlserver;
|
||||
|
||||
// If persistent connection, set dbhost to localhost when empty and prepend it with 'p:' prefix
|
||||
$this->server = ($this->persistency) ? 'p:' . (($sqlserver) ? $sqlserver : 'localhost') : $sqlserver;
|
||||
|
||||
$this->dbname = $database;
|
||||
$port = (!$port) ? NULL : $port;
|
||||
|
||||
// Persistant connections not supported by the mysqli extension?
|
||||
$this->db_connect_id = @mysqli_connect($this->server, $this->user, $sqlpassword, $this->dbname, $port);
|
||||
// If port is set and it is not numeric, most likely mysqli socket is set.
|
||||
// Try to map it to the $socket parameter.
|
||||
$socket = NULL;
|
||||
if ($port)
|
||||
{
|
||||
if (is_numeric($port))
|
||||
{
|
||||
$port = (int) $port;
|
||||
}
|
||||
else
|
||||
{
|
||||
$socket = $port;
|
||||
$port = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
$this->db_connect_id = @mysqli_connect($this->server, $this->user, $sqlpassword, $this->dbname, $port, $socket);
|
||||
|
||||
if ($this->db_connect_id && $this->dbname != '')
|
||||
{
|
||||
@@ -230,7 +249,13 @@ class dbal_mysqli extends dbal
|
||||
return $cache->sql_fetchrow($query_id);
|
||||
}
|
||||
|
||||
return ($query_id !== false) ? @mysqli_fetch_assoc($query_id) : false;
|
||||
if ($query_id !== false)
|
||||
{
|
||||
$result = @mysqli_fetch_assoc($query_id);
|
||||
return $result !== null ? $result : false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -290,6 +315,76 @@ class dbal_mysqli extends dbal
|
||||
return @mysqli_real_escape_string($this->db_connect_id, $msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the estimated number of rows in a specified table.
|
||||
*
|
||||
* @param string $table_name Table name
|
||||
*
|
||||
* @return string Number of rows in $table_name.
|
||||
* Prefixed with ~ if estimated (otherwise exact).
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
function get_estimated_row_count($table_name)
|
||||
{
|
||||
$table_status = $this->get_table_status($table_name);
|
||||
|
||||
if (isset($table_status['Engine']))
|
||||
{
|
||||
if ($table_status['Engine'] === 'MyISAM')
|
||||
{
|
||||
return $table_status['Rows'];
|
||||
}
|
||||
else if ($table_status['Engine'] === 'InnoDB' && $table_status['Rows'] > 100000)
|
||||
{
|
||||
return '~' . $table_status['Rows'];
|
||||
}
|
||||
}
|
||||
|
||||
return parent::get_row_count($table_name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the exact number of rows in a specified table.
|
||||
*
|
||||
* @param string $table_name Table name
|
||||
*
|
||||
* @return string Exact number of rows in $table_name.
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
function get_row_count($table_name)
|
||||
{
|
||||
$table_status = $this->get_table_status($table_name);
|
||||
|
||||
if (isset($table_status['Engine']) && $table_status['Engine'] === 'MyISAM')
|
||||
{
|
||||
return $table_status['Rows'];
|
||||
}
|
||||
|
||||
return parent::get_row_count($table_name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets some information about the specified table.
|
||||
*
|
||||
* @param string $table_name Table name
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @access protected
|
||||
*/
|
||||
function get_table_status($table_name)
|
||||
{
|
||||
$sql = "SHOW TABLE STATUS
|
||||
LIKE '" . $this->sql_escape($table_name) . "'";
|
||||
$result = $this->sql_query($sql);
|
||||
$table_status = $this->sql_fetchrow($result);
|
||||
$this->sql_freeresult($result);
|
||||
|
||||
return $table_status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build LIKE expression
|
||||
* @access private
|
||||
|
@@ -49,13 +49,15 @@ class phpbb_error_collector
|
||||
{
|
||||
$text .= "<br />\n";
|
||||
}
|
||||
|
||||
list($errno, $msg_text, $errfile, $errline) = $error;
|
||||
$text .= "Errno $errno: $msg_text";
|
||||
if (defined('DEBUG_EXTRA') || defined('IN_INSTALL'))
|
||||
{
|
||||
$text .= " at $errfile line $errline";
|
||||
}
|
||||
|
||||
// Prevent leakage of local path to phpBB install
|
||||
$errfile = phpbb_filter_root_path($errfile);
|
||||
|
||||
$text .= "Errno $errno: $msg_text at $errfile line $errline";
|
||||
}
|
||||
|
||||
return $text;
|
||||
}
|
||||
}
|
||||
|
@@ -265,6 +265,27 @@ function phpbb_mt_rand($min, $max)
|
||||
return ($min > $max) ? mt_rand($max, $min) : mt_rand($min, $max);
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrapper for getdate() which returns the equivalent array for UTC timestamps.
|
||||
*
|
||||
* @param int $time Unix timestamp (optional)
|
||||
*
|
||||
* @return array Returns an associative array of information related to the timestamp.
|
||||
* See http://www.php.net/manual/en/function.getdate.php
|
||||
*/
|
||||
function phpbb_gmgetdate($time = false)
|
||||
{
|
||||
if ($time === false)
|
||||
{
|
||||
$time = time();
|
||||
}
|
||||
|
||||
// getdate() interprets timestamps in local time.
|
||||
// What follows uses the fact that getdate() and
|
||||
// date('Z') balance each other out.
|
||||
return getdate($time - date('Z'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Return formatted string for filesizes
|
||||
*
|
||||
@@ -598,6 +619,34 @@ function phpbb_email_hash($email)
|
||||
return sprintf('%u', crc32(strtolower($email))) . strlen($email);
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrapper for version_compare() that allows using uppercase A and B
|
||||
* for alpha and beta releases.
|
||||
*
|
||||
* See http://www.php.net/manual/en/function.version-compare.php
|
||||
*
|
||||
* @param string $version1 First version number
|
||||
* @param string $version2 Second version number
|
||||
* @param string $operator Comparison operator (optional)
|
||||
*
|
||||
* @return mixed Boolean (true, false) if comparison operator is specified.
|
||||
* Integer (-1, 0, 1) otherwise.
|
||||
*/
|
||||
function phpbb_version_compare($version1, $version2, $operator = null)
|
||||
{
|
||||
$version1 = strtolower($version1);
|
||||
$version2 = strtolower($version2);
|
||||
|
||||
if (is_null($operator))
|
||||
{
|
||||
return version_compare($version1, $version2);
|
||||
}
|
||||
else
|
||||
{
|
||||
return version_compare($version1, $version2, $operator);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Global function for chmodding directories and files for internal use
|
||||
*
|
||||
@@ -1831,7 +1880,7 @@ function get_unread_topics($user_id = false, $sql_extra = '', $sql_sort = '', $s
|
||||
*/
|
||||
function update_forum_tracking_info($forum_id, $forum_last_post_time, $f_mark_time = false, $mark_time_forum = false)
|
||||
{
|
||||
global $db, $tracking_topics, $user, $config;
|
||||
global $db, $tracking_topics, $user, $config, $auth;
|
||||
|
||||
// Determine the users last forum mark time if not given.
|
||||
if ($mark_time_forum === false)
|
||||
@@ -1854,6 +1903,10 @@ function update_forum_tracking_info($forum_id, $forum_last_post_time, $f_mark_ti
|
||||
}
|
||||
}
|
||||
|
||||
// Handle update of unapproved topics info.
|
||||
// Only update for moderators having m_approve permission for the forum.
|
||||
$sql_update_unapproved = ($auth->acl_get('m_approve', $forum_id)) ? '': 'AND t.topic_approved = 1';
|
||||
|
||||
// Check the forum for any left unread topics.
|
||||
// If there are none, we mark the forum as read.
|
||||
if ($config['load_db_lastread'] && $user->data['is_registered'])
|
||||
@@ -1865,13 +1918,17 @@ function update_forum_tracking_info($forum_id, $forum_last_post_time, $f_mark_ti
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = 'SELECT t.forum_id FROM ' . TOPICS_TABLE . ' t
|
||||
LEFT JOIN ' . TOPICS_TRACK_TABLE . ' tt ON (tt.topic_id = t.topic_id AND tt.user_id = ' . $user->data['user_id'] . ')
|
||||
$sql = 'SELECT t.forum_id
|
||||
FROM ' . TOPICS_TABLE . ' t
|
||||
LEFT JOIN ' . TOPICS_TRACK_TABLE . ' tt
|
||||
ON (tt.topic_id = t.topic_id
|
||||
AND tt.user_id = ' . $user->data['user_id'] . ')
|
||||
WHERE t.forum_id = ' . $forum_id . '
|
||||
AND t.topic_last_post_time > ' . $mark_time_forum . '
|
||||
AND t.topic_moved_id = 0
|
||||
AND (tt.topic_id IS NULL OR tt.mark_time < t.topic_last_post_time)
|
||||
GROUP BY t.forum_id';
|
||||
AND t.topic_moved_id = 0 ' .
|
||||
$sql_update_unapproved . '
|
||||
AND (tt.topic_id IS NULL
|
||||
OR tt.mark_time < t.topic_last_post_time)';
|
||||
$result = $db->sql_query_limit($sql, 1);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
@@ -1889,11 +1946,12 @@ function update_forum_tracking_info($forum_id, $forum_last_post_time, $f_mark_ti
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = 'SELECT topic_id
|
||||
FROM ' . TOPICS_TABLE . '
|
||||
WHERE forum_id = ' . $forum_id . '
|
||||
AND topic_last_post_time > ' . $mark_time_forum . '
|
||||
AND topic_moved_id = 0';
|
||||
$sql = 'SELECT t.topic_id
|
||||
FROM ' . TOPICS_TABLE . ' t
|
||||
WHERE t.forum_id = ' . $forum_id . '
|
||||
AND t.topic_last_post_time > ' . $mark_time_forum . '
|
||||
AND t.topic_moved_id = 0 ' .
|
||||
$sql_update_unapproved;
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$check_forum = $tracking_topics['tf'][$forum_id];
|
||||
@@ -2078,7 +2136,7 @@ function generate_pagination($base_url, $num_items, $per_page, $start_item, $add
|
||||
$start_cnt = min(max(1, $on_page - 4), $total_pages - 5);
|
||||
$end_cnt = max(min($total_pages, $on_page + 4), 6);
|
||||
|
||||
$page_string .= ($start_cnt > 1) ? ' ... ' : $seperator;
|
||||
$page_string .= ($start_cnt > 1) ? '<span class="page-dots"> ... </span>' : $seperator;
|
||||
|
||||
for ($i = $start_cnt + 1; $i < $end_cnt; $i++)
|
||||
{
|
||||
@@ -2089,7 +2147,7 @@ function generate_pagination($base_url, $num_items, $per_page, $start_item, $add
|
||||
}
|
||||
}
|
||||
|
||||
$page_string .= ($end_cnt < $total_pages) ? ' ... ' : $seperator;
|
||||
$page_string .= ($end_cnt < $total_pages) ? '<span class="page-dots"> ... </span>' : $seperator;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2176,6 +2234,12 @@ function append_sid($url, $params = false, $is_amp = true, $session_id = false)
|
||||
{
|
||||
global $_SID, $_EXTRA_URL, $phpbb_hook;
|
||||
|
||||
if ($params === '' || (is_array($params) && empty($params)))
|
||||
{
|
||||
// Do not append the ? if the param-list is empty anyway.
|
||||
$params = false;
|
||||
}
|
||||
|
||||
// Developers using the hook function need to globalise the $_SID and $_EXTRA_URL on their own and also handle it appropriately.
|
||||
// They could mimic most of what is within this function
|
||||
if (!empty($phpbb_hook) && $phpbb_hook->call_hook(__FUNCTION__, $url, $params, $is_amp, $session_id))
|
||||
@@ -2659,12 +2723,6 @@ function send_status_line($code, $message)
|
||||
{
|
||||
$version = $_SERVER['SERVER_PROTOCOL'];
|
||||
}
|
||||
else if (!empty($_SERVER['HTTP_VERSION']))
|
||||
{
|
||||
// I cannot remember where I got this from.
|
||||
// This code path may never be reachable in reality.
|
||||
$version = $_SERVER['HTTP_VERSION'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$version = 'HTTP/1.0';
|
||||
@@ -3267,6 +3325,11 @@ function parse_cfg_file($filename, $lines = false)
|
||||
|
||||
$parsed_items[$key] = $value;
|
||||
}
|
||||
|
||||
if (isset($parsed_items['inherit_from']) && isset($parsed_items['name']) && $parsed_items['inherit_from'] == $parsed_items['name'])
|
||||
{
|
||||
unset($parsed_items['inherit_from']);
|
||||
}
|
||||
|
||||
return $parsed_items;
|
||||
}
|
||||
@@ -3338,61 +3401,44 @@ function add_log()
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a nicely formatted backtrace (parts from the php manual by diz at ysagoon dot com)
|
||||
* Return a nicely formatted backtrace.
|
||||
*
|
||||
* Turns the array returned by debug_backtrace() into HTML markup.
|
||||
* Also filters out absolute paths to phpBB root.
|
||||
*
|
||||
* @return string HTML markup
|
||||
*/
|
||||
function get_backtrace()
|
||||
{
|
||||
global $phpbb_root_path;
|
||||
|
||||
$output = '<div style="font-family: monospace;">';
|
||||
$backtrace = debug_backtrace();
|
||||
$path = phpbb_realpath($phpbb_root_path);
|
||||
|
||||
foreach ($backtrace as $number => $trace)
|
||||
// We skip the first one, because it only shows this file/function
|
||||
unset($backtrace[0]);
|
||||
|
||||
foreach ($backtrace as $trace)
|
||||
{
|
||||
// We skip the first one, because it only shows this file/function
|
||||
if ($number == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Strip the current directory from path
|
||||
if (empty($trace['file']))
|
||||
{
|
||||
$trace['file'] = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
$trace['file'] = str_replace(array($path, '\\'), array('', '/'), $trace['file']);
|
||||
$trace['file'] = substr($trace['file'], 1);
|
||||
}
|
||||
$args = array();
|
||||
$trace['file'] = (empty($trace['file'])) ? '(not given by php)' : htmlspecialchars(phpbb_filter_root_path($trace['file']));
|
||||
$trace['line'] = (empty($trace['line'])) ? '(not given by php)' : $trace['line'];
|
||||
|
||||
// If include/require/include_once is not called, do not show arguments - they may contain sensible information
|
||||
if (!in_array($trace['function'], array('include', 'require', 'include_once')))
|
||||
// Only show function arguments for include etc.
|
||||
// Other parameters may contain sensible information
|
||||
$argument = '';
|
||||
if (!empty($trace['args'][0]) && in_array($trace['function'], array('include', 'require', 'include_once', 'require_once')))
|
||||
{
|
||||
unset($trace['args']);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Path...
|
||||
if (!empty($trace['args'][0]))
|
||||
{
|
||||
$argument = htmlspecialchars($trace['args'][0]);
|
||||
$argument = str_replace(array($path, '\\'), array('', '/'), $argument);
|
||||
$argument = substr($argument, 1);
|
||||
$args[] = "'{$argument}'";
|
||||
}
|
||||
$argument = htmlspecialchars(phpbb_filter_root_path($trace['args'][0]));
|
||||
}
|
||||
|
||||
$trace['class'] = (!isset($trace['class'])) ? '' : $trace['class'];
|
||||
$trace['type'] = (!isset($trace['type'])) ? '' : $trace['type'];
|
||||
|
||||
$output .= '<br />';
|
||||
$output .= '<b>FILE:</b> ' . htmlspecialchars($trace['file']) . '<br />';
|
||||
$output .= '<b>FILE:</b> ' . $trace['file'] . '<br />';
|
||||
$output .= '<b>LINE:</b> ' . ((!empty($trace['line'])) ? $trace['line'] : '') . '<br />';
|
||||
|
||||
$output .= '<b>CALL:</b> ' . htmlspecialchars($trace['class'] . $trace['type'] . $trace['function']) . '(' . ((sizeof($args)) ? implode(', ', $args) : '') . ')<br />';
|
||||
$output .= '<b>CALL:</b> ' . htmlspecialchars($trace['class'] . $trace['type'] . $trace['function']);
|
||||
$output .= '(' . (($argument !== '') ? "'$argument'" : '') . ')<br />';
|
||||
}
|
||||
$output .= '</div>';
|
||||
return $output;
|
||||
@@ -3410,7 +3456,7 @@ function get_preg_expression($mode)
|
||||
case 'email':
|
||||
// Regex written by James Watts and Francisco Jose Martin Moreno
|
||||
// http://fightingforalostcause.net/misc/2006/compare-email-regex.php
|
||||
return '([\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+\.)*(?:[\w\!\#$\%\'\*\+\-\/\=\?\^\`{\|\}\~]|&)+@((((([a-z0-9]{1}[a-z0-9\-]{0,62}[a-z0-9]{1})|[a-z])\.)+[a-z]{2,6})|(\d{1,3}\.){3}\d{1,3}(\:\d{1,5})?)';
|
||||
return '([\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+\.)*(?:[\w\!\#$\%\'\*\+\-\/\=\?\^\`{\|\}\~]|&)+@((((([a-z0-9]{1}[a-z0-9\-]{0,62}[a-z0-9]{1})|[a-z])\.)+[a-z]{2,63})|(\d{1,3}\.){3}\d{1,3}(\:\d{1,5})?)';
|
||||
break;
|
||||
|
||||
case 'bbcode_htm':
|
||||
@@ -3454,6 +3500,10 @@ function get_preg_expression($mode)
|
||||
$inline = ($mode == 'relative_url') ? ')' : '';
|
||||
return "(?:[a-z0-9\-._~!$&'($inline*+,;=:@|]+|%[\dA-F]{2})*(?:/(?:[a-z0-9\-._~!$&'($inline*+,;=:@|]+|%[\dA-F]{2})*)*(?:\?(?:[a-z0-9\-._~!$&'($inline*+,;=:@/?|]+|%[\dA-F]{2})*)?(?:\#(?:[a-z0-9\-._~!$&'($inline*+,;=:@/?|]+|%[\dA-F]{2})*)?";
|
||||
break;
|
||||
|
||||
case 'table_prefix':
|
||||
return '#^[a-zA-Z][a-zA-Z0-9_]*$#';
|
||||
break;
|
||||
}
|
||||
|
||||
return '';
|
||||
@@ -3686,10 +3736,19 @@ function phpbb_checkdnsrr($host, $type = 'MX')
|
||||
{
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
case 'A':
|
||||
case 'AAAA':
|
||||
// AAAA records returned by nslookup on Windows XP/2003 have this format.
|
||||
// Later Windows versions use the A record format below for AAAA records.
|
||||
if (stripos($line, "$host AAAA IPv6 address") === 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
// No break
|
||||
|
||||
case 'A':
|
||||
if (!empty($host_matches))
|
||||
{
|
||||
// Second line
|
||||
@@ -3758,25 +3817,10 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
|
||||
|
||||
if (strpos($errfile, 'cache') === false && strpos($errfile, 'template.') === false)
|
||||
{
|
||||
// flush the content, else we get a white page if output buffering is on
|
||||
if (ob_get_level() > 0)
|
||||
{
|
||||
@ob_flush();
|
||||
}
|
||||
|
||||
// Another quick fix for those having gzip compression enabled, but do not flush if the coder wants to catch "something". ;)
|
||||
if (!empty($config['gzip_compress']))
|
||||
{
|
||||
if (@extension_loaded('zlib') && !headers_sent() && !ob_get_level())
|
||||
{
|
||||
@ob_flush();
|
||||
}
|
||||
}
|
||||
|
||||
// remove complete path to installation, with the risk of changing backslashes meant to be there
|
||||
$errfile = str_replace(array(phpbb_realpath($phpbb_root_path), '\\'), array('', '/'), $errfile);
|
||||
$msg_text = str_replace(array(phpbb_realpath($phpbb_root_path), '\\'), array('', '/'), $msg_text);
|
||||
echo '<b>[phpBB Debug] PHP Notice</b>: in file <b>' . $errfile . '</b> on line <b>' . $errline . '</b>: <b>' . $msg_text . '</b><br />' . "\n";
|
||||
$errfile = phpbb_filter_root_path($errfile);
|
||||
$msg_text = phpbb_filter_root_path($msg_text);
|
||||
$error_name = ($errno === E_WARNING) ? 'PHP Warning' : 'PHP Notice';
|
||||
echo '<b>[phpBB Debug] ' . $error_name . '</b>: in file <b>' . $errfile . '</b> on line <b>' . $errline . '</b>: <b>' . $msg_text . '</b><br />' . "\n";
|
||||
|
||||
// we are writing an image - the user won't see the debug, so let's place it in the log
|
||||
if (defined('IMAGE_OUTPUT') || defined('IN_CRON'))
|
||||
@@ -3817,11 +3861,23 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
|
||||
}
|
||||
}
|
||||
|
||||
$log_text = $msg_text;
|
||||
$backtrace = get_backtrace();
|
||||
if ($backtrace)
|
||||
{
|
||||
$log_text .= '<br /><br />BACKTRACE<br />' . $backtrace;
|
||||
}
|
||||
|
||||
if (defined('IN_INSTALL') || defined('DEBUG_EXTRA') || isset($auth) && $auth->acl_get('a_'))
|
||||
{
|
||||
$msg_text = $log_text;
|
||||
}
|
||||
|
||||
if ((defined('DEBUG') || defined('IN_CRON') || defined('IMAGE_OUTPUT')) && isset($db))
|
||||
{
|
||||
// let's avoid loops
|
||||
$db->sql_return_on_error(true);
|
||||
add_log('critical', 'LOG_GENERAL_ERROR', $msg_title, $msg_text);
|
||||
add_log('critical', 'LOG_GENERAL_ERROR', $msg_title, $log_text);
|
||||
$db->sql_return_on_error(false);
|
||||
}
|
||||
|
||||
@@ -3865,7 +3921,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
|
||||
echo ' </div>';
|
||||
echo ' </div>';
|
||||
echo ' <div id="page-footer">';
|
||||
echo ' Powered by <a href="http://www.phpbb.com/">phpBB</a> © phpBB Group';
|
||||
echo ' Powered by <a href="http://www.phpbb.com/">phpBB</a>® Forum Software © phpBB Group';
|
||||
echo ' </div>';
|
||||
echo '</div>';
|
||||
echo '</body>';
|
||||
@@ -3952,6 +4008,29 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes absolute path to phpBB root directory from error messages
|
||||
* and converts backslashes to forward slashes.
|
||||
*
|
||||
* @param string $errfile Absolute file path
|
||||
* (e.g. /var/www/phpbb3/phpBB/includes/functions.php)
|
||||
* Please note that if $errfile is outside of the phpBB root,
|
||||
* the root path will not be found and can not be filtered.
|
||||
* @return string Relative file path
|
||||
* (e.g. /includes/functions.php)
|
||||
*/
|
||||
function phpbb_filter_root_path($errfile)
|
||||
{
|
||||
static $root_path;
|
||||
|
||||
if (empty($root_path))
|
||||
{
|
||||
$root_path = phpbb_realpath(dirname(__FILE__) . '/../');
|
||||
}
|
||||
|
||||
return str_replace(array($root_path, '\\'), array('[ROOT]', '/'), $errfile);
|
||||
}
|
||||
|
||||
/**
|
||||
* Queries the session table to get information about online guests
|
||||
* @param int $item_id Limits the search to the item with this id
|
||||
@@ -4319,7 +4398,7 @@ function phpbb_http_login($param)
|
||||
*/
|
||||
function page_header($page_title = '', $display_online_list = true, $item_id = 0, $item = 'forum')
|
||||
{
|
||||
global $db, $config, $template, $SID, $_SID, $user, $auth, $phpEx, $phpbb_root_path;
|
||||
global $db, $config, $template, $SID, $_SID, $_EXTRA_URL, $user, $auth, $phpEx, $phpbb_root_path;
|
||||
|
||||
if (defined('HEADER_INC'))
|
||||
{
|
||||
@@ -4331,7 +4410,21 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
|
||||
// gzip_compression
|
||||
if ($config['gzip_compress'])
|
||||
{
|
||||
if (@extension_loaded('zlib') && !headers_sent())
|
||||
// to avoid partially compressed output resulting in blank pages in
|
||||
// the browser or error messages, compression is disabled in a few cases:
|
||||
//
|
||||
// 1) if headers have already been sent, this indicates plaintext output
|
||||
// has been started so further content must not be compressed
|
||||
// 2) the length of the current output buffer is non-zero. This means
|
||||
// there is already some uncompressed content in this output buffer
|
||||
// so further output must not be compressed
|
||||
// 3) if more than one level of output buffering is used because we
|
||||
// cannot test all output buffer level content lengths. One level
|
||||
// could be caused by php.ini output_buffering. Anything
|
||||
// beyond that is manual, so the code wrapping phpBB in output buffering
|
||||
// can easily compress the output itself.
|
||||
//
|
||||
if (@extension_loaded('zlib') && !headers_sent() && ob_get_level() <= 1 && ob_get_length() == 0)
|
||||
{
|
||||
ob_start('ob_gzhandler');
|
||||
}
|
||||
@@ -4458,6 +4551,15 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
|
||||
$s_search_hidden_fields['sid'] = $_SID;
|
||||
}
|
||||
|
||||
if (!empty($_EXTRA_URL))
|
||||
{
|
||||
foreach ($_EXTRA_URL as $url_param)
|
||||
{
|
||||
$url_param = explode('=', $url_param, 2);
|
||||
$s_search_hidden_fields[$url_param[0]] = $url_param[1];
|
||||
}
|
||||
}
|
||||
|
||||
// The following assigns all _common_ variables that may be used at any point in a template.
|
||||
$template->assign_vars(array(
|
||||
'SITENAME' => $config['sitename'],
|
||||
@@ -4549,11 +4651,11 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
|
||||
|
||||
'S_SEARCH_HIDDEN_FIELDS' => build_hidden_fields($s_search_hidden_fields),
|
||||
|
||||
'T_THEME_PATH' => "{$web_path}styles/" . $user->theme['theme_path'] . '/theme',
|
||||
'T_TEMPLATE_PATH' => "{$web_path}styles/" . $user->theme['template_path'] . '/template',
|
||||
'T_SUPER_TEMPLATE_PATH' => (isset($user->theme['template_inherit_path']) && $user->theme['template_inherit_path']) ? "{$web_path}styles/" . $user->theme['template_inherit_path'] . '/template' : "{$web_path}styles/" . $user->theme['template_path'] . '/template',
|
||||
'T_IMAGESET_PATH' => "{$web_path}styles/" . $user->theme['imageset_path'] . '/imageset',
|
||||
'T_IMAGESET_LANG_PATH' => "{$web_path}styles/" . $user->theme['imageset_path'] . '/imageset/' . $user->lang_name,
|
||||
'T_THEME_PATH' => "{$web_path}styles/" . rawurlencode($user->theme['theme_path']) . '/theme',
|
||||
'T_TEMPLATE_PATH' => "{$web_path}styles/" . rawurlencode($user->theme['template_path']) . '/template',
|
||||
'T_SUPER_TEMPLATE_PATH' => (isset($user->theme['template_inherit_path']) && $user->theme['template_inherit_path']) ? "{$web_path}styles/" . rawurlencode($user->theme['template_inherit_path']) . '/template' : "{$web_path}styles/" . rawurlencode($user->theme['template_path']) . '/template',
|
||||
'T_IMAGESET_PATH' => "{$web_path}styles/" . rawurlencode($user->theme['imageset_path']) . '/imageset',
|
||||
'T_IMAGESET_LANG_PATH' => "{$web_path}styles/" . rawurlencode($user->theme['imageset_path']) . '/imageset/' . $user->lang_name,
|
||||
'T_IMAGES_PATH' => "{$web_path}images/",
|
||||
'T_SMILIES_PATH' => "{$web_path}{$config['smilies_path']}/",
|
||||
'T_AVATAR_PATH' => "{$web_path}{$config['avatar_path']}/",
|
||||
@@ -4561,13 +4663,13 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
|
||||
'T_ICONS_PATH' => "{$web_path}{$config['icons_path']}/",
|
||||
'T_RANKS_PATH' => "{$web_path}{$config['ranks_path']}/",
|
||||
'T_UPLOAD_PATH' => "{$web_path}{$config['upload_path']}/",
|
||||
'T_STYLESHEET_LINK' => (!$user->theme['theme_storedb']) ? "{$web_path}styles/" . $user->theme['theme_path'] . '/theme/stylesheet.css' : append_sid("{$phpbb_root_path}style.$phpEx", 'id=' . $user->theme['style_id'] . '&lang=' . $user->lang_name),
|
||||
'T_STYLESHEET_LINK' => (!$user->theme['theme_storedb']) ? "{$web_path}styles/" . rawurlencode($user->theme['theme_path']) . '/theme/stylesheet.css' : append_sid("{$phpbb_root_path}style.$phpEx", 'id=' . $user->theme['style_id'] . '&lang=' . $user->lang_name),
|
||||
'T_STYLESHEET_NAME' => $user->theme['theme_name'],
|
||||
|
||||
'T_THEME_NAME' => $user->theme['theme_path'],
|
||||
'T_TEMPLATE_NAME' => $user->theme['template_path'],
|
||||
'T_SUPER_TEMPLATE_NAME' => (isset($user->theme['template_inherit_path']) && $user->theme['template_inherit_path']) ? $user->theme['template_inherit_path'] : $user->theme['template_path'],
|
||||
'T_IMAGESET_NAME' => $user->theme['imageset_path'],
|
||||
'T_THEME_NAME' => rawurlencode($user->theme['theme_path']),
|
||||
'T_TEMPLATE_NAME' => rawurlencode($user->theme['template_path']),
|
||||
'T_SUPER_TEMPLATE_NAME' => rawurlencode((isset($user->theme['template_inherit_path']) && $user->theme['template_inherit_path']) ? $user->theme['template_inherit_path'] : $user->theme['template_path']),
|
||||
'T_IMAGESET_NAME' => rawurlencode($user->theme['imageset_path']),
|
||||
'T_IMAGESET_LANG_NAME' => $user->data['user_lang'],
|
||||
'T_IMAGES' => 'images',
|
||||
'T_SMILIES' => $config['smilies_path'],
|
||||
@@ -4589,6 +4691,12 @@ function page_header($page_title = '', $display_online_list = true, $item_id = 0
|
||||
header('Expires: 0');
|
||||
header('Pragma: no-cache');
|
||||
|
||||
if (!empty($user->data['is_bot']))
|
||||
{
|
||||
// Let reverse proxies know we detected a bot.
|
||||
header('X-PHPBB-IS-BOT: yes');
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4633,6 +4741,7 @@ function page_footer($run_cron = true)
|
||||
$template->assign_vars(array(
|
||||
'DEBUG_OUTPUT' => (defined('DEBUG')) ? $debug_output : '',
|
||||
'TRANSLATION_INFO' => (!empty($user->lang['TRANSLATION_INFO'])) ? $user->lang['TRANSLATION_INFO'] : '',
|
||||
'CREDIT_LINE' => $user->lang('POWERED_BY', '<a href="http://www.phpbb.com/">phpBB</a>® Forum Software © phpBB Group'),
|
||||
|
||||
'U_ACP' => ($auth->acl_get('a_') && !empty($user->data['is_registered'])) ? append_sid("{$phpbb_root_path}adm/index.$phpEx", false, true, $user->session_id) : '')
|
||||
);
|
||||
|
@@ -2296,35 +2296,15 @@ function auto_prune($forum_id, $prune_mode, $prune_flags, $prune_days, $prune_fr
|
||||
/**
|
||||
* remove_comments will strip the sql comment lines out of an uploaded sql file
|
||||
* specifically for mssql and postgres type files in the install....
|
||||
*
|
||||
* @deprecated Use phpbb_remove_comments() instead.
|
||||
*/
|
||||
function remove_comments(&$output)
|
||||
{
|
||||
$lines = explode("\n", $output);
|
||||
$output = '';
|
||||
// Remove /* */ comments (http://ostermiller.org/findcomment.html)
|
||||
$output = preg_replace('#/\*(.|[\r\n])*?\*/#', "\n", $output);
|
||||
|
||||
// try to keep mem. use down
|
||||
$linecount = sizeof($lines);
|
||||
|
||||
$in_comment = false;
|
||||
for ($i = 0; $i < $linecount; $i++)
|
||||
{
|
||||
if (trim($lines[$i]) == '/*')
|
||||
{
|
||||
$in_comment = true;
|
||||
}
|
||||
|
||||
if (!$in_comment)
|
||||
{
|
||||
$output .= $lines[$i] . "\n";
|
||||
}
|
||||
|
||||
if (trim($lines[$i]) == '*/')
|
||||
{
|
||||
$in_comment = false;
|
||||
}
|
||||
}
|
||||
|
||||
unset($lines);
|
||||
// Return by reference and value.
|
||||
return $output;
|
||||
}
|
||||
|
||||
@@ -2592,7 +2572,37 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id
|
||||
{
|
||||
$sql_keywords .= $db->sql_in_set('l.log_operation', $operations) . ' OR ';
|
||||
}
|
||||
$sql_keywords .= 'LOWER(l.log_data) ' . implode(' OR LOWER(l.log_data) ', $keywords) . ')';
|
||||
$sql_lower = $db->sql_lower_text('l.log_data');
|
||||
$sql_keywords .= "$sql_lower " . implode(" OR $sql_lower ", $keywords) . ')';
|
||||
}
|
||||
|
||||
if ($log_count !== false)
|
||||
{
|
||||
$sql = 'SELECT COUNT(l.log_id) AS total_entries
|
||||
FROM ' . LOG_TABLE . ' l, ' . USERS_TABLE . " u
|
||||
WHERE l.log_type = $log_type
|
||||
AND l.user_id = u.user_id
|
||||
AND l.log_time >= $limit_days
|
||||
$sql_keywords
|
||||
$sql_forum";
|
||||
$result = $db->sql_query($sql);
|
||||
$log_count = (int) $db->sql_fetchfield('total_entries');
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
// $log_count may be false here if false was passed in for it,
|
||||
// because in this case we did not run the COUNT() query above.
|
||||
// If we ran the COUNT() query and it returned zero rows, return;
|
||||
// otherwise query for logs below.
|
||||
if ($log_count === 0)
|
||||
{
|
||||
// Save the queries, because there are no logs to display
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ($offset >= $log_count)
|
||||
{
|
||||
$offset = ($offset - $limit < 0) ? 0 : $offset - $limit;
|
||||
}
|
||||
|
||||
$sql = "SELECT l.*, u.username, u.username_clean, u.user_colour
|
||||
@@ -2762,21 +2772,7 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id
|
||||
}
|
||||
}
|
||||
|
||||
if ($log_count !== false)
|
||||
{
|
||||
$sql = 'SELECT COUNT(l.log_id) AS total_entries
|
||||
FROM ' . LOG_TABLE . ' l, ' . USERS_TABLE . " u
|
||||
WHERE l.log_type = $log_type
|
||||
AND l.user_id = u.user_id
|
||||
AND l.log_time >= $limit_days
|
||||
$sql_keywords
|
||||
$sql_forum";
|
||||
$result = $db->sql_query($sql);
|
||||
$log_count = (int) $db->sql_fetchfield('total_entries');
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
return;
|
||||
return $offset;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2908,6 +2904,12 @@ function view_inactive_users(&$users, &$user_count, $limit = 0, $offset = 0, $li
|
||||
$user_count = (int) $db->sql_fetchfield('user_count');
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if ($user_count == 0)
|
||||
{
|
||||
// Save the queries, because there are no users to display
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ($offset >= $user_count)
|
||||
{
|
||||
$offset = ($offset - $limit < 0) ? 0 : $offset - $limit;
|
||||
@@ -3113,7 +3115,7 @@ function get_database_size()
|
||||
/**
|
||||
* Retrieve contents from remotely stored file
|
||||
*/
|
||||
function get_remote_file($host, $directory, $filename, &$errstr, &$errno, $port = 80, $timeout = 10)
|
||||
function get_remote_file($host, $directory, $filename, &$errstr, &$errno, $port = 80, $timeout = 6)
|
||||
{
|
||||
global $user;
|
||||
|
||||
@@ -3123,6 +3125,9 @@ function get_remote_file($host, $directory, $filename, &$errstr, &$errno, $port
|
||||
@fputs($fsock, "HOST: $host\r\n");
|
||||
@fputs($fsock, "Connection: close\r\n\r\n");
|
||||
|
||||
$timer_stop = time() + $timeout;
|
||||
stream_set_timeout($fsock, $timeout);
|
||||
|
||||
$file_info = '';
|
||||
$get_info = false;
|
||||
|
||||
@@ -3145,6 +3150,14 @@ function get_remote_file($host, $directory, $filename, &$errstr, &$errno, $port
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$stream_meta_data = stream_get_meta_data($fsock);
|
||||
|
||||
if (!empty($stream_meta_data['timed_out']) || time() >= $timer_stop)
|
||||
{
|
||||
$errstr = $user->lang['FSOCK_TIMEOUT'];
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@fclose($fsock);
|
||||
}
|
||||
|
@@ -1107,7 +1107,7 @@ function extension_allowed($forum_id, $extension, &$extensions)
|
||||
* @param int $max_length Maximum length of string (multibyte character count as 1 char / Html entity count as 1 char)
|
||||
* @param int $max_store_length Maximum character length of string (multibyte character count as 1 char / Html entity count as entity chars).
|
||||
* @param bool $allow_reply Allow Re: in front of string
|
||||
* NOTE: This parameter can cause undesired behavior (returning strings longer than $max_store_legnth) and is deprecated.
|
||||
* NOTE: This parameter can cause undesired behavior (returning strings longer than $max_store_length) and is deprecated.
|
||||
* @param string $append String to be appended
|
||||
*/
|
||||
function truncate_string($string, $max_length = 60, $max_store_length = 255, $allow_reply = false, $append = '')
|
||||
|
@@ -424,7 +424,8 @@ function import_avatar_gallery($gallery_name = '', $subdirs_as_galleries = false
|
||||
|
||||
$relative_path = empty($convert->convertor['source_path_absolute']);
|
||||
|
||||
if (empty($convert->convertor['avatar_gallery_path']))
|
||||
// check for trailing slash
|
||||
if (rtrim($convert->convertor['avatar_gallery_path'], '/') === '')
|
||||
{
|
||||
$convert->p_master->error(sprintf($user->lang['CONV_ERROR_NO_GALLERY_PATH'], 'import_avatar_gallery()'), __LINE__, __FILE__);
|
||||
}
|
||||
@@ -588,7 +589,8 @@ function import_attachment($source, $use_target = false)
|
||||
|
||||
global $convert, $phpbb_root_path, $config, $user;
|
||||
|
||||
if (empty($convert->convertor['upload_path']))
|
||||
// check for trailing slash
|
||||
if (rtrim($convert->convertor['upload_path'], '/') === '')
|
||||
{
|
||||
$convert->p_master->error(sprintf($user->lang['CONV_ERROR_NO_UPLOAD_DIR'], 'import_attachment()'), __LINE__, __FILE__);
|
||||
}
|
||||
@@ -647,7 +649,8 @@ function import_smiley($source, $use_target = false)
|
||||
|
||||
global $convert, $phpbb_root_path, $config, $user;
|
||||
|
||||
if (!isset($convert->convertor['smilies_path']))
|
||||
// check for trailing slash
|
||||
if (rtrim($convert->convertor['smilies_path'], '/') === '')
|
||||
{
|
||||
$convert->p_master->error(sprintf($user->lang['CONV_ERROR_NO_SMILIES_PATH'], 'import_smiley()'), __LINE__, __FILE__);
|
||||
}
|
||||
@@ -667,7 +670,8 @@ function import_avatar($source, $use_target = false, $user_id = false)
|
||||
|
||||
global $convert, $phpbb_root_path, $config, $user;
|
||||
|
||||
if (!isset($convert->convertor['avatar_path']))
|
||||
// check for trailing slash
|
||||
if (rtrim($convert->convertor['avatar_path'], '/') === '')
|
||||
{
|
||||
$convert->p_master->error(sprintf($user->lang['CONV_ERROR_NO_AVATAR_PATH'], 'import_avatar()'), __LINE__, __FILE__);
|
||||
}
|
||||
|
@@ -51,6 +51,27 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||
$sql_where = 'left_id > ' . $root_data['left_id'] . ' AND left_id < ' . $root_data['right_id'];
|
||||
}
|
||||
|
||||
// Handle marking everything read
|
||||
if ($mark_read == 'all')
|
||||
{
|
||||
$redirect = build_url(array('mark', 'hash'));
|
||||
meta_refresh(3, $redirect);
|
||||
|
||||
if (check_link_hash(request_var('hash', ''), 'global'))
|
||||
{
|
||||
markread('all');
|
||||
|
||||
trigger_error(
|
||||
$user->lang['FORUMS_MARKED'] . '<br /><br />' .
|
||||
sprintf($user->lang['RETURN_INDEX'], '<a href="' . $redirect . '">', '</a>')
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
trigger_error(sprintf($user->lang['RETURN_PAGE'], '<a href="' . $redirect . '">', '</a>'));
|
||||
}
|
||||
}
|
||||
|
||||
// Display list of active topics for this category?
|
||||
$show_active = (isset($root_data['forum_flags']) && ($root_data['forum_flags'] & FORUM_FLAG_ACTIVE_TOPICS)) ? true : false;
|
||||
|
||||
@@ -120,13 +141,14 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||
$forum_id = $row['forum_id'];
|
||||
|
||||
// Mark forums read?
|
||||
if ($mark_read == 'forums' || $mark_read == 'all')
|
||||
if ($mark_read == 'forums')
|
||||
{
|
||||
if ($auth->acl_get('f_list', $forum_id))
|
||||
{
|
||||
$forum_ids[] = $forum_id;
|
||||
continue;
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
// Category with no members
|
||||
@@ -152,8 +174,6 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||
continue;
|
||||
}
|
||||
|
||||
$forum_ids[] = $forum_id;
|
||||
|
||||
if ($config['load_db_lastread'] && $user->data['is_registered'])
|
||||
{
|
||||
$forum_tracking_info[$forum_id] = (!empty($row['mark_time'])) ? $row['mark_time'] : $user->data['user_lastmark'];
|
||||
@@ -255,24 +275,16 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// Handle marking posts
|
||||
if ($mark_read == 'forums' || $mark_read == 'all')
|
||||
if ($mark_read == 'forums')
|
||||
{
|
||||
$redirect = build_url(array('mark', 'hash'));
|
||||
$token = request_var('hash', '');
|
||||
if (check_link_hash($token, 'global'))
|
||||
{
|
||||
if ($mark_read == 'all')
|
||||
{
|
||||
markread('all');
|
||||
$message = sprintf($user->lang['RETURN_INDEX'], '<a href="' . $redirect . '">', '</a>');
|
||||
}
|
||||
else
|
||||
{
|
||||
// Add 0 to forums array to mark global announcements correctly
|
||||
$forum_ids[] = 0;
|
||||
markread('topics', $forum_ids);
|
||||
$message = sprintf($user->lang['RETURN_FORUM'], '<a href="' . $redirect . '">', '</a>');
|
||||
}
|
||||
// Add 0 to forums array to mark global announcements correctly
|
||||
$forum_ids[] = 0;
|
||||
markread('topics', $forum_ids);
|
||||
$message = sprintf($user->lang['RETURN_FORUM'], '<a href="' . $redirect . '">', '</a>');
|
||||
meta_refresh(3, $redirect);
|
||||
trigger_error($user->lang['FORUMS_MARKED'] . '<br /><br />' . $message);
|
||||
}
|
||||
@@ -453,6 +465,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||
'S_NO_CAT' => $catless && !$last_catless,
|
||||
'S_IS_LINK' => ($row['forum_type'] == FORUM_LINK) ? true : false,
|
||||
'S_UNREAD_FORUM' => $forum_unread,
|
||||
'S_AUTH_READ' => $auth->acl_get('f_read', $row['forum_id']),
|
||||
'S_LOCKED_FORUM' => ($row['forum_status'] == ITEM_LOCKED) ? true : false,
|
||||
'S_LIST_SUBFORUMS' => ($row['display_subforum_list']) ? true : false,
|
||||
'S_SUBFORUMS' => (sizeof($subforums_list)) ? true : false,
|
||||
@@ -662,7 +675,7 @@ function topic_generate_pagination($replies, $url)
|
||||
$pagination .= '<a href="' . $url . ($j == 0 ? '' : '&start=' . $j) . '">' . $times . '</a>';
|
||||
if ($times == 1 && $total_pages > 5)
|
||||
{
|
||||
$pagination .= ' ... ';
|
||||
$pagination .= '<span class="page-dots"> ... </span>';
|
||||
|
||||
// Display the last three pages
|
||||
$times = $total_pages - 3;
|
||||
@@ -996,13 +1009,17 @@ function display_user_activity(&$userdata)
|
||||
}
|
||||
|
||||
// Obtain active topic
|
||||
// We need to exclude passworded forums here so we do not leak the topic title
|
||||
$forum_ary_topic = array_unique(array_merge($forum_ary, $user->get_passworded_forums()));
|
||||
$forum_sql_topic = (!empty($forum_ary_topic)) ? 'AND ' . $db->sql_in_set('forum_id', $forum_ary_topic, true) : '';
|
||||
|
||||
$sql = 'SELECT topic_id, COUNT(post_id) AS num_posts
|
||||
FROM ' . POSTS_TABLE . '
|
||||
WHERE poster_id = ' . $userdata['user_id'] . "
|
||||
AND post_postcount = 1
|
||||
AND (post_approved = 1
|
||||
$sql_m_approve)
|
||||
$forum_sql
|
||||
$forum_sql_topic
|
||||
GROUP BY topic_id
|
||||
ORDER BY num_posts DESC";
|
||||
$result = $db->sql_query_limit($sql, 1);
|
||||
@@ -1058,7 +1075,7 @@ function display_user_activity(&$userdata)
|
||||
/**
|
||||
* Topic and forum watching common code
|
||||
*/
|
||||
function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id, $notify_status = 'unset', $start = 0)
|
||||
function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id, $notify_status = 'unset', $start = 0, $item_title = '')
|
||||
{
|
||||
global $template, $db, $user, $phpEx, $start, $phpbb_root_path;
|
||||
|
||||
@@ -1067,6 +1084,7 @@ function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id,
|
||||
$match_id = ($mode == 'forum') ? $forum_id : $topic_id;
|
||||
$u_url = "uid={$user->data['user_id']}";
|
||||
$u_url .= ($mode == 'forum') ? '&f' : '&f=' . $forum_id . '&t';
|
||||
$is_watching = 0;
|
||||
|
||||
// Is user watching this thread?
|
||||
if ($user_id != ANONYMOUS)
|
||||
@@ -1091,28 +1109,51 @@ function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id,
|
||||
if (isset($_GET['unwatch']))
|
||||
{
|
||||
$uid = request_var('uid', 0);
|
||||
if ($uid != $user_id)
|
||||
$token = request_var('hash', '');
|
||||
|
||||
if ($token && check_link_hash($token, "{$mode}_$match_id") || confirm_box(true))
|
||||
{
|
||||
$redirect_url = append_sid("{$phpbb_root_path}view$mode.$phpEx", "$u_url=$match_id&start=$start");
|
||||
$message = $user->lang['ERR_UNWATCHING'] . '<br /><br />' . sprintf($user->lang['RETURN_' . strtoupper($mode)], '<a href="' . $redirect_url . '">', '</a>');
|
||||
trigger_error($message);
|
||||
}
|
||||
if ($_GET['unwatch'] == $mode)
|
||||
{
|
||||
$is_watching = 0;
|
||||
if ($uid != $user_id || $_GET['unwatch'] != $mode)
|
||||
{
|
||||
$redirect_url = append_sid("{$phpbb_root_path}view$mode.$phpEx", "$u_url=$match_id&start=$start");
|
||||
$message = $user->lang['ERR_UNWATCHING'] . '<br /><br />' . sprintf($user->lang['RETURN_' . strtoupper($mode)], '<a href="' . $redirect_url . '">', '</a>');
|
||||
trigger_error($message);
|
||||
}
|
||||
|
||||
$sql = 'DELETE FROM ' . $table_sql . "
|
||||
WHERE $where_sql = $match_id
|
||||
AND user_id = $user_id";
|
||||
$db->sql_query($sql);
|
||||
|
||||
$redirect_url = append_sid("{$phpbb_root_path}view$mode.$phpEx", "$u_url=$match_id&start=$start");
|
||||
$message = $user->lang['NOT_WATCHING_' . strtoupper($mode)] . '<br /><br />';
|
||||
$message .= sprintf($user->lang['RETURN_' . strtoupper($mode)], '<a href="' . $redirect_url . '">', '</a>');
|
||||
meta_refresh(3, $redirect_url);
|
||||
trigger_error($message);
|
||||
}
|
||||
else
|
||||
{
|
||||
$s_hidden_fields = array(
|
||||
'uid' => $user->data['user_id'],
|
||||
'unwatch' => $mode,
|
||||
'start' => $start,
|
||||
'f' => $forum_id,
|
||||
);
|
||||
if ($mode != 'forum')
|
||||
{
|
||||
$s_hidden_fields['t'] = $topic_id;
|
||||
}
|
||||
|
||||
$redirect_url = append_sid("{$phpbb_root_path}view$mode.$phpEx", "$u_url=$match_id&start=$start");
|
||||
|
||||
meta_refresh(3, $redirect_url);
|
||||
|
||||
$message = $user->lang['NOT_WATCHING_' . strtoupper($mode)] . '<br /><br />' . sprintf($user->lang['RETURN_' . strtoupper($mode)], '<a href="' . $redirect_url . '">', '</a>');
|
||||
trigger_error($message);
|
||||
if ($item_title == '')
|
||||
{
|
||||
$confirm_box_message = 'UNWATCH_' . strtoupper($mode);
|
||||
}
|
||||
else
|
||||
{
|
||||
$confirm_box_message = $user->lang('UNWATCH_' . strtoupper($mode) . '_DETAILED', $item_title);
|
||||
}
|
||||
confirm_box(false, $confirm_box_message, build_hidden_fields($s_hidden_fields));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1132,26 +1173,45 @@ function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id,
|
||||
{
|
||||
if (isset($_GET['watch']))
|
||||
{
|
||||
$uid = request_var('uid', 0);
|
||||
$token = request_var('hash', '');
|
||||
$redirect_url = append_sid("{$phpbb_root_path}view$mode.$phpEx", "$u_url=$match_id&start=$start");
|
||||
|
||||
if ($_GET['watch'] == $mode && check_link_hash($token, "{$mode}_$match_id"))
|
||||
if ($token && check_link_hash($token, "{$mode}_$match_id") || confirm_box(true))
|
||||
{
|
||||
if ($uid != $user_id || $_GET['watch'] != $mode)
|
||||
{
|
||||
$redirect_url = append_sid("{$phpbb_root_path}view$mode.$phpEx", "$u_url=$match_id&start=$start");
|
||||
$message = $user->lang['ERR_WATCHING'] . '<br /><br />' . sprintf($user->lang['RETURN_' . strtoupper($mode)], '<a href="' . $redirect_url . '">', '</a>');
|
||||
trigger_error($message);
|
||||
}
|
||||
|
||||
$is_watching = true;
|
||||
|
||||
$sql = 'INSERT INTO ' . $table_sql . " (user_id, $where_sql, notify_status)
|
||||
VALUES ($user_id, $match_id, " . NOTIFY_YES . ')';
|
||||
$db->sql_query($sql);
|
||||
|
||||
$redirect_url = append_sid("{$phpbb_root_path}view$mode.$phpEx", "$u_url=$match_id&start=$start");
|
||||
$message = $user->lang['ARE_WATCHING_' . strtoupper($mode)] . '<br /><br />' . sprintf($user->lang['RETURN_' . strtoupper($mode)], '<a href="' . $redirect_url . '">', '</a>');
|
||||
meta_refresh(3, $redirect_url);
|
||||
trigger_error($message);
|
||||
}
|
||||
else
|
||||
{
|
||||
$message = $user->lang['ERR_WATCHING'] . '<br /><br />' . sprintf($user->lang['RETURN_' . strtoupper($mode)], '<a href="' . $redirect_url . '">', '</a>');
|
||||
$s_hidden_fields = array(
|
||||
'uid' => $user->data['user_id'],
|
||||
'watch' => $mode,
|
||||
'start' => $start,
|
||||
'f' => $forum_id,
|
||||
);
|
||||
if ($mode != 'forum')
|
||||
{
|
||||
$s_hidden_fields['t'] = $topic_id;
|
||||
}
|
||||
|
||||
$confirm_box_message = (($item_title == '') ? 'WATCH_' . strtoupper($mode) : $user->lang('WATCH_' . strtoupper($mode) . '_DETAILED', $item_title));
|
||||
confirm_box(false, $confirm_box_message, build_hidden_fields($s_hidden_fields));
|
||||
}
|
||||
|
||||
meta_refresh(3, $redirect_url);
|
||||
|
||||
trigger_error($message);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1161,7 +1221,7 @@ function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id,
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isset($_GET['unwatch']) && $_GET['unwatch'] == $mode)
|
||||
if ((isset($_GET['unwatch']) && $_GET['unwatch'] == $mode) || (isset($_GET['watch']) && $_GET['watch'] == $mode))
|
||||
{
|
||||
login_box();
|
||||
}
|
||||
|
@@ -211,61 +211,20 @@ function dbms_select($default = '', $only_20x_options = false)
|
||||
|
||||
/**
|
||||
* Get tables of a database
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
function get_tables($db)
|
||||
function get_tables(&$db)
|
||||
{
|
||||
switch ($db->sql_layer)
|
||||
if (!class_exists('phpbb_db_tools'))
|
||||
{
|
||||
case 'mysql':
|
||||
case 'mysql4':
|
||||
case 'mysqli':
|
||||
$sql = 'SHOW TABLES';
|
||||
break;
|
||||
|
||||
case 'sqlite':
|
||||
$sql = 'SELECT name
|
||||
FROM sqlite_master
|
||||
WHERE type = "table"';
|
||||
break;
|
||||
|
||||
case 'mssql':
|
||||
case 'mssql_odbc':
|
||||
case 'mssqlnative':
|
||||
$sql = "SELECT name
|
||||
FROM sysobjects
|
||||
WHERE type='U'";
|
||||
break;
|
||||
|
||||
case 'postgres':
|
||||
$sql = 'SELECT relname
|
||||
FROM pg_stat_user_tables';
|
||||
break;
|
||||
|
||||
case 'firebird':
|
||||
$sql = 'SELECT rdb$relation_name
|
||||
FROM rdb$relations
|
||||
WHERE rdb$view_source is null
|
||||
AND rdb$system_flag = 0';
|
||||
break;
|
||||
|
||||
case 'oracle':
|
||||
$sql = 'SELECT table_name
|
||||
FROM USER_TABLES';
|
||||
break;
|
||||
global $phpbb_root_path, $phpEx;
|
||||
require($phpbb_root_path . 'includes/db/db_tools.' . $phpEx);
|
||||
}
|
||||
|
||||
$result = $db->sql_query($sql);
|
||||
$db_tools = new phpbb_db_tools($db);
|
||||
|
||||
$tables = array();
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$tables[] = current($row);
|
||||
}
|
||||
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
return $tables;
|
||||
return $db_tools->sql_list_tables();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -514,11 +473,40 @@ function connect_check_db($error_connect, &$error, $dbms_details, $table_prefix,
|
||||
}
|
||||
|
||||
/**
|
||||
* remove_remarks will strip the sql comment lines out of an uploaded sql file
|
||||
* Removes comments from schema files
|
||||
*
|
||||
* @deprecated Use phpbb_remove_comments() instead.
|
||||
*/
|
||||
function remove_remarks(&$sql)
|
||||
{
|
||||
// Remove # style comments
|
||||
$sql = preg_replace('/\n{2,}/', "\n", preg_replace('/^#.*$/m', "\n", $sql));
|
||||
|
||||
// Return by reference
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes "/* style" as well as "# style" comments from $input.
|
||||
*
|
||||
* @param string $input Input string
|
||||
*
|
||||
* @return string Input string with comments removed
|
||||
*/
|
||||
function phpbb_remove_comments($input)
|
||||
{
|
||||
if (!function_exists('remove_comments'))
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
require($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
|
||||
}
|
||||
|
||||
// Remove /* */ comments
|
||||
remove_comments($input);
|
||||
|
||||
// Remove # style comments
|
||||
remove_remarks($input);
|
||||
|
||||
return $input;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -556,4 +544,54 @@ function adjust_language_keys_callback($matches)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the output to be stored in a phpBB config.php file
|
||||
*
|
||||
* @param array $data Array containing the database connection information
|
||||
* @param string $dbms The name of the DBAL class to use
|
||||
* @param array $load_extensions Array of additional extensions that should be loaded
|
||||
* @param bool $debug If the debug constants should be enabled by default or not
|
||||
*
|
||||
* @return string The output to write to the file
|
||||
*/
|
||||
function phpbb_create_config_file_data($data, $dbms, $load_extensions, $debug = false)
|
||||
{
|
||||
$load_extensions = implode(',', $load_extensions);
|
||||
|
||||
$config_data = "<?php\n";
|
||||
$config_data .= "// phpBB 3.0.x auto-generated configuration file\n// Do not change anything in this file!\n";
|
||||
|
||||
$config_data_array = array(
|
||||
'dbms' => $dbms,
|
||||
'dbhost' => $data['dbhost'],
|
||||
'dbport' => $data['dbport'],
|
||||
'dbname' => $data['dbname'],
|
||||
'dbuser' => $data['dbuser'],
|
||||
'dbpasswd' => htmlspecialchars_decode($data['dbpasswd']),
|
||||
'table_prefix' => $data['table_prefix'],
|
||||
'acm_type' => 'file',
|
||||
'load_extensions' => $load_extensions,
|
||||
);
|
||||
|
||||
foreach ($config_data_array as $key => $value)
|
||||
{
|
||||
$config_data .= "\${$key} = '" . str_replace("'", "\\'", str_replace('\\', '\\\\', $value)) . "';\n";
|
||||
}
|
||||
|
||||
$config_data .= "\n@define('PHPBB_INSTALLED', true);\n";
|
||||
|
||||
if ($debug)
|
||||
{
|
||||
$config_data .= "@define('DEBUG', true);\n";
|
||||
$config_data .= "@define('DEBUG_EXTRA', true);\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$config_data .= "// @define('DEBUG', true);\n";
|
||||
$config_data .= "// @define('DEBUG_EXTRA', true);\n";
|
||||
}
|
||||
|
||||
return $config_data;
|
||||
}
|
||||
|
||||
?>
|
@@ -162,6 +162,22 @@ class messenger
|
||||
$this->extra_headers[] = trim($headers);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds X-AntiAbuse headers
|
||||
*
|
||||
* @param array $config Configuration array
|
||||
* @param user $user A user object
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
function anti_abuse_headers($config, $user)
|
||||
{
|
||||
$this->headers('X-AntiAbuse: Board servername - ' . mail_encode($config['server_name']));
|
||||
$this->headers('X-AntiAbuse: User_id - ' . $user->data['user_id']);
|
||||
$this->headers('X-AntiAbuse: Username - ' . mail_encode($user->data['username']));
|
||||
$this->headers('X-AntiAbuse: User IP - ' . $user->ip);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the email priority
|
||||
*/
|
||||
@@ -552,7 +568,7 @@ class messenger
|
||||
if (!$use_queue)
|
||||
{
|
||||
include_once($phpbb_root_path . 'includes/functions_jabber.' . $phpEx);
|
||||
$this->jabber = new jabber($config['jab_host'], $config['jab_port'], $config['jab_username'], $config['jab_password'], $config['jab_use_ssl']);
|
||||
$this->jabber = new jabber($config['jab_host'], $config['jab_port'], $config['jab_username'], htmlspecialchars_decode($config['jab_password']), $config['jab_use_ssl']);
|
||||
|
||||
if (!$this->jabber->connect())
|
||||
{
|
||||
@@ -753,7 +769,7 @@ class queue
|
||||
}
|
||||
|
||||
include_once($phpbb_root_path . 'includes/functions_jabber.' . $phpEx);
|
||||
$this->jabber = new jabber($config['jab_host'], $config['jab_port'], $config['jab_username'], $config['jab_password'], $config['jab_use_ssl']);
|
||||
$this->jabber = new jabber($config['jab_host'], $config['jab_port'], $config['jab_username'], htmlspecialchars_decode($config['jab_password']), $config['jab_use_ssl']);
|
||||
|
||||
if (!$this->jabber->connect())
|
||||
{
|
||||
@@ -975,9 +991,16 @@ function smtpmail($addresses, $subject, $message, &$err_msg, $headers = false)
|
||||
$smtp->add_backtrace('Connecting to ' . $config['smtp_host'] . ':' . $config['smtp_port']);
|
||||
|
||||
// Ok we have error checked as much as we can to this point let's get on it already.
|
||||
ob_start();
|
||||
if (!class_exists('phpbb_error_collector'))
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
include($phpbb_root_path . 'includes/error_collector.' . $phpEx);
|
||||
}
|
||||
$collector = new phpbb_error_collector;
|
||||
$collector->install();
|
||||
$smtp->socket = fsockopen($config['smtp_host'], $config['smtp_port'], $errno, $errstr, 20);
|
||||
$error_contents = ob_get_clean();
|
||||
$collector->uninstall();
|
||||
$error_contents = $collector->format_errors();
|
||||
|
||||
if (!$smtp->socket)
|
||||
{
|
||||
@@ -999,7 +1022,7 @@ function smtpmail($addresses, $subject, $message, &$err_msg, $headers = false)
|
||||
}
|
||||
|
||||
// Let me in. This function handles the complete authentication process
|
||||
if ($err_msg = $smtp->log_into_server($config['smtp_host'], $config['smtp_username'], $config['smtp_password'], $config['smtp_auth_method']))
|
||||
if ($err_msg = $smtp->log_into_server($config['smtp_host'], $config['smtp_username'], htmlspecialchars_decode($config['smtp_password']), $config['smtp_auth_method']))
|
||||
{
|
||||
$smtp->close_session($err_msg);
|
||||
return false;
|
||||
@@ -1608,18 +1631,27 @@ function mail_encode($str, $eol = "\r\n")
|
||||
*/
|
||||
function phpbb_mail($to, $subject, $msg, $headers, $eol, &$err_msg)
|
||||
{
|
||||
global $config;
|
||||
global $config, $phpbb_root_path, $phpEx;
|
||||
|
||||
// We use the EOL character for the OS here because the PHP mail function does not correctly transform line endings. On Windows SMTP is used (SMTP is \r\n), on UNIX a command is used...
|
||||
// Reference: http://bugs.php.net/bug.php?id=15841
|
||||
$headers = implode($eol, $headers);
|
||||
|
||||
ob_start();
|
||||
if (!class_exists('phpbb_error_collector'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/error_collector.' . $phpEx);
|
||||
}
|
||||
|
||||
$collector = new phpbb_error_collector;
|
||||
$collector->install();
|
||||
|
||||
// On some PHP Versions mail() *may* fail if there are newlines within the subject.
|
||||
// Newlines are used as a delimiter for lines in mail_encode() according to RFC 2045 section 6.8.
|
||||
// Because PHP can't decide what is wanted we revert back to the non-RFC-compliant way of separating by one space (Use '' as parameter to mail_encode() results in SPACE used)
|
||||
$result = $config['email_function_name']($to, mail_encode($subject, ''), wordwrap(utf8_wordwrap($msg), 997, "\n", true), $headers);
|
||||
$err_msg = ob_get_clean();
|
||||
|
||||
$collector->uninstall();
|
||||
$err_msg = $collector->format_errors();
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
@@ -497,7 +497,14 @@ function upload_attachment($form_name, $forum_id, $local = false, $local_storage
|
||||
{
|
||||
if ($free_space <= $file->get('filesize'))
|
||||
{
|
||||
$filedata['error'][] = $user->lang['ATTACH_QUOTA_REACHED'];
|
||||
if ($auth->acl_get('a_'))
|
||||
{
|
||||
$filedata['error'][] = $user->lang['ATTACH_DISK_FULL'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$filedata['error'][] = $user->lang['ATTACH_QUOTA_REACHED'];
|
||||
}
|
||||
$filedata['post_attach'] = false;
|
||||
|
||||
$file->remove();
|
||||
@@ -1180,36 +1187,32 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id
|
||||
$topic_title = ($topic_notification) ? $topic_title : $subject;
|
||||
$topic_title = censor_text($topic_title);
|
||||
|
||||
// Get banned User ID's
|
||||
$sql = 'SELECT ban_userid
|
||||
FROM ' . BANLIST_TABLE . '
|
||||
WHERE ban_userid <> 0
|
||||
AND ban_exclude <> 1';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$sql_ignore_users = ANONYMOUS . ', ' . $user->data['user_id'];
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
// Exclude guests, current user and banned users from notifications
|
||||
if (!function_exists('phpbb_get_banned_user_ids'))
|
||||
{
|
||||
$sql_ignore_users .= ', ' . (int) $row['ban_userid'];
|
||||
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
$sql_ignore_users = phpbb_get_banned_user_ids();
|
||||
$sql_ignore_users[ANONYMOUS] = ANONYMOUS;
|
||||
$sql_ignore_users[$user->data['user_id']] = $user->data['user_id'];
|
||||
|
||||
$notify_rows = array();
|
||||
|
||||
// -- get forum_userids || topic_userids
|
||||
$sql = 'SELECT u.user_id, u.username, u.user_email, u.user_lang, u.user_notify_type, u.user_jabber
|
||||
FROM ' . (($topic_notification) ? TOPICS_WATCH_TABLE : FORUMS_WATCH_TABLE) . ' w, ' . USERS_TABLE . ' u
|
||||
WHERE w.' . (($topic_notification) ? 'topic_id' : 'forum_id') . ' = ' . (($topic_notification) ? $topic_id : $forum_id) . "
|
||||
AND w.user_id NOT IN ($sql_ignore_users)
|
||||
AND w.notify_status = " . NOTIFY_YES . '
|
||||
WHERE w.' . (($topic_notification) ? 'topic_id' : 'forum_id') . ' = ' . (($topic_notification) ? $topic_id : $forum_id) . '
|
||||
AND ' . $db->sql_in_set('w.user_id', $sql_ignore_users, true) . '
|
||||
AND w.notify_status = ' . NOTIFY_YES . '
|
||||
AND u.user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')
|
||||
AND u.user_id = w.user_id';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$notify_rows[$row['user_id']] = array(
|
||||
'user_id' => $row['user_id'],
|
||||
$notify_user_id = (int) $row['user_id'];
|
||||
$notify_rows[$notify_user_id] = array(
|
||||
'user_id' => $notify_user_id,
|
||||
'username' => $row['username'],
|
||||
'user_email' => $row['user_email'],
|
||||
'user_jabber' => $row['user_jabber'],
|
||||
@@ -1219,30 +1222,29 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id
|
||||
'method' => $row['user_notify_type'],
|
||||
'allowed' => false
|
||||
);
|
||||
|
||||
// Add users who have been already notified to ignore list
|
||||
$sql_ignore_users[$notify_user_id] = $notify_user_id;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// forum notification is sent to those not already receiving topic notifications
|
||||
if ($topic_notification)
|
||||
{
|
||||
if (sizeof($notify_rows))
|
||||
{
|
||||
$sql_ignore_users .= ', ' . implode(', ', array_keys($notify_rows));
|
||||
}
|
||||
|
||||
$sql = 'SELECT u.user_id, u.username, u.user_email, u.user_lang, u.user_notify_type, u.user_jabber
|
||||
FROM ' . FORUMS_WATCH_TABLE . ' fw, ' . USERS_TABLE . " u
|
||||
WHERE fw.forum_id = $forum_id
|
||||
AND fw.user_id NOT IN ($sql_ignore_users)
|
||||
AND fw.notify_status = " . NOTIFY_YES . '
|
||||
AND " . $db->sql_in_set('fw.user_id', $sql_ignore_users, true) . '
|
||||
AND fw.notify_status = ' . NOTIFY_YES . '
|
||||
AND u.user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')
|
||||
AND u.user_id = fw.user_id';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$notify_rows[$row['user_id']] = array(
|
||||
'user_id' => $row['user_id'],
|
||||
$notify_user_id = (int) $row['user_id'];
|
||||
$notify_rows[$notify_user_id] = array(
|
||||
'user_id' => $notify_user_id,
|
||||
'username' => $row['username'],
|
||||
'user_email' => $row['user_email'],
|
||||
'user_jabber' => $row['user_jabber'],
|
||||
@@ -1273,7 +1275,6 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Now, we have to do a little step before really sending, we need to distinguish our users a little bit. ;)
|
||||
$msg_users = $delete_ids = $update_notification = array();
|
||||
foreach ($notify_rows as $user_id => $row)
|
||||
@@ -1286,6 +1287,20 @@ function user_notification($mode, $subject, $topic_title, $forum_name, $forum_id
|
||||
{
|
||||
$msg_users[] = $row;
|
||||
$update_notification[$row['notify_type']][] = $row['user_id'];
|
||||
|
||||
/*
|
||||
* We also update the forums watch table for this user when we are
|
||||
* sending out a topic notification to prevent sending out another
|
||||
* notification in case this user is also subscribed to the forum
|
||||
* this topic was posted in.
|
||||
* Since an UPDATE query is used, this has no effect on users only
|
||||
* subscribed to the topic (i.e. no row is created) and should not
|
||||
* be a performance issue.
|
||||
*/
|
||||
if ($row['notify_type'] === 'topic')
|
||||
{
|
||||
$update_notification['forum'][] = $row['user_id'];
|
||||
}
|
||||
}
|
||||
}
|
||||
unset($notify_rows);
|
||||
@@ -1870,9 +1885,9 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
||||
|
||||
case 'edit_topic':
|
||||
case 'edit_first_post':
|
||||
if (isset($poll['poll_options']) && !empty($poll['poll_options']))
|
||||
if (isset($poll['poll_options']))
|
||||
{
|
||||
$poll_start = ($poll['poll_start']) ? $poll['poll_start'] : $current_time;
|
||||
$poll_start = ($poll['poll_start'] || empty($poll['poll_options'])) ? $poll['poll_start'] : $current_time;
|
||||
$poll_length = $poll['poll_length'] * 86400;
|
||||
if ($poll_length < 0)
|
||||
{
|
||||
@@ -2075,11 +2090,11 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
||||
}
|
||||
|
||||
// Update Poll Tables
|
||||
if (isset($poll['poll_options']) && !empty($poll['poll_options']))
|
||||
if (isset($poll['poll_options']))
|
||||
{
|
||||
$cur_poll_options = array();
|
||||
|
||||
if ($poll['poll_start'] && $mode == 'edit')
|
||||
if ($mode == 'edit')
|
||||
{
|
||||
$sql = 'SELECT *
|
||||
FROM ' . POLL_OPTIONS_TABLE . '
|
||||
|
@@ -1083,6 +1083,205 @@ function delete_pm($user_id, $msg_ids, $folder_id)
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete all PM(s) for a given user and delete the ones without references
|
||||
*
|
||||
* @param int $user_id ID of the user whose private messages we want to delete
|
||||
*
|
||||
* @return boolean False if there were no pms found, true otherwise.
|
||||
*/
|
||||
function phpbb_delete_user_pms($user_id)
|
||||
{
|
||||
global $db, $user, $phpbb_root_path, $phpEx;
|
||||
|
||||
$user_id = (int) $user_id;
|
||||
|
||||
if (!$user_id)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Get PM Information for later deleting
|
||||
// The two queries where split, so we can use our indexes
|
||||
$undelivered_msg = $delete_ids = array();
|
||||
|
||||
// Part 1: get PMs the user received
|
||||
$sql = 'SELECT msg_id
|
||||
FROM ' . PRIVMSGS_TO_TABLE . '
|
||||
WHERE user_id = ' . $user_id;
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$msg_id = (int) $row['msg_id'];
|
||||
$delete_ids[$msg_id] = $msg_id;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// Part 2: get PMs the user sent, but have yet to be received
|
||||
// We cannot simply delete them. First we have to check,
|
||||
// whether another user already received and read the message.
|
||||
$sql = 'SELECT msg_id
|
||||
FROM ' . PRIVMSGS_TO_TABLE . '
|
||||
WHERE author_id = ' . $user_id . '
|
||||
AND folder_id = ' . PRIVMSGS_NO_BOX;
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$msg_id = (int) $row['msg_id'];
|
||||
$undelivered_msg[$msg_id] = $msg_id;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (empty($delete_ids) && empty($undelivered_msg))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$db->sql_transaction('begin');
|
||||
|
||||
if (!empty($undelivered_msg))
|
||||
{
|
||||
// A pm is delivered, if for any recipient the message was moved
|
||||
// from their NO_BOX to another folder. We do not delete such
|
||||
// messages, but only delete them for users, who have not yet
|
||||
// received them.
|
||||
$sql = 'SELECT msg_id
|
||||
FROM ' . PRIVMSGS_TO_TABLE . '
|
||||
WHERE author_id = ' . $user_id . '
|
||||
AND folder_id <> ' . PRIVMSGS_NO_BOX . '
|
||||
AND folder_id <> ' . PRIVMSGS_OUTBOX . '
|
||||
AND folder_id <> ' . PRIVMSGS_SENTBOX;
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$delivered_msg = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$msg_id = (int) $row['msg_id'];
|
||||
$delivered_msg[$msg_id] = $msg_id;
|
||||
unset($undelivered_msg[$msg_id]);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$undelivered_user = array();
|
||||
|
||||
// Count the messages we delete, so we can correct the user pm data
|
||||
$sql = 'SELECT user_id, COUNT(msg_id) as num_undelivered_privmsgs
|
||||
FROM ' . PRIVMSGS_TO_TABLE . '
|
||||
WHERE author_id = ' . $user_id . '
|
||||
AND folder_id = ' . PRIVMSGS_NO_BOX . '
|
||||
AND ' . $db->sql_in_set('msg_id', array_merge($undelivered_msg, $delivered_msg)) . '
|
||||
GROUP BY user_id';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$num_pms = (int) $row['num_undelivered_privmsgs'];
|
||||
$undelivered_user[$num_pms][] = (int) $row['user_id'];
|
||||
|
||||
if (sizeof($undelivered_user[$num_pms]) > 50)
|
||||
{
|
||||
// If there are too many users affected the query might get
|
||||
// too long, so we update the value for the first bunch here.
|
||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||
SET user_new_privmsg = user_new_privmsg - ' . $num_pms . ',
|
||||
user_unread_privmsg = user_unread_privmsg - ' . $num_pms . '
|
||||
WHERE ' . $db->sql_in_set('user_id', $undelivered_user[$num_pms]);
|
||||
$db->sql_query($sql);
|
||||
unset($undelivered_user[$num_pms]);
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
foreach ($undelivered_user as $num_pms => $undelivered_user_set)
|
||||
{
|
||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||
SET user_new_privmsg = user_new_privmsg - ' . $num_pms . ',
|
||||
user_unread_privmsg = user_unread_privmsg - ' . $num_pms . '
|
||||
WHERE ' . $db->sql_in_set('user_id', $undelivered_user_set);
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
if (!empty($delivered_msg))
|
||||
{
|
||||
$sql = 'DELETE FROM ' . PRIVMSGS_TO_TABLE . '
|
||||
WHERE folder_id = ' . PRIVMSGS_NO_BOX . '
|
||||
AND ' . $db->sql_in_set('msg_id', $delivered_msg);
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
if (!empty($undelivered_msg))
|
||||
{
|
||||
$sql = 'DELETE FROM ' . PRIVMSGS_TO_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('msg_id', $undelivered_msg);
|
||||
$db->sql_query($sql);
|
||||
|
||||
$sql = 'DELETE FROM ' . PRIVMSGS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('msg_id', $undelivered_msg);
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
// Reset the user's pm count to 0
|
||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||
SET user_new_privmsg = 0,
|
||||
user_unread_privmsg = 0
|
||||
WHERE user_id = ' . $user_id;
|
||||
$db->sql_query($sql);
|
||||
|
||||
// Delete private message data of the user
|
||||
$sql = 'DELETE FROM ' . PRIVMSGS_TO_TABLE . '
|
||||
WHERE user_id = ' . (int) $user_id;
|
||||
$db->sql_query($sql);
|
||||
|
||||
if (!empty($delete_ids))
|
||||
{
|
||||
// Now we have to check which messages we can delete completely
|
||||
$sql = 'SELECT msg_id
|
||||
FROM ' . PRIVMSGS_TO_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('msg_id', $delete_ids);
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
unset($delete_ids[$row['msg_id']]);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (!empty($delete_ids))
|
||||
{
|
||||
// Check if there are any attachments we need to remove
|
||||
if (!function_exists('delete_attachments'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
|
||||
}
|
||||
|
||||
delete_attachments('message', $delete_ids, false);
|
||||
|
||||
$sql = 'DELETE FROM ' . PRIVMSGS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('msg_id', $delete_ids);
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
}
|
||||
|
||||
// Set the remaining author id to anonymous
|
||||
// This way users are still able to read messages from users being removed
|
||||
$sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . '
|
||||
SET author_id = ' . ANONYMOUS . '
|
||||
WHERE author_id = ' . $user_id;
|
||||
$db->sql_query($sql);
|
||||
|
||||
$sql = 'UPDATE ' . PRIVMSGS_TABLE . '
|
||||
SET author_id = ' . ANONYMOUS . '
|
||||
WHERE author_id = ' . $user_id;
|
||||
$db->sql_query($sql);
|
||||
|
||||
$db->sql_transaction('commit');
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Rebuild message header
|
||||
*/
|
||||
@@ -1362,12 +1561,6 @@ function submit_pm($mode, $subject, &$data, $put_in_outbox = true)
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
// Additionally, do not include the sender if he is in the group he wants to send to. ;)
|
||||
if ($row['user_id'] === $user->data['user_id'])
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$field = ($data['address_list']['g'][$row['group_id']] == 'to') ? 'to' : 'bcc';
|
||||
$recipients[$row['user_id']] = $field;
|
||||
}
|
||||
@@ -1607,7 +1800,7 @@ function submit_pm($mode, $subject, &$data, $put_in_outbox = true)
|
||||
// Send Notifications
|
||||
if ($mode != 'edit')
|
||||
{
|
||||
pm_notification($mode, $data['from_username'], $recipients, $subject, $data['message']);
|
||||
pm_notification($mode, $data['from_username'], $recipients, $subject, $data['message'], $data['msg_id']);
|
||||
}
|
||||
|
||||
return $data['msg_id'];
|
||||
@@ -1616,12 +1809,13 @@ function submit_pm($mode, $subject, &$data, $put_in_outbox = true)
|
||||
/**
|
||||
* PM Notification
|
||||
*/
|
||||
function pm_notification($mode, $author, $recipients, $subject, $message)
|
||||
function pm_notification($mode, $author, $recipients, $subject, $message, $msg_id)
|
||||
{
|
||||
global $db, $user, $config, $phpbb_root_path, $phpEx, $auth;
|
||||
|
||||
$subject = censor_text($subject);
|
||||
|
||||
// Exclude guests, current user and banned users from notifications
|
||||
unset($recipients[ANONYMOUS], $recipients[$user->data['user_id']]);
|
||||
|
||||
if (!sizeof($recipients))
|
||||
@@ -1629,18 +1823,12 @@ function pm_notification($mode, $author, $recipients, $subject, $message)
|
||||
return;
|
||||
}
|
||||
|
||||
// Get banned User ID's
|
||||
$sql = 'SELECT ban_userid
|
||||
FROM ' . BANLIST_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('ban_userid', array_map('intval', array_keys($recipients))) . '
|
||||
AND ban_exclude = 0';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
if (!function_exists('phpbb_get_banned_user_ids'))
|
||||
{
|
||||
unset($recipients[$row['ban_userid']]);
|
||||
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
$banned_users = phpbb_get_banned_user_ids(array_keys($recipients));
|
||||
$recipients = array_diff(array_keys($recipients), $banned_users);
|
||||
|
||||
if (!sizeof($recipients))
|
||||
{
|
||||
@@ -1649,7 +1837,7 @@ function pm_notification($mode, $author, $recipients, $subject, $message)
|
||||
|
||||
$sql = 'SELECT user_id, username, user_email, user_lang, user_notify_pm, user_notify_type, user_jabber
|
||||
FROM ' . USERS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('user_id', array_map('intval', array_keys($recipients)));
|
||||
WHERE ' . $db->sql_in_set('user_id', $recipients);
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$msg_list_ary = array();
|
||||
@@ -1688,8 +1876,9 @@ function pm_notification($mode, $author, $recipients, $subject, $message)
|
||||
'AUTHOR_NAME' => htmlspecialchars_decode($author),
|
||||
'USERNAME' => htmlspecialchars_decode($addr['name']),
|
||||
|
||||
'U_INBOX' => generate_board_url() . "/ucp.$phpEx?i=pm&folder=inbox")
|
||||
);
|
||||
'U_INBOX' => generate_board_url() . "/ucp.$phpEx?i=pm&folder=inbox",
|
||||
'U_VIEW_MESSAGE' => generate_board_url() . "/ucp.$phpEx?i=pm&mode=view&p=$msg_id",
|
||||
));
|
||||
|
||||
$messenger->send($addr['method']);
|
||||
}
|
||||
|
@@ -122,7 +122,7 @@ class custom_profile
|
||||
|
||||
case FIELD_BOOL:
|
||||
$field_value = (bool) $field_value;
|
||||
|
||||
|
||||
if (!$field_value && $field_data['field_required'])
|
||||
{
|
||||
return 'FIELD_REQUIRED';
|
||||
@@ -134,7 +134,7 @@ class custom_profile
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
$field_value = (int) $field_value;
|
||||
|
||||
if ($field_value < $field_data['field_minlen'])
|
||||
@@ -456,6 +456,8 @@ class custom_profile
|
||||
|
||||
$user_fields = array();
|
||||
|
||||
$user_ids = $user_id;
|
||||
|
||||
// Go through the fields in correct order
|
||||
foreach (array_keys($this->profile_cache) as $used_ident)
|
||||
{
|
||||
@@ -464,6 +466,15 @@ class custom_profile
|
||||
$user_fields[$user_id][$used_ident]['value'] = $row['pf_' . $used_ident];
|
||||
$user_fields[$user_id][$used_ident]['data'] = $this->profile_cache[$used_ident];
|
||||
}
|
||||
|
||||
foreach ($user_ids as $user_id)
|
||||
{
|
||||
if (!isset($user_fields[$user_id][$used_ident]) && $this->profile_cache[$used_ident]['field_show_novalue'])
|
||||
{
|
||||
$user_fields[$user_id][$used_ident]['value'] = '';
|
||||
$user_fields[$user_id][$used_ident]['data'] = $this->profile_cache[$used_ident];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $user_fields;
|
||||
@@ -521,7 +532,7 @@ class custom_profile
|
||||
switch ($this->profile_types[$field_type])
|
||||
{
|
||||
case 'int':
|
||||
if ($value === '')
|
||||
if ($value === '' && !$ident_ary['data']['field_show_novalue'])
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
@@ -530,7 +541,7 @@ class custom_profile
|
||||
|
||||
case 'string':
|
||||
case 'text':
|
||||
if (!$value)
|
||||
if (!$value && !$ident_ary['data']['field_show_novalue'])
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
@@ -548,7 +559,7 @@ class custom_profile
|
||||
$month = (isset($date[1])) ? (int) $date[1] : 0;
|
||||
$year = (isset($date[2])) ? (int) $date[2] : 0;
|
||||
|
||||
if (!$day && !$month && !$year)
|
||||
if (!$day && !$month && !$year && !$ident_ary['data']['field_show_novalue'])
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
@@ -571,7 +582,7 @@ class custom_profile
|
||||
$this->get_option_lang($field_id, $lang_id, FIELD_DROPDOWN, false);
|
||||
}
|
||||
|
||||
if ($value == $ident_ary['data']['field_novalue'])
|
||||
if ($value == $ident_ary['data']['field_novalue'] && !$ident_ary['data']['field_show_novalue'])
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
@@ -581,7 +592,14 @@ class custom_profile
|
||||
// User not having a value assigned
|
||||
if (!isset($this->options_lang[$field_id][$lang_id][$value]))
|
||||
{
|
||||
return NULL;
|
||||
if ($ident_ary['data']['field_show_novalue'])
|
||||
{
|
||||
$value = $ident_ary['data']['field_novalue'];
|
||||
}
|
||||
else
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->options_lang[$field_id][$lang_id][$value];
|
||||
@@ -595,6 +613,11 @@ class custom_profile
|
||||
$this->get_option_lang($field_id, $lang_id, FIELD_BOOL, false);
|
||||
}
|
||||
|
||||
if (!$value && $ident_ary['data']['field_show_novalue'])
|
||||
{
|
||||
$value = $ident_ary['data']['field_default_value'];
|
||||
}
|
||||
|
||||
if ($ident_ary['data']['field_length'] == 1)
|
||||
{
|
||||
return (isset($this->options_lang[$field_id][$lang_id][(int) $value])) ? $this->options_lang[$field_id][$lang_id][(int) $value] : NULL;
|
||||
@@ -625,10 +648,10 @@ class custom_profile
|
||||
|
||||
$profile_row['field_ident'] = (isset($profile_row['var_name'])) ? $profile_row['var_name'] : 'pf_' . $profile_row['field_ident'];
|
||||
$user_ident = $profile_row['field_ident'];
|
||||
// checkbox - only testing for isset
|
||||
// checkbox - set the value to "true" if it has been set to 1
|
||||
if ($profile_row['field_type'] == FIELD_BOOL && $profile_row['field_length'] == 2)
|
||||
{
|
||||
$value = (isset($_REQUEST[$profile_row['field_ident']])) ? true : ((!isset($user->profile_fields[$user_ident]) || $preview) ? $default_value : $user->profile_fields[$user_ident]);
|
||||
$value = (isset($_REQUEST[$profile_row['field_ident']]) && request_var($profile_row['field_ident'], $default_value) == 1) ? true : ((!isset($user->profile_fields[$user_ident]) || $preview) ? $default_value : $user->profile_fields[$user_ident]);
|
||||
}
|
||||
else if ($profile_row['field_type'] == FIELD_INT)
|
||||
{
|
||||
|
@@ -808,23 +808,56 @@ class ftp_fsock extends transfer
|
||||
*/
|
||||
function _open_data_connection()
|
||||
{
|
||||
$this->_send_command('PASV', '', false);
|
||||
|
||||
if (!$ip_port = $this->_check_command(true))
|
||||
// Try to find out whether we have a IPv4 or IPv6 (control) connection
|
||||
if (function_exists('stream_socket_get_name'))
|
||||
{
|
||||
return false;
|
||||
$socket_name = stream_socket_get_name($this->connection, true);
|
||||
$server_ip = substr($socket_name, 0, strrpos($socket_name, ':'));
|
||||
}
|
||||
|
||||
// open the connection to start sending the file
|
||||
if (!preg_match('#[0-9]{1,3},[0-9]{1,3},[0-9]{1,3},[0-9]{1,3},[0-9]+,[0-9]+#', $ip_port, $temp))
|
||||
if (!isset($server_ip) || preg_match(get_preg_expression('ipv4'), $server_ip))
|
||||
{
|
||||
// bad ip and port
|
||||
return false;
|
||||
// Passive mode
|
||||
$this->_send_command('PASV', '', false);
|
||||
|
||||
if (!$ip_port = $this->_check_command(true))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// open the connection to start sending the file
|
||||
if (!preg_match('#[0-9]{1,3},[0-9]{1,3},[0-9]{1,3},[0-9]{1,3},[0-9]+,[0-9]+#', $ip_port, $temp))
|
||||
{
|
||||
// bad ip and port
|
||||
return false;
|
||||
}
|
||||
|
||||
$temp = explode(',', $temp[0]);
|
||||
$server_ip = $temp[0] . '.' . $temp[1] . '.' . $temp[2] . '.' . $temp[3];
|
||||
$server_port = $temp[4] * 256 + $temp[5];
|
||||
}
|
||||
else
|
||||
{
|
||||
// Extended Passive Mode - RFC2428
|
||||
$this->_send_command('EPSV', '', false);
|
||||
|
||||
if (!$epsv_response = $this->_check_command(true))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Response looks like "229 Entering Extended Passive Mode (|||12345|)"
|
||||
// where 12345 is the tcp port for the data connection
|
||||
if (!preg_match('#\(\|\|\|([0-9]+)\|\)#', $epsv_response, $match))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
$server_port = (int) $match[1];
|
||||
|
||||
// fsockopen expects IPv6 address in square brackets
|
||||
$server_ip = "[$server_ip]";
|
||||
}
|
||||
|
||||
$temp = explode(',', $temp[0]);
|
||||
$server_ip = $temp[0] . '.' . $temp[1] . '.' . $temp[2] . '.' . $temp[3];
|
||||
$server_port = $temp[4] * 256 + $temp[5];
|
||||
$errno = 0;
|
||||
$errstr = '';
|
||||
|
||||
|
@@ -751,6 +751,31 @@ class fileupload
|
||||
$filename = $url['path'];
|
||||
$filesize = 0;
|
||||
|
||||
$remote_max_filesize = $this->max_filesize;
|
||||
if (!$remote_max_filesize)
|
||||
{
|
||||
$max_filesize = @ini_get('upload_max_filesize');
|
||||
|
||||
if (!empty($max_filesize))
|
||||
{
|
||||
$unit = strtolower(substr($max_filesize, -1, 1));
|
||||
$remote_max_filesize = (int) $max_filesize;
|
||||
|
||||
switch ($unit)
|
||||
{
|
||||
case 'g':
|
||||
$remote_max_filesize *= 1024;
|
||||
// no break
|
||||
case 'm':
|
||||
$remote_max_filesize *= 1024;
|
||||
// no break
|
||||
case 'k':
|
||||
$remote_max_filesize *= 1024;
|
||||
// no break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$errno = 0;
|
||||
$errstr = '';
|
||||
|
||||
@@ -779,9 +804,9 @@ class fileupload
|
||||
$block = @fread($fsock, 1024);
|
||||
$filesize += strlen($block);
|
||||
|
||||
if ($this->max_filesize && $filesize > $this->max_filesize)
|
||||
if ($remote_max_filesize && $filesize > $remote_max_filesize)
|
||||
{
|
||||
$max_filesize = get_formatted_filesize($this->max_filesize, false);
|
||||
$max_filesize = get_formatted_filesize($remote_max_filesize, false);
|
||||
|
||||
$file = new fileerror(sprintf($user->lang[$this->error_prefix . 'WRONG_FILESIZE'], $max_filesize['value'], $max_filesize['unit']));
|
||||
return $file;
|
||||
@@ -807,9 +832,9 @@ class fileupload
|
||||
{
|
||||
$length = (int) str_replace('content-length: ', '', strtolower($line));
|
||||
|
||||
if ($length && $length > $this->max_filesize)
|
||||
if ($remote_max_filesize && $length && $length > $remote_max_filesize)
|
||||
{
|
||||
$max_filesize = get_formatted_filesize($this->max_filesize, false);
|
||||
$max_filesize = get_formatted_filesize($remote_max_filesize, false);
|
||||
|
||||
$file = new fileerror(sprintf($user->lang[$this->error_prefix . 'WRONG_FILESIZE'], $max_filesize['value'], $max_filesize['unit']));
|
||||
return $file;
|
||||
|
@@ -528,62 +528,12 @@ function user_delete($mode, $user_id, $post_username = false)
|
||||
WHERE session_user_id = ' . $user_id;
|
||||
$db->sql_query($sql);
|
||||
|
||||
// Remove any undelivered mails...
|
||||
$sql = 'SELECT msg_id, user_id
|
||||
FROM ' . PRIVMSGS_TO_TABLE . '
|
||||
WHERE author_id = ' . $user_id . '
|
||||
AND folder_id = ' . PRIVMSGS_NO_BOX;
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$undelivered_msg = $undelivered_user = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
// Clean the private messages tables from the user
|
||||
if (!function_exists('phpbb_delete_user_pms'))
|
||||
{
|
||||
$undelivered_msg[] = $row['msg_id'];
|
||||
$undelivered_user[$row['user_id']][] = true;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (sizeof($undelivered_msg))
|
||||
{
|
||||
$sql = 'DELETE FROM ' . PRIVMSGS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('msg_id', $undelivered_msg);
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
$sql = 'DELETE FROM ' . PRIVMSGS_TO_TABLE . '
|
||||
WHERE author_id = ' . $user_id . '
|
||||
AND folder_id = ' . PRIVMSGS_NO_BOX;
|
||||
$db->sql_query($sql);
|
||||
|
||||
// Delete all to-information
|
||||
$sql = 'DELETE FROM ' . PRIVMSGS_TO_TABLE . '
|
||||
WHERE user_id = ' . $user_id;
|
||||
$db->sql_query($sql);
|
||||
|
||||
// Set the remaining author id to anonymous - this way users are still able to read messages from users being removed
|
||||
$sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . '
|
||||
SET author_id = ' . ANONYMOUS . '
|
||||
WHERE author_id = ' . $user_id;
|
||||
$db->sql_query($sql);
|
||||
|
||||
$sql = 'UPDATE ' . PRIVMSGS_TABLE . '
|
||||
SET author_id = ' . ANONYMOUS . '
|
||||
WHERE author_id = ' . $user_id;
|
||||
$db->sql_query($sql);
|
||||
|
||||
foreach ($undelivered_user as $_user_id => $ary)
|
||||
{
|
||||
if ($_user_id == $user_id)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||
SET user_new_privmsg = user_new_privmsg - ' . sizeof($ary) . ',
|
||||
user_unread_privmsg = user_unread_privmsg - ' . sizeof($ary) . '
|
||||
WHERE user_id = ' . $_user_id;
|
||||
$db->sql_query($sql);
|
||||
include($phpbb_root_path . 'includes/functions_privmsgs.' . $phpEx);
|
||||
}
|
||||
phpbb_delete_user_pms($user_id);
|
||||
|
||||
$db->sql_transaction('commit');
|
||||
|
||||
@@ -1948,6 +1898,27 @@ function validate_jabber($jid)
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Verifies whether a style ID corresponds to an active style.
|
||||
*
|
||||
* @param int $style_id The style_id of a style which should be checked if activated or not.
|
||||
* @return boolean
|
||||
*/
|
||||
function phpbb_style_is_active($style_id)
|
||||
{
|
||||
global $db;
|
||||
|
||||
$sql = 'SELECT style_active
|
||||
FROM ' . STYLES_TABLE . '
|
||||
WHERE style_id = '. (int) $style_id;
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$style_is_active = (bool) $db->sql_fetchfield('style_active');
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
return $style_is_active;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove avatar
|
||||
*/
|
||||
@@ -3587,4 +3558,37 @@ function remove_newly_registered($user_id, $user_data = false)
|
||||
return $user_data['group_id'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets user ids of currently banned registered users.
|
||||
*
|
||||
* @param array $user_ids Array of users' ids to check for banning,
|
||||
* leave empty to get complete list of banned ids
|
||||
* @return array Array of banned users' ids if any, empty array otherwise
|
||||
*/
|
||||
function phpbb_get_banned_user_ids($user_ids = array())
|
||||
{
|
||||
global $db;
|
||||
|
||||
$sql_user_ids = (!empty($user_ids)) ? $db->sql_in_set('ban_userid', $user_ids) : 'ban_userid <> 0';
|
||||
|
||||
// Get banned User ID's
|
||||
// Ignore stale bans which were not wiped yet
|
||||
$banned_ids_list = array();
|
||||
$sql = 'SELECT ban_userid
|
||||
FROM ' . BANLIST_TABLE . "
|
||||
WHERE $sql_user_ids
|
||||
AND ban_exclude <> 1
|
||||
AND (ban_end > " . time() . '
|
||||
OR ban_end = 0)';
|
||||
$result = $db->sql_query($sql);
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$user_id = (int) $row['ban_userid'];
|
||||
$banned_ids_list[$user_id] = $user_id;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
return $banned_ids_list;
|
||||
}
|
||||
|
||||
?>
|
@@ -170,7 +170,7 @@ class mcp_logs
|
||||
// Grab log data
|
||||
$log_data = array();
|
||||
$log_count = 0;
|
||||
view_log('mod', $log_data, $log_count, $config['topics_per_page'], $start, $forum_list, $topic_id, 0, $sql_where, $sql_sort, $keywords);
|
||||
$start = view_log('mod', $log_data, $log_count, $config['topics_per_page'], $start, $forum_list, $topic_id, 0, $sql_where, $sql_sort, $keywords);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'PAGE_NUMBER' => on_page($log_count, $config['topics_per_page'], $start),
|
||||
@@ -179,7 +179,7 @@ class mcp_logs
|
||||
|
||||
'L_TITLE' => $user->lang['MCP_LOGS'],
|
||||
|
||||
'U_POST_ACTION' => $this->u_action,
|
||||
'U_POST_ACTION' => $this->u_action . "&$u_sort_param$keywords_param&start=$start",
|
||||
'S_CLEAR_ALLOWED' => ($auth->acl_get('a_clearlogs')) ? true : false,
|
||||
'S_SELECT_SORT_DIR' => $s_sort_dir,
|
||||
'S_SELECT_SORT_KEY' => $s_sort_key,
|
||||
|
@@ -286,14 +286,6 @@ function change_topic_type($action, $topic_ids)
|
||||
{
|
||||
global $auth, $user, $db, $phpEx, $phpbb_root_path;
|
||||
|
||||
// For changing topic types, we only allow operations in one forum.
|
||||
$forum_id = check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('f_announce', 'f_sticky', 'm_'), true);
|
||||
|
||||
if ($forum_id === false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
switch ($action)
|
||||
{
|
||||
case 'make_announce':
|
||||
@@ -316,11 +308,18 @@ function change_topic_type($action, $topic_ids)
|
||||
|
||||
default:
|
||||
$new_topic_type = POST_NORMAL;
|
||||
$check_acl = '';
|
||||
$check_acl = false;
|
||||
$l_new_type = (sizeof($topic_ids) == 1) ? 'MCP_MAKE_NORMAL' : 'MCP_MAKE_NORMALS';
|
||||
break;
|
||||
}
|
||||
|
||||
$forum_id = check_ids($topic_ids, TOPICS_TABLE, 'topic_id', $check_acl, true);
|
||||
|
||||
if ($forum_id === false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$redirect = request_var('redirect', build_url(array('action', 'quickmod')));
|
||||
|
||||
$s_hidden_fields = array(
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user