mirror of
https://github.com/phpbb/phpbb.git
synced 2025-09-10 00:01:29 +02:00
Compare commits
842 Commits
release-3.
...
release-3.
Author | SHA1 | Date | |
---|---|---|---|
|
023ec01611 | ||
|
335b23c679 | ||
|
1581ee9d05 | ||
|
f631d6b84d | ||
|
36a8e48083 | ||
|
0dfbb60bc3 | ||
|
65226168ee | ||
|
c0a26e3d57 | ||
|
3d534a5eb6 | ||
|
5c695d709e | ||
|
e2d26e102d | ||
|
31703585cb | ||
|
fa1fd316fe | ||
|
bab86aac7f | ||
|
1f14f7c327 | ||
|
02fd679b26 | ||
|
46bc335524 | ||
|
448d67cc30 | ||
|
d55cdc3546 | ||
|
ed64a69760 | ||
|
dc109b1952 | ||
|
09f17a438e | ||
|
68b3c5d1f0 | ||
|
60414dec86 | ||
|
2121b1274a | ||
|
ddc9e318d0 | ||
|
6a35385308 | ||
|
96a68bcccb | ||
|
25d42b0f10 | ||
|
99abb311c7 | ||
|
77b7d9ba69 | ||
|
1d2a654ad7 | ||
|
b5d36645f2 | ||
|
41bafd4d7d | ||
|
d29d42d7b9 | ||
|
20393592d7 | ||
|
0cded66ff2 | ||
|
a772949162 | ||
|
628e5fbae6 | ||
|
7dbfc1e59c | ||
|
042f47fc3f | ||
|
fd95355c61 | ||
|
2d736479d8 | ||
|
5b25b3e2d5 | ||
|
d753351edc | ||
|
30d1048c8e | ||
|
18d8f94317 | ||
|
b148bb5d70 | ||
|
ae6c3b0d34 | ||
|
d017b9aa3b | ||
|
537c415009 | ||
|
fba55791c1 | ||
|
dbd0304c1d | ||
|
e2a6a7e83a | ||
|
7aa639f050 | ||
|
7263f9bebd | ||
|
c4ff772c91 | ||
|
4c2a81724a | ||
|
101d3b7633 | ||
|
e046bd7498 | ||
|
175ffa869b | ||
|
b5ba220584 | ||
|
a62141ea68 | ||
|
9c636cfdbe | ||
|
f430a77731 | ||
|
7e003bf687 | ||
|
2862de45bd | ||
|
dfa533af4a | ||
|
4180950db7 | ||
|
2fcf49c839 | ||
|
5d98b66e95 | ||
|
aa7b4bdfce | ||
|
5c3dd124c4 | ||
|
e27da4a025 | ||
|
4cef4634fc | ||
|
c67dd0c591 | ||
|
d48ffde25d | ||
|
f9b1f9ced5 | ||
|
ca23d199c1 | ||
|
52ffe75888 | ||
|
40332ecfcc | ||
|
35d49f5150 | ||
|
97a24948e0 | ||
|
f4b2849aa2 | ||
|
937c029665 | ||
|
2225110c0d | ||
|
63fd22b227 | ||
|
6087f0347c | ||
|
407d179702 | ||
|
6a6c1b0463 | ||
|
65699d501d | ||
|
4a3c00d1c8 | ||
|
a9eacf43e8 | ||
|
ae672b0c7f | ||
|
582c1f3562 | ||
|
6e61804e45 | ||
|
6478e98308 | ||
|
2de198e30d | ||
|
a0d2f4cab1 | ||
|
8ff2a74fd9 | ||
|
b8c5537948 | ||
|
13fe7b3ed2 | ||
|
bcd4b01071 | ||
|
2c74cb71b5 | ||
|
dd43c6a61e | ||
|
e1abc3105b | ||
|
8bdb2ce6ba | ||
|
cd17633235 | ||
|
3c7e8325a0 | ||
|
426d8ce79f | ||
|
c9df803d3c | ||
|
38d7ad40a3 | ||
|
9d85422edb | ||
|
253b42372f | ||
|
842e40dab9 | ||
|
35c9357d2f | ||
|
4fb89504a9 | ||
|
710760b9e4 | ||
|
b487a3d9ef | ||
|
4a2b12a0c8 | ||
|
3a2374e37c | ||
|
0bb87b2de1 | ||
|
eb4a95f659 | ||
|
f3f1bfcbe8 | ||
|
f657ee51f8 | ||
|
d29d4389f9 | ||
|
f82e0a83d1 | ||
|
a478063d2b | ||
|
600588d623 | ||
|
31d101e68c | ||
|
1081aaee3e | ||
|
b9a5810716 | ||
|
dab4c10c2f | ||
|
f251c26fe6 | ||
|
d8ecb00f3d | ||
|
62c9996b2f | ||
|
001f32da95 | ||
|
1d0fdc446f | ||
|
3d2c1b8f97 | ||
|
eb867fc623 | ||
|
8ed759545e | ||
|
78732fd7c2 | ||
|
71ae82fbef | ||
|
2769ab701a | ||
|
9000936926 | ||
|
4396bfba65 | ||
|
e17f00fb6b | ||
|
9503996441 | ||
|
a505a3adf9 | ||
|
3bcc779e81 | ||
|
d3633c7f30 | ||
|
f08d18c99c | ||
|
5edb330366 | ||
|
33268e5a72 | ||
|
7f1f64b1dc | ||
|
bf9af92220 | ||
|
7d4d9770cf | ||
|
63a3033f15 | ||
|
02234783c6 | ||
|
1a284ebe8d | ||
|
fbd1741107 | ||
|
0725723813 | ||
|
3e85190798 | ||
|
18dd250f52 | ||
|
101681070b | ||
|
eb5d61044c | ||
|
c7631635fa | ||
|
b0d55a69c7 | ||
|
404f3269dc | ||
|
88f897bc86 | ||
|
bb20a88748 | ||
|
9ea60e3478 | ||
|
c38075d2c2 | ||
|
4ac3c545e1 | ||
|
0d7c33c1af | ||
|
1991df9519 | ||
|
4d5258b5a3 | ||
|
204b18dd59 | ||
|
89d1401a77 | ||
|
271c9d34dc | ||
|
af5a2c4a20 | ||
|
9090ddcfb6 | ||
|
0898c4c1cc | ||
|
db71ca7db1 | ||
|
db67dc5f70 | ||
|
d64b9e7038 | ||
|
2c9d49bf09 | ||
|
ab17c854cd | ||
|
0f10c6ff6f | ||
|
8eb48e2812 | ||
|
f2c53bfffd | ||
|
367f884d01 | ||
|
4a30818e12 | ||
|
a72a6514e7 | ||
|
9719d5a3d5 | ||
|
b79aa3e147 | ||
|
ecfd067f37 | ||
|
4d7b16f439 | ||
|
b0b70589a2 | ||
|
b1d8abf3da | ||
|
c20d84ce17 | ||
|
fc674873c7 | ||
|
c912e6feaa | ||
|
ced8599e30 | ||
|
8858c86c97 | ||
|
888683bda0 | ||
|
c3d664bbfe | ||
|
bd90a53589 | ||
|
1810688d0c | ||
|
ada8bc9da2 | ||
|
521aec5923 | ||
|
ce2196517b | ||
|
800fbdfed2 | ||
|
184d24bb16 | ||
|
a85536d9aa | ||
|
75c082e605 | ||
|
7fbfd7300e | ||
|
1e6a37431b | ||
|
81b02587cd | ||
|
2bac84c51f | ||
|
0e4a38956a | ||
|
70c28aace5 | ||
|
8276b3d337 | ||
|
a6a3899aea | ||
|
6cce62c0ca | ||
|
5304b7d0b3 | ||
|
614e10888c | ||
|
a4e2d89e03 | ||
|
5be990e959 | ||
|
e710304ef5 | ||
|
43be40c1ae | ||
|
a7d7dfee9c | ||
|
b2277e7bf6 | ||
|
740006ba60 | ||
|
76982b430f | ||
|
4ebd582947 | ||
|
210c5f5a59 | ||
|
12fdfe145a | ||
|
04899d1efd | ||
|
c72d443738 | ||
|
ffcfec044b | ||
|
5fbd4584be | ||
|
1785b9eb47 | ||
|
911c46cc61 | ||
|
c4cef8c427 | ||
|
32deb50f5c | ||
|
18f142e87d | ||
|
3d9ae6186f | ||
|
7f76d91128 | ||
|
71905e50e8 | ||
|
0e580d2ab0 | ||
|
078d076526 | ||
|
bdd384aa37 | ||
|
e7a1e16bc5 | ||
|
e7ad97de3a | ||
|
90dc5519c0 | ||
|
e680d46865 | ||
|
f5e3394550 | ||
|
fca72a0f6a | ||
|
be15d8718d | ||
|
b0df5e31cf | ||
|
3d4cc025e0 | ||
|
5542070169 | ||
|
777443d95c | ||
|
9db4983f03 | ||
|
a3f7bc2e51 | ||
|
ed48b5f226 | ||
|
bf81228d37 | ||
|
219e85c4e0 | ||
|
7f266a3664 | ||
|
43d7f15a25 | ||
|
bc7b998632 | ||
|
eedcb3bbe1 | ||
|
245f4df47c | ||
|
517c601482 | ||
|
83a8280554 | ||
|
1c8570d0f5 | ||
|
21faf69d31 | ||
|
b5daa91650 | ||
|
9ee7b9b81f | ||
|
27aba29d74 | ||
|
a6fb2a6b8e | ||
|
49c1904823 | ||
|
9b56a28be0 | ||
|
0925a22062 | ||
|
2f3bd918ac | ||
|
69a75da670 | ||
|
f671022a6d | ||
|
754945e6ff | ||
|
1afc0673dd | ||
|
d4d8aec02a | ||
|
f4a6a2c2d7 | ||
|
6deae170bd | ||
|
6fdb7486ad | ||
|
4c3cb4bc5c | ||
|
4544f5212c | ||
|
c61b9358ff | ||
|
5e70c9b831 | ||
|
52f5e54d8a | ||
|
02cbb864a5 | ||
|
7245bc9977 | ||
|
ecf19b13c8 | ||
|
aea56fcf57 | ||
|
90e4eb2451 | ||
|
ec87cc1f3e | ||
|
ff171f3a3b | ||
|
9e50e52fa5 | ||
|
f75c400db4 | ||
|
7b44e2c791 | ||
|
8b7ae7c796 | ||
|
57cb513b8b | ||
|
2aa9fc07d3 | ||
|
6369637fbf | ||
|
94d64c672e | ||
|
32eb2f427c | ||
|
8283f2393a | ||
|
9068909051 | ||
|
5f243ad665 | ||
|
bd91b6be87 | ||
|
645ceb1bfe | ||
|
7284bf5883 | ||
|
25a46ef4b3 | ||
|
b5a79d9a9d | ||
|
680361e865 | ||
|
c6a35237a2 | ||
|
ba417ad915 | ||
|
cc4a68f32a | ||
|
04574c75a3 | ||
|
f800bc09f9 | ||
|
1f00f48e71 | ||
|
88a23ec40d | ||
|
0aea8ecd83 | ||
|
4bb57f9814 | ||
|
ab8d328702 | ||
|
71f2801d78 | ||
|
c486634be8 | ||
|
7c839470b7 | ||
|
d8c9dd8802 | ||
|
22a251916c | ||
|
b98a81364f | ||
|
929bd2ac3c | ||
|
364407ab59 | ||
|
d7db5d366b | ||
|
02600626cc | ||
|
aa9d24ad31 | ||
|
2d5fe90ed5 | ||
|
85eceeccbe | ||
|
1c30a9778d | ||
|
747ed95678 | ||
|
4bde2511b8 | ||
|
25c57cc457 | ||
|
17c3bf0b39 | ||
|
5cdefdde2e | ||
|
9474d6d50e | ||
|
488de11493 | ||
|
98232a06ac | ||
|
aff9414f68 | ||
|
1de6434a48 | ||
|
a9ef821253 | ||
|
50cf6443b9 | ||
|
cf517509c8 | ||
|
4b0a04b109 | ||
|
f17bd9e1e0 | ||
|
1c920859db | ||
|
94c168291c | ||
|
89e29bb846 | ||
|
eecff95ce1 | ||
|
00777eec62 | ||
|
c5f4ad24f9 | ||
|
325b14550d | ||
|
692a770fc3 | ||
|
961e241b26 | ||
|
8ac4f52924 | ||
|
07930c0917 | ||
|
c160882cdb | ||
|
a6dc32b381 | ||
|
7dca3f4d6c | ||
|
3244cab370 | ||
|
bee9ddbfdf | ||
|
4577404fc2 | ||
|
f29784e288 | ||
|
ef7a5a0280 | ||
|
9f7f3d1463 | ||
|
013f9819b0 | ||
|
1d97f4491e | ||
|
3b28f620fc | ||
|
b68a64de84 | ||
|
82adb1f4f5 | ||
|
4c7af15d0a | ||
|
536a8a6a85 | ||
|
c831f183bf | ||
|
361e8c6fea | ||
|
1e1097f06f | ||
|
9e1e77f4f9 | ||
|
c89051eb28 | ||
|
f1afccb662 | ||
|
ca2e2e6107 | ||
|
a74658091b | ||
|
3a8305e190 | ||
|
928a8c0e89 | ||
|
128a6e4c8d | ||
|
532afbf83a | ||
|
10691fda8e | ||
|
23a1f3feda | ||
|
b9cb75bf60 | ||
|
277f4efcc7 | ||
|
329eb201d9 | ||
|
233a07ceda | ||
|
3c5b3254d1 | ||
|
531d9dfa1f | ||
|
5c8a667db2 | ||
|
875dc63c6f | ||
|
abe218c34a | ||
|
d0143bec88 | ||
|
55e13693b0 | ||
|
5c989b1e8e | ||
|
8f742fb7d5 | ||
|
f08887e277 | ||
|
2d8b856a63 | ||
|
227e7cadba | ||
|
122f61e1ca | ||
|
ce6adeea02 | ||
|
bb442c498b | ||
|
ccc260b179 | ||
|
ede0a36076 | ||
|
adc75b700f | ||
|
fb5247a726 | ||
|
ad748ec0a7 | ||
|
84ff21a586 | ||
|
f01e29effe | ||
|
1f80b668f1 | ||
|
1cd8bbac0c | ||
|
3469545e3a | ||
|
5878d66ebf | ||
|
baabcad8ab | ||
|
7f6ececf95 | ||
|
d268a63812 | ||
|
16bfb5bfc3 | ||
|
500cd2916e | ||
|
350d4f3e6d | ||
|
8c89194cc6 | ||
|
6a75fe26fc | ||
|
8d551e2ded | ||
|
62f8fed797 | ||
|
3c7f45c166 | ||
|
daf668a969 | ||
|
0391b48d7e | ||
|
81a8a76c59 | ||
|
f26cf2dc1f | ||
|
d2226b3664 | ||
|
7e2136587a | ||
|
77b275181a | ||
|
dc8ff9da28 | ||
|
e4fc82bee5 | ||
|
f38fce5ce5 | ||
|
f8180ca97b | ||
|
e7c5fc32d2 | ||
|
4aab9e792a | ||
|
f26b2c00de | ||
|
2a6c9233e9 | ||
|
69a168bcb2 | ||
|
c7b3407eb2 | ||
|
1b4bad6583 | ||
|
3ae0169542 | ||
|
2a939fa779 | ||
|
57179fbb79 | ||
|
d05c7fd342 | ||
|
101e6c8f96 | ||
|
e31474542d | ||
|
90e440855e | ||
|
182a96f273 | ||
|
98c5069500 | ||
|
2fcb8ab87f | ||
|
2119dee53d | ||
|
84ccb3aded | ||
|
7b6be23117 | ||
|
4afb53dd8d | ||
|
ee8b72d733 | ||
|
d99ef03446 | ||
|
a999718b42 | ||
|
ede339c1c8 | ||
|
9883aa4930 | ||
|
6f6750b629 | ||
|
27a24d0a67 | ||
|
400fc0f73d | ||
|
f4381a20d4 | ||
|
f903e5b3c0 | ||
|
635befa00e | ||
|
5bb62f5560 | ||
|
f296014c23 | ||
|
44ba0f5054 | ||
|
66143e99be | ||
|
4a2e203a80 | ||
|
d65d776d92 | ||
|
cbee288eeb | ||
|
c1ec6517bf | ||
|
f8fbe37936 | ||
|
ff18802656 | ||
|
11e09f1b3c | ||
|
6e6195c303 | ||
|
e1376e14de | ||
|
dec06d10fe | ||
|
8c3808e9e7 | ||
|
bf5f11e11a | ||
|
b2dacefbe7 | ||
|
0c3f7c6c8e | ||
|
5def7e255e | ||
|
7dfd57077a | ||
|
92350db572 | ||
|
a2daf30415 | ||
|
949f07e8ba | ||
|
4fe09b98b0 | ||
|
ea01890407 | ||
|
0ff5f9fa0e | ||
|
90210bf371 | ||
|
39b1420774 | ||
|
bd52c64e68 | ||
|
adad3aac66 | ||
|
ca4a3f4698 | ||
|
1f1835ede0 | ||
|
e90e3ec368 | ||
|
d90680d685 | ||
|
7c0ff6ddd4 | ||
|
b6ac183a32 | ||
|
0b52923129 | ||
|
53ce1330d6 | ||
|
602e440cfd | ||
|
cf1e6e5e6b | ||
|
01181f1e4e | ||
|
d8f9cb4961 | ||
|
20a6182a86 | ||
|
dddcf28a2d | ||
|
c906335ce4 | ||
|
d1f10d54fc | ||
|
69416b65f3 | ||
|
bdda36798b | ||
|
8e19bb83b5 | ||
|
8f662eac40 | ||
|
64dad1a362 | ||
|
9d5c81ea7a | ||
|
9632294730 | ||
|
6acfe2a0cb | ||
|
9567162295 | ||
|
dc48f28da1 | ||
|
bd81af3b9e | ||
|
2b16b7cada | ||
|
34d52a131b | ||
|
cb233c862b | ||
|
e2e47a87c3 | ||
|
e23b671d32 | ||
|
c077b90f8b | ||
|
bf55546d2d | ||
|
5bfd609cc8 | ||
|
57772a0d32 | ||
|
d2dc314a30 | ||
|
79464c9951 | ||
|
6d864a9df5 | ||
|
751de0c2e9 | ||
|
d546e7fbd9 | ||
|
4bbda5bc45 | ||
|
4e045ed767 | ||
|
9f055e1af3 | ||
|
c94b7f69b7 | ||
|
cc3f77b5fc | ||
|
485a4a75b2 | ||
|
75e7e7b293 | ||
|
b9dce3fa65 | ||
|
3083dd997b | ||
|
b4ca1bdb00 | ||
|
5ab3eac014 | ||
|
2643e851f2 | ||
|
6cc46a3d39 | ||
|
65c529e66d | ||
|
551c3fd511 | ||
|
03b3b38db1 | ||
|
5b22ccfa76 | ||
|
9c93c180b0 | ||
|
20ab0e16f0 | ||
|
58fe69d721 | ||
|
b66b497429 | ||
|
6ed40857ed | ||
|
a2f5468e8e | ||
|
5485563e05 | ||
|
81a71f71c7 | ||
|
a7664811dd | ||
|
d6d77a199b | ||
|
85ece822db | ||
|
57323d1650 | ||
|
cb0e13aa19 | ||
|
719a49d387 | ||
|
aa961991fd | ||
|
0517e43dff | ||
|
1a1a2dc046 | ||
|
5585cb79b2 | ||
|
a24839d21d | ||
|
da3a1a5d20 | ||
|
b9254cfda8 | ||
|
0318cea910 | ||
|
0409191be9 | ||
|
288def143c | ||
|
44d5bde616 | ||
|
f9b9d659a1 | ||
|
9933380d80 | ||
|
b71e725c0b | ||
|
3b5f5113ac | ||
|
c67cfb2b41 | ||
|
3b977eacc1 | ||
|
c3cc6bcbac | ||
|
e86afe6799 | ||
|
22e97296af | ||
|
18a0abcaa3 | ||
|
44277d6a0d | ||
|
1b480df535 | ||
|
5cdec6199c | ||
|
96cb62fe6d | ||
|
a9f850c36d | ||
|
a30693a594 | ||
|
c2043e47da | ||
|
bf882826e4 | ||
|
c14cc433b7 | ||
|
ab83b25857 | ||
|
e5860288be | ||
|
44a0a9e3e0 | ||
|
a6b994d95e | ||
|
a6c5204cbd | ||
|
8df79ba5a4 | ||
|
131c264492 | ||
|
200562548e | ||
|
1744d829ad | ||
|
be15e26e5f | ||
|
4bf0f4a50f | ||
|
a0ba57dc4f | ||
|
3bfd006e77 | ||
|
508caa9bd4 | ||
|
78610f0406 | ||
|
f31dcfc937 | ||
|
fbbd1713d7 | ||
|
d56e573a8e | ||
|
d0e25f2eed | ||
|
53e8e12621 | ||
|
e32324c72a | ||
|
9c8eb3de90 | ||
|
dcf33148a7 | ||
|
a35a225adf | ||
|
33ceceda02 | ||
|
4ae7cb89ff | ||
|
2ba529e144 | ||
|
e55480385b | ||
|
dc5267728b | ||
|
4f0b736f14 | ||
|
60596eb675 | ||
|
3b5c624c03 | ||
|
1d12d76790 | ||
|
0e9a1e0d54 | ||
|
c1c3004fa1 | ||
|
7bdff132ff | ||
|
cc361144f9 | ||
|
3f95d49fee | ||
|
0b42b34531 | ||
|
ee9eb586dd | ||
|
7fa30de9d5 | ||
|
5aceccf00b | ||
|
490626d985 | ||
|
e1966c3476 | ||
|
ed9b896d22 | ||
|
f57e377847 | ||
|
2c01fe67e9 | ||
|
2f799fa993 | ||
|
e213b8264d | ||
|
f6d1dd8b33 | ||
|
5c16ef0657 | ||
|
bad711e0d9 | ||
|
4d333e7f70 | ||
|
4a8aa339d0 | ||
|
cfba5613b7 | ||
|
69985f9b0c | ||
|
9c91bc4976 | ||
|
e1ae3236b2 | ||
|
5c33c852ae | ||
|
16159f20f6 | ||
|
5514b10699 | ||
|
6c04a6715c | ||
|
f788b7384b | ||
|
7fcb07572b | ||
|
2cdb27a0d1 | ||
|
99374731d1 | ||
|
8f97887683 | ||
|
c5e8b759c1 | ||
|
886089d28e | ||
|
221e5a01b1 | ||
|
fc3d3a83db | ||
|
3da67ce581 | ||
|
e71cb17b64 | ||
|
402b7a0973 | ||
|
e41819e37a | ||
|
4069cdd518 | ||
|
4a7ead0239 | ||
|
ae02cf785a | ||
|
2592d59765 | ||
|
27ae01c27a | ||
|
f79b7f1896 | ||
|
aea84322e9 | ||
|
d095e620c1 | ||
|
3574832ddb | ||
|
77401ff354 | ||
|
d0e2b29492 | ||
|
ca5678cc1c | ||
|
f1f35f7f3d | ||
|
cd14b2cdf8 | ||
|
969048293d | ||
|
78c9d07a7b | ||
|
840bfb1226 | ||
|
2522c70675 | ||
|
b1e3787197 | ||
|
16c4564272 | ||
|
6e86cd9e15 | ||
|
7b489638d7 | ||
|
1e1c8e7a9d | ||
|
77e7a27c11 | ||
|
f8f985c099 | ||
|
38bf2e3771 | ||
|
f6b8f69e7e | ||
|
4b39b99d56 | ||
|
9adf7474a9 | ||
|
41077cae64 | ||
|
7f8407b321 | ||
|
3f9de5b1d4 | ||
|
954af4f180 | ||
|
9ebe4da725 | ||
|
e465af28d1 | ||
|
a29048abd6 | ||
|
e767b753a4 | ||
|
6a96249e24 | ||
|
ed7ec01fea | ||
|
c265eab081 | ||
|
c368d170cf | ||
|
16da17a4ba | ||
|
93621aa184 | ||
|
bace8dd31f | ||
|
b75a9dcbe3 | ||
|
1095a67a1b | ||
|
65692e8785 | ||
|
563fc6ed6c | ||
|
654c2370ea | ||
|
339ec5bded | ||
|
4b1ec6abb7 | ||
|
7e4498dfb5 | ||
|
38cbdb6768 | ||
|
7221a47bb6 | ||
|
114f38648b | ||
|
f6166225cf | ||
|
da357f80f8 | ||
|
4dfd12d5b2 | ||
|
9af394eff3 | ||
|
c52bb42dcf | ||
|
1ee4968a01 | ||
|
0755ae423b | ||
|
908b1c9bc9 | ||
|
f3b5862468 | ||
|
6c13ca7a19 | ||
|
24d0b06466 | ||
|
6e7593a5db | ||
|
c1b00896b4 | ||
|
384ece3621 | ||
|
9c0bb4afb5 | ||
|
edd1ce7443 | ||
|
bf289de26f | ||
|
aa23af38d4 | ||
|
1084b91b66 | ||
|
837dc9b3a7 | ||
|
d99dbf1f0e | ||
|
e854e5b71f | ||
|
638f0ff248 | ||
|
eff68f3487 | ||
|
311c7c0561 | ||
|
dd542ca630 | ||
|
3c0a555c24 | ||
|
13b0f39961 | ||
|
4719f94cec | ||
|
48a3bd1a9e | ||
|
b0a2216326 | ||
|
0ced93ccd5 | ||
|
e1e94683bd | ||
|
ec2d983ab1 | ||
|
1f041c79c6 | ||
|
d3305ad13e | ||
|
b9854b4c89 | ||
|
e6796a690c | ||
|
b5e850b6df | ||
|
ce17a5d892 | ||
|
79093c1145 | ||
|
68c3a0307d | ||
|
e67d2ae3b9 | ||
|
aabb9d2e48 | ||
|
4e5fd9a6e9 | ||
|
a6c9119dfa | ||
|
1e605efaf1 | ||
|
46684228d5 | ||
|
7747d79e31 | ||
|
d676ca12ab | ||
|
3aac61cfa7 | ||
|
de6a0a7dc1 | ||
|
a86cff313f | ||
|
1d808931f6 | ||
|
f7249f8839 | ||
|
b6cb353239 | ||
|
d9662a5891 | ||
|
d9a5c8e918 | ||
|
327333e328 | ||
|
a8fb68051e | ||
|
1fcf0d4808 | ||
|
5b67939e6a | ||
|
ef404d0f95 | ||
|
342a7cbd55 | ||
|
21b35d95be | ||
|
e4abbcaca3 | ||
|
5d0a41b814 | ||
|
ff5c88be77 | ||
|
f7d387f93c | ||
|
0aba1faa08 | ||
|
aa5a0f62c4 | ||
|
523a1e7b7c | ||
|
d84834db88 | ||
|
91f9050a70 | ||
|
2749bfe26c | ||
|
882a3c3831 | ||
|
80d0bf4566 | ||
|
7f45062466 | ||
|
63d85935f5 | ||
|
fa3bdedf7b | ||
|
75d3b7d09c | ||
|
1d523531b5 | ||
|
53f186d96b | ||
|
65aaef1f83 | ||
|
a53c8cee79 | ||
|
8e310231bd | ||
|
05c47a0f4a | ||
|
50d2e337b0 | ||
|
dff65f902c | ||
|
31b93280ee | ||
|
d69ff96236 | ||
|
7f408e4b41 |
143
.appveyor.yml
Normal file
143
.appveyor.yml
Normal file
@@ -0,0 +1,143 @@
|
||||
build: false
|
||||
clone_folder: c:\projects\phpbb
|
||||
version: '{build}'
|
||||
|
||||
services:
|
||||
- iis
|
||||
|
||||
environment:
|
||||
matrix:
|
||||
- db: mssql
|
||||
db_version: sql2012sp1
|
||||
php: 7.0
|
||||
- db: mssql
|
||||
db_version: sql2014
|
||||
php: 7.0
|
||||
- db: mssql
|
||||
db_version: sql2016
|
||||
php: 7.1.12
|
||||
# - db: mssql
|
||||
# db_version: sql2017
|
||||
# php: 7.1
|
||||
# - db: mariadb
|
||||
# php: 7.1
|
||||
# - db: mysqli
|
||||
# php: 7.1
|
||||
# - db: sqlite
|
||||
# php: 7.1
|
||||
# - db: postgresql
|
||||
# php: 7.1
|
||||
|
||||
hosts:
|
||||
phpbb.test: 127.0.0.1
|
||||
|
||||
init:
|
||||
- SET PATH=%systemroot%\system32\inetsrv\;C:\Program Files\OpenSSL;C:\tools\php;c:\php;%PATH%
|
||||
- SET ANSICON=121x90 (121x90)
|
||||
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Command Processor" /v DelayedExpansion /t REG_DWORD /d 1 /f
|
||||
|
||||
before_test:
|
||||
- ps: |
|
||||
Set-Service wuauserv -StartupType Manual
|
||||
cinst -y php --version ((choco search php --exact --all-versions -r | select-string -pattern $env:php | sort { [version]($_ -split '\|' | select -last 1) } -Descending | Select-Object -first 1) -replace '[php|]','')
|
||||
Get-ChildItem -Path "c:\tools\php$($env:php -replace '([0-9])[.]([0-9])[.]?([0-9]+)?','$1$2')" -Recurse |
|
||||
Move-Item -destination "c:\tools\php"
|
||||
cd c:\tools\php
|
||||
cat php.ini-development | %{$_ -replace "memory_limit = 128M","memory_limit = 1024M"} | Out-File -Encoding "Default" php.ini
|
||||
Add-Content php.ini "`n date.timezone=UTC"
|
||||
Add-Content php.ini "`n display_errors=On"
|
||||
Add-Content php.ini "`n extension_dir=ext"
|
||||
Add-Content php.ini "`n extension=php_openssl.dll"
|
||||
Add-Content php.ini "`n extension=php_mbstring.dll"
|
||||
Add-Content php.ini "`n extension=php_curl.dll"
|
||||
Add-Content php.ini "`n extension=php_gd2.dll"
|
||||
Add-Content php.ini "`n extension=php_tidy.dll"
|
||||
Add-Content php.ini "`n extension=php_fileinfo.dll"
|
||||
Add-Content php.ini "`n extension=php_pdo_sqlite.dll"
|
||||
Add-Content php.ini "`n extension=php_sqlite3.dll"
|
||||
Add-Content php.ini "`n extension=php_pdo_mysql.dll"
|
||||
Add-Content php.ini "`n extension=php_mysqli.dll"
|
||||
Add-Content php.ini "`n extension=php_pdo_pgsql.dll"
|
||||
Add-Content php.ini "`n extension=php_pgsql.dll"
|
||||
|
||||
# Get MSSQL driver
|
||||
if ($env:db -eq "mssql") {
|
||||
cd c:\tools\php\ext
|
||||
$DLLVersion = "4.1.6.1"
|
||||
curl -o php_sqlsrv-$($DLLVersion)-$($env:php -replace '([0-9])[.]([0-9])[.]?([0-9]+)?','$1.$2')-nts-vc14-x64.zip https://windows.php.net/downloads/pecl/releases/sqlsrv/$($:DLLVersion)/php_sqlsrv-$($DLLVersion)-$($env:php -replace '([0-9])[.]([0-9])[.]?([0-9]+)?','$1.$2')-nts-vc14-x64.zip
|
||||
7z x -y php_sqlsrv-$($DLLVersion)-$($env:php -replace '([0-9])[.]([0-9])[.]?([0-9]+)?','$1.$2')-nts-vc14-x64.zip > $null
|
||||
curl -o php_pdo_sqlsrv-$($DLLVersion)-$($env:php -replace '([0-9])[.]([0-9])[.]?([0-9]+)?','$1.$2')-nts-vc14-x64.zip https://windows.php.net/downloads/pecl/releases/pdo_sqlsrv/$($DLLVersion)/php_pdo_sqlsrv-$($DLLVersion)-$($env:php -replace '([0-9])[.]([0-9])[.]?([0-9]+)?','$1.$2')-nts-vc14-x64.zip
|
||||
7z x -y php_pdo_sqlsrv-$($DLLVersion)-$($env:php -replace '([0-9])[.]([0-9])[.]?([0-9]+)?','$1.$2')-nts-vc14-x64.zip > $null
|
||||
Remove-Item c:\tools\php\* -include .zip
|
||||
cd c:\tools\php
|
||||
Add-Content php.ini "`nextension=php_sqlsrv.dll"
|
||||
Add-Content php.ini "`nextension=php_pdo_sqlsrv.dll"
|
||||
Add-Content php.ini "`n"
|
||||
|
||||
$instanceName = $env:db_version.ToUpper()
|
||||
Start-Service "MSSQL`$$instanceName"
|
||||
Set-Variable -Name "sqlServerPath" -Value "(local)\$($env:db_version.ToUpper())"
|
||||
|
||||
# Create database write test config
|
||||
sqlcmd -S $sqlServerPath -Q "Use [master]; CREATE DATABASE [phpbb_test] COLLATE Latin1_General_CI_AS"
|
||||
$data = "<?php`n`n`$dbms = 'phpbb\\db\\driver\\mssqlnative';`n`$dbhost = '.\\$env:db_version';`n`$dbport = '';`n`$dbname = 'phpbb_test';`n`$dbuser = 'sa';`n`$dbpasswd = 'Password12!';`n`$phpbb_functional_url = 'http://phpbb.test/';"; $data | Out-File -Encoding "Default" "c:\\projects\\phpbb\\tests\\test_config.php"
|
||||
}
|
||||
elseif ($env:db -eq "mysqli") {
|
||||
Start-Service MySQL57
|
||||
$env:MYSQL_PWD="Password12!"
|
||||
$cmd = '"C:\Program Files\MySQL\MySQL Server 5.7\bin\mysql" -e "create database phpbb_test;" --user=root'
|
||||
iex "& $cmd"
|
||||
$data = "<?php`n`n`$dbms = 'phpbb\\db\\driver\\mysqli';`n`$dbhost = 'localhost';`n`$dbport = '';`n`$dbname = 'phpbb_test';`n`$dbuser = 'root';`n`$dbpasswd = 'Password12!';`n`$phpbb_functional_url = 'http://phpbb.test/';"; $data | Out-File -Encoding "Default" "c:\\projects\\phpbb\\tests\\test_config.php"
|
||||
}
|
||||
elseif ($env:db -eq "postgresql") {
|
||||
Start-Service postgresql-x64-9.5
|
||||
$env:PGUSER="postgres"
|
||||
$env:PGPASSWORD="Password12!"
|
||||
$Env:Path="C:\Program Files\PostgreSQL\9.6\bin\;$($Env:Path)"
|
||||
createdb phpbb_test
|
||||
$data = "<?php`n`n`$dbms = 'phpbb\\db\\driver\\postgres';`n`$dbhost = 'localhost';`n`$dbport = '';`n`$dbname = 'phpbb_test';`n`$dbuser = 'postgres';`n`$dbpasswd = 'Password12!';`n`$phpbb_functional_url = 'http://phpbb.test/';"; $data | Out-File -Encoding "Default" "c:\\projects\\phpbb\\tests\\test_config.php"
|
||||
}
|
||||
elseif ($env:db -eq "mariadb") {
|
||||
appveyor-retry cinst -y --force mariadb
|
||||
$env:MYSQL_PWD=""
|
||||
$cmd = '"C:\Program Files\MariaDB 10.2\bin\mysql" -e "create database phpbb_test;" --user=root'
|
||||
iex "& $cmd"
|
||||
$data = "<?php`n`n`$dbms = 'phpbb\\db\\driver\\mysqli';`n`$dbhost = 'localhost';`n`$dbport = '';`n`$dbname = 'phpbb_test';`n`$dbuser = 'root';`n`$dbpasswd = '';`n`$phpbb_functional_url = 'http://phpbb.test/';"; $data | Out-File -Encoding "Default" "c:\\projects\\phpbb\\tests\\test_config.php"
|
||||
}
|
||||
elseif ($env:db -eq "sqlite") {
|
||||
# install sqlite
|
||||
appveyor-retry cinst -y sqlite
|
||||
sqlite3 c:\projects\test.db "create table aTable(field1 int); drop table aTable;"
|
||||
$data = "<?php`n`n`$dbms = 'phpbb\\db\\driver\\sqlite3';`n`$dbhost = 'c:\\projects\\test.db';`n`$dbport = '';`n`$dbname = '';`n`$dbuser = '';`n`$dbpasswd = '';`n`$phpbb_functional_url = 'http://phpbb.test/';"; $data | Out-File -Encoding "Default" "c:\\projects\\phpbb\\tests\\test_config.php"
|
||||
}
|
||||
|
||||
# Install PhantomJS
|
||||
cinst -y phantomjs
|
||||
Start-Process "phantomjs" "--webdriver=8910" | Out-Null
|
||||
- ps: |
|
||||
cd c:\projects\phpbb\phpBB
|
||||
(Get-Content c:\projects\phpbb\phpBB\web.config).replace("<configuration>", "<configuration>`n`t<system.web>`n`t`t<customErrors mode=`"Off`"/>`n`t</system.web>") | Set-Content c:\projects\phpbb\phpBB\web.config
|
||||
(Get-Content c:\projects\phpbb\phpBB\web.config).replace("`t</system.webServer>", "`t`t<httpErrors errorMode=`"Detailed`" />`n`t</system.webServer>") | Set-Content c:\projects\phpbb\phpBB\web.config
|
||||
- cd c:\projects\phpbb\phpBB
|
||||
- php ..\composer.phar install
|
||||
- choco install -y urlrewrite
|
||||
- ps: New-WebSite -Name 'phpBBTest' -PhysicalPath 'c:\projects\phpbb\phpBB' -Force
|
||||
- ps: Import-Module WebAdministration; Set-ItemProperty 'IIS:\Sites\phpBBTest' -name Bindings -value @{protocol='http';bindingInformation='*:80:phpbb.test'}
|
||||
- echo Change default anonymous user AUTH to ApplicationPool
|
||||
- appcmd set config -section:anonymousAuthentication /username:"" --password
|
||||
- echo Setup FAST-CGI configuration
|
||||
- appcmd set config /section:system.webServer/fastCGI /+[fullPath='C:\tools\php\php-cgi.exe']
|
||||
- echo Setup FACT-CGI handler
|
||||
- appcmd set config /section:system.webServer/handlers /+[name='PHP-FastCGI',path='*.php',verb='*',modules='FastCgiModule',scriptProcessor='C:\tools\php\php-cgi.exe',resourceType='Either']
|
||||
- iisreset
|
||||
- NET START W3SVC
|
||||
- mkdir "C:\projects\phpbb\phpBB\cache\test"
|
||||
- mkdir "C:\projects\phpbb\phpBB\cache\installer"
|
||||
- icacls "C:\projects\phpbb\phpBB\cache" /grant Users:F /T
|
||||
- icacls "C:\projects\phpbb\phpBB\files" /grant Users:F /T
|
||||
- icacls "C:\projects\phpbb\phpBB\store" /grant Users:F /T
|
||||
- icacls "C:\projects\phpbb\phpBB\images\avatars\upload" /grant Users:F /T
|
||||
|
||||
test_script:
|
||||
- cd c:\projects\phpbb
|
||||
- php -e phpBB\vendor\phpunit\phpunit\phpunit --verbose
|
6
.github/PULL_REQUEST_TEMPLATE.md
vendored
6
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -1,9 +1,9 @@
|
||||
Checklist:
|
||||
|
||||
- [ ] Correct branch: master for new features; 3.2.x, 3.1.x for fixes
|
||||
- [ ] Correct branch: master for new features; 3.2.x for fixes
|
||||
- [ ] Tests pass
|
||||
- [ ] Code follows coding guidelines: [master / 3.2.x](https://area51.phpbb.com/docs/master/coding-guidelines.html), [3.1.x](https://area51.phpbb.com/docs/31x/coding-guidelines.html)
|
||||
- [ ] Commit follows commit message [format](https://wiki.phpbb.com/Git#Commit_Messages)
|
||||
- [ ] Code follows coding guidelines: [master](https://area51.phpbb.com/docs/dev/master/development/coding_guidelines.html) and [3.2.x](https://area51.phpbb.com/docs/dev/3.2.x/development/coding_guidelines.html)
|
||||
- [ ] Commit follows commit message [format](https://area51.phpbb.com/docs/dev/3.2.x/development/git.html)
|
||||
|
||||
Tracker ticket (set the ticket ID to **your ticket ID**):
|
||||
|
||||
|
@@ -1,4 +1,6 @@
|
||||
language: php
|
||||
sudo: required
|
||||
dist: precise
|
||||
|
||||
matrix:
|
||||
include:
|
||||
@@ -24,12 +26,11 @@ matrix:
|
||||
env: DB=mysqli
|
||||
- php: 7.1
|
||||
env: DB=mysqli
|
||||
- php: 7.2
|
||||
env: DB=mysqli
|
||||
- php: nightly
|
||||
env: DB=mysqli
|
||||
- php: hhvm
|
||||
env: DB=mysqli
|
||||
allow_failures:
|
||||
- php: hhvm
|
||||
- php: nightly
|
||||
fast_finish: true
|
||||
|
||||
@@ -51,4 +52,4 @@ script:
|
||||
- sh -c "if [ '$SLOWTESTS' != '1' -a '$DB' = 'mysqli' ]; then phpBB/vendor/bin/phpunit tests/lint_test.php; fi"
|
||||
- sh -c "if [ '$NOTESTS' != '1' -a '$SLOWTESTS' != '1' ]; then phpBB/vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml --verbose --stop-on-error; fi"
|
||||
- sh -c "if [ '$SLOWTESTS' = '1' ]; then phpBB/vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml --group slow; fi"
|
||||
- sh -c "set -x;if [ '$NOTESTS' = '1' -a '$TRAVIS_PULL_REQUEST' != 'false' ]; then git-tools/commit-msg-hook-range.sh origin/$TRAVIS_BRANCH..FETCH_HEAD; fi"
|
||||
- sh -c "set -x;if [ '$NOTESTS' = '1' -a '$TRAVIS_PULL_REQUEST' != 'false' ]; then git remote set-branches --add origin $TRAVIS_BRANCH && git fetch && git-tools/commit-msg-hook-range.sh origin/$TRAVIS_BRANCH..$TRAVIS_PULL_REQUEST_SHA; fi"
|
||||
|
281
LICENSE
Normal file
281
LICENSE
Normal file
@@ -0,0 +1,281 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
675 Mass Ave, Cambridge, MA 02139, USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
10
README.md
10
README.md
@@ -20,7 +20,7 @@ To be able to run an installation from the repo (and not from a pre-built packag
|
||||
|
||||
1. [Create an account on phpBB.com](http://www.phpbb.com/community/ucp.php?mode=register)
|
||||
2. [Create a ticket (unless there already is one)](http://tracker.phpbb.com/secure/CreateIssue!default.jspa)
|
||||
3. Read our [Coding guidelines](https://wiki.phpbb.com/Coding_guidelines) and [Git Contribution Guidelines](http://wiki.phpbb.com/Git)
|
||||
3. Read our [Coding guidelines](https://area51.phpbb.com/docs/dev/development/coding_guidelines.html) and [Git Contribution Guidelines](https://area51.phpbb.com/docs/dev/development/git.html)
|
||||
4. Send us a pull request
|
||||
|
||||
## VAGRANT
|
||||
@@ -29,11 +29,11 @@ Read our [Vagrant documentation](phpBB/docs/vagrant.md) to find out how to use V
|
||||
|
||||
## 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 builds below:
|
||||
We have unit and functional tests in order to prevent regressions. You can view the bamboo continuous integration [here](https://bamboo.phpbb.com) or check our travis builds below:
|
||||
|
||||
* [](http://travis-ci.org/phpbb/phpbb) **master** - Latest development version
|
||||
* [](http://travis-ci.org/phpbb/phpbb) **3.2.x** - Development of version 3.2.x
|
||||
* [](http://travis-ci.org/phpbb/phpbb) **3.1.x** - Development of version 3.1.x
|
||||
* [](http://travis-ci.org/phpbb/phpbb)[](https://ci.appveyor.com/project/phpBB/phpbb/branch/master) **master** - Latest development version
|
||||
* [](http://travis-ci.org/phpbb/phpbb)[](https://ci.appveyor.com/project/phpBB/phpbb/branch/3.2.x) **3.2.x** - Development of version 3.2.x
|
||||
* [](http://travis-ci.org/phpbb/phpbb) **3.1.x** - Development of version 3.1.x
|
||||
|
||||
## LICENSE
|
||||
|
||||
|
@@ -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.2.1" />
|
||||
<property name="prevversion" value="3.2.0" />
|
||||
<property name="olderversions" value="3.0.14, 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.7-pl1, 3.1.8, 3.1.9, 3.1.10, 3.1.11, 3.2.0-a1, 3.2.0-a2, 3.2.0-b1, 3.2.0-b2, 3.2.0-RC1, 3.2.0-RC2, 3.2.1-RC1" />
|
||||
<property name="newversion" value="3.2.4" />
|
||||
<property name="prevversion" value="3.2.3" />
|
||||
<property name="olderversions" value="3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.7-pl1, 3.1.8, 3.1.9, 3.1.10, 3.1.11, 3.1.12, 3.2.0-a1, 3.2.0-a2, 3.2.0-b1, 3.2.0-b2, 3.2.0-RC1, 3.2.0-RC2, 3.2.0, 3.2.1, 3.2.2, 3.2.4-RC1" />
|
||||
<!-- no configuration should be needed beyond this point -->
|
||||
|
||||
<property name="oldversions" value="${olderversions}, ${prevversion}" />
|
||||
|
@@ -33,14 +33,14 @@ class build_package
|
||||
var $status_begun = false;
|
||||
var $num_dots = 0;
|
||||
|
||||
function build_package($versions, $verbose = false)
|
||||
function __construct($versions, $verbose = false)
|
||||
{
|
||||
$this->versions = $versions;
|
||||
$this->verbose = $verbose;
|
||||
|
||||
// Get last two entries
|
||||
$_latest = $this->versions[sizeof($this->versions) - 1];
|
||||
$_before = $this->versions[sizeof($this->versions) - 2];
|
||||
$_latest = $this->versions[count($this->versions) - 1];
|
||||
$_before = $this->versions[count($this->versions) - 2];
|
||||
|
||||
$this->locations = array(
|
||||
'new_version' => dirname(dirname(__FILE__)) . '/phpBB/',
|
||||
|
@@ -33,7 +33,7 @@ echo "Now all three package types (patch, files, release) are built as well as t
|
||||
|
||||
// Go trough all versions making a diff if we even have old versions
|
||||
// For phpBB 3.0.x we might choose a different update method, rendering the things below useless...
|
||||
if (sizeof($package->old_packages))
|
||||
if (count($package->old_packages))
|
||||
{
|
||||
chdir($package->locations['old_versions']);
|
||||
|
||||
@@ -76,7 +76,7 @@ if (sizeof($package->old_packages))
|
||||
// Create Directories along the way?
|
||||
$file = explode('/', $file);
|
||||
// Remove filename portion
|
||||
$file[sizeof($file)-1] = '';
|
||||
$file[count($file)-1] = '';
|
||||
|
||||
chdir($dest_filename_dir);
|
||||
foreach ($file as $entry)
|
||||
@@ -169,7 +169,7 @@ if (sizeof($package->old_packages))
|
||||
// Create Directories along the way?
|
||||
$file = explode('/', $file);
|
||||
// Remove filename portion
|
||||
$file[sizeof($file)-1] = '';
|
||||
$file[count($file)-1] = '';
|
||||
|
||||
chdir($dest_filename_dir . '/install/update/old');
|
||||
foreach ($file as $entry)
|
||||
@@ -214,7 +214,7 @@ if (sizeof($package->old_packages))
|
||||
// Create Directories along the way?
|
||||
$file = explode('/', $file);
|
||||
// Remove filename portion
|
||||
$file[sizeof($file)-1] = '';
|
||||
$file[count($file)-1] = '';
|
||||
|
||||
chdir($dest_filename_dir . '/install/update/new');
|
||||
foreach ($file as $entry)
|
||||
@@ -321,7 +321,7 @@ $update_info = array(
|
||||
\'version\' => array(\'from\' => \'' . str_replace('_to_', '', $package->old_packages[$_package_name]) . '\', \'to\' => \'' . $package->get('new_version_number') . '\'),
|
||||
';
|
||||
|
||||
if (sizeof($file_contents['all']))
|
||||
if (count($file_contents['all']))
|
||||
{
|
||||
$index_contents .= "\t'files' => array(\n\t\t'" . implode("',\n\t\t'", $file_contents['all']) . "',\n\t),\n";
|
||||
}
|
||||
@@ -330,7 +330,7 @@ $update_info = array(
|
||||
$index_contents .= "\t'files' => array(),\n";
|
||||
}
|
||||
|
||||
if (sizeof($file_contents['binary']))
|
||||
if (count($file_contents['binary']))
|
||||
{
|
||||
$index_contents .= "\t'binary' => array(\n\t\t'" . implode("',\n\t\t'", $file_contents['binary']) . "',\n\t),\n";
|
||||
}
|
||||
@@ -339,7 +339,7 @@ $update_info = array(
|
||||
$index_contents .= "\t'binary' => array(),\n";
|
||||
}
|
||||
|
||||
if (sizeof($file_contents['deleted']))
|
||||
if (count($file_contents['deleted']))
|
||||
{
|
||||
$index_contents .= "\t'deleted' => array(\n\t\t'" . implode("',\n\t\t'", $file_contents['deleted']) . "',\n\t),\n";
|
||||
}
|
||||
@@ -380,7 +380,7 @@ $compress_programs = array(
|
||||
'zip' => 'zip -r'
|
||||
);
|
||||
|
||||
if (sizeof($package->old_packages))
|
||||
if (count($package->old_packages))
|
||||
{
|
||||
// Build Patch Files
|
||||
chdir($package->get('patch_directory'));
|
||||
|
BIN
composer.phar
BIN
composer.phar
Binary file not shown.
@@ -147,6 +147,15 @@ then
|
||||
quit $ERR_LENGTH;
|
||||
fi
|
||||
|
||||
# Check for CR/LF line breaks
|
||||
if grep -q $'\r$' "$1"
|
||||
then
|
||||
complain "The commit message uses CR/LF line breaks, which are not permitted." >&2
|
||||
complain >&2
|
||||
|
||||
quit $ERR_EOF;
|
||||
fi
|
||||
|
||||
lines=$(wc -l "$1" | awk '{ print $1; }');
|
||||
expecting=header;
|
||||
in_description=0;
|
||||
|
@@ -37,12 +37,6 @@
|
||||
|
||||
<!-- IF S_ATTACHMENT_SETTINGS -->
|
||||
|
||||
<!-- IF not S_THUMBNAIL_SUPPORT -->
|
||||
<div class="errorbox">
|
||||
<p>{L_NO_THUMBNAIL_SUPPORT}</p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<form id="attachsettings" method="post" action="{U_ACTION}">
|
||||
<!-- BEGIN options -->
|
||||
<!-- IF options.S_LEGEND -->
|
||||
@@ -329,42 +323,71 @@
|
||||
<fieldset class="tabulated">
|
||||
<legend>{L_TITLE}</legend>
|
||||
|
||||
<table class="table1 zebra-table fixed-width-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{L_FILENAME}</th>
|
||||
<th style="width: 15%;">{L_FILEDATE}</th>
|
||||
<th style="width: 15%;">{L_FILESIZE}</th>
|
||||
<th style="width: 15%;">{L_ATTACH_POST_ID}</th>
|
||||
<th style="width: 15%;">{L_ATTACH_TO_POST}</th>
|
||||
<th style="width: 15%;">{L_DELETE}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- BEGIN orphan -->
|
||||
<div class="pagination top-pagination">
|
||||
<!-- IF .pagination or TOTAL_FILES -->
|
||||
{L_NUMBER_FILES}{L_COLON} {TOTAL_FILES} • {L_TOTAL_SIZE}{L_COLON} {TOTAL_SIZE}
|
||||
<!-- IF .pagination -->
|
||||
• <!-- INCLUDE pagination.html -->
|
||||
<!-- ELSE -->
|
||||
• {PAGE_NUMBER}
|
||||
<!-- ENDIF -->
|
||||
<!-- ENDIF -->
|
||||
</div>
|
||||
|
||||
<!-- IF .orphan -->
|
||||
<table class="table1 zebra-table fixed-width-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<td><a href="{orphan.U_FILE}">{orphan.REAL_FILENAME}</a></td>
|
||||
<td>{orphan.FILETIME}</td>
|
||||
<td>{orphan.FILESIZE}</td>
|
||||
<td><strong>{L_ATTACH_ID}{L_COLON} </strong><input type="number" min="0" max="9999999999" name="post_id[{orphan.ATTACH_ID}]" value="{orphan.POST_ID}" style="width: 75%;" /></td>
|
||||
<td><input type="checkbox" class="radio" name="add[{orphan.ATTACH_ID}]" /></td>
|
||||
<td><input type="checkbox" class="radio" name="delete[{orphan.ATTACH_ID}]" /></td>
|
||||
<th>{L_FILENAME}</th>
|
||||
<th style="width: 15%;">{L_FILEDATE}</th>
|
||||
<th style="width: 15%;">{L_FILESIZE}</th>
|
||||
<th style="width: 15%;">{L_ATTACH_POST_ID}</th>
|
||||
<th style="width: 15%;">{L_ATTACH_TO_POST}</th>
|
||||
<th style="width: 15%;">{L_DELETE}</th>
|
||||
</tr>
|
||||
<!-- END orphan -->
|
||||
<tr class="row4">
|
||||
<td colspan="4"> </td>
|
||||
<td class="small"><a href="#" onclick="marklist('orphan', 'add', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('orphan', 'add', false); return false;">{L_UNMARK_ALL}</a></td>
|
||||
<td class="small"><a href="#" onclick="marklist('orphan', 'delete', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('orphan', 'delete', false); return false;">{L_UNMARK_ALL}</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- BEGIN orphan -->
|
||||
<tr>
|
||||
<td><a href="{orphan.U_FILE}">{orphan.REAL_FILENAME}</a></td>
|
||||
<td>{orphan.FILETIME}</td>
|
||||
<td>{orphan.FILESIZE}</td>
|
||||
<td><strong>{L_ATTACH_ID}{L_COLON} </strong><input type="number" min="0" max="9999999999" name="post_id[{orphan.ATTACH_ID}]" value="{orphan.POST_ID}" style="width: 75%;" /></td>
|
||||
<td><input type="checkbox" class="radio" name="add[{orphan.ATTACH_ID}]" /></td>
|
||||
<td><input type="checkbox" class="radio" name="delete[{orphan.ATTACH_ID}]" /></td>
|
||||
</tr>
|
||||
<!-- END orphan -->
|
||||
<tr class="row4">
|
||||
<td colspan="4"> </td>
|
||||
<td class="small"><a href="#" onclick="marklist('orphan', 'add', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('orphan', 'add', false); return false;">{L_UNMARK_ALL}</a></td>
|
||||
<td class="small"><a href="#" onclick="marklist('orphan', 'delete', true); return false;">{L_MARK_ALL}</a> :: <a href="#" onclick="marklist('orphan', 'delete', false); return false;">{L_UNMARK_ALL}</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- ELSE -->
|
||||
<div class="errorbox">
|
||||
<p>{L_NO_ATTACHMENTS}</p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<br />
|
||||
<!-- IF TOTAL_FILES -->
|
||||
<div class="pagination">
|
||||
{L_NUMBER_FILES}{L_COLON} {TOTAL_FILES} • {L_TOTAL_SIZE}{L_COLON} {TOTAL_SIZE}
|
||||
<!-- IF .pagination -->
|
||||
• <!-- INCLUDE pagination.html -->
|
||||
<!-- ELSE -->
|
||||
• {PAGE_NUMBER}
|
||||
<!-- ENDIF -->
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF .orphan -->
|
||||
<p class="submit-buttons">
|
||||
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />
|
||||
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
|
||||
</p>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<p class="submit-buttons">
|
||||
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />
|
||||
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
|
||||
</p>
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
</form>
|
||||
@@ -440,7 +463,7 @@
|
||||
<input class="button2" type="submit" name="submit" value="{L_DELETE_MARKED}" /><br />
|
||||
<p class="small">
|
||||
<a href="#" onclick="marklist('attachments', 'delete', true); return false;">{L_MARK_ALL}</a> •
|
||||
<a href="#" onclick="marklist('attachments', 'delete', false); return false;">{L_UNMARK_ALL}</a>
|
||||
<a href="#" onclick="marklist('attachments', 'delete', false); return false;">{L_UNMARK_ALL}</a>
|
||||
</p>
|
||||
</fieldset>
|
||||
<!-- ENDIF -->
|
||||
|
@@ -18,10 +18,11 @@
|
||||
<!-- BEGIN options -->
|
||||
<!-- IF options.S_LEGEND -->
|
||||
<!-- IF not options.S_FIRST_ROW -->
|
||||
</fieldset>
|
||||
</fieldset>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<fieldset>
|
||||
<legend>{options.LEGEND}</legend>
|
||||
<legend>{options.LEGEND}</legend>
|
||||
<!-- ELSE -->
|
||||
|
||||
<dl>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<p>{L_EXTENSIONS_EXPLAIN}</p>
|
||||
|
||||
<fieldset class="quick">
|
||||
<span class="small"><a href="https://www.phpbb.com/go/customise/extensions/3.1" target="_blank">{L_BROWSE_EXTENSIONS_DATABASE}</a> • <a href="{U_VERSIONCHECK_FORCE}">{L_VERSIONCHECK_FORCE_UPDATE_ALL}</a> • <a href="javascript:phpbb.toggleDisplay('version_check_settings');">{L_SETTINGS}</a></span>
|
||||
<span class="small"><a href="https://www.phpbb.com/go/customise/extensions/3.2" target="_blank">{L_BROWSE_EXTENSIONS_DATABASE}</a> • <a href="{U_VERSIONCHECK_FORCE}">{L_VERSIONCHECK_FORCE_UPDATE_ALL}</a> • <a href="javascript:phpbb.toggleDisplay('version_check_settings');">{L_SETTINGS}</a></span>
|
||||
</fieldset>
|
||||
|
||||
<form id="version_check_settings" method="post" action="{U_ACTION}" style="display:none">
|
||||
@@ -51,7 +51,8 @@
|
||||
<td><strong title="{enabled.NAME}">{enabled.META_DISPLAY_NAME}</strong><!-- EVENT acp_ext_list_enabled_name_after --></td>
|
||||
<td style="text-align: center;">
|
||||
<!-- IF enabled.S_VERSIONCHECK -->
|
||||
<strong <!-- IF enabled.S_UP_TO_DATE -->style="color: #228822;"<!-- ELSE -->style="color: #BC2A4D;"<!-- ENDIF -->>{enabled.META_VERSION}</strong>
|
||||
<strong class="<!-- IF enabled.S_UP_TO_DATE -->current-ext<!-- ELSE -->outdated-ext<!-- ENDIF -->">{enabled.META_VERSION}</strong>
|
||||
<!-- IF not enabled.S_UP_TO_DATE --><i class="fa fa-exclamation-circle outdated-ext" aria-hidden="true"></i><!-- ENDIF -->
|
||||
<!-- ELSE -->
|
||||
{enabled.META_VERSION}
|
||||
<!-- ENDIF -->
|
||||
@@ -76,7 +77,8 @@
|
||||
<td><strong title="{disabled.NAME}">{disabled.META_DISPLAY_NAME}</strong><!-- EVENT acp_ext_list_disabled_name_after --></td>
|
||||
<td style="text-align: center;">
|
||||
<!-- IF disabled.S_VERSIONCHECK -->
|
||||
<strong <!-- IF disabled.S_UP_TO_DATE -->style="color: #228822;"<!-- ELSE -->style="color: #BC2A4D;"<!-- ENDIF -->>{disabled.META_VERSION}</strong>
|
||||
<strong class="<!-- IF disabled.S_UP_TO_DATE -->current-ext<!-- ELSE -->outdated-ext<!-- ENDIF -->">{disabled.META_VERSION}</strong>
|
||||
<!-- IF not disabled.S_UP_TO_DATE --><i class="fa fa-exclamation-circle outdated-ext" aria-hidden="true"></i><!-- ENDIF -->
|
||||
<!-- ELSE -->
|
||||
{disabled.META_VERSION}
|
||||
<!-- ENDIF -->
|
||||
|
@@ -316,7 +316,7 @@
|
||||
<tbody>
|
||||
<!-- ELSE -->
|
||||
<tr>
|
||||
<td><strong>{groups.GROUP_NAME}</strong></td>
|
||||
<td><strong<!-- IF groups.GROUP_COLOR --> style="color: #{groups.GROUP_COLOR}"<!-- ENDIF -->>{groups.GROUP_NAME}</strong></td>
|
||||
<td style="text-align: center;">{groups.TOTAL_MEMBERS}</td>
|
||||
<td style="text-align: center;">{groups.PENDING_MEMBERS}</td>
|
||||
<td style="text-align: center;"><a href="{groups.U_EDIT}">{L_SETTINGS}</a></td>
|
||||
|
@@ -69,7 +69,7 @@
|
||||
<p>{L_ACP_LANGUAGE_PACKS_EXPLAIN}</p>
|
||||
|
||||
<fieldset class="quick">
|
||||
<span class="small"><a href="https://www.phpbb.com/go/customise/language-packs/3.1" target="_blank">{L_BROWSE_LANGUAGE_PACKS_DATABASE}</a></span>
|
||||
<span class="small"><a href="https://www.phpbb.com/go/customise/language-packs/3.2" target="_blank">{L_BROWSE_LANGUAGE_PACKS_DATABASE}</a></span>
|
||||
</fieldset>
|
||||
|
||||
<table class="table1 zebra-table">
|
||||
|
@@ -153,8 +153,14 @@
|
||||
<td><strong>{PHP_VERSION_INFO}</strong></td>
|
||||
<!-- IF S_TOTAL_ORPHAN -->
|
||||
<td>{L_NUMBER_ORPHAN}{L_COLON} </td>
|
||||
<td><strong>{TOTAL_ORPHAN}</strong></td>
|
||||
<!-- ELSE -->
|
||||
<td>
|
||||
<!-- IF TOTAL_ORPHAN > 0 -->
|
||||
<a href="{U_ATTACH_ORPHAN}" title="{L_MORE_INFORMATION}"><strong>{TOTAL_ORPHAN}</strong></a>
|
||||
<!-- ELSE -->
|
||||
<strong>{TOTAL_ORPHAN}</strong>
|
||||
<!-- ENDIF -->
|
||||
</td>
|
||||
<!-- ELSE -->
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<!-- ENDIF -->
|
||||
|
@@ -238,7 +238,7 @@
|
||||
<form id="profile_fields" method="post" action="{U_ACTION}">
|
||||
|
||||
<fieldset class="quick">
|
||||
<input class="text small" type="text" name="field_ident" /> <select name="field_type">{S_TYPE_OPTIONS}</select>
|
||||
<select name="field_type">{S_TYPE_OPTIONS}</select>
|
||||
<input class="button1" type="submit" name="submit" value="{L_CREATE_NEW_FIELD}" />
|
||||
<input type="hidden" name="create" value="1" />
|
||||
{S_FORM_TOKEN}
|
||||
|
@@ -94,7 +94,9 @@
|
||||
<dd><label><input type="radio" class="radio" name="prune_sticky" value="1" /> {L_YES}</label>
|
||||
<label><input type="radio" class="radio" id="sticky" name="prune_sticky" value="0" checked="checked" /> {L_NO}</label></dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<!-- EVENT acp_prune_forums_settings_append -->
|
||||
|
||||
<p class="quick">
|
||||
{S_HIDDEN_FIELDS}
|
||||
{S_FORM_TOKEN}
|
||||
|
@@ -33,7 +33,7 @@
|
||||
<!-- IF L_EXPLAIN --><p>{L_EXPLAIN}</p><!-- ENDIF -->
|
||||
|
||||
<fieldset class="quick">
|
||||
<span class="small"><a href="https://www.phpbb.com/go/customise/styles/3.1" target="_blank">{L_BROWSE_STYLES_DATABASE}</a></span>
|
||||
<span class="small"><a href="https://www.phpbb.com/go/customise/styles/3.2" target="_blank">{L_BROWSE_STYLES_DATABASE}</a></span>
|
||||
</fieldset>
|
||||
|
||||
<form id="acp_styles" method="post" action="{U_ACTION}">
|
||||
@@ -96,6 +96,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{L_STYLE_NAME}</th>
|
||||
<th width="10%" style="white-space: nowrap; text-align: center;">{L_STYLE_PHPBB_VERSION}</th>
|
||||
<!-- IF not STYLES_LIST_HIDE_COUNT --><th width="10%" style="white-space: nowrap; text-align: center;">{L_STYLE_USED_BY}</th><!-- ENDIF -->
|
||||
<th width="25%" style="white-space: nowrap; text-align: center;">{L_ACTIONS}</th>
|
||||
{STYLES_LIST_EXTRA}
|
||||
@@ -129,6 +130,7 @@
|
||||
<span class="style-path"><br />{L_STYLE_PATH}{L_COLON} {styles_list.STYLE_PATH_FULL}</span>
|
||||
<!-- ENDIF -->
|
||||
</td>
|
||||
<td class="{$ROW_CLASS} users">{styles_list.STYLE_PHPBB_VERSION}</td>
|
||||
<!-- IF not STYLES_LIST_HIDE_COUNT -->
|
||||
<td class="{$ROW_CLASS} users">{styles_list.USERS}</td>
|
||||
<!-- ENDIF -->
|
||||
|
@@ -231,6 +231,10 @@
|
||||
|
||||
<!-- INCLUDE permission_mask.html -->
|
||||
|
||||
<!-- ELSE -->
|
||||
|
||||
<!-- EVENT acp_users_mode_add -->
|
||||
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- INCLUDE overall_footer.html -->
|
||||
|
@@ -525,7 +525,6 @@ li {
|
||||
padding: 0;
|
||||
border-right: 1px solid #CCCFD3;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.rtl #menu {
|
||||
@@ -841,6 +840,7 @@ table.zebra-table tbody tr:nth-child(odd) {
|
||||
}
|
||||
|
||||
.row2 {
|
||||
word-break: break-all;
|
||||
background-color: #DCEBFE;
|
||||
}
|
||||
|
||||
@@ -1891,7 +1891,6 @@ li.pagination ul {
|
||||
color: #000;
|
||||
text-align: center;
|
||||
border: 1px solid #AAA;
|
||||
opacity: .95;
|
||||
}
|
||||
|
||||
.tooltip span.top {
|
||||
@@ -2461,6 +2460,9 @@ fieldset.permissions .padding {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.rtl .dropdown li {
|
||||
text-align: right;
|
||||
}
|
||||
.wrap .dropdown li, .dropdown.wrap li {
|
||||
white-space: normal;
|
||||
}
|
||||
@@ -2475,6 +2477,10 @@ fieldset.permissions .padding {
|
||||
width: 250px;
|
||||
}
|
||||
|
||||
.rtl .roles-options > .dropdown {
|
||||
right: auto;
|
||||
}
|
||||
|
||||
.roles-options {
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
@@ -2493,6 +2499,10 @@ fieldset.permissions .padding {
|
||||
background: url('../images/arrow_down.gif') no-repeat 245px .7em;
|
||||
}
|
||||
|
||||
.rtl .roles-options > span {
|
||||
background: url('../images/arrow_down.gif') no-repeat 7px .7em;
|
||||
}
|
||||
|
||||
.roles-options li {
|
||||
list-style: none;
|
||||
}
|
||||
@@ -2506,6 +2516,14 @@ fieldset.permissions .padding {
|
||||
/* Classes for additional tasks
|
||||
---------------------------------------- */
|
||||
|
||||
.current-ext {
|
||||
color: #228822;
|
||||
}
|
||||
|
||||
.outdated-ext {
|
||||
color: #BC2A4D;
|
||||
}
|
||||
|
||||
.phpinfo {
|
||||
overflow: auto;
|
||||
width: 99%;
|
||||
|
@@ -1,3 +1,4 @@
|
||||
<!-- IF FORM_TITLE --><h1>{FORM_TITLE}</h1><!-- ENDIF -->
|
||||
<form id="<!-- IF FORM_ID -->{FORM_ID}<!-- ELSE -->install_install<!-- ENDIF -->" method="POST" action="{U_ACTION}">
|
||||
<!-- IF .options -->
|
||||
<!-- IF S_NOT_ONLY_BUTTON_FORM -->
|
||||
@@ -8,9 +9,9 @@
|
||||
<!-- IF options.S_LEGEND -->
|
||||
<!-- IF not options.S_FIRST_ROW -->
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<!-- ENDIF -->
|
||||
<fieldset>
|
||||
|
||||
<legend>{options.LEGEND}</legend>
|
||||
<!-- ELSE -->
|
||||
<dl>
|
||||
@@ -49,7 +50,7 @@
|
||||
<fieldset class="submit-buttons">
|
||||
<legend>{L_SUBMIT}</legend>
|
||||
<!-- BEGIN submit_buttons -->
|
||||
<input class="button1" type="submit" name="{submit_buttons.KEY}" value="{submit_buttons.TITLE}" />
|
||||
<input class="<!-- IF not submit_buttons.IS_SECONDARY -->button1<!-- ELSE -->button2<!-- ENDIF --><!-- IF submit_buttons.DISABLED --> disabled<!-- ENDIF -->" type="submit" name="{submit_buttons.KEY}" value="{submit_buttons.TITLE}"<!-- IF submit_buttons.DISABLED --> disabled="disabled"<!-- ENDIF --> />
|
||||
<!-- END submit_buttons -->
|
||||
</fieldset>
|
||||
<!-- ENDIF -->
|
||||
|
@@ -41,7 +41,7 @@
|
||||
<dt style="width: 20%"><label for="role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}">{L_ROLE}{L_COLON}</label></dt>
|
||||
{% if p_mask.f_mask.role_options %}
|
||||
<dd style="margin-{S_CONTENT_FLOW_BEGIN}{L_COLON} 20%">
|
||||
<div class="dropdown-container dropdown-button-control roles-options" data-alt-text="{LA_ROLE_DESCRIPTION}">
|
||||
<div class="dropdown-container dropdown-{S_CONTENT_FLOW_END} dropdown-button-control roles-options" data-alt-text="{LA_ROLE_DESCRIPTION}">
|
||||
<select id="role{p_mask.S_ROW_COUNT}{p_mask.f_mask.S_ROW_COUNT}" name="role[{p_mask.f_mask.UG_ID}][{p_mask.f_mask.FORUM_ID}]">{p_mask.f_mask.S_ROLE_OPTIONS}</select>
|
||||
<span title="Roles" class="button icon-button tools-icon dropdown-trigger dropdown-select">{L_NO_ROLE_ASSIGNED}</span>
|
||||
<div class="dropdown hidden">
|
||||
|
@@ -130,10 +130,17 @@ phpbb.positionTooltip = function ($element) {
|
||||
$element = $element.parent();
|
||||
offset = $element.offset();
|
||||
|
||||
$('#_tooltip_container').css({
|
||||
top: offset.top + 30,
|
||||
left: offset.left - 205
|
||||
});
|
||||
if ($('body').hasClass('rtl')) {
|
||||
$('#_tooltip_container').css({
|
||||
top: offset.top + 30,
|
||||
left: offset.left + 255
|
||||
});
|
||||
} else {
|
||||
$('#_tooltip_container').css({
|
||||
top: offset.top + 30,
|
||||
left: offset.left - 205
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -27,9 +27,9 @@ phpbb.isTouch = (window && typeof window.ontouchstart !== 'undefined');
|
||||
*/
|
||||
phpbb.loadingIndicator = function() {
|
||||
if (!$loadingIndicator) {
|
||||
$loadingIndicator = $('<div />', {
|
||||
id: 'loading_indicator',
|
||||
class: 'loading_indicator',
|
||||
$loadingIndicator = $('<div />', {
|
||||
'id': 'loading_indicator',
|
||||
'class': 'loading_indicator'
|
||||
});
|
||||
$loadingIndicator.appendTo('#page-footer');
|
||||
}
|
||||
@@ -179,7 +179,7 @@ phpbb.alert.close = function($alert, fadedark) {
|
||||
phpbb.confirm = function(msg, callback, fadedark) {
|
||||
var $confirmDiv = $('#phpbb_confirm');
|
||||
$confirmDiv.find('.alert_text').html(msg);
|
||||
fadedark = fadedark || true;
|
||||
fadedark = typeof fadedark !== 'undefined' ? fadedark : true;
|
||||
|
||||
$(document).on('keydown.phpbb.alert', function(e) {
|
||||
if (e.keyCode === keymap.ENTER || e.keyCode === keymap.ESC) {
|
||||
@@ -194,9 +194,7 @@ phpbb.confirm = function(msg, callback, fadedark) {
|
||||
$confirmDiv.find('input[type="button"]').one('click.phpbb.confirmbox', function(e) {
|
||||
var confirmed = this.name === 'confirm';
|
||||
|
||||
if (confirmed) {
|
||||
callback(true);
|
||||
}
|
||||
callback(confirmed);
|
||||
$confirmDiv.find('input[type="button"]').off('click.phpbb.confirmbox');
|
||||
phpbb.alert.close($confirmDiv, fadedark || !confirmed);
|
||||
|
||||
@@ -937,9 +935,9 @@ phpbb.addAjaxCallback('alt_text', function() {
|
||||
$anchor.each(function() {
|
||||
var $this = $(this);
|
||||
altText = $this.attr('data-alt-text');
|
||||
$this.attr('data-alt-text', $this.text());
|
||||
$this.attr('title', $.trim(altText));
|
||||
$this.text(altText);
|
||||
$this.attr('data-alt-text', $.trim($this.text()));
|
||||
$this.attr('title', altText);
|
||||
$this.children('span').text(altText);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1333,6 +1331,7 @@ phpbb.toggleDropdown = function() {
|
||||
$this.css({
|
||||
marginLeft: 0,
|
||||
left: 0,
|
||||
marginRight: 0,
|
||||
maxWidth: (windowWidth - 4) + 'px'
|
||||
});
|
||||
|
||||
@@ -1644,7 +1643,7 @@ phpbb.lazyLoadAvatars = function loadAvatars() {
|
||||
});
|
||||
};
|
||||
|
||||
$(window).load(phpbb.lazyLoadAvatars);
|
||||
$(window).on('load', phpbb.lazyLoadAvatars);
|
||||
|
||||
/**
|
||||
* Apply code editor to all textarea elements with data-bbcode attribute
|
||||
@@ -1656,7 +1655,7 @@ $(function() {
|
||||
|
||||
phpbb.registerPageDropdowns();
|
||||
|
||||
$('#color_palette_placeholder').each(function() {
|
||||
$('[data-orientation]').each(function() {
|
||||
phpbb.registerPalette($(this));
|
||||
});
|
||||
|
||||
|
@@ -417,7 +417,7 @@ function getCaretPosition(txtarea) {
|
||||
|
||||
$('textarea').on('keydown', function (e) {
|
||||
if (e.which === 13 && (e.metaKey || e.ctrlKey)) {
|
||||
$(this).closest('form').submit();
|
||||
$(this).closest('form').find(':submit').click();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@@ -211,7 +211,7 @@ phpbb.plupload.updateHiddenData = function(row, attach, index) {
|
||||
.attr('type', 'hidden')
|
||||
.attr('name', 'attachment_data[' + index + '][' + key + ']')
|
||||
.attr('value', attach[key]);
|
||||
$('textarea', row).after(input);
|
||||
$(row).append(input);
|
||||
}
|
||||
};
|
||||
|
||||
|
18
phpBB/assets/plupload/plupload.full.min.js
vendored
18
phpBB/assets/plupload/plupload.full.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -71,8 +71,12 @@ require($phpbb_root_path . 'includes/compatibility_globals.' . $phpEx);
|
||||
|
||||
register_compatibility_globals();
|
||||
|
||||
/** @var \phpbb\config\config $config */
|
||||
$config = $phpbb_container->get('config');
|
||||
|
||||
/** @var \phpbb\language\language $language */
|
||||
$language = $phpbb_container->get('language');
|
||||
$language->set_default_language($config['default_lang']);
|
||||
$language->add_lang(array('common', 'acp/common', 'cli'));
|
||||
|
||||
/* @var $user \phpbb\user */
|
||||
|
@@ -4,7 +4,7 @@
|
||||
"type": "project",
|
||||
"keywords": ["phpbb", "forum"],
|
||||
"homepage": "https://www.phpbb.com",
|
||||
"license": "GPL-2.0",
|
||||
"license": "GPL-2.0-only",
|
||||
"authors": [
|
||||
{
|
||||
"name": "phpBB Limited",
|
||||
@@ -33,7 +33,7 @@
|
||||
"marc1706/fast-image-size": "^1.1",
|
||||
"paragonie/random_compat": "^1.4",
|
||||
"patchwork/utf8": "^1.1",
|
||||
"s9e/text-formatter": "~0.10.0",
|
||||
"s9e/text-formatter": "~0.13.0",
|
||||
"symfony/config": "^2.8",
|
||||
"symfony/console": "^2.8",
|
||||
"symfony/debug": "^2.8",
|
||||
@@ -69,7 +69,7 @@
|
||||
},
|
||||
"config": {
|
||||
"platform": {
|
||||
"php": "5.4"
|
||||
"php": "5.4.7"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
544
phpBB/composer.lock
generated
544
phpBB/composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -3,6 +3,7 @@ services:
|
||||
class: phpbb\avatar\manager
|
||||
arguments:
|
||||
- '@config'
|
||||
- '@dispatcher'
|
||||
- '@avatar.driver_collection'
|
||||
|
||||
# ----- Avatar drivers -----
|
||||
|
@@ -3,7 +3,6 @@ services:
|
||||
class: phpbb\console\exception_subscriber
|
||||
arguments:
|
||||
- '@language'
|
||||
- '%debug.exceptions%'
|
||||
tags:
|
||||
- { name: kernel.event_subscriber }
|
||||
|
||||
|
@@ -9,6 +9,7 @@ services:
|
||||
arguments:
|
||||
- '@template'
|
||||
- '@language'
|
||||
- '%debug.exceptions%'
|
||||
tags:
|
||||
- { name: kernel.event_subscriber }
|
||||
|
||||
|
@@ -18,9 +18,10 @@ services:
|
||||
class: phpbb\feed\helper
|
||||
arguments:
|
||||
- '@config'
|
||||
- '@service_container'
|
||||
- '@path_helper'
|
||||
- '@text_formatter.renderer'
|
||||
- '@user'
|
||||
- '%core.root_path%'
|
||||
- '%core.php_ext%'
|
||||
|
||||
feed.forum:
|
||||
class: phpbb\feed\forum
|
||||
@@ -78,6 +79,10 @@ services:
|
||||
- '@dispatcher'
|
||||
- '%core.php_ext%'
|
||||
|
||||
feed.quote_helper:
|
||||
class: phpbb\feed\quote_helper
|
||||
parent: text_formatter.s9e.quote_helper
|
||||
|
||||
feed.topic:
|
||||
class: phpbb\feed\topic
|
||||
shared: false
|
||||
|
@@ -26,6 +26,11 @@ services:
|
||||
text_formatter.utils:
|
||||
alias: text_formatter.s9e.utils
|
||||
|
||||
text_formatter.s9e.bbcode_merger:
|
||||
class: phpbb\textformatter\s9e\bbcode_merger
|
||||
arguments:
|
||||
- '@text_formatter.s9e.factory'
|
||||
|
||||
text_formatter.s9e.factory:
|
||||
class: phpbb\textformatter\s9e\factory
|
||||
arguments:
|
||||
@@ -34,6 +39,7 @@ services:
|
||||
- '@dispatcher'
|
||||
- '@config'
|
||||
- '@text_formatter.s9e.link_helper'
|
||||
- '@log'
|
||||
- '%text_formatter.cache.dir%'
|
||||
- '%text_formatter.cache.parser.key%'
|
||||
- '%text_formatter.cache.renderer.key%'
|
||||
|
@@ -33,13 +33,6 @@ services:
|
||||
tags:
|
||||
- { name: install_obtain_data, order: 40 }
|
||||
|
||||
installer.obtain_data.obtain_imagick_path:
|
||||
class: phpbb\install\module\obtain_data\task\obtain_imagick_path
|
||||
arguments:
|
||||
- '@installer.helper.config'
|
||||
tags:
|
||||
- { name: install_obtain_data, order: 60 }
|
||||
|
||||
installer.obtain_data.obtain_server_data:
|
||||
class: phpbb\install\module\obtain_data\task\obtain_server_data
|
||||
arguments:
|
||||
|
@@ -185,7 +185,7 @@ while ($row = $db->sql_fetchrow($result))
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (sizeof($remove_auth_options))
|
||||
if (count($remove_auth_options))
|
||||
{
|
||||
$db->sql_query('DELETE FROM ' . ACL_USERS_TABLE . ' WHERE auth_option_id IN (' . implode(', ', $remove_auth_options) . ')');
|
||||
$db->sql_query('DELETE FROM ' . ACL_GROUPS_TABLE . ' WHERE auth_option_id IN (' . implode(', ', $remove_auth_options) . ')');
|
||||
@@ -199,7 +199,7 @@ $prefixes = array('f_', 'a_', 'm_', 'u_');
|
||||
foreach ($prefixes as $prefix)
|
||||
{
|
||||
$var = $prefix . 'permissions';
|
||||
if (sizeof(${$var}))
|
||||
if (count(${$var}))
|
||||
{
|
||||
foreach (${$var} as $auth_option => $l_ary)
|
||||
{
|
||||
|
@@ -51,7 +51,7 @@ function check_table_flash_bbcodes($table_name, $id_field, $content_field, $uid_
|
||||
|
||||
$ids = get_table_flash_bbcode_pkids($table_name, $id_field, $content_field, $uid_field, $bitfield_field);
|
||||
|
||||
$size = sizeof($ids);
|
||||
$size = count($ids);
|
||||
if ($size)
|
||||
{
|
||||
echo "Found $size potentially dangerous flash bbcodes.\n";
|
||||
|
@@ -489,12 +489,12 @@ foreach ($lang_references as $lang_var => $filenames)
|
||||
|
||||
$html_data .= '<b>' . $lang_var . '</b><ul>';
|
||||
|
||||
if (sizeof($filenames) != 1)
|
||||
if (count($filenames) != 1)
|
||||
{
|
||||
fwrite($common_fp, (($entry['common']) ? ",\n" : '') . "\t'$var' => '" . $lang[$var] . "'");
|
||||
$entry['common'] = true;
|
||||
}
|
||||
else if (sizeof($filenames) == 1)
|
||||
else if (count($filenames) == 1)
|
||||
{
|
||||
// Merge logical - hardcoded
|
||||
$fname = (preg_match('#^(' . implode('|', $merge) . ')#', $filenames[0], $match)) ? $match[0] . '.php' : str_replace($ext, 'php', $filenames[0]);
|
||||
|
@@ -120,7 +120,7 @@ do
|
||||
$pct_encoded = "%[\dA-F]{2}";
|
||||
$unreserved = "$add_chars\pL0-9\-._~";
|
||||
$sub_delims = ($inline) ? '!$&\'(*+,;=' : '!$&\'()*+,;=';
|
||||
$scheme = ($inline) ? '[a-z][a-z\d+]*': '[a-z][a-z\d+\-.]*' ; // avoid automatic parsing of "word" in "last word.http://..."
|
||||
$scheme = ($inline) ? '[a-z][a-z\d+]*(?<!javascript)': '[a-z][a-z\d+\-.]*(?<!javascript)' ; // avoid automatic parsing of "word" in "last word.http://..."
|
||||
$pchar = "(?:[^$remove_chars]*[$unreserved$sub_delims:@|]+|$pct_encoded)"; // rfc: no "|"
|
||||
|
||||
$reg_name = "(?:[^$remove_chars]*[$unreserved$sub_delims:@|]+|$pct_encoded)+"; // rfc: * instead of + and no "|" and no "@" and no ":" (included instead of userinfo)
|
||||
|
@@ -89,7 +89,7 @@ for(;$postcounter <= $max_post_id; $postcounter += $batchsize)
|
||||
$rowset = $db->sql_fetchrowset($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$post_rows = sizeof($rowset);
|
||||
$post_rows = count($rowset);
|
||||
|
||||
if( $post_rows )
|
||||
{
|
||||
|
@@ -50,6 +50,12 @@
|
||||
<ol>
|
||||
<li><a href="#changelog">Changelog</a>
|
||||
<ul>
|
||||
<li><a href="#v324rc1">Changes since 3.2.4-RC1</a></li>
|
||||
<li><a href="#v323">Changes since 3.2.3</a></li>
|
||||
<li><a href="#v323rc2">Changes since 3.2.3-RC2</a></li>
|
||||
<li><a href="#v323rc1">Changes since 3.2.3-RC1</a></li>
|
||||
<li><a href="#v322">Changes since 3.2.2</a></li>
|
||||
<li><a href="#v321">Changes since 3.2.1</a></li>
|
||||
<li><a href="#v320">Changes since 3.2.0</a></li>
|
||||
<li><a href="#v320rc1">Changes since 3.2.0-RC1</a></li>
|
||||
<li><a href="#v320b2">Changes since 3.2.0-b2</a></li>
|
||||
@@ -57,6 +63,7 @@
|
||||
<li><a href="#v320a2">Changes since 3.2.0-a2</a></li>
|
||||
<li><a href="#v320a1">Changes since 3.2.0-a1</a></li>
|
||||
<li><a href="#v31x">Changes since 3.1.x</a></li>
|
||||
<li><a href="#v3111">Changes since 3.1.11</a></li>
|
||||
<li><a href="#v3110">Changes since 3.1.10</a></li>
|
||||
<li><a href="#v319">Changes since 3.1.9</a></li>
|
||||
<li><a href="#v318">Changes since 3.1.8</a></li>
|
||||
@@ -126,6 +133,356 @@
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
<a name="v324rc1"></a><h3>Changes since 3.2.4-RC1</h3>
|
||||
<h4>Bug</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15860">PHPBB3-15860</a>] - Backups filenames arent saved in the expected format</li>
|
||||
</ul>
|
||||
<h4>Security Issue</h4>
|
||||
<ul>
|
||||
<li>[SECURITY-227] - Phar deserialization in ACP leads to Remote Code Execution</li>
|
||||
</ul>
|
||||
|
||||
<a name="v323"></a><h3>Changes since 3.2.3</h3>
|
||||
<h4>Bug</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11453">PHPBB3-11453</a>] - phpbb_notification_method_email unnecessarily loads data of banned users.</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12430">PHPBB3-12430</a>] - hilit not removed from URL after search</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13043">PHPBB3-13043</a>] - Fixing HTML5 conformance</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13128">PHPBB3-13128</a>] - sql_query_info, max_matches and charset_type removed from sphinxsearch 2.2.2-beta</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14812">PHPBB3-14812</a>] - No shadow pruning with system cron enabled</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15329">PHPBB3-15329</a>] - View/Edit drafts contain underlying HTML coding</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15420">PHPBB3-15420</a>] - Quote Notification Sent for Edited Posts by Non Author</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15494">PHPBB3-15494</a>] - Users can only be removed once from newly registered users</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15507">PHPBB3-15507</a>] - PHP 7.2 Warning</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15544">PHPBB3-15544</a>] - Migrations don't delete modules in every case</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15552">PHPBB3-15552</a>] - Private Message (PM) "find a member" button "select marked" not working</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15557">PHPBB3-15557</a>] - Used composer version has bug with PHP 7.2</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15583">PHPBB3-15583</a>] - Updating session time in AJAX request ignores 60 seconds check</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15593">PHPBB3-15593</a>] - Disabling "print view" (permission or private messages settings) actually doesn't block the feature</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15600">PHPBB3-15600</a>] - Ban reasons are not escaped in mcp_ban.html template</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15604">PHPBB3-15604</a>] - Appveyor builds unable to download and unpack MSSQL drivers</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15606">PHPBB3-15606</a>] - Hide/Reveal 'Profile' Link According to Permission Setting</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15607">PHPBB3-15607</a>] - Board's cookies not deleted on disabled board</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15611">PHPBB3-15611</a>] - Prosilver mobile layout: Misaligned text in user profile</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15612">PHPBB3-15612</a>] - PHP warning with MSSQL on PHP 7.2</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15616">PHPBB3-15616</a>] - Jumpbox doesn't display in the login forum page (access to forum with password)</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15618">PHPBB3-15618</a>] - Team page link always appears when you are logout (anonymous), even if you don't have the permission (unlike memberlist link)</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15619">PHPBB3-15619</a>] - Legends of custom profile fields could be hidden in memberlist, when viewing an user group</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15620">PHPBB3-15620</a>] - Avatar gallery can be unusable on multilingual boards, unless people use the board default language</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15622">PHPBB3-15622</a>] - Quoting messages (while viewing one, not inside post editor) can return a wrong chain</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15637">PHPBB3-15637</a>] - Event list only has first line of PHP event description</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15651">PHPBB3-15651</a>] - Migration 'if' conditions only support booleans</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15659">PHPBB3-15659</a>] - retrieve_block_vars generates warnings in PHP 7.2</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15666">PHPBB3-15666</a>] - Language system is not fully supported in Twig</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15670">PHPBB3-15670</a>] - Group forum permission: Can see forum gives NO SQL ERROR</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15673">PHPBB3-15673</a>] - Duplicated links for (ACP,MCP,FAQ) in QuickLinks and main nav bar</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15680">PHPBB3-15680</a>] - INSTALL.html should point to 3.2 documentation instead of 3.1</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15693">PHPBB3-15693</a>] - gen_rand_string() don't return a string with the expected length</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15695">PHPBB3-15695</a>] - gen_rand_string can return less characters than expected</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15700">PHPBB3-15700</a>] - {T_THEME_LANG_NAME} template variable could be wrong when log off</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15705">PHPBB3-15705</a>] - phpbbcli language parse error in PHP <= 5.5.38</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15716">PHPBB3-15716</a>] - OAuth link information remains after deleting a user, causes fatal exception</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15717">PHPBB3-15717</a>] - Old email address missing from log when user changes email address</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15723">PHPBB3-15723</a>] - gen_rand_string() return wrong number or characters sometimes</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15733">PHPBB3-15733</a>] - Remove unused variables related to deprecated flood control</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15742">PHPBB3-15742</a>] - Remove get_magic_quotes_gpc from type_cast_helper</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15751">PHPBB3-15751</a>] - Warning when update with CLI</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15755">PHPBB3-15755</a>] - Broken events in /phpbb/attachment/delete.php</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15758">PHPBB3-15758</a>] - String INSECURE_REDIRECT is not shown translated</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15770">PHPBB3-15770</a>] - Sphinx assertion fails on unread posts when exceeding an offset of 999</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15788">PHPBB3-15788</a>] - Return button from privacy policy shows wrong text</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15817">PHPBB3-15817</a>] - Unable to install in Oracle 11R2 Express</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15824">PHPBB3-15824</a>] - UI test framework Broken for extensions</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15830">PHPBB3-15830</a>] - 'core.modify_notification_message' event is useless</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15849">PHPBB3-15849</a>] - PHP 7.2 compat for bitfield class</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15852">PHPBB3-15852</a>] - IPv6 address not working in Whois</li>
|
||||
</ul>
|
||||
<h4>Improvement</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10432">PHPBB3-10432</a>] - Don't require username when user forgets password</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11500">PHPBB3-11500</a>] - on Custom profile fields the field_ident field lacks name</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12739">PHPBB3-12739</a>] - Make the font color palette in ACP same as Prosilver</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14656">PHPBB3-14656</a>] - Add a list-unsubscribe header with the unsubscribe URL</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14990">PHPBB3-14990</a>] - Add core event to the Twig environment</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15554">PHPBB3-15554</a>] - Simple footer after load js</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15579">PHPBB3-15579</a>] - Add core.ucp_main_front_modify_sql and core.ucp_main_front_modify_template_vars</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15590">PHPBB3-15590</a>] - Add PHP events after adding, updating and deleting BBCodes</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15628">PHPBB3-15628</a>] - newtopic_notify.txt does not have directly link to the new topic</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15638">PHPBB3-15638</a>] - Add word-break for overflowing.</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15642">PHPBB3-15642</a>] - String to be used in HTML element contains ">"</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15656">PHPBB3-15656</a>] - Add "View post" link in the mod logs on the ACP</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15661">PHPBB3-15661</a>] - Add core.viewtopic_modify_poll_ajax_data</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15662">PHPBB3-15662</a>] - Add $this->template to core.modify_notification_message</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15668">PHPBB3-15668</a>] - Change JQuery .load(fn) event to .on('load',fn)</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15674">PHPBB3-15674</a>] - Edit language lines in file en\acp\profile.php</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15683">PHPBB3-15683</a>] - Better error message when commit message has CRLF</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15696">PHPBB3-15696</a>] - 'if' module tool should support calling other tools</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15706">PHPBB3-15706</a>] - [Template] - mcp_post_report_buttons_top_*</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15719">PHPBB3-15719</a>] - Add core event on viewtopic post_list query for query modification</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15726">PHPBB3-15726</a>] - Implement selective purge in APCu cache driver</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15735">PHPBB3-15735</a>] - [Template] - *_content_after (for posts)</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15737">PHPBB3-15737</a>] - [PHP] - Add $user_rows to core.delete_user_before</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15762">PHPBB3-15762</a>] - Topics per page Conformity</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15768">PHPBB3-15768</a>] - Add a license to a repository</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15771">PHPBB3-15771</a>] - Q&A configuration instructions not optilmal</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15799">PHPBB3-15799</a>] - Find correct poll for voting animation</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15803">PHPBB3-15803</a>] - Add core events on ucp_pm_compose for additional message list actions</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15819">PHPBB3-15819</a>] - Add core event to functions_posting to modify notifications</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15825">PHPBB3-15825</a>] - Add core.acp_manage_forums_move_content_sql_before</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15826">PHPBB3-15826</a>] - Add core.mcp_main_fork_sql_after</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15827">PHPBB3-15827</a>] - [Template] - Add *_username_{prepend/append} template events</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15831">PHPBB3-15831</a>] - ACP signature update should trigger event</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15832">PHPBB3-15832</a>] - ACP avatar update event</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15833">PHPBB3-15833</a>] - ACP and UCP avatar delete events</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15837">PHPBB3-15837</a>] - Add core.ucp_register_welcome_email_before</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15838">PHPBB3-15838</a>] - Add core.ucp_register_register_after</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15839">PHPBB3-15839</a>] - Add core.ucp_login_link_template_after</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15841">PHPBB3-15841</a>] - Allow postrow pm link to be modified by event</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15848">PHPBB3-15848</a>] - Up-version plupload to v2.3.6 to fix image rotation issues</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15850">PHPBB3-15850</a>] - Use standard SQL cache for notification types</li>
|
||||
</ul>
|
||||
<h4>New Feature</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15792">PHPBB3-15792</a>] - [Template] - confirm_delete_body_delete_reason_before</li>
|
||||
</ul>
|
||||
<h4>Task</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15596">PHPBB3-15596</a>] - Migrate from data-vocabulary.org to schema.org</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15621">PHPBB3-15621</a>] - Some graphical inconsistencies with colored users groups in posting, UCP and MCP</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15701">PHPBB3-15701</a>] - {SIGNATURE} variable is added in mcp_post.html but not defined in MCP</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15809">PHPBB3-15809</a>] - Allow events with twig syntax</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15857">PHPBB3-15857</a>] - Add rubencm to CREDITS.txt</li>
|
||||
</ul>
|
||||
|
||||
<a name="v323rc2"></a><h3>Changes since 3.2.3-RC2</h3>
|
||||
<h4>Bug</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15504">PHPBB3-15504</a>] - phpBB Debug warning in 3.2.2</li>
|
||||
</ul>
|
||||
<h4>Improvement</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15740">PHPBB3-15740</a>] - Terms & Privavy hardcoded</li>
|
||||
</ul>
|
||||
|
||||
<a name="v323rc1"></a><h3>Changes since 3.2.3-RC1</h3>
|
||||
<h4>Bug</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11847">PHPBB3-11847</a>] - auth_provider_oauth migration must depend on at least one migration that ensures the module tables exist as expected</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15548">PHPBB3-15548</a>] - Dead link in ACP_COOKIE_SETTINGS_EXPLAIN language entry</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15586">PHPBB3-15586</a>] - When creating a module without the modes array a missing 'module_langname' index is accessed</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15613">PHPBB3-15613</a>] - Notification dropdown said to be not RTL compliant</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15627">PHPBB3-15627</a>] - Improve wording of YES_ACCURATE_PM_BUTTON + EXPLAIN</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15678">PHPBB3-15678</a>] - PHP warning in filesystem.php</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15731">PHPBB3-15731</a>] - Fix acp_search language parameters when deleting index</li>
|
||||
</ul>
|
||||
<h4>Improvement</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15630">PHPBB3-15630</a>] - Change <b> to <strong> </li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15633">PHPBB3-15633</a>] - Remove extra space in GROUP_MAX_RECIPIENTS_EXPLAIN</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15657">PHPBB3-15657</a>] - Add core.mcp_queue_get_posts_for_posts_query_before and core.mcp_queue_get_posts_modify_post_row</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15676">PHPBB3-15676</a>] - Display privacy policy & terms of use more prominently</li>
|
||||
</ul>
|
||||
<h4>Task</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15677">PHPBB3-15677</a>] - Updated dependencies for 3.2.3-RC2</li>
|
||||
</ul>
|
||||
|
||||
<a name="v322"></a><h3>Changes since 3.2.2</h3>
|
||||
<h4>Bug</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14936">PHPBB3-14936</a>] - Missing language variable INST_ERR_DB</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15491">PHPBB3-15491</a>] - Outdated linkes in installer support page</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15492">PHPBB3-15492</a>] - Permissions role combobox does not work in RTL</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15500">PHPBB3-15500</a>] - Docs outdated for new PHP 5.4.7 requirement</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15502">PHPBB3-15502</a>] - Errors in migrations in 3.2.2 release</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15506">PHPBB3-15506</a>] - Previewing new post empties attachment list of all but first attachment</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15512">PHPBB3-15512</a>] - Avoid reparsing non-existent polls</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15513">PHPBB3-15513</a>] - Signature edit in acp gives error</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15520">PHPBB3-15520</a>] - DbDriver->sql_build_query cant cope with sub-selects</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15522">PHPBB3-15522</a>] - Allow multiple color palettes per page</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15523">PHPBB3-15523</a>] - AdBlocker may cause JS error when using CookieConsent</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15525">PHPBB3-15525</a>] - composer.json License is Invalid/Deprecated</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15526">PHPBB3-15526</a>] - Cast bbcode ID to integer</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15527">PHPBB3-15527</a>] - Cannot interpret the BBCode definition</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15532">PHPBB3-15532</a>] - Update pull request template</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15533">PHPBB3-15533</a>] - Typo in viewtopic_topic_tools.html</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15558">PHPBB3-15558</a>] - phpbb\report\report_handler_post.php</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15559">PHPBB3-15559</a>] - phpbb\report\report_handler_pm.php:56</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15595">PHPBB3-15595</a>] - Migration Module Exists Tool Broken</li>
|
||||
</ul>
|
||||
<h4>Improvement</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12579">PHPBB3-12579</a>] - Add BUTTON_ language strings for post & PM buttons</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15495">PHPBB3-15495</a>] - Use transactions for queries in move_forum</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15499">PHPBB3-15499</a>] - Drop HHVM support</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15510">PHPBB3-15510</a>] - Link Orphan attachments in ACP>General to Orphaned attachments page </li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15514">PHPBB3-15514</a>] - Improve accessibility by adding vital info from explanation to a title</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15518">PHPBB3-15518</a>] - Do not attempt to accurately determine whether posters can read private messages in viewtopic</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15528">PHPBB3-15528</a>] - Display the version of the installed styles in acp</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15529">PHPBB3-15529</a>] - Color groups in ACP</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15531">PHPBB3-15531</a>] - Log malformed BBCodes</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15534">PHPBB3-15534</a>] - Outdated ACP extensions database link for phpBB 3.2</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15535">PHPBB3-15535</a>] - Add S_FIRST_POST to postrow on viewtopic</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15537">PHPBB3-15537</a>] - Add events core.search_(native|mysql|postgres|sphinx)_index_before</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15547">PHPBB3-15547</a>] - Add file object to event core.avatar_driver_upload_move_file_before</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15561">PHPBB3-15561</a>] - Add core events for adding columns to MySQL and Postgres search backends</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15568">PHPBB3-15568</a>] - Update depencies to latest versions</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15569">PHPBB3-15569</a>] - Adjust update instructions to suggest file replacement method</li>
|
||||
</ul>
|
||||
<h4>New Feature</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15398">PHPBB3-15398</a>] - Add event to oauth login after ID check</li>
|
||||
</ul>
|
||||
<h4>Security Issue</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15570">PHPBB3-15570</a>] - Extension version check is restricted to TLS 1.0</li>
|
||||
</ul>
|
||||
<h4>Task</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15466">PHPBB3-15466</a>] - Move Nils in CREDITS.txt</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15516">PHPBB3-15516</a>] - Add instructions on running UI tests</li>
|
||||
</ul>
|
||||
|
||||
<a name="v321"></a><h3>Changes since 3.2.1</h3>
|
||||
<h4>Security Issue</h4>
|
||||
<ul>
|
||||
<li>[SECURITY-211] - URLs with javascript scheme should not be made clickable</li>
|
||||
</ul>
|
||||
<h4>Bug</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-7845">PHPBB3-7845</a>] - Error on posting local image when script path is empty</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13214">PHPBB3-13214</a>] - Contact us page textarea looks narrow in responsive mode</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14629">PHPBB3-14629</a>] - acp global quick reply will not enable quick reply correctly</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14857">PHPBB3-14857</a>] - ordinal suffix in dateformat is not handled in translations</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15041">PHPBB3-15041</a>] - Cannot delete Orphaned Attachments when large number of attachments</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15060">PHPBB3-15060</a>] - Online user list fails on notifications</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15089">PHPBB3-15089</a>] - Enable/Disable settings backwards for Cookie Secure</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15133">PHPBB3-15133</a>] - Fast image size library sometimes returns no size or invalid sizes</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15149">PHPBB3-15149</a>] - Unexpected Ctrl+Enter behavior on reply</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15171">PHPBB3-15171</a>] - Confusing bitfield values</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15172">PHPBB3-15172</a>] - $request->server('server_port') is returning wrong port</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15174">PHPBB3-15174</a>] - Unable to purge cache (ext & acp)</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15195">PHPBB3-15195</a>] - Code direction in print view is not defined as "ltr"</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15201">PHPBB3-15201</a>] - Removing style sets user_style to 0</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15224">PHPBB3-15224</a>] - Advanced search in "message text only" crashes with SQL error when using Mysql fulltext search index</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15245">PHPBB3-15245</a>] - Relative URLs in atom feeds broken when accessing via app.php</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15262">PHPBB3-15262</a>] - WebFontConfig google families script issue in 3.2.1</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15266">PHPBB3-15266</a>] - Content visibility events do not allow what they describe</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15273">PHPBB3-15273</a>] - 'COOKIE_PATH_EXPLAIN' does not make sense</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15285">PHPBB3-15285</a>] - Travis tests are failing due to trusty changes</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15292">PHPBB3-15292</a>] - Retina imageset is blurry when displayed in Chrome browser</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15297">PHPBB3-15297</a>] - Current date in board index is broken into lines in RTL</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15298">PHPBB3-15298</a>] - Errors being suppressed in cli</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15303">PHPBB3-15303</a>] - Typo in memcached driver</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15306">PHPBB3-15306</a>] - Error and missing information in core.acp_users_profile_validate event</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15309">PHPBB3-15309</a>] - Improved fix for pagination layout in tables</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15314">PHPBB3-15314</a>] - Wrong class constructor definition for convertor component</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15319">PHPBB3-15319</a>] - Database update v310\style_update_p2 fails to drop sequences</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15320">PHPBB3-15320</a>] - Redis cache does not save keys with expiration date 0 (no expiration)</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15322">PHPBB3-15322</a>] - Wrong return Return-Path in emails</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15331">PHPBB3-15331</a>] - Gravatars cannot be overridden</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15332">PHPBB3-15332</a>] - Dark background is always removed after confirm popup</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15333">PHPBB3-15333</a>] - Callback isn't called when confirm dialog is canceled</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15339">PHPBB3-15339</a>] - Missing acp_send_statistics -> Upgrading to 3.2.0 fails for phpBB 3.0.5</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15346">PHPBB3-15346</a>] - The installer tries to enable all extensions even if they are not enableable</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15347">PHPBB3-15347</a>] - Password updater in cron generates invalid postgres SQL</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15349">PHPBB3-15349</a>] - Cli doesn't check if an extension is enableable before enable it</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15350">PHPBB3-15350</a>] - Links to Plural rules are outdated</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15351">PHPBB3-15351</a>] - Confirm box function does not work with symlink on server config</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15353">PHPBB3-15353</a>] - Invalid HTML in ACP board settings</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15355">PHPBB3-15355</a>] - Empty version field in versioncheck when using the latest version</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15356">PHPBB3-15356</a>] - Avatar remote upload doesn't work</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15361">PHPBB3-15361</a>] - Topic / Forum Icons Look Withered (on Safari)</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15362">PHPBB3-15362</a>] - Excessive value for {NOTIFICATION_TYPES_COLS}</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15365">PHPBB3-15365</a>] - Fix invalidating OPcache</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15367">PHPBB3-15367</a>] - Sphinx search backend doesn't escape special characters</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15368">PHPBB3-15368</a>] - Schema upgrade fails in 3.2.1 when using SQL Server</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15379">PHPBB3-15379</a>] - Reparser cron will always run</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15381">PHPBB3-15381</a>] - L_CONTACT_US_ENABLE_EXPLAIN should specify that "Enable board-wide emails" is also needed for it to work</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15390">PHPBB3-15390</a>] - Admin permissions role tooltip popup has vertical bar running through it.</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15396">PHPBB3-15396</a>] - revert_schema() steps not executed in correct order</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15401">PHPBB3-15401</a>] - Use separate constant for memcached driver config</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15419">PHPBB3-15419</a>] - Sphinx does not search UTF keywords in delta index</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15423">PHPBB3-15423</a>] - Wrong title for topic's "Unappproved posts" icon</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15432">PHPBB3-15432</a>] - Don't remove dark background if fadedark is false</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15433">PHPBB3-15433</a>] - phpbbcli can enable non-existent extension</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15445">PHPBB3-15445</a>] - Git Contribution Guidelines in README.md is outdated</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15464">PHPBB3-15464</a>] - Can't reparse [IMG] - in uppercase</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15475">PHPBB3-15475</a>] - Restore Travis PR commit message validation</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15478">PHPBB3-15478</a>] - core.js $loadingIndicator JavaScript errors</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15489">PHPBB3-15489</a>] - Wrong footer text on forum of type "category"</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15496">PHPBB3-15496</a>] - SQL Error in PostgreSQL Fulltext search when results displayed as topics</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15497">PHPBB3-15497</a>] - Declaration of admin_activate_user::create_insert_array not compatible with base</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15498">PHPBB3-15498</a>] - confirm_box() adds duplicate strings to URLs in extensions</li>
|
||||
</ul>
|
||||
<h4>Improvement</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-7488">PHPBB3-7488</a>] - View Only - Categories: No Message</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9819">PHPBB3-9819</a>] - Move functions definitions out of mcp.php and includes/mcp/mcp_*.php</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12291">PHPBB3-12291</a>] - Allow extensions to use custom topic icons</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12939">PHPBB3-12939</a>] - Drop support for IE <11 on January 2016</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14677">PHPBB3-14677</a>] - Extension update check is not very colorblind / colourblind friendly.</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14820">PHPBB3-14820</a>] - Style Version Missing</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14919">PHPBB3-14919</a>] - Inconsistent use of globals vs class elements in acp_extensions</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14927">PHPBB3-14927</a>] - event core.user_add_modify_data</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14944">PHPBB3-14944</a>] - Add possibility to search for template loop indexes by key</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14950">PHPBB3-14950</a>] - Add possibility to delete a template block with alter_block_array</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14979">PHPBB3-14979</a>] - Remove underline from unread icon</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14994">PHPBB3-14994</a>] - Refactor template->assign_block_var to be consistent with alter_block_array</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14995">PHPBB3-14995</a>] - Add ACP template events acp_ext_list_*_name_after</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15111">PHPBB3-15111</a>] - Fix the typo in ucp_pm_view_messsage</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15134">PHPBB3-15134</a>] - Avatar upload driver should use filesystem service</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15247">PHPBB3-15247</a>] - Add driver for APCu v5.x cache</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15267">PHPBB3-15267</a>] - Hide birthday block if the user cannot view profile</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15291">PHPBB3-15291</a>] - Allow short array notation in event declarations</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15293">PHPBB3-15293</a>] - Prevent skipping file changes in automatic updater</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15307">PHPBB3-15307</a>] - Allow extensions to add custom modes to acp_users module</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15328">PHPBB3-15328</a>] - Disable email/jabber checkbox if notification method isn't supported</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15340">PHPBB3-15340</a>] - Update to plupload 2.3.1, stable for one year</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15352">PHPBB3-15352</a>] - Add text to clarify forum descriptions won't display on categories</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15374">PHPBB3-15374</a>] - Add core event to modify page title in viewforum.php</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15384">PHPBB3-15384</a>] - Add linebreaks to SMTP configuration option explanations</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15385">PHPBB3-15385</a>] - nginx sample config: www redirection, security regex</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15387">PHPBB3-15387</a>] - prosilver: vertical bars on forum rows on index page not full height</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15389">PHPBB3-15389</a>] - Simplify migration between event names</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15391">PHPBB3-15391</a>] - Remove not needed image rendering from topic/forum images</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15394">PHPBB3-15394</a>] - Add $user_cache and $post_edit_list to core.viewtopic_modify_post_row</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15408">PHPBB3-15408</a>] - Reject duplicate BBCodes in ACP</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15409">PHPBB3-15409</a>] - Add u_action to core.acp_users_overview_run_quicktool</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15442">PHPBB3-15442</a>] - Allow unsafe HTML in bbcode.html</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15444">PHPBB3-15444</a>] - Merge duplicate BBCodes via a migration</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15446">PHPBB3-15446</a>] - Add event core.acp_profile_action</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15447">PHPBB3-15447</a>] - Add event core.acp_profile_modify_profile_row</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15451">PHPBB3-15451</a>] - [EVENT] - mcp_topic_postrow_attachments_before/after</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15452">PHPBB3-15452</a>] - [EVENT] - mcp_topic_postrow_post_before</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15453">PHPBB3-15453</a>] - Add event in acp_language after delete language</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15454">PHPBB3-15454</a>] - event - mcp_queue_approve_details_template</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15470">PHPBB3-15470</a>] - attachment boxes need there own font-size</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15471">PHPBB3-15471</a>] - Add core events to ACP when pruning a forum</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15476">PHPBB3-15476</a>] - Add core event before search rows are edited</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15485">PHPBB3-15485</a>] - Add template event to forumlist_body > forum images</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15486">PHPBB3-15486</a>] - Add core event to the function user_add() to modify notifications data</li>
|
||||
</ul>
|
||||
<h4>New Feature</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13344">PHPBB3-13344</a>] - Add new events for logging</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15122">PHPBB3-15122</a>] - Support using memcached instead of memcache</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15372">PHPBB3-15372</a>] - Add a "Can view topics" permission</li>
|
||||
</ul>
|
||||
<h4>Sub-task</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13150">PHPBB3-13150</a>] - [Event] - core.phpbb_log_get_topic_auth_sql_after</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15468">PHPBB3-15468</a>] - Add a service to merge duplicate BBCodes</li>
|
||||
</ul>
|
||||
<h4>Task</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15179">PHPBB3-15179</a>] - Update 3.2.x dependencies and fix Twig > 1.25 compatibility</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15304">PHPBB3-15304</a>] - Update s9e/text-formatter dependency</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15455">PHPBB3-15455</a>] - Margin discrepancy due to <!-- INCLUDE jumpbox.html --></li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15457">PHPBB3-15457</a>] - Update s9e/text-formatter dependency</li>
|
||||
</ul>
|
||||
|
||||
<a name="v320"></a><h3>Changes since 3.2.0</h3>
|
||||
<h4>Bug</h4>
|
||||
<ul>
|
||||
@@ -718,6 +1075,53 @@
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14265">PHPBB3-14265</a>] - Make all tables available in the container</li>
|
||||
</ul>
|
||||
|
||||
<a name="v3111"></a><h3>Changes since 3.1.11</h3>
|
||||
|
||||
<h4>Security Issue</h4>
|
||||
<ul>
|
||||
<li>[SECURITY-211] - URLs with javascript scheme should not be made clickable</li>
|
||||
</ul>
|
||||
<h4>Bug</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9533">PHPBB3-9533</a>] - phpbb_own_realpath() doesn't always replicate realpath() behaviour</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12835">PHPBB3-12835</a>] - Jump-box dropdown menu doesn't expand with according to line length in IE8</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13360">PHPBB3-13360</a>] - rename_too_long_indexes migration never deleted the old unique index</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13464">PHPBB3-13464</a>] - problem with drop down options and Arabic letters in chrome</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13574">PHPBB3-13574</a>] - Last post not showing in "Active topics" when Prosilver goes responsive</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15174">PHPBB3-15174</a>] - Unable to purge cache (ext & acp)</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15285">PHPBB3-15285</a>] - Travis tests are failing due to trusty changes</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15303">PHPBB3-15303</a>] - Typo in memcached driver</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15347">PHPBB3-15347</a>] - Password updater in cron generates invalid postgres SQL</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15367">PHPBB3-15367</a>] - Sphinx search backend doesn't escape special characters</li>
|
||||
</ul>
|
||||
<h4>Improvement</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10122">PHPBB3-10122</a>] - [list=] - should support "none", along with CSS2 types</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11063">PHPBB3-11063</a>] - Change version check to SSL</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14820">PHPBB3-14820</a>] - Style Version Missing</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14919">PHPBB3-14919</a>] - Inconsistent use of globals vs class elements in acp_extensions</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14927">PHPBB3-14927</a>] - event core.user_add_modify_data</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14944">PHPBB3-14944</a>] - Add possibility to search for template loop indexes by key</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14995">PHPBB3-14995</a>] - Add ACP template events acp_ext_list_*_name_after</li>
|
||||
</ul>
|
||||
<h4>New Feature</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13344">PHPBB3-13344</a>] - Add new events for logging</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-15122">PHPBB3-15122</a>] - Support using memcached instead of memcache</li>
|
||||
</ul>
|
||||
<h4>Sub-task</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11182">PHPBB3-11182</a>] - Ensure that template files use L_COLON instead of colons.</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11676">PHPBB3-11676</a>] - generate_text_for_storage on includes/acp/acp_users.php</li>
|
||||
</ul>
|
||||
<h4>Task</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10758">PHPBB3-10758</a>] - Improve Functional Test Code Coverage</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10791">PHPBB3-10791</a>] - Add a section for extensions to readme.html</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10792">PHPBB3-10792</a>] - Add a section for 3.0 to 3.1 upgrades to install.html</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13874">PHPBB3-13874</a>] - Add master to sami API docs</li>
|
||||
</ul>
|
||||
|
||||
<a name="v3110"></a><h3>Changes since 3.1.10</h3>
|
||||
|
||||
<h4>Bug</h4>
|
||||
|
@@ -20,15 +20,16 @@
|
||||
|
||||
phpBB Project Manager: Marshalrusty (Yuriy Rusko)
|
||||
|
||||
phpBB Product Manager: naderman (Nils Adermann)
|
||||
|
||||
phpBB Lead Developer: Marc (Marc Alexander)
|
||||
|
||||
phpBB Developers: bantu (Andreas Fischer)
|
||||
CHItA (Máté Bartus)
|
||||
Derky (Derk Ruitenbeek)
|
||||
Elsensee (Oliver Schramm)
|
||||
Hanakin (Michael Miday)
|
||||
MichaelC (Michael Cullum)
|
||||
Nicofuma (Tristan Darricau)
|
||||
prototech (Cesar Gallegos)
|
||||
rubencm (Rubén Calvo)
|
||||
|
||||
For a list of phpBB Team members, please see:
|
||||
http://www.phpbb.com/about/team/
|
||||
@@ -41,7 +42,10 @@ https://github.com/phpbb/phpbb/graphs/contributors
|
||||
phpBB Project Manager: theFinn (James Atkinson) [Founder - 04/2007]
|
||||
SHS` (Jonathan Stanley)
|
||||
|
||||
phpBB Lead Developer: Acyd Burn (Meik Sievertsen) [09/2005 - 01/2010]
|
||||
phpBB Product Manager: naderman (Nils Adermann) [02/2016 - 02/2017]
|
||||
|
||||
phpBB Lead Developer: naderman (Nils Adermann) [01/2010 - 02/2016]
|
||||
Acyd Burn (Meik Sievertsen) [09/2005 - 01/2010]
|
||||
psoTFX (Paul S. Owen) [2001 - 09/2005]
|
||||
|
||||
phpBB Developers: A_Jelly_Doughnut (Josh Woody) [01/2010 - 11/2010]
|
||||
@@ -61,6 +65,7 @@ phpBB Developers: A_Jelly_Doughnut (Josh Woody) [01/2010 - 11/2010]
|
||||
kellanved (Henry Sudhof) [04/2007 - 03/2011]
|
||||
nickvergessen (Joas Schilling)[04/2010 - 12/2015]
|
||||
Oleg (Oleg Pudeyev) [01/2011 - 05/2013]
|
||||
prototech (Cesar Gallegos) [01/2014 - 12/2016]
|
||||
rxu (Ruslan Uzdenov) [04/2010 - 12/2012]
|
||||
TerraFrost (Jim Wigginton) [04/2009 - 01/2011]
|
||||
ToonArmy (Chris Smith) [06/2008 - 11/2011]
|
||||
|
@@ -44,7 +44,7 @@
|
||||
<p>
|
||||
A basic overview of running phpBB can be found in the accompanying <a href="README.html">README</a> file.
|
||||
Please ensure you read that document in addition to this! For more detailed information on using, installing,
|
||||
updating and converting phpBB you should read <a href="https://www.phpbb.com/support/docs/en/3.1/ug/">the documentation</a>
|
||||
updating and converting phpBB you should read <a href="https://www.phpbb.com/support/docs/en/3.2/ug/">the documentation</a>
|
||||
available online.
|
||||
</p>
|
||||
</div>
|
||||
@@ -147,7 +147,7 @@
|
||||
<li>Oracle</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><strong>PHP 5.4.0+</strong> with support for the database you intend to use.</li>
|
||||
<li><strong>PHP 5.4.7+</strong> with support for the database you intend to use.</li>
|
||||
<li>The following PHP modules are required:
|
||||
<ul>
|
||||
<li>json</li>
|
||||
@@ -159,7 +159,6 @@
|
||||
<li>zlib Compression support</li>
|
||||
<li>Remote FTP support</li>
|
||||
<li>XML support</li>
|
||||
<li>ImageMagick support</li>
|
||||
<li>GD Support</li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -269,11 +268,11 @@
|
||||
|
||||
<a name="update_full"></a><h3>4.i. Full package</h3>
|
||||
|
||||
<p>The full package is normally meant for new installations only, but if you want to replace all source files, this package comes in handy.</p>
|
||||
<p>Updating using the full package is the recommended update method for boards without modifications to core phpBB files.</p>
|
||||
|
||||
<p>First, you should make a copy of your existing <code>config.php</code> file; keep it in a safe place! Next, delete all the existing phpBB files, you may want to leave your <code>files/</code>, <code>images/</code> and <code>ext/</code> directories in place, otherwise you will lose your file attachments, uploaded images and get error due to missing extension files. You can leave alternative styles in place too. With this complete, you can upload the new phpBB files (see <a href="#install">New installation</a> for details if necessary). Once complete, copy back your saved <code>config.php</code>, replacing the new one. Another method is to just <strong>replace</strong> the existing files with the files from the full package - though make sure you do <strong>not</strong> overwrite your config.php file.</p>
|
||||
<p>First, you should make a copy of your existing <code>config.php</code> file; keep it in a safe place! Next, delete all the existing phpBB files, you should leave your <code>files/</code>, <code>images/</code> and <code>ext/</code> directories in place, otherwise you will lose your file attachments, uploaded images and get errors due to missing extension files. You can leave alternative styles in place too. With this complete, you can upload the new phpBB files (see <a href="#install">New installation</a> for details if necessary). Once complete, copy back your saved <code>config.php</code>, replacing the new one. Another method is to just <strong>replace</strong> the existing files with the files from the full package - though make sure you do <strong>not</strong> overwrite your config.php file.</p>
|
||||
|
||||
<p>You should now got to <code>/install/app.php/update</code> which will display a warning: <strong>No valid update directory was found, please make sure you uploaded the relevant files</strong>. Beneath that warning you will see a radion button <em>Update database only</em>, just click <strong>Submit</strong>. Depending on your previous version this will make a number of database changes. You may receive <em>FAILURES</em> during this procedure. They should not be a cause for concern unless you see an actual <em>ERROR</em>, in which case the script will stop (in this case you should seek help via our forums or bug tracker). If you have shell access to your server, you may wish to update via the command line interface. From your board's root, execute the following command: <code>php bin/phpbbcli.php --safe-mode db:migrate</code>.</p>
|
||||
<p>You should now got to <code>/install/app.php/update</code> which will display a warning: <strong>No valid update directory was found, please make sure you uploaded the relevant files</strong>. Beneath that warning you will see a radio button <em>Update database only</em>, just click <strong>Submit</strong>. Depending on your previous version this will make a number of database changes. You may receive <em>FAILURES</em> during this procedure. They should not be a cause for concern unless you see an actual <em>ERROR</em>, in which case the script will stop (in this case you should seek help via our forums or bug tracker). If you have shell access to your server, you may wish to update via the command line interface. From your board's root, execute the following command: <code>php bin/phpbbcli.php --safe-mode db:migrate</code>.</p>
|
||||
|
||||
<p>Once <code>/install/app.php/update</code> has completed, it displays the success message: <strong>The database update was successful</strong>. You may proceed to the Administration Control Panel and then remove the install directory as advised.</p>
|
||||
|
||||
@@ -301,7 +300,7 @@
|
||||
|
||||
<a name="update_auto"></a><h3>4.iv. Automatic update package</h3>
|
||||
|
||||
<p>This update method is the recommended method for updating. This package detects changed files automatically and merges in changes if needed.</p>
|
||||
<p>This update method is only recommended for installations with modifications to core phpBB files. This package detects changed files automatically and merges in changes if needed.</p>
|
||||
|
||||
<p>The automatic update package will update the board from a given version to the latest version. A number of automatic update files are available, and you should choose the one that corresponds to the version of the board that you are currently running. For example, if your current version is <strong>3.2.0</strong>, you need the <code>phpBB-3.2.0_to_3.2.1.zip/tar.bz2</code> file.</p>
|
||||
|
||||
|
@@ -323,11 +323,11 @@
|
||||
|
||||
<div class="content">
|
||||
|
||||
<p>phpBB 3.2.x takes advantage of new features added in PHP 5.4. We recommend that you upgrade to the latest stable release of PHP to run phpBB. The minimum version required is PHP 5.4.0 and the maximum supported version is the latest stable version of PHP.</p>
|
||||
<p>phpBB 3.2.x takes advantage of new features added in PHP 5.4. We recommend that you upgrade to the latest stable release of PHP to run phpBB. The minimum version required is PHP 5.4.7 and the maximum supported version is the latest stable version of PHP.</p>
|
||||
|
||||
<p>Please remember that running any application on a development (unstable, e.g. a beta release) version of PHP can lead to strange/unexpected results which may appear to be bugs in the application. Therefore, we recommend you upgrade to the newest stable version of PHP before running phpBB. If you are running a development 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, MariaDB 5.x, PostgreSQL 8.x, Oracle 8 and SQLite 3. Versions of PHP used range from 5.4.x above 5.6.x to 7.0.x 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, MariaDB 5.x, PostgreSQL 8.x, Oracle 8 and SQLite 3. Versions of PHP used range from 5.4.7 above 5.6.x to 7.1.x and 7.2.x without problem.</p>
|
||||
|
||||
<a name="phpsec"></a><h3>7.i. Notice on PHP security issues</h3>
|
||||
|
||||
|
@@ -627,7 +627,7 @@ $min = ($i < $j) ? $i : $j;</pre>
|
||||
<pre>if (isset($forum) && $forum == 5)</pre>
|
||||
</div>
|
||||
|
||||
<p>The <code>empty()</code> function is useful if you want to check if a variable is not set or being empty (an empty string, 0 as an integer or string, NULL, false, an empty array or a variable declared, but without a value in a class). Therefore empty should be used in favor of <code>isset($array) && sizeof($array) > 0</code> - this can be written in a shorter way as <code>!empty($array)</code>.</p>
|
||||
<p>The <code>empty()</code> function is useful if you want to check if a variable is not set or being empty (an empty string, 0 as an integer or string, NULL, false, an empty array or a variable declared, but without a value in a class). Therefore empty should be used in favor of <code>isset($array) && count($array) > 0</code> - this can be written in a shorter way as <code>!empty($array)</code>.</p>
|
||||
|
||||
<h4>Switch statements:</h4>
|
||||
<p>Switch/case code blocks can get a bit long sometimes. To have some level of notice and being in-line with the opening/closing brace requirement (where they are on the same line for better readability), this also applies to switch/case code blocks and the breaks. An example:</p>
|
||||
@@ -994,9 +994,9 @@ $sql = $db->sql_build_query('SELECT', $sql_array);</pre>
|
||||
<h4>Operations in loop definition: </h4>
|
||||
<p>Always try to optimize your loops if operations are going on at the comparing part, since this part is executed every time the loop is parsed through. For assignments a descriptive name should be chosen. Example:</p>
|
||||
|
||||
<p class="bad">// On every iteration the sizeof function is called</p>
|
||||
<p class="bad">// On every iteration the count function is called</p>
|
||||
<div class="codebox"><pre>
|
||||
for ($i = 0; $i < sizeof($post_data); $i++)
|
||||
for ($i = 0; $i < count($post_data); $i++)
|
||||
{
|
||||
do_something();
|
||||
}</pre>
|
||||
@@ -1004,7 +1004,7 @@ for ($i = 0; $i < sizeof($post_data); $i++)
|
||||
|
||||
<p class="good">// You are able to assign the (not changing) result within the loop itself</p>
|
||||
<div class="codebox"><pre>
|
||||
for ($i = 0, $size = sizeof($post_data); $i < $size; $i++)
|
||||
for ($i = 0, $size = count($post_data); $i < $size; $i++)
|
||||
{
|
||||
do_something();
|
||||
}</pre>
|
||||
@@ -2387,7 +2387,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
|
||||
You have <code>[1/21/31] slon</code>, <code>[2/3/4] slona</code>, <code>[0/5/6] slonova</code> and <code>[7/8/9/11] ...</code> and some more difficult rules.
|
||||
</p>
|
||||
|
||||
<p>The <a href="https://wiki.phpbb.com/Plural_Rules">plural system</a> takes care of this and can be used as follows:</p>
|
||||
<p>The <a href="https://area51.phpbb.com/docs/dev/32x/language/plurals.html">plural system</a> takes care of this and can be used as follows:</p>
|
||||
|
||||
<p>The PHP code will basically look like this:</p>
|
||||
|
||||
|
@@ -433,6 +433,13 @@ acp_prune_forums_prepend
|
||||
* Since: 3.1.7-RC1
|
||||
* Purpose: Add content before the forum select form label
|
||||
|
||||
acp_prune_forums_settings_append
|
||||
===
|
||||
* Locations:
|
||||
+ adm/style/acp_prune_forums.html
|
||||
* Since: 3.2.2-RC1
|
||||
* Purpose: Add content after the prune settings
|
||||
|
||||
acp_prune_users_find_username_append
|
||||
===
|
||||
* Locations:
|
||||
@@ -498,6 +505,13 @@ acp_styles_list_before
|
||||
* Since: 3.1.7-RC1
|
||||
* Purpose: Add content before list of styles
|
||||
|
||||
acp_users_mode_add
|
||||
===
|
||||
* Locations:
|
||||
+ adm/style/acp_users.html
|
||||
* Since: 3.2.2-RC1
|
||||
* Purpose: Add extra modes to the ACP user page
|
||||
|
||||
acp_users_profile_before
|
||||
===
|
||||
* Locations:
|
||||
@@ -638,6 +652,13 @@ attachment_file_prepend
|
||||
* Since: 3.1.6-RC1
|
||||
* Purpose: Add custom attachment types displaying to the top of attachment block.
|
||||
|
||||
confirm_delete_body_delete_reason_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/confirm_delete_body.html
|
||||
* Since: 3.2.4-RC1
|
||||
* Purpose: Add custom text to the confirmation of a post that is deleted.
|
||||
|
||||
forumlist_body_category_header_after
|
||||
===
|
||||
* Locations:
|
||||
@@ -666,6 +687,34 @@ forumlist_body_category_header_row_prepend
|
||||
* Since: 3.1.5-RC1
|
||||
* Purpose: Add content before the header row of the category on the forum list.
|
||||
|
||||
forumlist_body_forum_image_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/forumlist_body.html
|
||||
* Since: 3.2.2-RC1
|
||||
* Purpose: Add content after the forum image on the forum list.
|
||||
|
||||
forumlist_body_forum_image_append
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/forumlist_body.html
|
||||
* Since: 3.2.2-RC1
|
||||
* Purpose: Add content at the start of the forum image on the forum list.
|
||||
|
||||
forumlist_body_forum_image_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/forumlist_body.html
|
||||
* Since: 3.2.2-RC1
|
||||
* Purpose: Add content before the forum image on the forum list.
|
||||
|
||||
forumlist_body_forum_image_prepend
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/forumlist_body.html
|
||||
* Since: 3.2.2-RC1
|
||||
* Purpose: Add content at the end of the forum image on the forum list.
|
||||
|
||||
forumlist_body_forum_row_after
|
||||
===
|
||||
* Locations:
|
||||
@@ -701,6 +750,20 @@ forumlist_body_last_post_title_prepend
|
||||
* Since: 3.1.0-a1
|
||||
* Purpose: Add content before the post title of the latest post in a forum on the forum list.
|
||||
|
||||
forumlist_body_last_poster_username_append
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/forumlist_body.html
|
||||
* Since: 3.2.4-RC1
|
||||
* Purpose: Append information to last poster username of member
|
||||
|
||||
forumlist_body_last_poster_username_prepend
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/forumlist_body.html
|
||||
* Since: 3.2.4-RC1
|
||||
* Purpose: Prepend information to last poster username of member
|
||||
|
||||
forumlist_body_subforum_link_append
|
||||
===
|
||||
* Locations:
|
||||
@@ -932,6 +995,20 @@ mcp_post_additional_options
|
||||
* Since: 3.1.5-RC1
|
||||
* Purpose: Add content within the list of post moderation actions
|
||||
|
||||
mcp_post_report_buttons_top_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/mcp_post.html
|
||||
* Since: 3.2.4-RC1
|
||||
* Purpose: Add content after report buttons
|
||||
|
||||
mcp_post_report_buttons_top_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/mcp_post.html
|
||||
* Since: 3.2.4-RC1
|
||||
* Purpose: Add content before report buttons
|
||||
|
||||
mcp_topic_options_after
|
||||
===
|
||||
* Locations:
|
||||
@@ -946,6 +1023,27 @@ mcp_topic_options_before
|
||||
* Since: 3.1.6-RC1
|
||||
* Purpose: Add some options (field, checkbox, ...) before the subject field when split a subject
|
||||
|
||||
mcp_topic_postrow_attachments_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/mcp_topic.html
|
||||
* Since: 3.2.2-RC1
|
||||
* Purpose: Show additional content after attachments in mcp topic review
|
||||
|
||||
mcp_topic_postrow_attachments_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/mcp_topic.html
|
||||
* Since: 3.2.2-RC1
|
||||
* Purpose: Show additional content before attachments in mcp topic review
|
||||
|
||||
mcp_topic_postrow_post_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/mcp_topic.html
|
||||
* Since: 3.2.2-RC1
|
||||
* Purpose: Show additional content after postrow begins in mcp topic review
|
||||
|
||||
mcp_topic_postrow_post_details_after
|
||||
===
|
||||
* Locations:
|
||||
@@ -1188,6 +1286,20 @@ memberlist_view_user_statistics_before
|
||||
* Since: 3.1.0-a1
|
||||
* Purpose: Add entries before the user statistics part of any user profile
|
||||
|
||||
memberlist_view_username_append
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/memberlist_view.html
|
||||
* Since: 3.2.4-RC1
|
||||
* Purpose: Append information to username of member
|
||||
|
||||
memberlist_view_username_prepend
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/memberlist_view.html
|
||||
* Since: 3.2.4-RC1
|
||||
* Purpose: Prepend information to username of member
|
||||
|
||||
memberlist_view_zebra_after
|
||||
===
|
||||
* Locations:
|
||||
@@ -1483,6 +1595,20 @@ overall_header_stylesheets_after
|
||||
* Purpose: Add asset calls after stylesheets within the `</head>` tag.
|
||||
Note that INCLUDECSS will not work with this event.
|
||||
|
||||
posting_attach_body_attach_row_controls_append
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/posting_attach_body.html
|
||||
* Since: 3.2.2-RC1
|
||||
* Purpose: Add content after attachment control elements
|
||||
|
||||
posting_attach_body_attach_row_controls_prepend
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/posting_attach_body.html
|
||||
* Since: 3.2.2-RC1
|
||||
* Purpose: Add content before attachment control elements
|
||||
|
||||
posting_editor_add_panel_tab
|
||||
===
|
||||
* Locations:
|
||||
@@ -1630,6 +1756,13 @@ posting_poll_body_options_after
|
||||
* Since: 3.1.4-RC1
|
||||
* Purpose: Add content after the poll options on creating a poll
|
||||
|
||||
posting_preview_content_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/posting_preview.html
|
||||
* Since: 3.2.4-RC1
|
||||
* Purpose: Add content after the message content preview
|
||||
|
||||
posting_preview_poll_after
|
||||
===
|
||||
* Locations:
|
||||
@@ -1637,6 +1770,13 @@ posting_preview_poll_after
|
||||
* Since: 3.1.7-RC1
|
||||
* Purpose: Add content after the poll preview block
|
||||
|
||||
posting_topic_review_row_content_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/posting_topic_review.html
|
||||
* Since: 3.2.4-RC1
|
||||
* Purpose: Add content after the message content in topic review
|
||||
|
||||
posting_topic_review_row_post_details_after
|
||||
===
|
||||
* Locations:
|
||||
@@ -1798,6 +1938,13 @@ search_body_search_query_prepend
|
||||
* Since: 3.1.7-RC1
|
||||
* Purpose: Put content at the top of the search query fields set
|
||||
|
||||
search_results_content_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/search_results.html
|
||||
* Since: 3.2.4-RC1
|
||||
* Purpose: Add content after the message content in search results
|
||||
|
||||
search_results_header_after
|
||||
===
|
||||
* Locations:
|
||||
@@ -1812,6 +1959,20 @@ search_results_header_before
|
||||
* Since: 3.1.4-RC1
|
||||
* Purpose: Add content before the header of the search results.
|
||||
|
||||
search_results_last_post_author_username_append
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/search_results.html
|
||||
* Since: 3.2.4-RC1
|
||||
* Purpose: Append information to last post author username of member
|
||||
|
||||
search_results_last_post_author_username_prepend
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/search_results.html
|
||||
* Since: 3.2.4-RC1
|
||||
* Purpose: Prepend information to last post author username of member
|
||||
|
||||
search_results_post_after
|
||||
===
|
||||
* Locations:
|
||||
@@ -1819,6 +1980,20 @@ search_results_post_after
|
||||
* Since: 3.1.0-b3
|
||||
* Purpose: Add data after search result posts
|
||||
|
||||
search_results_post_author_username_append
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/search_results.html
|
||||
* Since: 3.2.4-RC1
|
||||
* Purpose: Append information to post author username of member
|
||||
|
||||
search_results_post_author_username_prepend
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/search_results.html
|
||||
* Since: 3.2.4-RC1
|
||||
* Purpose: Prepend information to post author username of member
|
||||
|
||||
search_results_post_before
|
||||
===
|
||||
* Locations:
|
||||
@@ -1854,6 +2029,20 @@ search_results_topic_after
|
||||
* Since: 3.1.0-b4
|
||||
* Purpose: Add data after search result topics
|
||||
|
||||
search_results_topic_author_username_append
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/search_results.html
|
||||
* Since: 3.2.4-RC1
|
||||
* Purpose: Append information to topic author username of member
|
||||
|
||||
search_results_topic_author_username_prepend
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/search_results.html
|
||||
* Since: 3.2.4-RC1
|
||||
* Purpose: Prepend information to topic author username of member
|
||||
|
||||
search_results_topic_before
|
||||
===
|
||||
* Locations:
|
||||
@@ -1873,6 +2062,13 @@ simple_footer_after
|
||||
* Locations:
|
||||
+ styles/prosilver/template/simple_footer.html
|
||||
* Since: 3.1.0-a1
|
||||
* Purpose: Add content prior to the scripts of the simple footer
|
||||
|
||||
simple_footer_body_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/simple_footer.html
|
||||
* Since: 3.2.4-RC1
|
||||
* Purpose: Add content directly prior to the `</body>` tag of the simple footer
|
||||
|
||||
simple_header_body_before
|
||||
@@ -2266,6 +2462,34 @@ ucp_friend_list_after
|
||||
* Since: 3.1.0-a4
|
||||
* Purpose: Add optional elements after list of friends in UCP
|
||||
|
||||
viewforum_body_last_post_author_username_append
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/viewforum_body.html
|
||||
* Since: 3.2.4-RC1
|
||||
* Purpose: Append information to last post author username of member
|
||||
|
||||
viewforum_body_last_post_author_username_prepend
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/viewforum_body.html
|
||||
* Since: 3.2.4-RC1
|
||||
* Purpose: Prepend information to last post author username of member
|
||||
|
||||
viewforum_body_topic_author_username_append
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/viewforum_body.html
|
||||
* Since: 3.2.4-RC1
|
||||
* Purpose: Append information to topic author username of member
|
||||
|
||||
viewforum_body_topic_author_username_prepend
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/viewforum_body.html
|
||||
* Since: 3.2.4-RC1
|
||||
* Purpose: Prepend information to topic author username of member
|
||||
|
||||
viewforum_body_topic_row_after
|
||||
===
|
||||
* Locations:
|
||||
@@ -2399,6 +2623,20 @@ viewforum_forum_title_before
|
||||
* Since: 3.1.5-RC1
|
||||
* Purpose: Add content directly before the forum title on the View forum screen
|
||||
|
||||
viewonline_body_username_append
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/viewonline_body.html
|
||||
* Since: 3.2.4-RC1
|
||||
* Purpose: Append information to username of member
|
||||
|
||||
viewonline_body_username_prepend
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/viewonline_body.html
|
||||
* Since: 3.2.4-RC1
|
||||
* Purpose: Prepend information to username of member
|
||||
|
||||
viewtopic_print_head_append
|
||||
===
|
||||
* Locations:
|
||||
@@ -2576,6 +2814,13 @@ viewtopic_body_postrow_back2top_prepend
|
||||
* Since: 3.1.8-RC1
|
||||
* Purpose: Add content to the post's bottom directly before the back to top link
|
||||
|
||||
viewtopic_body_postrow_content_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/viewtopic_body.html
|
||||
* Since: 3.2.4-RC1
|
||||
* Purpose: Add content after the message content in topics views
|
||||
|
||||
viewtopic_body_postrow_custom_fields_after
|
||||
===
|
||||
* Locations:
|
||||
@@ -2671,6 +2916,13 @@ viewtopic_topic_title_after
|
||||
* Since: 3.1.7-RC1
|
||||
* Purpose: Add content directly after the topic title link on the View topic screen (outside of the h2 HTML tag)
|
||||
|
||||
viewtopic_topic_title_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/viewtopic_body.html
|
||||
* Since: 3.2.2-RC1
|
||||
* Purpose: Add content directly before the topic title link on the View topic screen (outside of the h2 HTML tag)
|
||||
|
||||
viewtopic_topic_title_append
|
||||
===
|
||||
* Locations:
|
||||
|
@@ -18,11 +18,11 @@ http {
|
||||
gzip_vary on;
|
||||
gzip_http_version 1.1;
|
||||
gzip_min_length 700;
|
||||
|
||||
|
||||
# Compression levels over 6 do not give an appreciable improvement
|
||||
# in compression ratio, but take more resources.
|
||||
gzip_comp_level 6;
|
||||
|
||||
|
||||
# IE 6 and lower do not support gzip with Vary correctly.
|
||||
gzip_disable "msie6";
|
||||
# Before nginx 0.7.63:
|
||||
@@ -49,9 +49,7 @@ http {
|
||||
server_name myforums.com;
|
||||
|
||||
# A trick from http://wiki.nginx.org/Pitfalls#Taxing_Rewrites:
|
||||
rewrite ^ http://www.myforums.com$request_uri permanent;
|
||||
# Equivalent to:
|
||||
#rewrite ^(.*)$ http://www.myforums.com$1 permanent;
|
||||
return 301 http://www.myforums.com$request_uri;
|
||||
}
|
||||
|
||||
# The actual board domain.
|
||||
@@ -72,7 +70,7 @@ http {
|
||||
}
|
||||
|
||||
# Deny access to internal phpbb files.
|
||||
location ~ /(config\.php|common\.php|cache|files|images/avatars/upload|includes|phpbb|store|vendor) {
|
||||
location ~ /(config\.php|common\.php|cache|files|images/avatars/upload|includes|(?<!ext/)phpbb|store|vendor) {
|
||||
deny all;
|
||||
# deny was ignored before 0.8.40 for connections over IPv6.
|
||||
# Use internal directive to prohibit access on older versions.
|
||||
|
@@ -29,7 +29,6 @@ source source_phpbb_{SPHINX_ID}_main
|
||||
AND p.post_id >= $start AND p.post_id <= $end
|
||||
sql_query_post =
|
||||
sql_query_post_index = UPDATE phpbb_sphinx SET max_doc_id = $maxid WHERE counter_id = 1
|
||||
sql_query_info = SELECT * FROM phpbb_posts WHERE post_id = $id
|
||||
sql_attr_uint = forum_id
|
||||
sql_attr_uint = topic_id
|
||||
sql_attr_uint = poster_id
|
||||
@@ -72,7 +71,6 @@ index index_phpbb_{SPHINX_ID}_main
|
||||
morphology = none
|
||||
stopwords =
|
||||
min_word_len = 2
|
||||
charset_type = utf-8
|
||||
charset_table = U+FF10..U+FF19->0..9, 0..9, U+FF41..U+FF5A->a..z, U+FF21..U+FF3A->a..z, A..Z->a..z, a..z, U+0149, U+017F, U+0138, U+00DF, U+00FF, U+00C0..U+00D6->U+00E0..U+00F6, U+00E0..U+00F6, U+00D8..U+00DE->U+00F8..U+00FE, U+00F8..U+00FE, U+0100->U+0101, U+0101, U+0102->U+0103, U+0103, U+0104->U+0105, U+0105, U+0106->U+0107, U+0107, U+0108->U+0109, U+0109, U+010A->U+010B, U+010B, U+010C->U+010D, U+010D, U+010E->U+010F, U+010F, U+0110->U+0111, U+0111, U+0112->U+0113, U+0113, U+0114->U+0115, U+0115, U+0116->U+0117, U+0117, U+0118->U+0119, U+0119, U+011A->U+011B, U+011B, U+011C->U+011D, U+011D, U+011E->U+011F, U+011F, U+0130->U+0131, U+0131, U+0132->U+0133, U+0133, U+0134->U+0135, U+0135, U+0136->U+0137, U+0137, U+0139->U+013A, U+013A, U+013B->U+013C, U+013C, U+013D->U+013E, U+013E, U+013F->U+0140, U+0140, U+0141->U+0142, U+0142, U+0143->U+0144, U+0144, U+0145->U+0146, U+0146, U+0147->U+0148, U+0148, U+014A->U+014B, U+014B, U+014C->U+014D, U+014D, U+014E->U+014F, U+014F, U+0150->U+0151, U+0151, U+0152->U+0153, U+0153, U+0154->U+0155, U+0155, U+0156->U+0157, U+0157, U+0158->U+0159, U+0159, U+015A->U+015B, U+015B, U+015C->U+015D, U+015D, U+015E->U+015F, U+015F, U+0160->U+0161, U+0161, U+0162->U+0163, U+0163, U+0164->U+0165, U+0165, U+0166->U+0167, U+0167, U+0168->U+0169, U+0169, U+016A->U+016B, U+016B, U+016C->U+016D, U+016D, U+016E->U+016F, U+016F, U+0170->U+0171, U+0171, U+0172->U+0173, U+0173, U+0174->U+0175, U+0175, U+0176->U+0177, U+0177, U+0178->U+00FF, U+00FF, U+0179->U+017A, U+017A, U+017B->U+017C, U+017C, U+017D->U+017E, U+017E, U+0410..U+042F->U+0430..U+044F, U+0430..U+044F, U+4E00..U+9FFF
|
||||
min_prefix_len = 0
|
||||
min_infix_len = 0
|
||||
@@ -88,13 +86,11 @@ indexer
|
||||
}
|
||||
searchd
|
||||
{
|
||||
compat_sphinxql_magics = 0
|
||||
listen = localhost:9312
|
||||
log = {DATA_PATH}/log/searchd.log
|
||||
query_log = {DATA_PATH}/log/sphinx-query.log
|
||||
read_timeout = 5
|
||||
max_children = 30
|
||||
pid_file = {DATA_PATH}/searchd.pid
|
||||
max_matches = 20000
|
||||
binlog_path = {DATA_PATH}
|
||||
}
|
||||
|
@@ -159,6 +159,8 @@ $user->session_begin(false);
|
||||
$auth->acl($user->data);
|
||||
$user->setup('viewtopic');
|
||||
|
||||
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
|
||||
|
||||
if (!$config['allow_attachments'] && !$config['allow_pm_attach'])
|
||||
{
|
||||
send_status_line(404, 'Not Found');
|
||||
@@ -225,7 +227,7 @@ else
|
||||
$post_row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (!$post_row || ($post_row['post_visibility'] != ITEM_APPROVED && !$auth->acl_get('m_approve', $post_row['forum_id'])))
|
||||
if (!$post_row || !$phpbb_content_visibility->is_visible('post', $post_row['forum_id'], $post_row))
|
||||
{
|
||||
// Attachment of a soft deleted post and the user is not allowed to see the post
|
||||
send_status_line(404, 'Not Found');
|
||||
|
@@ -164,7 +164,6 @@ class acp_attachments
|
||||
'img_create_thumbnail' => array('lang' => 'CREATE_THUMBNAIL', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'img_max_thumb_width' => array('lang' => 'MAX_THUMB_WIDTH', 'validate' => 'int:0:999999999999999', 'type' => 'number:0:999999999999999', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
|
||||
'img_min_thumb_filesize' => array('lang' => 'MIN_THUMB_FILESIZE', 'validate' => 'int:0:999999999999999', 'type' => 'number:0:999999999999999', 'explain' => true, 'append' => ' ' . $user->lang['BYTES']),
|
||||
'img_imagick' => array('lang' => 'IMAGICK_PATH', 'validate' => 'absolute_path', 'type' => 'text:20:200', 'explain' => true, 'append' => ' <span>[ <a href="' . $this->u_action . '&action=imgmagick">' . $user->lang['SEARCH_IMAGICK'] . '</a> ]</span>'),
|
||||
'img_max' => array('lang' => 'MAX_IMAGE_SIZE', 'validate' => 'int:0:9999', 'type' => 'dimension:0:9999', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
|
||||
'img_link' => array('lang' => 'IMAGE_LINK_SIZE', 'validate' => 'int:0:9999', 'type' => 'dimension:0:9999', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
|
||||
)
|
||||
@@ -190,7 +189,7 @@ class acp_attachments
|
||||
validate_config_vars($display_vars['vars'], $cfg_array, $error);
|
||||
|
||||
// Do not write values if there is an error
|
||||
if (sizeof($error))
|
||||
if (count($error))
|
||||
{
|
||||
$submit = false;
|
||||
}
|
||||
@@ -226,7 +225,7 @@ class acp_attachments
|
||||
// Check Settings
|
||||
$this->test_upload($error, $this->new_config['upload_path'], false);
|
||||
|
||||
if (!sizeof($error))
|
||||
if (!count($error))
|
||||
{
|
||||
trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($this->u_action));
|
||||
}
|
||||
@@ -234,38 +233,6 @@ class acp_attachments
|
||||
|
||||
$template->assign_var('S_ATTACHMENT_SETTINGS', true);
|
||||
|
||||
if ($action == 'imgmagick')
|
||||
{
|
||||
$this->new_config['img_imagick'] = $this->search_imagemagick();
|
||||
}
|
||||
|
||||
// We strip eventually manual added convert program, we only want the patch
|
||||
if ($this->new_config['img_imagick'])
|
||||
{
|
||||
// Change path separator
|
||||
$this->new_config['img_imagick'] = str_replace('\\', '/', $this->new_config['img_imagick']);
|
||||
$this->new_config['img_imagick'] = str_replace(array('convert', '.exe'), array('', ''), $this->new_config['img_imagick']);
|
||||
|
||||
// Check for trailing slash
|
||||
if (substr($this->new_config['img_imagick'], -1) !== '/')
|
||||
{
|
||||
$this->new_config['img_imagick'] .= '/';
|
||||
}
|
||||
}
|
||||
|
||||
$supported_types = get_supported_image_types();
|
||||
|
||||
// Check Thumbnail Support
|
||||
if (!$this->new_config['img_imagick'] && (!isset($supported_types['format']) || !sizeof($supported_types['format'])))
|
||||
{
|
||||
$this->new_config['img_create_thumbnail'] = 0;
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'U_SEARCH_IMAGICK' => $this->u_action . '&action=imgmagick',
|
||||
'S_THUMBNAIL_SUPPORT' => (!$this->new_config['img_imagick'] && (!isset($supported_types['format']) || !sizeof($supported_types['format']))) ? false : true)
|
||||
);
|
||||
|
||||
// Secure Download Options - Same procedure as with banning
|
||||
$allow_deny = ($this->new_config['secure_allow_deny']) ? 'ALLOWED' : 'DISALLOWED';
|
||||
|
||||
@@ -290,7 +257,7 @@ class acp_attachments
|
||||
$template->assign_vars(array(
|
||||
'S_SECURE_DOWNLOADS' => $this->new_config['secure_downloads'],
|
||||
'S_DEFINED_IPS' => ($defined_ips != '') ? true : false,
|
||||
'S_WARNING' => (sizeof($error)) ? true : false,
|
||||
'S_WARNING' => (count($error)) ? true : false,
|
||||
|
||||
'WARNING_MSG' => implode('<br />', $error),
|
||||
'DEFINED_IPS' => $defined_ips,
|
||||
@@ -363,7 +330,7 @@ class acp_attachments
|
||||
// Generate correct Change List
|
||||
$extensions = array();
|
||||
|
||||
for ($i = 0, $size = sizeof($extension_change_list); $i < $size; $i++)
|
||||
for ($i = 0, $size = count($extension_change_list); $i < $size; $i++)
|
||||
{
|
||||
$extensions[$extension_change_list[$i]]['group_id'] = $group_select_list[$i];
|
||||
}
|
||||
@@ -390,7 +357,7 @@ class acp_attachments
|
||||
// Delete Extension?
|
||||
$extension_id_list = $request->variable('extension_id_list', array(0));
|
||||
|
||||
if (sizeof($extension_id_list))
|
||||
if (count($extension_id_list))
|
||||
{
|
||||
$sql = 'SELECT extension
|
||||
FROM ' . EXTENSIONS_TABLE . '
|
||||
@@ -420,7 +387,7 @@ class acp_attachments
|
||||
|
||||
if ($add_extension && $add)
|
||||
{
|
||||
if (!sizeof($error))
|
||||
if (!count($error))
|
||||
{
|
||||
$sql = 'SELECT extension_id
|
||||
FROM ' . EXTENSIONS_TABLE . "
|
||||
@@ -433,7 +400,7 @@ class acp_attachments
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (!sizeof($error))
|
||||
if (!count($error))
|
||||
{
|
||||
$sql_ary = array(
|
||||
'group_id' => $add_extension_group,
|
||||
@@ -447,7 +414,7 @@ class acp_attachments
|
||||
}
|
||||
}
|
||||
|
||||
if (!sizeof($error))
|
||||
if (!count($error))
|
||||
{
|
||||
$notify[] = $user->lang['EXTENSIONS_UPDATED'];
|
||||
}
|
||||
@@ -558,7 +525,7 @@ class acp_attachments
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
if (!sizeof($error))
|
||||
if (!count($error))
|
||||
{
|
||||
// Ok, build the update/insert array
|
||||
$upload_icon = $request->variable('upload_icon', 'no_image');
|
||||
@@ -575,7 +542,7 @@ class acp_attachments
|
||||
$max_filesize = 0;
|
||||
}
|
||||
|
||||
if (!sizeof($allowed_forums))
|
||||
if (!count($allowed_forums))
|
||||
{
|
||||
$forum_select = false;
|
||||
}
|
||||
@@ -612,7 +579,7 @@ class acp_attachments
|
||||
|
||||
$extension_list = $request->variable('extensions', array(0));
|
||||
|
||||
if ($action == 'edit' && sizeof($extension_list))
|
||||
if ($action == 'edit' && count($extension_list))
|
||||
{
|
||||
$sql = 'UPDATE ' . EXTENSIONS_TABLE . "
|
||||
SET group_id = 0
|
||||
@@ -620,7 +587,7 @@ class acp_attachments
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
if (sizeof($extension_list))
|
||||
if (count($extension_list))
|
||||
{
|
||||
$sql = 'UPDATE ' . EXTENSIONS_TABLE . "
|
||||
SET group_id = $group_id
|
||||
@@ -630,7 +597,7 @@ class acp_attachments
|
||||
|
||||
$cache->destroy('_extensions');
|
||||
|
||||
if (!sizeof($error))
|
||||
if (!count($error))
|
||||
{
|
||||
$notify[] = $user->lang['SUCCESS_EXTENSION_GROUP_' . strtoupper($action)];
|
||||
}
|
||||
@@ -806,7 +773,7 @@ class acp_attachments
|
||||
'S_FILENAME_LIST' => $filename_list,
|
||||
'S_EDIT_GROUP' => true,
|
||||
'S_NO_IMAGE' => $no_image_select,
|
||||
'S_FORUM_IDS' => (sizeof($forum_ids)) ? true : false,
|
||||
'S_FORUM_IDS' => (count($forum_ids)) ? true : false,
|
||||
|
||||
'U_EXTENSIONS' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=$id&mode=extensions"),
|
||||
'U_BACK' => $this->u_action,
|
||||
@@ -922,13 +889,16 @@ class acp_attachments
|
||||
|
||||
case 'orphan':
|
||||
|
||||
/* @var $pagination \phpbb\pagination */
|
||||
$pagination = $this->phpbb_container->get('pagination');
|
||||
|
||||
if ($submit)
|
||||
{
|
||||
$delete_files = (isset($_POST['delete'])) ? array_keys($request->variable('delete', array('' => 0))) : array();
|
||||
$add_files = (isset($_POST['add'])) ? array_keys($request->variable('add', array('' => 0))) : array();
|
||||
$post_ids = $request->variable('post_id', array('' => 0));
|
||||
|
||||
if (sizeof($delete_files))
|
||||
if (count($delete_files))
|
||||
{
|
||||
$sql = 'SELECT *
|
||||
FROM ' . ATTACHMENTS_TABLE . '
|
||||
@@ -951,7 +921,7 @@ class acp_attachments
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
if (sizeof($delete_files))
|
||||
if (count($delete_files))
|
||||
{
|
||||
$sql = 'DELETE FROM ' . ATTACHMENTS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('attach_id', array_keys($delete_files));
|
||||
@@ -971,7 +941,7 @@ class acp_attachments
|
||||
}
|
||||
unset($add_files);
|
||||
|
||||
if (sizeof($upload_list))
|
||||
if (count($upload_list))
|
||||
{
|
||||
$template->assign_var('S_UPLOADING_FILES', true);
|
||||
|
||||
@@ -1064,13 +1034,29 @@ class acp_attachments
|
||||
'S_ORPHAN' => true)
|
||||
);
|
||||
|
||||
$attachments_per_page = (int) $config['topics_per_page'];
|
||||
|
||||
// Get total number or orphans older than 3 hours
|
||||
$sql = 'SELECT COUNT(attach_id) as num_files, SUM(filesize) as total_size
|
||||
FROM ' . ATTACHMENTS_TABLE . '
|
||||
WHERE is_orphan = 1
|
||||
AND filetime < ' . (time() - 3*60*60);
|
||||
$result = $this->db->sql_query($sql);
|
||||
$row = $this->db->sql_fetchrow($result);
|
||||
$num_files = (int) $row['num_files'];
|
||||
$total_size = (int) $row['total_size'];
|
||||
$this->db->sql_freeresult($result);
|
||||
|
||||
$start = $request->variable('start', 0);
|
||||
$start = $pagination->validate_start($start, $attachments_per_page, $num_files);
|
||||
|
||||
// Just get the files with is_orphan set and older than 3 hours
|
||||
$sql = 'SELECT *
|
||||
FROM ' . ATTACHMENTS_TABLE . '
|
||||
WHERE is_orphan = 1
|
||||
AND filetime < ' . (time() - 3*60*60) . '
|
||||
ORDER BY filetime DESC';
|
||||
$result = $db->sql_query($sql);
|
||||
$result = $db->sql_query_limit($sql, $attachments_per_page, $start);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
@@ -1086,6 +1072,20 @@ class acp_attachments
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$pagination->generate_template_pagination(
|
||||
$this->u_action,
|
||||
'pagination',
|
||||
'start',
|
||||
$num_files,
|
||||
$attachments_per_page,
|
||||
$start
|
||||
);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'TOTAL_FILES' => $num_files,
|
||||
'TOTAL_SIZE' => get_formatted_filesize($total_size),
|
||||
));
|
||||
|
||||
break;
|
||||
|
||||
case 'manage':
|
||||
@@ -1094,7 +1094,7 @@ class acp_attachments
|
||||
{
|
||||
$delete_files = (isset($_POST['delete'])) ? array_keys($request->variable('delete', array('' => 0))) : array();
|
||||
|
||||
if (sizeof($delete_files))
|
||||
if (count($delete_files))
|
||||
{
|
||||
// Select those attachments we want to delete...
|
||||
$sql = 'SELECT real_filename
|
||||
@@ -1110,7 +1110,7 @@ class acp_attachments
|
||||
|
||||
if ($num_deleted = $this->attachment_manager->delete('attach', $delete_files))
|
||||
{
|
||||
if (sizeof($delete_files) != $num_deleted)
|
||||
if (count($delete_files) != $num_deleted)
|
||||
{
|
||||
$error[] = $user->lang['FILES_GONE'];
|
||||
}
|
||||
@@ -1231,13 +1231,13 @@ class acp_attachments
|
||||
// Grab extensions
|
||||
$extensions = $cache->obtain_attach_extensions(true);
|
||||
|
||||
for ($i = 0, $end = sizeof($attachments_list); $i < $end; ++$i)
|
||||
for ($i = 0, $end = count($attachments_list); $i < $end; ++$i)
|
||||
{
|
||||
$row = $attachments_list[$i];
|
||||
|
||||
$row['extension'] = strtolower(trim((string) $row['extension']));
|
||||
$comment = ($row['attach_comment'] && !$row['in_message']) ? str_replace(array("\n", "\r"), array('<br />', "\n"), $row['attach_comment']) : '';
|
||||
$display_cat = $extensions[$row['extension']]['display_cat'];
|
||||
$display_cat = isset($extensions[$row['extension']]['display_cat']) ? $extensions[$row['extension']]['display_cat'] : ATTACHMENT_CATEGORY_NONE;
|
||||
$l_downloaded_viewed = ($display_cat == ATTACHMENT_CATEGORY_NONE) ? 'DOWNLOAD_COUNTS' : 'VIEWED_COUNTS';
|
||||
|
||||
$template->assign_block_vars('attachments', array(
|
||||
@@ -1266,7 +1266,7 @@ class acp_attachments
|
||||
break;
|
||||
}
|
||||
|
||||
if (sizeof($error))
|
||||
if (count($error))
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_WARNING' => true,
|
||||
@@ -1274,7 +1274,7 @@ class acp_attachments
|
||||
);
|
||||
}
|
||||
|
||||
if (sizeof($notify))
|
||||
if (count($notify))
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_NOTIFY' => true,
|
||||
@@ -1443,7 +1443,7 @@ class acp_attachments
|
||||
$row['group_name'] = $user->lang['NOT_ASSIGNED'];
|
||||
$group_name[] = $row;
|
||||
|
||||
for ($i = 0, $groups_size = sizeof($group_name); $i < $groups_size; $i++)
|
||||
for ($i = 0, $groups_size = count($group_name); $i < $groups_size; $i++)
|
||||
{
|
||||
if ($default_group === false)
|
||||
{
|
||||
@@ -1462,47 +1462,6 @@ class acp_attachments
|
||||
return $group_select;
|
||||
}
|
||||
|
||||
/**
|
||||
* Search Imagick
|
||||
*/
|
||||
function search_imagemagick()
|
||||
{
|
||||
$imagick = '';
|
||||
|
||||
$exe = ((defined('PHP_OS')) && (preg_match('#^win#i', PHP_OS))) ? '.exe' : '';
|
||||
|
||||
$magic_home = getenv('MAGICK_HOME');
|
||||
|
||||
if (empty($magic_home))
|
||||
{
|
||||
$locations = array('C:/WINDOWS/', 'C:/WINNT/', 'C:/WINDOWS/SYSTEM/', 'C:/WINNT/SYSTEM/', 'C:/WINDOWS/SYSTEM32/', 'C:/WINNT/SYSTEM32/', '/usr/bin/', '/usr/sbin/', '/usr/local/bin/', '/usr/local/sbin/', '/opt/', '/usr/imagemagick/', '/usr/bin/imagemagick/');
|
||||
$path_locations = str_replace('\\', '/', (explode(($exe) ? ';' : ':', getenv('PATH'))));
|
||||
|
||||
$locations = array_merge($path_locations, $locations);
|
||||
|
||||
foreach ($locations as $location)
|
||||
{
|
||||
// The path might not end properly, fudge it
|
||||
if (substr($location, -1) !== '/')
|
||||
{
|
||||
$location .= '/';
|
||||
}
|
||||
|
||||
if (@file_exists($location) && @is_readable($location . 'mogrify' . $exe) && @filesize($location . 'mogrify' . $exe) > 3000)
|
||||
{
|
||||
$imagick = str_replace('\\', '/', $location);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$imagick = str_replace('\\', '/', $magic_home);
|
||||
}
|
||||
|
||||
return $imagick;
|
||||
}
|
||||
|
||||
/**
|
||||
* Test Settings
|
||||
*/
|
||||
@@ -1676,7 +1635,7 @@ class acp_attachments
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (sizeof($iplist))
|
||||
if (count($iplist))
|
||||
{
|
||||
foreach ($iplist as $ip_entry)
|
||||
{
|
||||
@@ -1686,7 +1645,7 @@ class acp_attachments
|
||||
}
|
||||
}
|
||||
|
||||
if (sizeof($hostlist))
|
||||
if (count($hostlist))
|
||||
{
|
||||
foreach ($hostlist as $host_entry)
|
||||
{
|
||||
@@ -1709,7 +1668,7 @@ class acp_attachments
|
||||
{
|
||||
$unip_sql = $request->variable('unip', array(0));
|
||||
|
||||
if (sizeof($unip_sql))
|
||||
if (count($unip_sql))
|
||||
{
|
||||
$l_unip_list = '';
|
||||
|
||||
|
@@ -253,7 +253,7 @@ class acp_bbcodes
|
||||
|
||||
if ($row)
|
||||
{
|
||||
$bbcode_id = $row['max_bbcode_id'] + 1;
|
||||
$bbcode_id = (int) $row['max_bbcode_id'] + 1;
|
||||
|
||||
// Make sure it is greater than the core bbcode ids...
|
||||
if ($bbcode_id <= NUM_CORE_BBCODES)
|
||||
@@ -295,6 +295,22 @@ class acp_bbcodes
|
||||
|
||||
$phpbb_log->add('admin', $user->data['user_id'], $user->ip, $log_action, false, array($data['bbcode_tag']));
|
||||
|
||||
/**
|
||||
* Event after a BBCode has been added or updated
|
||||
*
|
||||
* @event core.acp_bbcodes_modify_create_after
|
||||
* @var string action Type of the action: modify|create
|
||||
* @var int bbcode_id The id of the added or updated bbcode
|
||||
* @var array sql_ary Array with bbcode data (read only)
|
||||
* @since 3.2.4-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'action',
|
||||
'bbcode_id',
|
||||
'sql_ary',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.acp_bbcodes_modify_create_after', compact($vars)));
|
||||
|
||||
trigger_error($user->lang[$lang] . adm_back_link($this->u_action));
|
||||
}
|
||||
else
|
||||
@@ -325,10 +341,28 @@ class acp_bbcodes
|
||||
{
|
||||
if (confirm_box(true))
|
||||
{
|
||||
$bbcode_tag = $row['bbcode_tag'];
|
||||
|
||||
$db->sql_query('DELETE FROM ' . BBCODES_TABLE . " WHERE bbcode_id = $bbcode_id");
|
||||
$cache->destroy('sql', BBCODES_TABLE);
|
||||
$phpbb_container->get('text_formatter.cache')->invalidate();
|
||||
$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_BBCODE_DELETE', false, array($row['bbcode_tag']));
|
||||
$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_BBCODE_DELETE', false, array($bbcode_tag));
|
||||
|
||||
/**
|
||||
* Event after a BBCode has been deleted
|
||||
*
|
||||
* @event core.acp_bbcodes_delete_after
|
||||
* @var string action Type of the action: delete
|
||||
* @var int bbcode_id The id of the deleted bbcode
|
||||
* @var string bbcode_tag The tag of the deleted bbcode
|
||||
* @since 3.2.4-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'action',
|
||||
'bbcode_id',
|
||||
'bbcode_tag',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.acp_bbcodes_delete_after', compact($vars)));
|
||||
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
@@ -494,7 +528,7 @@ class acp_bbcodes
|
||||
// Pad backreference numbers from tokens
|
||||
if (preg_match_all('/(?<!\\\\)\$([0-9]+)/', $replace, $repad))
|
||||
{
|
||||
$repad = $pad + sizeof(array_unique($repad[0]));
|
||||
$repad = $pad + count(array_unique($repad[0]));
|
||||
$replace = preg_replace_callback('/(?<!\\\\)\$([0-9]+)/', function ($match) use ($pad) {
|
||||
return '${' . ($match[1] + $pad) . '}';
|
||||
}, $replace);
|
||||
@@ -553,10 +587,10 @@ class acp_bbcodes
|
||||
}
|
||||
|
||||
// Lowercase tags
|
||||
$bbcode_tag = preg_replace('/.*?\[([a-z0-9_-]+=?).*/i', '$1', $bbcode_match);
|
||||
$bbcode_search = preg_replace('/.*?\[([a-z0-9_-]+)=?.*/i', '$1', $bbcode_match);
|
||||
$bbcode_tag = preg_replace('/.*?\[([a-z0-9_-]+).*/i', '$1', $bbcode_match);
|
||||
$bbcode_search = preg_replace('/.*?\[([a-z0-9_-]+).*/i', '$1', $bbcode_match);
|
||||
|
||||
if (!preg_match('/^[a-zA-Z0-9_-]+=?$/', $bbcode_tag))
|
||||
if (!preg_match('/^[a-zA-Z0-9_-]+$/', $bbcode_tag))
|
||||
{
|
||||
global $user;
|
||||
trigger_error($user->lang['BBCODE_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
|
@@ -356,6 +356,7 @@ class acp_board
|
||||
'load_user_activity_limit' => array('lang' => 'LOAD_USER_ACTIVITY_LIMIT', 'validate' => 'int:0:99999999', 'type' => 'number:0:99999999', 'explain' => true),
|
||||
'load_tplcompile' => array('lang' => 'RECOMPILE_STYLES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'allow_cdn' => array('lang' => 'ALLOW_CDN', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'enable_accurate_pm_button' => array('lang' => 'YES_ACCURATE_PM_BUTTON', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'allow_live_searches' => array('lang' => 'ALLOW_LIVE_SEARCHES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
|
||||
'legend3' => 'CUSTOM_PROFILE_FIELDS',
|
||||
@@ -444,11 +445,11 @@ class acp_board
|
||||
'legend1' => 'GENERAL_SETTINGS',
|
||||
'email_enable' => array('lang' => 'ENABLE_EMAIL', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true),
|
||||
'board_email_form' => array('lang' => 'BOARD_EMAIL_FORM', 'validate' => 'bool', 'type' => 'radio:enabled_disabled', 'explain' => true),
|
||||
'email_function_name' => array('lang' => 'EMAIL_FUNCTION_NAME', 'validate' => 'string', 'type' => 'text:20:50', 'explain' => true),
|
||||
'email_package_size' => array('lang' => 'EMAIL_PACKAGE_SIZE', 'validate' => 'int:0', 'type' => 'number:0:99999', 'explain' => true),
|
||||
'board_contact' => array('lang' => 'CONTACT_EMAIL', 'validate' => 'email', 'type' => 'email:25:100', 'explain' => true),
|
||||
'board_contact_name' => array('lang' => 'CONTACT_EMAIL_NAME', 'validate' => 'string', 'type' => 'text:25:50', 'explain' => true),
|
||||
'board_email' => array('lang' => 'ADMIN_EMAIL', 'validate' => 'email', 'type' => 'email:25:100', 'explain' => true),
|
||||
'email_force_sender' => array('lang' => 'EMAIL_FORCE_SENDER', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'board_email_sig' => array('lang' => 'EMAIL_SIG', 'validate' => 'string', 'type' => 'textarea:5:30', 'explain' => true),
|
||||
'board_hide_emails' => array('lang' => 'BOARD_HIDE_EMAILS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'send_test_email' => array('lang' => 'SEND_TEST_EMAIL', 'validate' => 'bool', 'type' => 'custom', 'method' => 'send_test_email', 'explain' => true),
|
||||
@@ -503,7 +504,7 @@ class acp_board
|
||||
$error[] = $user->lang['FORM_INVALID'];
|
||||
}
|
||||
// Do not write values if there is an error
|
||||
if (sizeof($error))
|
||||
if (count($error))
|
||||
{
|
||||
$submit = false;
|
||||
}
|
||||
@@ -532,13 +533,6 @@ class acp_board
|
||||
|
||||
$this->new_config[$config_name] = $config_value = $cfg_array[$config_name];
|
||||
|
||||
if ($config_name == 'email_function_name')
|
||||
{
|
||||
$this->new_config['email_function_name'] = trim(str_replace(array('(', ')'), array('', ''), $this->new_config['email_function_name']));
|
||||
$this->new_config['email_function_name'] = (empty($this->new_config['email_function_name']) || !function_exists($this->new_config['email_function_name'])) ? 'mail' : $this->new_config['email_function_name'];
|
||||
$config_value = $this->new_config['email_function_name'];
|
||||
}
|
||||
|
||||
if ($submit)
|
||||
{
|
||||
if (strpos($data['type'], 'password') === 0 && $config_value === '********')
|
||||
@@ -552,7 +546,7 @@ class acp_board
|
||||
|
||||
if ($config_name == 'allow_quick_reply' && isset($_POST['allow_quick_reply_enable']))
|
||||
{
|
||||
enable_bitfield_column_flag(FORUMS_TABLE, 'forum_flags', log(FORUM_FLAG_QUICK_REPLY, 2));
|
||||
enable_bitfield_column_flag(FORUMS_TABLE, 'forum_flags', round(log(FORUM_FLAG_QUICK_REPLY, 2)));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -690,7 +684,7 @@ class acp_board
|
||||
'L_TITLE' => $user->lang[$display_vars['title']],
|
||||
'L_TITLE_EXPLAIN' => $user->lang[$display_vars['title'] . '_EXPLAIN'],
|
||||
|
||||
'S_ERROR' => (sizeof($error)) ? true : false,
|
||||
'S_ERROR' => (count($error)) ? true : false,
|
||||
'ERROR_MSG' => implode('<br />', $error),
|
||||
|
||||
'U_ACTION' => $this->u_action)
|
||||
@@ -1110,7 +1104,7 @@ class acp_board
|
||||
$db->sql_query($sql);
|
||||
|
||||
// Already emptied for all...
|
||||
if (sizeof($values))
|
||||
if (count($values))
|
||||
{
|
||||
// Set for selected forums
|
||||
$sql = 'UPDATE ' . FORUMS_TABLE . '
|
||||
|
@@ -55,7 +55,7 @@ class acp_bots
|
||||
switch ($action)
|
||||
{
|
||||
case 'activate':
|
||||
if ($bot_id || sizeof($mark))
|
||||
if ($bot_id || count($mark))
|
||||
{
|
||||
$sql_id = ($bot_id) ? " = $bot_id" : ' IN (' . implode(', ', $mark) . ')';
|
||||
|
||||
@@ -69,7 +69,7 @@ class acp_bots
|
||||
break;
|
||||
|
||||
case 'deactivate':
|
||||
if ($bot_id || sizeof($mark))
|
||||
if ($bot_id || count($mark))
|
||||
{
|
||||
$sql_id = ($bot_id) ? " = $bot_id" : ' IN (' . implode(', ', $mark) . ')';
|
||||
|
||||
@@ -83,7 +83,7 @@ class acp_bots
|
||||
break;
|
||||
|
||||
case 'delete':
|
||||
if ($bot_id || sizeof($mark))
|
||||
if ($bot_id || count($mark))
|
||||
{
|
||||
if (confirm_box(true))
|
||||
{
|
||||
@@ -109,7 +109,7 @@ class acp_bots
|
||||
WHERE bot_id $sql_id";
|
||||
$db->sql_query($sql);
|
||||
|
||||
if (sizeof($user_id_ary))
|
||||
if (count($user_id_ary))
|
||||
{
|
||||
$_tables = array(USERS_TABLE, USER_GROUP_TABLE);
|
||||
foreach ($_tables as $table)
|
||||
@@ -207,7 +207,7 @@ class acp_bots
|
||||
$error[] = $user->lang['BOT_NAME_TAKEN'];
|
||||
}
|
||||
|
||||
if (!sizeof($error))
|
||||
if (!count($error))
|
||||
{
|
||||
// New bot? Create a new user and group entry
|
||||
if ($action == 'add')
|
||||
@@ -338,7 +338,7 @@ class acp_bots
|
||||
'L_TITLE' => $user->lang['BOT_' . $l_title],
|
||||
'U_ACTION' => $this->u_action . "&id=$bot_id&action=$action",
|
||||
'U_BACK' => $this->u_action,
|
||||
'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '',
|
||||
'ERROR_MSG' => (count($error)) ? implode('<br />', $error) : '',
|
||||
|
||||
'BOT_NAME' => $bot_row['bot_name'],
|
||||
'BOT_IP' => $bot_row['bot_ip'],
|
||||
@@ -348,7 +348,7 @@ class acp_bots
|
||||
'S_ACTIVE_OPTIONS' => $s_active_options,
|
||||
'S_STYLE_OPTIONS' => $style_select,
|
||||
'S_LANG_OPTIONS' => $lang_select,
|
||||
'S_ERROR' => (sizeof($error)) ? true : false,
|
||||
'S_ERROR' => (count($error)) ? true : false,
|
||||
)
|
||||
);
|
||||
|
||||
|
@@ -59,7 +59,7 @@ class acp_database
|
||||
$format = $request->variable('method', '');
|
||||
$where = $request->variable('where', '');
|
||||
|
||||
if (!sizeof($table))
|
||||
if (!count($table))
|
||||
{
|
||||
trigger_error($user->lang['TABLE_SELECT_ERROR'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
@@ -203,7 +203,7 @@ class acp_database
|
||||
$file = $request->variable('file', '');
|
||||
$download = $request->variable('download', '');
|
||||
|
||||
if (!preg_match('#^backup_\d{10,}_[a-z\d]{16}\.(sql(?:\.(?:gz|bz2))?)$#', $file, $matches))
|
||||
if (!preg_match('#^backup_\d{10,}_(?:[a-z\d]{16}|[a-z\d]{32})\.(sql(?:\.(?:gz|bz2))?)$#i', $file, $matches))
|
||||
{
|
||||
trigger_error($user->lang['BACKUP_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
@@ -402,7 +402,7 @@ class acp_database
|
||||
{
|
||||
while (($file = readdir($dh)) !== false)
|
||||
{
|
||||
if (preg_match('#^backup_(\d{10,})_[a-z\d]{16}\.(sql(?:\.(?:gz|bz2))?)$#', $file, $matches))
|
||||
if (preg_match('#^backup_(\d{10,})_(?:[a-z\d]{16}|[a-z\d]{32})\.(sql(?:\.(?:gz|bz2))?)$#i', $file, $matches))
|
||||
{
|
||||
if (in_array($matches[2], $methods))
|
||||
{
|
||||
@@ -495,7 +495,7 @@ function sanitize_data_mssql($text)
|
||||
{
|
||||
$val[] = "'" . $value . "'";
|
||||
}
|
||||
if (sizeof($matches[0]))
|
||||
if (count($matches[0]))
|
||||
{
|
||||
$val[] = 'char(' . ord(array_shift($matches[0])) . ')';
|
||||
}
|
||||
@@ -519,7 +519,7 @@ function sanitize_data_oracle($text)
|
||||
{
|
||||
$val[] = "'" . $value . "'";
|
||||
}
|
||||
if (sizeof($matches[0]))
|
||||
if (count($matches[0]))
|
||||
{
|
||||
$val[] = 'chr(' . ord(array_shift($matches[0])) . ')';
|
||||
}
|
||||
@@ -541,7 +541,7 @@ function sanitize_data_generic($text)
|
||||
{
|
||||
$val[] = "'" . $value . "'";
|
||||
}
|
||||
if (sizeof($matches[0]))
|
||||
if (count($matches[0]))
|
||||
{
|
||||
$val[] = "'" . array_shift($matches[0]) . "'";
|
||||
}
|
||||
@@ -583,7 +583,7 @@ function fgetd_seekless(&$fp, $delim, $read, $seek, $eof, $buffer = 8192)
|
||||
static $array = array();
|
||||
static $record = '';
|
||||
|
||||
if (!sizeof($array))
|
||||
if (!count($array))
|
||||
{
|
||||
while (!$eof($fp))
|
||||
{
|
||||
@@ -605,7 +605,7 @@ function fgetd_seekless(&$fp, $delim, $read, $seek, $eof, $buffer = 8192)
|
||||
}
|
||||
}
|
||||
|
||||
if (sizeof($array))
|
||||
if (count($array))
|
||||
{
|
||||
return array_shift($array);
|
||||
}
|
||||
|
@@ -68,7 +68,7 @@ class acp_email
|
||||
$error[] = $user->lang['NO_EMAIL_MESSAGE'];
|
||||
}
|
||||
|
||||
if (!sizeof($error))
|
||||
if (!count($error))
|
||||
{
|
||||
if (!empty($usernames))
|
||||
{
|
||||
@@ -168,7 +168,7 @@ class acp_email
|
||||
{
|
||||
$i = 0;
|
||||
|
||||
if (sizeof($email_list))
|
||||
if (count($email_list))
|
||||
{
|
||||
$j++;
|
||||
}
|
||||
@@ -235,16 +235,16 @@ class acp_email
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.acp_email_send_before', compact($vars)));
|
||||
|
||||
for ($i = 0, $size = sizeof($email_list); $i < $size; $i++)
|
||||
for ($i = 0, $size = count($email_list); $i < $size; $i++)
|
||||
{
|
||||
$used_lang = $email_list[$i][0]['lang'];
|
||||
$used_method = $email_list[$i][0]['method'];
|
||||
|
||||
for ($j = 0, $list_size = sizeof($email_list[$i]); $j < $list_size; $j++)
|
||||
for ($j = 0, $list_size = count($email_list[$i]); $j < $list_size; $j++)
|
||||
{
|
||||
$email_row = $email_list[$i][$j];
|
||||
|
||||
$messenger->{((sizeof($email_list[$i]) == 1) ? 'to' : 'bcc')}($email_row['email'], $email_row['name']);
|
||||
$messenger->{((count($email_list[$i]) == 1) ? 'to' : 'bcc')}($email_row['email'], $email_row['name']);
|
||||
$messenger->im($email_row['jabber'], $email_row['name']);
|
||||
}
|
||||
|
||||
@@ -322,8 +322,8 @@ class acp_email
|
||||
$s_priority_options .= '<option value="' . MAIL_HIGH_PRIORITY . '">' . $user->lang['MAIL_HIGH_PRIORITY'] . '</option>';
|
||||
|
||||
$template_data = array(
|
||||
'S_WARNING' => (sizeof($error)) ? true : false,
|
||||
'WARNING_MSG' => (sizeof($error)) ? implode('<br />', $error) : '',
|
||||
'S_WARNING' => (count($error)) ? true : false,
|
||||
'WARNING_MSG' => (count($error)) ? implode('<br />', $error) : '',
|
||||
'U_ACTION' => $this->u_action,
|
||||
'S_GROUP_OPTIONS' => $select_list,
|
||||
'USERNAMES' => implode("\n", $usernames),
|
||||
|
@@ -90,7 +90,7 @@ class acp_forums
|
||||
|
||||
$errors = $this->delete_forum($forum_id, $action_posts, $action_subforums, $posts_to_id, $subforums_to_id);
|
||||
|
||||
if (sizeof($errors))
|
||||
if (count($errors))
|
||||
{
|
||||
break;
|
||||
}
|
||||
@@ -198,7 +198,7 @@ class acp_forums
|
||||
|
||||
$errors = $this->update_forum_data($forum_data);
|
||||
|
||||
if (!sizeof($errors))
|
||||
if (!count($errors))
|
||||
{
|
||||
$forum_perm_from = $request->variable('forum_perm_from', 0);
|
||||
$cache->destroy('sql', FORUMS_TABLE);
|
||||
@@ -622,7 +622,7 @@ class acp_forums
|
||||
|
||||
$template_data = array(
|
||||
'S_EDIT_FORUM' => true,
|
||||
'S_ERROR' => (sizeof($errors)) ? true : false,
|
||||
'S_ERROR' => (count($errors)) ? true : false,
|
||||
'S_PARENT_ID' => $this->parent_id,
|
||||
'S_FORUM_PARENT_ID' => $forum_data['parent_id'],
|
||||
'S_ADD_ACTION' => ($action == 'add') ? true : false,
|
||||
@@ -632,7 +632,7 @@ class acp_forums
|
||||
|
||||
'L_COPY_PERMISSIONS_EXPLAIN' => $user->lang['COPY_PERMISSIONS_' . strtoupper($action) . '_EXPLAIN'],
|
||||
'L_TITLE' => $user->lang[$this->page_title],
|
||||
'ERROR_MSG' => (sizeof($errors)) ? implode('<br />', $errors) : '',
|
||||
'ERROR_MSG' => (count($errors)) ? implode('<br />', $errors) : '',
|
||||
|
||||
'FORUM_NAME' => $forum_data['forum_name'],
|
||||
'FORUM_DATA_LINK' => $forum_data['forum_link'],
|
||||
@@ -772,8 +772,8 @@ class acp_forums
|
||||
'S_FORUM_LINK' => ($forum_data['forum_type'] == FORUM_LINK) ? true : false,
|
||||
'S_HAS_SUBFORUMS' => ($forum_data['right_id'] - $forum_data['left_id'] > 1) ? true : false,
|
||||
'S_FORUMS_LIST' => $forums_list,
|
||||
'S_ERROR' => (sizeof($errors)) ? true : false,
|
||||
'ERROR_MSG' => (sizeof($errors)) ? implode('<br />', $errors) : '')
|
||||
'S_ERROR' => (count($errors)) ? true : false,
|
||||
'ERROR_MSG' => (count($errors)) ? implode('<br />', $errors) : '')
|
||||
);
|
||||
|
||||
return;
|
||||
@@ -924,7 +924,7 @@ class acp_forums
|
||||
unset($rowset);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'ERROR_MSG' => (sizeof($errors)) ? implode('<br />', $errors) : '',
|
||||
'ERROR_MSG' => (count($errors)) ? implode('<br />', $errors) : '',
|
||||
'NAVIGATION' => $navigation,
|
||||
'FORUM_BOX' => $forum_box,
|
||||
'U_SEL_ACTION' => $this->u_action,
|
||||
@@ -1012,7 +1012,7 @@ class acp_forums
|
||||
}
|
||||
|
||||
$range_test_ary = array(
|
||||
array('lang' => 'FORUM_TOPICS_PAGE', 'value' => $forum_data_ary['forum_topics_per_page'], 'column_type' => 'TINT:0'),
|
||||
array('lang' => 'FORUM_TOPICS_PAGE', 'value' => $forum_data_ary['forum_topics_per_page'], 'column_type' => 'USINT:0'),
|
||||
);
|
||||
|
||||
if (!empty($forum_data_ary['forum_image']) && !file_exists($phpbb_root_path . $forum_data_ary['forum_image']))
|
||||
@@ -1053,7 +1053,7 @@ class acp_forums
|
||||
// What are we going to do tonight Brain? The same thing we do everynight,
|
||||
// try to take over the world ... or decide whether to continue update
|
||||
// and if so, whether it's a new forum/cat/link or an existing one
|
||||
if (sizeof($errors))
|
||||
if (count($errors))
|
||||
{
|
||||
return $errors;
|
||||
}
|
||||
@@ -1217,12 +1217,12 @@ class acp_forums
|
||||
$errors = array_merge($errors, $this->delete_forum_content($_row['forum_id']));
|
||||
}
|
||||
|
||||
if (sizeof($errors))
|
||||
if (count($errors))
|
||||
{
|
||||
return $errors;
|
||||
}
|
||||
|
||||
if (sizeof($forum_ids))
|
||||
if (count($forum_ids))
|
||||
{
|
||||
$sql = 'DELETE FROM ' . FORUMS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('forum_id', $forum_ids);
|
||||
@@ -1252,7 +1252,7 @@ class acp_forums
|
||||
$allowed_forums = array_diff($allowed_forums, $forum_ids);
|
||||
|
||||
$sql = 'UPDATE ' . EXTENSION_GROUPS_TABLE . "
|
||||
SET allowed_forums = '" . ((sizeof($allowed_forums)) ? serialize($allowed_forums) : '') . "'
|
||||
SET allowed_forums = '" . ((count($allowed_forums)) ? serialize($allowed_forums) : '') . "'
|
||||
WHERE group_id = {$_row['group_id']}";
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
@@ -1321,7 +1321,7 @@ class acp_forums
|
||||
$forum_data_sql['forum_last_poster_colour'] = '';
|
||||
}
|
||||
|
||||
if (sizeof($errors))
|
||||
if (count($errors))
|
||||
{
|
||||
return $errors;
|
||||
}
|
||||
@@ -1338,7 +1338,7 @@ class acp_forums
|
||||
}
|
||||
}
|
||||
|
||||
if (sizeof($errors))
|
||||
if (count($errors))
|
||||
{
|
||||
return $errors;
|
||||
}
|
||||
@@ -1431,12 +1431,14 @@ class acp_forums
|
||||
return $errors;
|
||||
}
|
||||
|
||||
$db->sql_transaction('begin');
|
||||
|
||||
$moved_forums = get_forum_branch($from_id, 'children', 'descending');
|
||||
$from_data = $moved_forums[0];
|
||||
$diff = sizeof($moved_forums) * 2;
|
||||
$diff = count($moved_forums) * 2;
|
||||
|
||||
$moved_ids = array();
|
||||
for ($i = 0, $size = sizeof($moved_forums); $i < $size; ++$i)
|
||||
for ($i = 0, $size = count($moved_forums); $i < $size; ++$i)
|
||||
{
|
||||
$moved_ids[] = $moved_forums[$i]['forum_id'];
|
||||
}
|
||||
@@ -1502,6 +1504,8 @@ class acp_forums
|
||||
WHERE " . $db->sql_in_set('forum_id', $moved_ids);
|
||||
$db->sql_query($sql);
|
||||
|
||||
$db->sql_transaction('commit');
|
||||
|
||||
return $errors;
|
||||
}
|
||||
|
||||
@@ -1537,6 +1541,16 @@ class acp_forums
|
||||
|
||||
$table_ary = array(LOG_TABLE, POSTS_TABLE, TOPICS_TABLE, DRAFTS_TABLE, TOPICS_TRACK_TABLE);
|
||||
|
||||
/**
|
||||
* Perform additional actions before move forum content
|
||||
*
|
||||
* @event core.acp_manage_forums_move_content_sql_before
|
||||
* @var array table_ary Array of tables from which forum_id will be updated
|
||||
* @since 3.2.4-RC1
|
||||
*/
|
||||
$vars = array('table_ary');
|
||||
extract($phpbb_dispatcher->trigger_event('core.acp_manage_forums_move_content_sql_before', compact($vars)));
|
||||
|
||||
foreach ($table_ary as $table)
|
||||
{
|
||||
$sql = "UPDATE $table
|
||||
@@ -1612,7 +1626,7 @@ class acp_forums
|
||||
}
|
||||
}
|
||||
|
||||
if (sizeof($errors))
|
||||
if (count($errors))
|
||||
{
|
||||
return $errors;
|
||||
}
|
||||
@@ -1628,12 +1642,12 @@ class acp_forums
|
||||
$errors = array_merge($errors, $this->delete_forum_content($row['forum_id']));
|
||||
}
|
||||
|
||||
if (sizeof($errors))
|
||||
if (count($errors))
|
||||
{
|
||||
return $errors;
|
||||
}
|
||||
|
||||
$diff = sizeof($forum_ids) * 2;
|
||||
$diff = count($forum_ids) * 2;
|
||||
|
||||
$sql = 'DELETE FROM ' . FORUMS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('forum_id', $forum_ids);
|
||||
@@ -1706,7 +1720,7 @@ class acp_forums
|
||||
}
|
||||
}
|
||||
|
||||
if (sizeof($errors))
|
||||
if (count($errors))
|
||||
{
|
||||
return $errors;
|
||||
}
|
||||
@@ -1754,7 +1768,7 @@ class acp_forums
|
||||
$allowed_forums = array_diff($allowed_forums, $forum_ids);
|
||||
|
||||
$sql = 'UPDATE ' . EXTENSION_GROUPS_TABLE . "
|
||||
SET allowed_forums = '" . ((sizeof($allowed_forums)) ? serialize($allowed_forums) : '') . "'
|
||||
SET allowed_forums = '" . ((count($allowed_forums)) ? serialize($allowed_forums) : '') . "'
|
||||
WHERE group_id = {$row['group_id']}";
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
@@ -1927,9 +1941,9 @@ class acp_forums
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (sizeof($ids))
|
||||
if (count($ids))
|
||||
{
|
||||
$start += sizeof($ids);
|
||||
$start += count($ids);
|
||||
|
||||
foreach ($tables as $table)
|
||||
{
|
||||
@@ -1937,7 +1951,7 @@ class acp_forums
|
||||
}
|
||||
}
|
||||
}
|
||||
while (sizeof($ids) == $batch_size);
|
||||
while (count($ids) == $batch_size);
|
||||
}
|
||||
unset($ids);
|
||||
|
||||
@@ -1978,7 +1992,7 @@ class acp_forums
|
||||
}
|
||||
|
||||
// Adjust users post counts
|
||||
if (sizeof($post_counts))
|
||||
if (count($post_counts))
|
||||
{
|
||||
foreach ($post_counts as $poster_id => $substract)
|
||||
{
|
||||
@@ -2062,7 +2076,7 @@ class acp_forums
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (!sizeof($target))
|
||||
if (!count($target))
|
||||
{
|
||||
// The forum is already on top or bottom
|
||||
return false;
|
||||
|
@@ -187,7 +187,7 @@ class acp_groups
|
||||
|
||||
group_user_attributes('default', $group_id, $mark_ary, false, $group_name, $group_row);
|
||||
|
||||
$start = (sizeof($mark_ary) < 200) ? 0 : $start + 200;
|
||||
$start = (count($mark_ary) < 200) ? 0 : $start + 200;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -486,7 +486,7 @@ class acp_groups
|
||||
$error = array_merge($error, $validation_error);
|
||||
}
|
||||
|
||||
if (!sizeof($error))
|
||||
if (!count($error))
|
||||
{
|
||||
// Only set the rank, colour, etc. if it's changed or if we're adding a new
|
||||
// group. This prevents existing group members being updated if no changes
|
||||
@@ -614,7 +614,7 @@ class acp_groups
|
||||
}
|
||||
}
|
||||
|
||||
if (sizeof($error))
|
||||
if (count($error))
|
||||
{
|
||||
$error = array_map(array(&$user, 'lang'), $error);
|
||||
$group_rank = $submit_ary['rank'];
|
||||
@@ -732,12 +732,12 @@ class acp_groups
|
||||
'S_ADD_GROUP' => ($action == 'add') ? true : false,
|
||||
'S_GROUP_PERM' => ($action == 'add' && $auth->acl_get('a_authgroups') && $auth->acl_gets('a_aauth', 'a_fauth', 'a_mauth', 'a_uauth')) ? true : false,
|
||||
'S_INCLUDE_SWATCH' => true,
|
||||
'S_ERROR' => (sizeof($error)) ? true : false,
|
||||
'S_ERROR' => (count($error)) ? true : false,
|
||||
'S_SPECIAL_GROUP' => ($group_type == GROUP_SPECIAL) ? true : false,
|
||||
'S_USER_FOUNDER' => ($user->data['user_type'] == USER_FOUNDER) ? true : false,
|
||||
'S_AVATARS_ENABLED' => ($config['allow_avatar'] && $avatars_enabled),
|
||||
|
||||
'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '',
|
||||
'ERROR_MSG' => (count($error)) ? implode('<br />', $error) : '',
|
||||
'GROUP_NAME' => $group_helper->get_name($group_name),
|
||||
'GROUP_INTERNAL_NAME' => $group_name,
|
||||
'GROUP_DESC' => $group_desc_data['text'],
|
||||
@@ -926,7 +926,7 @@ class acp_groups
|
||||
);
|
||||
|
||||
// Get us all the groups
|
||||
$sql = 'SELECT g.group_id, g.group_name, g.group_type
|
||||
$sql = 'SELECT g.group_id, g.group_name, g.group_type, g.group_colour
|
||||
FROM ' . GROUPS_TABLE . ' g
|
||||
ORDER BY g.group_type ASC, g.group_name';
|
||||
$result = $db->sql_query($sql);
|
||||
@@ -985,6 +985,7 @@ class acp_groups
|
||||
'S_GROUP_SPECIAL' => ($row['group_type'] == GROUP_SPECIAL) ? true : false,
|
||||
|
||||
'GROUP_NAME' => $group_name,
|
||||
'GROUP_COLOR' => $row['group_colour'],
|
||||
'TOTAL_MEMBERS' => $row['total_members'],
|
||||
'PENDING_MEMBERS' => $row['pending_members']
|
||||
));
|
||||
|
@@ -48,7 +48,7 @@ class acp_help_phpbb
|
||||
$error[] = $user->lang['FORM_INVALID'];
|
||||
}
|
||||
// Do not write values if there is an error
|
||||
if (sizeof($error))
|
||||
if (count($error))
|
||||
{
|
||||
$submit = false;
|
||||
}
|
||||
|
@@ -166,7 +166,7 @@ class acp_icons
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (sizeof($smilies))
|
||||
if (count($smilies))
|
||||
{
|
||||
foreach ($smilies as $row)
|
||||
{
|
||||
@@ -301,7 +301,7 @@ class acp_icons
|
||||
}
|
||||
|
||||
// Ok, another row for adding an addition code for a pre-existing image...
|
||||
if ($action == 'add' && $mode == 'smilies' && sizeof($smilies))
|
||||
if ($action == 'add' && $mode == 'smilies' && count($smilies))
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_ADD_CODE' => true,
|
||||
@@ -378,7 +378,7 @@ class acp_icons
|
||||
{
|
||||
$smiley_count = $this->item_count($table);
|
||||
|
||||
$addable_smileys_count = sizeof($images);
|
||||
$addable_smileys_count = count($images);
|
||||
foreach ($images as $image)
|
||||
{
|
||||
if (!isset($image_add[$image]))
|
||||
@@ -546,8 +546,8 @@ class acp_icons
|
||||
{
|
||||
if (preg_match_all("#'(.*?)', ?#", $pak_entry, $data))
|
||||
{
|
||||
if ((sizeof($data[1]) != 4 && $mode == 'icons') ||
|
||||
((sizeof($data[1]) != 6 || (empty($data[1][4]) || empty($data[1][5]))) && $mode == 'smilies' ))
|
||||
if ((count($data[1]) != 4 && $mode == 'icons') ||
|
||||
((count($data[1]) != 6 || (empty($data[1][4]) || empty($data[1][5]))) && $mode == 'smilies' ))
|
||||
{
|
||||
trigger_error($user->lang['WRONG_PAK_TYPE'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
@@ -605,7 +605,7 @@ class acp_icons
|
||||
if ($mode == 'smilies')
|
||||
{
|
||||
$smiley_count = $this->item_count($table);
|
||||
if ($smiley_count + sizeof($pak_ary) > SMILEY_LIMIT)
|
||||
if ($smiley_count + count($pak_ary) > SMILEY_LIMIT)
|
||||
{
|
||||
trigger_error($user->lang('TOO_MANY_SMILIES', SMILEY_LIMIT) . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
@@ -616,8 +616,8 @@ class acp_icons
|
||||
$data = array();
|
||||
if (preg_match_all("#'(.*?)', ?#", $pak_entry, $data))
|
||||
{
|
||||
if ((sizeof($data[1]) != 4 && $mode == 'icons') ||
|
||||
(sizeof($data[1]) != 6 && $mode == 'smilies'))
|
||||
if ((count($data[1]) != 4 && $mode == 'icons') ||
|
||||
(count($data[1]) != 6 && $mode == 'smilies'))
|
||||
{
|
||||
trigger_error($user->lang['WRONG_PAK_TYPE'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
@@ -24,7 +24,7 @@ class acp_inactive
|
||||
var $u_action;
|
||||
var $p_master;
|
||||
|
||||
function acp_inactive(&$p_master)
|
||||
function __construct(&$p_master)
|
||||
{
|
||||
$this->p_master = &$p_master;
|
||||
}
|
||||
@@ -70,7 +70,7 @@ class acp_inactive
|
||||
$s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = '';
|
||||
gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param);
|
||||
|
||||
if ($submit && sizeof($mark))
|
||||
if ($submit && count($mark))
|
||||
{
|
||||
if ($action !== 'delete' && !check_form_key($form_key))
|
||||
{
|
||||
|
@@ -32,7 +32,7 @@ class acp_language
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $config, $db, $user, $template, $phpbb_log, $phpbb_container;
|
||||
global $phpbb_root_path, $phpEx, $request;
|
||||
global $phpbb_root_path, $phpEx, $request, $phpbb_dispatcher;
|
||||
|
||||
if (!function_exists('validate_language_iso_name'))
|
||||
{
|
||||
@@ -229,7 +229,20 @@ class acp_language
|
||||
|
||||
$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_LANGUAGE_PACK_DELETED', false, array($row['lang_english_name']));
|
||||
|
||||
trigger_error(sprintf($user->lang['LANGUAGE_PACK_DELETED'], $row['lang_english_name']) . adm_back_link($this->u_action));
|
||||
$delete_message = sprintf($user->lang['LANGUAGE_PACK_DELETED'], $row['lang_english_name']);
|
||||
$lang_iso = $row['lang_iso'];
|
||||
/**
|
||||
* Run code after language deleted
|
||||
*
|
||||
* @event core.acp_language_after_delete
|
||||
* @var string lang_iso Language ISO code
|
||||
* @var string delete_message Delete message appear to user
|
||||
* @since 3.2.2-RC1
|
||||
*/
|
||||
$vars = array('lang_iso', 'delete_message');
|
||||
extract($phpbb_dispatcher->trigger_event('core.acp_language_after_delete', compact($vars)));
|
||||
|
||||
trigger_error($delete_message . adm_back_link($this->u_action));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -402,7 +415,7 @@ class acp_language
|
||||
|
||||
unset($installed);
|
||||
|
||||
if (sizeof($new_ary))
|
||||
if (count($new_ary))
|
||||
{
|
||||
foreach ($new_ary as $iso => $lang_ary)
|
||||
{
|
||||
|
@@ -57,7 +57,7 @@ class acp_logs
|
||||
{
|
||||
$conditions = array();
|
||||
|
||||
if ($deletemark && sizeof($marked))
|
||||
if ($deletemark && count($marked))
|
||||
{
|
||||
$conditions['log_id'] = array('IN' => $marked);
|
||||
}
|
||||
@@ -151,7 +151,7 @@ class acp_logs
|
||||
{
|
||||
$data = array();
|
||||
|
||||
$checks = array('viewtopic', 'viewlogs', 'viewforum');
|
||||
$checks = array('viewpost', 'viewtopic', 'viewlogs', 'viewforum');
|
||||
foreach ($checks as $check)
|
||||
{
|
||||
if (isset($row[$check]) && $row[$check])
|
||||
@@ -167,7 +167,7 @@ class acp_logs
|
||||
'IP' => $row['ip'],
|
||||
'DATE' => $user->format_date($row['time']),
|
||||
'ACTION' => $row['action'],
|
||||
'DATA' => (sizeof($data)) ? implode(' | ', $data) : '',
|
||||
'DATA' => (count($data)) ? implode(' | ', $data) : '',
|
||||
'ID' => $row['id'],
|
||||
)
|
||||
);
|
||||
|
@@ -337,7 +337,7 @@ class acp_main
|
||||
}
|
||||
unset($posted);
|
||||
|
||||
if (sizeof($sql_ary))
|
||||
if (count($sql_ary))
|
||||
{
|
||||
$db->sql_multi_insert(TOPICS_POSTED_TABLE, $sql_ary);
|
||||
}
|
||||
@@ -585,6 +585,7 @@ class acp_main
|
||||
'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", 'versioncheck_force=1'),
|
||||
'U_ATTACH_ORPHAN' => append_sid("{$phpbb_admin_path}index.$phpEx", 'i=acp_attachments&mode=orphan'),
|
||||
|
||||
'S_VERSIONCHECK' => ($auth->acl_get('a_board')) ? true : false,
|
||||
'S_ACTION_OPTIONS' => ($auth->acl_get('a_board')) ? true : false,
|
||||
|
@@ -249,7 +249,7 @@ class acp_modules
|
||||
trigger_error($msg . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);
|
||||
}
|
||||
|
||||
if (!sizeof($errors))
|
||||
if (!count($errors))
|
||||
{
|
||||
$module_manager->remove_cache_file($this->module_class);
|
||||
|
||||
@@ -364,7 +364,7 @@ class acp_modules
|
||||
trigger_error($msg . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);
|
||||
}
|
||||
|
||||
if (!sizeof($errors))
|
||||
if (!count($errors))
|
||||
{
|
||||
$module_manager->remove_cache_file($this->module_class);
|
||||
|
||||
@@ -430,7 +430,7 @@ class acp_modules
|
||||
array_change_key_case($module_data, CASE_UPPER))
|
||||
);
|
||||
|
||||
if (sizeof($errors))
|
||||
if (count($errors))
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_ERROR' => true,
|
||||
@@ -444,7 +444,7 @@ class acp_modules
|
||||
}
|
||||
|
||||
// Default management page
|
||||
if (sizeof($errors))
|
||||
if (count($errors))
|
||||
{
|
||||
if ($request->is_ajax())
|
||||
{
|
||||
|
@@ -348,7 +348,7 @@ class acp_permission_roles
|
||||
{
|
||||
$hold_ary = $this->auth_admin->get_role_mask($role_id);
|
||||
|
||||
if (sizeof($hold_ary))
|
||||
if (count($hold_ary))
|
||||
{
|
||||
$role_name = (!empty($user->lang[$role_row['role_name']])) ? $user->lang[$role_row['role_name']] : $role_row['role_name'];
|
||||
|
||||
@@ -496,7 +496,7 @@ class acp_permission_roles
|
||||
|
||||
$content_array = $content_array[0];
|
||||
|
||||
$template->assign_var('S_NUM_PERM_COLS', sizeof($categories));
|
||||
$template->assign_var('S_NUM_PERM_COLS', count($categories));
|
||||
|
||||
// Assign to template
|
||||
foreach ($content_array as $cat => $cat_array)
|
||||
|
@@ -131,11 +131,11 @@ class acp_permissions
|
||||
}
|
||||
unset($usernames);
|
||||
|
||||
if (sizeof($username) && !sizeof($user_id))
|
||||
if (count($username) && !count($user_id))
|
||||
{
|
||||
user_get_id_name($user_id, $username);
|
||||
|
||||
if (!sizeof($user_id))
|
||||
if (!count($user_id))
|
||||
{
|
||||
trigger_error($user->lang['SELECTED_USER_NOT_EXIST'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
@@ -260,17 +260,17 @@ class acp_permissions
|
||||
{
|
||||
$items = $this->retrieve_defined_user_groups($permission_scope, $forum_id, $permission_type);
|
||||
|
||||
if ($all_users && sizeof($items['user_ids']))
|
||||
if ($all_users && count($items['user_ids']))
|
||||
{
|
||||
$user_id = $items['user_ids'];
|
||||
}
|
||||
else if ($all_groups && sizeof($items['group_ids']))
|
||||
else if ($all_groups && count($items['group_ids']))
|
||||
{
|
||||
$group_id = $items['group_ids'];
|
||||
}
|
||||
}
|
||||
|
||||
if (sizeof($user_id) || sizeof($group_id))
|
||||
if (count($user_id) || count($group_id))
|
||||
{
|
||||
$this->remove_permissions($mode, $permission_type, $auth_admin, $user_id, $group_id, $forum_id);
|
||||
}
|
||||
@@ -349,7 +349,7 @@ class acp_permissions
|
||||
{
|
||||
case 'forum_dropdown':
|
||||
|
||||
if (sizeof($forum_id))
|
||||
if (count($forum_id))
|
||||
{
|
||||
$this->check_existence('forum', $forum_id);
|
||||
continue 2;
|
||||
@@ -364,7 +364,7 @@ class acp_permissions
|
||||
|
||||
case 'forums':
|
||||
|
||||
if (sizeof($forum_id))
|
||||
if (count($forum_id))
|
||||
{
|
||||
$this->check_existence('forum', $forum_id);
|
||||
continue 2;
|
||||
@@ -394,7 +394,7 @@ class acp_permissions
|
||||
|
||||
case 'user':
|
||||
|
||||
if (sizeof($user_id))
|
||||
if (count($user_id))
|
||||
{
|
||||
$this->check_existence('user', $user_id);
|
||||
continue 2;
|
||||
@@ -409,7 +409,7 @@ class acp_permissions
|
||||
|
||||
case 'group':
|
||||
|
||||
if (sizeof($group_id))
|
||||
if (count($group_id))
|
||||
{
|
||||
$this->check_existence('group', $group_id);
|
||||
continue 2;
|
||||
@@ -428,14 +428,14 @@ class acp_permissions
|
||||
$all_users = (isset($_POST['all_users'])) ? true : false;
|
||||
$all_groups = (isset($_POST['all_groups'])) ? true : false;
|
||||
|
||||
if ((sizeof($user_id) && !$all_users) || (sizeof($group_id) && !$all_groups))
|
||||
if ((count($user_id) && !$all_users) || (count($group_id) && !$all_groups))
|
||||
{
|
||||
if (sizeof($user_id))
|
||||
if (count($user_id))
|
||||
{
|
||||
$this->check_existence('user', $user_id);
|
||||
}
|
||||
|
||||
if (sizeof($group_id))
|
||||
if (count($group_id))
|
||||
{
|
||||
$this->check_existence('group', $group_id);
|
||||
}
|
||||
@@ -446,13 +446,13 @@ class acp_permissions
|
||||
// Now we check the users... because the "all"-selection is different here (all defined users/groups)
|
||||
$items = $this->retrieve_defined_user_groups($permission_scope, $forum_id, $permission_type);
|
||||
|
||||
if ($all_users && sizeof($items['user_ids']))
|
||||
if ($all_users && count($items['user_ids']))
|
||||
{
|
||||
$user_id = $items['user_ids'];
|
||||
continue 2;
|
||||
}
|
||||
|
||||
if ($all_groups && sizeof($items['group_ids']))
|
||||
if ($all_groups && count($items['group_ids']))
|
||||
{
|
||||
$group_id = $items['group_ids'];
|
||||
continue 2;
|
||||
@@ -487,14 +487,14 @@ class acp_permissions
|
||||
'ANONYMOUS_USER_ID' => ANONYMOUS,
|
||||
|
||||
'S_SELECT_VICTIM' => true,
|
||||
'S_ALLOW_ALL_SELECT' => (sizeof($forum_id) > 5) ? false : true,
|
||||
'S_ALLOW_ALL_SELECT' => (count($forum_id) > 5) ? false : true,
|
||||
'S_CAN_SELECT_USER' => ($auth->acl_get('a_authusers')) ? true : false,
|
||||
'S_CAN_SELECT_GROUP' => ($auth->acl_get('a_authgroups')) ? true : false,
|
||||
'S_HIDDEN_FIELDS' => $s_hidden_fields)
|
||||
);
|
||||
|
||||
// Let the forum names being displayed
|
||||
if (sizeof($forum_id))
|
||||
if (count($forum_id))
|
||||
{
|
||||
$sql = 'SELECT forum_name
|
||||
FROM ' . FORUMS_TABLE . '
|
||||
@@ -510,7 +510,7 @@ class acp_permissions
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_FORUM_NAMES' => (sizeof($forum_names)) ? true : false,
|
||||
'S_FORUM_NAMES' => (count($forum_names)) ? true : false,
|
||||
'FORUM_NAMES' => implode($user->lang['COMMA_SEPARATOR'], $forum_names))
|
||||
);
|
||||
}
|
||||
@@ -527,13 +527,13 @@ class acp_permissions
|
||||
));
|
||||
|
||||
// Do not allow forum_ids being set and no other setting defined (will bog down the server too much)
|
||||
if (sizeof($forum_id) && !sizeof($user_id) && !sizeof($group_id))
|
||||
if (count($forum_id) && !count($user_id) && !count($group_id))
|
||||
{
|
||||
trigger_error($user->lang['ONLY_FORUM_DEFINED'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_PERMISSION_DROPDOWN' => (sizeof($this->permission_dropdown) > 1) ? $this->build_permission_dropdown($this->permission_dropdown, $permission_type, $permission_scope) : false,
|
||||
'S_PERMISSION_DROPDOWN' => (count($this->permission_dropdown) > 1) ? $this->build_permission_dropdown($this->permission_dropdown, $permission_type, $permission_scope) : false,
|
||||
'L_PERMISSION_TYPE' => $this->permissions->get_type_lang($permission_type),
|
||||
|
||||
'U_ACTION' => $this->u_action,
|
||||
@@ -546,8 +546,8 @@ class acp_permissions
|
||||
'S_SETTING_PERMISSIONS' => true)
|
||||
);
|
||||
|
||||
$hold_ary = $auth_admin->get_mask('set', (sizeof($user_id)) ? $user_id : false, (sizeof($group_id)) ? $group_id : false, (sizeof($forum_id)) ? $forum_id : false, $permission_type, $permission_scope, ACL_NO);
|
||||
$auth_admin->display_mask('set', $permission_type, $hold_ary, ((sizeof($user_id)) ? 'user' : 'group'), (($permission_scope == 'local') ? true : false));
|
||||
$hold_ary = $auth_admin->get_mask('set', (count($user_id)) ? $user_id : false, (count($group_id)) ? $group_id : false, (count($forum_id)) ? $forum_id : false, $permission_type, $permission_scope, ACL_NO);
|
||||
$auth_admin->display_mask('set', $permission_type, $hold_ary, ((count($user_id)) ? 'user' : 'group'), (($permission_scope == 'local') ? true : false));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -555,8 +555,8 @@ class acp_permissions
|
||||
'S_VIEWING_PERMISSIONS' => true)
|
||||
);
|
||||
|
||||
$hold_ary = $auth_admin->get_mask('view', (sizeof($user_id)) ? $user_id : false, (sizeof($group_id)) ? $group_id : false, (sizeof($forum_id)) ? $forum_id : false, $permission_type, $permission_scope, ACL_NEVER);
|
||||
$auth_admin->display_mask('view', $permission_type, $hold_ary, ((sizeof($user_id)) ? 'user' : 'group'), (($permission_scope == 'local') ? true : false));
|
||||
$hold_ary = $auth_admin->get_mask('view', (count($user_id)) ? $user_id : false, (count($group_id)) ? $group_id : false, (count($forum_id)) ? $forum_id : false, $permission_type, $permission_scope, ACL_NEVER);
|
||||
$auth_admin->display_mask('view', $permission_type, $hold_ary, ((count($user_id)) ? 'user' : 'group'), (($permission_scope == 'local') ? true : false));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -652,7 +652,7 @@ class acp_permissions
|
||||
break;
|
||||
}
|
||||
|
||||
if (sizeof($ids))
|
||||
if (count($ids))
|
||||
{
|
||||
$sql = "SELECT $sql_id
|
||||
FROM $table
|
||||
@@ -667,7 +667,7 @@ class acp_permissions
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
if (!sizeof($ids))
|
||||
if (!count($ids))
|
||||
{
|
||||
trigger_error($user->lang['SELECTED_' . strtoupper($mode) . '_NOT_EXIST'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
@@ -684,7 +684,7 @@ class acp_permissions
|
||||
$psubmit = $request->variable('psubmit', array(0 => array(0 => 0)));
|
||||
|
||||
// User or group to be set?
|
||||
$ug_type = (sizeof($user_id)) ? 'user' : 'group';
|
||||
$ug_type = (count($user_id)) ? 'user' : 'group';
|
||||
|
||||
// Check the permission setting again
|
||||
if (!$auth->acl_get('a_' . str_replace('_', '', $permission_type) . 'auth') || !$auth->acl_get('a_auth' . $ug_type . 's'))
|
||||
@@ -715,7 +715,7 @@ class acp_permissions
|
||||
$ug_id = array($ug_id);
|
||||
$forum_id = array($forum_id);
|
||||
|
||||
if (sizeof($inherit))
|
||||
if (count($inherit))
|
||||
{
|
||||
foreach ($inherit as $_ug_id => $forum_id_ary)
|
||||
{
|
||||
@@ -771,7 +771,7 @@ class acp_permissions
|
||||
global $request;
|
||||
|
||||
// User or group to be set?
|
||||
$ug_type = (sizeof($user_id)) ? 'user' : 'group';
|
||||
$ug_type = (count($user_id)) ? 'user' : 'group';
|
||||
|
||||
// Check the permission setting again
|
||||
if (!$auth->acl_get('a_' . str_replace('_', '', $permission_type) . 'auth') || !$auth->acl_get('a_auth' . $ug_type . 's'))
|
||||
@@ -870,7 +870,7 @@ class acp_permissions
|
||||
}
|
||||
}
|
||||
|
||||
if (sizeof(array_diff_assoc($auth_settings, $test_auth_settings)))
|
||||
if (count(array_diff_assoc($auth_settings, $test_auth_settings)))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -886,7 +886,7 @@ class acp_permissions
|
||||
global $user, $db, $cache, $auth;
|
||||
|
||||
// User or group to be set?
|
||||
$ug_type = (sizeof($user_id)) ? 'user' : 'group';
|
||||
$ug_type = (count($user_id)) ? 'user' : 'group';
|
||||
|
||||
// Check the permission setting again
|
||||
if (!$auth->acl_get('a_' . str_replace('_', '', $permission_type) . 'auth') || !$auth->acl_get('a_auth' . $ug_type . 's'))
|
||||
@@ -895,7 +895,7 @@ class acp_permissions
|
||||
trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
$auth_admin->acl_delete($ug_type, (($ug_type == 'user') ? $user_id : $group_id), (sizeof($forum_id) ? $forum_id : false), $permission_type);
|
||||
$auth_admin->acl_delete($ug_type, (($ug_type == 'user') ? $user_id : $group_id), (count($forum_id) ? $forum_id : false), $permission_type);
|
||||
|
||||
// Do we need to recache the moderator lists?
|
||||
if ($permission_type == 'm_')
|
||||
@@ -903,7 +903,7 @@ class acp_permissions
|
||||
phpbb_cache_moderators($db, $cache, $auth);
|
||||
}
|
||||
|
||||
$this->log_action($mode, 'del', $permission_type, $ug_type, (($ug_type == 'user') ? $user_id : $group_id), (sizeof($forum_id) ? $forum_id : array(0 => 0)));
|
||||
$this->log_action($mode, 'del', $permission_type, $ug_type, (($ug_type == 'user') ? $user_id : $group_id), (count($forum_id) ? $forum_id : array(0 => 0)));
|
||||
|
||||
if ($mode == 'setting_forum_local' || $mode == 'setting_mod_local')
|
||||
{
|
||||
@@ -1053,7 +1053,7 @@ class acp_permissions
|
||||
$total = ACL_NO;
|
||||
$add_key = (($forum_id) ? '_LOCAL' : '');
|
||||
|
||||
if (sizeof($groups))
|
||||
if (count($groups))
|
||||
{
|
||||
// Get group auth settings
|
||||
$hold_ary = $auth->acl_group_raw_data(array_keys($groups), $permission, $forum_id);
|
||||
@@ -1099,7 +1099,7 @@ class acp_permissions
|
||||
|
||||
// Get user specific permission... globally or for this forum
|
||||
$hold_ary = $auth->acl_user_raw_data($user_id, $permission, $forum_id);
|
||||
$auth_setting = (!sizeof($hold_ary)) ? ACL_NO : $hold_ary[$user_id][$forum_id][$permission];
|
||||
$auth_setting = (!count($hold_ary)) ? ACL_NO : $hold_ary[$user_id][$forum_id][$permission];
|
||||
|
||||
switch ($auth_setting)
|
||||
{
|
||||
@@ -1258,7 +1258,7 @@ class acp_permissions
|
||||
/** @var \phpbb\group\helper $group_helper */
|
||||
$group_helper = $phpbb_container->get('group_helper');
|
||||
|
||||
$sql_forum_id = ($permission_scope == 'global') ? 'AND a.forum_id = 0' : ((sizeof($forum_id)) ? 'AND ' . $db->sql_in_set('a.forum_id', $forum_id) : 'AND a.forum_id <> 0');
|
||||
$sql_forum_id = ($permission_scope == 'global') ? 'AND a.forum_id = 0' : ((count($forum_id)) ? 'AND ' . $db->sql_in_set('a.forum_id', $forum_id) : 'AND a.forum_id <> 0');
|
||||
|
||||
// Permission options are only able to be a permission set... therefore we will pre-fetch the possible options and also the possible roles
|
||||
$option_ids = $role_ids = array();
|
||||
@@ -1274,7 +1274,7 @@ class acp_permissions
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (sizeof($option_ids))
|
||||
if (count($option_ids))
|
||||
{
|
||||
$sql = 'SELECT DISTINCT role_id
|
||||
FROM ' . ACL_ROLES_DATA_TABLE . '
|
||||
@@ -1288,15 +1288,15 @@ class acp_permissions
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
if (sizeof($option_ids) && sizeof($role_ids))
|
||||
if (count($option_ids) && count($role_ids))
|
||||
{
|
||||
$sql_where = 'AND (' . $db->sql_in_set('a.auth_option_id', $option_ids) . ' OR ' . $db->sql_in_set('a.auth_role_id', $role_ids) . ')';
|
||||
}
|
||||
else if (sizeof($role_ids))
|
||||
else if (count($role_ids))
|
||||
{
|
||||
$sql_where = 'AND ' . $db->sql_in_set('a.auth_role_id', $role_ids);
|
||||
}
|
||||
else if (sizeof($option_ids))
|
||||
else if (count($option_ids))
|
||||
{
|
||||
$sql_where = 'AND ' . $db->sql_in_set('a.auth_option_id', $option_ids);
|
||||
}
|
||||
|
@@ -446,7 +446,7 @@ class acp_profile
|
||||
{
|
||||
$exploded_options = (is_array($options)) ? $options : explode("\n", $options);
|
||||
|
||||
if (sizeof($exploded_options) == sizeof($lang_options) || $action == 'create')
|
||||
if (count($exploded_options) == count($lang_options) || $action == 'create')
|
||||
{
|
||||
// The number of options in the field is equal to the number of options already in the database
|
||||
// Or we are creating a new dropdown list.
|
||||
@@ -567,7 +567,7 @@ class acp_profile
|
||||
}
|
||||
}
|
||||
|
||||
if (sizeof($error))
|
||||
if (count($error))
|
||||
{
|
||||
$submit = false;
|
||||
}
|
||||
@@ -600,9 +600,9 @@ class acp_profile
|
||||
$s_hidden_fields .= build_hidden_fields($_new_key_ary);
|
||||
}
|
||||
|
||||
if (!sizeof($error))
|
||||
if (!count($error))
|
||||
{
|
||||
if (($step == 3 && (sizeof($this->lang_defs['iso']) == 1 || $save)) || ($action == 'edit' && $save))
|
||||
if (($step == 3 && (count($this->lang_defs['iso']) == 1 || $save)) || ($action == 'edit' && $save))
|
||||
{
|
||||
if (!check_form_key($form_key))
|
||||
{
|
||||
@@ -616,7 +616,7 @@ class acp_profile
|
||||
$template->assign_vars(array(
|
||||
'S_EDIT' => true,
|
||||
'S_EDIT_MODE' => ($action == 'edit') ? true : false,
|
||||
'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '',
|
||||
'ERROR_MSG' => (count($error)) ? implode('<br />', $error) : '',
|
||||
|
||||
'L_TITLE' => $user->lang['STEP_' . $step . '_TITLE_' . strtoupper($action)],
|
||||
'L_EXPLAIN' => $user->lang['STEP_' . $step . '_EXPLAIN_' . strtoupper($action)],
|
||||
@@ -664,7 +664,7 @@ class acp_profile
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_STEP_TWO' => true,
|
||||
'L_NEXT_STEP' => (sizeof($this->lang_defs['iso']) == 1) ? $user->lang['SAVE'] : $user->lang['PROFILE_LANG_OPTIONS'])
|
||||
'L_NEXT_STEP' => (count($this->lang_defs['iso']) == 1) ? $user->lang['SAVE'] : $user->lang['PROFILE_LANG_OPTIONS'])
|
||||
);
|
||||
|
||||
// Build options based on profile type
|
||||
@@ -738,6 +738,32 @@ class acp_profile
|
||||
break;
|
||||
}
|
||||
|
||||
$tpl_name = $this->tpl_name;
|
||||
$page_title = $this->page_title;
|
||||
$u_action = $this->u_action;
|
||||
|
||||
/**
|
||||
* Event to handle actions on the ACP profile fields page
|
||||
*
|
||||
* @event core.acp_profile_action
|
||||
* @var string action Action that is being performed
|
||||
* @var string tpl_name Template file to load
|
||||
* @var string page_title Page title
|
||||
* @var string u_action The URL we are at, read only
|
||||
* @since 3.2.2-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'action',
|
||||
'tpl_name',
|
||||
'page_title',
|
||||
'u_action',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.acp_profile_action', compact($vars)));
|
||||
|
||||
$this->tpl_name = $tpl_name;
|
||||
$this->page_title = $page_title;
|
||||
unset($u_action);
|
||||
|
||||
$sql = 'SELECT *
|
||||
FROM ' . PROFILE_FIELDS_TABLE . '
|
||||
ORDER BY field_order';
|
||||
@@ -750,7 +776,7 @@ class acp_profile
|
||||
$active_value = (!$row['field_active']) ? 'activate' : 'deactivate';
|
||||
$id = $row['field_id'];
|
||||
|
||||
$s_need_edit = (sizeof($this->lang_defs['diff'][$row['field_id']])) ? true : false;
|
||||
$s_need_edit = (count($this->lang_defs['diff'][$row['field_id']])) ? true : false;
|
||||
|
||||
if ($s_need_edit)
|
||||
{
|
||||
@@ -762,7 +788,8 @@ class acp_profile
|
||||
continue;
|
||||
}
|
||||
$profile_field = $this->type_collection[$row['field_type']];
|
||||
$template->assign_block_vars('fields', array(
|
||||
|
||||
$field_block = array(
|
||||
'FIELD_IDENT' => $row['field_ident'],
|
||||
'FIELD_TYPE' => $profile_field->get_name(),
|
||||
|
||||
@@ -774,8 +801,26 @@ class acp_profile
|
||||
'U_MOVE_UP' => $this->u_action . "&action=move_up&field_id=$id" . '&hash=' . generate_link_hash('acp_profile'),
|
||||
'U_MOVE_DOWN' => $this->u_action . "&action=move_down&field_id=$id" . '&hash=' . generate_link_hash('acp_profile'),
|
||||
|
||||
'S_NEED_EDIT' => $s_need_edit)
|
||||
'S_NEED_EDIT' => $s_need_edit,
|
||||
);
|
||||
|
||||
/**
|
||||
* Event to modify profile field data before it is assigned to the template
|
||||
*
|
||||
* @event core.acp_profile_modify_profile_row
|
||||
* @var array row Array with data for the current profile field
|
||||
* @var array field_block Template data that is being assigned to the 'fields' block
|
||||
* @var object profile_field A profile field instance, implements \phpbb\profilefields\type\type_base
|
||||
* @since 3.2.2-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'row',
|
||||
'field_block',
|
||||
'profile_field',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.acp_profile_modify_profile_row', compact($vars)));
|
||||
|
||||
$template->assign_block_vars('fields', $field_block);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
@@ -1011,7 +1056,7 @@ class acp_profile
|
||||
$this->update_insert(PROFILE_LANG_TABLE, $sql_ary, array('field_id' => $field_id, 'lang_id' => $default_lang_id));
|
||||
}
|
||||
|
||||
if (is_array($cp->vars['l_lang_name']) && sizeof($cp->vars['l_lang_name']))
|
||||
if (is_array($cp->vars['l_lang_name']) && count($cp->vars['l_lang_name']))
|
||||
{
|
||||
foreach ($cp->vars['l_lang_name'] as $lang_id => $data)
|
||||
{
|
||||
@@ -1087,7 +1132,7 @@ class acp_profile
|
||||
}
|
||||
}
|
||||
|
||||
if (is_array($cp->vars['l_lang_options']) && sizeof($cp->vars['l_lang_options']))
|
||||
if (is_array($cp->vars['l_lang_options']) && count($cp->vars['l_lang_options']))
|
||||
{
|
||||
$empty_lang = array();
|
||||
|
||||
@@ -1098,7 +1143,7 @@ class acp_profile
|
||||
$lang_ary = explode("\n", $lang_ary);
|
||||
}
|
||||
|
||||
if (sizeof($lang_ary) != sizeof($cp->vars['lang_options']))
|
||||
if (count($lang_ary) != count($cp->vars['lang_options']))
|
||||
{
|
||||
$empty_lang[$lang_id] = true;
|
||||
}
|
||||
@@ -1150,7 +1195,7 @@ class acp_profile
|
||||
}
|
||||
}
|
||||
|
||||
if (sizeof($profile_lang_fields))
|
||||
if (count($profile_lang_fields))
|
||||
{
|
||||
foreach ($profile_lang_fields as $sql)
|
||||
{
|
||||
@@ -1213,7 +1258,7 @@ class acp_profile
|
||||
$where_sql[] = $key . ' = ' . ((is_string($value)) ? "'" . $db->sql_escape($value) . "'" : (int) $value);
|
||||
}
|
||||
|
||||
if (!sizeof($where_sql))
|
||||
if (!count($where_sql))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -1229,14 +1274,14 @@ class acp_profile
|
||||
{
|
||||
$sql_ary = array_merge($where_fields, $sql_ary);
|
||||
|
||||
if (sizeof($sql_ary))
|
||||
if (count($sql_ary))
|
||||
{
|
||||
$db->sql_query("INSERT INTO $table " . $db->sql_build_array('INSERT', $sql_ary));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (sizeof($sql_ary))
|
||||
if (count($sql_ary))
|
||||
{
|
||||
$sql = "UPDATE $table SET " . $db->sql_build_array('UPDATE', $sql_ary) . '
|
||||
WHERE ' . implode(' AND ', $where_sql);
|
||||
|
@@ -55,7 +55,7 @@ class acp_prune
|
||||
*/
|
||||
function prune_forums($id, $mode)
|
||||
{
|
||||
global $db, $user, $auth, $template, $phpbb_log, $request;
|
||||
global $db, $user, $auth, $template, $phpbb_log, $request, $phpbb_dispatcher;
|
||||
|
||||
$all_forums = $request->variable('all_forums', 0);
|
||||
$forum_id = $request->variable('f', array(0));
|
||||
@@ -97,7 +97,7 @@ class acp_prune
|
||||
'S_PRUNED' => true)
|
||||
);
|
||||
|
||||
$sql_forum = (sizeof($forum_id)) ? ' AND ' . $db->sql_in_set('forum_id', $forum_id) : '';
|
||||
$sql_forum = (count($forum_id)) ? ' AND ' . $db->sql_in_set('forum_id', $forum_id) : '';
|
||||
|
||||
// Get a list of forum's or the data for the forum that we are pruning.
|
||||
$sql = 'SELECT forum_id, forum_name
|
||||
@@ -165,7 +165,7 @@ class acp_prune
|
||||
}
|
||||
else
|
||||
{
|
||||
confirm_box(false, $user->lang['PRUNE_FORUM_CONFIRM'], build_hidden_fields(array(
|
||||
$hidden_fields = array(
|
||||
'i' => $id,
|
||||
'mode' => $mode,
|
||||
'submit' => 1,
|
||||
@@ -177,13 +177,25 @@ class acp_prune
|
||||
'prune_old_polls' => $request->variable('prune_old_polls', 0),
|
||||
'prune_announce' => $request->variable('prune_announce', 0),
|
||||
'prune_sticky' => $request->variable('prune_sticky', 0),
|
||||
)));
|
||||
);
|
||||
|
||||
/**
|
||||
* Use this event to pass data from the prune form to the confirmation screen
|
||||
*
|
||||
* @event core.prune_forums_settings_confirm
|
||||
* @var array hidden_fields Hidden fields that are passed through the confirm screen
|
||||
* @since 3.2.2-RC1
|
||||
*/
|
||||
$vars = array('hidden_fields');
|
||||
extract($phpbb_dispatcher->trigger_event('core.prune_forums_settings_confirm', compact($vars)));
|
||||
|
||||
confirm_box(false, $user->lang['PRUNE_FORUM_CONFIRM'], build_hidden_fields($hidden_fields));
|
||||
}
|
||||
}
|
||||
|
||||
// If they haven't selected a forum for pruning yet then
|
||||
// display a select box to use for pruning.
|
||||
if (!sizeof($forum_id))
|
||||
if (!count($forum_id))
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'U_ACTION' => $this->u_action,
|
||||
@@ -215,15 +227,27 @@ class acp_prune
|
||||
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$l_selected_forums = (sizeof($forum_id) == 1) ? 'SELECTED_FORUM' : 'SELECTED_FORUMS';
|
||||
$l_selected_forums = (count($forum_id) == 1) ? 'SELECTED_FORUM' : 'SELECTED_FORUMS';
|
||||
|
||||
$template->assign_vars(array(
|
||||
$template_data = array(
|
||||
'L_SELECTED_FORUMS' => $user->lang[$l_selected_forums],
|
||||
'U_ACTION' => $this->u_action,
|
||||
'U_BACK' => $this->u_action,
|
||||
'FORUM_LIST' => $forum_list,
|
||||
'S_HIDDEN_FIELDS' => $s_hidden_fields)
|
||||
'S_HIDDEN_FIELDS' => $s_hidden_fields,
|
||||
);
|
||||
|
||||
/**
|
||||
* Event to add/modify prune forums settings template data
|
||||
*
|
||||
* @event core.prune_forums_settings_template_data
|
||||
* @var array template_data Array with form template data
|
||||
* @since 3.2.2-RC1
|
||||
*/
|
||||
$vars = array('template_data');
|
||||
extract($phpbb_dispatcher->trigger_event('core.prune_forums_settings_template_data', compact($vars)));
|
||||
|
||||
$template->assign_vars($template_data);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -252,7 +276,7 @@ class acp_prune
|
||||
$user_ids = $usernames = array();
|
||||
|
||||
$this->get_prune_users($user_ids, $usernames);
|
||||
if (sizeof($user_ids))
|
||||
if (count($user_ids))
|
||||
{
|
||||
if ($action == 'deactivate')
|
||||
{
|
||||
@@ -291,7 +315,7 @@ class acp_prune
|
||||
$user_ids = $usernames = array();
|
||||
$this->get_prune_users($user_ids, $usernames);
|
||||
|
||||
if (!sizeof($user_ids))
|
||||
if (!count($user_ids))
|
||||
{
|
||||
trigger_error($user->lang['USER_PRUNE_FAILURE'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
@@ -434,7 +458,7 @@ class acp_prune
|
||||
}
|
||||
// implicit else when both arrays are empty do nothing
|
||||
|
||||
if ((sizeof($active) && sizeof($active) != 3) || (sizeof($joined_before) && sizeof($joined_before) != 3) || (sizeof($joined_after) && sizeof($joined_after) != 3))
|
||||
if ((count($active) && count($active) != 3) || (count($joined_before) && count($joined_before) != 3) || (count($joined_after) && count($joined_after) != 3))
|
||||
{
|
||||
trigger_error($user->lang['WRONG_ACTIVE_JOINED_DATE'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
@@ -448,15 +472,15 @@ class acp_prune
|
||||
$where_sql .= ($count !== false) ? " AND user_posts " . $key_match[$count_select] . ' ' . (int) $count . ' ' : '';
|
||||
|
||||
// First handle pruning of users who never logged in, last active date is 0000-00-00
|
||||
if (sizeof($active) && (int) $active[0] == 0 && (int) $active[1] == 0 && (int) $active[2] == 0)
|
||||
if (count($active) && (int) $active[0] == 0 && (int) $active[1] == 0 && (int) $active[2] == 0)
|
||||
{
|
||||
$where_sql .= ' AND user_lastvisit = 0';
|
||||
}
|
||||
else if (sizeof($active) && $active_select != 'lt')
|
||||
else if (count($active) && $active_select != 'lt')
|
||||
{
|
||||
$where_sql .= ' AND user_lastvisit ' . $key_match[$active_select] . ' ' . gmmktime(0, 0, 0, (int) $active[1], (int) $active[2], (int) $active[0]);
|
||||
}
|
||||
else if (sizeof($active))
|
||||
else if (count($active))
|
||||
{
|
||||
$where_sql .= ' AND (user_lastvisit > 0 AND user_lastvisit < ' . gmmktime(0, 0, 0, (int) $active[1], (int) $active[2], (int) $active[0]) . ')';
|
||||
}
|
||||
|
@@ -103,7 +103,7 @@ class acp_reasons
|
||||
}
|
||||
}
|
||||
|
||||
if (!sizeof($error))
|
||||
if (!count($error))
|
||||
{
|
||||
// New reason?
|
||||
if ($action == 'add')
|
||||
@@ -171,7 +171,7 @@ class acp_reasons
|
||||
'L_TITLE' => $user->lang['REASON_' . $l_title],
|
||||
'U_ACTION' => $this->u_action . "&id=$reason_id&action=$action",
|
||||
'U_BACK' => $this->u_action,
|
||||
'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '',
|
||||
'ERROR_MSG' => (count($error)) ? implode('<br />', $error) : '',
|
||||
|
||||
'REASON_TITLE' => $reason_row['reason_title'],
|
||||
'REASON_DESCRIPTION' => $reason_row['reason_description'],
|
||||
@@ -182,7 +182,7 @@ class acp_reasons
|
||||
'S_AVAILABLE_TITLES' => implode($user->lang['COMMA_SEPARATOR'], array_map('htmlspecialchars', array_keys($user->lang['report_reasons']['TITLE']))),
|
||||
'S_EDIT_REASON' => true,
|
||||
'S_TRANSLATED' => $translated,
|
||||
'S_ERROR' => (sizeof($error)) ? true : false,
|
||||
'S_ERROR' => (count($error)) ? true : false,
|
||||
)
|
||||
);
|
||||
|
||||
|
@@ -332,9 +332,9 @@ class acp_search
|
||||
$forum_ids[] = $row['forum_id'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
$row_count += sizeof($ids);
|
||||
$row_count += count($ids);
|
||||
|
||||
if (sizeof($ids))
|
||||
if (count($ids))
|
||||
{
|
||||
$this->search->index_remove($ids, $posters, $forum_ids);
|
||||
}
|
||||
@@ -349,7 +349,7 @@ class acp_search
|
||||
$totaltime = microtime(true) - $starttime;
|
||||
$rows_per_second = $row_count / $totaltime;
|
||||
meta_refresh(1, append_sid($this->u_action . '&action=delete&skip_rows=' . $post_counter . '&hash=' . generate_link_hash('acp_search')));
|
||||
trigger_error($user->lang('SEARCH_INDEX_DELETE_REDIRECT', (int) $row_count, $post_counter, $rows_per_second));
|
||||
trigger_error($user->lang('SEARCH_INDEX_DELETE_REDIRECT', (int) $row_count, $post_counter) . $user->lang('SEARCH_INDEX_DELETE_REDIRECT_RATE', $rows_per_second));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -474,8 +474,8 @@ class acp_search
|
||||
$statistics = array();
|
||||
foreach ($data as $statistic => $value)
|
||||
{
|
||||
$n = sizeof($statistics);
|
||||
if ($n && sizeof($statistics[$n - 1]) < 3)
|
||||
$n = count($statistics);
|
||||
if ($n && count($statistics[$n - 1]) < 3)
|
||||
{
|
||||
$statistics[$n - 1] += array('statistic_2' => $statistic, 'value_2' => $value);
|
||||
}
|
||||
@@ -492,7 +492,7 @@ class acp_search
|
||||
'S_ACTIVE' => ($type == $config['search_type']) ? true : false,
|
||||
'S_HIDDEN_FIELDS' => build_hidden_fields(array('search_type' => $type)),
|
||||
'S_INDEXED' => (bool) $search->index_created(),
|
||||
'S_STATS' => (bool) sizeof($statistics))
|
||||
'S_STATS' => (bool) count($statistics))
|
||||
);
|
||||
|
||||
foreach ($statistics as $statistic)
|
||||
|
@@ -398,7 +398,7 @@ class acp_styles
|
||||
|
||||
// Reset default style for users who use selected styles
|
||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||
SET user_style = 0
|
||||
SET user_style = ' . (int) $this->default_style . '
|
||||
WHERE user_style IN (' . implode(', ', $ids) . ')';
|
||||
$this->db->sql_query($sql);
|
||||
|
||||
@@ -952,6 +952,7 @@ class acp_styles
|
||||
// Style data
|
||||
'STYLE_ID' => $style['style_id'],
|
||||
'STYLE_NAME' => htmlspecialchars($style['style_name']),
|
||||
'STYLE_PHPBB_VERSION' => $this->read_style_cfg($style['style_path'])['phpbb_version'],
|
||||
'STYLE_PATH' => htmlspecialchars($style['style_path']),
|
||||
'STYLE_COPYRIGHT' => strip_tags($style['style_copyright']),
|
||||
'STYLE_ACTIVE' => $style['style_active'],
|
||||
@@ -1249,7 +1250,7 @@ class acp_styles
|
||||
|
||||
// Change default style for users
|
||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||
SET user_style = 0
|
||||
SET user_style = ' . (int) $this->default_style . '
|
||||
WHERE user_style = ' . $id;
|
||||
$this->db->sql_query($sql);
|
||||
|
||||
@@ -1355,18 +1356,18 @@ class acp_styles
|
||||
}
|
||||
|
||||
// Hardcoded template bitfield to add for new templates
|
||||
$default_bitfield = '1111111111111';
|
||||
|
||||
$bitfield = new bitfield();
|
||||
$bitfield->set(0);
|
||||
$bitfield->set(1);
|
||||
$bitfield->set(2);
|
||||
$bitfield->set(3);
|
||||
$bitfield->set(4);
|
||||
$bitfield->set(8);
|
||||
$bitfield->set(9);
|
||||
$bitfield->set(11);
|
||||
$bitfield->set(12);
|
||||
$value = $bitfield->get_base64();
|
||||
return $value;
|
||||
for ($i = 0; $i < strlen($default_bitfield); $i++)
|
||||
{
|
||||
if ($default_bitfield[$i] == '1')
|
||||
{
|
||||
$bitfield->set($i);
|
||||
}
|
||||
}
|
||||
|
||||
return $bitfield->get_base64();
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -52,7 +52,10 @@ class acp_update
|
||||
$updates_available = array();
|
||||
}
|
||||
|
||||
$template->assign_block_vars('updates_available', $updates_available);
|
||||
if (!empty($updates_available))
|
||||
{
|
||||
$template->assign_block_vars('updates_available', $updates_available);
|
||||
}
|
||||
|
||||
$update_link = $phpbb_root_path . 'install/app.' . $phpEx;
|
||||
|
||||
|
@@ -24,7 +24,7 @@ class acp_users
|
||||
var $u_action;
|
||||
var $p_master;
|
||||
|
||||
function acp_users(&$p_master)
|
||||
function __construct(&$p_master)
|
||||
{
|
||||
$this->p_master = &$p_master;
|
||||
}
|
||||
@@ -690,7 +690,7 @@ class acp_users
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (sizeof($topic_id_ary))
|
||||
if (count($topic_id_ary))
|
||||
{
|
||||
$sql = 'SELECT topic_id, forum_id, topic_title, topic_posts_approved, topic_posts_unapproved, topic_posts_softdeleted, topic_attachment
|
||||
FROM ' . TOPICS_TABLE . '
|
||||
@@ -718,12 +718,12 @@ class acp_users
|
||||
}
|
||||
|
||||
// Entire topic comprises posts by this user, move these topics
|
||||
if (sizeof($move_topic_ary))
|
||||
if (count($move_topic_ary))
|
||||
{
|
||||
move_topics($move_topic_ary, $new_forum_id, false);
|
||||
}
|
||||
|
||||
if (sizeof($move_post_ary))
|
||||
if (count($move_post_ary))
|
||||
{
|
||||
// Create new topic
|
||||
// Update post_ids, report_ids, attachment_ids
|
||||
@@ -769,13 +769,13 @@ class acp_users
|
||||
$forum_id_ary = array_unique($forum_id_ary);
|
||||
$topic_id_ary = array_unique(array_merge(array_keys($topic_id_ary), $new_topic_id_ary));
|
||||
|
||||
if (sizeof($topic_id_ary))
|
||||
if (count($topic_id_ary))
|
||||
{
|
||||
sync('topic_reported', 'topic_id', $topic_id_ary);
|
||||
sync('topic', 'topic_id', $topic_id_ary);
|
||||
}
|
||||
|
||||
if (sizeof($forum_id_ary))
|
||||
if (count($forum_id_ary))
|
||||
{
|
||||
sync('forum', 'forum_id', $forum_id_ary, false, true);
|
||||
}
|
||||
@@ -813,16 +813,22 @@ class acp_users
|
||||
break;
|
||||
|
||||
default:
|
||||
$u_action = $this->u_action;
|
||||
|
||||
/**
|
||||
* Run custom quicktool code
|
||||
*
|
||||
* @event core.acp_users_overview_run_quicktool
|
||||
* @var array user_row Current user data
|
||||
* @var string action Quick tool that should be run
|
||||
* @var array user_row Current user data
|
||||
* @var string u_action The u_action link
|
||||
* @since 3.1.0-a1
|
||||
* @changed 3.2.2-RC1 Added u_action
|
||||
*/
|
||||
$vars = array('action', 'user_row');
|
||||
$vars = array('action', 'user_row', 'u_action');
|
||||
extract($phpbb_dispatcher->trigger_event('core.acp_users_overview_run_quicktool', compact($vars)));
|
||||
|
||||
unset($u_action);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -886,7 +892,7 @@ class acp_users
|
||||
$update_password = $data['new_password'] && !$passwords_manager->check($data['new_password'], $user_row['user_password']);
|
||||
$update_email = ($data['email'] != $user_row['user_email']) ? $data['email'] : false;
|
||||
|
||||
if (!sizeof($error))
|
||||
if (!count($error))
|
||||
{
|
||||
$sql_ary = array();
|
||||
|
||||
@@ -988,7 +994,7 @@ class acp_users
|
||||
));
|
||||
}
|
||||
|
||||
if (sizeof($sql_ary))
|
||||
if (count($sql_ary))
|
||||
{
|
||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
|
||||
@@ -1341,7 +1347,7 @@ class acp_users
|
||||
{
|
||||
$s_hidden_fields['delall'] = 1;
|
||||
}
|
||||
if (isset($_POST['delall']) || (isset($_POST['delmarked']) && sizeof($marked)))
|
||||
if (isset($_POST['delall']) || (isset($_POST['delmarked']) && count($marked)))
|
||||
{
|
||||
confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields($s_hidden_fields));
|
||||
}
|
||||
@@ -1377,9 +1383,9 @@ class acp_users
|
||||
{
|
||||
// Check if there are more occurrences of % than arguments, if there are we fill out the arguments array
|
||||
// It doesn't matter if we add more arguments than placeholders
|
||||
if ((substr_count($row['action'], '%') - sizeof($log_data_ary)) > 0)
|
||||
if ((substr_count($row['action'], '%') - count($log_data_ary)) > 0)
|
||||
{
|
||||
$log_data_ary = array_merge($log_data_ary, array_fill(0, substr_count($row['action'], '%') - sizeof($log_data_ary), ''));
|
||||
$log_data_ary = array_merge($log_data_ary, array_fill(0, substr_count($row['action'], '%') - count($log_data_ary), ''));
|
||||
}
|
||||
$row['action'] = vsprintf($row['action'], $log_data_ary);
|
||||
$row['action'] = bbcode_nl2br(censor_text($row['action']));
|
||||
@@ -1472,7 +1478,7 @@ class acp_users
|
||||
// validate custom profile fields
|
||||
$cp->submit_cp_field('profile', $user_row['iso_lang_id'], $cp_data, $cp_error);
|
||||
|
||||
if (sizeof($cp_error))
|
||||
if (count($cp_error))
|
||||
{
|
||||
$error = array_merge($error, $cp_error);
|
||||
}
|
||||
@@ -1485,15 +1491,17 @@ class acp_users
|
||||
* Validate profile data in ACP before submitting to the database
|
||||
*
|
||||
* @event core.acp_users_profile_validate
|
||||
* @var bool submit Flag indicating if submit button has been pressed
|
||||
* @var array data Array with user profile data
|
||||
* @var int user_id The user id
|
||||
* @var array user_row Array with the full user data
|
||||
* @var array error Array with the form errors
|
||||
* @since 3.1.4-RC1
|
||||
* @changed 3.1.12-RC1 Removed submit, added user_id, user_row
|
||||
*/
|
||||
$vars = array('submit', 'data', 'error');
|
||||
$vars = array('data', 'user_id', 'user_row', 'error');
|
||||
extract($phpbb_dispatcher->trigger_event('core.acp_users_profile_validate', compact($vars)));
|
||||
|
||||
if (!sizeof($error))
|
||||
if (!count($error))
|
||||
{
|
||||
$sql_ary = array(
|
||||
'user_jabber' => $data['jabber'],
|
||||
@@ -1637,7 +1645,7 @@ class acp_users
|
||||
$error[] = 'FORM_INVALID';
|
||||
}
|
||||
|
||||
if (!sizeof($error))
|
||||
if (!count($error))
|
||||
{
|
||||
$this->optionset($user_row, 'viewimg', $data['view_images']);
|
||||
$this->optionset($user_row, 'viewflash', $data['view_flash']);
|
||||
@@ -1688,7 +1696,7 @@ class acp_users
|
||||
$vars = array('data', 'user_row', 'sql_ary', 'error');
|
||||
extract($phpbb_dispatcher->trigger_event('core.acp_users_prefs_modify_sql', compact($vars)));
|
||||
|
||||
if (!sizeof($error))
|
||||
if (!count($error))
|
||||
{
|
||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
|
||||
@@ -1875,6 +1883,17 @@ class acp_users
|
||||
'user_avatar_height' => $result['avatar_height'],
|
||||
);
|
||||
|
||||
/**
|
||||
* Modify users preferences data before assigning it to the template
|
||||
*
|
||||
* @event core.acp_users_avatar_sql
|
||||
* @var array user_row Array with user data
|
||||
* @var array result Array with user avatar data to be updated in the DB
|
||||
* @since 3.2.4-RC1
|
||||
*/
|
||||
$vars = array('user_row', 'result');
|
||||
extract($phpbb_dispatcher->trigger_event('core.acp_users_avatar_sql', compact($vars)));
|
||||
|
||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||
SET ' . $db->sql_build_array('UPDATE', $result) . '
|
||||
WHERE user_id = ' . (int) $user_id;
|
||||
@@ -2052,7 +2071,7 @@ class acp_users
|
||||
'sig'
|
||||
);
|
||||
|
||||
if (sizeof($warn_msg))
|
||||
if (count($warn_msg))
|
||||
{
|
||||
$error += $warn_msg;
|
||||
}
|
||||
@@ -2064,7 +2083,7 @@ class acp_users
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!sizeof($error))
|
||||
if (!count($error))
|
||||
{
|
||||
$this->optionset($user_row, 'sig_bbcode', $enable_bbcode);
|
||||
$this->optionset($user_row, 'sig_smilies', $enable_smilies);
|
||||
@@ -2077,6 +2096,17 @@ class acp_users
|
||||
'user_sig_bbcode_bitfield' => $bbcode_bitfield,
|
||||
);
|
||||
|
||||
/**
|
||||
* Modify user signature before it is stored in the DB
|
||||
*
|
||||
* @event core.acp_users_modify_signature_sql_ary
|
||||
* @var array user_row Array with user data
|
||||
* @var array sql_ary Array with user signature data to be updated in the DB
|
||||
* @since 3.2.4-RC1
|
||||
*/
|
||||
$vars = array('user_row', 'sql_ary');
|
||||
extract($phpbb_dispatcher->trigger_event('core.acp_users_modify_signature_sql_ary', compact($vars)));
|
||||
|
||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
|
||||
WHERE user_id = ' . $user_id;
|
||||
@@ -2091,7 +2121,7 @@ class acp_users
|
||||
|
||||
if ($request->is_set_post('preview'))
|
||||
{
|
||||
$decoded_message = generate_text_for_edit($signature, $bbcode_uid, $bbcode_bitfield);
|
||||
$decoded_message = generate_text_for_edit($signature, $bbcode_uid, $bbcode_flags);
|
||||
}
|
||||
|
||||
/** @var \phpbb\controller\helper $controller_helper */
|
||||
@@ -2139,7 +2169,7 @@ class acp_users
|
||||
$sort_key = $request->variable('sk', 'a');
|
||||
$sort_dir = $request->variable('sd', 'd');
|
||||
|
||||
if ($deletemark && sizeof($marked))
|
||||
if ($deletemark && count($marked))
|
||||
{
|
||||
$sql = 'SELECT attach_id
|
||||
FROM ' . ATTACHMENTS_TABLE . '
|
||||
@@ -2156,7 +2186,7 @@ class acp_users
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
if ($deletemark && sizeof($marked))
|
||||
if ($deletemark && count($marked))
|
||||
{
|
||||
if (confirm_box(true))
|
||||
{
|
||||
@@ -2177,7 +2207,7 @@ class acp_users
|
||||
$attachment_manager->delete('attach', $marked);
|
||||
unset($attachment_manager);
|
||||
|
||||
$message = (sizeof($log_attachments) == 1) ? $user->lang['ATTACHMENT_DELETED'] : $user->lang['ATTACHMENTS_DELETED'];
|
||||
$message = (count($log_attachments) == 1) ? $user->lang['ATTACHMENT_DELETED'] : $user->lang['ATTACHMENTS_DELETED'];
|
||||
|
||||
$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_ATTACHMENTS_DELETED', false, array(implode($user->lang['COMMA_SEPARATOR'], $log_attachments)));
|
||||
trigger_error($message . adm_back_link($this->u_action . '&u=' . $user_id));
|
||||
@@ -2447,7 +2477,7 @@ class acp_users
|
||||
// Select box for other groups
|
||||
$sql = 'SELECT group_id, group_name, group_type, group_founder_manage
|
||||
FROM ' . GROUPS_TABLE . '
|
||||
' . ((sizeof($id_ary)) ? 'WHERE ' . $db->sql_in_set('group_id', $id_ary, true) : '') . '
|
||||
' . ((count($id_ary)) ? 'WHERE ' . $db->sql_in_set('group_id', $id_ary, true) : '') . '
|
||||
ORDER BY group_type DESC, group_name ASC';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
@@ -2489,7 +2519,7 @@ class acp_users
|
||||
'U_DELETE' => $this->u_action . "&action=delete&u=$user_id&g=" . $data['group_id'],
|
||||
'U_APPROVE' => ($group_type == 'pending') ? $this->u_action . "&action=approve&u=$user_id&g=" . $data['group_id'] : '',
|
||||
|
||||
'GROUP_NAME' => ($group_type == 'special') ? $user->lang['G_' . $data['group_name']] : $data['group_name'],
|
||||
'GROUP_NAME' => $group_helper->get_name($data['group_name']),
|
||||
'L_DEMOTE_PROMOTE' => ($data['group_leader']) ? $user->lang['GROUP_DEMOTE'] : $user->lang['GROUP_PROMOTE'],
|
||||
|
||||
'S_IS_MEMBER' => ($group_type != 'pending') ? true : false,
|
||||
@@ -2576,12 +2606,28 @@ class acp_users
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
/**
|
||||
* Additional modes provided by extensions
|
||||
*
|
||||
* @event core.acp_users_mode_add
|
||||
* @var string mode New mode
|
||||
* @var int user_id User id of the user to manage
|
||||
* @var array user_row Array with user data
|
||||
* @var array error Array with errors data
|
||||
* @since 3.2.2-RC1
|
||||
*/
|
||||
$vars = array('mode', 'user_id', 'user_row', 'error');
|
||||
extract($phpbb_dispatcher->trigger_event('core.acp_users_mode_add', compact($vars)));
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
// Assign general variables
|
||||
$template->assign_vars(array(
|
||||
'S_ERROR' => (sizeof($error)) ? true : false,
|
||||
'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '')
|
||||
'S_ERROR' => (count($error)) ? true : false,
|
||||
'ERROR_MSG' => (count($error)) ? implode('<br />', $error) : '')
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -27,7 +27,7 @@ class auth_admin extends \phpbb\auth\auth
|
||||
/**
|
||||
* Init auth settings
|
||||
*/
|
||||
function auth_admin()
|
||||
function __construct()
|
||||
{
|
||||
global $db, $cache;
|
||||
|
||||
@@ -107,7 +107,7 @@ class auth_admin extends \phpbb\auth\auth
|
||||
$compare_options = array_diff(preg_replace('/^((?!' . $auth_option . ').+)|(' . $auth_option . ')$/', '', array_keys($this->acl_options[$scope])), array(''));
|
||||
|
||||
// If forum_ids is false and the scope is local we actually want to have all forums within the array
|
||||
if ($scope == 'local' && !sizeof($forum_ids))
|
||||
if ($scope == 'local' && !count($forum_ids))
|
||||
{
|
||||
$sql = 'SELECT forum_id
|
||||
FROM ' . FORUMS_TABLE;
|
||||
@@ -177,9 +177,9 @@ class auth_admin extends \phpbb\auth\auth
|
||||
// Now, we need to fill the gaps with $acl_fill. ;)
|
||||
|
||||
// Now switch back to keys
|
||||
if (sizeof($compare_options))
|
||||
if (count($compare_options))
|
||||
{
|
||||
$compare_options = array_combine($compare_options, array_fill(1, sizeof($compare_options), $acl_fill));
|
||||
$compare_options = array_combine($compare_options, array_fill(1, count($compare_options), $acl_fill));
|
||||
}
|
||||
|
||||
// Defining the user-function here to save some memory
|
||||
@@ -189,7 +189,7 @@ class auth_admin extends \phpbb\auth\auth
|
||||
};
|
||||
|
||||
// Actually fill the gaps
|
||||
if (sizeof($hold_ary))
|
||||
if (count($hold_ary))
|
||||
{
|
||||
foreach ($hold_ary as $ug_id => $row)
|
||||
{
|
||||
@@ -356,7 +356,7 @@ class auth_admin extends \phpbb\auth\auth
|
||||
// Build js roles array (role data assignments)
|
||||
$s_role_js_array = '';
|
||||
|
||||
if (sizeof($roles))
|
||||
if (count($roles))
|
||||
{
|
||||
$s_role_js_array = array();
|
||||
|
||||
@@ -422,7 +422,7 @@ class auth_admin extends \phpbb\auth\auth
|
||||
// If we only have one forum id to display or being in local mode and more than one user/group to display,
|
||||
// we switch the complete interface to group by user/usergroup instead of grouping by forum
|
||||
// To achieve this, we need to switch the array a bit
|
||||
if (sizeof($forum_ids) == 1 || ($local && sizeof($ug_names_ary) > 1))
|
||||
if (count($forum_ids) == 1 || ($local && count($ug_names_ary) > 1))
|
||||
{
|
||||
$hold_ary_temp = $hold_ary;
|
||||
$hold_ary = array();
|
||||
@@ -453,9 +453,9 @@ class auth_admin extends \phpbb\auth\auth
|
||||
|
||||
'S_LOCAL' => ($local) ? true : false,
|
||||
'S_GLOBAL' => (!$local) ? true : false,
|
||||
'S_NUM_CATS' => sizeof($categories),
|
||||
'S_NUM_CATS' => count($categories),
|
||||
'S_VIEW' => ($mode == 'view') ? true : false,
|
||||
'S_NUM_OBJECTS' => sizeof($content_array),
|
||||
'S_NUM_OBJECTS' => count($content_array),
|
||||
'S_USER_MODE' => ($user_mode == 'user') ? true : false,
|
||||
'S_GROUP_MODE' => ($user_mode == 'group') ? true : false)
|
||||
);
|
||||
@@ -546,15 +546,15 @@ class auth_admin extends \phpbb\auth\auth
|
||||
'NAME' => $ug_name,
|
||||
'CATEGORIES' => implode('</th><th>', $categories),
|
||||
|
||||
'USER_GROUPS_DEFAULT' => ($user_mode == 'user' && isset($user_groups_default[$ug_id]) && sizeof($user_groups_default[$ug_id])) ? implode($user->lang['COMMA_SEPARATOR'], $user_groups_default[$ug_id]) : '',
|
||||
'USER_GROUPS_CUSTOM' => ($user_mode == 'user' && isset($user_groups_custom[$ug_id]) && sizeof($user_groups_custom[$ug_id])) ? implode($user->lang['COMMA_SEPARATOR'], $user_groups_custom[$ug_id]) : '',
|
||||
'USER_GROUPS_DEFAULT' => ($user_mode == 'user' && isset($user_groups_default[$ug_id]) && count($user_groups_default[$ug_id])) ? implode($user->lang['COMMA_SEPARATOR'], $user_groups_default[$ug_id]) : '',
|
||||
'USER_GROUPS_CUSTOM' => ($user_mode == 'user' && isset($user_groups_custom[$ug_id]) && count($user_groups_custom[$ug_id])) ? implode($user->lang['COMMA_SEPARATOR'], $user_groups_custom[$ug_id]) : '',
|
||||
'L_ACL_TYPE' => $l_acl_type,
|
||||
|
||||
'S_LOCAL' => ($local) ? true : false,
|
||||
'S_GLOBAL' => (!$local) ? true : false,
|
||||
'S_NUM_CATS' => sizeof($categories),
|
||||
'S_NUM_CATS' => count($categories),
|
||||
'S_VIEW' => ($mode == 'view') ? true : false,
|
||||
'S_NUM_OBJECTS' => sizeof($content_array),
|
||||
'S_NUM_OBJECTS' => count($content_array),
|
||||
'S_USER_MODE' => ($user_mode == 'user') ? true : false,
|
||||
'S_GROUP_MODE' => ($user_mode == 'group') ? true : false)
|
||||
);
|
||||
@@ -637,7 +637,7 @@ class auth_admin extends \phpbb\auth\auth
|
||||
global $db, $template, $user, $phpbb_root_path, $phpEx;
|
||||
global $phpbb_container;
|
||||
|
||||
if (!sizeof($hold_ary))
|
||||
if (!count($hold_ary))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -669,7 +669,7 @@ class auth_admin extends \phpbb\auth\auth
|
||||
'FORUM_ID' => $forum_id)
|
||||
);
|
||||
|
||||
if (isset($auth_ary['users']) && sizeof($auth_ary['users']))
|
||||
if (isset($auth_ary['users']) && count($auth_ary['users']))
|
||||
{
|
||||
$sql = 'SELECT user_id, username
|
||||
FROM ' . USERS_TABLE . '
|
||||
@@ -688,7 +688,7 @@ class auth_admin extends \phpbb\auth\auth
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
if (isset($auth_ary['groups']) && sizeof($auth_ary['groups']))
|
||||
if (isset($auth_ary['groups']) && count($auth_ary['groups']))
|
||||
{
|
||||
$sql = 'SELECT group_id, group_name, group_type
|
||||
FROM ' . GROUPS_TABLE . '
|
||||
@@ -819,7 +819,7 @@ class auth_admin extends \phpbb\auth\auth
|
||||
|
||||
// Because we just changed the options and also purged the options cache, we instantly update/regenerate it for later calls to succeed.
|
||||
$this->acl_options = array();
|
||||
$this->auth_admin();
|
||||
$this->__construct();
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -890,7 +890,7 @@ class auth_admin extends \phpbb\auth\auth
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (sizeof($role_ids))
|
||||
if (count($role_ids))
|
||||
{
|
||||
$sql = "DELETE FROM $table
|
||||
WHERE $forum_sql
|
||||
@@ -1000,7 +1000,7 @@ class auth_admin extends \phpbb\auth\auth
|
||||
}
|
||||
|
||||
// If no data is there, we set the any-flag to ACL_NEVER...
|
||||
if (!sizeof($sql_ary))
|
||||
if (!count($sql_ary))
|
||||
{
|
||||
$sql_ary[] = array(
|
||||
'role_id' => (int) $role_id,
|
||||
@@ -1083,7 +1083,7 @@ class auth_admin extends \phpbb\auth\auth
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// Get role data for resetting data
|
||||
if (sizeof($cur_role_auth))
|
||||
if (count($cur_role_auth))
|
||||
{
|
||||
$sql = 'SELECT ao.auth_option, rd.role_id, rd.auth_setting
|
||||
FROM ' . ACL_OPTIONS_TABLE . ' ao, ' . ACL_ROLES_DATA_TABLE . ' rd
|
||||
|
@@ -37,7 +37,7 @@ class bbcode
|
||||
* Constructor
|
||||
* Init bbcode cache entries if bitfield is specified
|
||||
*/
|
||||
function bbcode($bitfield = '')
|
||||
function __construct($bitfield = '')
|
||||
{
|
||||
if ($bitfield)
|
||||
{
|
||||
@@ -94,13 +94,13 @@ class bbcode
|
||||
${$type}['replace'][] = $replace;
|
||||
}
|
||||
|
||||
if (sizeof($str['search']))
|
||||
if (count($str['search']))
|
||||
{
|
||||
$message = str_replace($str['search'], $str['replace'], $message);
|
||||
$str = array('search' => array(), 'replace' => array());
|
||||
}
|
||||
|
||||
if (sizeof($preg['search']))
|
||||
if (count($preg['search']))
|
||||
{
|
||||
// we need to turn the entities back into their original form to allow the
|
||||
// search patterns to work properly
|
||||
@@ -191,7 +191,7 @@ class bbcode
|
||||
}
|
||||
}
|
||||
|
||||
if (sizeof($sql))
|
||||
if (count($sql))
|
||||
{
|
||||
global $db;
|
||||
|
||||
@@ -501,7 +501,10 @@ class bbcode
|
||||
// Turn template blocks into PHP assignment statements for the values of $bbcode_tpl..
|
||||
$this->bbcode_template = array();
|
||||
|
||||
$matches = preg_match_all('#<!-- BEGIN (.*?) -->(.*?)<!-- END (?:.*?) -->#', $tpl, $match);
|
||||
// Capture the BBCode template matches
|
||||
// Allow phpBB template or the Twig syntax
|
||||
$matches = (preg_match_all('#<!-- BEGIN (.*?) -->(.*?)<!-- END (?:.*?) -->#', $tpl, $match)) ?:
|
||||
preg_match_all('#{% for (.*?) in .*? %}(.*?){% endfor %}#s', $tpl, $match);
|
||||
|
||||
for ($i = 0; $i < $matches; $i++)
|
||||
{
|
||||
|
@@ -28,7 +28,7 @@ if (!defined('IN_PHPBB'))
|
||||
*/
|
||||
|
||||
// phpBB Version
|
||||
@define('PHPBB_VERSION', '3.2.1');
|
||||
@define('PHPBB_VERSION', '3.2.4');
|
||||
|
||||
// QA-related
|
||||
// define('PHPBB_QA', 1);
|
||||
|
@@ -50,7 +50,7 @@ class diff
|
||||
* @param array &$to_content An array of strings.
|
||||
* @param bool $preserve_cr If true, \r is replaced by a new line in the diff output
|
||||
*/
|
||||
function diff(&$from_content, &$to_content, $preserve_cr = true)
|
||||
function __construct(&$from_content, &$to_content, $preserve_cr = true)
|
||||
{
|
||||
$diff_engine = new diff_engine();
|
||||
$this->_edits = $diff_engine->diff($from_content, $to_content, $preserve_cr);
|
||||
@@ -75,7 +75,7 @@ class diff
|
||||
{
|
||||
$count = 0;
|
||||
|
||||
for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
|
||||
for ($i = 0, $size = count($this->_edits); $i < $size; $i++)
|
||||
{
|
||||
$edit = $this->_edits[$i];
|
||||
|
||||
@@ -98,7 +98,7 @@ class diff
|
||||
{
|
||||
$count = 0;
|
||||
|
||||
for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
|
||||
for ($i = 0, $size = count($this->_edits); $i < $size; $i++)
|
||||
{
|
||||
$edit = $this->_edits[$i];
|
||||
|
||||
@@ -136,7 +136,7 @@ class diff
|
||||
|
||||
$rev->_edits = array();
|
||||
|
||||
for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
|
||||
for ($i = 0, $size = count($this->_edits); $i < $size; $i++)
|
||||
{
|
||||
$edit = $this->_edits[$i];
|
||||
$rev->_edits[] = $edit->reverse();
|
||||
@@ -152,7 +152,7 @@ class diff
|
||||
*/
|
||||
function is_empty()
|
||||
{
|
||||
for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
|
||||
for ($i = 0, $size = count($this->_edits); $i < $size; $i++)
|
||||
{
|
||||
$edit = $this->_edits[$i];
|
||||
|
||||
@@ -168,8 +168,8 @@ class diff
|
||||
$final = $edit->final;
|
||||
|
||||
// We can simplify one case where the array is usually supposed to be empty...
|
||||
if (sizeof($orig) == 1 && trim($orig[0]) === '') $orig = array();
|
||||
if (sizeof($final) == 1 && trim($final[0]) === '') $final = array();
|
||||
if (count($orig) == 1 && trim($orig[0]) === '') $orig = array();
|
||||
if (count($final) == 1 && trim($final[0]) === '') $final = array();
|
||||
|
||||
if (!$orig && !$final)
|
||||
{
|
||||
@@ -196,13 +196,13 @@ class diff
|
||||
{
|
||||
$lcs = 0;
|
||||
|
||||
for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
|
||||
for ($i = 0, $size = count($this->_edits); $i < $size; $i++)
|
||||
{
|
||||
$edit = $this->_edits[$i];
|
||||
|
||||
if (is_a($edit, 'diff_op_copy'))
|
||||
{
|
||||
$lcs += sizeof($edit->orig);
|
||||
$lcs += count($edit->orig);
|
||||
}
|
||||
}
|
||||
return $lcs;
|
||||
@@ -219,13 +219,13 @@ class diff
|
||||
{
|
||||
$lines = array();
|
||||
|
||||
for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
|
||||
for ($i = 0, $size = count($this->_edits); $i < $size; $i++)
|
||||
{
|
||||
$edit = $this->_edits[$i];
|
||||
|
||||
if ($edit->orig)
|
||||
{
|
||||
array_splice($lines, sizeof($lines), 0, $edit->orig);
|
||||
array_splice($lines, count($lines), 0, $edit->orig);
|
||||
}
|
||||
}
|
||||
return $lines;
|
||||
@@ -242,13 +242,13 @@ class diff
|
||||
{
|
||||
$lines = array();
|
||||
|
||||
for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
|
||||
for ($i = 0, $size = count($this->_edits); $i < $size; $i++)
|
||||
{
|
||||
$edit = $this->_edits[$i];
|
||||
|
||||
if ($edit->final)
|
||||
{
|
||||
array_splice($lines, sizeof($lines), 0, $edit->final);
|
||||
array_splice($lines, count($lines), 0, $edit->final);
|
||||
}
|
||||
}
|
||||
return $lines;
|
||||
@@ -296,7 +296,7 @@ class diff
|
||||
|
||||
$prevtype = null;
|
||||
|
||||
for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
|
||||
for ($i = 0, $size = count($this->_edits); $i < $size; $i++)
|
||||
{
|
||||
$edit = $this->_edits[$i];
|
||||
|
||||
@@ -330,30 +330,30 @@ class mapped_diff extends diff
|
||||
* compared when computing the diff.
|
||||
* @param array $mapped_to_lines This array should have the same number of elements as $to_lines.
|
||||
*/
|
||||
function mapped_diff(&$from_lines, &$to_lines, &$mapped_from_lines, &$mapped_to_lines)
|
||||
function __construct(&$from_lines, &$to_lines, &$mapped_from_lines, &$mapped_to_lines)
|
||||
{
|
||||
if (sizeof($from_lines) != sizeof($mapped_from_lines) || sizeof($to_lines) != sizeof($mapped_to_lines))
|
||||
if (count($from_lines) != count($mapped_from_lines) || count($to_lines) != count($mapped_to_lines))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
parent::diff($mapped_from_lines, $mapped_to_lines);
|
||||
parent::__construct($mapped_from_lines, $mapped_to_lines);
|
||||
|
||||
$xi = $yi = 0;
|
||||
for ($i = 0; $i < sizeof($this->_edits); $i++)
|
||||
for ($i = 0; $i < count($this->_edits); $i++)
|
||||
{
|
||||
$orig = &$this->_edits[$i]->orig;
|
||||
if (is_array($orig))
|
||||
{
|
||||
$orig = array_slice($from_lines, $xi, sizeof($orig));
|
||||
$xi += sizeof($orig);
|
||||
$orig = array_slice($from_lines, $xi, count($orig));
|
||||
$xi += count($orig);
|
||||
}
|
||||
|
||||
$final = &$this->_edits[$i]->final;
|
||||
if (is_array($final))
|
||||
{
|
||||
$final = array_slice($to_lines, $yi, sizeof($final));
|
||||
$yi += sizeof($final);
|
||||
$final = array_slice($to_lines, $yi, count($final));
|
||||
$yi += count($final);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -377,12 +377,12 @@ class diff_op
|
||||
|
||||
function norig()
|
||||
{
|
||||
return ($this->orig) ? sizeof($this->orig) : 0;
|
||||
return ($this->orig) ? count($this->orig) : 0;
|
||||
}
|
||||
|
||||
function nfinal()
|
||||
{
|
||||
return ($this->final) ? sizeof($this->final) : 0;
|
||||
return ($this->final) ? count($this->final) : 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -394,7 +394,7 @@ class diff_op
|
||||
*/
|
||||
class diff_op_copy extends diff_op
|
||||
{
|
||||
function diff_op_copy($orig, $final = false)
|
||||
function __construct($orig, $final = false)
|
||||
{
|
||||
if (!is_array($final))
|
||||
{
|
||||
@@ -419,7 +419,7 @@ class diff_op_copy extends diff_op
|
||||
*/
|
||||
class diff_op_delete extends diff_op
|
||||
{
|
||||
function diff_op_delete($lines)
|
||||
function __construct($lines)
|
||||
{
|
||||
$this->orig = $lines;
|
||||
$this->final = false;
|
||||
@@ -440,7 +440,7 @@ class diff_op_delete extends diff_op
|
||||
*/
|
||||
class diff_op_add extends diff_op
|
||||
{
|
||||
function diff_op_add($lines)
|
||||
function __construct($lines)
|
||||
{
|
||||
$this->final = $lines;
|
||||
$this->orig = false;
|
||||
@@ -461,7 +461,7 @@ class diff_op_add extends diff_op
|
||||
*/
|
||||
class diff_op_change extends diff_op
|
||||
{
|
||||
function diff_op_change($orig, $final)
|
||||
function __construct($orig, $final)
|
||||
{
|
||||
$this->orig = $orig;
|
||||
$this->final = $final;
|
||||
@@ -498,7 +498,7 @@ class diff3 extends diff
|
||||
* @param bool $preserve_cr If true, \r\n and bare \r are replaced by a new line
|
||||
* in the diff output
|
||||
*/
|
||||
function diff3(&$orig, &$final1, &$final2, $preserve_cr = true)
|
||||
function __construct(&$orig, &$final1, &$final2, $preserve_cr = true)
|
||||
{
|
||||
$diff_engine = new diff_engine();
|
||||
|
||||
@@ -517,7 +517,7 @@ class diff3 extends diff
|
||||
{
|
||||
$conflicts = 0;
|
||||
|
||||
for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
|
||||
for ($i = 0, $size = count($this->_edits); $i < $size; $i++)
|
||||
{
|
||||
$edit = $this->_edits[$i];
|
||||
|
||||
@@ -550,7 +550,7 @@ class diff3 extends diff
|
||||
|
||||
$lines = array();
|
||||
|
||||
for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
|
||||
for ($i = 0, $size = count($this->_edits); $i < $size; $i++)
|
||||
{
|
||||
$edit = $this->_edits[$i];
|
||||
|
||||
@@ -590,7 +590,7 @@ class diff3 extends diff
|
||||
{
|
||||
$lines = array();
|
||||
|
||||
for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
|
||||
for ($i = 0, $size = count($this->_edits); $i < $size; $i++)
|
||||
{
|
||||
$edit = $this->_edits[$i];
|
||||
|
||||
@@ -614,7 +614,7 @@ class diff3 extends diff
|
||||
{
|
||||
$lines = array();
|
||||
|
||||
for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
|
||||
for ($i = 0, $size = count($this->_edits); $i < $size; $i++)
|
||||
{
|
||||
$edit = $this->_edits[$i];
|
||||
|
||||
@@ -638,7 +638,7 @@ class diff3 extends diff
|
||||
{
|
||||
$conflicts = array();
|
||||
|
||||
for ($i = 0, $size = sizeof($this->_edits); $i < $size; $i++)
|
||||
for ($i = 0, $size = count($this->_edits); $i < $size; $i++)
|
||||
{
|
||||
$edit = $this->_edits[$i];
|
||||
|
||||
@@ -754,7 +754,7 @@ class diff3 extends diff
|
||||
*/
|
||||
class diff3_op
|
||||
{
|
||||
function diff3_op($orig = false, $final1 = false, $final2 = false)
|
||||
function __construct($orig = false, $final1 = false, $final2 = false)
|
||||
{
|
||||
$this->orig = $orig ? $orig : array();
|
||||
$this->final1 = $final1 ? $final1 : array();
|
||||
@@ -803,9 +803,9 @@ class diff3_op
|
||||
function solve_prepare()
|
||||
{
|
||||
// We can simplify one case where the array is usually supposed to be empty...
|
||||
if (sizeof($this->orig) == 1 && trim($this->orig[0]) === '') $this->orig = array();
|
||||
if (sizeof($this->final1) == 1 && trim($this->final1[0]) === '') $this->final1 = array();
|
||||
if (sizeof($this->final2) == 1 && trim($this->final2[0]) === '') $this->final2 = array();
|
||||
if (count($this->orig) == 1 && trim($this->orig[0]) === '') $this->orig = array();
|
||||
if (count($this->final1) == 1 && trim($this->final1[0]) === '') $this->final1 = array();
|
||||
if (count($this->final2) == 1 && trim($this->final2[0]) === '') $this->final2 = array();
|
||||
|
||||
// Now we only can have the case where the only difference between arrays are newlines, so compare all cases
|
||||
|
||||
@@ -848,10 +848,10 @@ class diff3_op
|
||||
$_final1 = &$this->$final1;
|
||||
|
||||
// Ok, we basically search for $orig in $final1
|
||||
$compare_seq = sizeof($_orig);
|
||||
$compare_seq = count($_orig);
|
||||
|
||||
// Go through the conflict code
|
||||
for ($i = 0, $j = 0, $size = sizeof($_final1); $i < $size; $i++, $j = $i)
|
||||
for ($i = 0, $j = 0, $size = count($_final1); $i < $size; $i++, $j = $i)
|
||||
{
|
||||
$line = $_final1[$i];
|
||||
$skip = 0;
|
||||
@@ -895,7 +895,7 @@ class diff3_op
|
||||
|
||||
// CASE ONE: orig changed into final2, but modified/unknown code in final1.
|
||||
// IF orig is found "as is" in final1 we replace the code directly in final1 and populate this as final2/merge
|
||||
if (sizeof($this->orig) && sizeof($this->final2))
|
||||
if (count($this->orig) && count($this->final2))
|
||||
{
|
||||
$result = $this->_compare_conflict_seq('orig', 'final1', 'final2');
|
||||
|
||||
@@ -915,7 +915,7 @@ class diff3_op
|
||||
}
|
||||
|
||||
// Try to solve $Id$ issues. ;)
|
||||
if (sizeof($this->orig) == 1 && sizeof($this->final1) == 1 && sizeof($this->final2) == 1)
|
||||
if (count($this->orig) == 1 && count($this->final1) == 1 && count($this->final2) == 1)
|
||||
{
|
||||
$match = '#^' . preg_quote('* @version $Id: ', '#') . '[a-z\._\- ]+[0-9]+ [0-9]{4}-[0-9]{2}-[0-9]{2} [0-9\:Z]+ [a-z0-9_\- ]+\$$#';
|
||||
|
||||
@@ -939,9 +939,9 @@ class diff3_op
|
||||
}
|
||||
|
||||
// The same is true for a line at the end. ;)
|
||||
if (sizeof($this->orig) && sizeof($this->final2) && sizeof($this->orig) === sizeof($this->final2) && trim($this->orig[sizeof($this->orig)-1]) === '' && trim($this->final2[sizeof($this->final2)-1]) === '')
|
||||
if (count($this->orig) && count($this->final2) && count($this->orig) === count($this->final2) && trim($this->orig[count($this->orig)-1]) === '' && trim($this->final2[count($this->final2)-1]) === '')
|
||||
{
|
||||
unset($this->orig[sizeof($this->orig)-1], $this->final2[sizeof($this->final2)-1]);
|
||||
unset($this->orig[count($this->orig)-1], $this->final2[count($this->final2)-1]);
|
||||
$this->orig = array_values($this->orig);
|
||||
$this->final2 = array_values($this->final2);
|
||||
|
||||
@@ -972,7 +972,7 @@ class diff3_op
|
||||
}
|
||||
|
||||
// CASE TWO: Added lines from orig to final2 but final1 had added lines too. Just merge them.
|
||||
if (!sizeof($this->orig) && $this->final1 !== $this->final2 && sizeof($this->final1) && sizeof($this->final2))
|
||||
if (!count($this->orig) && $this->final1 !== $this->final2 && count($this->final1) && count($this->final2))
|
||||
{
|
||||
$result = $this->_compare_conflict_seq('final2', 'final1');
|
||||
|
||||
@@ -1001,7 +1001,7 @@ class diff3_op
|
||||
}
|
||||
|
||||
// CASE THREE: Removed lines (orig has the to-remove line(s), but final1 has additional lines which does not need to be removed). Just remove orig from final1 and then use final1 as final2/merge
|
||||
if (!sizeof($this->final2) && sizeof($this->orig) && sizeof($this->final1) && $this->orig !== $this->final1)
|
||||
if (!count($this->final2) && count($this->orig) && count($this->final1) && $this->orig !== $this->final1)
|
||||
{
|
||||
$result = $this->_compare_conflict_seq('orig', 'final1');
|
||||
|
||||
@@ -1011,11 +1011,11 @@ class diff3_op
|
||||
}
|
||||
|
||||
// First of all, try to find the code in orig in final1. ;)
|
||||
$compare_seq = sizeof($this->orig);
|
||||
$compare_seq = count($this->orig);
|
||||
$begin = $end = -1;
|
||||
$j = 0;
|
||||
|
||||
for ($i = 0, $size = sizeof($this->final1); $i < $size; $i++)
|
||||
for ($i = 0, $size = count($this->final1); $i < $size; $i++)
|
||||
{
|
||||
$line = $this->final1[$i];
|
||||
|
||||
@@ -1066,7 +1066,7 @@ class diff3_op
|
||||
*/
|
||||
class diff3_op_copy extends diff3_op
|
||||
{
|
||||
function diff3_op_copy($lines = false)
|
||||
function __construct($lines = false)
|
||||
{
|
||||
$this->orig = $lines ? $lines : array();
|
||||
$this->final1 = &$this->orig;
|
||||
@@ -1092,7 +1092,7 @@ class diff3_op_copy extends diff3_op
|
||||
*/
|
||||
class diff3_block_builder
|
||||
{
|
||||
function diff3_block_builder()
|
||||
function __construct()
|
||||
{
|
||||
$this->_init();
|
||||
}
|
||||
@@ -1147,6 +1147,6 @@ class diff3_block_builder
|
||||
|
||||
function _append(&$array, $lines)
|
||||
{
|
||||
array_splice($array, sizeof($array), 0, $lines);
|
||||
array_splice($array, count($array), 0, $lines);
|
||||
}
|
||||
}
|
||||
|
@@ -84,8 +84,8 @@ class diff_engine
|
||||
$to_lines = explode("\n", preg_replace('#[\n\r]+#', "\n", $to_lines));
|
||||
}
|
||||
|
||||
$n_from = sizeof($from_lines);
|
||||
$n_to = sizeof($to_lines);
|
||||
$n_from = count($from_lines);
|
||||
$n_to = count($to_lines);
|
||||
|
||||
$this->xchanged = $this->ychanged = $this->xv = $this->yv = $this->xind = $this->yind = array();
|
||||
unset($this->seq, $this->in_seq, $this->lcs);
|
||||
@@ -145,7 +145,7 @@ class diff_engine
|
||||
}
|
||||
|
||||
// Find the LCS.
|
||||
$this->_compareseq(0, sizeof($this->xv), 0, sizeof($this->yv));
|
||||
$this->_compareseq(0, count($this->xv), 0, count($this->yv));
|
||||
|
||||
// Merge edits when possible.
|
||||
if ($this->skip_whitespace_changes)
|
||||
@@ -444,8 +444,8 @@ class diff_engine
|
||||
$i = 0;
|
||||
$j = 0;
|
||||
|
||||
$len = sizeof($lines);
|
||||
$other_len = sizeof($other_changed);
|
||||
$len = count($lines);
|
||||
$other_len = count($other_changed);
|
||||
|
||||
while (1)
|
||||
{
|
||||
|
@@ -56,7 +56,7 @@ class diff_renderer
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
function diff_renderer($params = array())
|
||||
function __construct($params = array())
|
||||
{
|
||||
foreach ($params as $param => $value)
|
||||
{
|
||||
@@ -128,8 +128,8 @@ class diff_renderer
|
||||
if (is_array($block))
|
||||
{
|
||||
// How many lines to keep as context from the copy block.
|
||||
$keep = ($i == sizeof($diffs) - 1) ? $ntrail : $nlead + $ntrail;
|
||||
if (sizeof($edit->orig) <= $keep)
|
||||
$keep = ($i == count($diffs) - 1) ? $ntrail : $nlead + $ntrail;
|
||||
if (count($edit->orig) <= $keep)
|
||||
{
|
||||
// We have less lines in the block than we want for context => keep the whole block.
|
||||
$block[] = $edit;
|
||||
@@ -156,9 +156,9 @@ class diff_renderer
|
||||
if (!is_array($block))
|
||||
{
|
||||
// Extract context lines from the preceding copy block.
|
||||
$context = array_slice($context, sizeof($context) - $nlead);
|
||||
$x0 = $xi - sizeof($context);
|
||||
$y0 = $yi - sizeof($context);
|
||||
$context = array_slice($context, count($context) - $nlead);
|
||||
$x0 = $xi - count($context);
|
||||
$y0 = $yi - count($context);
|
||||
$block = array();
|
||||
|
||||
if ($context)
|
||||
@@ -169,8 +169,8 @@ class diff_renderer
|
||||
$block[] = $edit;
|
||||
}
|
||||
|
||||
$xi += ($edit->orig) ? sizeof($edit->orig) : 0;
|
||||
$yi += ($edit->final) ? sizeof($edit->final) : 0;
|
||||
$xi += ($edit->orig) ? count($edit->orig) : 0;
|
||||
$yi += ($edit->final) ? count($edit->final) : 0;
|
||||
}
|
||||
|
||||
if (is_array($block))
|
||||
@@ -433,7 +433,7 @@ class diff_renderer_inline extends diff_renderer
|
||||
{
|
||||
array_walk($lines, array(&$this, '_encode'));
|
||||
$lines[0] = $this->_ins_prefix . $lines[0];
|
||||
$lines[sizeof($lines) - 1] .= $this->_ins_suffix;
|
||||
$lines[count($lines) - 1] .= $this->_ins_suffix;
|
||||
return $this->_lines($lines, ' ', false);
|
||||
}
|
||||
|
||||
@@ -441,7 +441,7 @@ class diff_renderer_inline extends diff_renderer
|
||||
{
|
||||
array_walk($lines, array(&$this, '_encode'));
|
||||
$lines[0] = $this->_del_prefix . $lines[0];
|
||||
$lines[sizeof($lines) - 1] .= $this->_del_suffix;
|
||||
$lines[count($lines) - 1] .= $this->_del_suffix;
|
||||
return $this->_lines($lines, ' ', false);
|
||||
}
|
||||
|
||||
@@ -617,7 +617,7 @@ class diff_renderer_side_by_side extends diff_renderer
|
||||
$this->render($diff);
|
||||
|
||||
// Is the diff empty?
|
||||
if (!sizeof($this->lines))
|
||||
if (!count($this->lines))
|
||||
{
|
||||
$output .= '<tr><th colspan="2">' . $user->lang['NO_VISIBLE_CHANGES'] . '</th></tr>';
|
||||
}
|
||||
@@ -672,8 +672,8 @@ class diff_renderer_side_by_side extends diff_renderer
|
||||
|
||||
case 'change':
|
||||
// Pop the old/new stacks one by one, until both are empty.
|
||||
$oldsize = sizeof($change['old']);
|
||||
$newsize = sizeof($change['new']);
|
||||
$oldsize = count($change['old']);
|
||||
$newsize = count($change['new']);
|
||||
$left = $right = '';
|
||||
|
||||
for ($row = 0, $row_max = max($oldsize, $newsize); $row < $row_max; ++$row)
|
||||
|
@@ -66,29 +66,48 @@ function set_var(&$result, $var, $type, $multibyte = false)
|
||||
/**
|
||||
* Generates an alphanumeric random string of given length
|
||||
*
|
||||
* @param int $num_chars Length of random string, defaults to 8.
|
||||
* This number should be less or equal than 64.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function gen_rand_string($num_chars = 8)
|
||||
{
|
||||
// [a, z] + [0, 9] = 36
|
||||
return substr(strtoupper(base_convert(unique_id(), 16, 36)), 0, $num_chars);
|
||||
$range = array_merge(range('A', 'Z'), range(0, 9));
|
||||
$size = count($range);
|
||||
|
||||
$output = '';
|
||||
for ($i = 0; $i < $num_chars; $i++)
|
||||
{
|
||||
$rand = random_int(0, $size-1);
|
||||
$output .= $range[$rand];
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a user-friendly alphanumeric random string of given length
|
||||
* We remove 0 and O so users cannot confuse those in passwords etc.
|
||||
*
|
||||
* @param int $num_chars Length of random string, defaults to 8.
|
||||
* This number should be less or equal than 64.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function gen_rand_string_friendly($num_chars = 8)
|
||||
{
|
||||
$rand_str = unique_id();
|
||||
$range = array_merge(range('A', 'N'), range('P', 'Z'), range(1, 9));
|
||||
$size = count($range);
|
||||
|
||||
// Remove Z and Y from the base_convert(), replace 0 with Z and O with Y
|
||||
// [a, z] + [0, 9] - {z, y} = [a, z] + [0, 9] - {0, o} = 34
|
||||
$rand_str = str_replace(array('0', 'O'), array('Z', 'Y'), strtoupper(base_convert($rand_str, 16, 34)));
|
||||
$output = '';
|
||||
for ($i = 0; $i < $num_chars; $i++)
|
||||
{
|
||||
$rand = random_int(0, $size-1);
|
||||
$output .= $range[$rand];
|
||||
}
|
||||
|
||||
return substr($rand_str, 0, $num_chars);
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -96,7 +115,7 @@ function gen_rand_string_friendly($num_chars = 8)
|
||||
*/
|
||||
function unique_id()
|
||||
{
|
||||
return bin2hex(random_bytes(8));
|
||||
return strtolower(gen_rand_string(16));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -602,7 +621,7 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $
|
||||
|
||||
if ($mode == 'all')
|
||||
{
|
||||
if ($forum_id === false || !sizeof($forum_id))
|
||||
if (empty($forum_id))
|
||||
{
|
||||
// Mark all forums read (index page)
|
||||
/* @var $phpbb_notifications \phpbb\notification\manager */
|
||||
@@ -727,7 +746,7 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (sizeof($sql_update))
|
||||
if (count($sql_update))
|
||||
{
|
||||
$sql = 'UPDATE ' . FORUMS_TRACK_TABLE . "
|
||||
SET mark_time = $post_time
|
||||
@@ -863,7 +882,7 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $
|
||||
|
||||
// We get the ten most minimum stored time offsets and its associated topic ids
|
||||
$time_keys = array();
|
||||
for ($i = 0; $i < 10 && sizeof($tracking['t']); $i++)
|
||||
for ($i = 0; $i < 10 && count($tracking['t']); $i++)
|
||||
{
|
||||
$min_value = min($tracking['t']);
|
||||
$m_tkey = array_search($min_value, $tracking['t']);
|
||||
@@ -959,7 +978,7 @@ function get_topic_tracking($forum_id, $topic_ids, &$rowset, $forum_mark_time, $
|
||||
|
||||
$topic_ids = array_diff($topic_ids, array_keys($last_read));
|
||||
|
||||
if (sizeof($topic_ids))
|
||||
if (count($topic_ids))
|
||||
{
|
||||
$mark_time = array();
|
||||
|
||||
@@ -1011,7 +1030,7 @@ function get_complete_topic_tracking($forum_id, $topic_ids, $global_announce_lis
|
||||
|
||||
$topic_ids = array_diff($topic_ids, array_keys($last_read));
|
||||
|
||||
if (sizeof($topic_ids))
|
||||
if (count($topic_ids))
|
||||
{
|
||||
$sql = 'SELECT forum_id, mark_time
|
||||
FROM ' . FORUMS_TRACK_TABLE . "
|
||||
@@ -1038,7 +1057,7 @@ function get_complete_topic_tracking($forum_id, $topic_ids, $global_announce_lis
|
||||
{
|
||||
global $tracking_topics;
|
||||
|
||||
if (!isset($tracking_topics) || !sizeof($tracking_topics))
|
||||
if (!isset($tracking_topics) || !count($tracking_topics))
|
||||
{
|
||||
$tracking_topics = $request->variable($config['cookie_name'] . '_track', '', true, \phpbb\request\request_interface::COOKIE);
|
||||
$tracking_topics = ($tracking_topics) ? tracking_unserialize($tracking_topics) : array();
|
||||
@@ -1065,7 +1084,7 @@ function get_complete_topic_tracking($forum_id, $topic_ids, $global_announce_lis
|
||||
|
||||
$topic_ids = array_diff($topic_ids, array_keys($last_read));
|
||||
|
||||
if (sizeof($topic_ids))
|
||||
if (count($topic_ids))
|
||||
{
|
||||
$mark_time = array();
|
||||
|
||||
@@ -1407,7 +1426,7 @@ function tracking_unserialize($string, $max_depth = 3)
|
||||
switch ($string[$i])
|
||||
{
|
||||
case '(':
|
||||
if (sizeof($stack) >= $max_depth)
|
||||
if (count($stack) >= $max_depth)
|
||||
{
|
||||
die('Invalid data supplied');
|
||||
}
|
||||
@@ -1461,7 +1480,7 @@ function tracking_unserialize($string, $max_depth = 3)
|
||||
}
|
||||
}
|
||||
|
||||
if (sizeof($stack) != 0 || ($mode != 0 && $mode != 3))
|
||||
if (count($stack) != 0 || ($mode != 0 && $mode != 3))
|
||||
{
|
||||
die('Invalid data supplied');
|
||||
}
|
||||
@@ -1644,7 +1663,7 @@ function append_sid($url, $params = false, $is_amp = true, $session_id = false,
|
||||
*/
|
||||
function generate_board_url($without_script_path = false)
|
||||
{
|
||||
global $config, $user, $request;
|
||||
global $config, $user, $request, $symfony_request;
|
||||
|
||||
$server_name = $user->host;
|
||||
|
||||
@@ -1661,7 +1680,8 @@ function generate_board_url($without_script_path = false)
|
||||
}
|
||||
else
|
||||
{
|
||||
$server_port = $request->server('SERVER_PORT', 0);
|
||||
$server_port = (int) $symfony_request->getPort();
|
||||
|
||||
$forwarded_proto = $request->server('HTTP_X_FORWARDED_PROTO');
|
||||
|
||||
if (!empty($forwarded_proto) && $forwarded_proto === 'https')
|
||||
@@ -1724,14 +1744,14 @@ function redirect($url, $return = false, $disable_cd_check = false)
|
||||
if ($url_parts === false)
|
||||
{
|
||||
// Malformed url
|
||||
trigger_error('INSECURE_REDIRECT', E_USER_ERROR);
|
||||
trigger_error('INSECURE_REDIRECT', E_USER_WARNING);
|
||||
}
|
||||
else if (!empty($url_parts['scheme']) && !empty($url_parts['host']))
|
||||
{
|
||||
// Attention: only able to redirect within the same domain if $disable_cd_check is false (yourdomain.com -> www.yourdomain.com will not work)
|
||||
if (!$disable_cd_check && $url_parts['host'] !== $user->host)
|
||||
{
|
||||
trigger_error('INSECURE_REDIRECT', E_USER_ERROR);
|
||||
trigger_error('INSECURE_REDIRECT', E_USER_WARNING);
|
||||
}
|
||||
}
|
||||
else if ($url[0] == '/')
|
||||
@@ -1771,13 +1791,13 @@ function redirect($url, $return = false, $disable_cd_check = false)
|
||||
|
||||
if (!$disable_cd_check && strpos($url, generate_board_url(true) . '/') !== 0)
|
||||
{
|
||||
trigger_error('INSECURE_REDIRECT', E_USER_ERROR);
|
||||
trigger_error('INSECURE_REDIRECT', E_USER_WARNING);
|
||||
}
|
||||
|
||||
// Make sure no linebreaks are there... to prevent http response splitting for PHP < 4.4.2
|
||||
if (strpos(urldecode($url), "\n") !== false || strpos(urldecode($url), "\r") !== false || strpos($url, ';') !== false)
|
||||
{
|
||||
trigger_error('INSECURE_REDIRECT', E_USER_ERROR);
|
||||
trigger_error('INSECURE_REDIRECT', E_USER_WARNING);
|
||||
}
|
||||
|
||||
// Now, also check the protocol and for a valid url the last time...
|
||||
@@ -1786,7 +1806,7 @@ function redirect($url, $return = false, $disable_cd_check = false)
|
||||
|
||||
if ($url_parts === false || empty($url_parts['scheme']) || !in_array($url_parts['scheme'], $allowed_protocols))
|
||||
{
|
||||
trigger_error('INSECURE_REDIRECT', E_USER_ERROR);
|
||||
trigger_error('INSECURE_REDIRECT', E_USER_WARNING);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1839,7 +1859,7 @@ function redirect($url, $return = false, $disable_cd_check = false)
|
||||
/**
|
||||
* Re-Apply session id after page reloads
|
||||
*/
|
||||
function reapply_sid($url)
|
||||
function reapply_sid($url, $is_route = false)
|
||||
{
|
||||
global $phpEx, $phpbb_root_path;
|
||||
|
||||
@@ -1861,7 +1881,7 @@ function reapply_sid($url)
|
||||
$url = preg_replace("/$phpEx(&|&)+?/", "$phpEx?", $url);
|
||||
}
|
||||
|
||||
return append_sid($url);
|
||||
return append_sid($url, false, true, false, $is_route);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2343,10 +2363,12 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
|
||||
* @event core.login_box_redirect
|
||||
* @var string redirect Redirect string
|
||||
* @var bool admin Is admin?
|
||||
* @var array result Result from auth provider
|
||||
* @since 3.1.0-RC5
|
||||
* @changed 3.1.9-RC1 Removed undefined return variable
|
||||
* @changed 3.2.4-RC1 Added result
|
||||
*/
|
||||
$vars = array('redirect', 'admin');
|
||||
$vars = array('redirect', 'admin', 'result');
|
||||
extract($phpbb_dispatcher->trigger_event('core.login_box_redirect', compact($vars)));
|
||||
|
||||
// append/replace SID (may change during the session for AOL users)
|
||||
@@ -2462,7 +2484,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
|
||||
|
||||
$s_hidden_fields = build_hidden_fields($s_hidden_fields);
|
||||
|
||||
$template->assign_vars(array(
|
||||
$login_box_template_data = array(
|
||||
'LOGIN_ERROR' => $err,
|
||||
'LOGIN_EXPLAIN' => $l_explain,
|
||||
|
||||
@@ -2470,6 +2492,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
|
||||
'U_RESEND_ACTIVATION' => ($config['require_activation'] == USER_ACTIVATION_SELF && $config['email_enable']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=resend_act') : '',
|
||||
'U_TERMS_USE' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=terms'),
|
||||
'U_PRIVACY' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=privacy'),
|
||||
'UA_PRIVACY' => addslashes(append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=privacy')),
|
||||
|
||||
'S_DISPLAY_FULL_LOGIN' => ($s_display) ? true : false,
|
||||
'S_HIDDEN_FIELDS' => $s_hidden_fields,
|
||||
@@ -2479,7 +2502,29 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
|
||||
|
||||
'USERNAME_CREDENTIAL' => 'username',
|
||||
'PASSWORD_CREDENTIAL' => ($admin) ? 'password_' . $credential : 'password',
|
||||
));
|
||||
);
|
||||
|
||||
/**
|
||||
* Event to add/modify login box template data
|
||||
*
|
||||
* @event core.login_box_modify_template_data
|
||||
* @var int admin Flag whether user is admin
|
||||
* @var string username User name
|
||||
* @var int autologin Flag whether autologin is enabled
|
||||
* @var string redirect Redirect URL
|
||||
* @var array login_box_template_data Array with the login box template data
|
||||
* @since 3.2.3-RC2
|
||||
*/
|
||||
$vars = array(
|
||||
'admin',
|
||||
'username',
|
||||
'autologin',
|
||||
'redirect',
|
||||
'login_box_template_data',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.login_box_modify_template_data', compact($vars)));
|
||||
|
||||
$template->assign_vars($login_box_template_data);
|
||||
|
||||
page_header($user->lang['LOGIN']);
|
||||
|
||||
@@ -2496,7 +2541,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
|
||||
*/
|
||||
function login_forum_box($forum_data)
|
||||
{
|
||||
global $db, $phpbb_container, $request, $template, $user, $phpbb_dispatcher;
|
||||
global $db, $phpbb_container, $request, $template, $user, $phpbb_dispatcher, $phpbb_root_path, $phpEx;
|
||||
|
||||
$password = $request->variable('password', '', true);
|
||||
|
||||
@@ -2581,6 +2626,8 @@ function login_forum_box($forum_data)
|
||||
'body' => 'login_forum.html')
|
||||
);
|
||||
|
||||
make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"), $forum_data['forum_id']);
|
||||
|
||||
page_footer();
|
||||
}
|
||||
|
||||
@@ -2675,9 +2722,9 @@ function parse_cfg_file($filename, $lines = false)
|
||||
{
|
||||
$value = '';
|
||||
}
|
||||
else if (($value[0] == "'" && $value[sizeof($value) - 1] == "'") || ($value[0] == '"' && $value[sizeof($value) - 1] == '"'))
|
||||
else if (($value[0] == "'" && $value[strlen($value) - 1] == "'") || ($value[0] == '"' && $value[strlen($value) - 1] == '"'))
|
||||
{
|
||||
$value = htmlspecialchars(substr($value, 1, sizeof($value)-2));
|
||||
$value = htmlspecialchars(substr($value, 1, strlen($value)-2));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2779,12 +2826,17 @@ function get_preg_expression($mode)
|
||||
|
||||
case 'url':
|
||||
// generated with regex_idn.php file in the develop folder
|
||||
return "[a-z][a-z\d+\-.]*:/{2}(?:(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'()*+,;=:@|]+|%[\dA-F]{2})+|[0-9.]+|\[[a-z0-9.]+:[a-z0-9.]+:[a-z0-9.:]+\])(?::\d*)?(?:/(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'()*+,;=:@|]+|%[\dA-F]{2})*)*(?:\?(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'()*+,;=:@/?|]+|%[\dA-F]{2})*)?(?:\#(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'()*+,;=:@/?|]+|%[\dA-F]{2})*)?";
|
||||
return "[a-z][a-z\d+\-.]*(?<!javascript):/{2}(?:(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'()*+,;=:@|]+|%[\dA-F]{2})+|[0-9.]+|\[[a-z0-9.]+:[a-z0-9.]+:[a-z0-9.:]+\])(?::\d*)?(?:/(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'()*+,;=:@|]+|%[\dA-F]{2})*)*(?:\?(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'()*+,;=:@/?|]+|%[\dA-F]{2})*)?(?:\#(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'()*+,;=:@/?|]+|%[\dA-F]{2})*)?";
|
||||
break;
|
||||
|
||||
case 'url_http':
|
||||
// generated with regex_idn.php file in the develop folder
|
||||
return "http[s]?:/{2}(?:(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'()*+,;=:@|]+|%[\dA-F]{2})+|[0-9.]+|\[[a-z0-9.]+:[a-z0-9.]+:[a-z0-9.:]+\])(?::\d*)?(?:/(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'()*+,;=:@|]+|%[\dA-F]{2})*)*(?:\?(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'()*+,;=:@/?|]+|%[\dA-F]{2})*)?(?:\#(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'()*+,;=:@/?|]+|%[\dA-F]{2})*)?";
|
||||
break;
|
||||
|
||||
case 'url_inline':
|
||||
// generated with regex_idn.php file in the develop folder
|
||||
return "[a-z][a-z\d+]*:/{2}(?:(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'(*+,;=:@|]+|%[\dA-F]{2})+|[0-9.]+|\[[a-z0-9.]+:[a-z0-9.]+:[a-z0-9.:]+\])(?::\d*)?(?:/(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'(*+,;=:@|]+|%[\dA-F]{2})*)*(?:\?(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'(*+,;=:@/?|]+|%[\dA-F]{2})*)?(?:\#(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'(*+,;=:@/?|]+|%[\dA-F]{2})*)?";
|
||||
return "[a-z][a-z\d+]*(?<!javascript):/{2}(?:(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'(*+,;=:@|]+|%[\dA-F]{2})+|[0-9.]+|\[[a-z0-9.]+:[a-z0-9.]+:[a-z0-9.:]+\])(?::\d*)?(?:/(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'(*+,;=:@|]+|%[\dA-F]{2})*)*(?:\?(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'(*+,;=:@/?|]+|%[\dA-F]{2})*)?(?:\#(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'(*+,;=:@/?|]+|%[\dA-F]{2})*)?";
|
||||
break;
|
||||
|
||||
case 'www_url':
|
||||
@@ -3006,7 +3058,7 @@ function phpbb_inet_pton($address)
|
||||
if (preg_match(get_preg_expression('ipv6'), $address))
|
||||
{
|
||||
$parts = explode(':', $address);
|
||||
$missing_parts = 8 - sizeof($parts) + 1;
|
||||
$missing_parts = 8 - count($parts) + 1;
|
||||
|
||||
if (substr($address, 0, 2) === '::')
|
||||
{
|
||||
@@ -3023,7 +3075,7 @@ function phpbb_inet_pton($address)
|
||||
|
||||
if (preg_match(get_preg_expression('ipv4'), $last_part))
|
||||
{
|
||||
$parts[sizeof($parts) - 1] = '';
|
||||
$parts[count($parts) - 1] = '';
|
||||
$last_part = phpbb_inet_pton($last_part);
|
||||
$embedded_ipv4 = true;
|
||||
--$missing_parts;
|
||||
@@ -3035,7 +3087,7 @@ function phpbb_inet_pton($address)
|
||||
{
|
||||
$ret .= str_pad($part, 4, '0', STR_PAD_LEFT);
|
||||
}
|
||||
else if ($i && $i < sizeof($parts) - 1)
|
||||
else if ($i && $i < count($parts) - 1)
|
||||
{
|
||||
$ret .= str_repeat('0000', $missing_parts);
|
||||
}
|
||||
@@ -3631,7 +3683,7 @@ function obtain_users_online_string($online_users, $item_id = 0, $item = 'forum'
|
||||
// Need caps version of $item for language-strings
|
||||
$item_caps = strtoupper($item);
|
||||
|
||||
if (sizeof($online_users['online_users']))
|
||||
if (count($online_users['online_users']))
|
||||
{
|
||||
$sql_ary = array(
|
||||
'SELECT' => 'u.username, u.username_clean, u.user_id, u.user_type, u.user_allow_viewonline, u.user_colour',
|
||||
@@ -4069,11 +4121,6 @@ function phpbb_get_avatar($row, $alt, $ignore_config = false, $lazy = false)
|
||||
if ($driver)
|
||||
{
|
||||
$html = $driver->get_custom_html($user, $row, $alt);
|
||||
if (!empty($html))
|
||||
{
|
||||
return $html;
|
||||
}
|
||||
|
||||
$avatar_data = $driver->get_data($row);
|
||||
}
|
||||
else
|
||||
@@ -4081,7 +4128,7 @@ function phpbb_get_avatar($row, $alt, $ignore_config = false, $lazy = false)
|
||||
$avatar_data['src'] = '';
|
||||
}
|
||||
|
||||
if (!empty($avatar_data['src']))
|
||||
if (empty($html) && !empty($avatar_data['src']))
|
||||
{
|
||||
if ($lazy)
|
||||
{
|
||||
@@ -4400,9 +4447,10 @@ function page_header($page_title = '', $display_online_list = false, $item_id =
|
||||
'U_SEARCH_ACTIVE_TOPICS'=> append_sid("{$phpbb_root_path}search.$phpEx", 'search_id=active_topics'),
|
||||
'U_DELETE_COOKIES' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=delete_cookies'),
|
||||
'U_CONTACT_US' => ($config['contact_admin_form_enable'] && $config['email_enable']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contactadmin') : '',
|
||||
'U_TEAM' => ($user->data['user_id'] != ANONYMOUS && !$auth->acl_get('u_viewprofile')) ? '' : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=team'),
|
||||
'U_TEAM' => (!$auth->acl_get('u_viewprofile')) ? '' : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=team'),
|
||||
'U_TERMS_USE' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=terms'),
|
||||
'U_PRIVACY' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=privacy'),
|
||||
'UA_PRIVACY' => addslashes(append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=privacy')),
|
||||
'U_RESTORE_PERMISSIONS' => ($user->data['user_perm_from'] && $auth->acl_get('a_switchperm')) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=restore_perm') : '',
|
||||
'U_FEED' => $controller_helper->route('phpbb_feed_index'),
|
||||
|
||||
@@ -4462,7 +4510,7 @@ function page_header($page_title = '', $display_online_list = false, $item_id =
|
||||
'S_COOKIE_NOTICE' => !empty($config['cookie_notice']),
|
||||
|
||||
'T_THEME_NAME' => rawurlencode($user->style['style_path']),
|
||||
'T_THEME_LANG_NAME' => $user->data['user_lang'],
|
||||
'T_THEME_LANG_NAME' => $user->lang_name,
|
||||
'T_TEMPLATE_NAME' => $user->style['style_path'],
|
||||
'T_SUPER_TEMPLATE_NAME' => rawurlencode((isset($user->style['style_parent_tree']) && $user->style['style_parent_tree']) ? $user->style['style_parent_tree'] : $user->style['style_path']),
|
||||
'T_IMAGES' => 'images',
|
||||
|
@@ -564,9 +564,6 @@ function validate_config_vars($config_vars, &$cfg_array, &$error)
|
||||
|
||||
$cfg_array[$config_name] = trim($destination);
|
||||
|
||||
// Absolute file path
|
||||
case 'absolute_path':
|
||||
case 'absolute_path_writable':
|
||||
// Path being relative (still prefixed by phpbb_root_path), but with the ability to escape the root dir...
|
||||
case 'path':
|
||||
case 'wpath':
|
||||
@@ -585,7 +582,7 @@ function validate_config_vars($config_vars, &$cfg_array, &$error)
|
||||
break;
|
||||
}
|
||||
|
||||
$path = in_array($config_definition['validate'], array('wpath', 'path', 'rpath', 'rwpath')) ? $phpbb_root_path . $cfg_array[$config_name] : $cfg_array[$config_name];
|
||||
$path = $phpbb_root_path . $cfg_array[$config_name];
|
||||
|
||||
if (!file_exists($path))
|
||||
{
|
||||
@@ -598,7 +595,7 @@ function validate_config_vars($config_vars, &$cfg_array, &$error)
|
||||
}
|
||||
|
||||
// Check if the path is writable
|
||||
if ($config_definition['validate'] == 'wpath' || $config_definition['validate'] == 'rwpath' || $config_definition['validate'] === 'absolute_path_writable')
|
||||
if ($config_definition['validate'] == 'wpath' || $config_definition['validate'] == 'rwpath')
|
||||
{
|
||||
if (file_exists($path) && !$phpbb_filesystem->is_writable($path))
|
||||
{
|
||||
|
@@ -167,7 +167,7 @@ function size_select_options($size_compare)
|
||||
|
||||
$s_size_options = '';
|
||||
|
||||
for ($i = 0, $size = sizeof($size_types_text); $i < $size; $i++)
|
||||
for ($i = 0, $size = count($size_types_text); $i < $size; $i++)
|
||||
{
|
||||
$selected = ($size_compare == $size_types[$i]) ? ' selected="selected"' : '';
|
||||
$s_size_options .= '<option value="' . $size_types[$i] . '"' . $selected . '>' . $size_types_text[$i] . '</option>';
|
||||
@@ -192,7 +192,7 @@ function group_select_options($group_id, $exclude_ids = false, $manage_founder =
|
||||
/** @var \phpbb\group\helper $group_helper */
|
||||
$group_helper = $phpbb_container->get('group_helper');
|
||||
|
||||
$exclude_sql = ($exclude_ids !== false && sizeof($exclude_ids)) ? 'WHERE ' . $db->sql_in_set('group_id', array_map('intval', $exclude_ids), true) : '';
|
||||
$exclude_sql = ($exclude_ids !== false && count($exclude_ids)) ? 'WHERE ' . $db->sql_in_set('group_id', array_map('intval', $exclude_ids), true) : '';
|
||||
$sql_and = (!$config['coppa_enable']) ? (($exclude_sql) ? ' AND ' : ' WHERE ') . "group_name <> 'REGISTERED_COPPA'" : '';
|
||||
$sql_founder = ($manage_founder !== false) ? (($exclude_sql || $sql_and) ? ' AND ' : ' WHERE ') . 'group_founder_manage = ' . (int) $manage_founder : '';
|
||||
|
||||
@@ -747,7 +747,7 @@ function delete_topics($where_type, $where_ids, $auto_sync = true, $post_count_s
|
||||
{
|
||||
$where_ids = (is_array($where_ids)) ? array_unique($where_ids) : array($where_ids);
|
||||
|
||||
if (!sizeof($where_ids))
|
||||
if (!count($where_ids))
|
||||
{
|
||||
return array('topics' => 0, 'posts' => 0);
|
||||
}
|
||||
@@ -777,9 +777,9 @@ function delete_topics($where_type, $where_ids, $auto_sync = true, $post_count_s
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$return['topics'] = sizeof($topic_ids);
|
||||
$return['topics'] = count($topic_ids);
|
||||
|
||||
if (!sizeof($topic_ids))
|
||||
if (!count($topic_ids))
|
||||
{
|
||||
return $return;
|
||||
}
|
||||
@@ -837,7 +837,7 @@ function delete_topics($where_type, $where_ids, $auto_sync = true, $post_count_s
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (sizeof($moved_topic_ids))
|
||||
if (count($moved_topic_ids))
|
||||
{
|
||||
$sql = 'DELETE FROM ' . TOPICS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('topic_id', $moved_topic_ids);
|
||||
@@ -923,7 +923,7 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
|
||||
$where_ids = array($where_ids);
|
||||
}
|
||||
|
||||
if (!sizeof($where_ids))
|
||||
if (!count($where_ids))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -931,7 +931,7 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
|
||||
$where_ids = array_map('intval', $where_ids);
|
||||
|
||||
/* Possible code for splitting post deletion
|
||||
if (sizeof($where_ids) >= 1001)
|
||||
if (count($where_ids) >= 1001)
|
||||
{
|
||||
// Split into chunks of 1000
|
||||
$chunks = array_chunk($where_ids, 1000);
|
||||
@@ -974,7 +974,7 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (!sizeof($post_ids))
|
||||
if (!count($post_ids))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -1018,7 +1018,7 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
|
||||
unset($table_ary);
|
||||
|
||||
// Adjust users post counts
|
||||
if (sizeof($post_counts) && $post_count_sync)
|
||||
if (count($post_counts) && $post_count_sync)
|
||||
{
|
||||
foreach ($post_counts as $poster_id => $substract)
|
||||
{
|
||||
@@ -1037,7 +1037,7 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
|
||||
}
|
||||
|
||||
// Remove topics now having no posts?
|
||||
if (sizeof($topic_ids))
|
||||
if (count($topic_ids))
|
||||
{
|
||||
$sql = 'SELECT topic_id
|
||||
FROM ' . POSTS_TABLE . '
|
||||
@@ -1147,7 +1147,7 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
|
||||
}
|
||||
|
||||
// We actually remove topics now to not be inconsistent (the delete_topics function calls this function too)
|
||||
if (sizeof($remove_topics) && $call_delete_topics)
|
||||
if (count($remove_topics) && $call_delete_topics)
|
||||
{
|
||||
delete_topics('topic_id', $remove_topics, $auto_sync, $post_count_sync, false);
|
||||
}
|
||||
@@ -1157,7 +1157,7 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
|
||||
|
||||
$phpbb_notifications->delete_notifications($delete_notifications_types, $post_ids);
|
||||
|
||||
return sizeof($post_ids);
|
||||
return count($post_ids);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1232,7 +1232,7 @@ function delete_topic_shadows($forum_id, $sql_more = '', $auto_sync = true)
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
}
|
||||
while (sizeof($topic_ids) == $batch_size);
|
||||
while (count($topic_ids) == $batch_size);
|
||||
|
||||
if ($auto_sync)
|
||||
{
|
||||
@@ -1363,7 +1363,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
// Do not sync the "global forum"
|
||||
$where_ids = array_diff($where_ids, array(0));
|
||||
|
||||
if (!sizeof($where_ids))
|
||||
if (!count($where_ids))
|
||||
{
|
||||
// Empty array with IDs. This means that we don't have any work to do. Just return.
|
||||
return;
|
||||
@@ -1377,7 +1377,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!sizeof($where_ids))
|
||||
if (!count($where_ids))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -1416,7 +1416,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (!sizeof($topic_id_ary))
|
||||
if (!count($topic_id_ary))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -1533,7 +1533,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
$post_ids[] = $post_id;
|
||||
}
|
||||
|
||||
if (sizeof($post_ids))
|
||||
if (count($post_ids))
|
||||
{
|
||||
$sql = 'UPDATE ' . POSTS_TABLE . '
|
||||
SET post_reported = 1 - post_reported
|
||||
@@ -1579,7 +1579,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (sizeof($topic_ids))
|
||||
if (count($topic_ids))
|
||||
{
|
||||
$sql = 'UPDATE ' . TOPICS_TABLE . '
|
||||
SET topic_reported = 1 - topic_reported
|
||||
@@ -1638,7 +1638,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
$post_ids[] = $post_id;
|
||||
}
|
||||
|
||||
if (sizeof($post_ids))
|
||||
if (count($post_ids))
|
||||
{
|
||||
$sql = 'UPDATE ' . POSTS_TABLE . '
|
||||
SET post_attachment = 1 - post_attachment
|
||||
@@ -1684,7 +1684,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (sizeof($topic_ids))
|
||||
if (count($topic_ids))
|
||||
{
|
||||
$sql = 'UPDATE ' . TOPICS_TABLE . '
|
||||
SET topic_attachment = 1 - topic_attachment
|
||||
@@ -1736,7 +1736,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (!sizeof($forum_ids))
|
||||
if (!count($forum_ids))
|
||||
{
|
||||
break;
|
||||
}
|
||||
@@ -1775,7 +1775,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
// 3: Get post count for each forum (optional)
|
||||
if ($sync_extra)
|
||||
{
|
||||
if (sizeof($forum_ids) == 1)
|
||||
if (count($forum_ids) == 1)
|
||||
{
|
||||
$sql = 'SELECT SUM(t.topic_posts_approved) AS forum_posts_approved, SUM(t.topic_posts_unapproved) AS forum_posts_unapproved, SUM(t.topic_posts_softdeleted) AS forum_posts_softdeleted
|
||||
FROM ' . TOPICS_TABLE . ' t
|
||||
@@ -1795,7 +1795,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$forum_id = (sizeof($forum_ids) == 1) ? (int) $forum_ids[0] : (int) $row['forum_id'];
|
||||
$forum_id = (count($forum_ids) == 1) ? (int) $forum_ids[0] : (int) $row['forum_id'];
|
||||
|
||||
$forum_data[$forum_id]['posts_approved'] = (int) $row['forum_posts_approved'];
|
||||
$forum_data[$forum_id]['posts_unapproved'] = (int) $row['forum_posts_unapproved'];
|
||||
@@ -1805,7 +1805,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
}
|
||||
|
||||
// 4: Get last_post_id for each forum
|
||||
if (sizeof($forum_ids) == 1)
|
||||
if (count($forum_ids) == 1)
|
||||
{
|
||||
$sql = 'SELECT MAX(t.topic_last_post_id) as last_post_id
|
||||
FROM ' . TOPICS_TABLE . ' t
|
||||
@@ -1825,7 +1825,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$forum_id = (sizeof($forum_ids) == 1) ? (int) $forum_ids[0] : (int) $row['forum_id'];
|
||||
$forum_id = (count($forum_ids) == 1) ? (int) $forum_ids[0] : (int) $row['forum_id'];
|
||||
|
||||
$forum_data[$forum_id]['last_post_id'] = (int) $row['last_post_id'];
|
||||
|
||||
@@ -1834,7 +1834,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// 5: Retrieve last_post infos
|
||||
if (sizeof($post_ids))
|
||||
if (count($post_ids))
|
||||
{
|
||||
$sql = 'SELECT p.post_id, p.poster_id, p.post_subject, p.post_time, p.post_username, u.username, u.user_colour
|
||||
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
|
||||
@@ -1902,7 +1902,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
}
|
||||
}
|
||||
|
||||
if (sizeof($sql_ary))
|
||||
if (count($sql_ary))
|
||||
{
|
||||
$sql = 'UPDATE ' . FORUMS_TABLE . '
|
||||
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
|
||||
@@ -2025,20 +2025,20 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
}
|
||||
|
||||
// Now we delete empty topics and orphan posts
|
||||
if (sizeof($delete_posts))
|
||||
if (count($delete_posts))
|
||||
{
|
||||
delete_posts('topic_id', array_keys($delete_posts), false);
|
||||
unset($delete_posts);
|
||||
}
|
||||
|
||||
if (!sizeof($topic_data))
|
||||
if (!count($topic_data))
|
||||
{
|
||||
// If we get there, topic ids were invalid or topics did not contain any posts
|
||||
delete_topics($where_type, $where_ids, true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (sizeof($delete_topics))
|
||||
if (count($delete_topics))
|
||||
{
|
||||
$delete_topic_ids = array();
|
||||
foreach ($delete_topics as $topic_id => $void)
|
||||
@@ -2081,7 +2081,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// Make sure shadow topics do link to existing topics
|
||||
if (sizeof($moved_topics))
|
||||
if (count($moved_topics))
|
||||
{
|
||||
$delete_topics = array();
|
||||
|
||||
@@ -2098,7 +2098,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (sizeof($delete_topics))
|
||||
if (count($delete_topics))
|
||||
{
|
||||
delete_topics('topic_id', $delete_topics, false);
|
||||
}
|
||||
@@ -2121,7 +2121,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$sync_shadow_topics = array();
|
||||
if (sizeof($post_ids))
|
||||
if (count($post_ids))
|
||||
{
|
||||
$sql = 'SELECT p.post_id, p.topic_id, p.post_visibility, p.poster_id, p.post_subject, p.post_username, p.post_time, u.username, u.user_colour
|
||||
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
|
||||
@@ -2174,7 +2174,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
$shadow_topic_data = array();
|
||||
|
||||
// Update the information we collected
|
||||
if (sizeof($sync_shadow_topics))
|
||||
if (count($sync_shadow_topics))
|
||||
{
|
||||
foreach ($sync_shadow_topics as $sync_topic_id => $sql_ary)
|
||||
{
|
||||
@@ -2239,7 +2239,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
}
|
||||
}
|
||||
|
||||
if (sizeof($sql_ary))
|
||||
if (count($sql_ary))
|
||||
{
|
||||
$sql = 'UPDATE ' . TOPICS_TABLE . '
|
||||
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
|
||||
@@ -2256,7 +2256,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
// if some topics have been resync'ed then resync parent forums
|
||||
// except when we're only syncing a range, we don't want to sync forums during
|
||||
// batch processing.
|
||||
if ($resync_parents && sizeof($resync_forums) && $where_type != 'range')
|
||||
if ($resync_parents && count($resync_forums) && $where_type != 'range')
|
||||
{
|
||||
sync('forum', 'forum_id', array_values($resync_forums), true, true);
|
||||
}
|
||||
@@ -2278,7 +2278,7 @@ function prune($forum_id, $prune_mode, $prune_date, $prune_flags = 0, $auto_sync
|
||||
$forum_id = array($forum_id);
|
||||
}
|
||||
|
||||
if (!sizeof($forum_id))
|
||||
if (!count($forum_id))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -2369,6 +2369,16 @@ function prune($forum_id, $prune_mode, $prune_date, $prune_flags = 0, $auto_sync
|
||||
$topic_list = array_unique($topic_list);
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform additional actions before topic deletion via pruning
|
||||
*
|
||||
* @event core.prune_delete_before
|
||||
* @var int[] topic_list The IDs of the topics to be deleted
|
||||
* @since 3.2.2-RC1
|
||||
*/
|
||||
$vars = array('topic_list');
|
||||
extract($phpbb_dispatcher->trigger_event('core.prune_delete_before', compact($vars)));
|
||||
|
||||
return delete_topics('topic_id', $topic_list, $auto_sync, false);
|
||||
}
|
||||
|
||||
@@ -2441,7 +2451,7 @@ function phpbb_cache_moderators($db, $cache, $auth)
|
||||
$hold_ary = $auth->acl_user_raw_data(false, 'm_%', false);
|
||||
|
||||
// Add users?
|
||||
if (sizeof($hold_ary))
|
||||
if (!empty($hold_ary))
|
||||
{
|
||||
// At least one moderative option warrants a display
|
||||
$ug_id_ary = array_keys($hold_ary);
|
||||
@@ -2486,7 +2496,7 @@ function phpbb_cache_moderators($db, $cache, $auth)
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (sizeof($hold_ary))
|
||||
if (count($hold_ary))
|
||||
{
|
||||
// Get usernames...
|
||||
$sql = 'SELECT user_id, username
|
||||
@@ -2526,7 +2536,7 @@ function phpbb_cache_moderators($db, $cache, $auth)
|
||||
// Now to the groups...
|
||||
$hold_ary = $auth->acl_group_raw_data(false, 'm_%', false);
|
||||
|
||||
if (sizeof($hold_ary))
|
||||
if (!empty($hold_ary))
|
||||
{
|
||||
$ug_id_ary = array_keys($hold_ary);
|
||||
|
||||
@@ -2630,7 +2640,7 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id
|
||||
function phpbb_update_foes($db, $auth, $group_id = false, $user_id = false)
|
||||
{
|
||||
// update foes for some user
|
||||
if (is_array($user_id) && sizeof($user_id))
|
||||
if (is_array($user_id) && count($user_id))
|
||||
{
|
||||
$sql = 'DELETE FROM ' . ZEBRA_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('zebra_id', $user_id) . '
|
||||
@@ -2640,7 +2650,7 @@ function phpbb_update_foes($db, $auth, $group_id = false, $user_id = false)
|
||||
}
|
||||
|
||||
// update foes for some group
|
||||
if (is_array($group_id) && sizeof($group_id))
|
||||
if (is_array($group_id) && count($group_id))
|
||||
{
|
||||
// Grab group settings...
|
||||
$sql_ary = array(
|
||||
@@ -2674,7 +2684,7 @@ function phpbb_update_foes($db, $auth, $group_id = false, $user_id = false)
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (!sizeof($groups))
|
||||
if (!count($groups))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -2704,7 +2714,7 @@ function phpbb_update_foes($db, $auth, $group_id = false, $user_id = false)
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (sizeof($users))
|
||||
if (count($users))
|
||||
{
|
||||
$sql = 'DELETE FROM ' . ZEBRA_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('zebra_id', $users) . '
|
||||
@@ -2727,7 +2737,7 @@ function phpbb_update_foes($db, $auth, $group_id = false, $user_id = false)
|
||||
}
|
||||
}
|
||||
|
||||
if (sizeof($perms))
|
||||
if (count($perms))
|
||||
{
|
||||
$sql = 'DELETE FROM ' . ZEBRA_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('zebra_id', array_unique($perms)) . '
|
||||
@@ -2990,7 +3000,7 @@ function tidy_warnings()
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (sizeof($warning_list))
|
||||
if (count($warning_list))
|
||||
{
|
||||
$db->sql_transaction('begin');
|
||||
|
||||
|
@@ -488,7 +488,7 @@ function phpbb_realpath($path)
|
||||
* Determine which plural form we should use.
|
||||
* For some languages this is not as simple as for English.
|
||||
*
|
||||
* @param $rule int ID of the plural rule we want to use, see http://wiki.phpbb.com/Plural_Rules#Plural_Rules
|
||||
* @param $rule int ID of the plural rule we want to use, see https://area51.phpbb.com/docs/dev/32x/language/plurals.html
|
||||
* @param $number int|float The number we want to get the plural case for. Float numbers are floored.
|
||||
* @return int The plural-case we need to use for the number plural-rule combination
|
||||
*
|
||||
|
@@ -210,7 +210,7 @@ class compress_zip extends compress
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
function compress_zip($mode, $file)
|
||||
function __construct($mode, $file)
|
||||
{
|
||||
global $phpbb_filesystem;
|
||||
|
||||
@@ -409,7 +409,7 @@ class compress_zip extends compress
|
||||
function close()
|
||||
{
|
||||
// Write out central file directory and footer ... if it exists
|
||||
if (sizeof($this->ctrl_dir))
|
||||
if (count($this->ctrl_dir))
|
||||
{
|
||||
fwrite($this->fp, $this->file());
|
||||
}
|
||||
@@ -511,8 +511,8 @@ class compress_zip extends compress
|
||||
$ctrldir = implode('', $this->ctrl_dir);
|
||||
|
||||
return $ctrldir . $this->eof_cdh .
|
||||
pack('v', sizeof($this->ctrl_dir)) . // total # of entries "on this disk"
|
||||
pack('v', sizeof($this->ctrl_dir)) . // total # of entries overall
|
||||
pack('v', count($this->ctrl_dir)) . // total # of entries "on this disk"
|
||||
pack('v', count($this->ctrl_dir)) . // total # of entries overall
|
||||
pack('V', strlen($ctrldir)) . // size of central dir
|
||||
pack('V', $this->datasec_len) . // offset to start of central dir
|
||||
"\x00\x00"; // .zip file comment length
|
||||
@@ -569,7 +569,7 @@ class compress_tar extends compress
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
function compress_tar($mode, $file, $type = '')
|
||||
function __construct($mode, $file, $type = '')
|
||||
{
|
||||
global $phpbb_filesystem;
|
||||
|
||||
|
@@ -336,7 +336,7 @@ function get_context($text, $words, $length = 400)
|
||||
$text = str_replace($entities, $characters, $text);
|
||||
|
||||
$word_indizes = array();
|
||||
if (sizeof($words))
|
||||
if (count($words))
|
||||
{
|
||||
$match = '';
|
||||
// find the starting indizes of all words
|
||||
@@ -361,12 +361,12 @@ function get_context($text, $words, $length = 400)
|
||||
}
|
||||
unset($match);
|
||||
|
||||
if (sizeof($word_indizes))
|
||||
if (count($word_indizes))
|
||||
{
|
||||
$word_indizes = array_unique($word_indizes);
|
||||
sort($word_indizes);
|
||||
|
||||
$wordnum = sizeof($word_indizes);
|
||||
$wordnum = count($word_indizes);
|
||||
// number of characters on the right and left side of each word
|
||||
$sequence_length = (int) ($length / (2 * $wordnum)) - 2;
|
||||
$final_text = '';
|
||||
@@ -434,7 +434,7 @@ function get_context($text, $words, $length = 400)
|
||||
}
|
||||
}
|
||||
|
||||
if (!sizeof($words) || !sizeof($word_indizes))
|
||||
if (!count($words) || !count($word_indizes))
|
||||
{
|
||||
return str_replace($characters, $entities, ((utf8_strlen($text) >= $length + 3) ? utf8_substr($text, 0, $length) . '...' : $text));
|
||||
}
|
||||
@@ -557,6 +557,7 @@ function strip_bbcode(&$text, $uid = '')
|
||||
function generate_text_for_display($text, $uid, $bitfield, $flags, $censor_text = true)
|
||||
{
|
||||
static $bbcode;
|
||||
global $auth, $config, $user;
|
||||
global $phpbb_dispatcher, $phpbb_container;
|
||||
|
||||
if ($text === '')
|
||||
@@ -584,6 +585,13 @@ function generate_text_for_display($text, $uid, $bitfield, $flags, $censor_text
|
||||
|
||||
// Temporarily switch off viewcensors if applicable
|
||||
$old_censor = $renderer->get_viewcensors();
|
||||
|
||||
// Check here if the user is having viewing censors disabled (and also allowed to do so).
|
||||
if (!$user->optionget('viewcensors') && $config['allow_nocensors'] && $auth->acl_get('u_chgcensors'))
|
||||
{
|
||||
$censor_text = false;
|
||||
}
|
||||
|
||||
if ($old_censor !== $censor_text)
|
||||
{
|
||||
$renderer->set_viewcensors($censor_text);
|
||||
@@ -1013,7 +1021,7 @@ function censor_text($text)
|
||||
}
|
||||
}
|
||||
|
||||
if (sizeof($censors))
|
||||
if (count($censors))
|
||||
{
|
||||
return preg_replace($censors['match'], $censors['replace'], $text);
|
||||
}
|
||||
@@ -1071,7 +1079,7 @@ function smiley_text($text, $force_option = false)
|
||||
*/
|
||||
function parse_attachments($forum_id, &$message, &$attachments, &$update_count_ary, $preview = false)
|
||||
{
|
||||
if (!sizeof($attachments))
|
||||
if (!count($attachments))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -1106,7 +1114,7 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count_a
|
||||
}
|
||||
|
||||
// Grab attachments (security precaution)
|
||||
if (sizeof($attach_ids))
|
||||
if (count($attach_ids))
|
||||
{
|
||||
global $db;
|
||||
|
||||
@@ -1143,7 +1151,7 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count_a
|
||||
|
||||
foreach ($attachments as $attachment)
|
||||
{
|
||||
if (!sizeof($attachment))
|
||||
if (!count($attachment))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -1435,7 +1443,7 @@ function truncate_string($string, $max_length = 60, $max_store_length = 255, $al
|
||||
$chars = array_map('utf8_htmlspecialchars', $_chars);
|
||||
|
||||
// Now check the length ;)
|
||||
if (sizeof($chars) > $max_length)
|
||||
if (count($chars) > $max_length)
|
||||
{
|
||||
// Cut off the last elements from the array
|
||||
$string = implode('', array_slice($chars, 0, $max_length - utf8_strlen($append)));
|
||||
@@ -1643,7 +1651,7 @@ function phpbb_generate_string_list($items, $user)
|
||||
return '';
|
||||
}
|
||||
|
||||
$count = sizeof($items);
|
||||
$count = count($items);
|
||||
$last_item = array_pop($items);
|
||||
$lang_key = 'STRING_LIST_MULTI';
|
||||
|
||||
@@ -1664,7 +1672,7 @@ class bitfield
|
||||
{
|
||||
var $data;
|
||||
|
||||
function bitfield($bitfield = '')
|
||||
function __construct($bitfield = '')
|
||||
{
|
||||
$this->data = base64_decode($bitfield);
|
||||
}
|
||||
@@ -1750,3 +1758,47 @@ class bitfield
|
||||
$this->data = $this->data | $bitfield->get_blob();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Formats the quote according to the given BBCode status setting
|
||||
*
|
||||
* @param bool $bbcode_status The status of the BBCode setting
|
||||
* @param array $quote_attributes The attributes of the quoted post
|
||||
* @param phpbb\textformatter\utils $text_formatter_utils Text formatter utilities
|
||||
* @param parse_message $message_parser Message parser class
|
||||
* @param string $message_link Link of the original quoted post
|
||||
*/
|
||||
function phpbb_format_quote($bbcode_status, $quote_attributes, $text_formatter_utils, $message_parser, $message_link = '')
|
||||
{
|
||||
if ($bbcode_status)
|
||||
{
|
||||
$quote_text = $text_formatter_utils->generate_quote(
|
||||
censor_text($message_parser->message),
|
||||
$quote_attributes
|
||||
);
|
||||
|
||||
$message_parser->message = $quote_text . "\n\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
$offset = 0;
|
||||
$quote_string = "> ";
|
||||
$message = censor_text(trim($message_parser->message));
|
||||
// see if we are nesting. It's easily tricked but should work for one level of nesting
|
||||
if (strpos($message, ">") !== false)
|
||||
{
|
||||
$offset = 10;
|
||||
}
|
||||
$message = utf8_wordwrap($message, 75 + $offset, "\n");
|
||||
|
||||
$message = $quote_string . $message;
|
||||
$message = str_replace("\n", "\n" . $quote_string, $message);
|
||||
|
||||
$message_parser->message = $quote_attributes['author'] . " " . $user->lang['WROTE'] . ":\n" . $message . "\n";
|
||||
}
|
||||
|
||||
if ($message_link)
|
||||
{
|
||||
$message_parser->message = $message_link . $message_parser->message;
|
||||
}
|
||||
}
|
||||
|
@@ -192,7 +192,7 @@ function get_group_id($group_name)
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
if (!sizeof($group_mapping))
|
||||
if (!count($group_mapping))
|
||||
{
|
||||
add_default_groups();
|
||||
return get_group_id($group_name);
|
||||
@@ -249,7 +249,7 @@ function validate_website($url)
|
||||
{
|
||||
return '';
|
||||
}
|
||||
else if (!preg_match('#^[a-z0-9]+://#i', $url) && strlen($url) > 0)
|
||||
else if (!preg_match('#^http[s]?://#i', $url) && strlen($url) > 0)
|
||||
{
|
||||
return 'http://' . $url;
|
||||
}
|
||||
@@ -307,7 +307,7 @@ function decode_ip($int_ip)
|
||||
$hexipbang = explode('.', chunk_split($int_ip, 2, '.'));
|
||||
|
||||
// Any mod changing the way ips are stored? Then we are not able to convert and enter the ip "as is" to not "destroy" anything...
|
||||
if (sizeof($hexipbang) < 4)
|
||||
if (count($hexipbang) < 4)
|
||||
{
|
||||
return $int_ip;
|
||||
}
|
||||
@@ -479,7 +479,7 @@ function import_avatar_gallery($gallery_name = '', $subdirs_as_galleries = false
|
||||
$dir->close();
|
||||
}
|
||||
|
||||
for ($i = 0, $end = sizeof($dirlist); $i < $end; ++$i)
|
||||
for ($i = 0, $end = count($dirlist); $i < $end; ++$i)
|
||||
{
|
||||
$dir = $dirlist[$i];
|
||||
|
||||
@@ -1261,7 +1261,7 @@ function get_config()
|
||||
}
|
||||
}
|
||||
|
||||
if (!sizeof($convert_config))
|
||||
if (!count($convert_config))
|
||||
{
|
||||
$convert->p_master->error($user->lang['CONV_ERROR_CONFIG_EMPTY'], __LINE__, __FILE__);
|
||||
}
|
||||
@@ -1406,9 +1406,9 @@ function get_path($src_path, $src_url, $test_file)
|
||||
$url_parts = explode('/', $m[2]);
|
||||
if (substr($src_url, -1) != '/')
|
||||
{
|
||||
if (preg_match('/.*\.([a-z0-9]{3,4})$/i', $url_parts[sizeof($url_parts) - 1]))
|
||||
if (preg_match('/.*\.([a-z0-9]{3,4})$/i', $url_parts[count($url_parts) - 1]))
|
||||
{
|
||||
$url_parts[sizeof($url_parts) - 1] = '';
|
||||
$url_parts[count($url_parts) - 1] = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1425,9 +1425,9 @@ function get_path($src_path, $src_url, $test_file)
|
||||
$path_array = array();
|
||||
|
||||
$phpbb_parts = explode('/', $script_path);
|
||||
for ($i = 0, $end = sizeof($url_parts); $i < $end; ++$i)
|
||||
for ($i = 0, $end = count($url_parts); $i < $end; ++$i)
|
||||
{
|
||||
if ($i < sizeof($phpbb_parts[$i]) && $url_parts[$i] == $phpbb_parts[$i])
|
||||
if ($i < count($phpbb_parts[$i]) && $url_parts[$i] == $phpbb_parts[$i])
|
||||
{
|
||||
$path_array[] = $url_parts[$i];
|
||||
unset($url_parts[$i]);
|
||||
@@ -1435,7 +1435,7 @@ function get_path($src_path, $src_url, $test_file)
|
||||
else
|
||||
{
|
||||
$path = '';
|
||||
for ($j = $i, $end2 = sizeof($phpbb_parts); $j < $end2; ++$j)
|
||||
for ($j = $i, $end2 = count($phpbb_parts); $j < $end2; ++$j)
|
||||
{
|
||||
$path .= '../';
|
||||
}
|
||||
@@ -1458,7 +1458,7 @@ function get_path($src_path, $src_url, $test_file)
|
||||
|
||||
function compare_table($tables, $tablename, &$prefixes)
|
||||
{
|
||||
for ($i = 0, $table_size = sizeof($tables); $i < $table_size; ++$i)
|
||||
for ($i = 0, $table_size = count($tables); $i < $table_size; ++$i)
|
||||
{
|
||||
if (preg_match('/(.*)' . $tables[$i] . '$/', $tablename, $m))
|
||||
{
|
||||
@@ -1754,7 +1754,7 @@ function add_default_groups()
|
||||
);
|
||||
}
|
||||
|
||||
if (sizeof($sql_ary))
|
||||
if (count($sql_ary))
|
||||
{
|
||||
$db->sql_multi_insert(GROUPS_TABLE, $sql_ary);
|
||||
}
|
||||
@@ -1786,7 +1786,7 @@ function add_groups_to_teampage()
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (sizeof($teampage_ary))
|
||||
if (count($teampage_ary))
|
||||
{
|
||||
$db->sql_multi_insert(TEAMPAGE_TABLE, $teampage_ary);
|
||||
}
|
||||
@@ -2101,7 +2101,7 @@ function update_topics_posted()
|
||||
}
|
||||
unset($posted);
|
||||
|
||||
if (sizeof($sql_ary))
|
||||
if (count($sql_ary))
|
||||
{
|
||||
$db->sql_multi_insert(TOPICS_POSTED_TABLE, $sql_ary);
|
||||
}
|
||||
@@ -2136,7 +2136,7 @@ function fix_empty_primary_groups()
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (sizeof($user_ids))
|
||||
if (count($user_ids))
|
||||
{
|
||||
$db->sql_query('UPDATE ' . USERS_TABLE . ' SET group_id = ' . get_group_id('administrators') . '
|
||||
WHERE group_id = 0 AND ' . $db->sql_in_set('user_id', $user_ids));
|
||||
@@ -2152,7 +2152,7 @@ function fix_empty_primary_groups()
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (sizeof($user_ids))
|
||||
if (count($user_ids))
|
||||
{
|
||||
$db->sql_query('UPDATE ' . USERS_TABLE . ' SET group_id = ' . get_group_id('global_moderators') . '
|
||||
WHERE group_id = 0 AND ' . $db->sql_in_set('user_id', $user_ids));
|
||||
@@ -2264,7 +2264,7 @@ function convert_bbcode($message, $convert_size = true, $extended_bbcodes = fals
|
||||
"\n\n"
|
||||
);
|
||||
|
||||
for ($i = 0, $end = sizeof($str_from); $i < $end; ++$i)
|
||||
for ($i = 0, $end = count($str_from); $i < $end; ++$i)
|
||||
{
|
||||
$origx[] = '#\\' . str_replace(']', '\\]', $str_from[$i]) . '#is';
|
||||
$replx[] = $str_to[$i];
|
||||
@@ -2273,7 +2273,7 @@ function convert_bbcode($message, $convert_size = true, $extended_bbcodes = fals
|
||||
|
||||
if (preg_match_all('#\[email=([^\]]+)\](.*?)\[/email\]#i', $message, $m))
|
||||
{
|
||||
for ($i = 0, $end = sizeof($m[1]); $i < $end; ++$i)
|
||||
for ($i = 0, $end = count($m[1]); $i < $end; ++$i)
|
||||
{
|
||||
if ($m[1][$i] == $m[2][$i])
|
||||
{
|
||||
@@ -2292,7 +2292,7 @@ function convert_bbcode($message, $convert_size = true, $extended_bbcodes = fals
|
||||
$message = preg_replace('#\[size=([0-9]+)\](.*?)\[/size\]#i', '[size=\1]\2[/size]', $message);
|
||||
$message = preg_replace('#\[size=[0-9]{2,}\](.*?)\[/size\]#i', '[size=29]\1[/size]', $message);
|
||||
|
||||
for ($i = sizeof($size); $i;)
|
||||
for ($i = count($size); $i;)
|
||||
{
|
||||
$i--;
|
||||
$message = str_replace('[size=' . $i . ']', '[size=' . $size[$i] . ']', $message);
|
||||
@@ -2335,9 +2335,9 @@ function copy_file($src, $trg, $overwrite = false, $die_on_failure = true, $sour
|
||||
|
||||
$path = $phpbb_root_path;
|
||||
$parts = explode('/', $trg);
|
||||
unset($parts[sizeof($parts) - 1]);
|
||||
unset($parts[count($parts) - 1]);
|
||||
|
||||
for ($i = 0, $end = sizeof($parts); $i < $end; ++$i)
|
||||
for ($i = 0, $end = count($parts); $i < $end; ++$i)
|
||||
{
|
||||
$path .= $parts[$i] . '/';
|
||||
|
||||
@@ -2437,7 +2437,7 @@ function copy_dir($src, $trg, $copy_subdirs = true, $overwrite = false, $die_on_
|
||||
|
||||
if ($copy_subdirs)
|
||||
{
|
||||
for ($i = 0, $end = sizeof($dirlist); $i < $end; ++$i)
|
||||
for ($i = 0, $end = count($dirlist); $i < $end; ++$i)
|
||||
{
|
||||
$dir = $dirlist[$i];
|
||||
|
||||
@@ -2458,21 +2458,21 @@ function copy_dir($src, $trg, $copy_subdirs = true, $overwrite = false, $die_on_
|
||||
$bad_dirs[] = $trg_path . $dir;
|
||||
}
|
||||
|
||||
if (!sizeof($bad_dirs))
|
||||
if (!count($bad_dirs))
|
||||
{
|
||||
copy_dir($src . $dir, $trg . $dir, true, $overwrite, $die_on_failure, $source_relative_path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (sizeof($bad_dirs))
|
||||
if (count($bad_dirs))
|
||||
{
|
||||
$str = (sizeof($bad_dirs) == 1) ? $user->lang['MAKE_FOLDER_WRITABLE'] : $user->lang['MAKE_FOLDERS_WRITABLE'];
|
||||
$str = (count($bad_dirs) == 1) ? $user->lang['MAKE_FOLDER_WRITABLE'] : $user->lang['MAKE_FOLDERS_WRITABLE'];
|
||||
sort($bad_dirs);
|
||||
$convert->p_master->error(sprintf($str, implode('<br />', $bad_dirs)), __LINE__, __FILE__);
|
||||
}
|
||||
|
||||
for ($i = 0, $end = sizeof($filelist); $i < $end; ++$i)
|
||||
for ($i = 0, $end = count($filelist); $i < $end; ++$i)
|
||||
{
|
||||
copy_file($src . $filelist[$i], $trg . $filelist[$i], $overwrite, $die_on_failure, $source_relative_path);
|
||||
}
|
||||
|
@@ -506,7 +506,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||
}
|
||||
}
|
||||
|
||||
$l_subforums = (sizeof($subforums[$forum_id]) == 1) ? $user->lang['SUBFORUM'] : $user->lang['SUBFORUMS'];
|
||||
$l_subforums = (count($subforums[$forum_id]) == 1) ? $user->lang['SUBFORUM'] : $user->lang['SUBFORUMS'];
|
||||
$folder_image = ($forum_unread) ? 'forum_unread_subforum' : 'forum_read_subforum';
|
||||
}
|
||||
else
|
||||
@@ -537,7 +537,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||
// Create last post link information, if appropriate
|
||||
if ($row['forum_last_post_id'])
|
||||
{
|
||||
if ($row['forum_password_last_post'] === '' && $auth->acl_get('f_read', $row['forum_id_last_post']))
|
||||
if ($row['forum_password_last_post'] === '' && $auth->acl_gets('f_read', 'f_list_topics', $row['forum_id_last_post']))
|
||||
{
|
||||
$last_post_subject = censor_text($row['forum_last_post_subject']);
|
||||
$last_post_subject_truncated = truncate_string($last_post_subject, 30, 255, false, $user->lang['ELLIPSIS']);
|
||||
@@ -558,7 +558,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||
$l_moderator = $moderators_list = '';
|
||||
if ($display_moderators && !empty($forum_moderators[$forum_id]))
|
||||
{
|
||||
$l_moderator = (sizeof($forum_moderators[$forum_id]) == 1) ? $user->lang['MODERATOR'] : $user->lang['MODERATORS'];
|
||||
$l_moderator = (count($forum_moderators[$forum_id]) == 1) ? $user->lang['MODERATOR'] : $user->lang['MODERATORS'];
|
||||
$moderators_list = implode($user->lang['COMMA_SEPARATOR'], $forum_moderators[$forum_id]);
|
||||
}
|
||||
|
||||
@@ -605,7 +605,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||
'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,
|
||||
'S_SUBFORUMS' => (count($subforums_list)) ? true : false,
|
||||
'S_DISPLAY_SUBJECT' => ($last_post_subject !== '' && $config['display_last_subject']) ? true : false,
|
||||
'S_FEED_ENABLED' => ($config['feed_forum'] && !phpbb_optionget(FORUM_OPTION_FEED_EXCLUDE, $row['forum_options']) && $row['forum_type'] == FORUM_POST) ? true : false,
|
||||
|
||||
@@ -1646,10 +1646,10 @@ function phpbb_show_profile($data, $user_notes_enabled = false, $warn_user_enabl
|
||||
($data['user_type'] != USER_INACTIVE || $data['user_inactive_reason'] != INACTIVE_MANUAL) &&
|
||||
|
||||
// They must be able to read PMs
|
||||
sizeof($auth->acl_get_list($user_id, 'u_readpm')) &&
|
||||
count($auth->acl_get_list($user_id, 'u_readpm')) &&
|
||||
|
||||
// They must not be permanently banned
|
||||
!sizeof(phpbb_get_banned_user_ids($user_id, false)) &&
|
||||
!count(phpbb_get_banned_user_ids($user_id, false)) &&
|
||||
|
||||
// They must allow users to contact via PM
|
||||
(($auth->acl_gets('a_', 'm_') || $auth->acl_getf_global('m_')) || $data['user_allow_pm'])
|
||||
|
@@ -568,7 +568,7 @@ function phpbb_parse_range_request($request_array, $filesize)
|
||||
$range = explode('-', trim($range_string));
|
||||
|
||||
// "-" is invalid, "0-0" however is valid and means the very first byte.
|
||||
if (sizeof($range) != 2 || $range[0] === '' && $range[1] === '')
|
||||
if (count($range) != 2 || $range[0] === '' && $range[1] === '')
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -662,6 +662,8 @@ function phpbb_increment_downloads($db, $ids)
|
||||
*/
|
||||
function phpbb_download_handle_forum_auth($db, $auth, $topic_id)
|
||||
{
|
||||
global $phpbb_container;
|
||||
|
||||
$sql_array = array(
|
||||
'SELECT' => 't.topic_visibility, t.forum_id, f.forum_name, f.forum_password, f.parent_id',
|
||||
'FROM' => array(
|
||||
@@ -677,7 +679,9 @@ function phpbb_download_handle_forum_auth($db, $auth, $topic_id)
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if ($row && $row['topic_visibility'] != ITEM_APPROVED && !$auth->acl_get('m_approve', $row['forum_id']))
|
||||
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
|
||||
|
||||
if ($row && !$phpbb_content_visibility->is_visible('topic', $row['forum_id'], $row))
|
||||
{
|
||||
send_status_line(404, 'Not Found');
|
||||
trigger_error('ERROR_NO_ATTACHMENT');
|
||||
|
@@ -207,7 +207,7 @@ class jabber
|
||||
*/
|
||||
function login()
|
||||
{
|
||||
if (!sizeof($this->features))
|
||||
if (!count($this->features))
|
||||
{
|
||||
$this->add_to_log('Error: No feature information from server available.');
|
||||
return false;
|
||||
@@ -293,7 +293,7 @@ class jabber
|
||||
*/
|
||||
function get_log()
|
||||
{
|
||||
if ($this->enable_logging && sizeof($this->log_array))
|
||||
if ($this->enable_logging && count($this->log_array))
|
||||
{
|
||||
return implode("<br /><br />", $this->log_array);
|
||||
}
|
||||
@@ -400,14 +400,14 @@ class jabber
|
||||
*/
|
||||
function response($xml)
|
||||
{
|
||||
if (!is_array($xml) || !sizeof($xml))
|
||||
if (!is_array($xml) || !count($xml))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// did we get multiple elements? do one after another
|
||||
// array('message' => ..., 'presence' => ...)
|
||||
if (sizeof($xml) > 1)
|
||||
if (count($xml) > 1)
|
||||
{
|
||||
foreach ($xml as $key => $value)
|
||||
{
|
||||
@@ -419,7 +419,7 @@ class jabber
|
||||
{
|
||||
// or even multiple elements of the same type?
|
||||
// array('message' => array(0 => ..., 1 => ...))
|
||||
if (sizeof(reset($xml)) > 1)
|
||||
if (count(reset($xml)) > 1)
|
||||
{
|
||||
foreach (reset($xml) as $value)
|
||||
{
|
||||
@@ -858,14 +858,14 @@ class jabber
|
||||
array_push($children, $vals[$i]['value']);
|
||||
}
|
||||
|
||||
while (++$i < sizeof($vals))
|
||||
while (++$i < count($vals))
|
||||
{
|
||||
switch ($vals[$i]['type'])
|
||||
{
|
||||
case 'open':
|
||||
|
||||
$tagname = (isset($vals[$i]['tag'])) ? $vals[$i]['tag'] : '';
|
||||
$size = (isset($children[$tagname])) ? sizeof($children[$tagname]) : 0;
|
||||
$size = (isset($children[$tagname])) ? count($children[$tagname]) : 0;
|
||||
|
||||
if (isset($vals[$i]['attributes']))
|
||||
{
|
||||
@@ -883,7 +883,7 @@ class jabber
|
||||
case 'complete':
|
||||
|
||||
$tagname = $vals[$i]['tag'];
|
||||
$size = (isset($children[$tagname])) ? sizeof($children[$tagname]) : 0;
|
||||
$size = (isset($children[$tagname])) ? count($children[$tagname]) : 0;
|
||||
$children[$tagname][$size]['#'] = (isset($vals[$i]['value'])) ? $vals[$i]['value'] : array();
|
||||
|
||||
if (isset($vals[$i]['attributes']))
|
||||
|
@@ -113,7 +113,7 @@ function phpbb_get_topic_data($topic_ids, $acl_list = false, $read_tracking = fa
|
||||
|
||||
$topics = array();
|
||||
|
||||
if (!sizeof($topic_ids))
|
||||
if (!count($topic_ids))
|
||||
{
|
||||
return array();
|
||||
}
|
||||
@@ -130,7 +130,7 @@ function phpbb_get_topic_data($topic_ids, $acl_list = false, $read_tracking = fa
|
||||
$cache_topic_ids = array();
|
||||
}
|
||||
|
||||
if (sizeof($topic_ids))
|
||||
if (count($topic_ids))
|
||||
{
|
||||
$sql_array = array(
|
||||
'SELECT' => 't.*, f.*',
|
||||
@@ -197,11 +197,11 @@ function phpbb_get_topic_data($topic_ids, $acl_list = false, $read_tracking = fa
|
||||
*/
|
||||
function phpbb_get_post_data($post_ids, $acl_list = false, $read_tracking = false)
|
||||
{
|
||||
global $db, $auth, $config, $user;
|
||||
global $db, $auth, $config, $user, $phpbb_container;
|
||||
|
||||
$rowset = array();
|
||||
|
||||
if (!sizeof($post_ids))
|
||||
if (!count($post_ids))
|
||||
{
|
||||
return array();
|
||||
}
|
||||
@@ -246,6 +246,8 @@ function phpbb_get_post_data($post_ids, $acl_list = false, $read_tracking = fals
|
||||
$result = $db->sql_query($sql);
|
||||
unset($sql_array);
|
||||
|
||||
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
if ($acl_list && !$auth->acl_gets($acl_list, $row['forum_id']))
|
||||
@@ -253,7 +255,7 @@ function phpbb_get_post_data($post_ids, $acl_list = false, $read_tracking = fals
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($row['post_visibility'] != ITEM_APPROVED && !$auth->acl_get('m_approve', $row['forum_id']))
|
||||
if (!$phpbb_content_visibility->is_visible('post', $row['forum_id'], $row))
|
||||
{
|
||||
// Moderators without the permission to approve post should at least not see them. ;)
|
||||
continue;
|
||||
@@ -280,7 +282,7 @@ function phpbb_get_forum_data($forum_id, $acl_list = 'f_list', $read_tracking =
|
||||
$forum_id = array($forum_id);
|
||||
}
|
||||
|
||||
if (!sizeof($forum_id))
|
||||
if (!count($forum_id))
|
||||
{
|
||||
return array();
|
||||
}
|
||||
@@ -329,7 +331,7 @@ function phpbb_get_pm_data($pm_ids)
|
||||
|
||||
$rowset = array();
|
||||
|
||||
if (!sizeof($pm_ids))
|
||||
if (!count($pm_ids))
|
||||
{
|
||||
return array();
|
||||
}
|
||||
@@ -730,7 +732,7 @@ function phpbb_check_ids(&$ids, $table, $sql_id, $acl_list = false, $single_foru
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (!sizeof($ids))
|
||||
if (!count($ids))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@@ -24,8 +24,9 @@ if (!defined('IN_PHPBB'))
|
||||
*/
|
||||
class messenger
|
||||
{
|
||||
var $msg, $extra_headers, $replyto, $from, $subject;
|
||||
var $msg, $replyto, $from, $subject;
|
||||
var $addresses = array();
|
||||
var $extra_headers = array();
|
||||
|
||||
var $mail_priority = MAIL_NORMAL_PRIORITY;
|
||||
var $use_queue = true;
|
||||
@@ -36,7 +37,7 @@ class messenger
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
function messenger($use_queue = true)
|
||||
function __construct($use_queue = true)
|
||||
{
|
||||
global $config;
|
||||
|
||||
@@ -84,7 +85,7 @@ class messenger
|
||||
return;
|
||||
}
|
||||
|
||||
$pos = isset($this->addresses['to']) ? sizeof($this->addresses['to']) : 0;
|
||||
$pos = isset($this->addresses['to']) ? count($this->addresses['to']) : 0;
|
||||
|
||||
$this->addresses['to'][$pos]['email'] = trim($address);
|
||||
|
||||
@@ -109,7 +110,7 @@ class messenger
|
||||
return;
|
||||
}
|
||||
|
||||
$pos = isset($this->addresses['cc']) ? sizeof($this->addresses['cc']) : 0;
|
||||
$pos = isset($this->addresses['cc']) ? count($this->addresses['cc']) : 0;
|
||||
$this->addresses['cc'][$pos]['email'] = trim($address);
|
||||
$this->addresses['cc'][$pos]['name'] = trim($realname);
|
||||
}
|
||||
@@ -124,7 +125,7 @@ class messenger
|
||||
return;
|
||||
}
|
||||
|
||||
$pos = isset($this->addresses['bcc']) ? sizeof($this->addresses['bcc']) : 0;
|
||||
$pos = isset($this->addresses['bcc']) ? count($this->addresses['bcc']) : 0;
|
||||
$this->addresses['bcc'][$pos]['email'] = trim($address);
|
||||
$this->addresses['bcc'][$pos]['name'] = trim($realname);
|
||||
}
|
||||
@@ -140,7 +141,7 @@ class messenger
|
||||
return;
|
||||
}
|
||||
|
||||
$pos = isset($this->addresses['im']) ? sizeof($this->addresses['im']) : 0;
|
||||
$pos = isset($this->addresses['im']) ? count($this->addresses['im']) : 0;
|
||||
$this->addresses['im'][$pos]['uid'] = trim($address);
|
||||
$this->addresses['im'][$pos]['name'] = trim($realname);
|
||||
}
|
||||
@@ -325,9 +326,26 @@ class messenger
|
||||
));
|
||||
|
||||
$subject = $this->subject;
|
||||
$message = $this->msg;
|
||||
$template = $this->template;
|
||||
/**
|
||||
* Event to modify notification message text before parsing
|
||||
* Event to modify the template before parsing
|
||||
*
|
||||
* @event core.modify_notification_template
|
||||
* @var int method User notification method NOTIFY_EMAIL|NOTIFY_IM|NOTIFY_BOTH
|
||||
* @var bool break Flag indicating if the function only formats the subject
|
||||
* and the message without sending it
|
||||
* @var string subject The message subject
|
||||
* @var \phpbb\template\template template The (readonly) template object
|
||||
* @since 3.2.4-RC1
|
||||
*/
|
||||
$vars = array('method', 'break', 'subject', 'template');
|
||||
extract($phpbb_dispatcher->trigger_event('core.modify_notification_template', compact($vars)));
|
||||
|
||||
// Parse message through template
|
||||
$message = trim($this->template->assign_display('body'));
|
||||
|
||||
/**
|
||||
* Event to modify notification message text after parsing
|
||||
*
|
||||
* @event core.modify_notification_message
|
||||
* @var int method User notification method NOTIFY_EMAIL|NOTIFY_IM|NOTIFY_BOTH
|
||||
@@ -337,19 +355,12 @@ class messenger
|
||||
* @var string message The message text
|
||||
* @since 3.1.11-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'method',
|
||||
'break',
|
||||
'subject',
|
||||
'message',
|
||||
);
|
||||
$vars = array('method', 'break', 'subject', 'message');
|
||||
extract($phpbb_dispatcher->trigger_event('core.modify_notification_message', compact($vars)));
|
||||
|
||||
$this->subject = $subject;
|
||||
$this->msg = $message;
|
||||
unset($subject, $message);
|
||||
|
||||
// Parse message through template
|
||||
$this->msg = trim($this->template->assign_display('body'));
|
||||
unset($subject, $message, $template);
|
||||
|
||||
// Because we use \n for newlines in the body message we need to fix line encoding errors for those admins who uploaded email template files in the wrong encoding
|
||||
$this->msg = str_replace("\r\n", "\n", $this->msg);
|
||||
@@ -368,6 +379,12 @@ class messenger
|
||||
$this->subject = (($this->subject != '') ? $this->subject : $user->lang['NO_EMAIL_SUBJECT']);
|
||||
}
|
||||
|
||||
if (preg_match('#^(List-Unsubscribe:(.*?))$#m', $this->msg, $match))
|
||||
{
|
||||
$this->extra_headers[] = $match[1];
|
||||
$drop_header .= '[\r\n]*?' . preg_quote($match[1], '#');
|
||||
}
|
||||
|
||||
if ($drop_header)
|
||||
{
|
||||
$this->msg = trim(preg_replace('#' . $drop_header . '#s', '', $this->msg));
|
||||
@@ -416,7 +433,7 @@ class messenger
|
||||
switch ($type)
|
||||
{
|
||||
case 'EMAIL':
|
||||
$message = '<strong>EMAIL/' . (($config['smtp_delivery']) ? 'SMTP' : 'PHP/' . $config['email_function_name'] . '()') . '</strong>';
|
||||
$message = '<strong>EMAIL/' . (($config['smtp_delivery']) ? 'SMTP' : 'PHP/mail()') . '</strong>';
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -503,7 +520,7 @@ class messenger
|
||||
$vars = array('headers');
|
||||
extract($phpbb_dispatcher->trigger_event('core.modify_email_headers', compact($vars)));
|
||||
|
||||
if (sizeof($this->extra_headers))
|
||||
if (count($this->extra_headers))
|
||||
{
|
||||
$headers = array_merge($headers, $this->extra_headers);
|
||||
}
|
||||
@@ -516,7 +533,7 @@ class messenger
|
||||
*/
|
||||
function msg_email()
|
||||
{
|
||||
global $config;
|
||||
global $config, $phpbb_dispatcher;
|
||||
|
||||
if (empty($config['email_enable']))
|
||||
{
|
||||
@@ -544,6 +561,33 @@ class messenger
|
||||
$contact_name = htmlspecialchars_decode($config['board_contact_name']);
|
||||
$board_contact = (($contact_name !== '') ? '"' . mail_encode($contact_name) . '" ' : '') . '<' . $config['board_contact'] . '>';
|
||||
|
||||
$break = false;
|
||||
$addresses = $this->addresses;
|
||||
$subject = $this->subject;
|
||||
$msg = $this->msg;
|
||||
/**
|
||||
* Event to send message via external transport
|
||||
*
|
||||
* @event core.notification_message_email
|
||||
* @var bool break Flag indicating if the function return after hook
|
||||
* @var array addresses The message recipients
|
||||
* @var string subject The message subject
|
||||
* @var string msg The message text
|
||||
* @since 3.2.4-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'break',
|
||||
'addresses',
|
||||
'subject',
|
||||
'msg',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.notification_message_email', compact($vars)));
|
||||
|
||||
if ($break)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (empty($this->replyto))
|
||||
{
|
||||
$this->replyto = $board_contact;
|
||||
@@ -749,7 +793,7 @@ class queue
|
||||
/**
|
||||
* constructor
|
||||
*/
|
||||
function queue()
|
||||
function __construct()
|
||||
{
|
||||
global $phpEx, $phpbb_root_path, $phpbb_filesystem, $phpbb_container;
|
||||
|
||||
@@ -782,7 +826,7 @@ class queue
|
||||
*/
|
||||
function process()
|
||||
{
|
||||
global $config, $phpEx, $phpbb_root_path, $user;
|
||||
global $config, $phpEx, $phpbb_root_path, $user, $phpbb_dispatcher;
|
||||
|
||||
$lock = new \phpbb\lock\flock($this->cache_file);
|
||||
$lock->acquire();
|
||||
@@ -814,7 +858,7 @@ class queue
|
||||
}
|
||||
|
||||
$package_size = $data_ary['package_size'];
|
||||
$num_items = (!$package_size || sizeof($data_ary['data']) < $package_size) ? sizeof($data_ary['data']) : $package_size;
|
||||
$num_items = (!$package_size || count($data_ary['data']) < $package_size) ? count($data_ary['data']) : $package_size;
|
||||
|
||||
/*
|
||||
* This code is commented out because it causes problems on some web hosts.
|
||||
@@ -823,9 +867,9 @@ class queue
|
||||
* web host and the package size setting is wrong.
|
||||
|
||||
// If the amount of emails to be sent is way more than package_size than we need to increase it to prevent backlogs...
|
||||
if (sizeof($data_ary['data']) > $package_size * 2.5)
|
||||
if (count($data_ary['data']) > $package_size * 2.5)
|
||||
{
|
||||
$num_items = sizeof($data_ary['data']);
|
||||
$num_items = count($data_ary['data']);
|
||||
}
|
||||
*/
|
||||
|
||||
@@ -879,23 +923,45 @@ class queue
|
||||
switch ($object)
|
||||
{
|
||||
case 'email':
|
||||
$err_msg = '';
|
||||
$to = (!$to) ? 'undisclosed-recipients:;' : $to;
|
||||
$break = false;
|
||||
/**
|
||||
* Event to send message via external transport
|
||||
*
|
||||
* @event core.notification_message_process
|
||||
* @var bool break Flag indicating if the function return after hook
|
||||
* @var array addresses The message recipients
|
||||
* @var string subject The message subject
|
||||
* @var string msg The message text
|
||||
* @since 3.2.4-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'break',
|
||||
'addresses',
|
||||
'subject',
|
||||
'msg',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.notification_message_process', compact($vars)));
|
||||
|
||||
if ($config['smtp_delivery'])
|
||||
if (!$break)
|
||||
{
|
||||
$result = smtpmail($addresses, mail_encode($subject), wordwrap(utf8_wordwrap($msg), 997, "\n", true), $err_msg, $headers);
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = phpbb_mail($to, $subject, $msg, $headers, PHP_EOL, $err_msg);
|
||||
}
|
||||
$err_msg = '';
|
||||
$to = (!$to) ? 'undisclosed-recipients:;' : $to;
|
||||
|
||||
if (!$result)
|
||||
{
|
||||
$messenger = new messenger();
|
||||
$messenger->error('EMAIL', $err_msg);
|
||||
continue 2;
|
||||
if ($config['smtp_delivery'])
|
||||
{
|
||||
$result = smtpmail($addresses, mail_encode($subject), wordwrap(utf8_wordwrap($msg), 997, "\n", true), $err_msg, $headers);
|
||||
}
|
||||
else
|
||||
{
|
||||
$result = phpbb_mail($to, $subject, $msg, $headers, PHP_EOL, $err_msg);
|
||||
}
|
||||
|
||||
if (!$result)
|
||||
{
|
||||
$messenger = new messenger();
|
||||
$messenger->error('EMAIL', $err_msg);
|
||||
continue 2;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -914,7 +980,7 @@ class queue
|
||||
}
|
||||
|
||||
// No more data for this object? Unset it
|
||||
if (!sizeof($this->queue_data[$object]['data']))
|
||||
if (!count($this->queue_data[$object]['data']))
|
||||
{
|
||||
unset($this->queue_data[$object]);
|
||||
}
|
||||
@@ -930,7 +996,7 @@ class queue
|
||||
}
|
||||
}
|
||||
|
||||
if (!sizeof($this->queue_data))
|
||||
if (!count($this->queue_data))
|
||||
{
|
||||
@unlink($this->cache_file);
|
||||
}
|
||||
@@ -965,7 +1031,7 @@ class queue
|
||||
*/
|
||||
function save()
|
||||
{
|
||||
if (!sizeof($this->data))
|
||||
if (!count($this->data))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -979,7 +1045,7 @@ class queue
|
||||
|
||||
foreach ($this->queue_data as $object => $data_ary)
|
||||
{
|
||||
if (isset($this->data[$object]) && sizeof($this->data[$object]))
|
||||
if (isset($this->data[$object]) && count($this->data[$object]))
|
||||
{
|
||||
$this->data[$object]['data'] = array_merge($data_ary['data'], $this->data[$object]['data']);
|
||||
}
|
||||
@@ -1067,7 +1133,7 @@ function smtpmail($addresses, $subject, $message, &$err_msg, $headers = false)
|
||||
$mail_rcpt = $mail_to = $mail_cc = array();
|
||||
|
||||
// Build correct addresses for RCPT TO command and the client side display (TO, CC)
|
||||
if (isset($addresses['to']) && sizeof($addresses['to']))
|
||||
if (isset($addresses['to']) && count($addresses['to']))
|
||||
{
|
||||
foreach ($addresses['to'] as $which_ary)
|
||||
{
|
||||
@@ -1076,7 +1142,7 @@ function smtpmail($addresses, $subject, $message, &$err_msg, $headers = false)
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($addresses['bcc']) && sizeof($addresses['bcc']))
|
||||
if (isset($addresses['bcc']) && count($addresses['bcc']))
|
||||
{
|
||||
foreach ($addresses['bcc'] as $which_ary)
|
||||
{
|
||||
@@ -1084,7 +1150,7 @@ function smtpmail($addresses, $subject, $message, &$err_msg, $headers = false)
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($addresses['cc']) && sizeof($addresses['cc']))
|
||||
if (isset($addresses['cc']) && count($addresses['cc']))
|
||||
{
|
||||
foreach ($addresses['cc'] as $which_ary)
|
||||
{
|
||||
@@ -1263,7 +1329,7 @@ class smtp_class
|
||||
var $backtrace = false;
|
||||
var $backtrace_log = array();
|
||||
|
||||
function smtp_class()
|
||||
function __construct()
|
||||
{
|
||||
// Always create a backtrace for admins to identify SMTP problems
|
||||
$this->backtrace = true;
|
||||
@@ -1802,11 +1868,11 @@ function mail_encode($str, $eol = "\r\n")
|
||||
$array = utf8_str_split($str);
|
||||
$str = '';
|
||||
|
||||
while (sizeof($array))
|
||||
while (count($array))
|
||||
{
|
||||
$text = '';
|
||||
|
||||
while (sizeof($array) && intval((strlen($text . $array[0]) + 2) / 3) << 2 <= $split_length)
|
||||
while (count($array) && intval((strlen($text . $array[0]) + 2) / 3) << 2 <= $split_length)
|
||||
{
|
||||
$text .= array_shift($array);
|
||||
}
|
||||
@@ -1839,7 +1905,8 @@ function phpbb_mail($to, $subject, $msg, $headers, $eol, &$err_msg)
|
||||
// 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);
|
||||
$additional_parameters = $config['email_force_sender'] ? '-f' . $config['board_email'] : '';
|
||||
$result = mail($to, mail_encode($subject, ''), wordwrap(utf8_wordwrap($msg), 997, "\n", true), $headers, $additional_parameters);
|
||||
|
||||
$collector->uninstall();
|
||||
$err_msg = $collector->format_errors();
|
||||
|
@@ -40,7 +40,7 @@ class p_master
|
||||
* Constuctor
|
||||
* Set module include path
|
||||
*/
|
||||
function p_master($include_path = false)
|
||||
function __construct($include_path = false)
|
||||
{
|
||||
global $phpbb_root_path;
|
||||
|
||||
@@ -243,7 +243,7 @@ class p_master
|
||||
}
|
||||
}
|
||||
|
||||
$depth = sizeof($this->module_cache['parents'][$row['module_id']]);
|
||||
$depth = count($this->module_cache['parents'][$row['module_id']]);
|
||||
|
||||
// We need to prefix the functions to not create a naming conflict
|
||||
|
||||
@@ -279,7 +279,7 @@ class p_master
|
||||
'parent' => (int) $row['parent_id'],
|
||||
'cat' => ($row['right_id'] > $row['left_id'] + 1) ? true : false,
|
||||
|
||||
'is_duplicate' => ($row['module_basename'] && sizeof($names[$row['module_basename'] . '_' . $row['module_mode']]) > 1) ? true : false,
|
||||
'is_duplicate' => ($row['module_basename'] && count($names[$row['module_basename'] . '_' . $row['module_mode']]) > 1) ? true : false,
|
||||
|
||||
'name' => (string) $row['module_basename'],
|
||||
'mode' => (string) $row['module_mode'],
|
||||
@@ -431,7 +431,7 @@ class p_master
|
||||
extract($phpbb_dispatcher->trigger_event('core.module_auth', compact($vars)));
|
||||
|
||||
$tokens = $match[0];
|
||||
for ($i = 0, $size = sizeof($tokens); $i < $size; $i++)
|
||||
for ($i = 0, $size = count($tokens); $i < $size; $i++)
|
||||
{
|
||||
$token = &$tokens[$i];
|
||||
|
||||
|
@@ -114,7 +114,7 @@ function generate_smilies($mode, $forum_id)
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (sizeof($smilies))
|
||||
if (count($smilies))
|
||||
{
|
||||
$root_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? generate_board_url() . '/' : $phpbb_path_helper->get_web_root_path();
|
||||
|
||||
@@ -200,7 +200,7 @@ function update_post_information($type, $ids, $return_update_sql = false)
|
||||
$topic_condition = '';
|
||||
}
|
||||
|
||||
if (sizeof($ids) == 1)
|
||||
if (count($ids) == 1)
|
||||
{
|
||||
$sql = 'SELECT MAX(p.post_id) as last_post_id
|
||||
FROM ' . POSTS_TABLE . " p $topic_join
|
||||
@@ -222,7 +222,7 @@ function update_post_information($type, $ids, $return_update_sql = false)
|
||||
$last_post_ids = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
if (sizeof($ids) == 1)
|
||||
if (count($ids) == 1)
|
||||
{
|
||||
$row[$type . '_id'] = $ids[0];
|
||||
}
|
||||
@@ -256,7 +256,7 @@ function update_post_information($type, $ids, $return_update_sql = false)
|
||||
}
|
||||
}
|
||||
|
||||
if (sizeof($last_post_ids))
|
||||
if (count($last_post_ids))
|
||||
{
|
||||
$sql = 'SELECT p.' . $type . '_id, p.post_id, p.post_subject, p.post_time, p.poster_id, p.post_username, u.user_id, u.username, u.user_colour
|
||||
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
|
||||
@@ -277,7 +277,7 @@ function update_post_information($type, $ids, $return_update_sql = false)
|
||||
}
|
||||
unset($empty_forums, $ids, $last_post_ids);
|
||||
|
||||
if ($return_update_sql || !sizeof($update_sql))
|
||||
if ($return_update_sql || !count($update_sql))
|
||||
{
|
||||
return $update_sql;
|
||||
}
|
||||
@@ -310,7 +310,7 @@ function posting_gen_topic_icons($mode, $icon_id)
|
||||
$template->assign_var('S_NO_ICON_CHECKED', ' checked="checked"');
|
||||
}
|
||||
|
||||
if (sizeof($icons))
|
||||
if (count($icons))
|
||||
{
|
||||
$root_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? generate_board_url() . '/' : $phpbb_root_path;
|
||||
|
||||
@@ -519,7 +519,7 @@ function get_supported_image_types($type = false)
|
||||
*/
|
||||
function create_thumbnail($source, $destination, $mimetype)
|
||||
{
|
||||
global $config, $phpbb_filesystem;
|
||||
global $config, $phpbb_filesystem, $phpbb_dispatcher;
|
||||
|
||||
$min_filesize = (int) $config['img_min_thumb_filesize'];
|
||||
$img_filesize = (file_exists($source)) ? @filesize($source) : false;
|
||||
@@ -551,25 +551,31 @@ function create_thumbnail($source, $destination, $mimetype)
|
||||
return false;
|
||||
}
|
||||
|
||||
$used_imagick = false;
|
||||
$thumbnail_created = false;
|
||||
|
||||
// Only use ImageMagick if defined and the passthru function not disabled
|
||||
if ($config['img_imagick'] && function_exists('passthru'))
|
||||
{
|
||||
if (substr($config['img_imagick'], -1) !== '/')
|
||||
{
|
||||
$config['img_imagick'] .= '/';
|
||||
}
|
||||
/**
|
||||
* Create thumbnail event to replace GD thumbnail creation with for example ImageMagick
|
||||
*
|
||||
* @event core.thumbnail_create_before
|
||||
* @var string source Image source path
|
||||
* @var string destination Thumbnail destination path
|
||||
* @var string mimetype Image mime type
|
||||
* @var float new_width Calculated thumbnail width
|
||||
* @var float new_height Calculated thumbnail height
|
||||
* @var bool thumbnail_created Set to true to skip default GD thumbnail creation
|
||||
* @since 3.2.4
|
||||
*/
|
||||
$vars = array(
|
||||
'source',
|
||||
'destination',
|
||||
'mimetype',
|
||||
'new_width',
|
||||
'new_height',
|
||||
'thumbnail_created',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.thumbnail_create_before', compact($vars)));
|
||||
|
||||
@passthru(escapeshellcmd($config['img_imagick']) . 'convert' . ((defined('PHP_OS') && preg_match('#^win#i', PHP_OS)) ? '.exe' : '') . ' -quality 85 -geometry ' . $new_width . 'x' . $new_height . ' "' . str_replace('\\', '/', $source) . '" "' . str_replace('\\', '/', $destination) . '"');
|
||||
|
||||
if (file_exists($destination))
|
||||
{
|
||||
$used_imagick = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$used_imagick)
|
||||
if (!$thumbnail_created)
|
||||
{
|
||||
$type = get_supported_image_types($type);
|
||||
|
||||
@@ -690,7 +696,7 @@ function posting_gen_inline_attachments(&$attachment_data)
|
||||
{
|
||||
global $template;
|
||||
|
||||
if (sizeof($attachment_data))
|
||||
if (count($attachment_data))
|
||||
{
|
||||
$s_inline_attachment_options = '';
|
||||
|
||||
@@ -712,21 +718,23 @@ function posting_gen_inline_attachments(&$attachment_data)
|
||||
*/
|
||||
function posting_gen_attachment_entry($attachment_data, &$filename_data, $show_attach_box = true)
|
||||
{
|
||||
global $template, $config, $phpbb_root_path, $phpEx, $user;
|
||||
global $template, $config, $phpbb_root_path, $phpEx, $user, $phpbb_dispatcher;
|
||||
|
||||
// Some default template variables
|
||||
$template->assign_vars(array(
|
||||
'S_SHOW_ATTACH_BOX' => $show_attach_box,
|
||||
'S_HAS_ATTACHMENTS' => sizeof($attachment_data),
|
||||
'S_HAS_ATTACHMENTS' => count($attachment_data),
|
||||
'FILESIZE' => $config['max_filesize'],
|
||||
'FILE_COMMENT' => (isset($filename_data['filecomment'])) ? $filename_data['filecomment'] : '',
|
||||
));
|
||||
|
||||
if (sizeof($attachment_data))
|
||||
if (count($attachment_data))
|
||||
{
|
||||
// We display the posted attachments within the desired order.
|
||||
($config['display_order']) ? krsort($attachment_data) : ksort($attachment_data);
|
||||
|
||||
$attachrow_template_vars = [];
|
||||
|
||||
foreach ($attachment_data as $count => $attach_row)
|
||||
{
|
||||
$hidden = '';
|
||||
@@ -739,7 +747,7 @@ function posting_gen_attachment_entry($attachment_data, &$filename_data, $show_a
|
||||
|
||||
$download_link = append_sid("{$phpbb_root_path}download/file.$phpEx", 'mode=view&id=' . (int) $attach_row['attach_id'], true, ($attach_row['is_orphan']) ? $user->session_id : false);
|
||||
|
||||
$template->assign_block_vars('attach_row', array(
|
||||
$attachrow_template_vars[(int) $attach_row['attach_id']] = array(
|
||||
'FILENAME' => utf8_basename($attach_row['real_filename']),
|
||||
'A_FILENAME' => addslashes(utf8_basename($attach_row['real_filename'])),
|
||||
'FILE_COMMENT' => $attach_row['attach_comment'],
|
||||
@@ -749,12 +757,25 @@ function posting_gen_attachment_entry($attachment_data, &$filename_data, $show_a
|
||||
'FILESIZE' => get_formatted_filesize($attach_row['filesize']),
|
||||
|
||||
'U_VIEW_ATTACHMENT' => $download_link,
|
||||
'S_HIDDEN' => $hidden)
|
||||
'S_HIDDEN' => $hidden,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Modify inline attachments template vars
|
||||
*
|
||||
* @event core.modify_inline_attachments_template_vars
|
||||
* @var array attachment_data Array containing attachments data
|
||||
* @var array attachrow_template_vars Array containing attachments template vars
|
||||
* @since 3.2.2-RC1
|
||||
*/
|
||||
$vars = array('attachment_data', 'attachrow_template_vars');
|
||||
extract($phpbb_dispatcher->trigger_event('core.modify_inline_attachments_template_vars', compact($vars)));
|
||||
|
||||
$template->assign_block_vars_array('attach_row', $attachrow_template_vars);
|
||||
}
|
||||
|
||||
return sizeof($attachment_data);
|
||||
return count($attachment_data);
|
||||
}
|
||||
|
||||
//
|
||||
@@ -802,13 +823,13 @@ function load_drafts($topic_id = 0, $forum_id = 0, $id = 0, $pm_action = '', $ms
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (!sizeof($draft_rows))
|
||||
if (!count($draft_rows))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$topic_rows = array();
|
||||
if (sizeof($topic_ids))
|
||||
if (count($topic_ids))
|
||||
{
|
||||
$sql = 'SELECT topic_id, forum_id, topic_title, topic_poster
|
||||
FROM ' . TOPICS_TABLE . '
|
||||
@@ -921,7 +942,7 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
|
||||
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (!sizeof($post_list))
|
||||
if (!count($post_list))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -1016,7 +1037,7 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.topic_review_modify_post_list', compact($vars)));
|
||||
|
||||
for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
|
||||
for ($i = 0, $end = count($post_list); $i < $end; ++$i)
|
||||
{
|
||||
// A non-existing rowset only happens if there was no user present for the entered poster_id
|
||||
// This could be a broken posts table.
|
||||
@@ -1243,7 +1264,7 @@ function delete_post($forum_id, $topic_id, $post_id, &$data, $is_soft = false, $
|
||||
|
||||
foreach ($shadow_forum_ids as $updated_forum => $topic_count)
|
||||
{
|
||||
// counting is fun! we only have to do sizeof($forum_ids) number of queries,
|
||||
// counting is fun! we only have to do count($forum_ids) number of queries,
|
||||
// even if the topic is moved back to where its shadow lives (we count how many times it is in a forum)
|
||||
$sql = 'UPDATE ' . FORUMS_TABLE . '
|
||||
SET forum_topics_approved = forum_topics_approved - ' . $topic_count . '
|
||||
@@ -1263,7 +1284,7 @@ function delete_post($forum_id, $topic_id, $post_id, &$data, $is_soft = false, $
|
||||
$phpbb_content_visibility->remove_topic_from_statistic($data, $sql_data);
|
||||
|
||||
$update_sql = update_post_information('forum', $forum_id, true);
|
||||
if (sizeof($update_sql))
|
||||
if (count($update_sql))
|
||||
{
|
||||
$sql_data[FORUMS_TABLE] .= ($sql_data[FORUMS_TABLE]) ? ', ' : '';
|
||||
$sql_data[FORUMS_TABLE] .= implode(', ', $update_sql[$forum_id]);
|
||||
@@ -1312,7 +1333,7 @@ function delete_post($forum_id, $topic_id, $post_id, &$data, $is_soft = false, $
|
||||
{
|
||||
// Update last post information when hard deleting. Soft delete already did that by itself.
|
||||
$update_sql = update_post_information('forum', $forum_id, true);
|
||||
if (sizeof($update_sql))
|
||||
if (count($update_sql))
|
||||
{
|
||||
$sql_data[FORUMS_TABLE] = (($sql_data[FORUMS_TABLE]) ? $sql_data[FORUMS_TABLE] . ', ' : '') . implode(', ', $update_sql[$forum_id]);
|
||||
}
|
||||
@@ -1954,7 +1975,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll_ary, &$data
|
||||
|
||||
$sql_insert_ary = array();
|
||||
|
||||
for ($i = 0, $size = sizeof($poll_ary['poll_options']); $i < $size; $i++)
|
||||
for ($i = 0, $size = count($poll_ary['poll_options']); $i < $size; $i++)
|
||||
{
|
||||
if (strlen(trim($poll_ary['poll_options'][$i])))
|
||||
{
|
||||
@@ -1962,7 +1983,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll_ary, &$data
|
||||
{
|
||||
// If we add options we need to put them to the end to be able to preserve votes...
|
||||
$sql_insert_ary[] = array(
|
||||
'poll_option_id' => (int) sizeof($cur_poll_options) + 1 + sizeof($sql_insert_ary),
|
||||
'poll_option_id' => (int) count($cur_poll_options) + 1 + count($sql_insert_ary),
|
||||
'topic_id' => (int) $data_ary['topic_id'],
|
||||
'poll_option_text' => (string) $poll_ary['poll_options'][$i]
|
||||
);
|
||||
@@ -1980,16 +2001,16 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll_ary, &$data
|
||||
|
||||
$db->sql_multi_insert(POLL_OPTIONS_TABLE, $sql_insert_ary);
|
||||
|
||||
if (sizeof($poll_ary['poll_options']) < sizeof($cur_poll_options))
|
||||
if (count($poll_ary['poll_options']) < count($cur_poll_options))
|
||||
{
|
||||
$sql = 'DELETE FROM ' . POLL_OPTIONS_TABLE . '
|
||||
WHERE poll_option_id > ' . sizeof($poll_ary['poll_options']) . '
|
||||
WHERE poll_option_id > ' . count($poll_ary['poll_options']) . '
|
||||
AND topic_id = ' . $data_ary['topic_id'];
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
// If edited, we would need to reset votes (since options can be re-ordered above, you can't be sure if the change is for changing the text or adding an option
|
||||
if ($mode == 'edit' && sizeof($poll_ary['poll_options']) != sizeof($cur_poll_options))
|
||||
if ($mode == 'edit' && count($poll_ary['poll_options']) != count($cur_poll_options))
|
||||
{
|
||||
$db->sql_query('DELETE FROM ' . POLL_VOTES_TABLE . ' WHERE topic_id = ' . $data_ary['topic_id']);
|
||||
$db->sql_query('UPDATE ' . POLL_OPTIONS_TABLE . ' SET poll_option_total = 0 WHERE topic_id = ' . $data_ary['topic_id']);
|
||||
@@ -2007,7 +2028,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll_ary, &$data
|
||||
$orphan_rows[(int) $attach_row['attach_id']] = array();
|
||||
}
|
||||
|
||||
if (sizeof($orphan_rows))
|
||||
if (count($orphan_rows))
|
||||
{
|
||||
$sql = 'SELECT attach_id, filesize, physical_filename
|
||||
FROM ' . ATTACHMENTS_TABLE . '
|
||||
@@ -2267,6 +2288,19 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll_ary, &$data
|
||||
'post_subject' => $subject,
|
||||
));
|
||||
|
||||
/**
|
||||
* This event allows you to modify the notification data upon submission
|
||||
*
|
||||
* @event core.modify_submit_notification_data
|
||||
* @var array notification_data The notification data to be inserted in to the database
|
||||
* @var array data_ary The data array with a lot of the post submission data
|
||||
* @var string mode The posting mode
|
||||
* @var int poster_id The poster id
|
||||
* @since 3.2.4-RC1
|
||||
*/
|
||||
$vars = array('notification_data', 'data_ary', 'mode', 'poster_id');
|
||||
extract($phpbb_dispatcher->trigger_event('core.modify_submit_notification_data', compact($vars)));
|
||||
|
||||
/* @var $phpbb_notifications \phpbb\notification\manager */
|
||||
$phpbb_notifications = $phpbb_container->get('notification_manager');
|
||||
|
||||
@@ -2294,8 +2328,14 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll_ary, &$data
|
||||
case 'edit_first_post':
|
||||
case 'edit':
|
||||
case 'edit_last_post':
|
||||
if ($user->data['user_id'] == $poster_id)
|
||||
{
|
||||
$phpbb_notifications->update_notifications(array(
|
||||
'notification.type.quote',
|
||||
), $notification_data);
|
||||
}
|
||||
|
||||
$phpbb_notifications->update_notifications(array(
|
||||
'notification.type.quote',
|
||||
'notification.type.bookmark',
|
||||
'notification.type.topic',
|
||||
'notification.type.post',
|
||||
|
@@ -466,7 +466,7 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false)
|
||||
$user_rules = $db->sql_fetchrowset($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (sizeof($user_rules))
|
||||
if (count($user_rules))
|
||||
{
|
||||
$sql = 'SELECT zebra_id, friend, foe
|
||||
FROM ' . ZEBRA_TABLE . "
|
||||
@@ -499,7 +499,7 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false)
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// Retrieve user memberships
|
||||
if (sizeof($user_ids))
|
||||
if (count($user_ids))
|
||||
{
|
||||
$sql = 'SELECT *
|
||||
FROM ' . USER_GROUP_TABLE . '
|
||||
@@ -600,14 +600,14 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false)
|
||||
// only gone through if new messages arrive.
|
||||
|
||||
// Delete messages
|
||||
if (sizeof($delete_ids))
|
||||
if (count($delete_ids))
|
||||
{
|
||||
$num_removed += sizeof($delete_ids);
|
||||
$num_removed += count($delete_ids);
|
||||
delete_pm($user_id, $delete_ids, PRIVMSGS_NO_BOX);
|
||||
}
|
||||
|
||||
// Set messages to Unread
|
||||
if (sizeof($unread_ids))
|
||||
if (count($unread_ids))
|
||||
{
|
||||
$sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . '
|
||||
SET pm_unread = 0
|
||||
@@ -618,7 +618,7 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false)
|
||||
}
|
||||
|
||||
// mark messages as important
|
||||
if (sizeof($important_ids))
|
||||
if (count($important_ids))
|
||||
{
|
||||
$sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . '
|
||||
SET pm_marked = 1 - pm_marked
|
||||
@@ -631,7 +631,7 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false)
|
||||
// Move into folder
|
||||
$folder = array();
|
||||
|
||||
if (sizeof($move_into_folder))
|
||||
if (count($move_into_folder))
|
||||
{
|
||||
// Determine Full Folder Action - we need the move to folder id later eventually
|
||||
$full_folder_action = ($user->data['user_full_folder'] == FULL_FOLDER_NONE) ? ($config['full_folder_action'] - (FULL_FOLDER_NONE*(-1))) : $user->data['user_full_folder'];
|
||||
@@ -676,12 +676,12 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false)
|
||||
|
||||
// Check Message Limit - we calculate with the complete array, most of the time it is one message
|
||||
// But we are making sure that the other way around works too (more messages in queue than allowed to be stored)
|
||||
if ($user->data['message_limit'] && $folder[$folder_id] && ($folder[$folder_id] + sizeof($msg_ary)) > $user->data['message_limit'])
|
||||
if ($user->data['message_limit'] && $folder[$folder_id] && ($folder[$folder_id] + count($msg_ary)) > $user->data['message_limit'])
|
||||
{
|
||||
$full_folder_action = ($user->data['user_full_folder'] == FULL_FOLDER_NONE) ? ($config['full_folder_action'] - (FULL_FOLDER_NONE*(-1))) : $user->data['user_full_folder'];
|
||||
|
||||
// If destination folder itself is full...
|
||||
if ($full_folder_action >= 0 && ($folder[$full_folder_action] + sizeof($msg_ary)) > $user->data['message_limit'])
|
||||
if ($full_folder_action >= 0 && ($folder[$full_folder_action] + count($msg_ary)) > $user->data['message_limit'])
|
||||
{
|
||||
$full_folder_action = $config['full_folder_action'] - (FULL_FOLDER_NONE*(-1));
|
||||
}
|
||||
@@ -699,7 +699,7 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false)
|
||||
WHERE user_id = $user_id
|
||||
AND folder_id = $dest_folder
|
||||
ORDER BY msg_id ASC";
|
||||
$result = $db->sql_query_limit($sql, (($folder[$dest_folder] + sizeof($msg_ary)) - $user->data['message_limit']));
|
||||
$result = $db->sql_query_limit($sql, (($folder[$dest_folder] + count($msg_ary)) - $user->data['message_limit']));
|
||||
|
||||
$delete_ids = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
@@ -708,7 +708,7 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false)
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$num_removed += sizeof($delete_ids);
|
||||
$num_removed += count($delete_ids);
|
||||
delete_pm($user_id, $delete_ids, $dest_folder);
|
||||
}
|
||||
}
|
||||
@@ -744,7 +744,7 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false)
|
||||
}
|
||||
}
|
||||
|
||||
if (sizeof($action_ary))
|
||||
if (count($action_ary))
|
||||
{
|
||||
// Move from OUTBOX to SENTBOX
|
||||
// We are not checking any full folder status here... SENTBOX is a special treatment (old messages get deleted)
|
||||
@@ -785,7 +785,7 @@ function move_pm($user_id, $message_limit, $move_msg_ids, $dest_folder, $cur_fol
|
||||
$move_msg_ids = array($move_msg_ids);
|
||||
}
|
||||
|
||||
if (sizeof($move_msg_ids) && !in_array($dest_folder, array(PRIVMSGS_NO_BOX, PRIVMSGS_OUTBOX, PRIVMSGS_SENTBOX)) &&
|
||||
if (count($move_msg_ids) && !in_array($dest_folder, array(PRIVMSGS_NO_BOX, PRIVMSGS_OUTBOX, PRIVMSGS_SENTBOX)) &&
|
||||
!in_array($cur_folder_id, array(PRIVMSGS_NO_BOX, PRIVMSGS_OUTBOX)) && $cur_folder_id != $dest_folder)
|
||||
{
|
||||
// We have to check the destination folder ;)
|
||||
@@ -805,7 +805,7 @@ function move_pm($user_id, $message_limit, $move_msg_ids, $dest_folder, $cur_fol
|
||||
trigger_error('NOT_AUTHORISED');
|
||||
}
|
||||
|
||||
if ($message_limit && $row['pm_count'] + sizeof($move_msg_ids) > $message_limit)
|
||||
if ($message_limit && $row['pm_count'] + count($move_msg_ids) > $message_limit)
|
||||
{
|
||||
$message = sprintf($user->lang['NOT_ENOUGH_SPACE_FOLDER'], $row['folder_name']) . '<br /><br />';
|
||||
$message .= sprintf($user->lang['CLICK_RETURN_FOLDER'], '<a href="' . append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&folder=' . $row['folder_id']) . '">', '</a>', $row['folder_name']);
|
||||
@@ -822,7 +822,7 @@ function move_pm($user_id, $message_limit, $move_msg_ids, $dest_folder, $cur_fol
|
||||
$num_messages = (int) $db->sql_fetchfield('num_messages');
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if ($message_limit && $num_messages + sizeof($move_msg_ids) > $message_limit)
|
||||
if ($message_limit && $num_messages + count($move_msg_ids) > $message_limit)
|
||||
{
|
||||
$message = sprintf($user->lang['NOT_ENOUGH_SPACE_FOLDER'], $user->lang['PM_INBOX']) . '<br /><br />';
|
||||
$message .= sprintf($user->lang['CLICK_RETURN_FOLDER'], '<a href="' . append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&folder=inbox') . '">', '</a>', $user->lang['PM_INBOX']);
|
||||
@@ -949,7 +949,7 @@ function handle_mark_actions($user_id, $mark_action)
|
||||
$msg_ids = $request->variable('marked_msg_id', array(0));
|
||||
$cur_folder_id = $request->variable('cur_folder_id', PRIVMSGS_NO_BOX);
|
||||
|
||||
if (!sizeof($msg_ids))
|
||||
if (!count($msg_ids))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -981,7 +981,7 @@ function handle_mark_actions($user_id, $mark_action)
|
||||
{
|
||||
delete_pm($user_id, $msg_ids, $cur_folder_id);
|
||||
|
||||
$success_msg = (sizeof($msg_ids) == 1) ? 'MESSAGE_DELETED' : 'MESSAGES_DELETED';
|
||||
$success_msg = (count($msg_ids) == 1) ? 'MESSAGE_DELETED' : 'MESSAGES_DELETED';
|
||||
$redirect = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm&folder=' . $cur_folder_id);
|
||||
|
||||
meta_refresh(3, $redirect);
|
||||
@@ -1032,7 +1032,7 @@ function delete_pm($user_id, $msg_ids, $folder_id)
|
||||
$msg_ids = array($msg_ids);
|
||||
}
|
||||
|
||||
if (!sizeof($msg_ids))
|
||||
if (!count($msg_ids))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -1069,7 +1069,7 @@ function delete_pm($user_id, $msg_ids, $folder_id)
|
||||
$db->sql_freeresult($result);
|
||||
unset($msg_ids);
|
||||
|
||||
if (!sizeof($delete_rows))
|
||||
if (!count($delete_rows))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -1156,7 +1156,7 @@ function delete_pm($user_id, $msg_ids, $folder_id)
|
||||
|
||||
$delete_ids = array_keys($delete_rows);
|
||||
|
||||
if (sizeof($delete_ids))
|
||||
if (count($delete_ids))
|
||||
{
|
||||
// Check if there are any attachments we need to remove
|
||||
/** @var \phpbb\attachment\manager $attachment_manager */
|
||||
@@ -1289,7 +1289,7 @@ function phpbb_delete_users_pms($user_ids)
|
||||
$num_pms = (int) $row['num_undelivered_privmsgs'];
|
||||
$undelivered_user[$num_pms][] = (int) $row['user_id'];
|
||||
|
||||
if (sizeof($undelivered_user[$num_pms]) > 50)
|
||||
if (count($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.
|
||||
@@ -1416,7 +1416,7 @@ function rebuild_header($check_ary)
|
||||
$_types = array('u', 'g');
|
||||
foreach ($_types as $type)
|
||||
{
|
||||
if (sizeof(${$type}))
|
||||
if (count(${$type}))
|
||||
{
|
||||
foreach (${$type} as $id)
|
||||
{
|
||||
@@ -1461,7 +1461,7 @@ function write_pm_addresses($check_ary, $author_id, $plaintext = false)
|
||||
}
|
||||
|
||||
$address = array();
|
||||
if (sizeof($u))
|
||||
if (count($u))
|
||||
{
|
||||
$sql = 'SELECT user_id, username, user_colour
|
||||
FROM ' . USERS_TABLE . '
|
||||
@@ -1485,7 +1485,7 @@ function write_pm_addresses($check_ary, $author_id, $plaintext = false)
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
if (sizeof($g))
|
||||
if (count($g))
|
||||
{
|
||||
if ($plaintext)
|
||||
{
|
||||
@@ -1532,7 +1532,7 @@ function write_pm_addresses($check_ary, $author_id, $plaintext = false)
|
||||
}
|
||||
}
|
||||
|
||||
if (sizeof($address) && !$plaintext)
|
||||
if (count($address) && !$plaintext)
|
||||
{
|
||||
$template->assign_var('S_' . strtoupper($check_type) . '_RECIPIENT', true);
|
||||
|
||||
@@ -1651,7 +1651,7 @@ function submit_pm($mode, $subject, &$data_ary, $put_in_outbox = true)
|
||||
$_types = array('u', 'g');
|
||||
foreach ($_types as $ug_type)
|
||||
{
|
||||
if (isset($data_ary['address_list'][$ug_type]) && sizeof($data_ary['address_list'][$ug_type]))
|
||||
if (isset($data_ary['address_list'][$ug_type]) && count($data_ary['address_list'][$ug_type]))
|
||||
{
|
||||
foreach ($data_ary['address_list'][$ug_type] as $id => $field)
|
||||
{
|
||||
@@ -1673,7 +1673,7 @@ function submit_pm($mode, $subject, &$data_ary, $put_in_outbox = true)
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($data_ary['address_list']['g']) && sizeof($data_ary['address_list']['g']))
|
||||
if (isset($data_ary['address_list']['g']) && count($data_ary['address_list']['g']))
|
||||
{
|
||||
// We need to check the PM status of group members (do they want to receive PM's?)
|
||||
// Only check if not a moderator or admin, since they are allowed to override this user setting
|
||||
@@ -1696,7 +1696,7 @@ function submit_pm($mode, $subject, &$data_ary, $put_in_outbox = true)
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
if (!sizeof($recipients))
|
||||
if (!count($recipients))
|
||||
{
|
||||
trigger_error('NO_RECIPIENT');
|
||||
}
|
||||
@@ -1764,7 +1764,7 @@ function submit_pm($mode, $subject, &$data_ary, $put_in_outbox = true)
|
||||
break;
|
||||
}
|
||||
|
||||
if (sizeof($sql_data))
|
||||
if (count($sql_data))
|
||||
{
|
||||
if ($mode == 'post' || $mode == 'reply' || $mode == 'quote' || $mode == 'quotepost' || $mode == 'forward')
|
||||
{
|
||||
@@ -1844,7 +1844,7 @@ function submit_pm($mode, $subject, &$data_ary, $put_in_outbox = true)
|
||||
$orphan_rows[(int) $attach_row['attach_id']] = array();
|
||||
}
|
||||
|
||||
if (sizeof($orphan_rows))
|
||||
if (count($orphan_rows))
|
||||
{
|
||||
$sql = 'SELECT attach_id, filesize, physical_filename
|
||||
FROM ' . ATTACHMENTS_TABLE . '
|
||||
@@ -2038,7 +2038,7 @@ function message_history($msg_id, $user_id, $message_row, $folder, $in_post_mode
|
||||
while ($row = $db->sql_fetchrow($result));
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (sizeof($rowset) == 1 && !$in_post_mode)
|
||||
if (count($rowset) == 1 && !$in_post_mode)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -2051,7 +2051,7 @@ function message_history($msg_id, $user_id, $message_row, $folder, $in_post_mode
|
||||
// Re-order rowset to be able to get the next/prev message rows...
|
||||
$rowset = array_values($rowset);
|
||||
|
||||
for ($i = 0, $size = sizeof($rowset); $i < $size; $i++)
|
||||
for ($i = 0, $size = count($rowset); $i < $size; $i++)
|
||||
{
|
||||
$row = &$rowset[$i];
|
||||
$id = (int) $row['msg_id'];
|
||||
@@ -2197,7 +2197,7 @@ function get_recipient_strings($pm_by_id)
|
||||
|
||||
foreach ($_types as $ug_type)
|
||||
{
|
||||
if (isset($address[$message_id][$ug_type]) && sizeof($address[$message_id][$ug_type]))
|
||||
if (isset($address[$message_id][$ug_type]) && count($address[$message_id][$ug_type]))
|
||||
{
|
||||
foreach ($address[$message_id][$ug_type] as $ug_id => $in_to)
|
||||
{
|
||||
|
@@ -38,7 +38,7 @@ class transfer
|
||||
/**
|
||||
* Constructor - init some basic values
|
||||
*/
|
||||
function transfer()
|
||||
function __construct()
|
||||
{
|
||||
global $phpbb_root_path;
|
||||
|
||||
@@ -112,7 +112,7 @@ class transfer
|
||||
$dir = explode('/', $dir);
|
||||
$dirs = '';
|
||||
|
||||
for ($i = 0, $total = sizeof($dir); $i < $total; $i++)
|
||||
for ($i = 0, $total = count($dir); $i < $total; $i++)
|
||||
{
|
||||
$result = true;
|
||||
|
||||
@@ -264,7 +264,7 @@ class ftp extends transfer
|
||||
/**
|
||||
* Standard parameters for FTP session
|
||||
*/
|
||||
function ftp($host, $username, $password, $root_path, $port = 21, $timeout = 10)
|
||||
function __construct($host, $username, $password, $root_path, $port = 21, $timeout = 10)
|
||||
{
|
||||
$this->host = $host;
|
||||
$this->port = $port;
|
||||
@@ -512,7 +512,7 @@ class ftp_fsock extends transfer
|
||||
/**
|
||||
* Standard parameters for FTP session
|
||||
*/
|
||||
function ftp_fsock($host, $username, $password, $root_path, $port = 21, $timeout = 10)
|
||||
function __construct($host, $username, $password, $root_path, $port = 21, $timeout = 10)
|
||||
{
|
||||
$this->host = $host;
|
||||
$this->port = $port;
|
||||
@@ -529,7 +529,7 @@ class ftp_fsock extends transfer
|
||||
}
|
||||
|
||||
// Init some needed values
|
||||
$this->transfer();
|
||||
parent::__construct();
|
||||
|
||||
return;
|
||||
}
|
||||
|
@@ -170,7 +170,7 @@ function user_update_name($old_name, $new_name)
|
||||
* Adds an user
|
||||
*
|
||||
* @param mixed $user_row An array containing the following keys (and the appropriate values): username, group_id (the group to place the user in), user_email and the user_type(usually 0). Additional entries not overridden by defaults will be forwarded.
|
||||
* @param string $cp_data custom profile fields, see custom_profile::build_insert_sql_array
|
||||
* @param array $cp_data custom profile fields, see custom_profile::build_insert_sql_array
|
||||
* @param array $notifications_data The notifications settings for the new user
|
||||
* @return the new user's ID.
|
||||
*/
|
||||
@@ -260,7 +260,7 @@ function user_add($user_row, $cp_data = false, $notifications_data = null)
|
||||
$remaining_vars = array_diff(array_keys($user_row), array_keys($sql_ary));
|
||||
|
||||
// Now fill our sql array with the remaining vars
|
||||
if (sizeof($remaining_vars))
|
||||
if (count($remaining_vars))
|
||||
{
|
||||
foreach ($remaining_vars as $key)
|
||||
{
|
||||
@@ -272,8 +272,8 @@ function user_add($user_row, $cp_data = false, $notifications_data = null)
|
||||
* Use this event to modify the values to be inserted when a user is added
|
||||
*
|
||||
* @event core.user_add_modify_data
|
||||
* @var array user_row Array of user details submited to user_add
|
||||
* @var array cp_data Array of Custom profile fields submited to user_add
|
||||
* @var array user_row Array of user details submitted to user_add
|
||||
* @var array cp_data Array of Custom profile fields submitted to user_add
|
||||
* @var array sql_ary Array of data to be inserted when a user is added
|
||||
* @var array notifications_data Array of notification data to be inserted when a user is added
|
||||
* @since 3.1.0-a1
|
||||
@@ -289,7 +289,7 @@ function user_add($user_row, $cp_data = false, $notifications_data = null)
|
||||
$user_id = $db->sql_nextid();
|
||||
|
||||
// Insert Custom Profile Fields
|
||||
if ($cp_data !== false && sizeof($cp_data))
|
||||
if ($cp_data !== false && count($cp_data))
|
||||
{
|
||||
$cp_data['user_id'] = (int) $user_id;
|
||||
|
||||
@@ -376,6 +376,19 @@ function user_add($user_row, $cp_data = false, $notifications_data = null)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Modify the notifications data to be inserted in the database when a user is added
|
||||
*
|
||||
* @event core.user_add_modify_notifications_data
|
||||
* @var array user_row Array of user details submitted to user_add
|
||||
* @var array cp_data Array of Custom profile fields submitted to user_add
|
||||
* @var array sql_ary Array of data to be inserted when a user is added
|
||||
* @var array notifications_data Array of notification data to be inserted when a user is added
|
||||
* @since 3.2.2-RC1
|
||||
*/
|
||||
$vars = array('user_row', 'cp_data', 'sql_ary', 'notifications_data');
|
||||
extract($phpbb_dispatcher->trigger_event('core.user_add_modify_notifications_data', compact($vars)));
|
||||
|
||||
// Subscribe user to notifications if necessary
|
||||
if (!empty($notifications_data))
|
||||
{
|
||||
@@ -388,12 +401,12 @@ function user_add($user_row, $cp_data = false, $notifications_data = null)
|
||||
}
|
||||
|
||||
/**
|
||||
* Event that returns user id, user detals and user CPF of newly registared user
|
||||
* Event that returns user id, user details and user CPF of newly registered user
|
||||
*
|
||||
* @event core.user_add_after
|
||||
* @var int user_id User id of newly registared user
|
||||
* @var array user_row Array of user details submited to user_add
|
||||
* @var array cp_data Array of Custom profile fields submited to user_add
|
||||
* @var int user_id User id of newly registered user
|
||||
* @var array user_row Array of user details submitted to user_add
|
||||
* @var array cp_data Array of Custom profile fields submitted to user_add
|
||||
* @since 3.1.0-b5
|
||||
*/
|
||||
$vars = array('user_id', 'user_row', 'cp_data');
|
||||
@@ -448,9 +461,11 @@ function user_delete($mode, $user_ids, $retain_username = true)
|
||||
* @var array user_ids IDs of the deleted user
|
||||
* @var mixed retain_username True if username should be retained
|
||||
* or false if not
|
||||
* @var array user_rows Array containing data of the deleted users
|
||||
* @since 3.1.0-a1
|
||||
* @changed 3.2.4-RC1 Added user_rows
|
||||
*/
|
||||
$vars = array('mode', 'user_ids', 'retain_username');
|
||||
$vars = array('mode', 'user_ids', 'retain_username', 'user_rows');
|
||||
extract($phpbb_dispatcher->trigger_event('core.delete_user_before', compact($vars)));
|
||||
|
||||
// Before we begin, we will remove the reports the user issued.
|
||||
@@ -468,7 +483,7 @@ function user_delete($mode, $user_ids, $retain_username = true)
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (sizeof($report_posts))
|
||||
if (count($report_posts))
|
||||
{
|
||||
$report_posts = array_unique($report_posts);
|
||||
$report_topics = array_unique($report_topics);
|
||||
@@ -488,7 +503,7 @@ function user_delete($mode, $user_ids, $retain_username = true)
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (sizeof($keep_report_topics))
|
||||
if (count($keep_report_topics))
|
||||
{
|
||||
$report_topics = array_diff($report_topics, $keep_report_topics);
|
||||
}
|
||||
@@ -500,7 +515,7 @@ function user_delete($mode, $user_ids, $retain_username = true)
|
||||
WHERE ' . $db->sql_in_set('post_id', $report_posts);
|
||||
$db->sql_query($sql);
|
||||
|
||||
if (sizeof($report_topics))
|
||||
if (count($report_topics))
|
||||
{
|
||||
$sql = 'UPDATE ' . TOPICS_TABLE . '
|
||||
SET topic_reported = 0
|
||||
@@ -651,7 +666,7 @@ function user_delete($mode, $user_ids, $retain_username = true)
|
||||
delete_posts('poster_id', $user_ids);
|
||||
}
|
||||
|
||||
$table_ary = array(USERS_TABLE, USER_GROUP_TABLE, TOPICS_WATCH_TABLE, FORUMS_WATCH_TABLE, ACL_USERS_TABLE, TOPICS_TRACK_TABLE, TOPICS_POSTED_TABLE, FORUMS_TRACK_TABLE, PROFILE_FIELDS_DATA_TABLE, MODERATOR_CACHE_TABLE, DRAFTS_TABLE, BOOKMARKS_TABLE, SESSIONS_KEYS_TABLE, PRIVMSGS_FOLDER_TABLE, PRIVMSGS_RULES_TABLE);
|
||||
$table_ary = array(USERS_TABLE, USER_GROUP_TABLE, TOPICS_WATCH_TABLE, FORUMS_WATCH_TABLE, ACL_USERS_TABLE, TOPICS_TRACK_TABLE, TOPICS_POSTED_TABLE, FORUMS_TRACK_TABLE, PROFILE_FIELDS_DATA_TABLE, MODERATOR_CACHE_TABLE, DRAFTS_TABLE, BOOKMARKS_TABLE, SESSIONS_KEYS_TABLE, PRIVMSGS_FOLDER_TABLE, PRIVMSGS_RULES_TABLE, $phpbb_container->getParameter('tables.auth_provider_oauth_token_storage'), $phpbb_container->getParameter('tables.auth_provider_oauth_states'), $phpbb_container->getParameter('tables.auth_provider_oauth_account_assoc'));
|
||||
|
||||
// Delete the miscellaneous (non-post) data for the user
|
||||
foreach ($table_ary as $table)
|
||||
@@ -734,9 +749,11 @@ function user_delete($mode, $user_ids, $retain_username = true)
|
||||
* @var array user_ids IDs of the deleted user
|
||||
* @var mixed retain_username True if username should be retained
|
||||
* or false if not
|
||||
* @var array user_rows Array containing data of the deleted users
|
||||
* @since 3.1.0-a1
|
||||
* @changed 3.2.2-RC1 Added user_rows
|
||||
*/
|
||||
$vars = array('mode', 'user_ids', 'retain_username');
|
||||
$vars = array('mode', 'user_ids', 'retain_username', 'user_rows');
|
||||
extract($phpbb_dispatcher->trigger_event('core.delete_user_after', compact($vars)));
|
||||
|
||||
// Reset newest user info if appropriate
|
||||
@@ -765,7 +782,7 @@ function user_active_flip($mode, $user_id_ary, $reason = INACTIVE_MANUAL)
|
||||
$user_id_ary = array($user_id_ary);
|
||||
}
|
||||
|
||||
if (!sizeof($user_id_ary))
|
||||
if (!count($user_id_ary))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -823,7 +840,7 @@ function user_active_flip($mode, $user_id_ary, $reason = INACTIVE_MANUAL)
|
||||
$vars = array('mode', 'reason', 'activated', 'deactivated', 'user_id_ary', 'sql_statements');
|
||||
extract($phpbb_dispatcher->trigger_event('core.user_active_flip_before', compact($vars)));
|
||||
|
||||
if (sizeof($sql_statements))
|
||||
if (count($sql_statements))
|
||||
{
|
||||
foreach ($sql_statements as $user_id => $sql_ary)
|
||||
{
|
||||
@@ -901,7 +918,7 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas
|
||||
else
|
||||
{
|
||||
$ban_other = explode('-', $ban_len_other);
|
||||
if (sizeof($ban_other) == 3 && ((int) $ban_other[0] < 9999) &&
|
||||
if (count($ban_other) == 3 && ((int) $ban_other[0] < 9999) &&
|
||||
(strlen($ban_other[0]) == 4) && (strlen($ban_other[1]) == 2) && (strlen($ban_other[2]) == 2))
|
||||
{
|
||||
$ban_end = max($current_time, $user->create_datetime()
|
||||
@@ -969,7 +986,7 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas
|
||||
}
|
||||
|
||||
// Make sure we have been given someone to ban
|
||||
if (!sizeof($sql_usernames))
|
||||
if (!count($sql_usernames))
|
||||
{
|
||||
trigger_error('NO_USER_SPECIFIED', E_USER_WARNING);
|
||||
}
|
||||
@@ -980,7 +997,7 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas
|
||||
|
||||
// Do not allow banning yourself, the guest account, or founders.
|
||||
$non_bannable = array($user->data['user_id'], ANONYMOUS);
|
||||
if (sizeof($founder))
|
||||
if (count($founder))
|
||||
{
|
||||
$sql .= ' AND ' . $db->sql_in_set('user_id', array_merge(array_keys($founder), $non_bannable), true);
|
||||
}
|
||||
@@ -1120,14 +1137,14 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!sizeof($founder) || !in_array($ban_item, $founder))
|
||||
if (!count($founder) || !in_array($ban_item, $founder))
|
||||
{
|
||||
$banlist_ary[] = $ban_item;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (sizeof($ban_list) == 0)
|
||||
if (count($ban_list) == 0)
|
||||
{
|
||||
trigger_error('NO_EMAILS_DEFINED', E_USER_WARNING);
|
||||
}
|
||||
@@ -1174,7 +1191,7 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas
|
||||
|
||||
$banlist_ary_tmp = array_intersect($banlist_ary, $banlist_ary_tmp);
|
||||
|
||||
if (sizeof($banlist_ary_tmp))
|
||||
if (count($banlist_ary_tmp))
|
||||
{
|
||||
// One or more entities are already banned/excluded, delete the existing bans, so they can be re-inserted with the given new length
|
||||
$sql = 'DELETE FROM ' . BANLIST_TABLE . '
|
||||
@@ -1188,7 +1205,7 @@ function user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reas
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// We have some entities to ban
|
||||
if (sizeof($banlist_ary))
|
||||
if (count($banlist_ary))
|
||||
{
|
||||
$sql_ary = array();
|
||||
|
||||
@@ -1316,7 +1333,7 @@ function user_unban($mode, $ban)
|
||||
|
||||
$unban_sql = array_map('intval', $ban);
|
||||
|
||||
if (sizeof($unban_sql))
|
||||
if (count($unban_sql))
|
||||
{
|
||||
// Grab details of bans for logging information later
|
||||
switch ($mode)
|
||||
@@ -1412,21 +1429,14 @@ function user_ipwhois($ip)
|
||||
return '';
|
||||
}
|
||||
|
||||
if (preg_match(get_preg_expression('ipv4'), $ip))
|
||||
{
|
||||
// IPv4 address
|
||||
$whois_host = 'whois.arin.net.';
|
||||
}
|
||||
else if (preg_match(get_preg_expression('ipv6'), $ip))
|
||||
{
|
||||
// IPv6 address
|
||||
$whois_host = 'whois.sixxs.net.';
|
||||
}
|
||||
else
|
||||
if (!preg_match(get_preg_expression('ipv4'), $ip) && !preg_match(get_preg_expression('ipv6'), $ip))
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
// IPv4 & IPv6 addresses
|
||||
$whois_host = 'whois.arin.net.';
|
||||
|
||||
$ipwhois = '';
|
||||
|
||||
if (($fsk = @fsockopen($whois_host, 43)))
|
||||
@@ -1580,7 +1590,7 @@ function validate_num($num, $optional = false, $min = 0, $max = 1E99)
|
||||
function validate_date($date_string, $optional = false)
|
||||
{
|
||||
$date = explode('-', $date_string);
|
||||
if ((empty($date) || sizeof($date) != 3) && $optional)
|
||||
if ((empty($date) || count($date) != 3) && $optional)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -1602,7 +1612,7 @@ function validate_date($date_string, $optional = false)
|
||||
}
|
||||
}
|
||||
|
||||
if (sizeof($date) != 3 || !checkdate($date[1], $date[0], $date[2]))
|
||||
if (count($date) != 3 || !checkdate($date[1], $date[0], $date[2]))
|
||||
{
|
||||
return 'INVALID';
|
||||
}
|
||||
@@ -1942,7 +1952,7 @@ function validate_jabber($jid)
|
||||
|
||||
$arr = explode('.', $realm);
|
||||
|
||||
if (sizeof($arr) == 0)
|
||||
if (count($arr) == 0)
|
||||
{
|
||||
return 'WRONG_DATA';
|
||||
}
|
||||
@@ -2266,7 +2276,7 @@ function group_create(&$group_id, $type, $name, $desc, $group_attributes, $allow
|
||||
$group_teampage = !empty($group_attributes['group_teampage']);
|
||||
unset($group_attributes['group_teampage']);
|
||||
|
||||
if (!sizeof($error))
|
||||
if (!count($error))
|
||||
{
|
||||
$current_legend = \phpbb\groupposition\legend::GROUP_DISABLED;
|
||||
$current_teampage = \phpbb\groupposition\teampage::GROUP_DISABLED;
|
||||
@@ -2339,7 +2349,7 @@ function group_create(&$group_id, $type, $name, $desc, $group_attributes, $allow
|
||||
generate_text_for_storage($sql_ary['group_desc'], $sql_ary['group_desc_uid'], $sql_ary['group_desc_bitfield'], $sql_ary['group_desc_options'], $allow_desc_bbcode, $allow_desc_urls, $allow_desc_smilies);
|
||||
}
|
||||
|
||||
if (sizeof($group_attributes))
|
||||
if (count($group_attributes))
|
||||
{
|
||||
// Merge them with $sql_ary to properly update the group
|
||||
$sql_ary = array_merge($sql_ary, $group_attributes);
|
||||
@@ -2465,7 +2475,7 @@ function group_create(&$group_id, $type, $name, $desc, $group_attributes, $allow
|
||||
|
||||
// Set user attributes
|
||||
$sql_ary = array();
|
||||
if (sizeof($group_attributes))
|
||||
if (count($group_attributes))
|
||||
{
|
||||
// Go through the user attributes array, check if a group attribute matches it and then set it. ;)
|
||||
foreach ($user_attribute_ary as $attribute)
|
||||
@@ -2485,7 +2495,7 @@ function group_create(&$group_id, $type, $name, $desc, $group_attributes, $allow
|
||||
}
|
||||
}
|
||||
|
||||
if (sizeof($sql_ary) && sizeof($user_ary))
|
||||
if (count($sql_ary) && count($user_ary))
|
||||
{
|
||||
group_set_user_default($group_id, $user_ary, $sql_ary);
|
||||
}
|
||||
@@ -2496,7 +2506,7 @@ function group_create(&$group_id, $type, $name, $desc, $group_attributes, $allow
|
||||
group_update_listings($group_id);
|
||||
}
|
||||
|
||||
return (sizeof($error)) ? $error : false;
|
||||
return (count($error)) ? $error : false;
|
||||
}
|
||||
|
||||
|
||||
@@ -2661,7 +2671,7 @@ function group_user_add($group_id, $user_id_ary = false, $username_ary = false,
|
||||
// We need both username and user_id info
|
||||
$result = user_get_id_name($user_id_ary, $username_ary);
|
||||
|
||||
if (!sizeof($user_id_ary) || $result !== false)
|
||||
if (empty($user_id_ary) || $result !== false)
|
||||
{
|
||||
return 'NO_USER';
|
||||
}
|
||||
@@ -2689,7 +2699,7 @@ function group_user_add($group_id, $user_id_ary = false, $username_ary = false,
|
||||
$add_id_ary = array_diff($user_id_ary, $add_id_ary);
|
||||
|
||||
// If we have no users
|
||||
if (!sizeof($add_id_ary) && !sizeof($update_id_ary))
|
||||
if (!count($add_id_ary) && !count($update_id_ary))
|
||||
{
|
||||
return 'GROUP_USERS_EXIST';
|
||||
}
|
||||
@@ -2697,7 +2707,7 @@ function group_user_add($group_id, $user_id_ary = false, $username_ary = false,
|
||||
$db->sql_transaction('begin');
|
||||
|
||||
// Insert the new users
|
||||
if (sizeof($add_id_ary))
|
||||
if (count($add_id_ary))
|
||||
{
|
||||
$sql_ary = array();
|
||||
|
||||
@@ -2714,7 +2724,7 @@ function group_user_add($group_id, $user_id_ary = false, $username_ary = false,
|
||||
$db->sql_multi_insert(USER_GROUP_TABLE, $sql_ary);
|
||||
}
|
||||
|
||||
if (sizeof($update_id_ary))
|
||||
if (count($update_id_ary))
|
||||
{
|
||||
$sql = 'UPDATE ' . USER_GROUP_TABLE . '
|
||||
SET group_leader = 1
|
||||
@@ -2806,7 +2816,7 @@ function group_user_del($group_id, $user_id_ary = false, $username_ary = false,
|
||||
// We need both username and user_id info
|
||||
$result = user_get_id_name($user_id_ary, $username_ary);
|
||||
|
||||
if (!sizeof($user_id_ary) || $result !== false)
|
||||
if (empty($user_id_ary) || $result !== false)
|
||||
{
|
||||
return 'NO_USER';
|
||||
}
|
||||
@@ -2882,7 +2892,7 @@ function group_user_del($group_id, $user_id_ary = false, $username_ary = false,
|
||||
|
||||
foreach ($special_group_data as $gid => $default_data_ary)
|
||||
{
|
||||
if (isset($sql_where_ary[$gid]) && sizeof($sql_where_ary[$gid]))
|
||||
if (isset($sql_where_ary[$gid]) && count($sql_where_ary[$gid]))
|
||||
{
|
||||
remove_default_rank($group_id, $sql_where_ary[$gid]);
|
||||
remove_default_avatar($group_id, $sql_where_ary[$gid]);
|
||||
@@ -3041,7 +3051,7 @@ function group_user_attributes($action, $group_id, $user_id_ary = false, $userna
|
||||
// We need both username and user_id info
|
||||
$result = user_get_id_name($user_id_ary, $username_ary);
|
||||
|
||||
if (!sizeof($user_id_ary) || $result !== false)
|
||||
if (empty($user_id_ary) || $result !== false)
|
||||
{
|
||||
return 'NO_USERS';
|
||||
}
|
||||
@@ -3096,7 +3106,7 @@ function group_user_attributes($action, $group_id, $user_id_ary = false, $userna
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if (!sizeof($user_id_ary))
|
||||
if (!count($user_id_ary))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -3137,7 +3147,7 @@ function group_user_attributes($action, $group_id, $user_id_ary = false, $userna
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$result = user_get_id_name($user_id_ary, $username_ary);
|
||||
if (!sizeof($user_id_ary) || $result !== false)
|
||||
if (!count($user_id_ary) || $result !== false)
|
||||
{
|
||||
return 'NO_USERS';
|
||||
}
|
||||
@@ -3500,7 +3510,7 @@ function group_update_listings($group_id)
|
||||
|
||||
$hold_ary = $auth->acl_group_raw_data($group_id, array('a_', 'm_'));
|
||||
|
||||
if (!sizeof($hold_ary))
|
||||
if (empty($hold_ary))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -3587,11 +3597,6 @@ function remove_newly_registered($user_id, $user_data = false)
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($user_data['user_new']))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$sql = 'SELECT group_id
|
||||
FROM ' . GROUPS_TABLE . "
|
||||
WHERE group_name = 'NEWLY_REGISTERED'
|
||||
|
@@ -44,7 +44,7 @@ class phpbb_hook
|
||||
*
|
||||
* @param array $valid_hooks array containing the hookable functions/methods
|
||||
*/
|
||||
function phpbb_hook($valid_hooks)
|
||||
function __construct($valid_hooks)
|
||||
{
|
||||
foreach ($valid_hooks as $_null => $method)
|
||||
{
|
||||
|
@@ -268,7 +268,7 @@ class mcp_ban
|
||||
{
|
||||
$post_info = phpbb_get_post_data($post_id, 'm_ban');
|
||||
|
||||
if (sizeof($post_info) && !empty($post_info[$post_id]))
|
||||
if (count($post_info) && !empty($post_info[$post_id]))
|
||||
{
|
||||
switch ($mode)
|
||||
{
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user