Compare commits
1115 Commits
release-3.
...
release-3.
Author | SHA1 | Date | |
---|---|---|---|
|
5be06ec66a | ||
|
623a8f2d0f | ||
|
819eca99a8 | ||
|
a7272fec97 | ||
|
f585f48aca | ||
|
d8dd6bad6b | ||
|
f2a0fe39a5 | ||
|
b09e1ad26d | ||
|
583068da9d | ||
|
2d24b9b61f | ||
|
04b0ba9f6d | ||
|
ccd1e1eebb | ||
|
a959e5f4cc | ||
|
697ccd41c4 | ||
|
6c98b01ad1 | ||
|
ffe72e500c | ||
|
6f1d848087 | ||
|
897b9f333b | ||
|
cf0170d5e3 | ||
|
00aab15f7c | ||
|
11a0516739 | ||
|
ef3de412b7 | ||
|
50a7167c9a | ||
|
51eaa8917f | ||
|
5f905f67ee | ||
|
19267242e3 | ||
|
452b3b4890 | ||
|
5b534369d1 | ||
|
dcf12cad26 | ||
|
81b4293cc5 | ||
|
d89c952955 | ||
|
e22dbbc7e8 | ||
|
a83bcaa8ac | ||
|
a24f9a7ad7 | ||
|
dbfea6d0fa | ||
|
e466318dc2 | ||
|
57ba51c529 | ||
|
9d4228291c | ||
|
dead984f54 | ||
|
2cd2cf2b39 | ||
|
146c4b1624 | ||
|
4bab984dac | ||
|
972f04ec6a | ||
|
40666dd96f | ||
|
3bd5fe6be8 | ||
|
1b1fc6ed24 | ||
|
edeeff597f | ||
|
9a2c74a68c | ||
|
166e0b5961 | ||
|
668defcf57 | ||
|
5f4943c183 | ||
|
9e38f412ea | ||
|
8d54f06d19 | ||
|
4d2940dd2f | ||
|
7a2f72df75 | ||
|
84a40b6ad1 | ||
|
8e80425c82 | ||
|
b7e4d0b0a5 | ||
|
3dcba7000b | ||
|
9e467a4e4a | ||
|
32f5dc3d8b | ||
|
4aac578908 | ||
|
b34e74254a | ||
|
e7c6c3f02b | ||
|
49bc477a87 | ||
|
6a7978965d | ||
|
478a4c4133 | ||
|
7cb7ca57c2 | ||
|
30449b69af | ||
|
9c67d02bd2 | ||
|
771090f13e | ||
|
ff67a09724 | ||
|
edf81e8de8 | ||
|
c3d77edd83 | ||
|
f34f28f283 | ||
|
4bf0534bf9 | ||
|
e37b3495f0 | ||
|
da53d95b95 | ||
|
3e8af1cf33 | ||
|
b24ce02526 | ||
|
5e7550ee53 | ||
|
84d302a2fd | ||
|
c6a654e859 | ||
|
5da50fcf6e | ||
|
e686f8bbdf | ||
|
d1e6c89b90 | ||
|
23aed66473 | ||
|
49bffc1851 | ||
|
8b21e7c0d9 | ||
|
ce937346f3 | ||
|
e30c6caac8 | ||
|
5e3ebda0da | ||
|
7e21d1dab5 | ||
|
6b658874bb | ||
|
ebf0bc2134 | ||
|
203bd4edd5 | ||
|
8b981f9ccd | ||
|
d548a2aa3e | ||
|
11256cd167 | ||
|
4d3188ba57 | ||
|
56251adc24 | ||
|
4262dfeaef | ||
|
100fd39c5e | ||
|
de75a3577f | ||
|
64b41f314e | ||
|
ae31a604e6 | ||
|
b002948e21 | ||
|
2e10961fff | ||
|
3768f7f2b8 | ||
|
92703127d3 | ||
|
3a62903fd1 | ||
|
e69d23dc88 | ||
|
0d7f8ba8af | ||
|
9ab4b30739 | ||
|
629a826f5b | ||
|
42dc7eb0f5 | ||
|
05f1476fc9 | ||
|
4b54df8d45 | ||
|
d0cdc5553a | ||
|
f576f42b4d | ||
|
23db3d0b83 | ||
|
04d34e6c8b | ||
|
6294c45bd3 | ||
|
498a516017 | ||
|
1bd20eb273 | ||
|
4ac2256683 | ||
|
886ca1dbb9 | ||
|
73ba70e98c | ||
|
b346f216c2 | ||
|
ed3f46a9b1 | ||
|
e0efd5ee57 | ||
|
352e995674 | ||
|
60b4d5132f | ||
|
18a08e1af1 | ||
|
2be39c5a8f | ||
|
cc23ac887c | ||
|
607f2e791f | ||
|
7b903919bf | ||
|
d0cf674f33 | ||
|
6f18963636 | ||
|
7b93df1522 | ||
|
2237030398 | ||
|
dbd653327c | ||
|
ae2237f640 | ||
|
817db2f135 | ||
|
8bb48b575d | ||
|
7d7b536874 | ||
|
ef6af2682b | ||
|
84bbd4490e | ||
|
11e312f41c | ||
|
82bc9baa24 | ||
|
2ec5c5de17 | ||
|
d43da6cee9 | ||
|
abf98f92e6 | ||
|
bcac964cd0 | ||
|
c0449d31d6 | ||
|
de947d31f6 | ||
|
7d24510d68 | ||
|
afa4c07a13 | ||
|
57fa7435ad | ||
|
af7f62505e | ||
|
76f7175fc4 | ||
|
bbbf122d05 | ||
|
798490bf1d | ||
|
4a1f617473 | ||
|
e0476d4f53 | ||
|
a8fe3926dc | ||
|
da7b24449d | ||
|
c083a4adda | ||
|
783a156bd2 | ||
|
a259d61f57 | ||
|
8b28881aa2 | ||
|
4f05364eb9 | ||
|
0bab5db1dd | ||
|
08a6f663de | ||
|
e8769fd561 | ||
|
efc09df8df | ||
|
dc9245dd7a | ||
|
2503723e2f | ||
|
c6308ee7c0 | ||
|
002f08ba35 | ||
|
7ccb19fa00 | ||
|
8f5d761112 | ||
|
38a1442d40 | ||
|
f688bc6160 | ||
|
e6407907e2 | ||
|
8eb4ec29ee | ||
|
338abf77e3 | ||
|
f9c50a8db3 | ||
|
e59b96e968 | ||
|
714533d12e | ||
|
89f7fc63e8 | ||
|
a50e2c0c47 | ||
|
5170cd67fb | ||
|
bf7a4f629d | ||
|
5dbfd14699 | ||
|
7b026eff79 | ||
|
9238d28353 | ||
|
7bb617eeb6 | ||
|
2c65b9b133 | ||
|
dfb7bb1de1 | ||
|
0d349a82ca | ||
|
cdf580ee37 | ||
|
3d18d6dc77 | ||
|
d8343f2108 | ||
|
c952622fa0 | ||
|
b5573bb92d | ||
|
790f7ded5b | ||
|
23a45fcace | ||
|
d2a2c183ed | ||
|
832c9f64e0 | ||
|
405681f138 | ||
|
b7db12a593 | ||
|
4143f65b46 | ||
|
5f7fa4c89c | ||
|
83d8ea013b | ||
|
072f4c9260 | ||
|
3ac95f48f8 | ||
|
6e8da5a424 | ||
|
1214210864 | ||
|
abce057467 | ||
|
88d16b47a4 | ||
|
c2d254ea41 | ||
|
2c6369c5d9 | ||
|
f9389995e7 | ||
|
d4e0c08915 | ||
|
41f78b5c49 | ||
|
d70ad1230b | ||
|
f94bbcb4fe | ||
|
9203bf3141 | ||
|
6687b7e9ab | ||
|
823783773c | ||
|
94aff53e3f | ||
|
3cb86cb6f1 | ||
|
1e45a05000 | ||
|
25c4c481d7 | ||
|
17b94b8f9c | ||
|
29cda5f2ad | ||
|
91212d5453 | ||
|
32a2546c5d | ||
|
bac02a348e | ||
|
a620651ca1 | ||
|
99d3995548 | ||
|
c78ee4e201 | ||
|
774582876c | ||
|
bed8df20d2 | ||
|
593c7ed0e4 | ||
|
c221571963 | ||
|
20b16fda4f | ||
|
2b0acdcea4 | ||
|
9057f72fc7 | ||
|
eebab029fd | ||
|
7a55bcc0f3 | ||
|
51831924c5 | ||
|
bb7f843344 | ||
|
9005711ad7 | ||
|
fb94bd11fb | ||
|
852337cacd | ||
|
e8f9458a21 | ||
|
78b0c938a2 | ||
|
9c84b3b5fb | ||
|
6ca3a30576 | ||
|
b627a097bb | ||
|
0f6d16920b | ||
|
db3782e491 | ||
|
189d94e897 | ||
|
cfbd051d52 | ||
|
d978564600 | ||
|
2e20bae695 | ||
|
1f385b536a | ||
|
27a70f573f | ||
|
a39a421acb | ||
|
bafd649eea | ||
|
e3090e04c3 | ||
|
049f584111 | ||
|
d6cd90d325 | ||
|
d1c4f5bc35 | ||
|
df4b391baa | ||
|
01073ffcbf | ||
|
9366f29fd7 | ||
|
b5fed65fe3 | ||
|
fedd0ae7f3 | ||
|
da6f751cef | ||
|
0fc6816be6 | ||
|
143578ad09 | ||
|
2a83290e7c | ||
|
be1d1c7d05 | ||
|
518902ef51 | ||
|
f5801320b7 | ||
|
44fcdd007f | ||
|
8b6c6e794a | ||
|
182312010b | ||
|
3ec3dfcf3a | ||
|
35e5dc46c7 | ||
|
e80bb565ce | ||
|
9951458ebf | ||
|
45d7e18f6b | ||
|
ef39f3a9ab | ||
|
f1e11414e8 | ||
|
ba205a6bce | ||
|
d589142c0b | ||
|
75dd91412b | ||
|
cf93c6503a | ||
|
b1d829c232 | ||
|
39cd228e06 | ||
|
16deefa7f8 | ||
|
0daa999fd0 | ||
|
30f256102f | ||
|
b00b504343 | ||
|
080690073a | ||
|
8fda16527e | ||
|
abef078ab9 | ||
|
7580798a5a | ||
|
cc134d5fed | ||
|
33239183ae | ||
|
6025c40cab | ||
|
622d5b2643 | ||
|
5ca77df084 | ||
|
67502c0d22 | ||
|
b7a89187b5 | ||
|
a462f14aa3 | ||
|
1d2a127144 | ||
|
cb12a065df | ||
|
309a6b9313 | ||
|
e52bc2d022 | ||
|
1c0c9c1bca | ||
|
dcb36d572d | ||
|
502214bf06 | ||
|
3bc2b54128 | ||
|
d004a1c6b8 | ||
|
62e13e945c | ||
|
e4b30c474b | ||
|
4527789e50 | ||
|
084aa56777 | ||
|
66279e1a57 | ||
|
345c25c367 | ||
|
4119be5a3d | ||
|
d4fb3996d3 | ||
|
b3b7f8e925 | ||
|
7f5f5c216b | ||
|
d741ab57a8 | ||
|
7a478b27dd | ||
|
4fc6e7dbc7 | ||
|
350786c969 | ||
|
1e28748c0c | ||
|
aa1b427e45 | ||
|
a67db63a18 | ||
|
603726371c | ||
|
c701e8a131 | ||
|
5465c594ca | ||
|
f2fb8e339d | ||
|
9833eb4f13 | ||
|
b8a31241a3 | ||
|
9e06beb48d | ||
|
70cbe67105 | ||
|
684a050916 | ||
|
59a1f4e8ac | ||
|
a8c033f655 | ||
|
5e99c09abe | ||
|
65b40f15f5 | ||
|
de90dd25b2 | ||
|
c2b4636008 | ||
|
740be0507e | ||
|
ab3e4b8abc | ||
|
6e0d12094a | ||
|
5a107d9dc1 | ||
|
c7a0b4479d | ||
|
0e7448e2b3 | ||
|
1b75411e81 | ||
|
923fdb0aa0 | ||
|
b73b9f1dec | ||
|
f42a737419 | ||
|
005c27e73d | ||
|
429b99922e | ||
|
199d823f7a | ||
|
713fe496ce | ||
|
cfeb2bec80 | ||
|
52aafb4dea | ||
|
dde72c58b0 | ||
|
11242dd07d | ||
|
5382552fc8 | ||
|
45baaf6022 | ||
|
34141b576e | ||
|
2226043325 | ||
|
96d97ae2d2 | ||
|
bdad879508 | ||
|
e0180991bf | ||
|
af3cde98f4 | ||
|
9c320ccdce | ||
|
7f820ee962 | ||
|
aef5be3d17 | ||
|
34602037dc | ||
|
9cd0295dd8 | ||
|
818df0ec68 | ||
|
c018b3bbc7 | ||
|
1ad09d9c8b | ||
|
ae8129b699 | ||
|
95add752b7 | ||
|
aa0c55ed8f | ||
|
c1702b8e19 | ||
|
acaa10de52 | ||
|
d7c96cc60c | ||
|
416728fc17 | ||
|
ec207d0a71 | ||
|
89723b17d9 | ||
|
2fb7ef2668 | ||
|
1a3350619f | ||
|
98c9734db4 | ||
|
62abead26d | ||
|
969718fc91 | ||
|
6d8df7332c | ||
|
d833f29069 | ||
|
46a789de5c | ||
|
c818873d48 | ||
|
ce74a0bd6c | ||
|
cd6c0427fb | ||
|
0bc352ea7e | ||
|
78c0221855 | ||
|
f80dc9dc16 | ||
|
18e8f281be | ||
|
e98a5afd07 | ||
|
281661c23e | ||
|
55a3d88793 | ||
|
e25e411e2b | ||
|
59a178f3cb | ||
|
2308472eb0 | ||
|
887f83589f | ||
|
eae592691c | ||
|
196eb98ba8 | ||
|
0fc70d4b15 | ||
|
4d63032024 | ||
|
901875a1fb | ||
|
463c62df18 | ||
|
c5178a19b2 | ||
|
18fc621d73 | ||
|
552f35952a | ||
|
a53b57c8a2 | ||
|
8769f185f5 | ||
|
4a7f905c6a | ||
|
c46024bfa2 | ||
|
60f31d48e2 | ||
|
615e5c1076 | ||
|
ba1e3fd661 | ||
|
366dfce846 | ||
|
70c74df009 | ||
|
ee658bfe7b | ||
|
bca1b96b2e | ||
|
47514ca2df | ||
|
eed355b798 | ||
|
a151ad912a | ||
|
fcc7e7d333 | ||
|
073f3e4470 | ||
|
ef0838e931 | ||
|
bc04581b80 | ||
|
313a224c68 | ||
|
96339b7c86 | ||
|
b0f5ef0b1a | ||
|
77c2b2a51d | ||
|
17620bba46 | ||
|
9d181daa71 | ||
|
53ed8a3cd9 | ||
|
02202b1503 | ||
|
b16a56394b | ||
|
7d08bf5b3e | ||
|
84df225038 | ||
|
8575cc69d1 | ||
|
73a0988f59 | ||
|
90025ae3e7 | ||
|
23db98276f | ||
|
c60497f009 | ||
|
009a8cb2d5 | ||
|
9ab27fe129 | ||
|
d49f70fbc7 | ||
|
3521e74939 | ||
|
558d604d83 | ||
|
55907c1724 | ||
|
ddff81c21f | ||
|
a875802c06 | ||
|
1d34968967 | ||
|
284a5671c5 | ||
|
71177c38dc | ||
|
81c92a7de9 | ||
|
35d2467c94 | ||
|
d5021aeda4 | ||
|
55f6329c1d | ||
|
e120e6ac97 | ||
|
9f54d2b590 | ||
|
6c308d81bd | ||
|
418aabb46e | ||
|
335520fc45 | ||
|
bbd0a8985c | ||
|
5fc92a03b2 | ||
|
40c79f2a26 | ||
|
d6d9ff51b2 | ||
|
42d831f472 | ||
|
be472cc7bb | ||
|
1a484f08bb | ||
|
d9f4964d91 | ||
|
b9db47e3f5 | ||
|
0b52eb2298 | ||
|
90b82d1a5f | ||
|
499088b62f | ||
|
1efbb5b3bb | ||
|
9eab4ba740 | ||
|
9d75f3fca8 | ||
|
407b9d3c6b | ||
|
84d77d6cd5 | ||
|
7f2b932a1b | ||
|
44540b6112 | ||
|
50b3c2b49e | ||
|
4a08d74571 | ||
|
285e35992a | ||
|
2e7a60d986 | ||
|
4d7cb7ca73 | ||
|
ca883f1196 | ||
|
3d0153de60 | ||
|
0bc2f9f242 | ||
|
476b762542 | ||
|
a32f4869de | ||
|
754b5d6349 | ||
|
eca0128d0a | ||
|
1df97c205d | ||
|
d4ca81f23f | ||
|
4276f49efa | ||
|
ee70b364c7 | ||
|
7f7d8d9101 | ||
|
faf267c419 | ||
|
f0619b481f | ||
|
7e8274c345 | ||
|
0a52d732e4 | ||
|
cfdaf2d63f | ||
|
29ccbd8098 | ||
|
1a001fc233 | ||
|
d5dd9c929d | ||
|
3bda9a3c11 | ||
|
7112058d7b | ||
|
c3a0e09ddb | ||
|
e132e9ba76 | ||
|
94da39cd88 | ||
|
5b9fe33b1b | ||
|
3cb1907e76 | ||
|
aeafb90208 | ||
|
2348580255 | ||
|
9b030fd174 | ||
|
f4c423cea1 | ||
|
4ccba99047 | ||
|
d7f4715b96 | ||
|
3d7def4196 | ||
|
d087d85618 | ||
|
d5a79ad555 | ||
|
6b87e06292 | ||
|
f3ab7aae9e | ||
|
52b83bd5e9 | ||
|
bbfbb3f1fa | ||
|
4cdcb6d5d3 | ||
|
0f13635fb8 | ||
|
323167bb94 | ||
|
c0104d0243 | ||
|
8a6d55520d | ||
|
fa474c4378 | ||
|
d0ab101c32 | ||
|
8f09ff210f | ||
|
149a2dd91a | ||
|
33738fa3db | ||
|
70f1741331 | ||
|
160ff3471d | ||
|
4618a3e2f8 | ||
|
c3720739cb | ||
|
5d8bea9060 | ||
|
5cd4941c55 | ||
|
134a5e0391 | ||
|
c7cc8a098e | ||
|
21cc1fda85 | ||
|
d53b584c9a | ||
|
5fa6871ebf | ||
|
772bbdfeae | ||
|
5ad69bbecf | ||
|
d0a1650a04 | ||
|
fb71e6dde6 | ||
|
c887eedaa5 | ||
|
d66a53a531 | ||
|
dbc09bf0d4 | ||
|
8b23272c33 | ||
|
c37d5f9b7c | ||
|
18de60c0e0 | ||
|
8abf259273 | ||
|
62973faf4b | ||
|
a7b1b71921 | ||
|
2ad87c662f | ||
|
71828ee8df | ||
|
e15b9dc782 | ||
|
0daf148aaa | ||
|
df9331084b | ||
|
1e73f8d5ea | ||
|
8c73f63529 | ||
|
c814ecc143 | ||
|
4928afedc6 | ||
|
ea4b993516 | ||
|
6647d390b0 | ||
|
6b1cd2d312 | ||
|
ec855f1817 | ||
|
3e451cbe75 | ||
|
4df853abcc | ||
|
a07b29c1df | ||
|
6e5f33e5fb | ||
|
62f69224a4 | ||
|
5cd3e7627c | ||
|
14fecb2f02 | ||
|
4565cac049 | ||
|
e29e0e5018 | ||
|
335d88cdbb | ||
|
37b919142f | ||
|
c8be24fd5e | ||
|
0442957420 | ||
|
106bc1c232 | ||
|
c5a15c0635 | ||
|
d08d988df4 | ||
|
6f3f6282d1 | ||
|
3ac583271f | ||
|
9f9e392c7d | ||
|
56cbff720d | ||
|
80e1c233d9 | ||
|
b650f45d55 | ||
|
03ded5853b | ||
|
525a62f72e | ||
|
269dee4189 | ||
|
ffc5a73a0c | ||
|
d152bbc727 | ||
|
702a51b01c | ||
|
9b5493372d | ||
|
7bfb8686d9 | ||
|
c63bc6ee93 | ||
|
94b72cfbdb | ||
|
8e737e483e | ||
|
4167be1e2c | ||
|
5bfcc7e707 | ||
|
d15e5372ca | ||
|
12fe882741 | ||
|
b8c388f184 | ||
|
379eae1a92 | ||
|
e6e7d7040a | ||
|
059790f386 | ||
|
835ee2ba63 | ||
|
5e215aef26 | ||
|
461ce3f892 | ||
|
cba12aca2a | ||
|
c24a840048 | ||
|
8a06f21ea9 | ||
|
5c3ca7404d | ||
|
31ae574830 | ||
|
eff928c29b | ||
|
3f4dcc6920 | ||
|
71d3ddc623 | ||
|
d28d90bd90 | ||
|
8d6ab63fea | ||
|
3db7ac0aad | ||
|
e4b4428173 | ||
|
1f345a8cf9 | ||
|
7fd3767bbd | ||
|
098854a822 | ||
|
bbf4bcc986 | ||
|
03f9c69e60 | ||
|
60f60acea3 | ||
|
153d1691ae | ||
|
f0850f1915 | ||
|
997b229723 | ||
|
13948718c6 | ||
|
02d28c28cd | ||
|
f3d332b78f | ||
|
950c72a8a5 | ||
|
6322970766 | ||
|
fa1c61f608 | ||
|
c7ce6cd26f | ||
|
ec8aeaf2cd | ||
|
f23d2ec42f | ||
|
e31720bb6e | ||
|
f9d34a16dd | ||
|
6f56dc8568 | ||
|
bf86553daa | ||
|
b934617a3b | ||
|
957b23765f | ||
|
088907fe8e | ||
|
4398a51dc6 | ||
|
27cfda74fc | ||
|
8314ce6871 | ||
|
4559aca723 | ||
|
9e3bc9a3f9 | ||
|
877774a296 | ||
|
0a775e0433 | ||
|
39a3f4f6c8 | ||
|
25b54791f9 | ||
|
93185574b5 | ||
|
3df25babce | ||
|
bf20fb03ef | ||
|
67a963ac42 | ||
|
74385b8fce | ||
|
6111f5fa74 | ||
|
bb7d294190 | ||
|
8a4df90dac | ||
|
1bcce75633 | ||
|
072df2217c | ||
|
e1eac80b8f | ||
|
c6a371531b | ||
|
fbc603861d | ||
|
1da6b30cf0 | ||
|
cd85f1b632 | ||
|
7c5d872344 | ||
|
48b64b0a61 | ||
|
c1d644769f | ||
|
1e4853507a | ||
|
8832851b8e | ||
|
2787e799e1 | ||
|
a09d022d5e | ||
|
4e06ab16f0 | ||
|
1f2cb69c8a | ||
|
5347eac69c | ||
|
2864e77d6c | ||
|
a3be531020 | ||
|
427d2de3ea | ||
|
e86b7ce562 | ||
|
f4f983c0f6 | ||
|
bbb6d6a452 | ||
|
efee422707 | ||
|
7330c0afd3 | ||
|
6678570f49 | ||
|
e9eafece3f | ||
|
0e6cd94fb4 | ||
|
0aea283ab0 | ||
|
b1336ae016 | ||
|
7254a52812 | ||
|
5182d02da5 | ||
|
ffe0e46e82 | ||
|
d50cec998c | ||
|
b53fd867be | ||
|
a93df0e511 | ||
|
a166f6f42c | ||
|
99574cf5e5 | ||
|
19421fcdef | ||
|
9f59aa59d9 | ||
|
7f99e1c857 | ||
|
036b5c4244 | ||
|
3c23242bfe | ||
|
be30d8251a | ||
|
9232367b35 | ||
|
dd182c5433 | ||
|
67478a0f94 | ||
|
e72c1540cb | ||
|
e6bbde2bff | ||
|
ab4b1afd98 | ||
|
7127d08c8f | ||
|
b16854ab8c | ||
|
bb4287ab2d | ||
|
9628e8df3b | ||
|
2690038d40 | ||
|
3fef570950 | ||
|
69450c7152 | ||
|
3e710fe393 | ||
|
e5f2eee167 | ||
|
899173eebd | ||
|
7273591560 | ||
|
c46a6443be | ||
|
b6786f8ba1 | ||
|
ab07be8157 | ||
|
c130165bfa | ||
|
5f237a0426 | ||
|
1e94b0ae71 | ||
|
5fea945b5b | ||
|
05d8264de6 | ||
|
208923563e | ||
|
afe99f9050 | ||
|
40e676ad03 | ||
|
cc210b1842 | ||
|
36f8fb2b37 | ||
|
5b96d30540 | ||
|
6f5524de26 | ||
|
872caf805c | ||
|
ef10b02f78 | ||
|
f48cc8bbe9 | ||
|
8da3a6f117 | ||
|
f0f88c287c | ||
|
7495055907 | ||
|
5eb0d422c8 | ||
|
dff1ea6b85 | ||
|
e3e427fa24 | ||
|
9d72463824 | ||
|
35edd7a043 | ||
|
252018b813 | ||
|
be90e97452 | ||
|
a9fa20bb91 | ||
|
4b16add055 | ||
|
73d1bf9fea | ||
|
b2b5addd09 | ||
|
513b2f8296 | ||
|
32b25d7b11 | ||
|
acfb9b9539 | ||
|
1c6ebcf02b | ||
|
ebd5aace3f | ||
|
5ce89ae82f | ||
|
4b42589cfa | ||
|
ffbe8cdc96 | ||
|
4c11ea97d5 | ||
|
ed2d080551 | ||
|
33d7eb69ef | ||
|
a2fbde44c0 | ||
|
b2674cf1f6 | ||
|
c423038587 | ||
|
0cfa977953 | ||
|
12fba95892 | ||
|
c86e5e8514 | ||
|
b0383a90e1 | ||
|
a5c65449de | ||
|
ee03b4f1ef | ||
|
874f3584e2 | ||
|
9a03b3aab6 | ||
|
a35fbdb3e9 | ||
|
40798ae616 | ||
|
9cdbb69f9e | ||
|
8a0c227bf9 | ||
|
b88b8305fd | ||
|
1dce9576e9 | ||
|
7014d824f0 | ||
|
25b013f781 | ||
|
eb4594d8ee | ||
|
be1b114114 | ||
|
e08cd70a89 | ||
|
40ab75478e | ||
|
47f04d7620 | ||
|
816465bfe9 | ||
|
1367fc234f | ||
|
a737eeb6ce | ||
|
7ed065a630 | ||
|
7d6fdcfaa5 | ||
|
14585fcb4f | ||
|
7fef91afd2 | ||
|
2c9e178a42 | ||
|
9f7f366573 | ||
|
c09023d1db | ||
|
ddeb696b25 | ||
|
eaeb88133f | ||
|
e34b92882a | ||
|
4b9434bf1b | ||
|
08e186af8e | ||
|
f6057c5eab | ||
|
ed6b8f84ad | ||
|
9334100cb3 | ||
|
a5fae1b1f0 | ||
|
41966c481f | ||
|
d0e5c0a187 | ||
|
d17904884e | ||
|
6e00529f36 | ||
|
a8027c542f | ||
|
4d0b04a397 | ||
|
3134b6b70e | ||
|
d1bff80dd1 | ||
|
f02dc44a23 | ||
|
92b5222295 | ||
|
251868dd7e | ||
|
23069a13e2 | ||
|
40006376f2 | ||
|
e66a28eb14 | ||
|
03e3ee7f16 | ||
|
0beb9128f9 | ||
|
d99cd2d02e | ||
|
dab0728357 | ||
|
8002af7526 | ||
|
38c5ee6eec | ||
|
e4a041fedb | ||
|
ebbe6a7791 | ||
|
7e8bb68999 | ||
|
ff39ffacf6 | ||
|
c29db8e7a4 | ||
|
6564446b0f | ||
|
add3d3e760 | ||
|
da189a105b | ||
|
10c67fe12a | ||
|
9d2c6b6ed6 | ||
|
6b92fccd06 | ||
|
4e5e356555 | ||
|
9e38e9dc6f | ||
|
c6557e3800 | ||
|
ce47170c29 | ||
|
4df125625c | ||
|
8ef238ea73 | ||
|
c99ed64473 | ||
|
e3e16a0166 | ||
|
2a08c60a62 | ||
|
b27c0ab992 | ||
|
3bfd87cda4 | ||
|
53169b1303 | ||
|
1d49ccd920 | ||
|
f075fb78f6 | ||
|
17f4dce0fc | ||
|
1f4bb2c149 | ||
|
e8464d7fe2 | ||
|
fbf7726642 | ||
|
ff59240748 | ||
|
bfba52781b | ||
|
659e15656f | ||
|
10e72a36a3 | ||
|
e0733ae435 | ||
|
ef9abd7165 | ||
|
9cc4d60b88 | ||
|
ec749a2b39 | ||
|
6d3fca9a41 | ||
|
9cbb9b4253 | ||
|
fce1be2684 | ||
|
f02e3a4076 | ||
|
3d8aaf6aaf | ||
|
ffb7d618ac | ||
|
11269fe62a | ||
|
a5a6855a0d | ||
|
a0287a62c1 | ||
|
2b76d7dc7c | ||
|
74e8f9bd4e | ||
|
a415a4ec2b | ||
|
f756632185 | ||
|
c28ef9afdd | ||
|
ba477f77c7 | ||
|
8ed5a047ec | ||
|
e6509aaf60 | ||
|
9caec668af | ||
|
a09c38f1cc | ||
|
0f6a0d820e | ||
|
8f5e3d5efb | ||
|
67c987f0d0 | ||
|
bf59d8dd74 | ||
|
cea35c486c | ||
|
b64d8c59b0 | ||
|
349aaab6ac | ||
|
da9ac2da72 | ||
|
8ae1b0c52e | ||
|
58d8ea5b0b | ||
|
d86bdcb2a7 | ||
|
d2a4d6624f | ||
|
d9bdd05c80 | ||
|
3350df131f | ||
|
9ce8b62894 | ||
|
65ffc76e2f | ||
|
b64da23fe1 | ||
|
67c9f4d064 | ||
|
d4c078cc78 | ||
|
9d9c57f334 | ||
|
38f184ad6b | ||
|
7ba1a96427 | ||
|
e3571fc6eb | ||
|
953a98dc0b | ||
|
de3d7aca16 | ||
|
346f654b2e | ||
|
87578e90eb | ||
|
874356e57f | ||
|
26bf79425c | ||
|
d36b0452bd | ||
|
64d880a15c | ||
|
387e4b942b | ||
|
6fd8f1b835 | ||
|
2dab3c8c52 | ||
|
35b7f94754 | ||
|
2532583765 | ||
|
7a34bf9bf5 | ||
|
281cc53532 | ||
|
3638b2ff64 | ||
|
8c27c7f10b | ||
|
88034ea2f0 | ||
|
86f66b5f72 | ||
|
838b1250f6 | ||
|
4da3d41083 | ||
|
9d9b8139d0 | ||
|
179a7a4c71 | ||
|
970ed40b09 | ||
|
0e0c649477 | ||
|
b3bcc1b501 | ||
|
652a7630bb | ||
|
7dad863a41 | ||
|
c61fa1aaa1 | ||
|
8376a027a1 | ||
|
d769e59090 | ||
|
abc5dbcd71 | ||
|
59ab09273f | ||
|
92d7c16782 | ||
|
0104188074 | ||
|
d455dd68f6 | ||
|
cf036ea0e8 | ||
|
655d95002c | ||
|
0a1f8388d0 | ||
|
3f88be6527 | ||
|
50ed202aac | ||
|
a92589436a | ||
|
b0f1a0f4bb | ||
|
6ff0aaaa70 | ||
|
ffbe1d424b | ||
|
a5922a0e8b | ||
|
fa06c7967e | ||
|
d5f99e0478 | ||
|
7b43d5c54e | ||
|
3ba62628dc | ||
|
faad779cf6 | ||
|
f6b21a2789 | ||
|
867a45138c | ||
|
aea67c8e37 | ||
|
d2334ab3e0 | ||
|
5b1c9831c2 | ||
|
a66e4770c1 | ||
|
0929267e72 | ||
|
dd9c415020 | ||
|
dd6efdad59 | ||
|
13320a08ef | ||
|
8098d313e6 | ||
|
458f9cade6 | ||
|
7512efed9e | ||
|
2929f28243 | ||
|
7b0cabc416 | ||
|
6463354a39 | ||
|
9f1493ce73 | ||
|
91dc002c31 | ||
|
54b5ee5806 | ||
|
75780d7fc8 | ||
|
61df1ac2b3 | ||
|
46384adf00 | ||
|
719aa66224 | ||
|
15507ffc16 | ||
|
bb4b3d2731 | ||
|
4dab281da1 | ||
|
1aea572aca | ||
|
fda5d8d637 | ||
|
1896825f39 | ||
|
566510769b | ||
|
4700b44125 | ||
|
641a9e5441 | ||
|
7fbf5649eb | ||
|
dfbc109b59 | ||
|
0a419781c2 | ||
|
0795b6bd6c | ||
|
ddd1937655 | ||
|
3bf55c0b4d | ||
|
a8d3cbe53b | ||
|
96a734b012 | ||
|
b7f83b2cfc | ||
|
bfecae1d60 | ||
|
1c02f7e032 | ||
|
f045744606 | ||
|
10a4f79135 | ||
|
4159bb1340 | ||
|
ac8a4b05b4 | ||
|
80a7f6930c | ||
|
614f975e68 | ||
|
df3447b725 | ||
|
e9cb9baedb | ||
|
e279a779fc | ||
|
e596d0b6ce | ||
|
0388d82504 | ||
|
909bb523bf | ||
|
589394e80b | ||
|
7f7f60698c | ||
|
13d4394844 | ||
|
70483d6088 | ||
|
2f92bc38e6 | ||
|
499c1467df | ||
|
c5227ab2a5 | ||
|
fe1f7beaf8 | ||
|
ac8b07ddd9 | ||
|
aab98b8626 | ||
|
1145af71bf | ||
|
b7f69edaa2 | ||
|
8f1a1874a9 | ||
|
6f52873636 | ||
|
aa10bc2059 | ||
|
dfba919db8 | ||
|
bc7db0ae16 | ||
|
88798b3514 | ||
|
79ce924bc1 | ||
|
d43e8c94f5 | ||
|
b54dbe0df6 | ||
|
79a1495f66 | ||
|
893e4b3067 | ||
|
a349db54d6 | ||
|
41d0b5d3a2 | ||
|
a5a18fb6dd | ||
|
a8c62e707a | ||
|
b67b67f2df | ||
|
ee90d227c2 | ||
|
51f46a8f91 | ||
|
6ac088ea2f | ||
|
6a4179cef5 | ||
|
90012c86e8 | ||
|
aa3a46a35f | ||
|
2e7ae40d49 | ||
|
eb83bd5797 | ||
|
f46057ca02 | ||
|
f4898b9258 | ||
|
9c9623e47f | ||
|
b8ecd1a656 | ||
|
bb4b04f89a | ||
|
d24fa2e777 | ||
|
9348b0c4f2 | ||
|
b00d02496e | ||
|
595f9c132b | ||
|
b9289340d9 | ||
|
a609c9db82 | ||
|
86b3c54c77 | ||
|
30f292f5a2 | ||
|
f930a75471 | ||
|
8a9c2c055c | ||
|
0a4ffb7cf8 | ||
|
834a93f76c | ||
|
efd4b43c1b | ||
|
d43f196fa6 | ||
|
a143a19b8b | ||
|
4522db7624 | ||
|
1fc7bd107d | ||
|
203f9c24d4 | ||
|
a623868f20 | ||
|
ce8c09f51f | ||
|
c381ad2002 | ||
|
40497ec824 | ||
|
ca7f4fb531 |
7
.gitignore
vendored
@@ -1,9 +1,8 @@
|
||||
*~
|
||||
/phpunit.xml
|
||||
/phpBB/cache/twig/*
|
||||
/phpBB/cache/*.html
|
||||
/phpBB/cache/*.php
|
||||
/phpBB/cache/*.lock
|
||||
/phpBB/cache/*
|
||||
!/phpBB/cache/.htaccess
|
||||
!/phpBB/cache/index.html
|
||||
/phpBB/composer.phar
|
||||
/phpBB/config*.php
|
||||
/phpBB/ext/*
|
||||
|
78
.jscsrc
Normal file
@@ -0,0 +1,78 @@
|
||||
|
||||
{
|
||||
"excludeFiles": ["node_modules/**", "**/build/**"],
|
||||
"requireCurlyBraces": [
|
||||
"if", "else", "for", "while", "do", "try", "catch"
|
||||
],
|
||||
"requireSpaceBeforeKeywords": [
|
||||
"else", "while", "catch"
|
||||
],
|
||||
"requireSpaceAfterKeywords": [
|
||||
"do", "for", "if", "else", "switch", "case", "try", "catch", "while", "return", "typeof"
|
||||
],
|
||||
"requireSpaceBeforeBlockStatements": true,
|
||||
"requireParenthesesAroundIIFE": true,
|
||||
"requireSpacesInConditionalExpression": {
|
||||
"afterTest": true,
|
||||
"beforeConsequent": true,
|
||||
"afterConsequent": true,
|
||||
"beforeAlternate": true
|
||||
},
|
||||
"requireSpacesInAnonymousFunctionExpression": {
|
||||
"beforeOpeningCurlyBrace": true
|
||||
},
|
||||
"disallowSpacesInNamedFunctionExpression": {
|
||||
"beforeOpeningRoundBrace": true
|
||||
},
|
||||
"requireSpacesInFunction": {
|
||||
"beforeOpeningCurlyBrace": true
|
||||
},
|
||||
"disallowSpacesInCallExpression": true,
|
||||
"requireBlocksOnNewline": true,
|
||||
"requirePaddingNewlinesBeforeKeywords": ["case"],
|
||||
"disallowEmptyBlocks": true,
|
||||
"disallowSpacesInsideArrayBrackets": "nested",
|
||||
"disallowSpacesInsideParentheses": true,
|
||||
"requireSpacesInsideObjectBrackets": "all",
|
||||
"disallowQuotedKeysInObjects": "allButReserved",
|
||||
"disallowSpaceAfterObjectKeys": true,
|
||||
"requireSpaceBeforeObjectValues": true,
|
||||
"requireCommaBeforeLineBreak": true,
|
||||
"requireOperatorBeforeLineBreak": [
|
||||
"?", "=", "+", "-", "/", "*", "===", "!==", ">", ">=", "<", "<="
|
||||
],
|
||||
"disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"],
|
||||
"disallowSpaceBeforePostfixUnaryOperators": ["++", "--"],
|
||||
"requireSpaceBeforeBinaryOperators": [
|
||||
"=", "+", "+=", "-", "-=", "/", "/=", "*", "*=", "===", "!==", "<", "<=", ">", ">="
|
||||
],
|
||||
"requireSpaceAfterBinaryOperators": [
|
||||
"=", "+", "+=", "-", "-=", "/", "/=", "*", "*=", "===", "!==", "<", "<=", ">", ">="
|
||||
],
|
||||
"disallowKeywords": ["with"],
|
||||
"disallowMultipleLineStrings": true,
|
||||
"disallowMixedSpacesAndTabs": "smart",
|
||||
"disallowTrailingWhitespace": true,
|
||||
"disallowTrailingComma": true,
|
||||
"disallowKeywordsOnNewLine": ["else"],
|
||||
"requireLineFeedAtFileEnd": true,
|
||||
"maximumLineLength": {
|
||||
"value": 120,
|
||||
"tabSize": 4,
|
||||
"allowUrlComments": true,
|
||||
"allowRegex": true
|
||||
},
|
||||
"requireCapitalizedConstructors": true,
|
||||
"requireDotNotation": true,
|
||||
"disallowYodaConditions": true,
|
||||
"requireSpaceAfterLineComment": {
|
||||
"allExcept": ["#", "="]
|
||||
},
|
||||
"disallowNewlineBeforeBlockStatements": true,
|
||||
"validateQuoteMarks": {
|
||||
"mark": "'",
|
||||
"escape": true
|
||||
},
|
||||
"validateParameterSeparator": ", ",
|
||||
"safeContextKeyword": ["that"]
|
||||
}
|
24
.jshintrc
Normal file
@@ -0,0 +1,24 @@
|
||||
|
||||
{
|
||||
"bitwise": true,
|
||||
"curly": true,
|
||||
"eqeqeq": true,
|
||||
"es3": true,
|
||||
"forin": false,
|
||||
"freeze": true,
|
||||
"newcap": true,
|
||||
"noarg": true,
|
||||
"noempty": true,
|
||||
"nonbsp": true,
|
||||
"undef": true,
|
||||
"unused": true,
|
||||
"strict": true,
|
||||
|
||||
"browser": true,
|
||||
"devel": true,
|
||||
"jquery": true,
|
||||
|
||||
"globals": {
|
||||
"JSON": true
|
||||
}
|
||||
}
|
@@ -16,13 +16,18 @@ matrix:
|
||||
env: DB=postgres
|
||||
- php: 5.4
|
||||
env: DB=sqlite3
|
||||
- php: 5.4
|
||||
env: DB=mysqli;SLOWTESTS=1
|
||||
- php: 5.5
|
||||
env: DB=mysqli
|
||||
- php: 5.6
|
||||
env: DB=mysqli
|
||||
- php: 7.0
|
||||
env: DB=mysqli
|
||||
- php: hhvm
|
||||
env: DB=mysqli
|
||||
allow_failures:
|
||||
- php: 7.0
|
||||
- php: hhvm
|
||||
fast_finish: true
|
||||
|
||||
@@ -41,6 +46,8 @@ script:
|
||||
- travis/check-sami-parse-errors.sh $DB $TRAVIS_PHP_VERSION
|
||||
- travis/check-image-icc-profiles.sh $DB $TRAVIS_PHP_VERSION
|
||||
- travis/check-executable-files.sh $DB $TRAVIS_PHP_VERSION ./
|
||||
- phpBB/vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml
|
||||
- sh -c "if [ '$SLOWTESTS' != '1' -a '$DB' = 'mysqli' ]; then phpBB/vendor/bin/phpunit tests/lint_test.php; fi"
|
||||
- sh -c "if [ '$SLOWTESTS' != '1' ]; then phpBB/vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml; fi"
|
||||
- sh -c "if [ '$SLOWTESTS' = '1' ]; then phpBB/vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml --group slow; fi"
|
||||
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.3.3' -a '$DB' = 'mysqli' -a '$TRAVIS_PULL_REQUEST' != 'false' ]; then git-tools/commit-msg-hook-range.sh origin/$TRAVIS_BRANCH..FETCH_HEAD; fi"
|
||||
|
||||
|
6
CONTRIBUTING.md
Normal file
@@ -0,0 +1,6 @@
|
||||
## CONTRIBUTE
|
||||
|
||||
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); if you're new to git, also read [the introduction guide](http://wiki.phpbb.com/display/DEV/Working+with+Git)
|
||||
4. Send us a pull request
|
@@ -27,9 +27,9 @@ To be able to run an installation from the repo (and not from a pre-built packag
|
||||
|
||||
We have unit and functional tests in order to prevent regressions. You can view the bamboo continuous integration [here](http://bamboo.phpbb.com) or check our travis build below:
|
||||
|
||||
* develop [](http://travis-ci.org/phpbb/phpbb)
|
||||
* develop-ascraeus [](http://travis-ci.org/phpbb/phpbb)
|
||||
* develop-olympus [](http://travis-ci.org/phpbb/phpbb)
|
||||
* [](http://travis-ci.org/phpbb/phpbb) **master** - Latest development version
|
||||
* [](http://travis-ci.org/phpbb/phpbb) **3.1.x** - Development of version 3.1.x
|
||||
* [](http://travis-ci.org/phpbb/phpbb) **3.0.x** - Development of version 3.0.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.1.2" />
|
||||
<property name="prevversion" value="3.1.2-RC1" />
|
||||
<property name="olderversions" value="3.0.12, 3.1.0-a1, 3.1.0-a2, 3.1.0-a3, 3.1.0-b1, 3.1.0-b2, 3.1.0-b3, 3.1.0-b4, 3.1.0-RC1, 3.1.0-RC2, 3.1.0-RC3, 3.1.0-RC4, 3.1.0-RC5, 3.1.0-RC6, 3.1.0, 3.1.1" />
|
||||
<property name="newversion" value="3.1.6-RC1" />
|
||||
<property name="prevversion" value="3.1.5" />
|
||||
<property name="olderversions" value="3.0.12, 3.0.13, 3.0.13-PL1, 3.0.14, 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4" />
|
||||
<!-- no configuration should be needed beyond this point -->
|
||||
|
||||
<property name="oldversions" value="${olderversions}, ${prevversion}" />
|
||||
@@ -75,14 +75,14 @@
|
||||
|
||||
<target name="sniff">
|
||||
<exec command="phpBB/vendor/bin/phpcs
|
||||
-s
|
||||
-s -p
|
||||
--extensions=php
|
||||
--standard=build/code_sniffer/ruleset-php-strict-core.xml
|
||||
--ignore=${project.basedir}/phpBB/phpbb/db/migration/data/v30x/*
|
||||
phpBB/phpbb"
|
||||
dir="." returnProperty="retval-php-strict" passthru="true" />
|
||||
<exec command="phpBB/vendor/bin/phpcs
|
||||
-s
|
||||
-s -p
|
||||
--extensions=php
|
||||
--standard=build/code_sniffer/ruleset-php-legacy-core.xml
|
||||
--ignore=${project.basedir}/phpBB/cache/*
|
||||
@@ -98,7 +98,7 @@
|
||||
phpBB"
|
||||
dir="." returnProperty="retval-php-legacy" passthru="true" />
|
||||
<exec command="phpBB/vendor/bin/phpcs
|
||||
-s
|
||||
-s -p
|
||||
--extensions=php
|
||||
--standard=build/code_sniffer/ruleset-php-extensions.xml
|
||||
--ignore=${project.basedir}/phpBB/ext/*/tests/*
|
||||
@@ -149,7 +149,7 @@
|
||||
<property name="dir" value="build/old_versions/release-${version}" />
|
||||
</phingcall>
|
||||
|
||||
<exec dir="build/old_versions" command="LC_ALL=C diff -crNEBwd release-${version} release-${newversion} >
|
||||
<exec dir="build/old_versions" command="LC_ALL=C diff -crNEBZbd release-${version} release-${newversion} >
|
||||
../new_version/patches/phpBB-${version}_to_${newversion}.patch" escape="false" />
|
||||
<exec dir="build/old_versions" command="LC_ALL=C diff -qr release-${version} release-${newversion} | grep 'Only in release-${version}' > ../new_version/patches/phpBB-${version}_to_${newversion}.deleted" escape="false" />
|
||||
</target>
|
||||
@@ -177,13 +177,13 @@
|
||||
<target name="package" depends="clean,prepare,prepare-new-version,old-version-diffs">
|
||||
<exec dir="build" command="php -f package.php '${versions}' > logs/package.log" escape="false" />
|
||||
<exec dir="build" escape="false"
|
||||
command="diff -crNEBwd old_versions/release-${prevversion}/language new_version/phpBB3/language >
|
||||
command="LC_ALL=C diff -crNEBZbd old_versions/release-${prevversion}/language new_version/phpBB3/language >
|
||||
save/phpbb-${prevversion}_to_${newversion}_language.patch" />
|
||||
<exec dir="build" escape="false"
|
||||
command="diff -crNEBwd old_versions/release-${prevversion}/styles/prosilver new_version/phpBB3/styles/prosilver >
|
||||
command="LC_ALL=C diff -crNEBZbd old_versions/release-${prevversion}/styles/prosilver new_version/phpBB3/styles/prosilver >
|
||||
save/phpbb-${prevversion}_to_${newversion}_prosilver.patch" />
|
||||
<exec dir="build" escape="false"
|
||||
command="diff -crNEBwd old_versions/release-${prevversion}/styles/subsilver2 new_version/phpBB3/styles/subsilver2 >
|
||||
command="LC_ALL=C diff -crNEBZbd old_versions/release-${prevversion}/styles/subsilver2 new_version/phpBB3/styles/subsilver2 >
|
||||
save/phpbb-${prevversion}_to_${newversion}_subsilver2.patch" />
|
||||
|
||||
<exec dir="build" escape="false"
|
||||
|
@@ -22,11 +22,11 @@ class build_package
|
||||
// -r - compare recursive
|
||||
// -N - Treat missing files as empty
|
||||
// -E - Ignore tab expansions
|
||||
// not used: -b - Ignore space changes.
|
||||
// -w - Ignore all whitespace
|
||||
// -Z - Ignore white space at line end.
|
||||
// -b - Ignore changes in the amount of white space.
|
||||
// -B - Ignore blank lines
|
||||
// -d - Try to find smaller set of changes
|
||||
var $diff_options = '-crNEBwd';
|
||||
var $diff_options = '-crNEBZbd';
|
||||
var $diff_options_long = '-x images -crNEB'; // -x fonts -x imageset //imageset not used here, because it includes the imageset.cfg file. ;)
|
||||
|
||||
var $verbose = false;
|
||||
|
@@ -60,14 +60,14 @@ class phpbb_Sniffs_Commenting_FileCommentSniff implements PHP_CodeSniffer_Sniff
|
||||
return;
|
||||
}
|
||||
// Mark as error if this is not a doc comment
|
||||
else if ($start === false || $tokens[$start]['code'] !== T_DOC_COMMENT)
|
||||
else if ($start === false || $tokens[$start]['code'] !== T_DOC_COMMENT_OPEN_TAG)
|
||||
{
|
||||
$phpcsFile->addError('Missing required file doc comment.', $stackPtr);
|
||||
return;
|
||||
}
|
||||
|
||||
// Find comment end token
|
||||
$end = $phpcsFile->findNext(T_DOC_COMMENT, $start + 1, null, true) - 1;
|
||||
$end = $tokens[$start]['comment_closer'];
|
||||
|
||||
// If there is no end, skip processing here
|
||||
if ($end === false)
|
||||
@@ -75,38 +75,30 @@ class phpbb_Sniffs_Commenting_FileCommentSniff implements PHP_CodeSniffer_Sniff
|
||||
return;
|
||||
}
|
||||
|
||||
// List of found comment tags
|
||||
$tags = array();
|
||||
|
||||
// check comment lines without the first(/**) an last(*/) line
|
||||
for ($i = $start + 1, $c = $end - 1; $i <= $c; ++$i)
|
||||
for ($token = $start + 1, $c = $end - 2; $token <= $c; ++$token)
|
||||
{
|
||||
$line = $tokens[$i]['content'];
|
||||
|
||||
// Check that each line starts with a '*'
|
||||
if (substr($line, 0, 1) !== '*')
|
||||
if ($tokens[$token]['column'] === 1 && (($tokens[$token]['content'] !== '*' && $tokens[$token]['content'] !== ' ') || ($tokens[$token]['content'] === ' ' && $tokens[$token + 1]['content'] !== '*')))
|
||||
{
|
||||
$message = 'The file doc comment should not be idented.';
|
||||
$phpcsFile->addWarning($message, $i);
|
||||
}
|
||||
else if (preg_match('/^\*\s+@([\w]+)\s+(.*)$/', $line, $match) !== 0)
|
||||
{
|
||||
if (!isset($tags[$match[1]]))
|
||||
{
|
||||
$tags[$match[1]] = array();
|
||||
}
|
||||
|
||||
$tags[$match[1]][] = array($match[2], $i);
|
||||
$message = 'The file doc comment should not be indented.';
|
||||
$phpcsFile->addWarning($message, $token);
|
||||
}
|
||||
}
|
||||
|
||||
// Check that the first and last line is empty
|
||||
if (trim($tokens[$start + 1]['content']) !== '*')
|
||||
// /**T_WHITESPACE
|
||||
// (T_WHITESPACE)*T_WHITESPACE
|
||||
// (T_WHITESPACE)* ...
|
||||
// (T_WHITESPACE)*T_WHITESPACE
|
||||
// T_WHITESPACE*/
|
||||
if (!(($tokens[$start + 2]['content'] !== '*' && $tokens[$start + 4]['content'] !== '*') || ($tokens[$start + 3]['content'] !== '*' && $tokens[$start + 6]['content'] !== '*')))
|
||||
{
|
||||
$message = 'The first file comment line should be empty.';
|
||||
$phpcsFile->addWarning($message, ($start + 1));
|
||||
}
|
||||
if (trim($tokens[$end - 1]['content']) !== '*')
|
||||
|
||||
if ($tokens[$end - 3]['content'] !== '*' && $tokens[$end - 6]['content'] !== '*')
|
||||
{
|
||||
$message = 'The last file comment line should be empty.';
|
||||
$phpcsFile->addWarning($message, $end - 1);
|
||||
@@ -114,8 +106,8 @@ class phpbb_Sniffs_Commenting_FileCommentSniff implements PHP_CodeSniffer_Sniff
|
||||
|
||||
//$this->processPackage($phpcsFile, $start, $tags);
|
||||
//$this->processVersion($phpcsFile, $start, $tags);
|
||||
$this->processCopyright($phpcsFile, $start, $tags);
|
||||
$this->processLicense($phpcsFile, $start, $tags);
|
||||
$this->processCopyright($phpcsFile, $start, $tokens[$start]['comment_tags']);
|
||||
$this->processLicense($phpcsFile, $start, $tokens[$start]['comment_tags']);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -176,17 +168,24 @@ class phpbb_Sniffs_Commenting_FileCommentSniff implements PHP_CodeSniffer_Sniff
|
||||
protected function processCopyright(PHP_CodeSniffer_File $phpcsFile, $ptr, $tags)
|
||||
{
|
||||
$copyright = '(c) phpBB Limited <https://www.phpbb.com>';
|
||||
$tokens = $phpcsFile->getTokens();
|
||||
|
||||
if (!isset($tags['copyright']))
|
||||
foreach ($tags as $tag)
|
||||
{
|
||||
$message = 'Missing require @copyright tag in file doc comment.';
|
||||
$phpcsFile->addError($message, $ptr);
|
||||
}
|
||||
else if ($tags['copyright'][0][0] !== $copyright)
|
||||
{
|
||||
$message = 'Invalid content found for the first @copyright tag, use "' . $copyright . '".';
|
||||
$phpcsFile->addError($message, $tags['copyright'][0][1]);
|
||||
if ($tokens[$tag]['content'] === '@copyright')
|
||||
{
|
||||
if ($tokens[$tag + 2]['content'] !== $copyright)
|
||||
{
|
||||
$message = 'Invalid content found for the first @copyright tag, use "' . $copyright . '".';
|
||||
$phpcsFile->addError($message, $tags['copyright'][0][1]);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$message = 'Missing require @copyright tag in file doc comment.';
|
||||
$phpcsFile->addError($message, $ptr);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -201,22 +200,33 @@ class phpbb_Sniffs_Commenting_FileCommentSniff implements PHP_CodeSniffer_Sniff
|
||||
protected function processLicense(PHP_CodeSniffer_File $phpcsFile, $ptr, $tags)
|
||||
{
|
||||
$license = 'GNU General Public License, version 2 (GPL-2.0)';
|
||||
$tokens = $phpcsFile->getTokens();
|
||||
|
||||
if (!isset($tags['license']))
|
||||
$found = false;
|
||||
foreach ($tags as $tag)
|
||||
{
|
||||
if ($tokens[$tag]['content'] === '@license')
|
||||
{
|
||||
if ($found)
|
||||
{
|
||||
$message = 'It must be only one @license tag in file doc comment.';
|
||||
$phpcsFile->addError($message, $ptr);
|
||||
}
|
||||
|
||||
$found = true;
|
||||
|
||||
if ($tokens[$tag + 2]['content'] !== $license)
|
||||
{
|
||||
$message = 'Invalid content found for @license tag, use "' . $license . '".';
|
||||
$phpcsFile->addError($message, $tags['license'][0][1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$found)
|
||||
{
|
||||
$message = 'Missing require @license tag in file doc comment.';
|
||||
$phpcsFile->addError($message, $ptr);
|
||||
}
|
||||
else if (sizeof($tags['license']) !== 1)
|
||||
{
|
||||
$message = 'It must be only one @license tag in file doc comment.';
|
||||
$phpcsFile->addError($message, $ptr);
|
||||
}
|
||||
else if (trim($tags['license'][0][0]) !== $license)
|
||||
{
|
||||
$message = 'Invalid content found for @license tag, use '
|
||||
. '"' . $license . '".';
|
||||
$phpcsFile->addError($message, $tags['license'][0][1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,143 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* This file is part of the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
* For full copyright and license information, please see
|
||||
* the docs/CREDITS.txt file.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Checks that the opening brace of a control structures is on the line after.
|
||||
* From Generic_Sniffs_Functions_OpeningFunctionBraceBsdAllmanSniff
|
||||
*/
|
||||
class phpbb_Sniffs_ControlStructures_OpeningBraceBsdAllmanSniff implements PHP_CodeSniffer_Sniff
|
||||
{
|
||||
/**
|
||||
* Registers the tokens that this sniff wants to listen for.
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
return array(
|
||||
T_IF,
|
||||
T_ELSE,
|
||||
T_FOREACH,
|
||||
T_WHILE,
|
||||
T_DO,
|
||||
T_FOR,
|
||||
T_SWITCH,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Processes this test, when one of its tokens is encountered.
|
||||
*
|
||||
* @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
|
||||
* @param int $stackPtr The position of the current token in the
|
||||
* stack passed in $tokens.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
|
||||
{
|
||||
$tokens = $phpcsFile->getTokens();
|
||||
|
||||
if (isset($tokens[$stackPtr]['scope_opener']) === false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* ...
|
||||
* }
|
||||
* else if ()
|
||||
* {
|
||||
* ...
|
||||
*/
|
||||
if ($tokens[$stackPtr]['code'] === T_ELSE && $tokens[$stackPtr + 2]['code'] === T_IF)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$openingBrace = $tokens[$stackPtr]['scope_opener'];
|
||||
|
||||
/*
|
||||
* ...
|
||||
* do
|
||||
* {
|
||||
* <code>
|
||||
* } while();
|
||||
* ...
|
||||
* }
|
||||
* else
|
||||
* {
|
||||
* ...
|
||||
*/
|
||||
if ($tokens[$stackPtr]['code'] === T_DO ||$tokens[$stackPtr]['code'] === T_ELSE)
|
||||
{
|
||||
$cs_line = $tokens[$stackPtr]['line'];
|
||||
}
|
||||
else
|
||||
{
|
||||
// The end of the function occurs at the end of the argument list. Its
|
||||
// like this because some people like to break long function declarations
|
||||
// over multiple lines.
|
||||
$cs_line = $tokens[$tokens[$stackPtr]['parenthesis_closer']]['line'];
|
||||
}
|
||||
|
||||
$braceLine = $tokens[$openingBrace]['line'];
|
||||
|
||||
$lineDifference = ($braceLine - $cs_line);
|
||||
|
||||
if ($lineDifference === 0)
|
||||
{
|
||||
$error = 'Opening brace should be on a new line';
|
||||
$phpcsFile->addError($error, $openingBrace, 'BraceOnSameLine');
|
||||
return;
|
||||
}
|
||||
|
||||
if ($lineDifference > 1)
|
||||
{
|
||||
$error = 'Opening brace should be on the line after the declaration; found %s blank line(s)';
|
||||
$data = array(($lineDifference - 1));
|
||||
$phpcsFile->addError($error, $openingBrace, 'BraceSpacing', $data);
|
||||
return;
|
||||
}
|
||||
|
||||
// We need to actually find the first piece of content on this line,
|
||||
// as if this is a method with tokens before it (public, static etc)
|
||||
// or an if with an else before it, then we need to start the scope
|
||||
// checking from there, rather than the current token.
|
||||
$lineStart = $stackPtr;
|
||||
while (($lineStart = $phpcsFile->findPrevious(array(T_WHITESPACE), ($lineStart - 1), null, false)) !== false)
|
||||
{
|
||||
if (strpos($tokens[$lineStart]['content'], $phpcsFile->eolChar) !== false)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// We found a new line, now go forward and find the first non-whitespace
|
||||
// token.
|
||||
$lineStart = $phpcsFile->findNext(array(T_WHITESPACE), $lineStart, null, true);
|
||||
|
||||
// The opening brace is on the correct line, now it needs to be
|
||||
// checked to be correctly indented.
|
||||
$startColumn = $tokens[$lineStart]['column'];
|
||||
$braceIndent = $tokens[$openingBrace]['column'];
|
||||
|
||||
if ($braceIndent !== $startColumn)
|
||||
{
|
||||
$error = 'Opening brace indented incorrectly; expected %s spaces, found %s';
|
||||
$data = array(
|
||||
($startColumn - 1),
|
||||
($braceIndent - 1),
|
||||
);
|
||||
$phpcsFile->addError($error, $openingBrace, 'BraceIndent', $data);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* This file is part of the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
* For full copyright and license information, please see
|
||||
* the docs/CREDITS.txt file.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Checks that there is exactly one space between the keyword and the opening
|
||||
* parenthesis of a control structures.
|
||||
*/
|
||||
class phpbb_Sniffs_ControlStructures_OpeningParenthesisSniff implements PHP_CodeSniffer_Sniff
|
||||
{
|
||||
/**
|
||||
* Registers the tokens that this sniff wants to listen for.
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
return array(
|
||||
T_IF,
|
||||
T_FOREACH,
|
||||
T_WHILE,
|
||||
T_FOR,
|
||||
T_SWITCH,
|
||||
T_ELSEIF,
|
||||
T_CATCH,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Processes this test, when one of its tokens is encountered.
|
||||
*
|
||||
* @param PHP_CodeSniffer_File $phpcsFile The file being scanned.
|
||||
* @param int $stackPtr The position of the current token in the
|
||||
* stack passed in $tokens.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
|
||||
{
|
||||
$tokens = $phpcsFile->getTokens();
|
||||
|
||||
if ($tokens[$stackPtr + 1]['content'] === '(')
|
||||
{
|
||||
$error = 'There should be exactly one space between the keyword and opening parenthesis';
|
||||
$phpcsFile->addError($error, $stackPtr, 'NoSpaceBeforeOpeningParenthesis');
|
||||
}
|
||||
else if ($tokens[$stackPtr + 1]['content'] !== ' ')
|
||||
{
|
||||
$error = 'There should be exactly one space between the keyword and opening parenthesis';
|
||||
$phpcsFile->addError($error, $stackPtr, 'IncorrectSpaceBeforeOpeningParenthesis');
|
||||
}
|
||||
}
|
||||
}
|
@@ -24,6 +24,23 @@ class phpbb_Sniffs_Namespaces_UnusedUseSniff implements PHP_CodeSniffer_Sniff
|
||||
return array(T_USE);
|
||||
}
|
||||
|
||||
protected function check($phpcsFile, $found_name, $full_name, $short_name, $line)
|
||||
{
|
||||
|
||||
if ($found_name === $full_name)
|
||||
{
|
||||
$error = 'Either use statement or full name must be used.';
|
||||
$phpcsFile->addError($error, $line, 'FullName');
|
||||
}
|
||||
|
||||
if ($found_name === $short_name)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
@@ -74,16 +91,7 @@ class phpbb_Sniffs_Namespaces_UnusedUseSniff implements PHP_CodeSniffer_Sniff
|
||||
|
||||
$simple_class_name = trim($phpcsFile->getTokensAsString($simple_class_name_start, ($simple_class_name_end - $simple_class_name_start)));
|
||||
|
||||
if ($simple_class_name === $class_name_full)
|
||||
{
|
||||
$error = 'Either use statement or full name must be used.';
|
||||
$phpcsFile->addError($error, $simple_statement, 'FullName');
|
||||
}
|
||||
|
||||
if ($simple_class_name === $class_name_short)
|
||||
{
|
||||
$ok = true;
|
||||
}
|
||||
$ok = $this->check($phpcsFile, $simple_class_name, $class_name_full, $class_name_short, $simple_statement) ? true : $ok;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,16 +106,7 @@ class phpbb_Sniffs_Namespaces_UnusedUseSniff implements PHP_CodeSniffer_Sniff
|
||||
|
||||
$paamayim_nekudotayim_class_name = trim($phpcsFile->getTokensAsString($paamayim_nekudotayim_class_name_start + 1, ($paamayim_nekudotayim_class_name_end - $paamayim_nekudotayim_class_name_start)));
|
||||
|
||||
if ($paamayim_nekudotayim_class_name === $class_name_full)
|
||||
{
|
||||
$error = 'Either use statement or full name must be used.';
|
||||
$phpcsFile->addError($error, $paamayim_nekudotayim, 'FullName');
|
||||
}
|
||||
|
||||
if ($paamayim_nekudotayim_class_name === $class_name_short)
|
||||
{
|
||||
$ok = true;
|
||||
}
|
||||
$ok = $this->check($phpcsFile, $paamayim_nekudotayim_class_name, $class_name_full, $class_name_short, $paamayim_nekudotayim) ? true : $ok;
|
||||
}
|
||||
|
||||
// Checks in implements
|
||||
@@ -126,16 +125,7 @@ class phpbb_Sniffs_Namespaces_UnusedUseSniff implements PHP_CodeSniffer_Sniff
|
||||
|
||||
$implements_class_name = trim($phpcsFile->getTokensAsString($implements_class_name_start, ($implements_class_name_end - $implements_class_name_start)));
|
||||
|
||||
if ($implements_class_name === $class_name_full)
|
||||
{
|
||||
$error = 'Either use statement or full name must be used.';
|
||||
$phpcsFile->addError($error, $implements, 'FullName');
|
||||
}
|
||||
|
||||
if ($implements_class_name === $class_name_short)
|
||||
{
|
||||
$ok = true;
|
||||
}
|
||||
$ok = $this->check($phpcsFile, $implements_class_name, $class_name_full, $class_name_short, $implements) ? true : $ok;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,34 +135,67 @@ class phpbb_Sniffs_Namespaces_UnusedUseSniff implements PHP_CodeSniffer_Sniff
|
||||
{
|
||||
$old_function_declaration = $function_declaration;
|
||||
|
||||
$end_function = $phpcsFile->findNext(array(T_CLOSE_PARENTHESIS), ($function_declaration + 1));
|
||||
$old_argument = $function_declaration;
|
||||
while (($argument = $phpcsFile->findNext(T_VARIABLE, ($old_argument + 1), $end_function)) !== false)
|
||||
// Check docblocks
|
||||
$find = array(
|
||||
T_COMMENT,
|
||||
T_DOC_COMMENT_CLOSE_TAG,
|
||||
T_DOC_COMMENT,
|
||||
T_CLASS,
|
||||
T_FUNCTION,
|
||||
T_OPEN_TAG,
|
||||
);
|
||||
|
||||
$comment_end = $phpcsFile->findPrevious($find, ($function_declaration - 1));
|
||||
if ($comment_end !== false)
|
||||
{
|
||||
$old_argument = $argument;
|
||||
|
||||
$start_argument = $phpcsFile->findPrevious(array(T_OPEN_PARENTHESIS, T_COMMA), $argument);
|
||||
$argument_class_name_start = $phpcsFile->findNext(array(T_NS_SEPARATOR, T_STRING), ($start_argument + 1), $argument);
|
||||
|
||||
// Skip the parameter if no type is defined.
|
||||
if ($argument_class_name_start !== false)
|
||||
if ($tokens[$comment_end]['code'] === T_DOC_COMMENT_CLOSE_TAG)
|
||||
{
|
||||
$argument_class_name_end = $phpcsFile->findNext($find, ($argument_class_name_start + 1), null, true);
|
||||
$comment_start = $tokens[$comment_end]['comment_opener'];
|
||||
foreach ($tokens[$comment_start]['comment_tags'] as $tag) {
|
||||
if ($tokens[$tag]['content'] !== '@param' && $tokens[$tag]['content'] !== '@return' && $tokens[$tag]['content'] !== '@throws') {
|
||||
continue;
|
||||
}
|
||||
|
||||
$argument_class_name = $phpcsFile->getTokensAsString($argument_class_name_start, ($argument_class_name_end - $argument_class_name_start - 1));
|
||||
$classes = $tokens[($tag + 2)]['content'];
|
||||
$space = strpos($classes, ' ');
|
||||
if ($space !== false) {
|
||||
$classes = substr($classes, 0, $space);
|
||||
}
|
||||
|
||||
if ($argument_class_name === $class_name_full)
|
||||
{
|
||||
$error = 'Either use statement or full name must be used.';
|
||||
$phpcsFile->addError($error, $function_declaration, 'FullName');
|
||||
}
|
||||
$tab = strpos($classes, "\t");
|
||||
if ($tab !== false) {
|
||||
$classes = substr($classes, 0, $tab);
|
||||
}
|
||||
|
||||
if ($argument_class_name === $class_name_short)
|
||||
{
|
||||
$ok = true;
|
||||
$classes = explode('|', str_replace('[]', '', $classes));
|
||||
foreach ($classes as $class)
|
||||
{
|
||||
$ok = $this->check($phpcsFile, $class, $class_name_full, $class_name_short, $tokens[$tag + 2]['line']) ? true : $ok;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Check type hint
|
||||
$params = $phpcsFile->getMethodParameters($function_declaration);
|
||||
foreach ($params as $param)
|
||||
{
|
||||
$ok = $this->check($phpcsFile, $param['type_hint'], $class_name_full, $class_name_short, $function_declaration) ? true : $ok;
|
||||
}
|
||||
}
|
||||
|
||||
// Checks in catch blocks
|
||||
$old_catch = $stackPtr;
|
||||
while (($catch = $phpcsFile->findNext(T_CATCH, ($old_catch + 1))) !== false)
|
||||
{
|
||||
$old_catch = $catch;
|
||||
|
||||
$caught_class_name_start = $phpcsFile->findNext(array(T_NS_SEPARATOR, T_STRING), $catch + 1);
|
||||
$caught_class_name_end = $phpcsFile->findNext($find, $caught_class_name_start + 1, null, true);
|
||||
|
||||
$caught_class_name = trim($phpcsFile->getTokensAsString($caught_class_name_start, ($caught_class_name_end - $caught_class_name_start)));
|
||||
|
||||
$ok = $this->check($phpcsFile, $caught_class_name, $class_name_full, $class_name_short, $catch) ? true : $ok;
|
||||
}
|
||||
|
||||
if (!$ok)
|
||||
|
@@ -12,4 +12,7 @@
|
||||
<!-- Tabs MUST be used for indentation -->
|
||||
<rule ref="Generic.WhiteSpace.DisallowSpaceIndent" />
|
||||
|
||||
<!-- ALL braces MUST be on their own lines. -->
|
||||
<rule ref="./phpbb/Sniffs/ControlStructures/OpeningBraceBsdAllmanSniff.php" />
|
||||
|
||||
</ruleset>
|
||||
|
@@ -86,4 +86,7 @@
|
||||
<!-- The ?> closing tag MUST be omitted from files containing only PHP. -->
|
||||
<rule ref="Zend.Files.ClosingTag" />
|
||||
|
||||
<!-- There MUST be one space between control structure and opening parenthesis -->
|
||||
<rule ref="./phpbb/Sniffs/ControlStructures/OpeningParenthesisSniff.php" />
|
||||
|
||||
</ruleset>
|
||||
|
@@ -394,6 +394,7 @@ if (sizeof($package->old_packages))
|
||||
$package->run_command('mkdir ' . $package->get('files_directory') . '/release');
|
||||
$package->run_command('cp -Rp ' . $package->get('dest_dir') . '/docs ' . $package->get('files_directory') . '/release');
|
||||
$package->run_command('cp -Rp ' . $package->get('dest_dir') . '/install ' . $package->get('files_directory') . '/release');
|
||||
$package->run_command('cp -Rp ' . $package->get('dest_dir') . '/vendor ' . $package->get('files_directory') . '/release');
|
||||
|
||||
$package->run_command('rm -v ' . $package->get('files_directory') . '/release/install/install_install.php');
|
||||
$package->run_command('rm -v ' . $package->get('files_directory') . '/release/install/install_update.php');
|
||||
|
@@ -18,13 +18,14 @@ $config['versions'] = Sami\Version\GitVersionCollection::create(__DIR__ . '/../'
|
||||
This would be nice, but currently causes various problems that need
|
||||
debugging.
|
||||
->addFromTags('release-3.0.*')
|
||||
->add('develop-olympus', '3.0-next (olympus)')
|
||||
->add('3.0.x', '3.0-next (olympus)')
|
||||
->addFromTags('release-3.1.*')
|
||||
->add('develop-ascraeus', '3.1-next (ascraeus)')
|
||||
->add('develop')
|
||||
->add('3.1.x', '3.1-next (ascraeus)')
|
||||
->add('master')
|
||||
*/
|
||||
->add('develop-olympus')
|
||||
->add('develop-ascraeus')
|
||||
->add('3.0.x')
|
||||
->add('3.1.x')
|
||||
->add('master')
|
||||
;
|
||||
|
||||
return new Sami\Sami($iterator, $config);
|
||||
|
BIN
composer.phar
@@ -7,7 +7,7 @@
|
||||
<p>{L_EXTENSIONS_EXPLAIN}</p>
|
||||
|
||||
<fieldset class="quick">
|
||||
<span class="small"><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.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>
|
||||
</fieldset>
|
||||
|
||||
<form id="version_check_settings" method="post" action="{U_ACTION}" style="display:none">
|
||||
@@ -97,6 +97,12 @@
|
||||
</table>
|
||||
|
||||
<table class="table1">
|
||||
<tr>
|
||||
<th>{L_EXTENSION_INSTALL_HEADLINE}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row3">{L_EXTENSION_INSTALL_EXPLAIN}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>{L_EXTENSION_UPDATE_HEADLINE}</th>
|
||||
</tr>
|
||||
|
@@ -343,6 +343,8 @@
|
||||
<!-- EVENT acp_forums_rules_settings_append -->
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<!-- EVENT acp_forums_custom_settings -->
|
||||
|
||||
<fieldset class="submit-buttons">
|
||||
<legend>{L_SUBMIT}</legend>
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<script type="text/javascript" defer="defer">
|
||||
// <![CDATA[
|
||||
<!-- IF S_ADD_CODE -->
|
||||
|
||||
|
||||
var smiley = Array();
|
||||
<!-- BEGIN smile -->
|
||||
smiley['{smile.SMILEY_URL}'] = Array();
|
||||
@@ -37,10 +37,10 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
<!-- ENDIF -->
|
||||
|
||||
|
||||
|
||||
function toggle_select(icon, display, select)
|
||||
{
|
||||
var disp = document.getElementById('order_disp_' + select);
|
||||
@@ -101,7 +101,7 @@
|
||||
<tbody>
|
||||
<!-- BEGIN items -->
|
||||
<tr>
|
||||
|
||||
|
||||
<td style="text-align: center;"><img src="{items.IMG_SRC}" alt="" title="" /><input type="hidden" name="image[{items.IMG}]" value="1" /></td>
|
||||
<td style="vertical-align: top;">[{items.IMG}]</td>
|
||||
<!-- IF S_SMILIES -->
|
||||
@@ -121,7 +121,7 @@
|
||||
<optgroup id="order_disp_{items.S_ROW_COUNT}" label="{L_DISPLAY_POSTING}" <!-- IF not items.POSTING_CHECKED -->disabled="disabled" class="disabled-options" <!-- ENDIF -->>{S_ORDER_LIST_DISPLAY}</optgroup>
|
||||
<optgroup id="order_no_disp_{items.S_ROW_COUNT}" label="{L_DISPLAY_POSTING_NO}" <!-- IF items.POSTING_CHECKED -->disabled="disabled" class="disabled-options" <!-- ENDIF -->>{S_ORDER_LIST_UNDISPLAY}</optgroup>
|
||||
</select></td>
|
||||
<!-- ENDIF -->
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_ADD -->
|
||||
<td><input type="checkbox" class="radio" name="add_img[{items.IMG}]" value="1" /></td>
|
||||
<!-- ENDIF -->
|
||||
@@ -147,6 +147,8 @@
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
<!-- ELSE -->
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row3">
|
||||
<td colspan="{COLSPAN}">{L_NO_ICONS}</td>
|
||||
</tr>
|
||||
@@ -174,7 +176,7 @@
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_IMPORT}</legend>
|
||||
|
||||
|
||||
<!-- IF not S_PAK_OPTIONS -->
|
||||
<p>{L_NO_PAK_OPTIONS}</p>
|
||||
|
||||
@@ -259,7 +261,7 @@
|
||||
</table>
|
||||
<div class="pagination">
|
||||
<!-- IF .pagination -->
|
||||
<!-- INCLUDE pagination.html -->
|
||||
<!-- INCLUDE pagination.html -->
|
||||
<!-- ENDIF -->
|
||||
</div>
|
||||
<p class="quick">
|
||||
|
@@ -39,7 +39,7 @@
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="jab_password">{L_JAB_PASSWORD}{L_COLON}</label><br /><span>{L_JAB_PASSWORD_EXPLAIN}</span></dt>
|
||||
<dd><input type="password" id="jab_password" name="jab_password" value="{JAB_PASSWORD}" /></dd>
|
||||
<dd><input type="password" id="jab_password" name="jab_password" value="{JAB_PASSWORD}" autocomplete="off" /></dd>
|
||||
</dl>
|
||||
<!-- IF S_CAN_USE_SSL -->
|
||||
<dl>
|
||||
|
@@ -68,6 +68,10 @@
|
||||
|
||||
<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>
|
||||
</fieldset>
|
||||
|
||||
<table class="table1 zebra-table">
|
||||
<thead>
|
||||
<tr>
|
||||
|
@@ -79,6 +79,7 @@
|
||||
<dt><label for="field_hide">{L_HIDE_PROFILE_FIELD}{L_COLON}</label><br /><span>{L_HIDE_PROFILE_FIELD_EXPLAIN}</span></dt>
|
||||
<dd><input type="checkbox" class="radio" id="field_hide" name="field_hide" value="1"<!-- IF S_FIELD_HIDE --> checked="checked"<!-- ENDIF --> /></dd>
|
||||
</dl>
|
||||
<!-- EVENT acp_profile_contact_before -->
|
||||
<dl>
|
||||
<dt><label for="field_is_contact">{L_FIELD_IS_CONTACT}{L_COLON}</label><br /><span>{L_FIELD_IS_CONTACT_EXPLAIN}</span></dt>
|
||||
<dd><input type="checkbox" class="radio" id="field_is_contact" name="field_is_contact" value="1"<!-- IF S_FIELD_CONTACT --> checked="checked"<!-- ENDIF --> /></dd>
|
||||
|
@@ -19,7 +19,7 @@
|
||||
{S_HIDDEN_FIELDS}
|
||||
|
||||
<div style="text-align: center;">
|
||||
<input type="submit" name="confirm" value="{L_YES}" class="button2" />
|
||||
<input type="submit" name="confirm" value="{L_YES}" class="button2" />
|
||||
<input type="submit" name="cancel" value="{L_NO}" class="button2" />
|
||||
</div>
|
||||
|
||||
@@ -32,6 +32,10 @@
|
||||
|
||||
<!-- 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>
|
||||
</fieldset>
|
||||
|
||||
<form id="acp_styles" method="post" action="{U_ACTION}">
|
||||
{S_HIDDEN_FIELDS}
|
||||
{S_FORM_TOKEN}
|
||||
|
@@ -2,6 +2,7 @@
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_USER_PROFILE}</legend>
|
||||
<!-- EVENT acp_users_profile_before -->
|
||||
<dl>
|
||||
<dt><label for="jabber">{L_UCP_JABBER}{L_COLON}</label></dt>
|
||||
<dd><input type="email" id="jabber" name="jabber" value="{JABBER}" /></dd>
|
||||
@@ -10,6 +11,7 @@
|
||||
<dt><label for="birthday">{L_BIRTHDAY}{L_COLON}</label><br /><span>{L_BIRTHDAY_EXPLAIN}</span></dt>
|
||||
<dd>{L_DAY}{L_COLON} <select id="birthday" name="bday_day">{S_BIRTHDAY_DAY_OPTIONS}</select> {L_MONTH}{L_COLON} <select name="bday_month">{S_BIRTHDAY_MONTH_OPTIONS}</select> {L_YEAR}{L_COLON} <select name="bday_year">{S_BIRTHDAY_YEAR_OPTIONS}</select></dd>
|
||||
</dl>
|
||||
<!-- EVENT acp_users_profile_after -->
|
||||
</fieldset>
|
||||
|
||||
<!-- IF .profile_fields -->
|
||||
@@ -26,7 +28,7 @@
|
||||
<!-- END profile_fields -->
|
||||
</fieldset>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- EVENT acp_users_profile_custom_after -->
|
||||
<fieldset class="quick">
|
||||
<input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
|
||||
{S_FORM_TOKEN}
|
||||
|
@@ -17,6 +17,10 @@
|
||||
font-size: 100%;
|
||||
}
|
||||
|
||||
abbr {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
body, div, p, th, td, li, dd {
|
||||
font-size: x-small;
|
||||
voice-family: "\"}\"";
|
||||
|
@@ -2,7 +2,7 @@
|
||||
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<!-- IF META -->{META}<!-- ENDIF -->
|
||||
<title>{PAGE_TITLE}</title>
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<!-- IF META -->{META}<!-- ENDIF -->
|
||||
<title>{PAGE_TITLE}</title>
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<!-- IF META -->{META}<!-- ENDIF -->
|
||||
<title>{PAGE_TITLE}</title>
|
||||
|
||||
|
@@ -2,6 +2,7 @@
|
||||
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<!-- IF META -->{META}<!-- ENDIF -->
|
||||
<title>{PAGE_TITLE}</title>
|
||||
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* global bbfontstyle */
|
||||
|
||||
var phpbb = {};
|
||||
phpbb.alertTime = 100;
|
||||
|
||||
@@ -13,7 +15,7 @@ var keymap = {
|
||||
};
|
||||
|
||||
var $dark = $('#darkenwrapper');
|
||||
var $loadingIndicator = $('#loading_indicator');
|
||||
var $loadingIndicator;
|
||||
var phpbbAlertTimer = null;
|
||||
|
||||
phpbb.isTouch = (window && typeof window.ontouchstart !== 'undefined');
|
||||
@@ -21,9 +23,14 @@ phpbb.isTouch = (window && typeof window.ontouchstart !== 'undefined');
|
||||
/**
|
||||
* Display a loading screen
|
||||
*
|
||||
* @returns object Returns loadingIndicator.
|
||||
* @returns {object} Returns loadingIndicator.
|
||||
*/
|
||||
phpbb.loadingIndicator = function() {
|
||||
if (!$loadingIndicator) {
|
||||
$loadingIndicator = $('<div />', { id: 'loading_indicator' });
|
||||
$loadingIndicator.appendTo('#page-footer');
|
||||
}
|
||||
|
||||
if (!$loadingIndicator.is(':visible')) {
|
||||
$loadingIndicator.fadeIn(phpbb.alertTime);
|
||||
// Wait fifteen seconds and display an error if nothing has been returned by then.
|
||||
@@ -54,7 +61,7 @@ phpbb.clearLoadingTimeout = function() {
|
||||
/**
|
||||
* Close popup alert after a specified delay
|
||||
*
|
||||
* @param int Delay in ms until darkenwrapper's click event is triggered
|
||||
* @param {int} delay Delay in ms until darkenwrapper's click event is triggered
|
||||
*/
|
||||
phpbb.closeDarkenWrapper = function(delay) {
|
||||
phpbbAlertTimer = setTimeout(function() {
|
||||
@@ -67,14 +74,12 @@ phpbb.closeDarkenWrapper = function(delay) {
|
||||
*
|
||||
* You can only call one alert or confirm box at any one time.
|
||||
*
|
||||
* @param string title Title of the message, eg "Information" (HTML).
|
||||
* @param string msg Message to display (HTML).
|
||||
* @param bool fadedark Remove the dark background when done? Defaults
|
||||
* to yes.
|
||||
* @param {string} title Title of the message, eg "Information" (HTML).
|
||||
* @param {string} msg Message to display (HTML).
|
||||
*
|
||||
* @returns object Returns the div created.
|
||||
* @returns {object} Returns the div created.
|
||||
*/
|
||||
phpbb.alert = function(title, msg, fadedark) {
|
||||
phpbb.alert = function(title, msg) {
|
||||
var $alert = $('#phpbb_alert');
|
||||
$alert.find('.alert_title').html(title);
|
||||
$alert.find('.alert_text').html(msg);
|
||||
@@ -94,14 +99,14 @@ phpbb.alert = function(title, msg, fadedark) {
|
||||
/**
|
||||
* Handler for opening an alert box.
|
||||
*
|
||||
* @param jQuery $alert jQuery object.
|
||||
* @param {jQuery} $alert jQuery object.
|
||||
*/
|
||||
phpbb.alert.open = function($alert) {
|
||||
if (!$dark.is(':visible')) {
|
||||
$dark.fadeIn(phpbb.alertTime);
|
||||
}
|
||||
|
||||
if ($loadingIndicator.is(':visible')) {
|
||||
if ($loadingIndicator && $loadingIndicator.is(':visible')) {
|
||||
$loadingIndicator.fadeOut(phpbb.alertTime, function() {
|
||||
$dark.append($alert);
|
||||
$alert.fadeIn(phpbb.alertTime);
|
||||
@@ -134,8 +139,8 @@ phpbb.alert.open = function($alert) {
|
||||
/**
|
||||
* Handler for closing an alert box.
|
||||
*
|
||||
* @param jQuery $alert jQuery object.
|
||||
* @param bool fadedark Whether to remove dark background.
|
||||
* @param {jQuery} $alert jQuery object.
|
||||
* @param {bool} fadedark Whether to remove dark background.
|
||||
*/
|
||||
phpbb.alert.close = function($alert, fadedark) {
|
||||
var $fade = (fadedark) ? $dark : $alert;
|
||||
@@ -153,13 +158,13 @@ phpbb.alert.close = function($alert, fadedark) {
|
||||
*
|
||||
* You can only call one alert or confirm box at any one time.
|
||||
*
|
||||
* @param string msg Message to display (HTML).
|
||||
* @param function callback Callback. Bool param, whether the user pressed
|
||||
* @param {string} msg Message to display (HTML).
|
||||
* @param {function} callback Callback. Bool param, whether the user pressed
|
||||
* yes or no (or whatever their language is).
|
||||
* @param bool fadedark Remove the dark background when done? Defaults
|
||||
* @param {bool} fadedark Remove the dark background when done? Defaults
|
||||
* to yes.
|
||||
*
|
||||
* @returns object Returns the div created.
|
||||
* @returns {object} Returns the div created.
|
||||
*/
|
||||
phpbb.confirm = function(msg, callback, fadedark) {
|
||||
var $confirmDiv = $('#phpbb_confirm');
|
||||
@@ -197,8 +202,8 @@ phpbb.confirm = function(msg, callback, fadedark) {
|
||||
/**
|
||||
* Turn a querystring into an array.
|
||||
*
|
||||
* @argument string string The querystring to parse.
|
||||
* @returns object The object created.
|
||||
* @argument {string} string The querystring to parse.
|
||||
* @returns {object} The object created.
|
||||
*/
|
||||
phpbb.parseQuerystring = function(string) {
|
||||
var params = {}, i, split;
|
||||
@@ -223,12 +228,7 @@ phpbb.parseQuerystring = function(string) {
|
||||
* For more info, view the following page on the phpBB wiki:
|
||||
* http://wiki.phpbb.com/JavaScript_Function.phpbb.ajaxify
|
||||
*
|
||||
* @param object options Options.
|
||||
* @param bool/function refresh If we are sent back a refresh, should it be
|
||||
* acted upon? This can either be true / false / a function.
|
||||
* @param function callback Callback to call on completion of event. Has
|
||||
* three parameters: the element that the event was evoked from, the JSON
|
||||
* that was returned and (if it is a form) the form action.
|
||||
* @param {object} options Options.
|
||||
*/
|
||||
phpbb.ajaxify = function(options) {
|
||||
var $elements = $(options.selector),
|
||||
@@ -262,11 +262,16 @@ phpbb.ajaxify = function(options) {
|
||||
console.log('AJAX error. status: ' + textStatus + ', message: ' + errorThrown);
|
||||
}
|
||||
phpbb.clearLoadingTimeout();
|
||||
var errorText = false;
|
||||
if (typeof errorThrown === 'string' && errorThrown.length > 0) {
|
||||
var responseText, errorText = false;
|
||||
try {
|
||||
responseText = JSON.parse(jqXHR.responseText);
|
||||
responseText = responseText.message;
|
||||
} catch (e) {}
|
||||
if (typeof responseText === 'string' && responseText.length > 0) {
|
||||
errorText = responseText;
|
||||
} else if (typeof errorThrown === 'string' && errorThrown.length > 0) {
|
||||
errorText = errorThrown;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
errorText = $dark.attr('data-ajax-error-text-' + textStatus);
|
||||
if (typeof errorText !== 'string' || !errorText.length) {
|
||||
errorText = $dark.attr('data-ajax-error-text');
|
||||
@@ -283,7 +288,7 @@ phpbb.ajaxify = function(options) {
|
||||
* It cannot be called from outside this function, and is purely here to
|
||||
* avoid repetition of code.
|
||||
*
|
||||
* @param object res The object sent back by the server.
|
||||
* @param {object} res The object sent back by the server.
|
||||
*/
|
||||
function returnHandler(res) {
|
||||
var alert;
|
||||
@@ -389,8 +394,11 @@ phpbb.ajaxify = function(options) {
|
||||
error: errorHandler,
|
||||
cache: false
|
||||
});
|
||||
|
||||
request.always(function() {
|
||||
$loadingIndicator.fadeOut(phpbb.alertTime);
|
||||
if ($loadingIndicator && $loadingIndicator.is(':visible')) {
|
||||
$loadingIndicator.fadeOut(phpbb.alertTime);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -408,7 +416,9 @@ phpbb.ajaxify = function(options) {
|
||||
$elements.find('input:submit').click(function () {
|
||||
var $this = $(this);
|
||||
|
||||
$this.siblings('[data-clicked]').removeAttr('data-clicked');
|
||||
// Remove data-clicked attribute from any submit button of form
|
||||
$this.parents('form:first').find('input:submit[data-clicked]').removeAttr('data-clicked');
|
||||
|
||||
$this.attr('data-clicked', 'true');
|
||||
});
|
||||
}
|
||||
@@ -425,10 +435,10 @@ phpbb.search = {
|
||||
};
|
||||
|
||||
/**
|
||||
* Get cached search data.
|
||||
* Get cached search data.
|
||||
*
|
||||
* @param string id Search ID.
|
||||
* @return bool|object. Cached data object. Returns false if no data exists.
|
||||
* @param {string} id Search ID.
|
||||
* @returns {bool|object} Cached data object. Returns false if no data exists.
|
||||
*/
|
||||
phpbb.search.cache.get = function(id) {
|
||||
if (this.data[id]) {
|
||||
@@ -438,39 +448,35 @@ phpbb.search.cache.get = function(id) {
|
||||
};
|
||||
|
||||
/**
|
||||
* Set search cache data value.
|
||||
* Set search cache data value.
|
||||
*
|
||||
* @param string id Search ID.
|
||||
* @param string key Data key.
|
||||
* @param string value Data value.
|
||||
*
|
||||
* @return undefined
|
||||
* @param {string} id Search ID.
|
||||
* @param {string} key Data key.
|
||||
* @param {string} value Data value.
|
||||
*/
|
||||
phpbb.search.cache.set = function(id, key, value) {
|
||||
if (!this.data[id]) {
|
||||
this.data[id] = {results: []};
|
||||
this.data[id] = { results: [] };
|
||||
}
|
||||
this.data[id][key] = value;
|
||||
};
|
||||
|
||||
/**
|
||||
* Cache search result.
|
||||
* Cache search result.
|
||||
*
|
||||
* @param string id Search ID.
|
||||
* @param string keyword Keyword.
|
||||
* @param array results Search results.
|
||||
*
|
||||
* @return undefined
|
||||
* @param {string} id Search ID.
|
||||
* @param {string} keyword Keyword.
|
||||
* @param {Array} results Search results.
|
||||
*/
|
||||
phpbb.search.cache.setResults = function(id, keyword, value) {
|
||||
this.data[id].results[keyword] = value;
|
||||
phpbb.search.cache.setResults = function(id, keyword, results) {
|
||||
this.data[id].results[keyword] = results;
|
||||
};
|
||||
|
||||
/**
|
||||
* Trim spaces from keyword and lower its case.
|
||||
*
|
||||
* @param string keyword Search keyword to clean.
|
||||
* @return string Cleaned string.
|
||||
* @param {string} keyword Search keyword to clean.
|
||||
* @returns {string} Cleaned string.
|
||||
*/
|
||||
phpbb.search.cleanKeyword = function(keyword) {
|
||||
return $.trim(keyword).toLowerCase();
|
||||
@@ -480,11 +486,11 @@ phpbb.search.cleanKeyword = function(keyword) {
|
||||
* Get clean version of search keyword. If textarea supports several keywords
|
||||
* (one per line), it fetches the current keyword based on the caret position.
|
||||
*
|
||||
* @param jQuery $input Search input|textarea.
|
||||
* @param string keyword Input|textarea value.
|
||||
* @param bool multiline Whether textarea supports multiple search keywords.
|
||||
* @param {jQuery} $input Search input|textarea.
|
||||
* @param {string} keyword Input|textarea value.
|
||||
* @param {bool} multiline Whether textarea supports multiple search keywords.
|
||||
*
|
||||
* @return string Clean string.
|
||||
* @returns string Clean string.
|
||||
*/
|
||||
phpbb.search.getKeyword = function($input, keyword, multiline) {
|
||||
if (multiline) {
|
||||
@@ -496,10 +502,10 @@ phpbb.search.getKeyword = function($input, keyword, multiline) {
|
||||
|
||||
/**
|
||||
* Get the textarea line number on which the keyword resides - for textareas
|
||||
* that support multiple keywords (one per line).
|
||||
* that support multiple keywords (one per line).
|
||||
*
|
||||
* @param jQuery $textarea Search textarea.
|
||||
* @return int
|
||||
* @param {jQuery} $textarea Search textarea.
|
||||
* @returns {int} The line number.
|
||||
*/
|
||||
phpbb.search.getKeywordLine = function ($textarea) {
|
||||
var selectionStart = $textarea.get(0).selectionStart;
|
||||
@@ -510,11 +516,9 @@ phpbb.search.getKeywordLine = function ($textarea) {
|
||||
* Set the value on the input|textarea. If textarea supports multiple
|
||||
* keywords, only the active keyword is replaced.
|
||||
*
|
||||
* @param jQuery $input Search input|textarea.
|
||||
* @param string value Value to set.
|
||||
* @param bool multiline Whether textarea supports multiple search keywords.
|
||||
*
|
||||
* @return undefined
|
||||
* @param {jQuery} $input Search input|textarea.
|
||||
* @param {string} value Value to set.
|
||||
* @param {bool} multiline Whether textarea supports multiple search keywords.
|
||||
*/
|
||||
phpbb.search.setValue = function($input, value, multiline) {
|
||||
if (multiline) {
|
||||
@@ -527,14 +531,13 @@ phpbb.search.setValue = function($input, value, multiline) {
|
||||
};
|
||||
|
||||
/**
|
||||
* Sets the onclick event to set the value on the input|textarea to the selected search result.
|
||||
* Sets the onclick event to set the value on the input|textarea to the
|
||||
* selected search result.
|
||||
*
|
||||
* @param jQuery $input Search input|textarea.
|
||||
* @param object value Result object.
|
||||
* @param jQuery $row Result element.
|
||||
* @param jQuery $container jQuery object for the search container.
|
||||
*
|
||||
* @return undefined
|
||||
* @param {jQuery} $input Search input|textarea.
|
||||
* @param {object} value Result object.
|
||||
* @param {jQuery} $row Result element.
|
||||
* @param {jQuery} $container jQuery object for the search container.
|
||||
*/
|
||||
phpbb.search.setValueOnClick = function($input, value, $row, $container) {
|
||||
$row.click(function() {
|
||||
@@ -549,16 +552,16 @@ phpbb.search.setValueOnClick = function($input, value, $row, $container) {
|
||||
* already, those are displayed instead. Executes the AJAX request function
|
||||
* itself due to the need to use a timeout to limit the number of requests.
|
||||
*
|
||||
* @param array data Data to be sent to the server.
|
||||
* @param object event Onkeyup event object.
|
||||
* @param function sendRequest Function to execute AJAX request.
|
||||
* @param {Array} data Data to be sent to the server.
|
||||
* @param {object} event Onkeyup event object.
|
||||
* @param {function} sendRequest Function to execute AJAX request.
|
||||
*
|
||||
* @return bool Returns false.
|
||||
* @returns {bool} Returns false.
|
||||
*/
|
||||
phpbb.search.filter = function(data, event, sendRequest) {
|
||||
var $this = $(this),
|
||||
dataName = ($this.attr('data-name') !== undefined) ? $this.attr('data-name') : $this.attr('name'),
|
||||
minLength = parseInt($this.attr('data-min-length')),
|
||||
minLength = parseInt($this.attr('data-min-length'), 10),
|
||||
searchID = $this.attr('data-results'),
|
||||
keyword = phpbb.search.getKeyword($this, data[dataName], $this.attr('data-multiline')),
|
||||
cache = phpbb.search.cache.get(searchID),
|
||||
@@ -580,7 +583,10 @@ phpbb.search.filter = function(data, event, sendRequest) {
|
||||
} else {
|
||||
// Do we already have results for this?
|
||||
if (cache.results[keyword]) {
|
||||
var response = {keyword: keyword, results: cache.results[keyword]};
|
||||
var response = {
|
||||
keyword: keyword,
|
||||
results: cache.results[keyword]
|
||||
};
|
||||
phpbb.search.handleResponse(response, $this, true);
|
||||
proceed = false;
|
||||
}
|
||||
@@ -591,8 +597,8 @@ phpbb.search.filter = function(data, event, sendRequest) {
|
||||
phpbb.search.cache.set(searchID, 'lastSearch', keyword);
|
||||
phpbb.search.cache.setResults(searchID, keyword, []);
|
||||
proceed = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (proceed) {
|
||||
@@ -605,14 +611,12 @@ phpbb.search.filter = function(data, event, sendRequest) {
|
||||
};
|
||||
|
||||
/**
|
||||
* Handle search result response.
|
||||
* Handle search result response.
|
||||
*
|
||||
* @param object res Data received from server.
|
||||
* @param jQuery $input Search input|textarea.
|
||||
* @param bool fromCache Whether the results are from the cache.
|
||||
* @param function callback Optional callback to run when assigning each search result.
|
||||
*
|
||||
* @return undefined
|
||||
* @param {object} res Data received from server.
|
||||
* @param {jQuery} $input Search input|textarea.
|
||||
* @param {bool} fromCache Whether the results are from the cache.
|
||||
* @param {function} callback Optional callback to run when assigning each search result.
|
||||
*/
|
||||
phpbb.search.handleResponse = function(res, $input, fromCache, callback) {
|
||||
if (typeof res !== 'object') {
|
||||
@@ -639,12 +643,10 @@ phpbb.search.handleResponse = function(res, $input, fromCache, callback) {
|
||||
/**
|
||||
* Show search results.
|
||||
*
|
||||
* @param array results Search results.
|
||||
* @param jQuery $input Search input|textarea.
|
||||
* @param jQuery $container Search results container element.
|
||||
* @param function callback Optional callback to run when assigning each search result.
|
||||
*
|
||||
* @return undefined
|
||||
* @param {Array} results Search results.
|
||||
* @param {jQuery} $input Search input|textarea.
|
||||
* @param {jQuery} $container Search results container element.
|
||||
* @param {function} callback Optional callback to run when assigning each search result.
|
||||
*/
|
||||
phpbb.search.showResults = function(results, $input, $container, callback) {
|
||||
var $resultContainer = $('.search-results', $container);
|
||||
@@ -681,8 +683,7 @@ phpbb.search.showResults = function(results, $input, $container, callback) {
|
||||
/**
|
||||
* Clear search results.
|
||||
*
|
||||
* @param jQuery $container Search results container.
|
||||
* @return undefined
|
||||
* @param {jQuery} $container Search results container.
|
||||
*/
|
||||
phpbb.search.clearResults = function($container) {
|
||||
$container.children(':not(.search-result-tpl)').remove();
|
||||
@@ -701,8 +702,8 @@ phpbb.history = {};
|
||||
/**
|
||||
* Check whether a method in the native history object is supported.
|
||||
*
|
||||
* @param string fn Method name.
|
||||
* @return bool Returns true if the method is supported.
|
||||
* @param {string} fn Method name.
|
||||
* @returns {bool} Returns true if the method is supported.
|
||||
*/
|
||||
phpbb.history.isSupported = function(fn) {
|
||||
return !(typeof history === 'undefined' || typeof history[fn] === 'undefined');
|
||||
@@ -712,12 +713,10 @@ phpbb.history.isSupported = function(fn) {
|
||||
* Wrapper for the pushState and replaceState methods of the
|
||||
* native history object.
|
||||
*
|
||||
* @param string mode Mode. Either push or replace.
|
||||
* @param string url New URL.
|
||||
* @param string title Optional page title.
|
||||
* @patam object obj Optional state object.
|
||||
*
|
||||
* @return undefined
|
||||
* @param {string} mode Mode. Either push or replace.
|
||||
* @param {string} url New URL.
|
||||
* @param {string} [title] Optional page title.
|
||||
* @param {object} [obj] Optional state object.
|
||||
*/
|
||||
phpbb.history.alterUrl = function(mode, url, title, obj) {
|
||||
var fn = mode + 'State';
|
||||
@@ -738,11 +737,9 @@ phpbb.history.alterUrl = function(mode, url, title, obj) {
|
||||
/**
|
||||
* Wrapper for the native history.replaceState method.
|
||||
*
|
||||
* @param string url New URL.
|
||||
* @param string title Optional page title.
|
||||
* @patam object obj Optional state object.
|
||||
*
|
||||
* @return undefined
|
||||
* @param {string} url New URL.
|
||||
* @param {string} [title] Optional page title.
|
||||
* @param {object} [obj] Optional state object.
|
||||
*/
|
||||
phpbb.history.replaceUrl = function(url, title, obj) {
|
||||
phpbb.history.alterUrl('replace', url, title, obj);
|
||||
@@ -751,11 +748,9 @@ phpbb.history.replaceUrl = function(url, title, obj) {
|
||||
/**
|
||||
* Wrapper for the native history.pushState method.
|
||||
*
|
||||
* @param string url New URL.
|
||||
* @param string title Optional page title.
|
||||
* @patam object obj Optional state object.
|
||||
*
|
||||
* @return undefined
|
||||
* @param {string} url New URL.
|
||||
* @param {string} [title] Optional page title.
|
||||
* @param {object} [obj] Optional state object.
|
||||
*/
|
||||
phpbb.history.pushUrl = function(url, title, obj) {
|
||||
phpbb.history.alterUrl('push', url, title, obj);
|
||||
@@ -764,7 +759,8 @@ phpbb.history.pushUrl = function(url, title, obj) {
|
||||
/**
|
||||
* Hide the optgroups that are not the selected timezone
|
||||
*
|
||||
* @param bool keepSelection Shall we keep the value selected, or shall the user be forced to repick one.
|
||||
* @param {bool} keepSelection Shall we keep the value selected, or shall the
|
||||
* user be forced to repick one.
|
||||
*/
|
||||
phpbb.timezoneSwitchDate = function(keepSelection) {
|
||||
var $timezoneCopy = $('#timezone_copy');
|
||||
@@ -787,7 +783,7 @@ phpbb.timezoneSwitchDate = function(keepSelection) {
|
||||
}
|
||||
|
||||
if ($tzDate.val() !== '') {
|
||||
$timezone.children('optgroup').remove(':not([data-tz-value="' + $('#tz_date').val() + '"])');
|
||||
$timezone.children('optgroup').remove(':not([data-tz-value="' + $tzDate.val() + '"])');
|
||||
}
|
||||
|
||||
if ($tzDate.val() === $tzSelectDateSuggest.attr('data-suggested-tz')) {
|
||||
@@ -795,7 +791,7 @@ phpbb.timezoneSwitchDate = function(keepSelection) {
|
||||
} else {
|
||||
$tzSelectDateSuggest.css('display', 'inline');
|
||||
}
|
||||
|
||||
|
||||
var $tzOptions = $timezone.children('optgroup[data-tz-value="' + $tzDate.val() + '"]').children('option');
|
||||
|
||||
if ($tzOptions.length === 1) {
|
||||
@@ -822,7 +818,7 @@ phpbb.timezoneEnableDateSelection = function() {
|
||||
/**
|
||||
* Preselect a date/time or suggest one, if it is not picked.
|
||||
*
|
||||
* @param bool forceSelector Shall we select the suggestion?
|
||||
* @param {bool} forceSelector Shall we select the suggestion?
|
||||
*/
|
||||
phpbb.timezonePreselectSelect = function(forceSelector) {
|
||||
|
||||
@@ -891,8 +887,8 @@ phpbb.ajaxCallbacks = {};
|
||||
*
|
||||
* See the phpbb.ajaxify comments for information on stuff like parameters.
|
||||
*
|
||||
* @param string id The name of the callback.
|
||||
* @param function callback The callback to be called.
|
||||
* @param {string} id The name of the callback.
|
||||
* @param {function} callback The callback to be called.
|
||||
*/
|
||||
phpbb.addAjaxCallback = function(id, callback) {
|
||||
if (typeof callback === 'function') {
|
||||
@@ -983,7 +979,7 @@ phpbb.addAjaxCallback('toggle_link', function() {
|
||||
* types text.
|
||||
*
|
||||
* @param {jQuery} $items jQuery object(s) to resize
|
||||
* @param {object} options Optional parameter that adjusts default
|
||||
* @param {object} [options] Optional parameter that adjusts default
|
||||
* configuration. See configuration variable
|
||||
*
|
||||
* Optional parameters:
|
||||
@@ -1020,15 +1016,19 @@ phpbb.resizeTextArea = function($items, options) {
|
||||
function resetAutoResize(item) {
|
||||
var $item = $(item);
|
||||
if ($item.hasClass('auto-resized')) {
|
||||
$(item).css({height: '', resize: ''}).removeClass('auto-resized');
|
||||
$(item)
|
||||
.css({ height: '', resize: '' })
|
||||
.removeClass('auto-resized');
|
||||
configuration.resetCallback.call(item, $item);
|
||||
}
|
||||
}
|
||||
|
||||
function autoResize(item) {
|
||||
function setHeight(height) {
|
||||
height += parseInt($item.css('height')) - $item.height();
|
||||
$item.css({height: height + 'px', resize: 'none'}).addClass('auto-resized');
|
||||
height += parseInt($item.css('height'), 10) - $item.height();
|
||||
$item
|
||||
.css({ height: height + 'px', resize: 'none' })
|
||||
.addClass('auto-resized');
|
||||
configuration.resizeCallback.call(item, $item);
|
||||
}
|
||||
|
||||
@@ -1044,7 +1044,7 @@ phpbb.resizeTextArea = function($items, options) {
|
||||
configuration.maxHeight
|
||||
),
|
||||
$item = $(item),
|
||||
height = parseInt($item.height()),
|
||||
height = parseInt($item.height(), 10),
|
||||
scrollHeight = (item.scrollHeight) ? item.scrollHeight : 0;
|
||||
|
||||
if (height < 0) {
|
||||
@@ -1053,8 +1053,7 @@ phpbb.resizeTextArea = function($items, options) {
|
||||
|
||||
if (height > maxHeight) {
|
||||
setHeight(maxHeight);
|
||||
}
|
||||
else if (scrollHeight > (height + 5)) {
|
||||
} else if (scrollHeight > (height + 5)) {
|
||||
setHeight(Math.min(maxHeight, scrollHeight));
|
||||
}
|
||||
}
|
||||
@@ -1083,7 +1082,7 @@ phpbb.resizeTextArea = function($items, options) {
|
||||
* @param {Array} endTags List of end tags to look for
|
||||
* For example, Array('[/code]')
|
||||
*
|
||||
* @return {boolean} True if cursor is in bbcode tag
|
||||
* @returns {boolean} True if cursor is in bbcode tag
|
||||
*/
|
||||
phpbb.inBBCodeTag = function(textarea, startTags, endTags) {
|
||||
var start = textarea.selectionStart,
|
||||
@@ -1155,7 +1154,7 @@ phpbb.applyCodeEditor = function(textarea) {
|
||||
* @param {boolean} stripCodeStart If true, only part of line
|
||||
* after [code] tag will be returned.
|
||||
*
|
||||
* @return {string} Line of text
|
||||
* @returns {string} Line of text
|
||||
*/
|
||||
function getLastLine(stripCodeStart) {
|
||||
var start = textarea.selectionStart,
|
||||
@@ -1171,7 +1170,7 @@ phpbb.applyCodeEditor = function(textarea) {
|
||||
var tagLength = startTags[i].length;
|
||||
|
||||
value = value.substring(index + tagLength);
|
||||
if (startTags[i].lastIndexOf(startTagsEnd) != tagLength) {
|
||||
if (startTags[i].lastIndexOf(startTagsEnd) !== tagLength) {
|
||||
index = value.indexOf(startTagsEnd);
|
||||
|
||||
if (index >= 0) {
|
||||
@@ -1188,7 +1187,7 @@ phpbb.applyCodeEditor = function(textarea) {
|
||||
/**
|
||||
* Append text at cursor position
|
||||
*
|
||||
* @param {string} Text Text to append
|
||||
* @param {string} text Text to append
|
||||
*/
|
||||
function appendText(text) {
|
||||
var start = textarea.selectionStart,
|
||||
@@ -1230,6 +1229,31 @@ phpbb.applyCodeEditor = function(textarea) {
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Show drag and drop animation when textarea is present
|
||||
*
|
||||
* This function will enable the drag and drop animation for a specified
|
||||
* textarea.
|
||||
*
|
||||
* @param {HTMLElement} textarea Textarea DOM object to apply editor to
|
||||
*/
|
||||
phpbb.showDragNDrop = function(textarea) {
|
||||
if (!textarea) {
|
||||
return;
|
||||
}
|
||||
|
||||
$('body').on('dragenter dragover', function () {
|
||||
$(textarea).addClass('drag-n-drop');
|
||||
}).on('dragleave dragout dragend drop', function() {
|
||||
$(textarea).removeClass('drag-n-drop');
|
||||
});
|
||||
$(textarea).on('dragenter dragover', function () {
|
||||
$(textarea).addClass('drag-n-drop-highlight');
|
||||
}).on('dragleave dragout dragend drop', function() {
|
||||
$(textarea).removeClass('drag-n-drop-highlight');
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* List of classes that toggle dropdown menu,
|
||||
* list of classes that contain visible dropdown menu
|
||||
@@ -1322,12 +1346,15 @@ phpbb.toggleDropdown = function() {
|
||||
fullFreeSpace = freeSpace + parent.outerWidth();
|
||||
|
||||
options.dropdown.find('.dropdown-contents').each(function() {
|
||||
contentWidth = parseInt($(this).outerWidth());
|
||||
$(this).css({marginLeft: 0, left: 0});
|
||||
contentWidth = parseInt($(this).outerWidth(), 10);
|
||||
$(this).css({ marginLeft: 0, left: 0 });
|
||||
});
|
||||
|
||||
var maxOffset = Math.min(contentWidth, fullFreeSpace) + 'px';
|
||||
options.dropdown.css({'width': maxOffset, 'margin-left': '-' + maxOffset});
|
||||
options.dropdown.css({
|
||||
width: maxOffset,
|
||||
marginLeft: -maxOffset
|
||||
});
|
||||
}
|
||||
} else {
|
||||
options.dropdown.css('margin-right', '-' + (windowWidth + freeSpace) + 'px');
|
||||
@@ -1389,14 +1416,12 @@ phpbb.registerDropdown = function(toggle, dropdown, options) {
|
||||
/**
|
||||
* Get the HTML for a color palette table.
|
||||
*
|
||||
* @param string dir Palette direction - either v or h
|
||||
* @param int width Palette cell width.
|
||||
* @param int height Palette cell height.
|
||||
* @param {string} dir Palette direction - either v or h
|
||||
* @param {int} width Palette cell width.
|
||||
* @param {int} height Palette cell height.
|
||||
*/
|
||||
phpbb.colorPalette = function(dir, width, height) {
|
||||
var r = 0,
|
||||
g = 0,
|
||||
b = 0,
|
||||
var r, g, b,
|
||||
numberList = new Array(6),
|
||||
color = '',
|
||||
html = '';
|
||||
@@ -1407,32 +1432,33 @@ phpbb.colorPalette = function(dir, width, height) {
|
||||
numberList[3] = 'BF';
|
||||
numberList[4] = 'FF';
|
||||
|
||||
var tableClass = (dir == 'h') ? 'horizontal-palette' : 'vertical-palette';
|
||||
var tableClass = (dir === 'h') ? 'horizontal-palette' : 'vertical-palette';
|
||||
html += '<table class="not-responsive colour-palette ' + tableClass + '" style="width: auto;">';
|
||||
|
||||
for (r = 0; r < 5; r++) {
|
||||
if (dir == 'h') {
|
||||
if (dir === 'h') {
|
||||
html += '<tr>';
|
||||
}
|
||||
|
||||
for (g = 0; g < 5; g++) {
|
||||
if (dir == 'v') {
|
||||
if (dir === 'v') {
|
||||
html += '<tr>';
|
||||
}
|
||||
|
||||
for (b = 0; b < 5; b++) {
|
||||
color = String(numberList[r]) + String(numberList[g]) + String(numberList[b]);
|
||||
html += '<td style="background-color: #' + color + '; width: ' + width + 'px; height: ' + height + 'px;">';
|
||||
html += '<a href="#" data-color="' + color + '" style="display: block; width: ' + width + 'px; height: ' + height + 'px; " alt="#' + color + '" title="#' + color + '"></a>';
|
||||
color = '' + numberList[r] + numberList[g] + numberList[b];
|
||||
html += '<td style="background-color: #' + color + '; width: ' + width + 'px; height: ' +
|
||||
height + 'px;"><a href="#" data-color="' + color + '" style="display: block; width: ' +
|
||||
width + 'px; height: ' + height + 'px; " alt="#' + color + '" title="#' + color + '"></a>';
|
||||
html += '</td>';
|
||||
}
|
||||
|
||||
if (dir == 'v') {
|
||||
if (dir === 'v') {
|
||||
html += '</tr>';
|
||||
}
|
||||
}
|
||||
|
||||
if (dir == 'h') {
|
||||
if (dir === 'h') {
|
||||
html += '</tr>';
|
||||
}
|
||||
}
|
||||
@@ -1443,7 +1469,7 @@ phpbb.colorPalette = function(dir, width, height) {
|
||||
/**
|
||||
* Register a color palette.
|
||||
*
|
||||
* @param object el jQuery object for the palette container.
|
||||
* @param {jQuery} el jQuery object for the palette container.
|
||||
*/
|
||||
phpbb.registerPalette = function(el) {
|
||||
var orientation = el.attr('data-orientation'),
|
||||
@@ -1472,15 +1498,15 @@ phpbb.registerPalette = function(el) {
|
||||
}
|
||||
e.preventDefault();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Set display of page element
|
||||
*
|
||||
* @param string id The ID of the element to change
|
||||
* @param int action Set to 0 if element display should be toggled, -1 for
|
||||
* @param {string} id The ID of the element to change
|
||||
* @param {int} action Set to 0 if element display should be toggled, -1 for
|
||||
* hiding the element, and 1 for showing it.
|
||||
* @param string type Display type that should be used, e.g. inline, block or
|
||||
* @param {string} type Display type that should be used, e.g. inline, block or
|
||||
* other CSS "display" types
|
||||
*/
|
||||
phpbb.toggleDisplay = function(id, action, type) {
|
||||
@@ -1501,8 +1527,7 @@ phpbb.toggleDisplay = function(id, action, type) {
|
||||
* Toggle additional settings based on the selected
|
||||
* option of select element.
|
||||
*
|
||||
* @param jQuery el jQuery select element object.
|
||||
* @return undefined
|
||||
* @param {jQuery} el jQuery select element object.
|
||||
*/
|
||||
phpbb.toggleSelectSettings = function(el) {
|
||||
el.children().each(function() {
|
||||
@@ -1516,11 +1541,11 @@ phpbb.toggleSelectSettings = function(el) {
|
||||
* Get function from name.
|
||||
* Based on http://stackoverflow.com/a/359910
|
||||
*
|
||||
* @param string functionName Function to get.
|
||||
* @return function
|
||||
* @param {string} functionName Function to get.
|
||||
* @returns function
|
||||
*/
|
||||
phpbb.getFunctionByName = function (functionName) {
|
||||
var namespaces = functionName.split('.'),
|
||||
var namespaces = functionName.split('.'),
|
||||
func = namespaces.pop(),
|
||||
context = window;
|
||||
|
||||
@@ -1585,6 +1610,21 @@ phpbb.registerPageDropdowns = function() {
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Handle avatars to be lazy loaded.
|
||||
*/
|
||||
phpbb.lazyLoadAvatars = function loadAvatars() {
|
||||
$('.avatar[data-src]').each(function () {
|
||||
var $avatar = $(this);
|
||||
|
||||
$avatar
|
||||
.attr('src', $avatar.data('src'))
|
||||
.removeAttr('data-src');
|
||||
});
|
||||
};
|
||||
|
||||
$(window).load(phpbb.lazyLoadAvatars);
|
||||
|
||||
/**
|
||||
* Apply code editor to all textarea elements with data-bbcode attribute
|
||||
*/
|
||||
|
@@ -159,7 +159,7 @@ function insert_text(text, spaces, popup) {
|
||||
/**
|
||||
* Add inline attachment at position
|
||||
*/
|
||||
function attach_inline(index, filename) {
|
||||
function attachInline(index, filename) {
|
||||
insert_text('[attachment=' + index + ']' + filename + '[/attachment]');
|
||||
document.forms[form_name].elements[text_name].focus();
|
||||
}
|
||||
@@ -355,6 +355,9 @@ function getCaretPosition(txtarea) {
|
||||
textarea = doc.forms[form_name].elements[text_name];
|
||||
|
||||
phpbb.applyCodeEditor(textarea);
|
||||
if ($('#attach-panel').length) {
|
||||
phpbb.showDragNDrop(textarea);
|
||||
}
|
||||
});
|
||||
})(jQuery);
|
||||
|
||||
|
@@ -1,26 +1,26 @@
|
||||
/* global phpbb, plupload, attachInline */
|
||||
|
||||
plupload.addI18n(phpbb.plupload.i18n);
|
||||
phpbb.plupload.ids = [];
|
||||
|
||||
(function($) { // Avoid conflicts with other libraries
|
||||
|
||||
"use strict";
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Set up the uploader.
|
||||
*
|
||||
* @return undefined
|
||||
*/
|
||||
phpbb.plupload.initialize = function() {
|
||||
// Initialize the Plupload uploader.
|
||||
uploader.init();
|
||||
phpbb.plupload.uploader.init();
|
||||
|
||||
// Set attachment data.
|
||||
phpbb.plupload.setData(phpbb.plupload.data);
|
||||
phpbb.plupload.updateMultipartParams(phpbb.plupload.getSerializedData());
|
||||
|
||||
// Only execute if Plupload initialized successfully.
|
||||
uploader.bind('Init', function() {
|
||||
phpbb.plupload.form = $(phpbb.plupload.config.form_hook)[0],
|
||||
phpbb.plupload.uploader.bind('Init', function() {
|
||||
phpbb.plupload.form = $(phpbb.plupload.config.form_hook)[0];
|
||||
phpbb.plupload.rowTpl = $('#attach-row-tpl')[0].outerHTML;
|
||||
|
||||
// Hide the basic upload panel and remove the attach row template.
|
||||
@@ -29,18 +29,18 @@ phpbb.plupload.initialize = function() {
|
||||
$('#attach-panel-multi').show();
|
||||
});
|
||||
|
||||
uploader.bind('PostInit', function() {
|
||||
phpbb.plupload.uploader.bind('PostInit', function() {
|
||||
// Point out the drag-and-drop zone if it's supported.
|
||||
if (uploader.features.dragdrop) {
|
||||
if (phpbb.plupload.uploader.features.dragdrop) {
|
||||
$('#drag-n-drop-message').show();
|
||||
}
|
||||
|
||||
// Ensure "Add files" button position is correctly calculated.
|
||||
if ($('#attach-panel-multi').is(':visible')) {
|
||||
uploader.refresh();
|
||||
phpbb.plupload.uploader.refresh();
|
||||
}
|
||||
$('[data-subpanel="attach-panel"]').one('click', function() {
|
||||
uploader.refresh();
|
||||
phpbb.plupload.uploader.refresh();
|
||||
});
|
||||
});
|
||||
};
|
||||
@@ -48,37 +48,32 @@ phpbb.plupload.initialize = function() {
|
||||
/**
|
||||
* Unsets all elements in the object uploader.settings.multipart_params whose keys
|
||||
* begin with 'attachment_data['
|
||||
*
|
||||
* @return undefined
|
||||
*/
|
||||
phpbb.plupload.clearParams = function() {
|
||||
var obj = uploader.settings.multipart_params;
|
||||
var obj = phpbb.plupload.uploader.settings.multipart_params;
|
||||
for (var key in obj) {
|
||||
if (!obj.hasOwnProperty(key) || key.indexOf('attachment_data[') !== 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
delete uploader.settings.multipart_params[key];
|
||||
delete phpbb.plupload.uploader.settings.multipart_params[key];
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Update uploader.settings.multipart_params object with new data.
|
||||
*
|
||||
* @param object obj
|
||||
* @return undefined
|
||||
* @param {object} obj
|
||||
*/
|
||||
phpbb.plupload.updateMultipartParams = function(obj) {
|
||||
uploader.settings.multipart_params = $.extend(
|
||||
uploader.settings.multipart_params,
|
||||
obj
|
||||
);
|
||||
var settings = phpbb.plupload.uploader.settings;
|
||||
settings.multipart_params = $.extend(settings.multipart_params, obj);
|
||||
};
|
||||
|
||||
/**
|
||||
* Convert the array of attachment objects into an object that PHP would expect as POST data.
|
||||
*
|
||||
* @return object An object in the form 'attachment_data[i][key]': value as
|
||||
* @returns {object} An object in the form 'attachment_data[i][key]': value as
|
||||
* expected by the server
|
||||
*/
|
||||
phpbb.plupload.getSerializedData = function() {
|
||||
@@ -100,22 +95,19 @@ phpbb.plupload.getSerializedData = function() {
|
||||
* Get the index from the phpbb.plupload.data array where the given
|
||||
* attachment id appears.
|
||||
*
|
||||
* @param int attach_id The attachment id of the file.
|
||||
* @return bool Returns false if the id cannot be found.
|
||||
* @return int Returns the index of the file if it exists.
|
||||
* @param {int} attachId The attachment id of the file.
|
||||
* @returns {bool|int} Index of the file if exists, otherwise false.
|
||||
*/
|
||||
phpbb.plupload.getIndex = function(attach_id) {
|
||||
var index = $.inArray(Number(attach_id), phpbb.plupload.ids);
|
||||
phpbb.plupload.getIndex = function(attachId) {
|
||||
var index = $.inArray(Number(attachId), phpbb.plupload.ids);
|
||||
return (index !== -1) ? index : false;
|
||||
};
|
||||
|
||||
/**
|
||||
* Set the data in phpbb.plupload.data and phpbb.plupload.ids arrays.
|
||||
*
|
||||
* @param array data Array containing the new data to use. In the form of
|
||||
* array(index => object(property: value). Requires attach_id to be one of the object properties.
|
||||
*
|
||||
* @return undefined
|
||||
* @param {Array} data Array containing the new data to use. In the form of
|
||||
* array(index => object(property: value). Requires attach_id to be one of the object properties.
|
||||
*/
|
||||
phpbb.plupload.setData = function(data) {
|
||||
// Make sure that the array keys are reset.
|
||||
@@ -129,12 +121,11 @@ phpbb.plupload.setData = function(data) {
|
||||
|
||||
/**
|
||||
* Update the attachment data in the HTML and the phpbb & phpbb.plupload objects.
|
||||
*
|
||||
* @param array data Array containing the new data to use.
|
||||
* @param string action The action that required the update. Used to update the inline attachment bbcodes.
|
||||
* @param int index The index from phpbb.plupload_ids that was affected by the action.
|
||||
* @param array downloadUrl Optional array of download urls to update.
|
||||
* @return undefined
|
||||
*
|
||||
* @param {Array} data Array containing the new data to use.
|
||||
* @param {string} action The action that required the update. Used to update the inline attachment bbcodes.
|
||||
* @param {int} index The index from phpbb.plupload_ids that was affected by the action.
|
||||
* @param {Array} downloadUrl Optional array of download urls to update.
|
||||
*/
|
||||
phpbb.plupload.update = function(data, action, index, downloadUrl) {
|
||||
|
||||
@@ -147,9 +138,8 @@ phpbb.plupload.update = function(data, action, index, downloadUrl) {
|
||||
|
||||
/**
|
||||
* Update the relevant elements and hidden data for all attachments.
|
||||
*
|
||||
* @param array downloadUrl Optional array of download urls to update.
|
||||
* @return undefined
|
||||
*
|
||||
* @param {Array} downloadUrl Optional array of download urls to update.
|
||||
*/
|
||||
phpbb.plupload.updateRows = function(downloadUrl) {
|
||||
for (var i = 0; i < phpbb.plupload.ids.length; i++) {
|
||||
@@ -162,9 +152,8 @@ phpbb.plupload.updateRows = function(downloadUrl) {
|
||||
* using the id "attach-row-tpl" to be present. This snippet is cloned and the
|
||||
* data for the file inserted into it. The row is then appended or prepended to
|
||||
* #file-list based on the attach_order setting.
|
||||
*
|
||||
* @param object file Plupload file object for the new attachment.
|
||||
* @return undefined
|
||||
*
|
||||
* @param {object} file Plupload file object for the new attachment.
|
||||
*/
|
||||
phpbb.plupload.insertRow = function(file) {
|
||||
var row = $(phpbb.plupload.rowTpl);
|
||||
@@ -173,7 +162,7 @@ phpbb.plupload.insertRow = function(file) {
|
||||
row.find('.file-name').html(plupload.xmlEncode(file.name));
|
||||
row.find('.file-size').html(plupload.formatSize(file.size));
|
||||
|
||||
if (phpbb.plupload.order == 'desc') {
|
||||
if (phpbb.plupload.order === 'desc') {
|
||||
$('#file-list').prepend(row);
|
||||
} else {
|
||||
$('#file-list').append(row);
|
||||
@@ -182,10 +171,9 @@ phpbb.plupload.insertRow = function(file) {
|
||||
|
||||
/**
|
||||
* Update the relevant elements and hidden data for an attachment.
|
||||
*
|
||||
* @param int index The index from phpbb.plupload.ids of the attachment to edit.
|
||||
* @param array downloadUrl Optional array of download urls to update.
|
||||
* @return undefined
|
||||
*
|
||||
* @param {int} index The index from phpbb.plupload.ids of the attachment to edit.
|
||||
* @param {Array} downloadUrl Optional array of download urls to update.
|
||||
*/
|
||||
phpbb.plupload.updateRow = function(index, downloadUrl) {
|
||||
var attach = phpbb.plupload.data[index],
|
||||
@@ -197,7 +185,7 @@ phpbb.plupload.updateRow = function(index, downloadUrl) {
|
||||
link = $('<a></a>');
|
||||
|
||||
link.attr('href', url).html(attach.real_filename);
|
||||
row.find('.file-name').html(link)
|
||||
row.find('.file-name').html(link);
|
||||
}
|
||||
|
||||
row.find('textarea').attr('name', 'comment_list[' + index + ']');
|
||||
@@ -207,18 +195,21 @@ phpbb.plupload.updateRow = function(index, downloadUrl) {
|
||||
/**
|
||||
* Update hidden input data for an attachment.
|
||||
*
|
||||
* @param object row jQuery object for the attachment row.
|
||||
* @param object attach Attachment data object from phpbb.plupload.data
|
||||
* @param int index Attachment index from phpbb.plupload.ids
|
||||
* @return undefined
|
||||
* @param {object} row jQuery object for the attachment row.
|
||||
* @param {object} attach Attachment data object from phpbb.plupload.data
|
||||
* @param {int} index Attachment index from phpbb.plupload.ids
|
||||
*/
|
||||
phpbb.plupload.updateHiddenData = function(row, attach, index) {
|
||||
row.find('input[type="hidden"]').remove();
|
||||
|
||||
for (var key in attach) {
|
||||
if (!attach.hasOwnProperty(key)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var input = $('<input />')
|
||||
.attr('type', 'hidden')
|
||||
.attr('name', 'attachment_data[' + index + '][' + key +']')
|
||||
.attr('name', 'attachment_data[' + index + '][' + key + ']')
|
||||
.attr('value', attach[key]);
|
||||
$('textarea', row).after(input);
|
||||
}
|
||||
@@ -230,16 +221,14 @@ phpbb.plupload.updateHiddenData = function(row, attach, index) {
|
||||
* responds with the updated attachment data list so that any future
|
||||
* uploads can maintain state with the server
|
||||
*
|
||||
* @param object row jQuery object for the attachment row.
|
||||
* @param int attachId Attachment id of the file to be removed.
|
||||
*
|
||||
* @return undefined
|
||||
* @param {object} row jQuery object for the attachment row.
|
||||
* @param {int} attachId Attachment id of the file to be removed.
|
||||
*/
|
||||
phpbb.plupload.deleteFile = function(row, attachId) {
|
||||
// If there's no attach id, then the file hasn't been uploaded. Simply delete the row.
|
||||
if (typeof attachId === 'undefined') {
|
||||
var file = uploader.getFile(row.attr('id'));
|
||||
uploader.removeFile(file);
|
||||
var file = phpbb.plupload.uploader.getFile(row.attr('id'));
|
||||
phpbb.plupload.uploader.removeFile(file);
|
||||
|
||||
row.slideUp(100, function() {
|
||||
row.remove();
|
||||
@@ -267,7 +256,7 @@ phpbb.plupload.deleteFile = function(row, attachId) {
|
||||
|
||||
// trigger_error() was called which likely means a permission error was encountered.
|
||||
if (typeof response.title !== 'undefined') {
|
||||
uploader.trigger('Error', {message: response.message});
|
||||
phpbb.plupload.uploader.trigger('Error', { message: response.message });
|
||||
// We will have to assume that the deletion failed. So leave the file status as uploaded.
|
||||
row.find('.file-status').toggleClass('file-uploaded');
|
||||
|
||||
@@ -278,21 +267,21 @@ phpbb.plupload.deleteFile = function(row, attachId) {
|
||||
phpbb.plupload.handleMaxFilesReached();
|
||||
|
||||
if (row.attr('id')) {
|
||||
var file = uploader.getFile(row.attr('id'));
|
||||
uploader.removeFile(file);
|
||||
var file = phpbb.plupload.uploader.getFile(row.attr('id'));
|
||||
phpbb.plupload.uploader.removeFile(file);
|
||||
}
|
||||
row.slideUp(100, function() {
|
||||
row.remove();
|
||||
// Hide the file list if it's empty now.
|
||||
phpbb.plupload.hideEmptyList();
|
||||
});
|
||||
uploader.trigger('FilesRemoved');
|
||||
phpbb.plupload.uploader.trigger('FilesRemoved');
|
||||
};
|
||||
|
||||
$.ajax(phpbb.plupload.config.url, {
|
||||
type: 'POST',
|
||||
data: $.extend(fields, phpbb.plupload.getSerializedData()),
|
||||
headers: {'X-PHPBB-USING-PLUPLOAD': '1', 'X-Requested-With': 'XMLHttpRequest'}
|
||||
headers: phpbb.plupload.config.headers
|
||||
})
|
||||
.always(always)
|
||||
.done(done);
|
||||
@@ -300,25 +289,21 @@ phpbb.plupload.deleteFile = function(row, attachId) {
|
||||
|
||||
/**
|
||||
* Check the attachment list and hide its container if it's empty.
|
||||
*
|
||||
* @return undefined
|
||||
*/
|
||||
phpbb.plupload.hideEmptyList = function() {
|
||||
if (!$('#file-list').children().length) {
|
||||
$('#file-list-container').slideUp(100);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Update the indices used in inline attachment bbcodes. This ensures that the bbcodes
|
||||
* correspond to the correct file after a file is added or removed. This should be called
|
||||
* before the phpbb.plupload,data and phpbb.plupload.ids arrays are updated, otherwise it will
|
||||
* not work correctly.
|
||||
* Update the indices used in inline attachment bbcodes. This ensures that the
|
||||
* bbcodes correspond to the correct file after a file is added or removed.
|
||||
* This should be called before the phpbb.plupload,data and phpbb.plupload.ids
|
||||
* arrays are updated, otherwise it will not work correctly.
|
||||
*
|
||||
* @param string action The action that occurred -- either "addition" or "removal"
|
||||
* @param int index The index of the attachment from phpbb.plupload.ids that was affected.
|
||||
*
|
||||
* @return undefined
|
||||
* @param {string} action The action that occurred -- either "addition" or "removal"
|
||||
* @param {int} index The index of the attachment from phpbb.plupload.ids that was affected.
|
||||
*/
|
||||
phpbb.plupload.updateBbcode = function(action, index) {
|
||||
var textarea = $('#message', phpbb.plupload.form),
|
||||
@@ -330,64 +315,59 @@ phpbb.plupload.updateBbcode = function(action, index) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Private function used to replace the bbcode.
|
||||
var updateBbcode = function(match, fileName) {
|
||||
// Remove the bbcode if the file was removed.
|
||||
if (removal && index === i) {
|
||||
return '';
|
||||
}
|
||||
var newIndex = i + ((removal) ? -1 : 1);
|
||||
return '[attachment=' + newIndex +']' + fileName + '[/attachment]';
|
||||
};
|
||||
function runUpdate(i) {
|
||||
var regex = new RegExp('\\[attachment=' + i + '\\](.*?)\\[\\/attachment\\]', 'g');
|
||||
text = text.replace(regex, function updateBbcode(_, fileName) {
|
||||
// Remove the bbcode if the file was removed.
|
||||
if (removal && index === i) {
|
||||
return '';
|
||||
}
|
||||
var newIndex = i + ((removal) ? -1 : 1);
|
||||
return '[attachment=' + newIndex + ']' + fileName + '[/attachment]';
|
||||
});
|
||||
}
|
||||
|
||||
// Private function used to generate search regexp
|
||||
var searchRegexp = function(index) {
|
||||
return new RegExp('\\[attachment=' + index + '\\](.*?)\\[\\/attachment\\]', 'g');
|
||||
}
|
||||
// The update order of the indices is based on the action taken to ensure that we don't corrupt
|
||||
// the bbcode index by updating it several times as we move through the loop.
|
||||
// Removal loop starts at the removed index and moves to the end of the array.
|
||||
// Addition loop starts at the end of the array and moves to the added index at 0.
|
||||
var searchLoop = function() {
|
||||
if (typeof i === 'undefined') {
|
||||
i = (removal) ? index : phpbb.plupload.ids.length - 1;
|
||||
}
|
||||
return (removal) ? (i < phpbb.plupload.ids.length): (i >= index);
|
||||
}
|
||||
// Loop forwards when removing and backwards when adding ensures we don't
|
||||
// corrupt the bbcode index.
|
||||
var i;
|
||||
|
||||
while (searchLoop()) {
|
||||
text = text.replace(searchRegexp(i), updateBbcode);
|
||||
(removal) ? i++ : i--;
|
||||
if (removal) {
|
||||
for (i = index; i < phpbb.plupload.ids.length; i++) {
|
||||
runUpdate(i);
|
||||
}
|
||||
} else {
|
||||
for (i = phpbb.plupload.ids.length - 1; i >= index; i--) {
|
||||
runUpdate(i);
|
||||
}
|
||||
}
|
||||
|
||||
textarea.val(text);
|
||||
};
|
||||
|
||||
/**
|
||||
* Get Plupload file objects based on their upload status.
|
||||
*
|
||||
* @param int status Plupload status - plupload.DONE, plupload.FAILED, plupload.QUEUED,
|
||||
* plupload.STARTED, plupload.STOPPED
|
||||
* @param {int} status Plupload status - plupload.DONE, plupload.FAILED,
|
||||
* plupload.QUEUED, plupload.STARTED, plupload.STOPPED
|
||||
*
|
||||
* @return Returns an array of the Plupload file objects matching the status.
|
||||
* @returns {Array} The Plupload file objects matching the status.
|
||||
*/
|
||||
phpbb.plupload.getFilesByStatus = function(status) {
|
||||
var files = [];
|
||||
|
||||
$.each(uploader.files, function(i, file) {
|
||||
$.each(phpbb.plupload.uploader.files, function(i, file) {
|
||||
if (file.status === status) {
|
||||
files.push(file);
|
||||
}
|
||||
});
|
||||
return files;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Check whether the user has reached the maximun number of files that he's allowed
|
||||
* to upload. If so, disables the uploader and marks the queued files as failed. Otherwise
|
||||
* makes sure that the uploader is enabled.
|
||||
*
|
||||
* @return bool Returns true if the limit has been reached. False if otherwise.
|
||||
* @returns {bool} True if the limit has been reached. False if otherwise.
|
||||
*/
|
||||
phpbb.plupload.handleMaxFilesReached = function() {
|
||||
// If there is no limit, the user is an admin or moderator.
|
||||
@@ -400,41 +380,36 @@ phpbb.plupload.handleMaxFilesReached = function() {
|
||||
phpbb.plupload.markQueuedFailed(phpbb.plupload.lang.TOO_MANY_ATTACHMENTS);
|
||||
// Disable the uploader.
|
||||
phpbb.plupload.disableUploader();
|
||||
uploader.trigger('Error', {message: phpbb.plupload.lang.TOO_MANY_ATTACHMENTS});
|
||||
phpbb.plupload.uploader.trigger('Error', { message: phpbb.plupload.lang.TOO_MANY_ATTACHMENTS });
|
||||
|
||||
return true;
|
||||
} else if(phpbb.plupload.maxFiles > phpbb.plupload.ids.length) {
|
||||
} else if (phpbb.plupload.maxFiles > phpbb.plupload.ids.length) {
|
||||
// Enable the uploader if the user is under the limit
|
||||
phpbb.plupload.enableUploader();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Disable the uploader
|
||||
*
|
||||
* @return undefined
|
||||
*/
|
||||
phpbb.plupload.disableUploader = function() {
|
||||
$('#add_files').addClass('disabled');
|
||||
uploader.disableBrowse();
|
||||
}
|
||||
phpbb.plupload.uploader.disableBrowse();
|
||||
};
|
||||
|
||||
/**
|
||||
* Enable the uploader
|
||||
*
|
||||
* @return undefined
|
||||
*/
|
||||
phpbb.plupload.enableUploader = function() {
|
||||
$('#add_files').removeClass('disabled');
|
||||
uploader.disableBrowse(false);
|
||||
}
|
||||
phpbb.plupload.uploader.disableBrowse(false);
|
||||
};
|
||||
|
||||
/**
|
||||
* Mark all queued files as failed.
|
||||
*
|
||||
* @param string error Error message to present to the user.
|
||||
* @return undefined
|
||||
* @param {string} error Error message to present to the user.
|
||||
*/
|
||||
phpbb.plupload.markQueuedFailed = function(error) {
|
||||
var files = phpbb.plupload.getFilesByStatus(plupload.QUEUED);
|
||||
@@ -443,48 +418,49 @@ phpbb.plupload.markQueuedFailed = function(error) {
|
||||
$('#' + file.id).find('.file-progress').hide();
|
||||
phpbb.plupload.fileError(file, error);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Marks a file as failed and sets the error message for it.
|
||||
*
|
||||
* @param object file Plupload file object that failed.
|
||||
* @param string error Error message to present to the user.
|
||||
* @return undefined
|
||||
* @param {object} file Plupload file object that failed.
|
||||
* @param {string} error Error message to present to the user.
|
||||
*/
|
||||
phpbb.plupload.fileError = function(file, error) {
|
||||
file.status = plupload.FAILED;
|
||||
file.error = error;
|
||||
$('#' + file.id).find('.file-status').addClass('file-error').attr({'data-error-title': phpbb.plupload.lang.ERROR, 'data-error-message': error});
|
||||
}
|
||||
|
||||
|
||||
$('#' + file.id).find('.file-status')
|
||||
.addClass('file-error')
|
||||
.attr({
|
||||
'data-error-title': phpbb.plupload.lang.ERROR,
|
||||
'data-error-message': error
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Set up the Plupload object and get some basic data.
|
||||
*/
|
||||
var uploader = new plupload.Uploader(phpbb.plupload.config);
|
||||
phpbb.plupload.uploader = new plupload.Uploader(phpbb.plupload.config);
|
||||
phpbb.plupload.initialize();
|
||||
|
||||
|
||||
|
||||
var $fileList = $('#file-list');
|
||||
|
||||
/**
|
||||
* Insert inline attachment bbcode.
|
||||
*/
|
||||
$('#file-list').on('click', '.file-inline-bbcode', function(e) {
|
||||
$fileList.on('click', '.file-inline-bbcode', function(e) {
|
||||
var attachId = $(this).parents('.attach-row').attr('data-attach-id'),
|
||||
index = phpbb.plupload.getIndex(attachId);
|
||||
|
||||
attach_inline(index, phpbb.plupload.data[index].real_filename);
|
||||
attachInline(index, phpbb.plupload.data[index].real_filename);
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
/**
|
||||
* Delete a file.
|
||||
*/
|
||||
$('#file-list').on('click', '.file-delete', function(e) {
|
||||
$fileList.on('click', '.file-delete', function(e) {
|
||||
var row = $(this).parents('.attach-row'),
|
||||
attachId = row.attr('data-attach-id');
|
||||
|
||||
@@ -495,7 +471,7 @@ $('#file-list').on('click', '.file-delete', function(e) {
|
||||
/**
|
||||
* Display the error message for a particular file when the error icon is clicked.
|
||||
*/
|
||||
$('#file-list').on('click', '.file-error', function(e) {
|
||||
$fileList.on('click', '.file-error', function(e) {
|
||||
phpbb.alert($(this).attr('data-error-title'), $(this).attr('data-error-message'));
|
||||
e.preventDefault();
|
||||
});
|
||||
@@ -503,7 +479,7 @@ $('#file-list').on('click', '.file-error', function(e) {
|
||||
/**
|
||||
* Fires when an error occurs.
|
||||
*/
|
||||
uploader.bind('Error', function(up, error) {
|
||||
phpbb.plupload.uploader.bind('Error', function(up, error) {
|
||||
error.file.name = plupload.xmlEncode(error.file.name);
|
||||
|
||||
// The error message that Plupload provides for these is vague, so we'll be more specific.
|
||||
@@ -520,18 +496,15 @@ uploader.bind('Error', function(up, error) {
|
||||
* send the real filename along with the chunk. This is necessary because
|
||||
* for some reason the filename is set to 'blob' whenever a file is chunked
|
||||
*
|
||||
* @param object up The plupload.Uploader object
|
||||
* @param object file The plupload.File object that is about to be
|
||||
* uploaded
|
||||
*
|
||||
* @return undefined
|
||||
* @param {object} up The plupload.Uploader object
|
||||
* @param {object} file The plupload.File object that is about to be uploaded
|
||||
*/
|
||||
uploader.bind('BeforeUpload', function(up, file) {
|
||||
phpbb.plupload.uploader.bind('BeforeUpload', function(up, file) {
|
||||
if (phpbb.plupload.handleMaxFilesReached()) {
|
||||
return;
|
||||
}
|
||||
|
||||
phpbb.plupload.updateMultipartParams({'real_filename': file.name});
|
||||
phpbb.plupload.updateMultipartParams({ real_filename: file.name });
|
||||
});
|
||||
|
||||
/**
|
||||
@@ -539,14 +512,12 @@ uploader.bind('BeforeUpload', function(up, file) {
|
||||
* response from the server and checks for an error. If an error occurs it
|
||||
* is reported to the user and the upload of this particular file is halted
|
||||
*
|
||||
* @param object up The plupload.Uploader object
|
||||
* @param object file The plupload.File object whose chunk has just
|
||||
* @param {object} up The plupload.Uploader object
|
||||
* @param {object} file The plupload.File object whose chunk has just
|
||||
* been uploaded
|
||||
* @param object response The response object from the server
|
||||
*
|
||||
* @return undefined
|
||||
* @param {object} response The response object from the server
|
||||
*/
|
||||
uploader.bind('ChunkUploaded', function(up, file, response) {
|
||||
phpbb.plupload.uploader.bind('ChunkUploaded', function(up, file, response) {
|
||||
if (response.chunk >= response.chunks - 1) {
|
||||
return;
|
||||
}
|
||||
@@ -567,7 +538,7 @@ uploader.bind('ChunkUploaded', function(up, file, response) {
|
||||
|
||||
// If trigger_error() was called, then a permission error likely occurred.
|
||||
if (typeof json.title !== 'undefined') {
|
||||
json.error = {message: json.message};
|
||||
json.error = { message: json.message };
|
||||
}
|
||||
|
||||
if (json.error) {
|
||||
@@ -584,10 +555,8 @@ uploader.bind('ChunkUploaded', function(up, file, response) {
|
||||
|
||||
/**
|
||||
* Fires when files are added to the queue.
|
||||
*
|
||||
* @return undefined
|
||||
*/
|
||||
uploader.bind('FilesAdded', function(up, files) {
|
||||
phpbb.plupload.uploader.bind('FilesAdded', function(up, files) {
|
||||
// Prevent unnecessary requests to the server if the user already uploaded
|
||||
// the maximum number of files allowed.
|
||||
if (phpbb.plupload.handleMaxFilesReached()) {
|
||||
@@ -595,13 +564,14 @@ uploader.bind('FilesAdded', function(up, files) {
|
||||
}
|
||||
|
||||
// Switch the active tab if the style supports it
|
||||
if (typeof activateSubPanel == 'function') {
|
||||
activateSubPanel('attach-panel');
|
||||
if (typeof activateSubPanel === 'function') {
|
||||
activateSubPanel('attach-panel'); // jshint ignore: line
|
||||
}
|
||||
|
||||
// Show the file list if there aren't any files currently.
|
||||
if (!$('#file-list-container').is(':visible')) {
|
||||
$('#file-list-container').show(100);
|
||||
var $fileListContainer = $('#file-list-container');
|
||||
if (!$fileListContainer.is(':visible')) {
|
||||
$fileListContainer.show(100);
|
||||
}
|
||||
|
||||
$.each(files, function(i, file) {
|
||||
@@ -609,7 +579,7 @@ uploader.bind('FilesAdded', function(up, files) {
|
||||
});
|
||||
|
||||
up.bind('UploadProgress', function(up, file) {
|
||||
$('#' + file.id + " .file-progress-bar").css('width', file.percent + '%');
|
||||
$('.file-progress-bar', '#' + file.id).css('width', file.percent + '%');
|
||||
$('#file-total-progress-bar').css('width', up.total.percent + '%');
|
||||
});
|
||||
|
||||
@@ -627,14 +597,12 @@ uploader.bind('FilesAdded', function(up, files) {
|
||||
* appends it to the next file upload so that the server can maintain state
|
||||
* with regards to the attachments in a given post
|
||||
*
|
||||
* @param object up The plupload.Uploader object
|
||||
* @param object file The plupload.File object that has just been
|
||||
* @param {object} up The plupload.Uploader object
|
||||
* @param {object} file The plupload.File object that has just been
|
||||
* uploaded
|
||||
* @param string response The response string from the server
|
||||
*
|
||||
* @return undefined
|
||||
* @param {string} response The response string from the server
|
||||
*/
|
||||
uploader.bind('FileUploaded', function(up, file, response) {
|
||||
phpbb.plupload.uploader.bind('FileUploaded', function(up, file, response) {
|
||||
var json = {},
|
||||
row = $('#' + file.id),
|
||||
error;
|
||||
@@ -643,7 +611,7 @@ uploader.bind('FileUploaded', function(up, file, response) {
|
||||
row.find('.file-progress').hide();
|
||||
|
||||
try {
|
||||
json = $.parseJSON(response.response);
|
||||
json = JSON.parse(response.response);
|
||||
} catch (e) {
|
||||
error = 'Error parsing server response.';
|
||||
}
|
||||
@@ -651,7 +619,7 @@ uploader.bind('FileUploaded', function(up, file, response) {
|
||||
// If trigger_error() was called, then a permission error likely occurred.
|
||||
if (typeof json.title !== 'undefined') {
|
||||
error = json.message;
|
||||
up.trigger('Error', {message: error});
|
||||
up.trigger('Error', { message: error });
|
||||
|
||||
// The rest of the queue will fail.
|
||||
phpbb.plupload.markQueuedFailed(error);
|
||||
@@ -662,25 +630,19 @@ uploader.bind('FileUploaded', function(up, file, response) {
|
||||
if (typeof error !== 'undefined') {
|
||||
phpbb.plupload.fileError(file, error);
|
||||
} else if (file.status === plupload.DONE) {
|
||||
file.attachment_data = json['data'][0];
|
||||
file.attachment_data = json.data[0];
|
||||
|
||||
row.attr('data-attach-id', file.attachment_data.attach_id);
|
||||
row.find('.file-inline-bbcode').show();
|
||||
row.find('.file-status').addClass('file-uploaded');
|
||||
phpbb.plupload.update(json['data'], 'addition', 0, [json['download_url']]);
|
||||
phpbb.plupload.update(json.data, 'addition', 0, [json.download_url]);
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Fires when the entire queue of files have been uploaded.
|
||||
*
|
||||
* @param object up The plupload.Uploader object
|
||||
* @param array files An array of plupload.File objects that have just
|
||||
* been uploaded as part of a queue
|
||||
*
|
||||
* @return undefined
|
||||
* Fires when the entire queue of files have been uploaded.
|
||||
*/
|
||||
uploader.bind('UploadComplete', function(up, files) {
|
||||
phpbb.plupload.uploader.bind('UploadComplete', function() {
|
||||
// Hide the progress bar
|
||||
setTimeout(function() {
|
||||
$('#file-total-progress-bar').fadeOut(500, function() {
|
||||
|
17
phpBB/assets/plupload/plupload.full.min.js
vendored
@@ -34,15 +34,15 @@
|
||||
"symfony/http-kernel": "2.3.*",
|
||||
"symfony/routing": "2.3.*",
|
||||
"symfony/yaml": "2.3.*",
|
||||
"twig/twig": "1.13.*"
|
||||
"twig/twig": "1.*"
|
||||
},
|
||||
"require-dev": {
|
||||
"fabpot/goutte": "1.0.*",
|
||||
"phing/phing": "2.4.*",
|
||||
"phpunit/dbunit": "1.3.*",
|
||||
"phpunit/phpunit": "4.1.*",
|
||||
"phing/phing": "2.4.*",
|
||||
"sami/sami": "1.*",
|
||||
"squizlabs/php_codesniffer": "1.*",
|
||||
"squizlabs/php_codesniffer": "2.*",
|
||||
"symfony/browser-kit": "2.3.*",
|
||||
"symfony/css-selector": "2.3.*",
|
||||
"symfony/debug": "2.3.*",
|
||||
|
86
phpBB/composer.lock
generated
@@ -1,9 +1,10 @@
|
||||
{
|
||||
"_readme": [
|
||||
"This file locks the dependencies of your project to a known state",
|
||||
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file"
|
||||
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"hash": "d93446768ea0665b7c55c01890153a67",
|
||||
"hash": "5864f5064e1ca81dd9817ee2674b5dfd",
|
||||
"packages": [
|
||||
{
|
||||
"name": "lusitanian/oauth",
|
||||
@@ -649,25 +650,25 @@
|
||||
},
|
||||
{
|
||||
"name": "twig/twig",
|
||||
"version": "v1.13.2",
|
||||
"version": "v1.20.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/fabpot/Twig.git",
|
||||
"reference": "6d6a1009427d1f398c9d40904147bf9f723d5755"
|
||||
"url": "https://github.com/twigphp/Twig.git",
|
||||
"reference": "1ea4e5f81c6d005fe84d0b38e1c4f1955eb86844"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/fabpot/Twig/zipball/6d6a1009427d1f398c9d40904147bf9f723d5755",
|
||||
"reference": "6d6a1009427d1f398c9d40904147bf9f723d5755",
|
||||
"url": "https://api.github.com/repos/twigphp/Twig/zipball/1ea4e5f81c6d005fe84d0b38e1c4f1955eb86844",
|
||||
"reference": "1ea4e5f81c6d005fe84d0b38e1c4f1955eb86844",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.2.4"
|
||||
"php": ">=5.2.7"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.13-dev"
|
||||
"dev-master": "1.20-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -690,6 +691,11 @@
|
||||
"name": "Armin Ronacher",
|
||||
"email": "armin.ronacher@active-4.com",
|
||||
"role": "Project Founder"
|
||||
},
|
||||
{
|
||||
"name": "Twig Team",
|
||||
"homepage": "http://twig.sensiolabs.org/contributors",
|
||||
"role": "Contributors"
|
||||
}
|
||||
],
|
||||
"description": "Twig, the flexible, fast, and secure template language for PHP",
|
||||
@@ -697,7 +703,7 @@
|
||||
"keywords": [
|
||||
"templating"
|
||||
],
|
||||
"time": "2013-08-03 15:35:31"
|
||||
"time": "2015-08-12 15:56:39"
|
||||
}
|
||||
],
|
||||
"packages-dev": [
|
||||
@@ -763,12 +769,12 @@
|
||||
"target-dir": "Guzzle/Common",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/common.git",
|
||||
"url": "https://github.com/Guzzle3/common.git",
|
||||
"reference": "bf73c87375f60861f8c7ccc7b95878023ade5306"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/common/zipball/bf73c87375f60861f8c7ccc7b95878023ade5306",
|
||||
"url": "https://api.github.com/repos/Guzzle3/common/zipball/bf73c87375f60861f8c7ccc7b95878023ade5306",
|
||||
"reference": "bf73c87375f60861f8c7ccc7b95878023ade5306",
|
||||
"shasum": ""
|
||||
},
|
||||
@@ -807,12 +813,12 @@
|
||||
"target-dir": "Guzzle/Http",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/http.git",
|
||||
"url": "https://github.com/Guzzle3/http.git",
|
||||
"reference": "1034125dfd906b73119e535f03153a62fccb1989"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/http/zipball/1034125dfd906b73119e535f03153a62fccb1989",
|
||||
"url": "https://api.github.com/repos/Guzzle3/http/zipball/1034125dfd906b73119e535f03153a62fccb1989",
|
||||
"reference": "1034125dfd906b73119e535f03153a62fccb1989",
|
||||
"shasum": ""
|
||||
},
|
||||
@@ -864,12 +870,12 @@
|
||||
"target-dir": "Guzzle/Parser",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/parser.git",
|
||||
"url": "https://github.com/Guzzle3/parser.git",
|
||||
"reference": "a25c2ddda1c52fb69a4ee56eb530b13ddd9573c2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/parser/zipball/a25c2ddda1c52fb69a4ee56eb530b13ddd9573c2",
|
||||
"url": "https://api.github.com/repos/Guzzle3/parser/zipball/a25c2ddda1c52fb69a4ee56eb530b13ddd9573c2",
|
||||
"reference": "a25c2ddda1c52fb69a4ee56eb530b13ddd9573c2",
|
||||
"shasum": ""
|
||||
},
|
||||
@@ -908,12 +914,12 @@
|
||||
"target-dir": "Guzzle/Stream",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/guzzle/stream.git",
|
||||
"url": "https://github.com/Guzzle3/stream.git",
|
||||
"reference": "a86111d9ac7db31d65a053c825869409fe8fc83f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/guzzle/stream/zipball/a86111d9ac7db31d65a053c825869409fe8fc83f",
|
||||
"url": "https://api.github.com/repos/Guzzle3/stream/zipball/a86111d9ac7db31d65a053c825869409fe8fc83f",
|
||||
"reference": "a86111d9ac7db31d65a053c825869409fe8fc83f",
|
||||
"shasum": ""
|
||||
},
|
||||
@@ -1545,12 +1551,12 @@
|
||||
"version": "v1.0.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/fabpot/Pimple.git",
|
||||
"url": "https://github.com/silexphp/Pimple.git",
|
||||
"reference": "ae11e57e8c2bb414b2ff93396dbbfc0eb92feb94"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/fabpot/Pimple/zipball/ae11e57e8c2bb414b2ff93396dbbfc0eb92feb94",
|
||||
"url": "https://api.github.com/repos/silexphp/Pimple/zipball/ae11e57e8c2bb414b2ff93396dbbfc0eb92feb94",
|
||||
"reference": "ae11e57e8c2bb414b2ff93396dbbfc0eb92feb94",
|
||||
"shasum": ""
|
||||
},
|
||||
@@ -1914,41 +1920,45 @@
|
||||
},
|
||||
{
|
||||
"name": "squizlabs/php_codesniffer",
|
||||
"version": "1.5.2",
|
||||
"version": "2.3.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
|
||||
"reference": "a76a39b317ce8106abe6264daa505e24e1731860"
|
||||
"reference": "e96d8579fbed0c95ecf2a0501ec4f307a4aa6404"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/a76a39b317ce8106abe6264daa505e24e1731860",
|
||||
"reference": "a76a39b317ce8106abe6264daa505e24e1731860",
|
||||
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/e96d8579fbed0c95ecf2a0501ec4f307a4aa6404",
|
||||
"reference": "e96d8579fbed0c95ecf2a0501ec4f307a4aa6404",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-tokenizer": "*",
|
||||
"ext-xmlwriter": "*",
|
||||
"php": ">=5.1.2"
|
||||
},
|
||||
"suggest": {
|
||||
"phpunit/php-timer": "dev-master"
|
||||
},
|
||||
"bin": [
|
||||
"scripts/phpcs"
|
||||
"scripts/phpcs",
|
||||
"scripts/phpcbf"
|
||||
],
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "2.0.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"CodeSniffer.php",
|
||||
"CodeSniffer/CLI.php",
|
||||
"CodeSniffer/Exception.php",
|
||||
"CodeSniffer/File.php",
|
||||
"CodeSniffer/Fixer.php",
|
||||
"CodeSniffer/Report.php",
|
||||
"CodeSniffer/Reporting.php",
|
||||
"CodeSniffer/Sniff.php",
|
||||
"CodeSniffer/Tokens.php",
|
||||
"CodeSniffer/Reports/",
|
||||
"CodeSniffer/CommentParser/",
|
||||
"CodeSniffer/Tokenizers/",
|
||||
"CodeSniffer/DocGenerators/",
|
||||
"CodeSniffer/Standards/AbstractPatternSniff.php",
|
||||
@@ -1974,13 +1984,13 @@
|
||||
"role": "lead"
|
||||
}
|
||||
],
|
||||
"description": "PHP_CodeSniffer tokenises PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
|
||||
"description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
|
||||
"homepage": "http://www.squizlabs.com/php-codesniffer",
|
||||
"keywords": [
|
||||
"phpcs",
|
||||
"standards"
|
||||
],
|
||||
"time": "2014-02-04 23:49:58"
|
||||
"time": "2015-04-28 23:28:20"
|
||||
},
|
||||
{
|
||||
"name": "symfony/browser-kit",
|
||||
@@ -2236,17 +2246,13 @@
|
||||
"time": "2014-10-01 05:38:33"
|
||||
}
|
||||
],
|
||||
"aliases": [
|
||||
|
||||
],
|
||||
"aliases": [],
|
||||
"minimum-stability": "stable",
|
||||
"stability-flags": [
|
||||
|
||||
],
|
||||
"stability-flags": [],
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"platform-dev": [
|
||||
|
||||
]
|
||||
"platform-dev": []
|
||||
}
|
||||
|
@@ -60,6 +60,7 @@ services:
|
||||
- %core.php_ext%
|
||||
- @path_helper
|
||||
- @mimetype.guesser
|
||||
- @dispatcher
|
||||
- @cache.driver
|
||||
calls:
|
||||
- [set_name, [avatar.driver.upload]]
|
||||
|
@@ -4,6 +4,7 @@ services:
|
||||
arguments:
|
||||
- @auth
|
||||
- @config
|
||||
- @dispatcher
|
||||
- @dbal.conn
|
||||
- @user
|
||||
- %core.root_path%
|
||||
|
@@ -120,6 +120,7 @@ services:
|
||||
- @config
|
||||
- @dbal.conn
|
||||
- @user
|
||||
- @dispatcher
|
||||
calls:
|
||||
- [set_name, [cron.task.core.tidy_search]]
|
||||
tags:
|
||||
|
@@ -18,6 +18,7 @@ services:
|
||||
migrator:
|
||||
class: phpbb\db\migrator
|
||||
arguments:
|
||||
- @service_container
|
||||
- @config
|
||||
- @dbal.conn
|
||||
- @dbal.tools
|
||||
|
@@ -7,6 +7,7 @@ services:
|
||||
- @service_container
|
||||
- @user_loader
|
||||
- @config
|
||||
- @dispatcher
|
||||
- @dbal.conn
|
||||
- @cache
|
||||
- @user
|
||||
|
@@ -1,7 +1,7 @@
|
||||
# Structure:
|
||||
#
|
||||
# foo_controller:
|
||||
# pattern: /foo
|
||||
# path: /foo
|
||||
# defaults: { _controller: foo_sevice:method }
|
||||
#
|
||||
# The above will be accessed via app.php?controller=foo and it will
|
||||
|
@@ -198,9 +198,9 @@ $prefixes = array('f_', 'a_', 'm_', 'u_');
|
||||
foreach ($prefixes as $prefix)
|
||||
{
|
||||
$var = $prefix . 'permissions';
|
||||
if (sizeof($$var))
|
||||
if (sizeof(${$var}))
|
||||
{
|
||||
foreach ($$var as $auth_option => $l_ary)
|
||||
foreach (${$var} as $auth_option => $l_ary)
|
||||
{
|
||||
$sql_ary = array(
|
||||
'auth_option' => $auth_option,
|
||||
|
@@ -51,7 +51,6 @@ $classes = $finder->core_path('phpbb/')
|
||||
$db = new \phpbb\db\driver\sqlite();
|
||||
$schema_generator = new \phpbb\db\migration\schema_generator($classes, new \phpbb\config\config(array()), $db, new \phpbb\db\tools($db, true), $phpbb_root_path, $phpEx, $table_prefix);
|
||||
$schema_data = $schema_generator->get_schema();
|
||||
$dbms_type_map = phpbb\db\tools::get_dbms_type_map();
|
||||
|
||||
$fp = fopen($schema_path . 'schema.json', 'wb');
|
||||
fwrite($fp, json_encode($schema_data, JSON_PRETTY_PRINT));
|
||||
|
@@ -18,15 +18,19 @@ if (php_sapi_name() != 'cli')
|
||||
|
||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||
$phpbb_root_path = __DIR__ . '/../';
|
||||
define('IN_PHPBB', true);
|
||||
|
||||
function usage()
|
||||
{
|
||||
echo "Usage: export_events_for_wiki.php COMMAND [EXTENSION]\n";
|
||||
echo "Usage: export_events_for_wiki.php COMMAND [VERSION] [EXTENSION]\n";
|
||||
echo "\n";
|
||||
echo "COMMAND:\n";
|
||||
echo " all:\n";
|
||||
echo " Generate the complete wikipage for https://wiki.phpbb.com/Event_List\n";
|
||||
echo "\n";
|
||||
echo " diff:\n";
|
||||
echo " Generate the Event Diff for the release highlights\n";
|
||||
echo "\n";
|
||||
echo " php:\n";
|
||||
echo " Generate the PHP event section of Event_List\n";
|
||||
echo "\n";
|
||||
@@ -36,6 +40,9 @@ function usage()
|
||||
echo " styles:\n";
|
||||
echo " Generate the Styles Template event section of Event_List\n";
|
||||
echo "\n";
|
||||
echo "VERSION (diff only):\n";
|
||||
echo " Filter events (minimum version)\n";
|
||||
echo "\n";
|
||||
echo "EXTENSION (Optional):\n";
|
||||
echo " If not given, only core events will be exported.\n";
|
||||
echo " Otherwise only events from the extension will be exported.\n";
|
||||
@@ -55,20 +62,32 @@ validate_argument_count($argc, 1);
|
||||
|
||||
$action = $argv[1];
|
||||
$extension = isset($argv[2]) ? $argv[2] : null;
|
||||
$min_version = null;
|
||||
require __DIR__ . '/../phpbb/event/php_exporter.' . $phpEx;
|
||||
require __DIR__ . '/../phpbb/event/md_exporter.' . $phpEx;
|
||||
require __DIR__ . '/../includes/functions.' . $phpEx;
|
||||
require __DIR__ . '/../phpbb/event/recursive_event_filter_iterator.' . $phpEx;
|
||||
require __DIR__ . '/../phpbb/recursive_dot_prefix_filter_iterator.' . $phpEx;
|
||||
|
||||
switch ($action)
|
||||
{
|
||||
|
||||
case 'diff':
|
||||
echo '== Event changes ==' . "\n";
|
||||
$min_version = $extension;
|
||||
$extension = isset($argv[3]) ? $argv[3] : null;
|
||||
|
||||
case 'all':
|
||||
echo '__FORCETOC__' . "\n";
|
||||
if ($action === 'all')
|
||||
{
|
||||
echo '__FORCETOC__' . "\n";
|
||||
}
|
||||
|
||||
|
||||
case 'php':
|
||||
$exporter = new \phpbb\event\php_exporter($phpbb_root_path, $extension);
|
||||
$exporter = new \phpbb\event\php_exporter($phpbb_root_path, $extension, $min_version);
|
||||
$exporter->crawl_phpbb_directory_php();
|
||||
echo $exporter->export_events_for_wiki();
|
||||
echo $exporter->export_events_for_wiki($action);
|
||||
|
||||
if ($action === 'php')
|
||||
{
|
||||
@@ -78,9 +97,16 @@ switch ($action)
|
||||
// no break;
|
||||
|
||||
case 'styles':
|
||||
$exporter = new \phpbb\event\md_exporter($phpbb_root_path, $extension);
|
||||
$exporter->crawl_phpbb_directory_styles('docs/events.md');
|
||||
echo $exporter->export_events_for_wiki();
|
||||
$exporter = new \phpbb\event\md_exporter($phpbb_root_path, $extension, $min_version);
|
||||
if ($min_version && $action === 'diff')
|
||||
{
|
||||
$exporter->crawl_eventsmd('docs/events.md', 'styles');
|
||||
}
|
||||
else
|
||||
{
|
||||
$exporter->crawl_phpbb_directory_styles('docs/events.md');
|
||||
}
|
||||
echo $exporter->export_events_for_wiki($action);
|
||||
|
||||
if ($action === 'styles')
|
||||
{
|
||||
@@ -90,9 +116,16 @@ switch ($action)
|
||||
// no break;
|
||||
|
||||
case 'adm':
|
||||
$exporter = new \phpbb\event\md_exporter($phpbb_root_path, $extension);
|
||||
$exporter->crawl_phpbb_directory_adm('docs/events.md');
|
||||
echo $exporter->export_events_for_wiki();
|
||||
$exporter = new \phpbb\event\md_exporter($phpbb_root_path, $extension, $min_version);
|
||||
if ($min_version && $action === 'diff')
|
||||
{
|
||||
$exporter->crawl_eventsmd('docs/events.md', 'adm');
|
||||
}
|
||||
else
|
||||
{
|
||||
$exporter->crawl_phpbb_directory_adm('docs/events.md');
|
||||
}
|
||||
echo $exporter->export_events_for_wiki($action);
|
||||
|
||||
if ($action === 'all')
|
||||
{
|
||||
|
@@ -62,10 +62,14 @@ echo "USE $dbname;$newline$newline";
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
require($phpbb_root_path . 'includes/db/schema_data.' . $phpEx);
|
||||
require($phpbb_root_path . 'phpbb/db/tools.' . $phpEx);
|
||||
$finder = new \phpbb\finder(new \phpbb\filesystem(), $phpbb_root_path);
|
||||
$classes = $finder->core_path('phpbb/')
|
||||
->directory('/db/migration/data')
|
||||
->get_classes();
|
||||
|
||||
$dbms_type_map = phpbb\db\tools::get_dbms_type_map();
|
||||
$schema_generator = new \phpbb\db\migration\schema_generator($classes, $config, $db, new \phpbb\db\tools($db, true), $phpbb_root_path, $phpEx, $table_prefix);
|
||||
$schema_data = $schema_generator->get_schema();
|
||||
$dbms_type_map = \phpbb\db\tools::get_dbms_type_map();
|
||||
|
||||
foreach ($schema_data as $table_name => $table_data)
|
||||
{
|
||||
|
151
phpBB/develop/regex_idn.php
Normal file
@@ -0,0 +1,151 @@
|
||||
<?php
|
||||
//
|
||||
// Security message:
|
||||
//
|
||||
// This script is potentially dangerous.
|
||||
// Remove or comment the next line (die(".... ) to enable this script.
|
||||
// Do NOT FORGET to either remove this script or disable it after you have used it.
|
||||
//
|
||||
die("Please read the first lines of this script for instructions on how to enable it");
|
||||
|
||||
// IP regular expressions
|
||||
|
||||
$dec_octet = '(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])';
|
||||
$h16 = '[\dA-F]{1,4}';
|
||||
$ipv4 = "(?:$dec_octet\.){3}$dec_octet";
|
||||
$ls32 = "(?:$h16:$h16|$ipv4)";
|
||||
|
||||
$ipv6_construct = array(
|
||||
array(false, '', '{6}', $ls32),
|
||||
array(false, '::', '{0,5}', "(?:$h16(?::$h16)?|$ipv4)"),
|
||||
array('', ':', '{4}', $ls32),
|
||||
array('{1,2}', ':', '{3}', $ls32),
|
||||
array('{1,3}', ':', '{2}', $ls32),
|
||||
array('{1,4}', ':', '', $ls32),
|
||||
array('{1,5}', ':', false, $ls32),
|
||||
array('{1,6}', ':', false, $h16),
|
||||
array('{1,7}', ':', false, ''),
|
||||
array(false, '::', false, '')
|
||||
);
|
||||
|
||||
$ipv6 = '(?:';
|
||||
foreach ($ipv6_construct as $ip_type)
|
||||
{
|
||||
$ipv6 .= '(?:';
|
||||
if ($ip_type[0] !== false)
|
||||
{
|
||||
$ipv6 .= "(?:$h16:)" . $ip_type[0];
|
||||
}
|
||||
$ipv6 .= $ip_type[1];
|
||||
if ($ip_type[2] !== false)
|
||||
{
|
||||
$ipv6 .= "(?:$h16:)" . $ip_type[2];
|
||||
}
|
||||
$ipv6 .= $ip_type[3] . ')|';
|
||||
}
|
||||
$ipv6 = substr($ipv6, 0, -1) . ')';
|
||||
|
||||
echo 'IPv4: ' . $ipv4 . "<br /><br />\n\nIPv6: " . $ipv6 . "<br /><br />\n\n";
|
||||
|
||||
// URL regular expressions
|
||||
|
||||
/* IDN2008 characters derivation
|
||||
** http://unicode.org/faq/idn.html#33 - IDN FAQ: derivation of valid characters in terms of Unicode properties
|
||||
** http://unicode.org/reports/tr46/ - Unicode Technical Standard #46. Unicode IDNA Compatibility Processing
|
||||
** http://www.unicode.org/Public/UNIDATA/DerivedNormalizationProps.txt - Unicode Character Database
|
||||
*/
|
||||
/*
|
||||
** Remove Control Characters and Whitespace (as in IDNA2003)
|
||||
*/
|
||||
$no_cc = '\p{C}\p{Z}';
|
||||
/*
|
||||
** Remove Symbols, Punctuation, non-decimal Numbers, and Enclosing Marks
|
||||
*/
|
||||
$no_symbol = '\p{S}\p{P}\p{Nl}\p{No}\p{Me}';
|
||||
/*
|
||||
** Remove characters used for archaic Hangul (Korean) - \p{HST=L} and \p{HST=V}
|
||||
** as per http://unicode.org/Public/UNIDATA/HangulSyllableType.txt
|
||||
*/
|
||||
$no_hangul = '\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}';
|
||||
/*
|
||||
** Remove three blocks of technical or archaic symbols.
|
||||
*/
|
||||
$no_cdm = '\x{20D0}-\x{20FF}'; // \p{block=Combining_Diacritical_Marks_For_Symbols}
|
||||
$no_musical = '\x{1D100}-\x{1D1FF}'; // \p{block=Musical_Symbols}
|
||||
$no_ancient_greek_musical = '\x{1D200}-\x{1D24F}'; // \p{block=Ancient_Greek_Musical_Notation}
|
||||
/* Remove certain exceptions:
|
||||
** U+0640 ARABIC TATWEEL
|
||||
** U+07FA NKO LAJANYALAN
|
||||
** U+302E HANGUL SINGLE DOT TONE MARK
|
||||
** U+302F HANGUL DOUBLE DOT TONE MARK
|
||||
** U+3031 VERTICAL KANA REPEAT MARK
|
||||
** U+3032 VERTICAL KANA REPEAT WITH VOICED SOUND MARK
|
||||
** ..
|
||||
** U+3035 VERTICAL KANA REPEAT MARK LOWER HALF
|
||||
** U+303B VERTICAL IDEOGRAPHIC ITERATION MARK
|
||||
*/
|
||||
$no_certain_exceptions = '\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}';
|
||||
/* Add certain exceptions:
|
||||
** U+00B7 MIDDLE DOT
|
||||
** U+0375 GREEK LOWER NUMERAL SIGN
|
||||
** U+05F3 HEBREW PUNCTUATION GERESH
|
||||
** U+05F4 HEBREW PUNCTUATION GERSHAYIM
|
||||
** U+30FB KATAKANA MIDDLE DOT
|
||||
** U+002D HYPHEN-MINUS
|
||||
** U+06FD ARABIC SIGN SINDHI AMPERSAND
|
||||
** U+06FE ARABIC SIGN SINDHI POSTPOSITION MEN
|
||||
** U+0F0B TIBETAN MARK INTERSYLLABIC TSHEG
|
||||
** U+3007 IDEOGRAPHIC NUMBER ZERO
|
||||
*/
|
||||
$add_certain_exceptions = '\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}';
|
||||
/* Add special exceptions (Deviations):
|
||||
** U+00DF LATIN SMALL LETTER SHARP S
|
||||
** U+03C2 GREEK SMALL LETTER FINAL SIGMA
|
||||
** U+200C ZERO WIDTH NON-JOINER
|
||||
** U+200D ZERO WIDTH JOINER
|
||||
*/
|
||||
$add_deviations = '\x{00DF}\x{03C2}\x{200C}\x{200D}';
|
||||
|
||||
// Concatenate remove/add regexes respectively
|
||||
$remove_chars = "$no_cc$no_symbol$no_hangul$no_cdm$no_musical$no_ancient_greek_musical$no_certain_exceptions";
|
||||
$add_chars = "$add_certain_exceptions$add_deviations";
|
||||
|
||||
// Initialize inline mode
|
||||
$inline = false;
|
||||
|
||||
do
|
||||
{
|
||||
$inline = !$inline;
|
||||
|
||||
$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://..."
|
||||
$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)
|
||||
//$userinfo = "(?:(?:[$unreserved$sub_delims:]+|$pct_encoded))*";
|
||||
$ipv4_simple = '[0-9.]+';
|
||||
$ipv6_simple = '\[[a-z0-9.]+:[a-z0-9.]+:[a-z0-9.:]+\]';
|
||||
$host = "(?:$reg_name|$ipv4_simple|$ipv6_simple)";
|
||||
$port = '\d*';
|
||||
//$authority = "(?:$userinfo@)?$host(?::$port)?";
|
||||
$authority = "$host(?::$port)?";
|
||||
$segment = "$pchar*";
|
||||
$path_abempty = "(?:/$segment)*";
|
||||
$hier_part = "/{2}$authority$path_abempty";
|
||||
$query = "(?:[^$remove_chars]*[$unreserved$sub_delims:@/?|]+|$pct_encoded)*"; // pchar | "/" | "?", rfc: no "|"
|
||||
$fragment = $query;
|
||||
|
||||
$url = "$scheme:$hier_part(?:\?$query)?(?:\#$fragment)?";
|
||||
echo (($inline) ? 'URL inline: ' : 'URL: ') . $url . "<br /><br />\n\n";
|
||||
|
||||
// no scheme, shortened authority, but host has to start with www.
|
||||
$www_url = "www\.$reg_name(?::$port)?$path_abempty(?:\?$query)?(?:\#$fragment)?";
|
||||
echo (($inline) ? 'www.URL_inline: ' : 'www.URL: ') . $www_url . "<br /><br />\n\n";
|
||||
|
||||
// no schema and no authority
|
||||
$relative_url = "$segment$path_abempty(?:\?$query)?(?:\#$fragment)?";
|
||||
echo (($inline) ? 'relative URL inline: ' : 'relative URL: ') . $relative_url . "<br /><br />\n\n";
|
||||
}
|
||||
while ($inline);
|
@@ -40,7 +40,7 @@ if (!class_exists($search_type))
|
||||
}
|
||||
|
||||
$error = false;
|
||||
$search = new $search_type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user);
|
||||
$search = new $search_type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user, $phpbb_dispatcher);
|
||||
|
||||
if ($error)
|
||||
{
|
||||
|
@@ -23,10 +23,12 @@ phpBB Project Manager: Marshalrusty (Yuriy Rusko)
|
||||
phpBB Lead Developer: naderman (Nils Adermann)
|
||||
|
||||
phpBB Developers: bantu (Andreas Fischer)
|
||||
CHItA (Máté Bartus)
|
||||
dhruv.goel92 (Dhruv Goel)
|
||||
Elsensee (Oliver Schramm)
|
||||
marc1706 (Marc Alexander)
|
||||
nickvergessen (Joas Schilling)
|
||||
nicofuma (Tristan Darricau)
|
||||
Nicofuma (Tristan Darricau)
|
||||
prototech (Cesar Gallegos)
|
||||
|
||||
For a list of phpBB Team members, please see:
|
||||
|
@@ -6,7 +6,7 @@
|
||||
<meta name="description" content="phpBB 3.1.x frequently asked questions" />
|
||||
<title>phpBB • FAQ</title>
|
||||
|
||||
<link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
|
||||
<link href="assets/css/stylesheet.css" rel="stylesheet" type="text/css" media="screen" />
|
||||
|
||||
</head>
|
||||
|
||||
@@ -16,16 +16,16 @@
|
||||
<a id="top" name="top" accesskey="t"></a>
|
||||
<div id="page-header">
|
||||
<div class="headerbar">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div id="doc-description">
|
||||
<a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a>
|
||||
<a href="../index.php" id="logo"><img src="assets/images/site_logo.gif" alt="" /></a>
|
||||
<h1>phpBB 3.1.x FAQ</h1>
|
||||
<p>phpBB 3.1.x frequently asked questions</p>
|
||||
<p style="display: none;"><a href="#start_here">Skip</a></p>
|
||||
</div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -35,12 +35,17 @@
|
||||
|
||||
<!-- BEGIN DOCUMENT -->
|
||||
|
||||
<p>This is a very basic Frequently Asked Questions (FAQ) page which attempts to answer some of the more commonly asked questions. It is by no means exhaustive and should be used in combination with the 'built-in' User FAQ within phpBB, the community forums and our IRC channel (see <a href="README.html">README</a> for details).</p>
|
||||
<p class="paragraph main-description">
|
||||
This is a very basic Frequently Asked Questions (FAQ) page which attempts to answer some of the
|
||||
more commonly asked questions. It is by no means exhaustive and should be used in combination with
|
||||
the 'built-in' User FAQ within phpBB3, the community forums and our IRC channel
|
||||
(see <a href="README.html">README</a> for details).
|
||||
</p>
|
||||
|
||||
<h1>FAQ</h1>
|
||||
|
||||
<div class="paragraph menu">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -66,7 +71,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -74,7 +79,7 @@
|
||||
<a name="install"></a><h2>I am finding phpBB too difficult to install. Will you do it for me?</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -88,7 +93,7 @@
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -99,7 +104,7 @@ A board is dealing in warez/porn/etc., you need to prevent them doing this!<br /
|
||||
I want to sue you because i think you host an illegal board!</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -111,7 +116,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -119,7 +124,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
<a name="viewonline"></a><h2>According to viewonline a user is doing/reading something they should not be able to!</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -131,7 +136,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -139,7 +144,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
<a name="mail"></a><h2>I keep getting Mail sending errors when I (or my users) post/send PM's/etc.!</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -151,7 +156,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -159,7 +164,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
<a name="mail_language"></a><h2>My users are complaining that emails are not in their selected language!</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -171,7 +176,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -179,7 +184,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
<a name="aol_browser"></a><h2>My AOL based users keep getting logged out!</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -193,7 +198,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -201,7 +206,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
<a name="avatars"></a><h2>I am unable to upload avatars from my computer, regardless of the settings.</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -213,7 +218,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -221,7 +226,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
<a name="gallery_avatars"></a><h2>I just cannot get gallery avatars to appear!</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -231,7 +236,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -239,17 +244,17 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
<a name="permissions"></a><h2>How do I use/set permissions?</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
<p>Please read the paragraph about permissions in our extensive <a href="https://www.phpbb.com/support/documentation/3.0/">online documentation</a>.</p>
|
||||
<p>Please read the paragraph about permissions in our extensive <a href="https://www.phpbb.com/support/docs/en/3.1/ug/">online documentation</a>.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -257,7 +262,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
<a name="login_issues"></a><h2>I (or my users) cannot stay logged in to the forum!</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -269,7 +274,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -277,7 +282,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
<a name="logout_issues"></a><h2>My users are complaining about being logged out too quickly!</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -287,7 +292,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -295,11 +300,11 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
<a name="not_answered"></a><h2>My question isn't answered here!</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
<p>Please read our <a href="https://www.phpbb.com/support/documentation/3.0/">extensive user documentation</a> first, it may just explain what you want to know.</p>
|
||||
<p>Please read our <a href="https://www.phpbb.com/support/docs/en/3.1/ug/">extensive user documentation</a> first, it may just explain what you want to know.</p>
|
||||
|
||||
<p>Feel free to search our community forum for the information you require. <strong>PLEASE DO NOT</strong> post your question without having first used search, chances are someone has already asked and answered your question. You can find our board here:</p>
|
||||
|
||||
@@ -309,7 +314,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -317,7 +322,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
<a name="disclaimer"></a><h2>Copyright and disclaimer</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -327,7 +332,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- END DOCUMENT -->
|
||||
@@ -338,7 +343,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
</div></div>
|
||||
|
||||
<div>
|
||||
<a id="bottom" name="bottom" accesskey="z"></a>
|
||||
<a id="bottom" accesskey="z"></a>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
@@ -6,7 +6,7 @@
|
||||
<meta name="description" content="phpBB 3.1.x Installation, updating and conversion informations" />
|
||||
<title>phpBB • Install</title>
|
||||
|
||||
<link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
|
||||
<link href="assets/css/stylesheet.css" rel="stylesheet" type="text/css" media="screen" />
|
||||
|
||||
</head>
|
||||
|
||||
@@ -16,16 +16,16 @@
|
||||
<a id="top" name="top" accesskey="t"></a>
|
||||
<div id="page-header">
|
||||
<div class="headerbar">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div id="doc-description">
|
||||
<a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a>
|
||||
<a href="../index.php" id="logo"><img src="assets/images/site_logo.gif" alt="" /></a>
|
||||
<h1>phpBB 3.1.x Install</h1>
|
||||
<p>phpBB 3.1.x Installation, updating and conversion informations</p>
|
||||
<p style="display: none;"><a href="#start_here">Skip</a></p>
|
||||
</div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -35,16 +35,22 @@
|
||||
|
||||
<!-- BEGIN DOCUMENT -->
|
||||
|
||||
<p><strong>Please read this document completely before proceeding with installation, updating or converting.</strong></p>
|
||||
<div class="paragraph">
|
||||
<p><strong>Please read this document completely before proceeding with installation, updating or converting.</strong></p>
|
||||
|
||||
<p>This document will walk you through the basics on installing, updating and converting the forum software.</p>
|
||||
|
||||
<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/documentation/3.0/">the documentation</a> available online.</p>
|
||||
<p>This document will walk you through the basics on installing, updating and converting the forum software.</p>
|
||||
|
||||
<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>
|
||||
available online.
|
||||
</p>
|
||||
</div>
|
||||
<h1>Install</h1>
|
||||
|
||||
<div class="paragraph menu">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -82,7 +88,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -90,7 +96,7 @@
|
||||
<a name="quickinstall"></a><h2>1. Quick install</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -114,7 +120,7 @@
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -122,7 +128,7 @@
|
||||
<a name="require"></a><h2>2. Requirements</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -165,7 +171,7 @@
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -173,7 +179,7 @@
|
||||
<a name="install"></a><h2>3. New installation</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -245,7 +251,7 @@
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -253,7 +259,7 @@
|
||||
<a name="update"></a><h2>4. Updating from stable releases of phpBB 3.1.x</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -297,7 +303,7 @@
|
||||
|
||||
<p>This update method is the recommended method for updating. 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.0.10</strong>, you need the <code>phpBB-3.0.10_to_3.0.11.zip/tar.bz2</code> file.</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.0.13</strong>, you need the <code>phpBB-3.0.13_to_3.0.14.zip/tar.bz2</code> file.</p>
|
||||
|
||||
<p>To perform the update, either follow the instructions from the <strong>Administration Control Panel->System</strong> Tab - this should point out that you are running an outdated version and will guide you through the update - or follow the instructions listed below.</p>
|
||||
|
||||
@@ -321,7 +327,7 @@
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -363,7 +369,7 @@
|
||||
<a name="convert"></a><h2>6. Conversion from phpBB 2.0.x to phpBB 3.1.x</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -418,7 +424,7 @@
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -426,7 +432,7 @@
|
||||
<a name="postinstall"></a><h2>7. Important (security related) post-Install tasks for all installation methods</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -456,7 +462,7 @@
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -464,7 +470,7 @@
|
||||
<a name="anti_spam"></a><h2>8. Anti-Spam Measures</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
<p>Like any online site that allows user input, your board could be subject to unwanted posts; often referred to as <a href="http://en.wikipedia.org/wiki/Forum_spam">forum spam</a>. The vast majority of these attacks will be from automated computer programs known as <a href="http://en.wikipedia.org/wiki/Spambot">spambots</a>. The attacks, generally, are not personal as the spammers are just trying to find accessible targets. phpBB has a number of anti-spam measures built in, including a range of CAPTCHAs. However, administrators are strongly urged to read and follow the advice for <a href="https://www.phpbb.com/support/spam/">Preventing Spam in phpBB</a> as soon as possible after completing the installation of your board.</p>
|
||||
@@ -472,7 +478,7 @@
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -480,7 +486,7 @@
|
||||
<a name="disclaimer"></a><h2>9. Copyright and disclaimer</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -490,7 +496,7 @@
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- END DOCUMENT -->
|
||||
@@ -501,7 +507,7 @@
|
||||
</div></div>
|
||||
|
||||
<div>
|
||||
<a id="bottom" name="bottom" accesskey="z"></a>
|
||||
<a id="bottom" accesskey="z"></a>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
@@ -6,7 +6,7 @@
|
||||
<meta name="description" content="phpBB 3.1.x Readme" />
|
||||
<title>phpBB • Readme</title>
|
||||
|
||||
<link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
|
||||
<link href="assets/css/stylesheet.css" rel="stylesheet" type="text/css" media="screen" />
|
||||
|
||||
</head>
|
||||
|
||||
@@ -16,15 +16,15 @@
|
||||
<a id="top" name="top" accesskey="t"></a>
|
||||
<div id="page-header">
|
||||
<div class="headerbar">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div id="doc-description">
|
||||
<a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a>
|
||||
<a href="../index.php" id="logo"><img src="assets/images/site_logo.gif" alt="" /></a>
|
||||
<h1>phpBB 3.1.x Readme</h1>
|
||||
<p style="display: none;"><a href="#start_here">Skip</a></p>
|
||||
</div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -34,12 +34,16 @@
|
||||
|
||||
<!-- BEGIN DOCUMENT -->
|
||||
|
||||
<p>Thank you for downloading phpBB. This README will guide you through the basics of installation and operation of phpBB. Please ensure you read this and the accompanying documentation fully <strong>before</strong> proceeding with the installation.</p>
|
||||
<p class="paragraph main-description">
|
||||
Thank you for downloading phpBB. This README will guide you through the basics of installation
|
||||
and operation of phpBB. Please ensure you read this and the accompanying documentation fully
|
||||
<strong>before</strong> proceeding with the installation.
|
||||
</p>
|
||||
|
||||
<h1>Readme</h1>
|
||||
|
||||
<div class="paragraph menu">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -73,7 +77,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -81,7 +85,7 @@
|
||||
<a name="install"></a><h2>1. Installing phpBB</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
<p>Installation, update and conversion instructions can be found in the <a href="INSTALL.html">INSTALL</a> document in this directory. If you are intending on converting from a phpBB 2.0.x or 3.0.x installation we highly recommend that you backup any existing data before proceeding!</p>
|
||||
@@ -110,7 +114,7 @@
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -118,7 +122,7 @@
|
||||
<a name="run"></a><h2>2. Running phpBB</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -134,7 +138,7 @@
|
||||
|
||||
<p>Installation of these packages is straightforward: simply download the required language pack, uncompress (unzip) it and via FTP transfer the included <code>language</code> and <code>styles</code> folders to the root of your board installation. The language can then be installed via the Administration Control Panel of your board: <code>Customise tab -> Language management -> Language packs</code>. A more detailed description of the process is in the Knowledge Base article, <a href="https://www.phpbb.com/kb/article/how-to-install-a-language-pack/">How to Install a Language Pack</a>.</p>
|
||||
|
||||
<p>If your language is not available, please visit our <a href="https://www.phpbb.com/community/viewforum.php?f=66">[3.0.x] Translations</a> forum where you will find topics on translations in progress. Should you wish to volunteer to translate a language not currently available or assist in maintaining an existing language pack, you can <a href="https://www.phpbb.com/languages/apply.php">Apply to become a translator</a>.</p>
|
||||
<p>If your language is not available, please visit our <a href="https://www.phpbb.com/community/viewforum.php?f=491">[3.1.x] Translations</a> forum where you will find topics on translations in progress. Should you wish to volunteer to translate a language not currently available or assist in maintaining an existing language pack, you can <a href="https://www.phpbb.com/languages/apply.php">Apply to become a translator</a>.</p>
|
||||
|
||||
<a name="styles"></a><h3>2.ii. Styles</h3>
|
||||
|
||||
@@ -150,7 +154,7 @@
|
||||
|
||||
<a name="extensions"></a><h3>2.iii. Extensions</h3>
|
||||
|
||||
<p>We are proud to have a thriving extensions community. These third party extensions to the standard phpBB software, extend its capabilities still further. You can browse through many of the extensions in the <a href="https://www.phpbb.com/customise/db/extensions-27/">Extensions</a> section of our <a href="https://www.phpbb.com/customise/db/">Customisation Database</a>.</p>
|
||||
<p>We are proud to have a thriving extensions community. These third party extensions to the standard phpBB software, extend its capabilities still further. You can browse through many of the extensions in the <a href="https://www.phpbb.com/customise/db/extensions-36">Extensions</a> section of our <a href="https://www.phpbb.com/customise/db/">Customisation Database</a>.</p>
|
||||
|
||||
<p>For more information about extensions, please see: <a href="https://www.phpbb.com/extensions">https://www.phpbb.com/extensions</a></p>
|
||||
|
||||
@@ -162,7 +166,7 @@
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -170,7 +174,7 @@
|
||||
<a name="help"></a><h2>3. Getting help with phpBB</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -180,7 +184,7 @@
|
||||
|
||||
<p>Comprehensive documentation is now available on the phpBB website:</p>
|
||||
|
||||
<p><a href="https://www.phpbb.com/support/documentation/3.0/">https://www.phpbb.com/support/documentation/3.0/</a></p>
|
||||
<p><a href="https://www.phpbb.com/support/docs/en/3.1/ug/">https://www.phpbb.com/support/docs/en/3.1/ug/</a></p>
|
||||
|
||||
<p>This covers everything from installation to setting permissions and managing users.</p>
|
||||
|
||||
@@ -208,7 +212,7 @@
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -216,7 +220,7 @@
|
||||
<a name="status"></a><h2>4. Status of this version</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -232,7 +236,7 @@
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -240,7 +244,7 @@
|
||||
<a name="bugs"></a><h2>5. Reporting Bugs</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -283,7 +287,7 @@
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -291,7 +295,7 @@
|
||||
<a name="curbugs"></a><h2>6. Overview of current bug list</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -307,7 +311,7 @@
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -315,7 +319,7 @@
|
||||
<a name="php"></a><h2>7. PHP compatibility issues</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -333,7 +337,7 @@
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -341,7 +345,7 @@
|
||||
<a name="disclaimer"></a><h2>8. Copyright and disclaimer</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -351,7 +355,7 @@
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- END DOCUMENT -->
|
||||
@@ -362,7 +366,7 @@
|
||||
</div></div>
|
||||
|
||||
<div>
|
||||
<a id="bottom" name="bottom" accesskey="z"></a>
|
||||
<a id="bottom" accesskey="z"></a>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
@@ -11,13 +11,21 @@ body {
|
||||
font-family: Verdana, Helvetica, Arial, sans-serif;
|
||||
color: #828282;
|
||||
background-color: #FFFFFF;
|
||||
font-size: 12px;
|
||||
font-size: 10px;
|
||||
margin: 0;
|
||||
padding: 12px 0;
|
||||
}
|
||||
|
||||
img { border-width: 0; }
|
||||
|
||||
ul, ol {
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
ul ul, ol ol {
|
||||
font-size: inherit;
|
||||
}
|
||||
|
||||
p {
|
||||
line-height: 1.3em;
|
||||
font-size: 1.1em;
|
||||
@@ -70,7 +78,7 @@ h3 {
|
||||
border-bottom: 1px solid #CCCCCC;
|
||||
margin-bottom: 3px;
|
||||
padding-bottom: 2px;
|
||||
font-size: 1.05em;
|
||||
font-size: 1.1em;
|
||||
color: #115098;
|
||||
margin-top: 20px;
|
||||
}
|
||||
@@ -80,7 +88,7 @@ h4 {
|
||||
font-weight: bold;
|
||||
margin-bottom: 3px;
|
||||
padding-bottom: 2px;
|
||||
font-size: 1.05em;
|
||||
font-size: 1.1em;
|
||||
color: #115098;
|
||||
margin-top: 20px;
|
||||
}
|
||||
@@ -104,6 +112,7 @@ code {
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
background-color: #FAFAFA;
|
||||
padding: 0 4px;
|
||||
}
|
||||
|
||||
#wrap {
|
||||
@@ -145,44 +154,16 @@ a#logo:hover {
|
||||
|
||||
.headerbar {
|
||||
background: #ebebeb none repeat-x 0 0;
|
||||
border-radius: 7px;
|
||||
color: #FFFFFF;
|
||||
margin-bottom: 4px;
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
span.corners-top, span.corners-bottom, span.corners-top span, span.corners-bottom span {
|
||||
font-size: 1px;
|
||||
line-height: 1px;
|
||||
display: block;
|
||||
height: 5px;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
span.corners-top {
|
||||
background-image: none;
|
||||
background-position: 0 0;
|
||||
margin: 0 -5px;
|
||||
}
|
||||
|
||||
span.corners-top span {
|
||||
background-image: none;
|
||||
background-position: 100% 0;
|
||||
}
|
||||
|
||||
span.corners-bottom {
|
||||
background-image: none;
|
||||
background-position: 0 100%;
|
||||
margin: 0 -5px;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
span.corners-bottom span {
|
||||
background-image: none;
|
||||
background-position: 100% 100%;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.paragraph {
|
||||
padding: 0 10px;
|
||||
border-radius: 7px;
|
||||
font-size: 1.1em;
|
||||
padding: 5px 10px;
|
||||
margin-bottom: 4px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: 100% 0;
|
||||
@@ -197,6 +178,10 @@ span.corners-bottom span {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.main-description {
|
||||
font-size: 1.15em;
|
||||
}
|
||||
|
||||
.content {
|
||||
color: #333333;
|
||||
}
|
||||
@@ -222,7 +207,7 @@ hr {
|
||||
|
||||
.headerbar {
|
||||
background-color: #12A3EB;
|
||||
background-image: url("bg_header.gif");
|
||||
background-image: url("../images/bg_header.gif");
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
@@ -231,23 +216,6 @@ hr {
|
||||
color: #28313F;
|
||||
}
|
||||
|
||||
|
||||
span.corners-top {
|
||||
background-image: url("corners_left.png");
|
||||
}
|
||||
|
||||
span.corners-top span {
|
||||
background-image: url("corners_right.png");
|
||||
}
|
||||
|
||||
span.corners-bottom {
|
||||
background-image: url("corners_left.png");
|
||||
}
|
||||
|
||||
span.corners-bottom span {
|
||||
background-image: url("corners_right.png");
|
||||
}
|
||||
|
||||
.error {
|
||||
color: #BC2A4D;
|
||||
}
|
||||
@@ -257,10 +225,6 @@ a:visited { color: #105289; }
|
||||
a:hover { color: #D31141; }
|
||||
a:active { color: #368AD2; }
|
||||
|
||||
.paragraph span.corners-top, .paragraph span.corners-bottom {
|
||||
margin: 0 -10px;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 0;
|
||||
line-height: 1.48em;
|
||||
@@ -288,13 +252,17 @@ a:active { color: #368AD2; }
|
||||
}
|
||||
|
||||
* html hr { margin: 0; }
|
||||
* html span.corners-top, * html span.corners-bottom { background-image: url("corners_left.gif"); }
|
||||
* html span.corners-top span, * html span.corners-bottom span { background-image: url("corners_right.gif"); }
|
||||
|
||||
.back2top {
|
||||
clear: both;
|
||||
.top {
|
||||
background: url("../images/icon_back_top.gif") no-repeat top left;
|
||||
text-decoration: none;
|
||||
width: 11px;
|
||||
height: 11px;
|
||||
text-align: right;
|
||||
display: block;
|
||||
float: right;
|
||||
overflow: hidden;
|
||||
letter-spacing: 1000px;
|
||||
text-indent: 11px;
|
||||
}
|
||||
|
||||
.content ol, .content ul {
|
||||
@@ -350,3 +318,9 @@ a:active { color: #368AD2; }
|
||||
clear: both;
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
.inner:after {
|
||||
clear: both;
|
||||
content: '';
|
||||
display: block;
|
||||
}
|
Before Width: | Height: | Size: 690 B After Width: | Height: | Size: 690 B |
BIN
phpBB/docs/assets/images/icon_back_top.gif
Normal file
After Width: | Height: | Size: 204 B |
BIN
phpBB/docs/assets/images/site_logo.gif
Normal file
After Width: | Height: | Size: 5.0 KiB |
@@ -6,7 +6,7 @@
|
||||
<meta name="description" content="This is an explanation of how to use the phpBB auth/acl API" />
|
||||
<title>phpBB3 • Auth API</title>
|
||||
|
||||
<link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
|
||||
<link href="assets/css/stylesheet.css" rel="stylesheet" type="text/css" media="screen" />
|
||||
|
||||
</head>
|
||||
|
||||
@@ -16,16 +16,16 @@
|
||||
<a id="top" name="top" accesskey="t"></a>
|
||||
<div id="page-header">
|
||||
<div class="headerbar">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div id="doc-description">
|
||||
<a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a>
|
||||
<a href="../index.php" id="logo"><img src="assets/images/site_logo.gif" alt="" /></a>
|
||||
<h1>Auth API</h1>
|
||||
<p>This is an explanation of how to use the phpBB auth/acl API</p>
|
||||
<p style="display: none;"><a href="#start_here">Skip</a></p>
|
||||
</div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -35,12 +35,12 @@
|
||||
|
||||
<!-- BEGIN DOCUMENT -->
|
||||
|
||||
<p>This is an explanation of how to use the phpBB auth/acl API.</p>
|
||||
<p class="paragraph main-description">This is an explanation of how to use the phpBB auth/acl API.</p>
|
||||
|
||||
<h1>Auth API</h1>
|
||||
|
||||
<div class="paragraph menu">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -73,7 +73,7 @@
|
||||
<a name="intro"></a><h2>1. Introduction</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -86,8 +86,8 @@
|
||||
<p>To use any methods contained with the <code>auth</code> class it first needs to be instantiated. This is best achieved early in the execution of the script in the following manner:</p>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
$auth = new phpbb\auth\auth();
|
||||
</pre></div>
|
||||
$auth = new phpbb\auth\auth();</pre>
|
||||
</div>
|
||||
|
||||
<p>Once an instance of the class has been created you are free to call the various methods it contains. Please note that should you wish to use the <code>auth_admin</code> methods you will need to instantiate this separately but in the same way.</p>
|
||||
|
||||
@@ -95,7 +95,7 @@ $auth = new phpbb\auth\auth();
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -103,19 +103,19 @@ $auth = new phpbb\auth\auth();
|
||||
<a name="methods"></a><h2>2. Methods</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
<p>Following are the methods you are able to use.</p>
|
||||
|
||||
<a name="acl"></a><h3>2.i. acl</h3>
|
||||
|
||||
|
||||
<p>The <code>acl</code> method is the initialisation routine for all the acl functions. If you intend calling any acl method you must first call this. The method takes as its one and only required parameter an associative array containing user information as stored in the database. This array must contain at least the following information; user_id, user_permissions and user_type. It is called in the following way:</p>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
$auth->acl(<code>userdata</code>);
|
||||
</pre></div>
|
||||
$auth->acl(<code>userdata</code>);</pre>
|
||||
</div>
|
||||
|
||||
<p>Where userdata is the array containing the aforementioned data.</p>
|
||||
|
||||
@@ -124,8 +124,8 @@ $auth->acl(<code>userdata</code>);
|
||||
<p>This method is the primary way of determining what a user can and cannot do for a given option globally or in a given forum. The method should be called in the following way:</p>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
$result = $auth->acl_get(<code>option</code>[, <code>forum</code>]);
|
||||
</pre></div>
|
||||
$result = $auth->acl_get(<code>option</code>[, <code>forum</code>]);</pre>
|
||||
</div>
|
||||
|
||||
<p>Where option is a string representing the required option, e.g. 'f_list', 'm_edit', 'a_adduser', etc. By adding a ! in front of the option, e.g. '!f_list' the result of this method will be negated. The optional forum term is the integer forum_id.</p>
|
||||
|
||||
@@ -142,8 +142,8 @@ $result = $auth->acl_get(<code>option</code>[, <code>forum</code>]);
|
||||
<p>The method should be called thus:</p>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
$result = $auth->acl_gets(<code>option1</code>[, <code>option2</code>, ..., <code>optionN</code>, <code>forum</code>]);
|
||||
</pre></div>
|
||||
$result = $auth->acl_gets(<code>option1</code>[, <code>option2</code>, ..., <code>optionN</code>, <code>forum</code>]);</pre>
|
||||
</div>
|
||||
|
||||
<p>As with the <code>acl_get</code> method the options are strings representing the required permissions to check. The forum again is an integer representing a given forum_id.</p>
|
||||
|
||||
@@ -154,16 +154,16 @@ $result = $auth->acl_gets(<code>option1</code>[, <code>option2</code>, ..., <
|
||||
<p>This method is used to find out in which forums a user is allowed to carry out an operation or to find out in which forums he is not allowed to carry out an operation. The method should be called in the following way:</p>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
$result = $auth->acl_getf(<code>option</code>[, <code>clean</code>]);
|
||||
</pre></div>
|
||||
$result = $auth->acl_getf(<code>option</code>[, <code>clean</code>]);</pre>
|
||||
</div>
|
||||
|
||||
<p>Just like in the <code>acl_get</code> method the option is a string specifying the permission which has to be checked (negation using ! is allowed). The second parameter is a boolean. If it is set to false this method returns all forums with either zero or a positive integer. If it is set to true only those forums with a positive integer as the result will be returned.</p>
|
||||
|
||||
<p>The method returns an associative array of the form:</p>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
array(<em>forum_id1</em> => array(<em>option</em> => <em>integer</em>), <em>forum_id2</em> => ...)
|
||||
</pre></div>
|
||||
array(<em>forum_id1</em> => array(<em>option</em> => <em>integer</em>), <em>forum_id2</em> => ...)</pre>
|
||||
</div>
|
||||
|
||||
<p>Where option is the option passed to the method and integer is either zero or a positive integer and the same <code>acl_get(option, forum_id)</code> would return.</p>
|
||||
|
||||
@@ -172,8 +172,8 @@ array(<em>forum_id1</em> => array(<em>option</em> => <em>integer</em>), <e
|
||||
<p>This method is used to find out whether a user has a permission in at least one forum or globally. This method is similar to checking whether <code>acl_getf(option, true)</code> returned one or more forums but it's faster. It should be called in the following way:</p>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
$result = $auth->acl_getf_global(<code>option</code>)
|
||||
</pre></div>
|
||||
$result = $auth->acl_getf_global(<code>option</code>)</pre>
|
||||
</div>
|
||||
|
||||
<p>As with the previous methods option is a string specifying the permission which has to be checked.</p>
|
||||
|
||||
@@ -230,7 +230,7 @@ $result = $auth->acl_get_list($user_id, $permissions, $forum_id);
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -238,7 +238,7 @@ $result = $auth->acl_get_list($user_id, $permissions, $forum_id);
|
||||
<a name="admin_related"></a><h2>3. Admin related functions</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -247,8 +247,8 @@ $result = $auth->acl_get_list($user_id, $permissions, $forum_id);
|
||||
<p>To use any methods this class contains it first needs to be instantiated separately from <code>auth</code>. This is achieved in the same way as <code>auth</code>:</p>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
$auth_admin = new auth_admin();
|
||||
</pre></div>
|
||||
$auth_admin = new auth_admin();</pre>
|
||||
</div>
|
||||
|
||||
<p>This instance gives you access to both the methods of this specific class and that of <code>auth</code>.</p>
|
||||
|
||||
@@ -256,7 +256,7 @@ $auth_admin = new auth_admin();
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -264,7 +264,7 @@ $auth_admin = new auth_admin();
|
||||
<a name="disclaimer"></a><h2>4. Copyright and disclaimer</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -274,7 +274,7 @@ $auth_admin = new auth_admin();
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- END DOCUMENT -->
|
||||
@@ -285,7 +285,7 @@ $auth_admin = new auth_admin();
|
||||
</div></div>
|
||||
|
||||
<div>
|
||||
<a id="bottom" name="bottom" accesskey="z"></a>
|
||||
<a id="bottom" accesskey="z"></a>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
Before Width: | Height: | Size: 55 B |
Before Width: | Height: | Size: 195 B |
Before Width: | Height: | Size: 56 B |
Before Width: | Height: | Size: 201 B |
@@ -22,6 +22,12 @@ acp_email_options_after
|
||||
* Since: 3.1.2-RC1
|
||||
* Purpose: Add settings to mass email form
|
||||
|
||||
acp_forums_custom_settings
|
||||
===
|
||||
* Location: adm/style/acp_forums.html
|
||||
* Since: 3.1.6-RC1
|
||||
* Purpose: Add its own box (fieldset) for extension settings
|
||||
|
||||
acp_forums_main_settings_append
|
||||
===
|
||||
* Location: adm/style/acp_forums.html
|
||||
@@ -133,6 +139,13 @@ acp_posting_buttons_before
|
||||
* Since: 3.1.0-b4
|
||||
* Purpose: Add content before BBCode posting buttons in the ACP
|
||||
|
||||
acp_profile_contact_before
|
||||
===
|
||||
* Locations:
|
||||
+ adm/style/acp_profile.html
|
||||
* Since: 3.1.6-RC1
|
||||
* Purpose: Add extra options to custom profile field configuration in the ACP
|
||||
|
||||
acp_ranks_edit_after
|
||||
===
|
||||
* Locations:
|
||||
@@ -177,6 +190,27 @@ acp_ranks_list_header_before
|
||||
* Purpose: Add content after the last header-column (but before the action column)
|
||||
in the ranks list in the ACP
|
||||
|
||||
acp_users_profile_before
|
||||
===
|
||||
* Locations:
|
||||
+ adm/style/acp_users_profile.html
|
||||
* Since: 3.1.4-RC1
|
||||
* Purpose: Add content before the profile details when editing a user in the ACP
|
||||
|
||||
acp_users_profile_after
|
||||
===
|
||||
* Locations:
|
||||
+ adm/style/acp_users_profile.html
|
||||
* Since: 3.1.4-RC1
|
||||
* Purpose: Add content after the profile details but before the custom profile fields when editing a user in the ACP
|
||||
|
||||
acp_users_profile_custom_after
|
||||
===
|
||||
* Locations:
|
||||
+ adm/style/acp_users_profile.html
|
||||
* Since: 3.1.4-RC1
|
||||
* Purpose: Add content after the the custom profile fields when editing a user in the ACP
|
||||
|
||||
acp_simple_footer_after
|
||||
===
|
||||
* Location: adm/style/simple_footer.html
|
||||
@@ -256,6 +290,38 @@ acp_users_prefs_view_prepend
|
||||
* Since: 3.1.0-b3
|
||||
* Purpose: Add user options fieldset to the top of ACP users view prefs settings
|
||||
|
||||
attachment_file_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/attachment.html
|
||||
+ styles/subsilver2/template/attachment.html
|
||||
* Since: 3.1.6-RC1
|
||||
* Purpose: Add content after the attachment.
|
||||
|
||||
attachment_file_append
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/attachment.html
|
||||
+ styles/subsilver2/template/attachment.html
|
||||
* Since: 3.1.6-RC1
|
||||
* Purpose: Add custom attachment types displaying to the bottom of attachment block.
|
||||
|
||||
attachment_file_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/attachment.html
|
||||
+ styles/subsilver2/template/attachment.html
|
||||
* Since: 3.1.6-RC1
|
||||
* Purpose: Add content before the attachment.
|
||||
|
||||
attachment_file_prepend
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/attachment.html
|
||||
+ styles/subsilver2/template/attachment.html
|
||||
* Since: 3.1.6-RC1
|
||||
* Purpose: Add custom attachment types displaying to the top of attachment block.
|
||||
|
||||
forumlist_body_category_header_after
|
||||
===
|
||||
* Locations:
|
||||
@@ -272,6 +338,20 @@ forumlist_body_category_header_before
|
||||
* Since: 3.1.0-a4
|
||||
* Purpose: Add content before the header of the category on the forum list.
|
||||
|
||||
forumlist_body_category_header_row_append
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/forumlist_body.html
|
||||
* Since: 3.1.5-RC1
|
||||
* Purpose: Add content after the header row of the category on the forum list.
|
||||
|
||||
forumlist_body_category_header_row_prepend
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/forumlist_body.html
|
||||
* Since: 3.1.5-RC1
|
||||
* Purpose: Add content before the header row of the category on the forum list.
|
||||
|
||||
forumlist_body_forum_row_after
|
||||
===
|
||||
* Locations:
|
||||
@@ -456,6 +536,152 @@ mcp_ban_unban_before
|
||||
* Since: 3.1.0-RC3
|
||||
* Purpose: Add additional fields to the unban form in MCP
|
||||
|
||||
mcp_forum_topic_title_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/mcp_forum.html
|
||||
+ styles/subsilver2/template/mcp_forum.html
|
||||
* Since: 3.1.6-RC1
|
||||
* Purpose: Add some information before the topic title
|
||||
|
||||
mcp_forum_topic_title_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/mcp_forum.html
|
||||
+ styles/subsilver2/template/mcp_forum.html
|
||||
* Since: 3.1.6-RC1
|
||||
* Purpose: Add some information after the topic title
|
||||
|
||||
mcp_front_latest_logs_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/mcp_front.html
|
||||
+ styles/subsilver2/template/mcp_front.html
|
||||
* Since: 3.1.3-RC1
|
||||
* Purpose: Add content after latest logs list
|
||||
|
||||
mcp_front_latest_logs_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/mcp_front.html
|
||||
+ styles/subsilver2/template/mcp_front.html
|
||||
* Since: 3.1.3-RC1
|
||||
* Purpose: Add content before latest logs list
|
||||
|
||||
mcp_front_latest_reported_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/mcp_front.html
|
||||
+ styles/subsilver2/template/mcp_front.html
|
||||
* Since: 3.1.3-RC1
|
||||
* Purpose: Add content before latest reported posts list
|
||||
|
||||
mcp_front_latest_reported_pms_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/mcp_front.html
|
||||
+ styles/subsilver2/template/mcp_front.html
|
||||
* Since: 3.1.3-RC1
|
||||
* Purpose: Add content before latest reported private messages list
|
||||
|
||||
mcp_front_latest_unapproved_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/mcp_front.html
|
||||
+ styles/subsilver2/template/mcp_front.html
|
||||
* Since: 3.1.3-RC1
|
||||
* Purpose: Add content before latest unapproved posts list
|
||||
|
||||
mcp_post_additional_options
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/mcp_post.html
|
||||
+ styles/subsilver2/template/mcp_post.html
|
||||
* Since: 3.1.5-RC1
|
||||
* Purpose: Add content within the list of post moderation actions
|
||||
|
||||
mcp_topic_options_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/mcp_topic.html
|
||||
+ styles/subsilver2/template/mcp_topic.html
|
||||
* Since: 3.1.6-RC1
|
||||
* Purpose: Add some options (field, checkbox, ...) after the subject field when split a subject
|
||||
|
||||
mcp_topic_options_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/mcp_topic.html
|
||||
+ styles/subsilver2/template/mcp_topic.html
|
||||
* Since: 3.1.6-RC1
|
||||
* Purpose: Add some options (field, checkbox, ...) before the subject field when split a subject
|
||||
|
||||
mcp_topic_topic_title_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/mcp_topic.html
|
||||
+ styles/subsilver2/template/mcp_topic.html
|
||||
* Since: 3.1.6-RC1
|
||||
* Purpose: Add some information after the topic title
|
||||
|
||||
mcp_topic_topic_title_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/mcp_topic.html
|
||||
+ styles/subsilver2/template/mcp_topic.html
|
||||
* Since: 3.1.6-RC1
|
||||
* Purpose: Add some information before the topic title
|
||||
|
||||
mcp_warn_post_add_warning_field_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/mcp_warn_post.html
|
||||
+ styles/subsilver2/template/mcp_warn_post.html
|
||||
* Since: 3.1.0-RC4
|
||||
* Purpose: Add content during warning for a post - after add warning field.
|
||||
|
||||
mcp_warn_post_add_warning_field_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/mcp_warn_post.html
|
||||
+ styles/subsilver2/template/mcp_warn_post.html
|
||||
* Since: 3.1.0-RC4
|
||||
* Purpose: Add content during warning for a post - before add warning field.
|
||||
|
||||
mcp_warn_user_add_warning_field_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/mcp_warn_user.html
|
||||
+ styles/subsilver2/template/mcp_warn_user.html
|
||||
* Since: 3.1.0-RC4
|
||||
* Purpose: Add content during warning a user - after add warning field.
|
||||
|
||||
mcp_warn_user_add_warning_field_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/mcp_warn_user.html
|
||||
+ styles/subsilver2/template/mcp_warn_user.html
|
||||
* Since: 3.1.0-RC4
|
||||
* Purpose: Add content during warning a user - before add warning field.
|
||||
|
||||
memberlist_body_rank_append
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/memberlist_body.html
|
||||
+ styles/subsilver2/template/memberlist_body.html
|
||||
* Since: 3.1.6-RC1
|
||||
* Purpose: Add information after rank in memberlist. Works in
|
||||
all display modes (leader, group and normal memberlist).
|
||||
|
||||
memberlist_body_rank_prepend
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/memberlist_body.html
|
||||
+ styles/subsilver2/template/memberlist_body.html
|
||||
* Since: 3.1.6-RC1
|
||||
* Purpose: Add information before rank in memberlist. Works in
|
||||
all display modes (leader, group and normal memberlist).
|
||||
|
||||
memberlist_body_username_append
|
||||
===
|
||||
* Locations:
|
||||
@@ -530,6 +756,48 @@ memberlist_view_content_prepend
|
||||
* Since: 3.1.0-b3
|
||||
* Purpose: Add custom content to the user profile view before the main content
|
||||
|
||||
memberlist_view_rank_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/subsilver2/template/memberlist_view.html
|
||||
* Since: 3.1.6-RC1
|
||||
* Purpose: Add information after rank in memberlist
|
||||
|
||||
memberlist_view_rank_avatar_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/memberlist_view.html
|
||||
* Since: 3.1.6-RC1
|
||||
* Purpose: Add information after rank in memberlist (with avatar)
|
||||
|
||||
memberlist_view_rank_avatar_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/memberlist_view.html
|
||||
* Since: 3.1.6-RC1
|
||||
* Purpose: Add information before rank in memberlist (with avatar)
|
||||
|
||||
memberlist_view_rank_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/subsilver2/template/memberlist_view.html
|
||||
* Since: 3.1.6-RC1
|
||||
* Purpose: Add information after rank in memberlist
|
||||
|
||||
memberlist_view_rank_no_avatar_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/memberlist_view.html
|
||||
* Since: 3.1.6-RC1
|
||||
* Purpose: Add information after rank in memberlist (without avatar)
|
||||
|
||||
memberlist_view_rank_no_avatar_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/memberlist_view.html
|
||||
* Since: 3.1.6-RC1
|
||||
* Purpose: Add information before rank in memberlist (without avatar)
|
||||
|
||||
memberlist_view_user_statistics_after
|
||||
===
|
||||
* Locations:
|
||||
@@ -546,38 +814,6 @@ memberlist_view_user_statistics_before
|
||||
* Since: 3.1.0-a1
|
||||
* Purpose: Add entries before the user statistics part of any user profile
|
||||
|
||||
mcp_warn_post_add_warning_field_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/mcp_warn_post.html
|
||||
+ styles/subsilver2/template/mcp_warn_post.html
|
||||
* Since: 3.1.0-RC4
|
||||
* Purpose: Add content during warning for a post - after add warning field.
|
||||
|
||||
mcp_warn_post_add_warning_field_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/mcp_warn_post.html
|
||||
+ styles/subsilver2/template/mcp_warn_post.html
|
||||
* Since: 3.1.0-RC4
|
||||
* Purpose: Add content during warning for a post - before add warning field.
|
||||
|
||||
mcp_warn_user_add_warning_field_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/mcp_warn_user.html
|
||||
+ styles/subsilver2/template/mcp_warn_user.html
|
||||
* Since: 3.1.0-RC4
|
||||
* Purpose: Add content during warning a user - after add warning field.
|
||||
|
||||
mcp_warn_user_add_warning_field_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/mcp_warn_user.html
|
||||
+ styles/subsilver2/template/mcp_warn_user.html
|
||||
* Since: 3.1.0-RC4
|
||||
* Purpose: Add content during warning a user - before add warning field.
|
||||
|
||||
navbar_header_logged_out_content
|
||||
===
|
||||
* Locations:
|
||||
@@ -635,6 +871,14 @@ overall_footer_after
|
||||
* Since: 3.1.0-a1
|
||||
* Purpose: Add content at the end of the file, directly prior to the `</body>` tag
|
||||
|
||||
overall_footer_body_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/overall_footer.html
|
||||
+ styles/subsilver2/template/overall_footer.html
|
||||
* Since: 3.1.3-RC1
|
||||
* Purpose: Add content before the `</body>` tag but after the $SCRIPTS var, i.e. after the js scripts have been loaded
|
||||
|
||||
overall_footer_breadcrumb_append
|
||||
===
|
||||
* Locations:
|
||||
@@ -763,6 +1007,14 @@ overall_header_content_before
|
||||
* Since: 3.1.0-a3
|
||||
* Purpose: Add content on all pages before the main content, after the header
|
||||
|
||||
overall_header_feeds
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/overall_header.html
|
||||
+ styles/subsilver2/template/overall_header.html
|
||||
* Since: 3.1.6-RC1
|
||||
* Purpose: Add custom feeds
|
||||
|
||||
overall_header_head_append
|
||||
===
|
||||
* Locations:
|
||||
@@ -771,6 +1023,14 @@ overall_header_head_append
|
||||
* Since: 3.1.0-a1
|
||||
* Purpose: Add asset calls directly before the `</head>` tag
|
||||
|
||||
overall_header_navbar_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/overall_header.html
|
||||
+ styles/subsilver2/template/overall_header.html
|
||||
* Since: 3.1.4-RC1
|
||||
* Purpose: Add content before the navigation bar
|
||||
|
||||
overall_header_navigation_append
|
||||
===
|
||||
* Locations:
|
||||
@@ -811,6 +1071,13 @@ overall_header_page_body_before
|
||||
* Since: 3.1.0-b3
|
||||
* Purpose: Add content after the page-header, but before the page-body
|
||||
|
||||
overall_header_searchbox_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/overall_header.html
|
||||
* Since: 3.1.4-RC1
|
||||
* Purpose: Add content before the search box in the header
|
||||
|
||||
overall_header_stylesheets_after
|
||||
===
|
||||
* Locations:
|
||||
@@ -820,6 +1087,21 @@ overall_header_stylesheets_after
|
||||
* Purpose: Add asset calls after stylesheets within the `</head>` tag.
|
||||
Note that INCLUDECSS will not work with this event.
|
||||
|
||||
posting_editor_add_panel_tab
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/posting_editor.html
|
||||
* Since: 3.1.6-RC1
|
||||
* Purpose: Add custom panel to post editor
|
||||
|
||||
posting_editor_bbcode_status_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/posting_editor.html
|
||||
+ styles/subsilver2/template/posting_body.html
|
||||
* Since: 3.1.4-RC1
|
||||
* Purpose: Add content after bbcode status
|
||||
|
||||
posting_editor_buttons_after
|
||||
===
|
||||
* Locations:
|
||||
@@ -868,6 +1150,22 @@ posting_editor_options_prepend
|
||||
* Since: 3.1.0-a1
|
||||
* Purpose: Add posting options on the posting screen
|
||||
|
||||
posting_editor_smilies_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/posting_editor.html
|
||||
+ styles/subsilver2/template/posting_body.html
|
||||
* Since: 3.1.4-RC1
|
||||
* Purpose: Add content after smilies
|
||||
|
||||
posting_editor_smilies_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/posting_editor.html
|
||||
+ styles/subsilver2/template/posting_body.html
|
||||
* Since: 3.1.4-RC1
|
||||
* Purpose: Add content before the smilies
|
||||
|
||||
posting_editor_subject_after
|
||||
===
|
||||
* Locations:
|
||||
@@ -884,6 +1182,21 @@ posting_editor_subject_before
|
||||
* Since: 3.1.0-a2
|
||||
* Purpose: Add field (e.g. textbox) to the posting screen before the subject
|
||||
|
||||
posting_editor_submit_buttons
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/posting_editor.html
|
||||
+ styles/subsilver2/template/posting_body.html
|
||||
* Since: 3.1.6-RC1
|
||||
* Purpose: Add custom buttons in the posting editor
|
||||
|
||||
posting_layout_include_panel_body
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/posting_layout.html
|
||||
* Since: 3.1.6-RC1
|
||||
* Purpose: Add include of custom panel template body in posting editor
|
||||
|
||||
posting_pm_header_find_username_after
|
||||
===
|
||||
* Locations:
|
||||
@@ -900,6 +1213,36 @@ posting_pm_header_find_username_before
|
||||
* Since: 3.1.0-RC4
|
||||
* Purpose: Add content before the find username link on composing pm
|
||||
|
||||
posting_pm_layout_include_pm_header_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/posting_pm_layout.html
|
||||
* Since: 3.1.4-RC1
|
||||
* Purpose: Add content after the include of posting_pm_header.html
|
||||
|
||||
posting_pm_layout_include_pm_header_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/posting_pm_layout.html
|
||||
* Since: 3.1.4-RC1
|
||||
* Purpose: Add content before the include of posting_pm_header.html
|
||||
|
||||
posting_poll_body_options_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/posting_poll_body.html
|
||||
+ styles/subsilver2/template/posting_poll_body.html
|
||||
* Since: 3.1.4-RC1
|
||||
* Purpose: Add content after the poll options on creating a poll
|
||||
|
||||
posting_topic_title_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/posting_layout.html
|
||||
+ styles/subsilver2/template/posting_body.html
|
||||
* Since: 3.1.6-RC1
|
||||
* Purpose: Allows to add some information on the left of the topic title in the posting form
|
||||
|
||||
quickreply_editor_panel_after
|
||||
===
|
||||
* Locations:
|
||||
@@ -932,6 +1275,30 @@ quickreply_editor_message_before
|
||||
* Since: 3.1.0-a4
|
||||
* Purpose: Add content before the quick reply textbox
|
||||
|
||||
search_body_form_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/search_body.html
|
||||
+ styles/subsilver2/template/search_body.html
|
||||
* Since: 3.1.5-RC1
|
||||
* Purpose: Add content before the search form
|
||||
|
||||
search_results_header_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/search_results.html
|
||||
+ styles/subsilver2/template/search_results.html
|
||||
* Since: 3.1.4-RC1
|
||||
* Purpose: Add content after the header of the search results
|
||||
|
||||
search_results_header_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/search_results.html
|
||||
+ styles/subsilver2/template/search_results.html
|
||||
* Since: 3.1.4-RC1
|
||||
* Purpose: Add content before the header of the search results.
|
||||
|
||||
search_results_post_after
|
||||
===
|
||||
* Locations:
|
||||
@@ -962,6 +1329,14 @@ search_results_postprofile_before
|
||||
* Since: 3.1.0-b3
|
||||
* Purpose: Add content directly before the post author in search results (posts view mode)
|
||||
|
||||
search_results_searchbox_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/search_results.html
|
||||
+ styles/subsilver2/template/search_results.html
|
||||
* Since: 3.1.4-RC1
|
||||
* Purpose: Add content right after the searchbox of the search results.
|
||||
|
||||
search_results_topic_after
|
||||
===
|
||||
* Locations:
|
||||
@@ -1016,9 +1391,12 @@ topiclist_row_prepend
|
||||
* Locations:
|
||||
+ styles/prosilver/template/search_results.html
|
||||
+ styles/prosilver/template/viewforum_body.html
|
||||
+ styles/prosilver/template/mcp_forum.html
|
||||
+ styles/subsilver2/template/search_results.html
|
||||
+ styles/subsilver2/template/viewforum_body.html
|
||||
+ styles/subsilver2/template/mcp_forum.html
|
||||
* Since: 3.1.0-a1
|
||||
* Changed: 3.1.6-RC1 Added event to mcp_forum.html
|
||||
* Purpose: Add content into topic rows (inside the elements containing topic titles)
|
||||
|
||||
topiclist_row_append
|
||||
@@ -1026,9 +1404,12 @@ topiclist_row_append
|
||||
* Locations:
|
||||
+ styles/prosilver/template/search_results.html
|
||||
+ styles/prosilver/template/viewforum_body.html
|
||||
+ styles/prosilver/template/mcp_forum.html
|
||||
+ styles/subsilver2/template/search_results.html
|
||||
+ styles/subsilver2/template/viewforum_body.html
|
||||
+ styles/subsilver2/template/mcp_forum.html
|
||||
* Since: 3.1.0-a1
|
||||
* Changed: 3.1.6-RC1 Added event to mcp_forum.html
|
||||
* Purpose: Add content into topic rows (inside the elements containing topic titles)
|
||||
|
||||
ucp_agreement_terms_after
|
||||
@@ -1047,6 +1428,72 @@ ucp_agreement_terms_before
|
||||
* Since: 3.1.0-b3
|
||||
* Purpose: Add content before the terms of agreement text at user registration
|
||||
|
||||
ucp_main_front_user_activity_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/ucp_main_front.html
|
||||
+ styles/subsilver2/template/ucp_main_front.html
|
||||
* Since: 3.1.6-RC1
|
||||
* Purpose: Add content right after the user activity info viewing UCP front page
|
||||
|
||||
ucp_main_front_user_activity_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/ucp_main_front.html
|
||||
+ styles/subsilver2/template/ucp_main_front.html
|
||||
* Since: 3.1.6-RC1
|
||||
* Purpose: Add content right before the user activity info viewing UCP front page
|
||||
|
||||
ucp_pm_history_post_buttons_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/ucp_pm_history.html
|
||||
+ styles/subsilver2/template/ucp_pm_history.html
|
||||
* Since: 3.1.6-RC1
|
||||
* Purpose: Add post button to private messages in history review (next to quote etc), at
|
||||
the end of the list.
|
||||
|
||||
ucp_pm_history_post_buttons_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/ucp_pm_history.html
|
||||
+ styles/subsilver2/template/ucp_pm_history.html
|
||||
* Since: 3.1.6-RC1
|
||||
* Purpose: Add post button to private messages in history review (next to quote etc), at
|
||||
the start of the list.
|
||||
|
||||
ucp_pm_history_post_buttons_list_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/ucp_pm_history.html
|
||||
* Since: 3.1.6-RC1
|
||||
* Purpose: Add post button custom list to private messages in history review (next to quote etc),
|
||||
after the original list.
|
||||
|
||||
ucp_pm_history_post_buttons_list_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/ucp_pm_history.html
|
||||
* Since: 3.1.6-RC1
|
||||
* Purpose: Add post button custom list to private messages in history review (next to quote etc),
|
||||
before the original list.
|
||||
|
||||
ucp_pm_history_review_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/ucp_pm_history.html
|
||||
+ styles/subsilver2/template/ucp_pm_history.html
|
||||
* Since: 3.1.6-RC1
|
||||
* Purpose: Add content after the private messages history review.
|
||||
|
||||
ucp_pm_history_review_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/ucp_pm_history.html
|
||||
+ styles/subsilver2/template/ucp_pm_history.html
|
||||
* Since: 3.1.6-RC1
|
||||
* Purpose: Add content before the private messages history review.
|
||||
|
||||
ucp_pm_viewmessage_avatar_after
|
||||
===
|
||||
* Locations:
|
||||
@@ -1111,6 +1558,22 @@ ucp_pm_viewmessage_post_buttons_before
|
||||
* Purpose: Add post button to private messages (next to edit, quote etc), at
|
||||
the start of the list.
|
||||
|
||||
ucp_pm_viewmessage_post_buttons_list_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/ucp_pm_viewmessage.html
|
||||
* Since: 3.1.6-RC1
|
||||
* Purpose: Add post button custom list to private messages (next to edit, quote etc),
|
||||
after the original list.
|
||||
|
||||
ucp_pm_viewmessage_post_buttons_list_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/ucp_pm_viewmessage.html
|
||||
* Since: 3.1.6-RC1
|
||||
* Purpose: Add post button custom list to private messages (next to edit, quote etc),
|
||||
before the original list.
|
||||
|
||||
ucp_pm_viewmessage_print_head_append
|
||||
===
|
||||
* Locations:
|
||||
@@ -1119,6 +1582,22 @@ ucp_pm_viewmessage_print_head_append
|
||||
* Since: 3.1.0-a1
|
||||
* Purpose: Add asset calls directly before the `</head>` tag of the Print PM screen
|
||||
|
||||
ucp_pm_viewmessage_rank_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/ucp_pm_viewmessage.html
|
||||
* Since: 3.1.6-RC1
|
||||
* Purpose: Add data after the rank on the user profile when viewing
|
||||
a private message
|
||||
|
||||
ucp_pm_viewmessage_rank_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/ucp_pm_viewmessage.html
|
||||
* Since: 3.1.6-RC1
|
||||
* Purpose: Add data before the rank on the user profile when viewing
|
||||
a private message
|
||||
|
||||
ucp_prefs_personal_prepend
|
||||
===
|
||||
* Locations:
|
||||
@@ -1187,6 +1666,38 @@ ucp_prefs_view_select_menu_append
|
||||
* Purpose: Add options to the bottom of the drop-down lists block of the Edit
|
||||
Display Options screen
|
||||
|
||||
ucp_profile_profile_info_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/ucp_profile_profile_info.html
|
||||
+ styles/subsilver2/template/ucp_profile_profile_info.html
|
||||
* Since: 3.1.4-RC1
|
||||
* Purpose: Add options in profile page fieldset - before jabber field.
|
||||
|
||||
ucp_profile_profile_info_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/ucp_profile_profile_info.html
|
||||
+ styles/subsilver2/template/ucp_profile_profile_info.html
|
||||
* Since: 3.1.4-RC1
|
||||
* Purpose: Add options in profile page fieldset - after custom profile fields.
|
||||
|
||||
ucp_profile_register_details_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/ucp_profile_reg_details.html
|
||||
+ styles/subsilver2/template/ucp_profile_reg_details.html
|
||||
* Since: 3.1.4-RC1
|
||||
* Purpose: Add options in profile page fieldset - before first field.
|
||||
|
||||
ucp_profile_register_details_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/ucp_profile_reg_details.html
|
||||
+ styles/subsilver2/template/ucp_profile_reg_details.html
|
||||
* Since: 3.1.4-RC1
|
||||
* Purpose: Add options in profile page fieldset - after confirm password field.
|
||||
|
||||
ucp_register_credentials_before
|
||||
===
|
||||
* Locations:
|
||||
@@ -1307,6 +1818,20 @@ viewtopic_buttons_top_after
|
||||
* Since: 3.1.0-RC5
|
||||
* Purpose: Add buttons after Post Reply button on the top of the posts's list
|
||||
|
||||
viewtopic_dropdown_bottom_custom
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/viewtopic_body.html
|
||||
* Since: 3.1.6-RC1
|
||||
* Purpose: Create a custom dropdown menu
|
||||
|
||||
viewtopic_dropdown_top_custom
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/viewtopic_body.html
|
||||
* Since: 3.1.6-RC1
|
||||
* Purpose: Create a custom dropdown menu
|
||||
|
||||
viewforum_forum_name_append
|
||||
===
|
||||
* Locations:
|
||||
@@ -1323,6 +1848,22 @@ viewforum_forum_name_prepend
|
||||
* Since: 3.1.0-b3
|
||||
* Purpose: Add content directly before the forum name link on the View forum screen
|
||||
|
||||
viewforum_forum_title_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/viewforum_body.html
|
||||
+ styles/subsilver2/template/viewforum_body.html
|
||||
* Since: 3.1.5-RC1
|
||||
* Purpose: Add content directly after the forum title on the View forum screen
|
||||
|
||||
viewforum_forum_title_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/viewforum_body.html
|
||||
+ styles/subsilver2/template/viewforum_body.html
|
||||
* Since: 3.1.5-RC1
|
||||
* Purpose: Add content directly before the forum title on the View forum screen
|
||||
|
||||
viewtopic_print_head_append
|
||||
===
|
||||
* Locations:
|
||||
@@ -1331,6 +1872,14 @@ viewtopic_print_head_append
|
||||
* Since: 3.1.0-a1
|
||||
* Purpose: Add asset calls directly before the `</head>` tag of the Print Topic screen
|
||||
|
||||
viewtopic_body_pagination_top_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/viewtopic_body.html
|
||||
+ styles/subsilver2/template/viewtopic_body.html
|
||||
* Since: 3.1.4-RC1
|
||||
* Purpose: Add content after the pagination at top
|
||||
|
||||
viewtopic_body_avatar_after
|
||||
===
|
||||
* Locations:
|
||||
@@ -1373,6 +1922,22 @@ viewtopic_body_footer_before
|
||||
and quick reply, directly before the jumpbox in Prosilver, breadcrumbs in
|
||||
Subsilver2.
|
||||
|
||||
viewtopic_body_poll_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/viewtopic_body.html
|
||||
+ styles/subsilver2/template/viewtopic_body.html
|
||||
* Since: 3.1.6-RC1
|
||||
* Purpose: Add content after the poll panel.
|
||||
|
||||
viewtopic_body_poll_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/viewtopic_body.html
|
||||
+ styles/subsilver2/template/viewtopic_body.html
|
||||
* Since: 3.1.6-RC1
|
||||
* Purpose: Add content before the poll panel.
|
||||
|
||||
viewtopic_body_poll_option_after
|
||||
===
|
||||
* Locations:
|
||||
@@ -1407,6 +1972,22 @@ viewtopic_body_poll_question_prepend
|
||||
* Since: 3.1.0-b3
|
||||
* Purpose: Add content directly before the poll question on the View topic screen
|
||||
|
||||
viewtopic_body_post_author_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/viewtopic_body.html
|
||||
+ styles/subsilver2/template/viewtopic_body.html
|
||||
* Since: 3.1.3-RC1
|
||||
* Purpose: Add content directly after the post author on the view topic screen
|
||||
|
||||
viewtopic_body_post_author_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/viewtopic_body.html
|
||||
+ styles/subsilver2/template/viewtopic_body.html
|
||||
* Since: 3.1.3-RC1
|
||||
* Purpose: Add content directly before the post author on the view topic screen
|
||||
|
||||
viewtopic_body_post_buttons_after
|
||||
===
|
||||
* Locations:
|
||||
@@ -1425,6 +2006,22 @@ viewtopic_body_post_buttons_before
|
||||
* Purpose: Add post button to posts (next to edit, quote etc), at the start of
|
||||
the list.
|
||||
|
||||
viewtopic_body_post_buttons_list_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/viewtopic_body.html
|
||||
* Since: 3.1.5-RC1
|
||||
* Purpose: Add post button custom list to posts (next to edit, quote etc),
|
||||
after the original list.
|
||||
|
||||
viewtopic_body_post_buttons_list_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/viewtopic_body.html
|
||||
* Since: 3.1.5-RC1
|
||||
* Purpose: Add post button custom list to posts (next to edit, quote etc),
|
||||
before the original list.
|
||||
|
||||
viewtopic_body_postrow_custom_fields_after
|
||||
===
|
||||
* Locations:
|
||||
@@ -1467,6 +2064,22 @@ viewtopic_body_postrow_post_content_footer
|
||||
* Since: 3.1.0-RC4
|
||||
* Purpose: Add data at the end of the posts.
|
||||
|
||||
viewtopic_body_postrow_post_details_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/viewtopic_body.html
|
||||
+ styles/subsilver2/template/viewtopic_body.html
|
||||
* Since: 3.1.4-RC1
|
||||
* Purpose: Add content after the post details
|
||||
|
||||
viewtopic_body_postrow_post_details_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/viewtopic_body.html
|
||||
+ styles/subsilver2/template/viewtopic_body.html
|
||||
* Since: 3.1.4-RC1
|
||||
* Purpose: Add content before the post details
|
||||
|
||||
viewtopic_body_postrow_post_notices_after
|
||||
===
|
||||
* Locations:
|
||||
@@ -1483,6 +2096,24 @@ viewtopic_body_postrow_post_notices_before
|
||||
* Since: 3.1.0-b2
|
||||
* Purpose: Add posts specific custom notices at the notices top.
|
||||
|
||||
viewtopic_body_postrow_rank_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/viewtopic_body.html
|
||||
+ styles/subsilver2/template/viewtopic_body.html
|
||||
* Since: 3.1.6-RC1
|
||||
* Purpose: Add data after the rank on the user profile when viewing
|
||||
a post
|
||||
|
||||
viewtopic_body_postrow_rank_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/viewtopic_body.html
|
||||
+ styles/subsilver2/template/viewtopic_body.html
|
||||
* Since: 3.1.6-RC1
|
||||
* Purpose: Add data before the rank on the user profile when viewing
|
||||
a post
|
||||
|
||||
viewtopic_body_topic_actions_before
|
||||
===
|
||||
* Locations:
|
||||
|
Before Width: | Height: | Size: 3.3 KiB |
@@ -250,6 +250,30 @@ else
|
||||
$display_cat = ATTACHMENT_CATEGORY_NONE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Event to modify data before sending file to browser
|
||||
*
|
||||
* @event core.download_file_send_to_browser_before
|
||||
* @var int attach_id The attachment ID
|
||||
* @var array attachment Array with attachment data
|
||||
* @var int display_cat Attachment category
|
||||
* @var int download_mode File extension specific download mode
|
||||
* @var array extension Array with file extensions data
|
||||
* @var string mode Download mode
|
||||
* @var bool thumbnail Flag indicating if the file is a thumbnail
|
||||
* @since 3.1.6-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'attach_id',
|
||||
'attachment',
|
||||
'display_cat',
|
||||
'download_mode',
|
||||
'extension',
|
||||
'mode',
|
||||
'thumbnail',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.download_file_send_to_browser_before', compact($vars)));
|
||||
|
||||
if ($thumbnail)
|
||||
{
|
||||
$attachment['physical_filename'] = 'thumb_' . $attachment['physical_filename'];
|
||||
|
@@ -35,8 +35,30 @@ switch ($mode)
|
||||
break;
|
||||
|
||||
default:
|
||||
$l_title = $user->lang['FAQ_EXPLAIN'];
|
||||
$user->add_lang('faq', false, true);
|
||||
$page_title = $user->lang['FAQ_EXPLAIN'];
|
||||
$ext_name = $lang_file = '';
|
||||
|
||||
/**
|
||||
* You can use this event display a custom help page
|
||||
*
|
||||
* @event core.faq_mode_validation
|
||||
* @var string page_title Title of the page
|
||||
* @var string mode FAQ that is going to be displayed
|
||||
* @var string lang_file Language file containing the help data
|
||||
* @var string ext_name Vendor and extension name where the help
|
||||
* language file can be loaded from
|
||||
* @since 3.1.4-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'page_title',
|
||||
'mode',
|
||||
'lang_file',
|
||||
'ext_name',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.faq_mode_validation', compact($vars)));
|
||||
|
||||
$l_title = $page_title;
|
||||
$user->add_lang(($lang_file) ? $lang_file : 'faq', false, true, $ext_name);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@@ -153,7 +153,7 @@ 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' => 'string', 'type' => 'text:20:200', 'explain' => true, 'append' => ' <span>[ <a href="' . $this->u_action . '&action=imgmagick">' . $user->lang['SEARCH_IMAGICK'] . '</a> ]</span>'),
|
||||
'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']),
|
||||
)
|
||||
|
@@ -409,7 +409,9 @@ class acp_bbcodes
|
||||
{
|
||||
$bbcode_match = trim($bbcode_match);
|
||||
$bbcode_tpl = trim($bbcode_tpl);
|
||||
$utf8 = strpos($bbcode_match, 'INTTEXT') !== false;
|
||||
|
||||
// Allow unicode characters for URL|LOCAL_URL|RELATIVE_URL|INTTEXT tokens
|
||||
$utf8 = preg_match('/(URL|LOCAL_URL|RELATIVE_URL|INTTEXT)/', $bbcode_match);
|
||||
|
||||
$utf8_pcre_properties = phpbb_pcre_utf8_support();
|
||||
|
||||
|
@@ -500,7 +500,7 @@ class acp_board
|
||||
}
|
||||
|
||||
// We go through the display_vars to make sure no one is trying to set variables he/she is not allowed to...
|
||||
foreach ($display_vars['vars'] as $config_name => $null)
|
||||
foreach ($display_vars['vars'] as $config_name => $data)
|
||||
{
|
||||
if (!isset($cfg_array[$config_name]) || strpos($config_name, 'legend') !== false)
|
||||
{
|
||||
@@ -514,7 +514,8 @@ class acp_board
|
||||
|
||||
if ($config_name == 'guest_style')
|
||||
{
|
||||
if (isset($cfg_array[$config_name])) {
|
||||
if (isset($cfg_array[$config_name]))
|
||||
{
|
||||
$this->guest_style_set($cfg_array[$config_name]);
|
||||
}
|
||||
continue;
|
||||
@@ -531,6 +532,13 @@ class acp_board
|
||||
|
||||
if ($submit)
|
||||
{
|
||||
if (strpos($data['type'], 'password') === 0 && $config_value === '********')
|
||||
{
|
||||
// Do not update password fields if the content is ********,
|
||||
// because that is the password replacement we use to not
|
||||
// send the password to the output
|
||||
continue;
|
||||
}
|
||||
set_config($config_name, $config_value);
|
||||
|
||||
if ($config_name == 'allow_quick_reply' && isset($_POST['allow_quick_reply_enable']))
|
||||
@@ -559,6 +567,7 @@ class acp_board
|
||||
$old_auth_config = array();
|
||||
foreach ($auth_providers as $provider)
|
||||
{
|
||||
/** @var \phpbb\auth\provider\provider_interface $provider */
|
||||
if ($fields = $provider->acp())
|
||||
{
|
||||
// Check if we need to create config fields for this plugin and save config when submit was pressed
|
||||
@@ -574,6 +583,14 @@ class acp_board
|
||||
continue;
|
||||
}
|
||||
|
||||
if (substr($field, -9) === '_password' && $cfg_array[$field] === '********')
|
||||
{
|
||||
// Do not update password fields if the content is ********,
|
||||
// because that is the password replacement we use to not
|
||||
// send the password to the output
|
||||
continue;
|
||||
}
|
||||
|
||||
$old_auth_config[$field] = $this->new_config[$field];
|
||||
$config_value = $cfg_array[$field];
|
||||
$this->new_config[$field] = $config_value;
|
||||
|
@@ -1173,6 +1173,7 @@ class postgres_extractor extends base_extractor
|
||||
$this->flush($sql_data . ";\n");
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$sql_data = '-- Table: ' . $table_name . "\n";
|
||||
$sql_data .= "DROP TABLE $table_name;\n";
|
||||
@@ -1557,7 +1558,7 @@ class mssql_extractor extends base_extractor
|
||||
{
|
||||
$this->write_data_mssql($table_name);
|
||||
}
|
||||
else if($db->get_sql_layer() === 'mssqlnative')
|
||||
else if ($db->get_sql_layer() === 'mssqlnative')
|
||||
{
|
||||
$this->write_data_mssqlnative($table_name);
|
||||
}
|
||||
|
@@ -40,6 +40,7 @@ class acp_email
|
||||
$error = array();
|
||||
|
||||
$usernames = request_var('usernames', '', true);
|
||||
$usernames = (!empty($usernames)) ? explode("\n", $usernames) : array();
|
||||
$group_id = request_var('g', 0);
|
||||
$subject = utf8_normalize_nfc(request_var('subject', '', true));
|
||||
$message = utf8_normalize_nfc(request_var('message', '', true));
|
||||
@@ -69,7 +70,7 @@ class acp_email
|
||||
|
||||
if (!sizeof($error))
|
||||
{
|
||||
if ($usernames)
|
||||
if (!empty($usernames))
|
||||
{
|
||||
// If giving usernames the admin is able to email inactive users too...
|
||||
$sql_ary = array(
|
||||
@@ -77,7 +78,7 @@ class acp_email
|
||||
'FROM' => array(
|
||||
USERS_TABLE => '',
|
||||
),
|
||||
'WHERE' => $db->sql_in_set('username_clean', array_map('utf8_clean_string', explode("\n", $usernames))) . '
|
||||
'WHERE' => $db->sql_in_set('username_clean', array_map('utf8_clean_string', $usernames)) . '
|
||||
AND user_allow_massemail = 1',
|
||||
'ORDER_BY' => 'user_lang, user_notify_type',
|
||||
);
|
||||
@@ -194,6 +195,39 @@ class acp_email
|
||||
|
||||
$errored = false;
|
||||
|
||||
$email_template = 'admin_send_email';
|
||||
$template_data = array(
|
||||
'CONTACT_EMAIL' => phpbb_get_board_contact($config, $phpEx),
|
||||
'MESSAGE' => htmlspecialchars_decode($message),
|
||||
);
|
||||
$generate_log_entry = true;
|
||||
|
||||
/**
|
||||
* Modify email template data before the emails are sent
|
||||
*
|
||||
* @event core.acp_email_send_before
|
||||
* @var string email_template The template to be used for sending the email
|
||||
* @var string subject The subject of the email
|
||||
* @var array template_data Array with template data assigned to email template
|
||||
* @var bool generate_log_entry If false, no log entry will be created
|
||||
* @var array usernames Usernames which will be displayed in log entry, if it will be created
|
||||
* @var int group_id The group this email will be sent to
|
||||
* @var bool use_queue If true, email queue will be used for sending
|
||||
* @var int priority Priority of sent emails
|
||||
* @since 3.1.3-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'email_template',
|
||||
'subject',
|
||||
'template_data',
|
||||
'generate_log_entry',
|
||||
'usernames',
|
||||
'group_id',
|
||||
'use_queue',
|
||||
'priority',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.acp_email_send_before', compact($vars)));
|
||||
|
||||
for ($i = 0, $size = sizeof($email_list); $i < $size; $i++)
|
||||
{
|
||||
$used_lang = $email_list[$i][0]['lang'];
|
||||
@@ -207,17 +241,14 @@ class acp_email
|
||||
$messenger->im($email_row['jabber'], $email_row['name']);
|
||||
}
|
||||
|
||||
$messenger->template('admin_send_email', $used_lang);
|
||||
$messenger->template($email_template, $used_lang);
|
||||
|
||||
$messenger->anti_abuse_headers($config, $user);
|
||||
|
||||
$messenger->subject(htmlspecialchars_decode($subject));
|
||||
$messenger->set_mail_priority($priority);
|
||||
|
||||
$messenger->assign_vars(array(
|
||||
'CONTACT_EMAIL' => phpbb_get_board_contact($config, $phpEx),
|
||||
'MESSAGE' => htmlspecialchars_decode($message))
|
||||
);
|
||||
$messenger->assign_vars($template_data);
|
||||
|
||||
if (!($messenger->send($used_method)))
|
||||
{
|
||||
@@ -228,24 +259,26 @@ class acp_email
|
||||
|
||||
$messenger->save_queue();
|
||||
|
||||
if ($usernames)
|
||||
if ($generate_log_entry)
|
||||
{
|
||||
$usernames = explode("\n", $usernames);
|
||||
add_log('admin', 'LOG_MASS_EMAIL', implode(', ', utf8_normalize_nfc($usernames)));
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($group_id)
|
||||
if (!empty($usernames))
|
||||
{
|
||||
$group_name = get_group_name($group_id);
|
||||
add_log('admin', 'LOG_MASS_EMAIL', implode(', ', utf8_normalize_nfc($usernames)));
|
||||
}
|
||||
else
|
||||
{
|
||||
// Not great but the logging routine doesn't cope well with localising on the fly
|
||||
$group_name = $user->lang['ALL_USERS'];
|
||||
}
|
||||
if ($group_id)
|
||||
{
|
||||
$group_name = get_group_name($group_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Not great but the logging routine doesn't cope well with localising on the fly
|
||||
$group_name = $user->lang['ALL_USERS'];
|
||||
}
|
||||
|
||||
add_log('admin', 'LOG_MASS_EMAIL', $group_name);
|
||||
add_log('admin', 'LOG_MASS_EMAIL', $group_name);
|
||||
}
|
||||
}
|
||||
|
||||
if (!$errored)
|
||||
@@ -281,17 +314,31 @@ class acp_email
|
||||
$s_priority_options .= '<option value="' . MAIL_NORMAL_PRIORITY . '" selected="selected">' . $user->lang['MAIL_NORMAL_PRIORITY'] . '</option>';
|
||||
$s_priority_options .= '<option value="' . MAIL_HIGH_PRIORITY . '">' . $user->lang['MAIL_HIGH_PRIORITY'] . '</option>';
|
||||
|
||||
$template->assign_vars(array(
|
||||
$template_data = array(
|
||||
'S_WARNING' => (sizeof($error)) ? true : false,
|
||||
'WARNING_MSG' => (sizeof($error)) ? implode('<br />', $error) : '',
|
||||
'U_ACTION' => $this->u_action,
|
||||
'S_GROUP_OPTIONS' => $select_list,
|
||||
'USERNAMES' => $usernames,
|
||||
'USERNAMES' => implode("\n", $usernames),
|
||||
'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=acp_email&field=usernames'),
|
||||
'SUBJECT' => $subject,
|
||||
'MESSAGE' => $message,
|
||||
'S_PRIORITY_OPTIONS' => $s_priority_options)
|
||||
'S_PRIORITY_OPTIONS' => $s_priority_options,
|
||||
);
|
||||
|
||||
/**
|
||||
* Modify custom email template data before we display the form
|
||||
*
|
||||
* @event core.acp_email_display
|
||||
* @var array template_data Array with template data assigned to email template
|
||||
* @var array exclude Array with groups which are excluded from group selection
|
||||
* @var array usernames Usernames which will be displayed in form
|
||||
*
|
||||
* @since 3.1.4-RC1
|
||||
*/
|
||||
$vars = array('template_data', 'exclude', 'usernames');
|
||||
extract($phpbb_dispatcher->trigger_event('core.acp_email_display', compact($vars)));
|
||||
|
||||
$template->assign_vars($template_data);
|
||||
}
|
||||
}
|
||||
|
@@ -76,7 +76,7 @@ class acp_extensions
|
||||
{
|
||||
$md_manager->get_metadata('all');
|
||||
}
|
||||
catch(\phpbb\extension\exception $e)
|
||||
catch (\phpbb\extension\exception $e)
|
||||
{
|
||||
trigger_error($e, E_USER_WARNING);
|
||||
}
|
||||
@@ -174,11 +174,6 @@ class acp_extensions
|
||||
trigger_error($user->lang['EXTENSION_NOT_ENABLEABLE'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
if ($phpbb_extension_manager->is_enabled($ext_name))
|
||||
{
|
||||
redirect($this->u_action);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
while ($phpbb_extension_manager->enable_step($ext_name))
|
||||
@@ -357,7 +352,7 @@ class acp_extensions
|
||||
$enabled_extension_meta_data[$name]['S_VERSIONCHECK'] = true;
|
||||
$enabled_extension_meta_data[$name]['U_VERSIONCHECK_FORCE'] = $this->u_action . '&action=details&versioncheck_force=1&ext_name=' . urlencode($md_manager->get_metadata('name'));
|
||||
}
|
||||
catch(\phpbb\extension\exception $e)
|
||||
catch (\phpbb\extension\exception $e)
|
||||
{
|
||||
$this->template->assign_block_vars('disabled', array(
|
||||
'META_DISPLAY_NAME' => $this->user->lang('EXTENSION_INVALID_LIST', $name, $e),
|
||||
@@ -413,7 +408,7 @@ class acp_extensions
|
||||
$disabled_extension_meta_data[$name]['S_VERSIONCHECK'] = true;
|
||||
$disabled_extension_meta_data[$name]['U_VERSIONCHECK_FORCE'] = $this->u_action . '&action=details&versioncheck_force=1&ext_name=' . urlencode($md_manager->get_metadata('name'));
|
||||
}
|
||||
catch(\phpbb\extension\exception $e)
|
||||
catch (\phpbb\extension\exception $e)
|
||||
{
|
||||
$this->template->assign_block_vars('disabled', array(
|
||||
'META_DISPLAY_NAME' => $this->user->lang('EXTENSION_INVALID_LIST', $name, $e),
|
||||
@@ -472,7 +467,7 @@ class acp_extensions
|
||||
$available_extension_meta_data[$name]['S_VERSIONCHECK'] = true;
|
||||
$available_extension_meta_data[$name]['U_VERSIONCHECK_FORCE'] = $this->u_action . '&action=details&versioncheck_force=1&ext_name=' . urlencode($md_manager->get_metadata('name'));
|
||||
}
|
||||
catch(\phpbb\extension\exception $e)
|
||||
catch (\phpbb\extension\exception $e)
|
||||
{
|
||||
$this->template->assign_block_vars('disabled', array(
|
||||
'META_DISPLAY_NAME' => $this->user->lang('EXTENSION_INVALID_LIST', $name, $e),
|
||||
|
@@ -1786,7 +1786,7 @@ class acp_forums
|
||||
*/
|
||||
function delete_forum_content($forum_id)
|
||||
{
|
||||
global $db, $config, $phpbb_root_path, $phpEx;
|
||||
global $db, $config, $phpbb_root_path, $phpEx, $phpbb_dispatcher;
|
||||
|
||||
include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
|
||||
|
||||
@@ -1918,6 +1918,24 @@ class acp_forums
|
||||
|
||||
$table_ary = array(FORUMS_ACCESS_TABLE, FORUMS_TRACK_TABLE, FORUMS_WATCH_TABLE, LOG_TABLE, MODERATOR_CACHE_TABLE, POSTS_TABLE, TOPICS_TABLE, TOPICS_TRACK_TABLE);
|
||||
|
||||
/**
|
||||
* Perform additional actions before forum content deletion
|
||||
*
|
||||
* @event core.delete_forum_content_before_query
|
||||
* @var array table_ary Array of tables from which all rows will be deleted that hold the forum_id
|
||||
* @var int forum_id the forum id
|
||||
* @var array topic_ids Array of the topic ids from the forum to be deleted
|
||||
* @var array post_counts Array of counts of posts in the forum, by poster_id
|
||||
* @since 3.1.6-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'table_ary',
|
||||
'forum_id',
|
||||
'topic_ids',
|
||||
'post_counts',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.delete_forum_content_before_query', compact($vars)));
|
||||
|
||||
foreach ($table_ary as $table)
|
||||
{
|
||||
$db->sql_query("DELETE FROM $table WHERE forum_id = $forum_id");
|
||||
|
@@ -107,7 +107,10 @@ class acp_jabber
|
||||
set_config('jab_host', $jab_host);
|
||||
set_config('jab_port', $jab_port);
|
||||
set_config('jab_username', $jab_username);
|
||||
set_config('jab_password', $jab_password);
|
||||
if ($jab_password !== '********')
|
||||
{
|
||||
set_config('jab_password', $jab_password);
|
||||
}
|
||||
set_config('jab_package_size', $jab_package_size);
|
||||
set_config('jab_use_ssl', $jab_use_ssl);
|
||||
|
||||
@@ -122,7 +125,7 @@ class acp_jabber
|
||||
'JAB_HOST' => $jab_host,
|
||||
'JAB_PORT' => ($jab_port) ? $jab_port : '',
|
||||
'JAB_USERNAME' => $jab_username,
|
||||
'JAB_PASSWORD' => $jab_password,
|
||||
'JAB_PASSWORD' => $jab_password !== '' ? '********' : '',
|
||||
'JAB_PACKAGE_SIZE' => $jab_package_size,
|
||||
'JAB_USE_SSL' => $jab_use_ssl,
|
||||
'S_CAN_USE_SSL' => jabber::can_use_ssl(),
|
||||
|
@@ -632,7 +632,7 @@ class acp_main
|
||||
{
|
||||
$error = false;
|
||||
$search_type = $config['search_type'];
|
||||
$search = new $search_type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user);
|
||||
$search = new $search_type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user, $phpbb_dispatcher);
|
||||
|
||||
if (!$search->index_created())
|
||||
{
|
||||
|
@@ -31,7 +31,7 @@ class acp_profile
|
||||
{
|
||||
global $config, $db, $user, $auth, $template, $cache;
|
||||
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix;
|
||||
global $request, $phpbb_container;
|
||||
global $request, $phpbb_container, $phpbb_dispatcher;
|
||||
|
||||
include($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
|
||||
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
@@ -369,6 +369,32 @@ class acp_profile
|
||||
'field_is_contact',
|
||||
);
|
||||
|
||||
/**
|
||||
* Event to add initialization for new profile field table fields
|
||||
*
|
||||
* @event core.acp_profile_create_edit_init
|
||||
* @var string action create|edit
|
||||
* @var int step Configuration step (1|2|3)
|
||||
* @var bool submit Form has been submitted
|
||||
* @var bool save Configuration should be saved
|
||||
* @var string field_type Type of the field we are dealing with
|
||||
* @var array field_row Array of data about the field
|
||||
* @var array exclude Array of excluded fields by step
|
||||
* @var array visibility_ary Array of fields that are visibility related
|
||||
* @since 3.1.6-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'action',
|
||||
'step',
|
||||
'submit',
|
||||
'save',
|
||||
'field_type',
|
||||
'field_row',
|
||||
'exclude',
|
||||
'visibility_ary',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.acp_profile_create_edit_init', compact($vars)));
|
||||
|
||||
$options = $profile_field->prepare_options_form($exclude, $visibility_ary);
|
||||
|
||||
$cp->vars['field_ident'] = ($action == 'create' && $step == 1) ? utf8_clean_string(request_var('field_ident', $field_row['field_ident'], true)) : request_var('field_ident', $field_row['field_ident']);
|
||||
@@ -460,7 +486,7 @@ class acp_profile
|
||||
|
||||
if (!$cp->vars[$key] && $action == 'edit')
|
||||
{
|
||||
$cp->vars[$key] = $$key;
|
||||
$cp->vars[$key] = ${$key};
|
||||
}
|
||||
|
||||
$field_data = $cp->vars;
|
||||
@@ -644,6 +670,33 @@ class acp_profile
|
||||
break;
|
||||
}
|
||||
|
||||
$field_data = $cp->vars;
|
||||
/**
|
||||
* Event to add template variables for new profile field table fields
|
||||
*
|
||||
* @event core.acp_profile_create_edit_after
|
||||
* @var string action create|edit
|
||||
* @var int step Configuration step (1|2|3)
|
||||
* @var bool submit Form has been submitted
|
||||
* @var bool save Configuration should be saved
|
||||
* @var string field_type Type of the field we are dealing with
|
||||
* @var array field_data Array of data about the field
|
||||
* @var array s_hidden_fields Array of hidden fields in case this needs modification
|
||||
* @var array options Array of options specific to this step
|
||||
* @since 3.1.6-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'action',
|
||||
'step',
|
||||
'submit',
|
||||
'save',
|
||||
'field_type',
|
||||
'field_data',
|
||||
's_hidden_fields',
|
||||
'options',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.acp_profile_create_edit_after', compact($vars)));
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_HIDDEN_FIELDS' => $s_hidden_fields)
|
||||
);
|
||||
@@ -810,7 +863,7 @@ class acp_profile
|
||||
*/
|
||||
function save_profile_field(&$cp, $field_type, $action = 'create')
|
||||
{
|
||||
global $db, $config, $user, $phpbb_container;
|
||||
global $db, $config, $user, $phpbb_container, $phpbb_dispatcher;
|
||||
|
||||
$field_id = request_var('field_id', 0);
|
||||
|
||||
@@ -852,6 +905,25 @@ class acp_profile
|
||||
'field_contact_url' => $cp->vars['field_contact_url'],
|
||||
);
|
||||
|
||||
$field_data = $cp->vars;
|
||||
/**
|
||||
* Event to modify profile field configuration data before saving to database
|
||||
*
|
||||
* @event core.acp_profile_create_edit_save_before
|
||||
* @var string action create|edit
|
||||
* @var string field_type Type of the field we are dealing with
|
||||
* @var array field_data Array of data about the field
|
||||
* @var array profile_fields Array of fields to be sent to the database
|
||||
* @since 3.1.6-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'action',
|
||||
'field_type',
|
||||
'field_data',
|
||||
'profile_fields',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.acp_profile_create_edit_save_before', compact($vars)));
|
||||
|
||||
if ($action == 'create')
|
||||
{
|
||||
$profile_fields += array(
|
||||
|
@@ -397,7 +397,7 @@ class acp_prune
|
||||
$joined_after = request_var('joined_after', '');
|
||||
$active = request_var('active', '');
|
||||
|
||||
$count = request_var('count', 0);
|
||||
$count = ($request->variable('count', '') === '') ? false : $request->variable('count', 0);
|
||||
|
||||
$active = ($active) ? explode('-', $active) : array();
|
||||
$joined_before = ($joined_before) ? explode('-', $joined_before) : array();
|
||||
@@ -439,7 +439,7 @@ class acp_prune
|
||||
$where_sql .= ($username) ? ' AND username_clean ' . $db->sql_like_expression(str_replace('*', $db->get_any_char(), utf8_clean_string($username))) : '';
|
||||
$where_sql .= ($email) ? ' AND user_email ' . $db->sql_like_expression(str_replace('*', $db->get_any_char(), $email)) . ' ' : '';
|
||||
$where_sql .= $joined_sql;
|
||||
$where_sql .= ($count) ? " AND user_posts " . $key_match[$count_select] . ' ' . (int) $count . ' ' : '';
|
||||
$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)
|
||||
@@ -506,9 +506,9 @@ class acp_prune
|
||||
WHERE ug.group_id = ' . (int) $group_id . '
|
||||
AND ug.user_id <> ' . ANONYMOUS . '
|
||||
AND u.user_type <> ' . USER_FOUNDER . '
|
||||
AND ug.user_pending = 0 ' .
|
||||
((!empty($user_ids)) ? 'AND ' . $db->sql_in_set('ug.user_id', $user_ids) : '') . '
|
||||
AND u.user_id = ug.user_id';
|
||||
AND ug.user_pending = 0
|
||||
AND u.user_id = ug.user_id
|
||||
' . (!empty($user_ids) ? ' AND ' . $db->sql_in_set('ug.user_id', $user_ids) : '');
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
// we're performing an intersection operation, so all the relevant users
|
||||
@@ -532,10 +532,10 @@ class acp_prune
|
||||
$sql = 'SELECT u.user_id, u.username, COUNT(p.post_id) AS queue_posts
|
||||
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
|
||||
WHERE u.user_id <> ' . ANONYMOUS . '
|
||||
AND u.user_type <> ' . USER_FOUNDER .
|
||||
((!empty($user_ids)) ? 'AND ' . $db->sql_in_set('p.poster_id', $user_ids) : '') . '
|
||||
AND u.user_type <> ' . USER_FOUNDER . '
|
||||
AND ' . $db->sql_in_set('p.post_visibility', array(ITEM_UNAPPROVED, ITEM_REAPPROVE)) . '
|
||||
AND u.user_id = p.poster_id
|
||||
' . (!empty($user_ids) ? ' AND ' . $db->sql_in_set('p.poster_id', $user_ids) : '') . '
|
||||
GROUP BY p.poster_id
|
||||
HAVING queue_posts ' . $key_match[$queue_select] . ' ' . $posts_on_queue;
|
||||
$result = $db->sql_query($sql);
|
||||
|
@@ -449,7 +449,6 @@ class acp_search
|
||||
|
||||
$search = null;
|
||||
$error = false;
|
||||
$search_options = '';
|
||||
foreach ($search_types as $type)
|
||||
{
|
||||
if ($this->init_search($type, $search, $error) || !method_exists($search, 'index_created'))
|
||||
@@ -599,7 +598,7 @@ class acp_search
|
||||
*/
|
||||
function init_search($type, &$search, &$error)
|
||||
{
|
||||
global $phpbb_root_path, $phpEx, $user, $auth, $config, $db;
|
||||
global $phpbb_root_path, $phpEx, $user, $auth, $config, $db, $phpbb_dispatcher;
|
||||
|
||||
if (!class_exists($type) || !method_exists($type, 'keyword_search'))
|
||||
{
|
||||
@@ -608,7 +607,7 @@ class acp_search
|
||||
}
|
||||
|
||||
$error = false;
|
||||
$search = new $type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user);
|
||||
$search = new $type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user, $phpbb_dispatcher);
|
||||
|
||||
return $error;
|
||||
}
|
||||
|
@@ -995,7 +995,7 @@ class acp_styles
|
||||
|
||||
// Assign template variables
|
||||
$this->template->assign_block_vars('styles_list', $row);
|
||||
foreach($actions as $action)
|
||||
foreach ($actions as $action)
|
||||
{
|
||||
$this->template->assign_block_vars('styles_list.actions', $action);
|
||||
}
|
||||
|
@@ -173,6 +173,21 @@ class acp_users
|
||||
$delete_type = request_var('delete_type', '');
|
||||
$ip = request_var('ip', 'ip');
|
||||
|
||||
/**
|
||||
* Run code at beginning of ACP users overview
|
||||
*
|
||||
* @event core.acp_users_overview_before
|
||||
* @var array user_row Current user data
|
||||
* @var string mode Active module
|
||||
* @var string action Module that should be run
|
||||
* @var bool submit Do we display the form only
|
||||
* or did the user press submit
|
||||
* @var array error Array holding error messages
|
||||
* @since 3.1.3-RC1
|
||||
*/
|
||||
$vars = array('user_row', 'mode', 'action', 'submit', 'error');
|
||||
extract($phpbb_dispatcher->trigger_event('core.acp_users_overview_before', compact($vars)));
|
||||
|
||||
if ($submit)
|
||||
{
|
||||
if ($delete)
|
||||
@@ -1362,6 +1377,19 @@ class acp_users
|
||||
$data['bday_year'] = request_var('bday_year', $data['bday_year']);
|
||||
$data['user_birthday'] = sprintf('%2d-%2d-%4d', $data['bday_day'], $data['bday_month'], $data['bday_year']);
|
||||
|
||||
/**
|
||||
* Modify user data on editing profile in ACP
|
||||
*
|
||||
* @event core.acp_users_modify_profile
|
||||
* @var array data Array with user profile data
|
||||
* @var bool submit Flag indicating if submit button has been pressed
|
||||
* @var int user_id The user id
|
||||
* @var array user_row Array with the full user data
|
||||
* @since 3.1.4-RC1
|
||||
*/
|
||||
$vars = array('data', 'submit', 'user_id', 'user_row');
|
||||
extract($phpbb_dispatcher->trigger_event('core.acp_users_modify_profile', compact($vars)));
|
||||
|
||||
if ($submit)
|
||||
{
|
||||
$error = validate_data($data, array(
|
||||
@@ -1386,6 +1414,18 @@ class acp_users
|
||||
$error[] = 'FORM_INVALID';
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 array error Array with the form errors
|
||||
* @since 3.1.4-RC1
|
||||
*/
|
||||
$vars = array('submit', 'data', 'error');
|
||||
extract($phpbb_dispatcher->trigger_event('core.acp_users_profile_validate', compact($vars)));
|
||||
|
||||
if (!sizeof($error))
|
||||
{
|
||||
$sql_ary = array(
|
||||
@@ -1393,6 +1433,20 @@ class acp_users
|
||||
'user_birthday' => $data['user_birthday'],
|
||||
);
|
||||
|
||||
/**
|
||||
* Modify profile data in ACP before submitting to the database
|
||||
*
|
||||
* @event core.acp_users_profile_modify_sql_ary
|
||||
* @var array cp_data Array with the user custom profile fields data
|
||||
* @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 sql_ary Array with sql data
|
||||
* @since 3.1.4-RC1
|
||||
*/
|
||||
$vars = array('cp_data', 'data', 'user_id', 'user_row', 'sql_ary');
|
||||
extract($phpbb_dispatcher->trigger_event('core.acp_users_profile_modify_sql_ary', compact($vars)));
|
||||
|
||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
|
||||
WHERE user_id = $user_id";
|
||||
|
@@ -129,7 +129,7 @@ class bbcode
|
||||
*/
|
||||
function bbcode_cache_init()
|
||||
{
|
||||
global $phpbb_root_path, $phpEx, $config, $user, $phpbb_extension_manager, $phpbb_path_helper;
|
||||
global $phpbb_root_path, $phpEx, $config, $user, $phpbb_dispatcher, $phpbb_extension_manager, $phpbb_path_helper;
|
||||
|
||||
if (empty($this->template_filename))
|
||||
{
|
||||
@@ -182,6 +182,8 @@ class bbcode
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
// To perform custom second pass in extension, use $this->bbcode_second_pass_by_extension()
|
||||
// method which accepts variable number of parameters
|
||||
foreach ($bbcode_ids as $bbcode_id)
|
||||
{
|
||||
switch ($bbcode_id)
|
||||
@@ -388,6 +390,26 @@ class bbcode
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$bbcode_cache = $this->bbcode_cache;
|
||||
$bbcode_bitfield = $this->bbcode_bitfield;
|
||||
$bbcode_uid = $this->bbcode_uid;
|
||||
|
||||
/**
|
||||
* Use this event to modify the bbcode_cache
|
||||
*
|
||||
* @event core.bbcode_cache_init_end
|
||||
* @var array bbcode_cache The array of cached search and replace patterns of bbcodes
|
||||
* @var string bbcode_bitfield The bbcode bitfield
|
||||
* @var string bbcode_uid The bbcode uid
|
||||
* @since 3.1.3-RC1
|
||||
*/
|
||||
$vars = array('bbcode_cache', 'bbcode_bitfield', 'bbcode_uid');
|
||||
extract($phpbb_dispatcher->trigger_event('core.bbcode_cache_init_end', compact($vars)));
|
||||
|
||||
$this->bbcode_cache = $bbcode_cache;
|
||||
$this->bbcode_bitfield = $bbcode_bitfield;
|
||||
$this->bbcode_uid = $bbcode_uid;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -593,4 +615,36 @@ class bbcode
|
||||
|
||||
return $code;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function to perform custom bbcode second pass by extensions
|
||||
* can be used to assign bbcode pattern replacement
|
||||
* Example: '#\[list=([^\[]+):$uid\]#e' => "\$this->bbcode_second_pass_by_extension('\$1')"
|
||||
*
|
||||
* Accepts variable number of parameters
|
||||
*
|
||||
* @return mixed Second pass result
|
||||
*/
|
||||
function bbcode_second_pass_by_extension()
|
||||
{
|
||||
global $phpbb_dispatcher;
|
||||
|
||||
$return = false;
|
||||
$params_array = func_get_args();
|
||||
|
||||
/**
|
||||
* Event to perform bbcode second pass with
|
||||
* the custom validating methods provided by extensions
|
||||
*
|
||||
* @event core.bbcode_second_pass_by_extension
|
||||
* @var array params_array Array with the function parameters
|
||||
* @var mixed return Second pass result to return
|
||||
*
|
||||
* @since 3.1.5-RC1
|
||||
*/
|
||||
$vars = array('params_array', 'return');
|
||||
extract($phpbb_dispatcher->trigger_event('core.bbcode_second_pass_by_extension', compact($vars)));
|
||||
|
||||
return $return;
|
||||
}
|
||||
}
|
||||
|
@@ -28,7 +28,7 @@ if (!defined('IN_PHPBB'))
|
||||
*/
|
||||
|
||||
// phpBB Version
|
||||
define('PHPBB_VERSION', '3.1.2');
|
||||
define('PHPBB_VERSION', '3.1.6-RC1');
|
||||
|
||||
// QA-related
|
||||
// define('PHPBB_QA', 1);
|
||||
|
@@ -1150,10 +1150,43 @@ function phpbb_timezone_select($template, $user, $default = '', $truncate = fals
|
||||
function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $user_id = 0)
|
||||
{
|
||||
global $db, $user, $config;
|
||||
global $request, $phpbb_container;
|
||||
global $request, $phpbb_container, $phpbb_dispatcher;
|
||||
|
||||
$post_time = ($post_time === 0 || $post_time > time()) ? time() : (int) $post_time;
|
||||
|
||||
$should_markread = true;
|
||||
|
||||
/**
|
||||
* This event is used for performing actions directly before marking forums,
|
||||
* topics or posts as read.
|
||||
*
|
||||
* It is also possible to prevent the marking. For that, the $should_markread parameter
|
||||
* should be set to FALSE.
|
||||
*
|
||||
* @event core.markread_before
|
||||
* @var string mode Variable containing marking mode value
|
||||
* @var mixed forum_id Variable containing forum id, or false
|
||||
* @var mixed topic_id Variable containing topic id, or false
|
||||
* @var int post_time Variable containing post time
|
||||
* @var int user_id Variable containing the user id
|
||||
* @var bool should_markread Flag indicating if the markread should be done or not.
|
||||
* @since 3.1.4-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'mode',
|
||||
'forum_id',
|
||||
'topic_id',
|
||||
'post_time',
|
||||
'user_id',
|
||||
'should_markread',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.markread_before', compact($vars)));
|
||||
|
||||
if (!$should_markread)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ($mode == 'all')
|
||||
{
|
||||
if ($forum_id === false || !sizeof($forum_id))
|
||||
@@ -1225,6 +1258,10 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $
|
||||
{
|
||||
$forum_id = array($forum_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
$forum_id = array_unique($forum_id);
|
||||
}
|
||||
|
||||
$phpbb_notifications = $phpbb_container->get('notification_manager');
|
||||
|
||||
@@ -1648,6 +1685,7 @@ function get_complete_topic_tracking($forum_id, $topic_ids, $global_announce_lis
|
||||
function get_unread_topics($user_id = false, $sql_extra = '', $sql_sort = '', $sql_limit = 1001, $sql_limit_offset = 0)
|
||||
{
|
||||
global $config, $db, $user;
|
||||
global $phpbb_dispatcher;
|
||||
|
||||
$user_id = ($user_id === false) ? (int) $user->data['user_id'] : (int) $user_id;
|
||||
|
||||
@@ -1691,6 +1729,24 @@ function get_unread_topics($user_id = false, $sql_extra = '', $sql_sort = '', $s
|
||||
$sql_sort",
|
||||
);
|
||||
|
||||
/**
|
||||
* Change SQL query for fetching unread topics data
|
||||
*
|
||||
* @event core.get_unread_topics_modify_sql
|
||||
* @var array sql_array Fully assembled SQL query with keys SELECT, FROM, LEFT_JOIN, WHERE
|
||||
* @var int last_mark User's last_mark time
|
||||
* @var string sql_extra Extra WHERE SQL statement
|
||||
* @var string sql_sort ORDER BY SQL sorting statement
|
||||
* @since 3.1.4-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'sql_array',
|
||||
'last_mark',
|
||||
'sql_extra',
|
||||
'sql_sort',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.get_unread_topics_modify_sql', compact($vars)));
|
||||
|
||||
$sql = $db->sql_build_query('SELECT', $sql_array);
|
||||
$result = $db->sql_query_limit($sql, $sql_limit, $sql_limit_offset);
|
||||
|
||||
@@ -2257,7 +2313,7 @@ function redirect($url, $return = false, $disable_cd_check = false)
|
||||
// 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)
|
||||
{
|
||||
$url = generate_board_url();
|
||||
trigger_error('INSECURE_REDIRECT', E_USER_ERROR);
|
||||
}
|
||||
}
|
||||
else if ($url[0] == '/')
|
||||
@@ -2295,7 +2351,7 @@ function redirect($url, $return = false, $disable_cd_check = false)
|
||||
// Clean URL and check if we go outside the forum directory
|
||||
$url = $phpbb_path_helper->clean_url($url);
|
||||
|
||||
if (!$disable_cd_check && strpos($url, generate_board_url(true)) === false)
|
||||
if (!$disable_cd_check && strpos($url, generate_board_url(true) . '/') !== 0)
|
||||
{
|
||||
trigger_error('INSECURE_REDIRECT', E_USER_ERROR);
|
||||
}
|
||||
@@ -2337,7 +2393,7 @@ function redirect($url, $return = false, $disable_cd_check = false)
|
||||
}
|
||||
|
||||
// Redirect via an HTML form for PITA webservers
|
||||
if (@preg_match('#Microsoft|WebSTAR|Xitami#', getenv('SERVER_SOFTWARE')))
|
||||
if (@preg_match('#WebSTAR|Xitami#', getenv('SERVER_SOFTWARE')))
|
||||
{
|
||||
header('Refresh: 0; URL=' . $url);
|
||||
|
||||
@@ -2396,26 +2452,7 @@ function build_url($strip_vars = false)
|
||||
{
|
||||
global $config, $user, $phpbb_path_helper;
|
||||
|
||||
$php_ext = $phpbb_path_helper->get_php_ext();
|
||||
$page = $user->page['page'];
|
||||
|
||||
// We need to be cautious here.
|
||||
// On some situations, the redirect path is an absolute URL, sometimes a relative path
|
||||
// For a relative path, let's prefix it with $phpbb_root_path to point to the correct location,
|
||||
// else we use the URL directly.
|
||||
$url_parts = parse_url($page);
|
||||
|
||||
// URL
|
||||
if ($url_parts === false || empty($url_parts['scheme']) || empty($url_parts['host']))
|
||||
{
|
||||
// Remove 'app.php/' from the page, when rewrite is enabled
|
||||
if ($config['enable_mod_rewrite'] && strpos($page, 'app.' . $php_ext . '/') === 0)
|
||||
{
|
||||
$page = substr($page, strlen('app.' . $php_ext . '/'));
|
||||
}
|
||||
|
||||
$page = $phpbb_path_helper->get_phpbb_root_path() . $page;
|
||||
}
|
||||
$page = $phpbb_path_helper->get_valid_page($user->page['page'], $config['enable_mod_rewrite']);
|
||||
|
||||
// Append SID
|
||||
$redirect = append_sid($page, false, false);
|
||||
@@ -2511,13 +2548,19 @@ function phpbb_request_http_version()
|
||||
{
|
||||
global $request;
|
||||
|
||||
$version = '';
|
||||
if ($request && $request->server('SERVER_PROTOCOL'))
|
||||
{
|
||||
return $request->server('SERVER_PROTOCOL');
|
||||
$version = $request->server('SERVER_PROTOCOL');
|
||||
}
|
||||
else if (isset($_SERVER['SERVER_PROTOCOL']))
|
||||
{
|
||||
return $_SERVER['SERVER_PROTOCOL'];
|
||||
$version = $_SERVER['SERVER_PROTOCOL'];
|
||||
}
|
||||
|
||||
if (!empty($version) && is_string($version) && preg_match('#^HTTP/[0-9]\.[0-9]$#', $version))
|
||||
{
|
||||
return $version;
|
||||
}
|
||||
|
||||
return 'HTTP/1.0';
|
||||
@@ -2657,7 +2700,7 @@ function check_form_key($form_name, $timespan = false)
|
||||
function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_body.html', $u_action = '')
|
||||
{
|
||||
global $user, $template, $db, $request;
|
||||
global $phpEx, $phpbb_root_path, $request;
|
||||
global $config, $phpbb_path_helper;
|
||||
|
||||
if (isset($_POST['cancel']))
|
||||
{
|
||||
@@ -2719,8 +2762,8 @@ function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_bo
|
||||
}
|
||||
|
||||
// re-add sid / transform & to & for user->page (user->page is always using &)
|
||||
$use_page = ($u_action) ? $phpbb_root_path . $u_action : $phpbb_root_path . str_replace('&', '&', $user->page['page']);
|
||||
$u_action = reapply_sid($use_page);
|
||||
$use_page = ($u_action) ? $u_action : str_replace('&', '&', $user->page['page']);
|
||||
$u_action = reapply_sid($phpbb_path_helper->get_valid_page($use_page, $config['enable_mod_rewrite']));
|
||||
$u_action .= ((strpos($u_action, '?') === false) ? '?' : '&') . 'confirm_key=' . $confirm_key;
|
||||
|
||||
$template->assign_vars(array(
|
||||
@@ -2887,19 +2930,6 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
|
||||
// Special cases... determine
|
||||
switch ($result['status'])
|
||||
{
|
||||
case LOGIN_ERROR_ATTEMPTS:
|
||||
|
||||
$captcha = $phpbb_container->get('captcha.factory')->get_instance($config['captcha_plugin']);
|
||||
$captcha->init(CONFIRM_LOGIN);
|
||||
// $captcha->reset();
|
||||
|
||||
$template->assign_vars(array(
|
||||
'CAPTCHA_TEMPLATE' => $captcha->get_template(),
|
||||
));
|
||||
|
||||
$err = $user->lang[$result['error_msg']];
|
||||
break;
|
||||
|
||||
case LOGIN_ERROR_PASSWORD_CONVERT:
|
||||
$err = sprintf(
|
||||
$user->lang[$result['error_msg']],
|
||||
@@ -2910,6 +2940,17 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
|
||||
);
|
||||
break;
|
||||
|
||||
case LOGIN_ERROR_ATTEMPTS:
|
||||
|
||||
$captcha = $phpbb_container->get('captcha.factory')->get_instance($config['captcha_plugin']);
|
||||
$captcha->init(CONFIRM_LOGIN);
|
||||
// $captcha->reset();
|
||||
|
||||
$template->assign_vars(array(
|
||||
'CAPTCHA_TEMPLATE' => $captcha->get_template(),
|
||||
));
|
||||
// no break;
|
||||
|
||||
// Username, password, etc...
|
||||
default:
|
||||
$err = $user->lang[$result['error_msg']];
|
||||
@@ -2922,6 +2963,19 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
/**
|
||||
* This event allows an extension to process when a user fails a login attempt
|
||||
*
|
||||
* @event core.login_box_failed
|
||||
* @var array result Login result data
|
||||
* @var string username User name used to login
|
||||
* @var string password Password used to login
|
||||
* @var string err Error message
|
||||
* @since 3.1.3-RC1
|
||||
*/
|
||||
$vars = array('result', 'username', 'password', 'err');
|
||||
extract($phpbb_dispatcher->trigger_event('core.login_box_failed', compact($vars)));
|
||||
}
|
||||
|
||||
// Assign credential for username/password pair
|
||||
@@ -3301,7 +3355,7 @@ function get_preg_expression($mode)
|
||||
case 'email':
|
||||
// Regex written by James Watts and Francisco Jose Martin Moreno
|
||||
// http://fightingforalostcause.net/misc/2006/compare-email-regex.php
|
||||
return '([\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+\.)*(?:[\w\!\#$\%\'\*\+\-\/\=\?\^\`{\|\}\~]|&)+@((((([a-z0-9]{1}[a-z0-9\-]{0,62}[a-z0-9]{1})|[a-z])\.)+[a-z]{2,63})|(\d{1,3}\.){3}\d{1,3}(\:\d{1,5})?)';
|
||||
return '((?:[\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+\.)*(?:[\w\!\#$\%\'\*\+\-\/\=\?\^\`{\|\}\~]|&)+)@((((([a-z0-9]{1}[a-z0-9\-]{0,62}[a-z0-9]{1})|[a-z])\.)+[a-z]{2,63})|(\d{1,3}\.){3}\d{1,3}(\:\d{1,5})?)';
|
||||
break;
|
||||
|
||||
case 'bbcode_htm':
|
||||
@@ -3327,23 +3381,33 @@ function get_preg_expression($mode)
|
||||
break;
|
||||
|
||||
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})*)?";
|
||||
break;
|
||||
|
||||
case 'url_inline':
|
||||
$inline = ($mode == 'url') ? ')' : '';
|
||||
$scheme = ($mode == 'url') ? '[a-z\d+\-.]' : '[a-z\d+]'; // avoid automatic parsing of "word" in "last word.http://..."
|
||||
// generated with regex generation file in the develop folder
|
||||
return "[a-z]$scheme*:/{2}(?:(?:[a-z0-9\-._~!$&'($inline*+,;=:@|]+|%[\dA-F]{2})+|[0-9.]+|\[[a-z0-9.]+:[a-z0-9.]+:[a-z0-9.:]+\])(?::\d*)?(?:/(?:[a-z0-9\-._~!$&'($inline*+,;=:@|]+|%[\dA-F]{2})*)*(?:\?(?:[a-z0-9\-._~!$&'($inline*+,;=:@/?|]+|%[\dA-F]{2})*)?(?:\#(?:[a-z0-9\-._~!$&'($inline*+,;=:@/?|]+|%[\dA-F]{2})*)?";
|
||||
// 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})*)?";
|
||||
break;
|
||||
|
||||
case 'www_url':
|
||||
// generated with regex_idn.php file in the develop folder
|
||||
return "www\.(?:[^\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})+(?::\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_inline':
|
||||
$inline = ($mode == 'www_url') ? ')' : '';
|
||||
return "www\.(?:[a-z0-9\-._~!$&'($inline*+,;=:@|]+|%[\dA-F]{2})+(?::\d*)?(?:/(?:[a-z0-9\-._~!$&'($inline*+,;=:@|]+|%[\dA-F]{2})*)*(?:\?(?:[a-z0-9\-._~!$&'($inline*+,;=:@/?|]+|%[\dA-F]{2})*)?(?:\#(?:[a-z0-9\-._~!$&'($inline*+,;=:@/?|]+|%[\dA-F]{2})*)?";
|
||||
// generated with regex_idn.php file in the develop folder
|
||||
return "www\.(?:[^\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})+(?::\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 'relative_url':
|
||||
// generated with regex_idn.php file in the develop folder
|
||||
return "(?:[^\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})*)?(?:\#(?:[^\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 'relative_url_inline':
|
||||
$inline = ($mode == 'relative_url') ? ')' : '';
|
||||
return "(?:[a-z0-9\-._~!$&'($inline*+,;=:@|]+|%[\dA-F]{2})*(?:/(?:[a-z0-9\-._~!$&'($inline*+,;=:@|]+|%[\dA-F]{2})*)*(?:\?(?:[a-z0-9\-._~!$&'($inline*+,;=:@/?|]+|%[\dA-F]{2})*)?(?:\#(?:[a-z0-9\-._~!$&'($inline*+,;=:@/?|]+|%[\dA-F]{2})*)?";
|
||||
// generated with regex_idn.php file in the develop folder
|
||||
return "(?:[^\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})*)?(?:\#(?:[^\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 'table_prefix':
|
||||
@@ -4191,9 +4255,10 @@ function obtain_users_online($item_id = 0, $item = 'forum')
|
||||
*/
|
||||
function obtain_users_online_string($online_users, $item_id = 0, $item = 'forum')
|
||||
{
|
||||
global $config, $db, $user, $auth;
|
||||
global $config, $db, $user, $auth, $phpbb_dispatcher;
|
||||
|
||||
$user_online_link = $online_userlist = '';
|
||||
$guests_online = $hidden_online = $l_online_users = $online_userlist = $visible_online = '';
|
||||
$user_online_link = $rowset = array();
|
||||
// Need caps version of $item for language-strings
|
||||
$item_caps = strtoupper($item);
|
||||
|
||||
@@ -4203,9 +4268,28 @@ function obtain_users_online_string($online_users, $item_id = 0, $item = 'forum'
|
||||
FROM ' . USERS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('user_id', $online_users['online_users']) . '
|
||||
ORDER BY username_clean ASC';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
/**
|
||||
* Modify SQL query to obtain online users data
|
||||
*
|
||||
* @event core.obtain_users_online_string_sql
|
||||
* @var array online_users Array with online users data
|
||||
* from obtain_users_online()
|
||||
* @var int item_id Restrict online users to item id
|
||||
* @var string item Restrict online users to a certain
|
||||
* session item, e.g. forum for
|
||||
* session_forum_id
|
||||
* @var string sql SQL query to obtain users online data
|
||||
* @since 3.1.4-RC1
|
||||
*/
|
||||
$vars = array('online_users', 'item_id', 'item', 'sql');
|
||||
extract($phpbb_dispatcher->trigger_event('core.obtain_users_online_string_sql', compact($vars)));
|
||||
|
||||
$result = $db->sql_query($sql);
|
||||
$rowset = $db->sql_fetchrowset($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
foreach ($rowset as $row)
|
||||
{
|
||||
// User is logged in and therefore not a guest
|
||||
if ($row['user_id'] != ANONYMOUS)
|
||||
@@ -4217,13 +4301,12 @@ function obtain_users_online_string($online_users, $item_id = 0, $item = 'forum'
|
||||
|
||||
if (!isset($online_users['hidden_users'][$row['user_id']]) || $auth->acl_get('u_viewonline'))
|
||||
{
|
||||
$user_online_link = get_username_string(($row['user_type'] <> USER_IGNORE) ? 'full' : 'no_profile', $row['user_id'], $row['username'], $row['user_colour']);
|
||||
$online_userlist .= ($online_userlist != '') ? ', ' . $user_online_link : $user_online_link;
|
||||
$user_online_link[$row['user_id']] = get_username_string(($row['user_type'] <> USER_IGNORE) ? 'full' : 'no_profile', $row['user_id'], $row['username'], $row['user_colour']);
|
||||
}
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
$online_userlist = implode(', ', $user_online_link);
|
||||
|
||||
if (!$online_userlist)
|
||||
{
|
||||
@@ -4256,6 +4339,33 @@ function obtain_users_online_string($online_users, $item_id = 0, $item = 'forum'
|
||||
$l_online_users = $user->lang('ONLINE_USERS_TOTAL', (int) $online_users['total_online'], $visible_online, $hidden_online);
|
||||
}
|
||||
|
||||
/**
|
||||
* Modify online userlist data
|
||||
*
|
||||
* @event core.obtain_users_online_string_modify
|
||||
* @var array online_users Array with online users data
|
||||
* from obtain_users_online()
|
||||
* @var int item_id Restrict online users to item id
|
||||
* @var string item Restrict online users to a certain
|
||||
* session item, e.g. forum for
|
||||
* session_forum_id
|
||||
* @var array rowset Array with online users data
|
||||
* @var array user_online_link Array with online users items (usernames)
|
||||
* @var string online_userlist String containing users online list
|
||||
* @var string l_online_users String with total online users count info
|
||||
* @since 3.1.4-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'online_users',
|
||||
'item_id',
|
||||
'item',
|
||||
'rowset',
|
||||
'user_online_link',
|
||||
'online_userlist',
|
||||
'l_online_users',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.obtain_users_online_string_modify', compact($vars)));
|
||||
|
||||
return array(
|
||||
'online_userlist' => $online_userlist,
|
||||
'l_online_users' => $l_online_users,
|
||||
@@ -4673,13 +4783,14 @@ function phpbb_build_hidden_fields_for_query_params($request, $exclude = null)
|
||||
* @param array $user_row Row from the users table
|
||||
* @param string $alt Optional language string for alt tag within image, can be a language key or text
|
||||
* @param bool $ignore_config Ignores the config-setting, to be still able to view the avatar in the UCP
|
||||
* @param bool $lazy If true, will be lazy loaded (requires JS)
|
||||
*
|
||||
* @return string Avatar html
|
||||
*/
|
||||
function phpbb_get_user_avatar($user_row, $alt = 'USER_AVATAR', $ignore_config = false)
|
||||
function phpbb_get_user_avatar($user_row, $alt = 'USER_AVATAR', $ignore_config = false, $lazy = false)
|
||||
{
|
||||
$row = \phpbb\avatar\manager::clean_row($user_row, 'user');
|
||||
return phpbb_get_avatar($row, $alt, $ignore_config);
|
||||
return phpbb_get_avatar($row, $alt, $ignore_config, $lazy);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4688,13 +4799,14 @@ function phpbb_get_user_avatar($user_row, $alt = 'USER_AVATAR', $ignore_config =
|
||||
* @param array $group_row Row from the groups table
|
||||
* @param string $alt Optional language string for alt tag within image, can be a language key or text
|
||||
* @param bool $ignore_config Ignores the config-setting, to be still able to view the avatar in the UCP
|
||||
* @param bool $lazy If true, will be lazy loaded (requires JS)
|
||||
*
|
||||
* @return string Avatar html
|
||||
*/
|
||||
function phpbb_get_group_avatar($user_row, $alt = 'GROUP_AVATAR', $ignore_config = false)
|
||||
function phpbb_get_group_avatar($user_row, $alt = 'GROUP_AVATAR', $ignore_config = false, $lazy = false)
|
||||
{
|
||||
$row = \phpbb\avatar\manager::clean_row($user_row, 'group');
|
||||
return phpbb_get_avatar($row, $alt, $ignore_config);
|
||||
return phpbb_get_avatar($row, $alt, $ignore_config, $lazy);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4703,14 +4815,15 @@ function phpbb_get_group_avatar($user_row, $alt = 'GROUP_AVATAR', $ignore_config
|
||||
* @param array $row Row cleaned by \phpbb\avatar\manager::clean_row
|
||||
* @param string $alt Optional language string for alt tag within image, can be a language key or text
|
||||
* @param bool $ignore_config Ignores the config-setting, to be still able to view the avatar in the UCP
|
||||
* @param bool $lazy If true, will be lazy loaded (requires JS)
|
||||
*
|
||||
* @return string Avatar html
|
||||
*/
|
||||
function phpbb_get_avatar($row, $alt, $ignore_config = false)
|
||||
function phpbb_get_avatar($row, $alt, $ignore_config = false, $lazy = false)
|
||||
{
|
||||
global $user, $config, $cache, $phpbb_root_path, $phpEx;
|
||||
global $request;
|
||||
global $phpbb_container;
|
||||
global $phpbb_container, $phpbb_dispatcher;
|
||||
|
||||
if (!$config['allow_avatar'] && !$ignore_config)
|
||||
{
|
||||
@@ -4744,12 +4857,47 @@ function phpbb_get_avatar($row, $alt, $ignore_config = false)
|
||||
|
||||
if (!empty($avatar_data['src']))
|
||||
{
|
||||
$html = '<img src="' . $avatar_data['src'] . '" ' .
|
||||
if ($lazy)
|
||||
{
|
||||
// Determine board url - we may need it later
|
||||
$board_url = generate_board_url() . '/';
|
||||
// This path is sent with the base template paths in the assign_vars()
|
||||
// call below. We need to correct it in case we are accessing from a
|
||||
// controller because the web paths will be incorrect otherwise.
|
||||
$phpbb_path_helper = $phpbb_container->get('path_helper');
|
||||
$corrected_path = $phpbb_path_helper->get_web_root_path();
|
||||
|
||||
$web_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? $board_url : $corrected_path;
|
||||
|
||||
$theme = "{$web_path}styles/" . rawurlencode($user->style['style_path']) . '/theme';
|
||||
|
||||
$src = 'src="' . $theme . '/images/no_avatar.gif" data-src="' . $avatar_data['src'] . '"';
|
||||
}
|
||||
else
|
||||
{
|
||||
$src = 'src="' . $avatar_data['src'] . '"';
|
||||
}
|
||||
|
||||
$html = '<img class="avatar" ' . $src . ' ' .
|
||||
($avatar_data['width'] ? ('width="' . $avatar_data['width'] . '" ') : '') .
|
||||
($avatar_data['height'] ? ('height="' . $avatar_data['height'] . '" ') : '') .
|
||||
'alt="' . ((!empty($user->lang[$alt])) ? $user->lang[$alt] : $alt) . '" />';
|
||||
}
|
||||
|
||||
/**
|
||||
* Event to modify HTML <img> tag of avatar
|
||||
*
|
||||
* @event core.get_avatar_after
|
||||
* @var array row Row cleaned by \phpbb\avatar\manager::clean_row
|
||||
* @var string alt Optional language string for alt tag within image, can be a language key or text
|
||||
* @var bool ignore_config Ignores the config-setting, to be still able to view the avatar in the UCP
|
||||
* @var array avatar_data The HTML attributes for avatar <img> tag
|
||||
* @var string html The HTML <img> tag of generated avatar
|
||||
* @since 3.1.6-RC1
|
||||
*/
|
||||
$vars = array('row', 'alt', 'ignore_config', 'avatar_data', 'html');
|
||||
extract($phpbb_dispatcher->trigger_event('core.get_avatar_after', compact($vars)));
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
|
@@ -245,8 +245,13 @@ function build_cfg_template($tpl_type, $key, &$new, $config_key, $vars)
|
||||
|
||||
switch ($tpl_type[0])
|
||||
{
|
||||
case 'text':
|
||||
case 'password':
|
||||
if ($new[$config_key] !== '')
|
||||
{
|
||||
// replace passwords with asterixes
|
||||
$new[$config_key] = '********';
|
||||
}
|
||||
case 'text':
|
||||
case 'url':
|
||||
case 'email':
|
||||
case 'color':
|
||||
@@ -550,6 +555,9 @@ 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':
|
||||
@@ -568,20 +576,22 @@ function validate_config_vars($config_vars, &$cfg_array, &$error)
|
||||
break;
|
||||
}
|
||||
|
||||
if (!file_exists($phpbb_root_path . $cfg_array[$config_name]))
|
||||
$path = in_array($config_definition['validate'], array('wpath', 'path', 'rpath', 'rwpath')) ? $phpbb_root_path . $cfg_array[$config_name] : $cfg_array[$config_name];
|
||||
|
||||
if (!file_exists($path))
|
||||
{
|
||||
$error[] = sprintf($user->lang['DIRECTORY_DOES_NOT_EXIST'], $cfg_array[$config_name]);
|
||||
}
|
||||
|
||||
if (file_exists($phpbb_root_path . $cfg_array[$config_name]) && !is_dir($phpbb_root_path . $cfg_array[$config_name]))
|
||||
if (file_exists($path) && !is_dir($path))
|
||||
{
|
||||
$error[] = sprintf($user->lang['DIRECTORY_NOT_DIR'], $cfg_array[$config_name]);
|
||||
}
|
||||
|
||||
// Check if the path is writable
|
||||
if ($config_definition['validate'] == 'wpath' || $config_definition['validate'] == 'rwpath')
|
||||
if ($config_definition['validate'] == 'wpath' || $config_definition['validate'] == 'rwpath' || $config_definition['validate'] === 'absolute_path_writable')
|
||||
{
|
||||
if (file_exists($phpbb_root_path . $cfg_array[$config_name]) && !phpbb_is_writable($phpbb_root_path . $cfg_array[$config_name]))
|
||||
if (file_exists($path) && !phpbb_is_writable($path))
|
||||
{
|
||||
$error[] = sprintf($user->lang['DIRECTORY_NOT_WRITABLE'], $cfg_array[$config_name]);
|
||||
}
|
||||
|
@@ -500,7 +500,7 @@ function filelist($rootdir, $dir = '', $type = 'gif|jpg|jpeg|png')
|
||||
*/
|
||||
function move_topics($topic_ids, $forum_id, $auto_sync = true)
|
||||
{
|
||||
global $db;
|
||||
global $db, $phpbb_dispatcher;
|
||||
|
||||
if (empty($topic_ids))
|
||||
{
|
||||
@@ -534,6 +534,27 @@ function move_topics($topic_ids, $forum_id, $auto_sync = true)
|
||||
}
|
||||
|
||||
$table_ary = array(TOPICS_TABLE, POSTS_TABLE, LOG_TABLE, DRAFTS_TABLE, TOPICS_TRACK_TABLE);
|
||||
|
||||
/**
|
||||
* Perform additional actions before topics move
|
||||
*
|
||||
* @event core.move_topics_before_query
|
||||
* @var array table_ary Array of tables from which forum_id will be updated for all rows that hold the moved topics
|
||||
* @var array topic_ids Array of the moved topic ids
|
||||
* @var string forum_id The forum id from where the topics are moved
|
||||
* @var array forum_ids Array of the forums where the topics are moving (includes also forum_id)
|
||||
* @var bool auto_sync Whether or not to perform auto sync
|
||||
* @since 3.1.5-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'table_ary',
|
||||
'topic_ids',
|
||||
'forum_id',
|
||||
'forum_ids',
|
||||
'auto_sync',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.move_topics_before_query', compact($vars)));
|
||||
|
||||
foreach ($table_ary as $table)
|
||||
{
|
||||
$sql = "UPDATE $table
|
||||
@@ -618,7 +639,7 @@ function move_posts($post_ids, $topic_id, $auto_sync = true)
|
||||
*/
|
||||
function delete_topics($where_type, $where_ids, $auto_sync = true, $post_count_sync = true, $call_delete_posts = true)
|
||||
{
|
||||
global $db, $config, $phpbb_container;
|
||||
global $db, $config, $phpbb_container, $phpbb_dispatcher;
|
||||
|
||||
$approved_topics = 0;
|
||||
$forum_ids = $topic_ids = array();
|
||||
@@ -672,6 +693,20 @@ function delete_topics($where_type, $where_ids, $auto_sync = true, $post_count_s
|
||||
|
||||
$table_ary = array(BOOKMARKS_TABLE, TOPICS_TRACK_TABLE, TOPICS_POSTED_TABLE, POLL_VOTES_TABLE, POLL_OPTIONS_TABLE, TOPICS_WATCH_TABLE, TOPICS_TABLE);
|
||||
|
||||
/**
|
||||
* Perform additional actions before topic(s) deletion
|
||||
*
|
||||
* @event core.delete_topics_before_query
|
||||
* @var array table_ary Array of tables from which all rows will be deleted that hold a topic_id occuring in topic_ids
|
||||
* @var array topic_ids Array of topic ids to delete
|
||||
* @since 3.1.4-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'table_ary',
|
||||
'topic_ids',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.delete_topics_before_query', compact($vars)));
|
||||
|
||||
foreach ($table_ary as $table)
|
||||
{
|
||||
$sql = "DELETE FROM $table
|
||||
@@ -680,6 +715,18 @@ function delete_topics($where_type, $where_ids, $auto_sync = true, $post_count_s
|
||||
}
|
||||
unset($table_ary);
|
||||
|
||||
/**
|
||||
* Perform additional actions after topic(s) deletion
|
||||
*
|
||||
* @event core.delete_topics_after_query
|
||||
* @var array topic_ids Array of topic ids that were deleted
|
||||
* @since 3.1.4-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'topic_ids',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.delete_topics_after_query', compact($vars)));
|
||||
|
||||
$moved_topic_ids = array();
|
||||
|
||||
// update the other forums
|
||||
@@ -894,7 +941,7 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
|
||||
}
|
||||
|
||||
$error = false;
|
||||
$search = new $search_type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user);
|
||||
$search = new $search_type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user, $phpbb_dispatcher);
|
||||
|
||||
if ($error)
|
||||
{
|
||||
@@ -2311,7 +2358,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
*/
|
||||
function prune($forum_id, $prune_mode, $prune_date, $prune_flags = 0, $auto_sync = true)
|
||||
{
|
||||
global $db;
|
||||
global $db, $phpbb_dispatcher;
|
||||
|
||||
if (!is_array($forum_id))
|
||||
{
|
||||
@@ -2351,6 +2398,21 @@ function prune($forum_id, $prune_mode, $prune_date, $prune_flags = 0, $auto_sync
|
||||
$sql_and .= ' AND topic_status = ' . ITEM_MOVED . " AND topic_last_post_time < $prune_date";
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this event to modify the SQL that selects topics to be pruned
|
||||
*
|
||||
* @event core.prune_sql
|
||||
* @var string forum_id The forum id
|
||||
* @var string prune_mode The prune mode
|
||||
* @var string prune_date The prune date
|
||||
* @var int prune_flags The prune flags
|
||||
* @var bool auto_sync Whether or not to perform auto sync
|
||||
* @var string sql_and SQL text appended to where clause
|
||||
* @since 3.1.3-RC1
|
||||
*/
|
||||
$vars = array('forum_id', 'prune_mode', 'prune_date', 'prune_flags', 'auto_sync', 'sql_and');
|
||||
extract($phpbb_dispatcher->trigger_event('core.prune_sql', compact($vars)));
|
||||
|
||||
$sql = 'SELECT topic_id
|
||||
FROM ' . TOPICS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('forum_id', $forum_id) . "
|
||||
|
@@ -30,10 +30,11 @@ if (!defined('IN_PHPBB'))
|
||||
* @param string $avatar_height Height of users avatar
|
||||
* @param string $alt Optional language string for alt tag within image, can be a language key or text
|
||||
* @param bool $ignore_config Ignores the config-setting, to be still able to view the avatar in the UCP
|
||||
* @param bool $lazy If true, will be lazy loaded (requires JS)
|
||||
*
|
||||
* @return string Avatar image
|
||||
*/
|
||||
function get_user_avatar($avatar, $avatar_type, $avatar_width, $avatar_height, $alt = 'USER_AVATAR', $ignore_config = false)
|
||||
function get_user_avatar($avatar, $avatar_type, $avatar_width, $avatar_height, $alt = 'USER_AVATAR', $ignore_config = false, $lazy = false)
|
||||
{
|
||||
// map arguments to new function phpbb_get_avatar()
|
||||
$row = array(
|
||||
@@ -43,7 +44,7 @@ function get_user_avatar($avatar, $avatar_type, $avatar_width, $avatar_height, $
|
||||
'avatar_height' => $avatar_height,
|
||||
);
|
||||
|
||||
return phpbb_get_avatar($row, $alt, $ignore_config);
|
||||
return phpbb_get_avatar($row, $alt, $ignore_config, $lazy);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -78,7 +78,7 @@ function gen_sort_selects(&$limit_days, &$sort_by_text, &$sort_days, &$sort_key,
|
||||
foreach ($sorts as $name => $sort_ary)
|
||||
{
|
||||
$key = $sort_ary['key'];
|
||||
$selected = $$sort_ary['key'];
|
||||
$selected = ${$sort_ary['key']};
|
||||
|
||||
// Check if the key is selectable. If not, we reset to the default or first key found.
|
||||
// This ensures the values are always valid. We also set $sort_dir/sort_key/etc. to the
|
||||
@@ -87,12 +87,12 @@ function gen_sort_selects(&$limit_days, &$sort_by_text, &$sort_days, &$sort_key,
|
||||
{
|
||||
if ($sort_ary['default'] !== false)
|
||||
{
|
||||
$selected = $$key = $sort_ary['default'];
|
||||
$selected = ${$key} = $sort_ary['default'];
|
||||
}
|
||||
else
|
||||
{
|
||||
@reset($sort_ary['options']);
|
||||
$selected = $$key = key($sort_ary['options']);
|
||||
$selected = ${$key} = key($sort_ary['options']);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -966,7 +966,7 @@ function get_remote_avatar_dim($src, $axis)
|
||||
$protocol = (isset($url_info['scheme'])) ? $url_info['scheme'] : 'http';
|
||||
if (empty($port))
|
||||
{
|
||||
switch(strtolower($protocol))
|
||||
switch (strtolower($protocol))
|
||||
{
|
||||
case 'ftp':
|
||||
$port = 21;
|
||||
@@ -2148,6 +2148,7 @@ function fix_empty_primary_groups()
|
||||
}
|
||||
|
||||
$sql = 'SELECT user_id FROM ' . USER_GROUP_TABLE . ' WHERE group_id = ' . get_group_id('global_moderators');
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$user_ids = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
|
@@ -150,7 +150,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||
$sql = $db->sql_build_query('SELECT', $sql_ary);
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$forum_tracking_info = array();
|
||||
$forum_tracking_info = $valid_categories = array();
|
||||
$branch_root_id = $root_data['forum_id'];
|
||||
|
||||
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
|
||||
@@ -250,6 +250,12 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||
}
|
||||
}
|
||||
|
||||
// Fill list of categories with forums
|
||||
if (isset($forum_rows[$row['parent_id']]))
|
||||
{
|
||||
$valid_categories[$row['parent_id']] = true;
|
||||
}
|
||||
|
||||
//
|
||||
if ($row['parent_id'] == $root_data['forum_id'] || $row['parent_id'] == $branch_root_id)
|
||||
{
|
||||
@@ -267,6 +273,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||
$branch_root_id = $forum_id;
|
||||
}
|
||||
$forum_rows[$parent_id]['forum_id_last_post'] = $row['forum_id'];
|
||||
$forum_rows[$parent_id]['forum_password_last_post'] = $row['forum_password'];
|
||||
$forum_rows[$parent_id]['orig_forum_last_post_time'] = $row['forum_last_post_time'];
|
||||
}
|
||||
else if ($row['forum_type'] != FORUM_CAT)
|
||||
@@ -308,6 +315,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||
$forum_rows[$parent_id]['forum_last_poster_name'] = $row['forum_last_poster_name'];
|
||||
$forum_rows[$parent_id]['forum_last_poster_colour'] = $row['forum_last_poster_colour'];
|
||||
$forum_rows[$parent_id]['forum_id_last_post'] = $forum_id;
|
||||
$forum_rows[$parent_id]['forum_password_last_post'] = $row['forum_password'];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -375,6 +383,28 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||
get_moderators($forum_moderators, $forum_ids_moderator);
|
||||
}
|
||||
|
||||
/**
|
||||
* Event to perform additional actions before the forum list is being generated
|
||||
*
|
||||
* @event core.display_forums_before
|
||||
* @var array active_forum_ary Array with forum data to display active topics
|
||||
* @var bool display_moderators Flag indicating if we display forum moderators
|
||||
* @var array forum_moderators Array with forum moderators list
|
||||
* @var array forum_rows Data array of all forums we display
|
||||
* @var bool return_moderators Flag indicating if moderators list should be returned
|
||||
* @var array root_data Array with the root forum data
|
||||
* @since 3.1.4-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'active_forum_ary',
|
||||
'display_moderators',
|
||||
'forum_moderators',
|
||||
'forum_rows',
|
||||
'return_moderators',
|
||||
'root_data',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.display_forums_before', compact($vars)));
|
||||
|
||||
// Used to tell whatever we have to create a dummy category or not.
|
||||
$last_catless = true;
|
||||
foreach ($forum_rows as $row)
|
||||
@@ -382,6 +412,12 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||
// Category
|
||||
if ($row['parent_id'] == $root_data['forum_id'] && $row['forum_type'] == FORUM_CAT)
|
||||
{
|
||||
// Do not display categories without any forums to display
|
||||
if (!isset($valid_categories[$row['forum_id']]))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$cat_row = array(
|
||||
'S_IS_CAT' => true,
|
||||
'FORUM_ID' => $row['forum_id'],
|
||||
@@ -500,8 +536,15 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||
// Create last post link information, if appropriate
|
||||
if ($row['forum_last_post_id'])
|
||||
{
|
||||
$last_post_subject = $row['forum_last_post_subject'];
|
||||
$last_post_subject_truncated = truncate_string(censor_text($last_post_subject), 30, 255, false, $user->lang['ELLIPSIS']);
|
||||
if ($row['forum_password_last_post'] === '' && $auth->acl_get('f_read', $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']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$last_post_subject = $last_post_subject_truncated = '';
|
||||
}
|
||||
$last_post_time = $user->format_date($row['forum_last_post_time']);
|
||||
$last_post_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id_last_post'] . '&p=' . $row['forum_last_post_id']) . '#p' . $row['forum_last_post_id'];
|
||||
}
|
||||
@@ -561,7 +604,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||
'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_DISPLAY_SUBJECT' => ($last_post_subject && $config['display_last_subject'] && !$row['forum_password'] && $auth->acl_get('f_read', $row['forum_id'])) ? 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,
|
||||
|
||||
'FORUM_ID' => $row['forum_id'],
|
||||
@@ -574,8 +617,8 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||
'FORUM_FOLDER_IMG_ALT' => isset($user->lang[$folder_alt]) ? $user->lang[$folder_alt] : '',
|
||||
'FORUM_IMAGE' => ($row['forum_image']) ? '<img src="' . $phpbb_root_path . $row['forum_image'] . '" alt="' . $user->lang[$folder_alt] . '" />' : '',
|
||||
'FORUM_IMAGE_SRC' => ($row['forum_image']) ? $phpbb_root_path . $row['forum_image'] : '',
|
||||
'LAST_POST_SUBJECT' => (!$row['forum_password'] && $auth->acl_get('f_read', $row['forum_id'])) ? censor_text($last_post_subject) : "",
|
||||
'LAST_POST_SUBJECT_TRUNCATED' => (!$row['forum_password'] && $auth->acl_get('f_read', $row['forum_id'])) ? $last_post_subject_truncated : "",
|
||||
'LAST_POST_SUBJECT' => $last_post_subject,
|
||||
'LAST_POST_SUBJECT_TRUNCATED' => $last_post_subject_truncated,
|
||||
'LAST_POST_TIME' => $last_post_time,
|
||||
'LAST_POSTER' => get_username_string('username', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
|
||||
'LAST_POSTER_COLOUR' => get_username_string('colour', $row['forum_last_poster_id'], $row['forum_last_poster_name'], $row['forum_last_poster_colour']),
|
||||
@@ -710,13 +753,15 @@ function generate_forum_rules(&$forum_data)
|
||||
function generate_forum_nav(&$forum_data)
|
||||
{
|
||||
global $db, $user, $template, $auth, $config;
|
||||
global $phpEx, $phpbb_root_path;
|
||||
global $phpEx, $phpbb_root_path, $phpbb_dispatcher;
|
||||
|
||||
if (!$auth->acl_get('f_list', $forum_data['forum_id']))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$navlinks = $navlinks_parents = $forum_template_data = array();
|
||||
|
||||
// Get forum parents
|
||||
$forum_parents = get_forum_parents($forum_data);
|
||||
|
||||
@@ -735,35 +780,59 @@ function generate_forum_nav(&$forum_data)
|
||||
continue;
|
||||
}
|
||||
|
||||
$template->assign_block_vars('navlinks', array(
|
||||
$navlinks_parents[] = array(
|
||||
'S_IS_CAT' => ($parent_type == FORUM_CAT) ? true : false,
|
||||
'S_IS_LINK' => ($parent_type == FORUM_LINK) ? true : false,
|
||||
'S_IS_POST' => ($parent_type == FORUM_POST) ? true : false,
|
||||
'FORUM_NAME' => $parent_name,
|
||||
'FORUM_ID' => $parent_forum_id,
|
||||
'MICRODATA' => $microdata_attr . '="' . $parent_forum_id . '"',
|
||||
'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $parent_forum_id))
|
||||
'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $parent_forum_id),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$template->assign_block_vars('navlinks', array(
|
||||
$navlinks = array(
|
||||
'S_IS_CAT' => ($forum_data['forum_type'] == FORUM_CAT) ? true : false,
|
||||
'S_IS_LINK' => ($forum_data['forum_type'] == FORUM_LINK) ? true : false,
|
||||
'S_IS_POST' => ($forum_data['forum_type'] == FORUM_POST) ? true : false,
|
||||
'FORUM_NAME' => $forum_data['forum_name'],
|
||||
'FORUM_ID' => $forum_data['forum_id'],
|
||||
'MICRODATA' => $microdata_attr . '="' . $forum_data['forum_id'] . '"',
|
||||
'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_data['forum_id']))
|
||||
'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_data['forum_id']),
|
||||
);
|
||||
|
||||
$template->assign_vars(array(
|
||||
$forum_template_data = array(
|
||||
'FORUM_ID' => $forum_data['forum_id'],
|
||||
'FORUM_NAME' => $forum_data['forum_name'],
|
||||
'FORUM_DESC' => generate_text_for_display($forum_data['forum_desc'], $forum_data['forum_desc_uid'], $forum_data['forum_desc_bitfield'], $forum_data['forum_desc_options']),
|
||||
|
||||
'S_ENABLE_FEEDS_FORUM' => ($config['feed_forum'] && $forum_data['forum_type'] == FORUM_POST && !phpbb_optionget(FORUM_OPTION_FEED_EXCLUDE, $forum_data['forum_options'])) ? true : false,
|
||||
));
|
||||
);
|
||||
|
||||
/**
|
||||
* Event to modify the navlinks text
|
||||
*
|
||||
* @event core.generate_forum_nav
|
||||
* @var array forum_data Array with the forum data
|
||||
* @var array forum_template_data Array with generic forum template data
|
||||
* @var string microdata_attr The microdata attribute
|
||||
* @var array navlinks_parents Array with the forum parents navlinks data
|
||||
* @var array navlinks Array with the forum navlinks data
|
||||
* @since 3.1.5-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'forum_data',
|
||||
'forum_template_data',
|
||||
'microdata_attr',
|
||||
'navlinks_parents',
|
||||
'navlinks',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.generate_forum_nav', compact($vars)));
|
||||
|
||||
$template->assign_block_vars_array('navlinks', $navlinks_parents);
|
||||
$template->assign_block_vars('navlinks', $navlinks);
|
||||
$template->assign_vars($forum_template_data);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@@ -210,11 +210,6 @@ function send_file_to_browser($attachment, $upload_dir, $category)
|
||||
}
|
||||
}
|
||||
|
||||
if ($size)
|
||||
{
|
||||
header("Content-Length: $size");
|
||||
}
|
||||
|
||||
// Close the db connection before sending the file etc.
|
||||
file_gc(false);
|
||||
|
||||
@@ -238,6 +233,11 @@ function send_file_to_browser($attachment, $upload_dir, $category)
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($size)
|
||||
{
|
||||
header("Content-Length: $size");
|
||||
}
|
||||
|
||||
// Try to deliver in chunks
|
||||
@set_time_limit(0);
|
||||
|
||||
|
@@ -368,7 +368,7 @@ function phpbb_get_pm_data($pm_ids)
|
||||
*/
|
||||
function phpbb_mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql, &$sort_order_sql, &$total, $forum_id = 0, $topic_id = 0, $where_sql = 'WHERE')
|
||||
{
|
||||
global $db, $user, $auth, $template;
|
||||
global $db, $user, $auth, $template, $phpbb_dispatcher;
|
||||
|
||||
$sort_days = request_var('st', 0);
|
||||
$min_time = ($sort_days) ? time() - ($sort_days * 86400) : 0;
|
||||
@@ -553,6 +553,56 @@ function phpbb_mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by
|
||||
break;
|
||||
}
|
||||
|
||||
// Default total to -1 to allow editing by the event
|
||||
$total = -1;
|
||||
|
||||
/**
|
||||
* This event allows you to control the SQL query used to get the total number
|
||||
* of reports the user can access.
|
||||
*
|
||||
* This total is used for the pagination and for displaying the total number
|
||||
* of reports to the user
|
||||
*
|
||||
*
|
||||
* @event core.mcp_sorting_query_before
|
||||
* @var string sql The current SQL search string
|
||||
* @var string mode An id related to the module(s) the user is viewing
|
||||
* @var string type Which kind of information is this being used for displaying. Posts, topics, etc...
|
||||
* @var int forum_id The forum id of the posts the user is trying to access, if not 0
|
||||
* @var int topic_id The topic id of the posts the user is trying to access, if not 0
|
||||
* @var int sort_days The max age of the oldest report to be shown, in days
|
||||
* @var string sort_key The way the user has decided to sort the data.
|
||||
* The valid values must be in the keys of the sort_by_* variables
|
||||
* @var string sort_dir Either 'd' for "DESC" or 'a' for 'ASC' in the SQL query
|
||||
* @var int limit_days The possible max ages of the oldest report for the user to choose, in days.
|
||||
* @var array sort_by_sql SQL text (values) for the possible names of the ways of sorting data (keys).
|
||||
* @var array sort_by_text Language text (values) for the possible names of the ways of sorting data (keys).
|
||||
* @var int min_time Integer with the minimum post time that the user is searching for
|
||||
* @var int limit_time_sql Time limiting options used in the SQL query.
|
||||
* @var int total The total number of reports that exist. Only set if you want to override the result
|
||||
* @var string where_sql Extra information included in the WHERE clause. It must end with "WHERE" or "AND" or "OR".
|
||||
* Set to "WHERE" and set total above -1 to override the total value
|
||||
* @since 3.1.4-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'sql',
|
||||
'mode',
|
||||
'type',
|
||||
'forum_id',
|
||||
'topic_id',
|
||||
'sort_days',
|
||||
'sort_key',
|
||||
'sort_dir',
|
||||
'limit_days',
|
||||
'sort_by_sql',
|
||||
'sort_by_text',
|
||||
'min_time',
|
||||
'limit_time_sql',
|
||||
'total',
|
||||
'where_sql',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.mcp_sorting_query_before', compact($vars)));
|
||||
|
||||
if (!isset($sort_by_sql[$sort_key]))
|
||||
{
|
||||
$sort_key = $default_key;
|
||||
@@ -584,7 +634,7 @@ function phpbb_mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by
|
||||
$total = (int) $db->sql_fetchfield('total');
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
else
|
||||
else if ($total < -1)
|
||||
{
|
||||
$total = -1;
|
||||
}
|
||||
|
@@ -510,7 +510,7 @@ class messenger
|
||||
|
||||
foreach ($address_ary as $which_ary)
|
||||
{
|
||||
$$type .= (($$type != '') ? ', ' : '') . (($which_ary['name'] != '') ? mail_encode($which_ary['name'], $encode_eol) . ' <' . $which_ary['email'] . '>' : $which_ary['email']);
|
||||
${$type} .= ((${$type} != '') ? ', ' : '') . (($which_ary['name'] != '') ? mail_encode($which_ary['name'], $encode_eol) . ' <' . $which_ary['email'] . '>' : $which_ary['email']);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -976,7 +976,7 @@ class p_master
|
||||
*
|
||||
* @param string $class module class (acp/mcp/ucp)
|
||||
* @param string $name module name (class name of the module, or its basename
|
||||
* phpbb_ext_foo_acp_bar_module, ucp_zebra or zebra)
|
||||
* phpbb_ext_foo_acp_bar_module, ucp_zebra or zebra)
|
||||
* @param string $mode mode, as passed through to the module
|
||||
*
|
||||
*/
|
||||
@@ -1086,7 +1086,7 @@ class p_master
|
||||
->core_path('language/' . $user->lang_name . '/mods/')
|
||||
->find();
|
||||
|
||||
$lang_files = array_unique(array_merge($user_lang_files, $english_lang_files, $default_lang_files));
|
||||
$lang_files = array_merge($english_lang_files, $default_lang_files, $user_lang_files);
|
||||
foreach ($lang_files as $lang_file => $ext_name)
|
||||
{
|
||||
$user->add_lang_ext($ext_name, $lang_file);
|
||||
|
@@ -1036,8 +1036,8 @@ function load_drafts($topic_id = 0, $forum_id = 0, $id = 0, $pm_action = '', $ms
|
||||
*/
|
||||
function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id = 0, $show_quote_button = true)
|
||||
{
|
||||
global $user, $auth, $db, $template, $bbcode, $cache;
|
||||
global $config, $phpbb_root_path, $phpEx, $phpbb_container;
|
||||
global $user, $auth, $db, $template, $cache;
|
||||
global $config, $phpbb_root_path, $phpEx, $phpbb_container, $phpbb_dispatcher;
|
||||
|
||||
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
|
||||
$sql_sort = ($mode == 'post_review') ? 'ASC' : 'DESC';
|
||||
@@ -1094,13 +1094,11 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
|
||||
$sql = $db->sql_build_query('SELECT', $sql_ary);
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$bbcode_bitfield = '';
|
||||
$rowset = array();
|
||||
$has_attachments = false;
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$rowset[$row['post_id']] = $row;
|
||||
$bbcode_bitfield = $bbcode_bitfield | base64_decode($row['bbcode_bitfield']);
|
||||
|
||||
if ($row['post_attachment'])
|
||||
{
|
||||
@@ -1109,13 +1107,6 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// Instantiate BBCode class
|
||||
if (!isset($bbcode) && $bbcode_bitfield !== '')
|
||||
{
|
||||
include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);
|
||||
$bbcode = new bbcode(base64_encode($bbcode_bitfield));
|
||||
}
|
||||
|
||||
// Grab extensions
|
||||
$extensions = $attachments = array();
|
||||
if ($has_attachments && $auth->acl_get('u_download') && $auth->acl_get('f_download', $forum_id))
|
||||
@@ -1176,7 +1167,7 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
|
||||
$post_anchor = ($mode == 'post_review') ? 'ppr' . $row['post_id'] : 'pr' . $row['post_id'];
|
||||
$u_show_post = append_sid($phpbb_root_path . 'viewtopic.' . $phpEx, "f=$forum_id&t=$topic_id&p={$row['post_id']}&view=show#p{$row['post_id']}");
|
||||
|
||||
$template->assign_block_vars($mode . '_row', array(
|
||||
$post_row = array(
|
||||
'POST_AUTHOR_FULL' => get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
|
||||
'POST_AUTHOR_COLOUR' => get_username_string('colour', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
|
||||
'POST_AUTHOR' => get_username_string('username', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
|
||||
@@ -1195,9 +1186,37 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
|
||||
'POST_ID' => $row['post_id'],
|
||||
'U_MINI_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'p=' . $row['post_id']) . '#p' . $row['post_id'],
|
||||
'U_MCP_DETAILS' => ($auth->acl_get('m_info', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&mode=post_details&f=' . $forum_id . '&p=' . $row['post_id'], true, $user->session_id) : '',
|
||||
'POSTER_QUOTE' => ($show_quote_button && $auth->acl_get('f_reply', $forum_id)) ? addslashes(get_username_string('username', $poster_id, $row['username'], $row['user_colour'], $row['post_username'])) : '')
|
||||
'POSTER_QUOTE' => ($show_quote_button && $auth->acl_get('f_reply', $forum_id)) ? addslashes(get_username_string('username', $poster_id, $row['username'], $row['user_colour'], $row['post_username'])) : '',
|
||||
);
|
||||
|
||||
$current_row_number = $i;
|
||||
|
||||
/**
|
||||
* Event to modify the template data block for topic reviews
|
||||
*
|
||||
* @event core.topic_review_modify_row
|
||||
* @var string mode The review mode
|
||||
* @var int topic_id The topic that is being reviewed
|
||||
* @var int forum_id The topic's forum
|
||||
* @var int cur_post_id Post offset id
|
||||
* @var int current_row_number Number of the current row being iterated
|
||||
* @var array post_row Template block array of the current post
|
||||
* @var array row Array with original post and user data
|
||||
* @since 3.1.4-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'mode',
|
||||
'topic_id',
|
||||
'forum_id',
|
||||
'cur_post_id',
|
||||
'current_row_number',
|
||||
'post_row',
|
||||
'row',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.topic_review_modify_row', compact($vars)));
|
||||
|
||||
$template->assign_block_vars($mode . '_row', $post_row);
|
||||
|
||||
// Display not already displayed Attachments for this post, we already parsed them. ;)
|
||||
if (!empty($attachments[$row['post_id']]))
|
||||
{
|
||||
@@ -1523,7 +1542,14 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
||||
return false;
|
||||
}
|
||||
|
||||
$current_time = time();
|
||||
if (!empty($data['post_time']))
|
||||
{
|
||||
$current_time = $data['post_time'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$current_time = time();
|
||||
}
|
||||
|
||||
if ($mode == 'post')
|
||||
{
|
||||
@@ -1719,6 +1745,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
||||
'topic_type' => $topic_type,
|
||||
'topic_time_limit' => ($topic_type == POST_STICKY || $topic_type == POST_ANNOUNCE) ? ($data['topic_time_limit'] * 86400) : 0,
|
||||
'topic_attachment' => (!empty($data['attachment_data'])) ? 1 : 0,
|
||||
'topic_status' => (isset($data['topic_status'])) ? $data['topic_status'] : ITEM_UNLOCKED,
|
||||
);
|
||||
|
||||
if (isset($poll['poll_options']) && !empty($poll['poll_options']))
|
||||
@@ -1825,6 +1852,30 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
||||
break;
|
||||
}
|
||||
|
||||
/**
|
||||
* Modify sql query data for post submitting
|
||||
*
|
||||
* @event core.submit_post_modify_sql_data
|
||||
* @var array data Array with the data for the post
|
||||
* @var array poll Array with the poll data for the post
|
||||
* @var string post_mode Variable containing posting mode value
|
||||
* @var bool sql_data Array with the data for the posting SQL query
|
||||
* @var string subject Variable containing post subject value
|
||||
* @var int topic_type Variable containing topic type value
|
||||
* @var string username Variable containing post author name
|
||||
* @since 3.1.3-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'data',
|
||||
'poll',
|
||||
'post_mode',
|
||||
'sql_data',
|
||||
'subject',
|
||||
'topic_type',
|
||||
'username',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.submit_post_modify_sql_data', compact($vars)));
|
||||
|
||||
// Submit new topic
|
||||
if ($post_mode == 'post')
|
||||
{
|
||||
@@ -2166,7 +2217,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
||||
}
|
||||
|
||||
$error = false;
|
||||
$search = new $search_type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user);
|
||||
$search = new $search_type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user, $phpbb_dispatcher);
|
||||
|
||||
if ($error)
|
||||
{
|
||||
|
@@ -1415,9 +1415,9 @@ function rebuild_header($check_ary)
|
||||
$_types = array('u', 'g');
|
||||
foreach ($_types as $type)
|
||||
{
|
||||
if (sizeof($$type))
|
||||
if (sizeof(${$type}))
|
||||
{
|
||||
foreach ($$type as $id)
|
||||
foreach (${$type} as $id)
|
||||
{
|
||||
$address[$type][$id] = $check_type;
|
||||
}
|
||||
@@ -1957,7 +1957,7 @@ function submit_pm($mode, $subject, &$data, $put_in_outbox = true)
|
||||
*/
|
||||
function message_history($msg_id, $user_id, $message_row, $folder, $in_post_mode = false)
|
||||
{
|
||||
global $db, $user, $config, $template, $phpbb_root_path, $phpEx, $auth, $bbcode;
|
||||
global $db, $user, $config, $template, $phpbb_root_path, $phpEx, $auth;
|
||||
|
||||
// Select all receipts and the author from the pm we currently view, to only display their pm-history
|
||||
$sql = 'SELECT author_id, user_id
|
||||
@@ -2009,7 +2009,6 @@ function message_history($msg_id, $user_id, $message_row, $folder, $in_post_mode
|
||||
$title = $row['message_subject'];
|
||||
|
||||
$rowset = array();
|
||||
$bbcode_bitfield = '';
|
||||
$folder_url = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm') . '&folder=';
|
||||
|
||||
do
|
||||
@@ -2025,7 +2024,6 @@ function message_history($msg_id, $user_id, $message_row, $folder, $in_post_mode
|
||||
else
|
||||
{
|
||||
$rowset[$row['msg_id']] = $row;
|
||||
$bbcode_bitfield = $bbcode_bitfield | base64_decode($row['bbcode_bitfield']);
|
||||
}
|
||||
}
|
||||
while ($row = $db->sql_fetchrow($result));
|
||||
@@ -2036,16 +2034,6 @@ function message_history($msg_id, $user_id, $message_row, $folder, $in_post_mode
|
||||
return false;
|
||||
}
|
||||
|
||||
// Instantiate BBCode class
|
||||
if ((empty($bbcode) || $bbcode === false) && $bbcode_bitfield !== '')
|
||||
{
|
||||
if (!class_exists('bbcode'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/bbcode.' . $phpEx);
|
||||
}
|
||||
$bbcode = new bbcode(base64_encode($bbcode_bitfield));
|
||||
}
|
||||
|
||||
$title = censor_text($title);
|
||||
|
||||
$url = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm');
|
||||
|
@@ -213,6 +213,8 @@ class filespec
|
||||
*/
|
||||
static public function get_extension($filename)
|
||||
{
|
||||
$filename = utf8_basename($filename);
|
||||
|
||||
if (strpos($filename, '.') === false)
|
||||
{
|
||||
return '';
|
||||
|
@@ -44,13 +44,13 @@ function user_get_id_name(&$user_id_ary, &$username_ary, $user_type = false)
|
||||
|
||||
$which_ary = ($user_id_ary) ? 'user_id_ary' : 'username_ary';
|
||||
|
||||
if ($$which_ary && !is_array($$which_ary))
|
||||
if (${$which_ary} && !is_array(${$which_ary}))
|
||||
{
|
||||
$$which_ary = array($$which_ary);
|
||||
${$which_ary} = array(${$which_ary});
|
||||
}
|
||||
|
||||
$sql_in = ($which_ary == 'user_id_ary') ? array_map('intval', $$which_ary) : array_map('utf8_clean_string', $$which_ary);
|
||||
unset($$which_ary);
|
||||
$sql_in = ($which_ary == 'user_id_ary') ? array_map('intval', ${$which_ary}) : array_map('utf8_clean_string', ${$which_ary});
|
||||
unset(${$which_ary});
|
||||
|
||||
$user_id_ary = $username_ary = array();
|
||||
|
||||
@@ -398,7 +398,7 @@ function user_add($user_row, $cp_data = false, $notifications_data = null)
|
||||
*/
|
||||
function user_delete($mode, $user_ids, $retain_username = true)
|
||||
{
|
||||
global $cache, $config, $db, $user, $phpbb_dispatcher;
|
||||
global $cache, $config, $db, $user, $phpbb_dispatcher, $phpbb_container;
|
||||
global $phpbb_root_path, $phpEx;
|
||||
|
||||
$db->sql_transaction('begin');
|
||||
@@ -500,6 +500,9 @@ function user_delete($mode, $user_ids, $retain_username = true)
|
||||
|
||||
$num_users_delta = 0;
|
||||
|
||||
// Get auth provider collection in case accounts might need to be unlinked
|
||||
$provider_collection = $phpbb_container->get('auth.provider_collection');
|
||||
|
||||
// Some things need to be done in the loop (if the query changes based
|
||||
// on which user is currently being deleted)
|
||||
$added_guest_posts = 0;
|
||||
@@ -510,6 +513,38 @@ function user_delete($mode, $user_ids, $retain_username = true)
|
||||
avatar_delete('user', $user_row);
|
||||
}
|
||||
|
||||
// Unlink accounts
|
||||
foreach ($provider_collection as $provider_name => $auth_provider)
|
||||
{
|
||||
$provider_data = $auth_provider->get_auth_link_data($user_id);
|
||||
|
||||
if ($provider_data !== null)
|
||||
{
|
||||
$link_data = array(
|
||||
'user_id' => $user_id,
|
||||
'link_method' => 'user_delete',
|
||||
);
|
||||
|
||||
// BLOCK_VARS might contain hidden fields necessary for unlinking accounts
|
||||
if (isset($provider_data['BLOCK_VARS']) && is_array($provider_data['BLOCK_VARS']))
|
||||
{
|
||||
foreach ($provider_data['BLOCK_VARS'] as $provider_service)
|
||||
{
|
||||
if (!array_key_exists('HIDDEN_FIELDS', $provider_service))
|
||||
{
|
||||
$provider_service['HIDDEN_FIELDS'] = array();
|
||||
}
|
||||
|
||||
$auth_provider->unlink_account(array_merge($link_data, $provider_service['HIDDEN_FIELDS']));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$auth_provider->unlink_account($link_data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Decrement number of users if this user is active
|
||||
if ($user_row['user_type'] != USER_INACTIVE && $user_row['user_type'] != USER_IGNORE)
|
||||
{
|
||||
@@ -672,6 +707,9 @@ function user_delete($mode, $user_ids, $retain_username = true)
|
||||
}
|
||||
phpbb_delete_users_pms($user_ids);
|
||||
|
||||
$phpbb_notifications = $phpbb_container->get('notification_manager');
|
||||
$phpbb_notifications->delete_notifications('notification.type.admin_activate_user', $user_ids);
|
||||
|
||||
$db->sql_transaction('commit');
|
||||
|
||||
/**
|
||||
@@ -703,7 +741,7 @@ function user_delete($mode, $user_ids, $retain_username = true)
|
||||
*/
|
||||
function user_active_flip($mode, $user_id_ary, $reason = INACTIVE_MANUAL)
|
||||
{
|
||||
global $config, $db, $user, $auth;
|
||||
global $config, $db, $user, $auth, $phpbb_dispatcher;
|
||||
|
||||
$deactivated = $activated = 0;
|
||||
$sql_statements = array();
|
||||
@@ -756,6 +794,21 @@ function user_active_flip($mode, $user_id_ary, $reason = INACTIVE_MANUAL)
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
/**
|
||||
* Check or modify activated/deactivated users data before submitting it to the database
|
||||
*
|
||||
* @event core.user_active_flip_before
|
||||
* @var string mode User type changing mode, can be: flip|activate|deactivate
|
||||
* @var int reason Reason for changing user type, can be: INACTIVE_REGISTER|INACTIVE_PROFILE|INACTIVE_MANUAL|INACTIVE_REMIND
|
||||
* @var int activated The number of users to be activated
|
||||
* @var int deactivated The number of users to be deactivated
|
||||
* @var array user_id_ary Array with user ids to change user type
|
||||
* @var array sql_statements Array with users data to submit to the database, keys: user ids, values: arrays with user data
|
||||
* @since 3.1.4-RC1
|
||||
*/
|
||||
$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))
|
||||
{
|
||||
foreach ($sql_statements as $user_id => $sql_ary)
|
||||
@@ -769,6 +822,21 @@ function user_active_flip($mode, $user_id_ary, $reason = INACTIVE_MANUAL)
|
||||
$auth->acl_clear_prefetch(array_keys($sql_statements));
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform additional actions after the users have been activated/deactivated
|
||||
*
|
||||
* @event core.user_active_flip_after
|
||||
* @var string mode User type changing mode, can be: flip|activate|deactivate
|
||||
* @var int reason Reason for changing user type, can be: INACTIVE_REGISTER|INACTIVE_PROFILE|INACTIVE_MANUAL|INACTIVE_REMIND
|
||||
* @var int activated The number of users to be activated
|
||||
* @var int deactivated The number of users to be deactivated
|
||||
* @var array user_id_ary Array with user ids to change user type
|
||||
* @var array sql_statements Array with users data to submit to the database, keys: user ids, values: arrays with user data
|
||||
* @since 3.1.4-RC1
|
||||
*/
|
||||
$vars = array('mode', 'reason', 'activated', 'deactivated', 'user_id_ary', 'sql_statements');
|
||||
extract($phpbb_dispatcher->trigger_event('core.user_active_flip_after', compact($vars)));
|
||||
|
||||
if ($deactivated)
|
||||
{
|
||||
set_config_count('num_users', $deactivated * (-1), true);
|
||||
@@ -1334,7 +1402,7 @@ function user_ipwhois($ip)
|
||||
$match = array();
|
||||
|
||||
// Test for referrals from $whois_host to other whois databases, roll on rwhois
|
||||
if (preg_match('#ReferralServer: whois://(.+)#im', $ipwhois, $match))
|
||||
if (preg_match('#ReferralServer:[\x20]*whois://(.+)#im', $ipwhois, $match))
|
||||
{
|
||||
if (strpos($match[1], ':') !== false)
|
||||
{
|
||||
|
@@ -77,6 +77,30 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
|
||||
break;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get some data in order to execute other actions.
|
||||
*
|
||||
* @event core.mcp_forum_view_before
|
||||
* @var string action The action
|
||||
* @var array forum_info Array with forum infos
|
||||
* @var int start Start value
|
||||
* @var array topic_id_list Array of topics ids
|
||||
* @var array post_id_list Array of posts ids
|
||||
* @var array source_topic_ids Array of source topics ids
|
||||
* @var int to_topic_id Array of destination topics ids
|
||||
* @since 3.1.6-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'action',
|
||||
'forum_info',
|
||||
'start',
|
||||
'topic_id_list',
|
||||
'post_id_list',
|
||||
'source_topic_ids',
|
||||
'to_topic_id',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.mcp_forum_view_before', compact($vars)));
|
||||
|
||||
$pagination = $phpbb_container->get('pagination');
|
||||
|
||||
$selected_ids = '';
|
||||
|
@@ -41,10 +41,27 @@ function mcp_front_view($id, $mode, $action)
|
||||
|
||||
if (!empty($forum_list))
|
||||
{
|
||||
$sql = 'SELECT COUNT(post_id) AS total
|
||||
FROM ' . POSTS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('forum_id', $forum_list) . '
|
||||
AND ' . $db->sql_in_set('post_visibility', array(ITEM_UNAPPROVED, ITEM_REAPPROVE));
|
||||
$sql_ary = array(
|
||||
'SELECT' => 'COUNT(post_id) AS total',
|
||||
'FROM' => array(
|
||||
POSTS_TABLE => 'p',
|
||||
),
|
||||
'WHERE' => $db->sql_in_set('p.forum_id', $forum_list) . '
|
||||
AND ' . $db->sql_in_set('p.post_visibility', array(ITEM_UNAPPROVED, ITEM_REAPPROVE))
|
||||
);
|
||||
|
||||
/**
|
||||
* Allow altering the query to get the number of unapproved posts
|
||||
*
|
||||
* @event core.mcp_front_queue_unapproved_total_before
|
||||
* @var int sql_ary Query to get the total number of unapproved posts
|
||||
* @var array forum_list List of forums to look for unapproved posts
|
||||
* @since 3.1.5-RC1
|
||||
*/
|
||||
$vars = array('sql_ary', 'forum_list');
|
||||
extract($phpbb_dispatcher->trigger_event('core.mcp_front_queue_unapproved_total_before', compact($vars)));
|
||||
|
||||
$sql = $db->sql_build_query('SELECT', $sql_ary);
|
||||
$result = $db->sql_query($sql);
|
||||
$total = (int) $db->sql_fetchfield('total');
|
||||
$db->sql_freeresult($result);
|
||||
@@ -157,6 +174,18 @@ function mcp_front_view($id, $mode, $action)
|
||||
AND r.pm_id = 0
|
||||
AND r.report_closed = 0
|
||||
AND ' . $db->sql_in_set('p.forum_id', $forum_list);
|
||||
|
||||
/**
|
||||
* Alter sql query to count the number of reported posts
|
||||
*
|
||||
* @event core.mcp_front_reports_count_query_before
|
||||
* @var int sql The query string used to get the number of reports that exist
|
||||
* @var array forum_list List of forums that contain the posts
|
||||
* @since 3.1.5-RC1
|
||||
*/
|
||||
$vars = array('sql', 'forum_list');
|
||||
extract($phpbb_dispatcher->trigger_event('core.mcp_front_reports_count_query_before', compact($vars)));
|
||||
|
||||
$result = $db->sql_query($sql);
|
||||
$total = (int) $db->sql_fetchfield('total');
|
||||
$db->sql_freeresult($result);
|
||||
@@ -234,6 +263,7 @@ function mcp_front_view($id, $mode, $action)
|
||||
'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $row['forum_id']) && $row['post_attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
|
||||
));
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
@@ -290,6 +320,7 @@ function mcp_front_view($id, $mode, $action)
|
||||
$pm_by_id[(int) $row['msg_id']] = $row;
|
||||
$pm_list[] = (int) $row['msg_id'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$address_list = get_recipient_strings($pm_by_id);
|
||||
|
||||
|