mirror of
https://github.com/phpbb/phpbb.git
synced 2025-09-12 17:20:47 +02:00
Compare commits
711 Commits
release-3.
...
release-3.
Author | SHA1 | Date | |
---|---|---|---|
|
e3acdfed92 | ||
|
4ec32592a4 | ||
|
099a1b5f75 | ||
|
69cf32613d | ||
|
d2acccf92c | ||
|
901785bc5e | ||
|
81b3b38795 | ||
|
d37d3ed3ed | ||
|
e6d3ed5529 | ||
|
ffbc2d02d7 | ||
|
2419f63aab | ||
|
20e26a3920 | ||
|
4989df66a2 | ||
|
a4c1daa259 | ||
|
ab8dc92d26 | ||
|
07ae3e997c | ||
|
4a92b85cad | ||
|
94c073672d | ||
|
e8247faacc | ||
|
7eef7b2ea2 | ||
|
91869cc43c | ||
|
8899829752 | ||
|
1a367062d3 | ||
|
4966d6c913 | ||
|
ea9b97c8a1 | ||
|
4ea325029b | ||
|
31510c0ae7 | ||
|
df223eac65 | ||
|
0bff95488b | ||
|
8489cb6f40 | ||
|
3a55cead92 | ||
|
f4f6a4f810 | ||
|
e3f1cca911 | ||
|
df9443a3c6 | ||
|
03662d5a89 | ||
|
8bb4af6271 | ||
|
27cf9e490b | ||
|
d53c5b7e2a | ||
|
da6ce7a668 | ||
|
19c84dabe1 | ||
|
9ef06d67e6 | ||
|
224efba459 | ||
|
8398e0700a | ||
|
13133b359b | ||
|
1c1fe43e16 | ||
|
966c34d0ad | ||
|
b27be0b857 | ||
|
865c16cf26 | ||
|
854ee0b04d | ||
|
27e95864a8 | ||
|
8dbf3976fd | ||
|
afbeda7cfd | ||
|
22d234a345 | ||
|
21aa6cc120 | ||
|
fbacd1df16 | ||
|
88dd8a4849 | ||
|
c1d47d9e16 | ||
|
6a7567459d | ||
|
9596db9b88 | ||
|
2a218c2959 | ||
|
7615a5c22f | ||
|
5576c9f3b9 | ||
|
93208d597a | ||
|
fa44e98e72 | ||
|
6b433eab4c | ||
|
b23c0f1442 | ||
|
a6fd55db35 | ||
|
dfd5ec6835 | ||
|
9ccb596a06 | ||
|
da9a5c70d5 | ||
|
9a8393c912 | ||
|
3a5336452c | ||
|
6fba5613f8 | ||
|
c7d7967a91 | ||
|
aaca64e13e | ||
|
9de5668b80 | ||
|
bc6a4c4583 | ||
|
e634d2902d | ||
|
f657680311 | ||
|
240d07d0cf | ||
|
f6776c1017 | ||
|
bab85da820 | ||
|
bc11e648af | ||
|
669618b5a0 | ||
|
50bf3411d4 | ||
|
a49a3091f9 | ||
|
5d8e900483 | ||
|
fb3073029f | ||
|
3367f0036a | ||
|
69b57eab5e | ||
|
6bcec956ba | ||
|
ccb3d0ac78 | ||
|
6572164754 | ||
|
345e8ad822 | ||
|
bdf69817be | ||
|
9ebc369d74 | ||
|
14966a2962 | ||
|
655f244c4f | ||
|
08739751b2 | ||
|
d003b53922 | ||
|
d507bce98a | ||
|
b7bd210f41 | ||
|
c5752be50c | ||
|
66ee80c9e2 | ||
|
1260f92813 | ||
|
1164cc38a2 | ||
|
e87209742b | ||
|
d92baaa2f7 | ||
|
bc34217c14 | ||
|
65b13938db | ||
|
8c3aa1458c | ||
|
d9a4146113 | ||
|
e603fa56db | ||
|
2668fa42ad | ||
|
fcf6c20291 | ||
|
5f8fb38b52 | ||
|
5f05a8a8f8 | ||
|
97118a897a | ||
|
f6c8338358 | ||
|
8eb9ce50b0 | ||
|
d75750fd99 | ||
|
def21f27a2 | ||
|
8683824ed3 | ||
|
b04b5dea36 | ||
|
8a52ccc938 | ||
|
a0dafbfb5f | ||
|
70b5ffc41d | ||
|
e63ef0b28f | ||
|
6360d748db | ||
|
e5b895de7b | ||
|
3469cdce76 | ||
|
7a60cdd1d3 | ||
|
5b7b0894e0 | ||
|
542498e457 | ||
|
c38a128663 | ||
|
c05a27396d | ||
|
4830b3eacd | ||
|
cf62b303a6 | ||
|
e5b2dc922f | ||
|
3fd1fa5492 | ||
|
bf0596d0a1 | ||
|
a11d97cb36 | ||
|
0947bda39d | ||
|
66397ae0e4 | ||
|
cb71a7b8d2 | ||
|
2642cfe298 | ||
|
3672df0bc2 | ||
|
098c8e1fe9 | ||
|
d5f625382b | ||
|
20c0b57421 | ||
|
65997eb577 | ||
|
7e379c4cea | ||
|
d62b03e0de | ||
|
07b55530ec | ||
|
d92a46ef02 | ||
|
5b9d828328 | ||
|
3cdf97f003 | ||
|
2bf9e91101 | ||
|
bc518bf96e | ||
|
aa01ee1bbc | ||
|
2f4fcee7e8 | ||
|
a4a99f5ea3 | ||
|
c166adf3c7 | ||
|
7d15704f6a | ||
|
46f6b4459a | ||
|
0f49eaa2e2 | ||
|
0744330080 | ||
|
c9d159257a | ||
|
1affd34814 | ||
|
90d5eefccf | ||
|
ea594d00f7 | ||
|
9537ec56eb | ||
|
0e93efd7cb | ||
|
8cab2374f9 | ||
|
f201c22ca7 | ||
|
5258fba2e0 | ||
|
82a45cd4da | ||
|
076807c63a | ||
|
053a6d1d70 | ||
|
7701034871 | ||
|
5faa12db4c | ||
|
58af8606c1 | ||
|
48d05bad25 | ||
|
2ee8b14f86 | ||
|
8749c99e34 | ||
|
4979d98aa9 | ||
|
3fe517f50c | ||
|
cc060a2611 | ||
|
96521767f8 | ||
|
a606b1c480 | ||
|
e9e199bc37 | ||
|
af246483e2 | ||
|
11b2bffa8e | ||
|
bfbce5a1b0 | ||
|
76158e429b | ||
|
6c36f56b12 | ||
|
624f5ae921 | ||
|
6d7a5dfe5e | ||
|
90d18356a0 | ||
|
eb2b3868bb | ||
|
5a51acd643 | ||
|
2b01772fa9 | ||
|
d08c5edcca | ||
|
13851f308f | ||
|
335452b1c1 | ||
|
4be255ef9f | ||
|
5be06ec66a | ||
|
623a8f2d0f | ||
|
819eca99a8 | ||
|
a7272fec97 | ||
|
0caaf86158 | ||
|
f585f48aca | ||
|
d8dd6bad6b | ||
|
f2a0fe39a5 | ||
|
b09e1ad26d | ||
|
583068da9d | ||
|
f153342fb3 | ||
|
2d24b9b61f | ||
|
04b0ba9f6d | ||
|
ccd1e1eebb | ||
|
a959e5f4cc | ||
|
697ccd41c4 | ||
|
6c98b01ad1 | ||
|
ffe72e500c | ||
|
6f1d848087 | ||
|
897b9f333b | ||
|
cf0170d5e3 | ||
|
00aab15f7c | ||
|
11a0516739 | ||
|
ef3de412b7 | ||
|
50a7167c9a | ||
|
51eaa8917f | ||
|
5f905f67ee | ||
|
19267242e3 | ||
|
452b3b4890 | ||
|
5b534369d1 | ||
|
dcf12cad26 | ||
|
ec032733de | ||
|
81b4293cc5 | ||
|
6b0f235cc9 | ||
|
d89c952955 | ||
|
e22dbbc7e8 | ||
|
a83bcaa8ac | ||
|
a24f9a7ad7 | ||
|
dbfea6d0fa | ||
|
e466318dc2 | ||
|
57ba51c529 | ||
|
9d4228291c | ||
|
dead984f54 | ||
|
2cd2cf2b39 | ||
|
146c4b1624 | ||
|
4bab984dac | ||
|
972f04ec6a | ||
|
40666dd96f | ||
|
c4bc5f3930 | ||
|
3bd5fe6be8 | ||
|
1b1fc6ed24 | ||
|
edeeff597f | ||
|
9a2c74a68c | ||
|
166e0b5961 | ||
|
668defcf57 | ||
|
5f4943c183 | ||
|
9e38f412ea | ||
|
8d54f06d19 | ||
|
4d2940dd2f | ||
|
7a2f72df75 | ||
|
84a40b6ad1 | ||
|
8e80425c82 | ||
|
b7e4d0b0a5 | ||
|
3dcba7000b | ||
|
b1e92393ee | ||
|
9e467a4e4a | ||
|
32f5dc3d8b | ||
|
f4c1796d5e | ||
|
4aac578908 | ||
|
b34e74254a | ||
|
e7c6c3f02b | ||
|
49bc477a87 | ||
|
6a7978965d | ||
|
478a4c4133 | ||
|
7cb7ca57c2 | ||
|
84f8d6d64e | ||
|
0d6c323611 | ||
|
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 | ||
|
7e1b0330a3 | ||
|
d548a2aa3e | ||
|
11256cd167 | ||
|
4d3188ba57 | ||
|
56251adc24 | ||
|
4262dfeaef | ||
|
100fd39c5e | ||
|
de75a3577f | ||
|
64b41f314e | ||
|
ae31a604e6 | ||
|
b002948e21 | ||
|
23f1b7d9c7 | ||
|
2e10961fff | ||
|
3768f7f2b8 | ||
|
92703127d3 | ||
|
3a62903fd1 | ||
|
e69d23dc88 | ||
|
0d7f8ba8af | ||
|
9ab4b30739 | ||
|
629a826f5b | ||
|
42dc7eb0f5 | ||
|
05f1476fc9 | ||
|
4b54df8d45 | ||
|
d0cdc5553a | ||
|
f576f42b4d | ||
|
23db3d0b83 | ||
|
04d34e6c8b | ||
|
6294c45bd3 | ||
|
498a516017 | ||
|
1bd20eb273 | ||
|
4ac2256683 | ||
|
51bb51124a | ||
|
886ca1dbb9 | ||
|
73ba70e98c | ||
|
b346f216c2 | ||
|
ed3f46a9b1 | ||
|
e0efd5ee57 | ||
|
352e995674 | ||
|
60b4d5132f | ||
|
18a08e1af1 | ||
|
80fee7422c | ||
|
2be39c5a8f | ||
|
cc23ac887c | ||
|
607f2e791f | ||
|
7b903919bf | ||
|
d0cf674f33 | ||
|
6f18963636 | ||
|
7b93df1522 | ||
|
2237030398 | ||
|
dbd653327c | ||
|
ae2237f640 | ||
|
817db2f135 | ||
|
8bb48b575d | ||
|
7d7b536874 | ||
|
ef6af2682b | ||
|
84bbd4490e | ||
|
11e312f41c | ||
|
82bc9baa24 | ||
|
2ec5c5de17 | ||
|
bd40f2f619 | ||
|
d43da6cee9 | ||
|
abf98f92e6 | ||
|
bcac964cd0 | ||
|
c0449d31d6 | ||
|
de947d31f6 | ||
|
7d24510d68 | ||
|
afa4c07a13 | ||
|
57fa7435ad | ||
|
af7f62505e | ||
|
76f7175fc4 | ||
|
bbbf122d05 | ||
|
798490bf1d | ||
|
4a1f617473 | ||
|
e0476d4f53 | ||
|
a8fe3926dc | ||
|
5e39a7ab72 | ||
|
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 | ||
|
5b8a721b73 | ||
|
0427e5f1b3 | ||
|
7a55bcc0f3 | ||
|
51831924c5 | ||
|
bb7f843344 | ||
|
9005711ad7 | ||
|
fb94bd11fb | ||
|
852337cacd | ||
|
e8f9458a21 | ||
|
78b0c938a2 | ||
|
9c84b3b5fb | ||
|
6ca3a30576 | ||
|
b627a097bb | ||
|
0f6d16920b | ||
|
db3782e491 | ||
|
189d94e897 | ||
|
cfbd051d52 | ||
|
d978564600 | ||
|
2e20bae695 | ||
|
1f385b536a | ||
|
27a70f573f | ||
|
a39a421acb | ||
|
bafd649eea | ||
|
e3090e04c3 | ||
|
049f584111 | ||
|
d6cd90d325 | ||
|
e04f9a2425 | ||
|
d1c4f5bc35 | ||
|
1ba86eaa8e | ||
|
df4b391baa | ||
|
01073ffcbf | ||
|
9366f29fd7 | ||
|
b5fed65fe3 | ||
|
fedd0ae7f3 | ||
|
da6f751cef | ||
|
0fc6816be6 | ||
|
143578ad09 | ||
|
2a83290e7c | ||
|
be1d1c7d05 | ||
|
518902ef51 | ||
|
f5801320b7 | ||
|
44fcdd007f | ||
|
8b6c6e794a | ||
|
ed064ce0f1 | ||
|
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 | ||
|
73fd75abf1 | ||
|
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 | ||
|
ef0838e931 | ||
|
96339b7c86 | ||
|
b0f5ef0b1a | ||
|
77c2b2a51d | ||
|
cc29638bcc | ||
|
2e7a60d986 | ||
|
4d7cb7ca73 | ||
|
ca883f1196 | ||
|
cfdaf2d63f | ||
|
29ccbd8098 | ||
|
1a001fc233 | ||
|
d5dd9c929d | ||
|
3bda9a3c11 | ||
|
7112058d7b | ||
|
c3a0e09ddb | ||
|
94da39cd88 | ||
|
4cdcb6d5d3 | ||
|
8a6d55520d | ||
|
fa474c4378 | ||
|
134a5e0391 | ||
|
c7cc8a098e | ||
|
21cc1fda85 | ||
|
d53b584c9a | ||
|
5fa6871ebf | ||
|
772bbdfeae | ||
|
5ad69bbecf | ||
|
d0a1650a04 | ||
|
c887eedaa5 | ||
|
d66a53a531 | ||
|
dbc09bf0d4 | ||
|
8b23272c33 | ||
|
19fe32d5b2 | ||
|
b8dfbfe390 |
78
.jscsrc
Normal file
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
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
|
||||
}
|
||||
}
|
@@ -46,7 +46,7 @@ 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 ./
|
||||
- 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"
|
||||
|
||||
|
@@ -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.4-RC1" />
|
||||
<property name="prevversion" value="3.1.3" />
|
||||
<property name="olderversions" value="3.0.12, 3.0.13, 3.0.13-PL1, 3.1.0, 3.1.1, 3.1.2" />
|
||||
<property name="newversion" value="3.1.7" />
|
||||
<property name="prevversion" value="3.1.6" />
|
||||
<property name="olderversions" value="3.0.14, 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.1.5" />
|
||||
<!-- 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) !== '*' && substr($line, 0, 2) !== ' *')
|
||||
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 indented.';
|
||||
$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);
|
||||
$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');
|
||||
}
|
||||
}
|
||||
}
|
@@ -138,6 +138,7 @@ class phpbb_Sniffs_Namespaces_UnusedUseSniff implements PHP_CodeSniffer_Sniff
|
||||
// Check docblocks
|
||||
$find = array(
|
||||
T_COMMENT,
|
||||
T_DOC_COMMENT_CLOSE_TAG,
|
||||
T_DOC_COMMENT,
|
||||
T_CLASS,
|
||||
T_FUNCTION,
|
||||
@@ -147,43 +148,31 @@ class phpbb_Sniffs_Namespaces_UnusedUseSniff implements PHP_CodeSniffer_Sniff
|
||||
$comment_end = $phpcsFile->findPrevious($find, ($function_declaration - 1));
|
||||
if ($comment_end !== false)
|
||||
{
|
||||
if (!$tokens[$comment_end]['code'] !== T_DOC_COMMENT)
|
||||
if ($tokens[$comment_end]['code'] === T_DOC_COMMENT_CLOSE_TAG)
|
||||
{
|
||||
$comment_start = ($phpcsFile->findPrevious(T_DOC_COMMENT, ($comment_end - 1), null, true) + 1);
|
||||
$comment = $phpcsFile->getTokensAsString($comment_start, ($comment_end - $comment_start + 1));
|
||||
|
||||
try
|
||||
{
|
||||
$comment_parser = new PHP_CodeSniffer_CommentParser_FunctionCommentParser($comment, $phpcsFile);
|
||||
$comment_parser->parse();
|
||||
|
||||
// Check @param
|
||||
foreach ($comment_parser->getParams() as $param) {
|
||||
$type = $param->getType();
|
||||
$types = explode('|', str_replace('[]', '', $type));
|
||||
foreach ($types as $type)
|
||||
{
|
||||
$ok = $this->check($phpcsFile, $type, $class_name_full, $class_name_short, $param->getLine() + $comment_start) ? true : $ok;
|
||||
}
|
||||
$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;
|
||||
}
|
||||
|
||||
// Check @return
|
||||
$return = $comment_parser->getReturn();
|
||||
if ($return !== null)
|
||||
$classes = $tokens[($tag + 2)]['content'];
|
||||
$space = strpos($classes, ' ');
|
||||
if ($space !== false) {
|
||||
$classes = substr($classes, 0, $space);
|
||||
}
|
||||
|
||||
$tab = strpos($classes, "\t");
|
||||
if ($tab !== false) {
|
||||
$classes = substr($classes, 0, $tab);
|
||||
}
|
||||
|
||||
$classes = explode('|', str_replace('[]', '', $classes));
|
||||
foreach ($classes as $class)
|
||||
{
|
||||
$type = $return->getValue();
|
||||
$types = explode('|', str_replace('[]', '', $type));
|
||||
foreach ($types as $type)
|
||||
{
|
||||
$ok = $this->check($phpcsFile, $type, $class_name_full, $class_name_short, $return->getLine() + $comment_start) ? true : $ok;
|
||||
}
|
||||
$ok = $this->check($phpcsFile, $class, $class_name_full, $class_name_short, $tokens[$tag + 2]['line']) ? true : $ok;
|
||||
}
|
||||
}
|
||||
catch (PHP_CodeSniffer_CommentParser_ParserException $e)
|
||||
{
|
||||
$line = ($e->getLineWithinComment() + $comment_start);
|
||||
$phpcsFile->addError($e->getMessage(), $line, 'FailedParse');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -195,6 +184,20 @@ class phpbb_Sniffs_Namespaces_UnusedUseSniff implements PHP_CodeSniffer_Sniff
|
||||
}
|
||||
}
|
||||
|
||||
// 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)
|
||||
{
|
||||
$error = 'There must not be unused USE statements.';
|
||||
|
@@ -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>
|
||||
|
@@ -25,6 +25,7 @@ $config['versions'] = Sami\Version\GitVersionCollection::create(__DIR__ . '/../'
|
||||
*/
|
||||
->add('3.0.x')
|
||||
->add('3.1.x')
|
||||
->add('master')
|
||||
;
|
||||
|
||||
return new Sami\Sami($iterator, $config);
|
||||
|
BIN
composer.phar
BIN
composer.phar
Binary file not shown.
@@ -12,7 +12,7 @@
|
||||
<!-- BEGIN avatar_local_col -->
|
||||
<li>
|
||||
<label for="av-{avatar_local_row.S_ROW_COUNT}-{avatar_local_row.avatar_local_col.S_ROW_COUNT}"><img src="{avatar_local_row.avatar_local_col.AVATAR_IMAGE}" alt="" /><br />
|
||||
<input type="radio" name="avatar_local_file" id="av-{avatar_local_row.S_ROW_COUNT}-{avatar_local_row.avatar_local_col.S_ROW_COUNT}" value="{avatar_local_row.avatar_local_col.AVATAR_FILE}" /></label>
|
||||
<input type="radio" name="avatar_local_file" id="av-{avatar_local_row.S_ROW_COUNT}-{avatar_local_row.avatar_local_col.S_ROW_COUNT}" value="{avatar_local_row.avatar_local_col.AVATAR_FILE}"<!-- IF avatar_local_row.avatar_local_col.CHECKED -->checked="checked"<!-- ENDIF --> /></label>
|
||||
</li>
|
||||
<!-- END avatar_local_col -->
|
||||
<!-- END avatar_local_row -->
|
||||
|
@@ -52,7 +52,7 @@
|
||||
<legend>{L_TITLE}</legend>
|
||||
<dl>
|
||||
<dt><label for="ban">{L_BAN_CELL}{L_COLON}</label></dt>
|
||||
<dd><textarea name="ban" cols="40" rows="3" id="ban"></textarea></dd>
|
||||
<dd><!-- EVENT acp_ban_cell_prepend --><textarea name="ban" cols="40" rows="3" id="ban"></textarea><!-- EVENT acp_ban_cell_append --></dd>
|
||||
<!-- IF S_USERNAME_BAN --><dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</dd><!-- ENDIF -->
|
||||
</dl>
|
||||
<dl>
|
||||
|
@@ -8,6 +8,13 @@
|
||||
|
||||
<p>{L_ACP_VC_EXT_GET_MORE}</p>
|
||||
|
||||
<!-- IF ERROR_MSG -->
|
||||
<div class="errorbox">
|
||||
<h3>{L_WARNING}</h3>
|
||||
<p>{ERROR_MSG}</p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<form id="acp_captcha" method="post" action="{U_ACTION}">
|
||||
|
||||
<fieldset>
|
||||
|
@@ -19,12 +19,14 @@
|
||||
<legend>{L_COMPOSE}</legend>
|
||||
<dl>
|
||||
<dt><label for="group">{L_SEND_TO_GROUP}{L_COLON}</label></dt>
|
||||
<!-- EVENT acp_email_group_options_prepend -->
|
||||
<dd><select id="group" name="g">{S_GROUP_OPTIONS}</select></dd>
|
||||
<!-- EVENT acp_email_group_options_append -->
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="usernames">{L_SEND_TO_USERS}{L_COLON}</label><br /><span>{L_SEND_TO_USERS_EXPLAIN}</span></dt>
|
||||
<dd><textarea name="usernames" id="usernames" rows="5" cols="40">{USERNAMES}</textarea></dd>
|
||||
<dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</dd>
|
||||
<dd><!-- EVENT acp_email_find_username_prepend -->[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]<!-- EVENT acp_email_find_username_append --></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label for="subject">{L_SUBJECT}{L_COLON}</label></dt>
|
||||
|
@@ -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">
|
||||
@@ -47,8 +47,8 @@
|
||||
<td class="row3" colspan="4"><strong>{L_EXTENSIONS_ENABLED}</strong></td>
|
||||
</tr>
|
||||
<!-- BEGIN enabled -->
|
||||
<tr class="ext_enabled">
|
||||
<td><strong>{enabled.META_DISPLAY_NAME}</strong></td>
|
||||
<tr class="ext_enabled row-highlight">
|
||||
<td><strong title="{enabled.NAME}">{enabled.META_DISPLAY_NAME}</strong></td>
|
||||
<td style="text-align: center;">
|
||||
<!-- IF enabled.S_VERSIONCHECK -->
|
||||
<strong <!-- IF enabled.S_UP_TO_DATE -->style="color: #228822;"<!-- ELSE -->style="color: #BC2A4D;"<!-- ENDIF -->>{enabled.META_VERSION}</strong>
|
||||
@@ -72,8 +72,8 @@
|
||||
<td class="row3" colspan="4"><strong>{L_EXTENSIONS_DISABLED}</strong></td>
|
||||
</tr>
|
||||
<!-- BEGIN disabled -->
|
||||
<tr class="ext_disabled">
|
||||
<td><strong>{disabled.META_DISPLAY_NAME}</strong></td>
|
||||
<tr class="ext_disabled row-highlight">
|
||||
<td><strong title="{disabled.NAME}">{disabled.META_DISPLAY_NAME}</strong></td>
|
||||
<td style="text-align: center;">
|
||||
<!-- IF disabled.S_VERSIONCHECK -->
|
||||
<strong <!-- IF disabled.S_UP_TO_DATE -->style="color: #228822;"<!-- ELSE -->style="color: #BC2A4D;"<!-- ENDIF -->>{disabled.META_VERSION}</strong>
|
||||
@@ -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>
|
||||
@@ -496,7 +498,7 @@
|
||||
<fieldset class="quick">
|
||||
{L_SELECT_FORUM}{L_COLON} <select name="parent_id" onchange="if(this.options[this.selectedIndex].value != -1){ this.form.submit(); }">{FORUM_BOX}</select>
|
||||
|
||||
<input class="button2" type="submit" value="{L_GO}" />
|
||||
<!-- EVENT acp_forums_quick_select_button_prepend --><input class="button2" type="submit" value="{L_GO}" /><!-- EVENT acp_forums_quick_select_button_append -->
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
</form>
|
||||
|
@@ -236,7 +236,7 @@
|
||||
<dl>
|
||||
<dt><label for="usernames">{L_USERNAME}{L_COLON}</label><br /><span>{L_USERNAMES_EXPLAIN}</span></dt>
|
||||
<dd><textarea id="usernames" name="usernames" cols="40" rows="5"></textarea></dd>
|
||||
<dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</dd>
|
||||
<dd><!-- EVENT acp_groups_find_username_prepend -->[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]<!-- EVENT acp_groups_find_username_append --></dd>
|
||||
</dl>
|
||||
|
||||
<p class="quick">
|
||||
@@ -265,6 +265,7 @@
|
||||
|
||||
<form id="acp_groups" method="post" action="{U_ACTION}">
|
||||
|
||||
<!-- EVENT acp_groups_manage_before -->
|
||||
<table class="table1">
|
||||
<col class="col1" /><col class="col1" /><col class="col2" /><col class="col2" /><col class="col2" />
|
||||
<thead>
|
||||
@@ -285,6 +286,7 @@
|
||||
<!-- ENDIF -->
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- EVENT acp_groups_manage_after -->
|
||||
|
||||
<fieldset class="quick">
|
||||
<!-- IF S_GROUP_ADD -->
|
||||
|
@@ -65,8 +65,10 @@
|
||||
<option<!-- IF add_legend.GROUP_SPECIAL --> class="sep"<!-- ENDIF --> value="{add_legend.GROUP_ID}">{add_legend.GROUP_NAME}</option>
|
||||
<!-- END add_legend -->
|
||||
</select>
|
||||
<!-- EVENT acp_groups_position_legend_add_button_before -->
|
||||
<input class="button2" type="submit" name="submit" value="{L_ADD}" />
|
||||
<input type="hidden" name="action" value="add" />
|
||||
<!-- EVENT acp_groups_position_legend_add_button_after -->
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
</form>
|
||||
@@ -162,8 +164,10 @@
|
||||
<option<!-- IF add_teampage.GROUP_SPECIAL --> class="sep"<!-- ENDIF --> value="{add_teampage.GROUP_ID}">{add_teampage.GROUP_NAME}</option>
|
||||
<!-- END add_teampage -->
|
||||
</select>
|
||||
<!-- EVENT acp_groups_position_teampage_add_button_before -->
|
||||
<input class="button2" type="submit" name="submit" value="{L_ADD}" />
|
||||
<input type="hidden" name="action" value="add" />
|
||||
<!-- EVENT acp_groups_position_teampage_add_button_after -->
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
</form>
|
||||
|
@@ -18,6 +18,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{L_USERNAME}</th>
|
||||
<th>{L_EMAIL}</th>
|
||||
<th>{L_JOINED}</th>
|
||||
<th>{L_INACTIVE_DATE}</th>
|
||||
<th>{L_LAST_VISIT}</th>
|
||||
@@ -32,6 +33,7 @@
|
||||
{inactive.USERNAME_FULL}
|
||||
<!-- IF inactive.POSTS --><br />{L_POSTS}{L_COLON} <strong>{inactive.POSTS}</strong> [<a href="{inactive.U_SEARCH_USER}">{L_SEARCH_USER_POSTS}</a>]<!-- ENDIF -->
|
||||
</td>
|
||||
<td style="vertical-align: top;">{inactive.USER_EMAIL}</td>
|
||||
<td style="vertical-align: top;">{inactive.JOINED}</td>
|
||||
<td style="vertical-align: top;">{inactive.INACTIVE_DATE}</td>
|
||||
<td style="vertical-align: top;">{inactive.LAST_VISIT}</td>
|
||||
|
@@ -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>
|
||||
|
@@ -73,7 +73,7 @@
|
||||
<!-- IF S_SHOW_FORUMS -->
|
||||
<fieldset class="quick">
|
||||
{L_SELECT_FORUM}{L_COLON} <select name="f" onchange="if(this.options[this.selectedIndex].value != -1){ this.form.submit(); }">{S_FORUM_BOX}</select>
|
||||
<input class="button2" type="submit" value="{L_GO}" />
|
||||
<!-- EVENT acp_logs_quick_select_forum_button_prepend --><input class="button2" type="submit" value="{L_GO}" /><!-- EVENT acp_logs_quick_select_forum_button_append -->
|
||||
</fieldset>
|
||||
<!-- ENDIF -->
|
||||
|
||||
|
@@ -141,19 +141,24 @@
|
||||
<td>{L_GZIP_COMPRESSION}{L_COLON} </td>
|
||||
<td><strong>{GZIP_COMPRESSION}</strong></td>
|
||||
</tr>
|
||||
<!-- IF S_TOTAL_ORPHAN or S_VERSIONCHECK -->
|
||||
<tr>
|
||||
<!-- IF S_VERSIONCHECK -->
|
||||
<td>{L_BOARD_VERSION}{L_COLON} </td>
|
||||
<td>
|
||||
<strong><a href="{U_VERSIONCHECK}" <!-- IF S_VERSION_UP_TO_DATE -->style="color: #228822;"<!-- ELSE -->style="color: #BC2A4D;"<!-- ENDIF --> title="{L_MORE_INFORMATION}">{BOARD_VERSION}</a></strong> [ <a href="{U_VERSIONCHECK_FORCE}">{L_VERSIONCHECK_FORCE_UPDATE}</a> ]
|
||||
<strong><a href="{U_VERSIONCHECK}" <!-- IF S_VERSION_UP_TO_DATE -->style="color: #228822;" <!-- ELSEIF not S_VERSIONCHECK_FAIL -->style="color: #BC2A4D;" <!-- ENDIF -->title="{L_MORE_INFORMATION}">{BOARD_VERSION}</a></strong> [ <a href="{U_VERSIONCHECK_FORCE}">{L_VERSIONCHECK_FORCE_UPDATE}</a> ]
|
||||
</td>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_TOTAL_ORPHAN -->
|
||||
<td>{L_NUMBER_ORPHAN}{L_COLON} </td>
|
||||
<td><strong>{TOTAL_ORPHAN}</strong></td>
|
||||
<!-- ELSE -->
|
||||
<!-- ENDIF -->
|
||||
<!-- IF not S_TOTAL_ORPHAN or not S_VERSIONCHECK -->
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<!-- ENDIF -->
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
@@ -30,7 +30,7 @@
|
||||
<legend>{L_LOOK_UP_FORUM}</legend>
|
||||
<!-- IF S_FORUM_MULTIPLE --><p>{L_LOOK_UP_FORUMS_EXPLAIN}</p><!-- ENDIF -->
|
||||
<dl>
|
||||
<dt><label for="forum">{L_LOOK_UP_FORUM}{L_COLON}</label></dt>
|
||||
<dt><!-- EVENT acp_permissions_select_multiple_forum_prepend --><label for="forum">{L_LOOK_UP_FORUM}{L_COLON}</label><!-- EVENT acp_permissions_select_multiple_forum_append --></dt>
|
||||
<dd><select id="forum" name="forum_id[]"<!-- IF S_FORUM_MULTIPLE --> multiple="multiple"<!-- ENDIF --> size="10">{S_FORUM_OPTIONS}</select></dd>
|
||||
<!-- IF S_FORUM_ALL --><dd><label><input type="checkbox" class="radio" name="all_forums" value="1" /> {L_ALL_FORUMS}</label></dd><!-- ENDIF -->
|
||||
</dl>
|
||||
@@ -52,7 +52,7 @@
|
||||
<legend>{L_LOOK_UP_FORUM}</legend>
|
||||
<p>{L_SELECT_FORUM_SUBFORUM_EXPLAIN}</p>
|
||||
<dl>
|
||||
<dt><label for="sforum">{L_LOOK_UP_FORUM}{L_COLON}</label></dt>
|
||||
<dt><!-- EVENT acp_permissions_select_forum_prepend --><label for="sforum">{L_LOOK_UP_FORUM}{L_COLON}</label><!-- EVENT acp_permissions_select_forum_append --></dt>
|
||||
<dd><select id="sforum" name="subforum_id">{S_SUBFORUM_OPTIONS}</select></dd>
|
||||
</dl>
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
<fieldset>
|
||||
<legend>{L_LOOK_UP_GROUP}</legend>
|
||||
<dl>
|
||||
<dt><label for="group">{L_LOOK_UP_GROUP}{L_COLON}</label></dt>
|
||||
<dt><!-- EVENT acp_permissions_select_group_prepend --><label for="group">{L_LOOK_UP_GROUP}{L_COLON}</label><!-- EVENT acp_permissions_select_group_append --></dt>
|
||||
<dd><select name="group_id[]" id="group">{S_GROUP_OPTIONS}</select></dd>
|
||||
</dl>
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
<p>{L_USERNAMES_EXPLAIN}</p>
|
||||
<dl>
|
||||
<dd class="full"><textarea id="username" name="usernames" rows="5" cols="5" style="width: 100%; height: 60px;"></textarea></dd>
|
||||
<dd class="full" style="text-align: left;"><div style="float: {S_CONTENT_FLOW_END};">[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</div><label><input type="checkbox" class="radio" id="anonymous" name="user_id[]" value="{ANONYMOUS_USER_ID}" /> {L_SELECT_ANONYMOUS}</label></dd>
|
||||
<dd class="full" style="text-align: left;"><!-- EVENT acp_permissions_find_username_prepend --><div style="float: {S_CONTENT_FLOW_END};">[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</div><!-- EVENT acp_permissions_find_username_append --><label><input type="checkbox" class="radio" id="anonymous" name="user_id[]" value="{ANONYMOUS_USER_ID}" /> {L_SELECT_ANONYMOUS}</label></dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
@@ -183,7 +183,7 @@
|
||||
<fieldset>
|
||||
<legend>{L_ADD_GROUPS}</legend>
|
||||
<dl>
|
||||
<dd class="full"><select name="group_id[]" style="width: 100%; height: 107px;" multiple="multiple">{S_ADD_GROUP_OPTIONS}</select></dd>
|
||||
<dd class="full"><!-- EVENT acp_permissions_add_group_options_prepend --><select name="group_id[]" style="width: 100%; height: 107px;" multiple="multiple">{S_ADD_GROUP_OPTIONS}</select><!-- EVENT acp_permissions_add_group_options_append --></dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
@@ -267,7 +267,9 @@
|
||||
<legend>{L_LOOK_UP_GROUP}</legend>
|
||||
<dl>
|
||||
<dt><label for="group_select">{L_LOOK_UP_GROUP}{L_COLON}</label></dt>
|
||||
<!-- EVENT acp_permissions_select_group_before -->
|
||||
<dd><select name="group_id[]" id="group_select">{S_ADD_GROUP_OPTIONS}</select></dd>
|
||||
<!-- EVENT acp_permissions_select_group_after -->
|
||||
<dd> </dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
@@ -17,7 +17,7 @@
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<form id="add_profile_field" method="post" action="{U_ACTION}">
|
||||
<form id="add_profile_field" method="post" action="{U_ACTION}"{S_FORM_ENCTYPE}>
|
||||
|
||||
<!-- IF S_STEP_ONE -->
|
||||
|
||||
@@ -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>
|
||||
|
@@ -43,7 +43,7 @@
|
||||
<legend>{L_SELECT_FORUM}</legend>
|
||||
<p>{L_LOOK_UP_FORUMS_EXPLAIN}</p>
|
||||
<dl>
|
||||
<dt><label for="forum">{L_LOOK_UP_FORUM}{L_COLON}</label></dt>
|
||||
<dt><!-- EVENT acp_prune_forums_prepend --><label for="forum">{L_LOOK_UP_FORUM}{L_COLON}</label><!-- EVENT acp_prune_forums_append --></dt>
|
||||
<dd><select id="forum" name="f[]" multiple="multiple" size="10">{S_FORUM_OPTIONS}</select></dd>
|
||||
<dd><label><input type="checkbox" class="radio" name="all_forums" value="1" /> {L_ALL_FORUMS}</label></dd>
|
||||
</dl>
|
||||
|
@@ -50,7 +50,7 @@
|
||||
<dl>
|
||||
<dt><label for="users">{L_ACP_PRUNE_USERS}{L_COLON}</label><br /><span>{L_SELECT_USERS_EXPLAIN}</span></dt>
|
||||
<dd><textarea id="users" name="users" cols="40" rows="5"></textarea></dd>
|
||||
<dd>[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]</dd>
|
||||
<dd><!-- EVENT acp_prune_users_find_username_prepend -->[ <a href="{U_FIND_USERNAME}" onclick="find_username(this.href); return false;">{L_FIND_USERNAME}</a> ]<!-- EVENT acp_prune_users_find_username_append --></dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
||||
|
@@ -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}
|
||||
@@ -83,6 +87,7 @@
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF .styles_list -->
|
||||
<!-- EVENT acp_styles_list_before -->
|
||||
<table class="table1 styles">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -95,7 +100,7 @@
|
||||
</thead>
|
||||
<!-- BEGIN styles_list -->
|
||||
<tbody id="styles-list-{styles_list.S_ROW_COUNT}">
|
||||
<tr<!-- IF styles_list.STYLE_ID and not styles_list.STYLE_ACTIVE --> class="row-inactive"<!-- ENDIF -->>
|
||||
<tr class="row-highlight<!-- IF styles_list.STYLE_ID and not styles_list.STYLE_ACTIVE --> row-inactive<!-- ENDIF -->">
|
||||
<!-- IF styles_list.LEVEL is odd -->
|
||||
<!-- IF $ROW_CLASS == 'row1a' --><!-- DEFINE $ROW_CLASS = 'row1b' --><!-- ELSE --><!-- DEFINE $ROW_CLASS = 'row1a' --><!-- ENDIF -->
|
||||
<!-- ELSE -->
|
||||
|
@@ -146,7 +146,9 @@
|
||||
|
||||
<!-- IF S_GROUP_OPTIONS -->
|
||||
<fieldset class="quick">
|
||||
<!-- EVENT acp_users_select_group_before -->
|
||||
{L_USER_GROUP_ADD}{L_COLON} <select name="g">{S_GROUP_OPTIONS}</select> <input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
|
||||
<!-- EVENT acp_users_select_group_after -->
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
<!-- ENDIF -->
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<form id="user_profile" method="post" action="{U_ACTION}">
|
||||
<form id="user_profile" method="post" action="{U_ACTION}"{S_FORM_ENCTYPE}>
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_USER_PROFILE}</legend>
|
||||
|
@@ -17,6 +17,10 @@
|
||||
font-size: 100%;
|
||||
}
|
||||
|
||||
abbr {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
body, div, p, th, td, li, dd {
|
||||
font-size: x-small;
|
||||
voice-family: "\"}\"";
|
||||
@@ -855,6 +859,8 @@ table.zebra-table tbody tr:nth-child(even) {
|
||||
.row2a { background-color: #E7EEF4; }
|
||||
.row2b { background-color: #E3EBF2; }
|
||||
|
||||
tr.row-highlight:hover td { background-color: #DBDFE2; }
|
||||
|
||||
.spacer {
|
||||
background-color: #DBDFE2;
|
||||
height: 1px;
|
||||
|
@@ -12,7 +12,7 @@
|
||||
<legend>{L_LOOK_UP_FORUM}</legend>
|
||||
|
||||
<dl>
|
||||
<dt><label for="src_forum">{L_COPY_PERMISSIONS_FROM}{L_COLON}</label><br /><span>{L_COPY_PERMISSIONS_FORUM_FROM_EXPLAIN}</span></dt>
|
||||
<dt><!-- EVENT acp_permission_forum_copy_src_forum_prepend --><label for="src_forum">{L_COPY_PERMISSIONS_FROM}{L_COLON}</label><br /><span>{L_COPY_PERMISSIONS_FORUM_FROM_EXPLAIN}</span><!-- EVENT acp_permission_forum_copy_src_forum_append --></dt>
|
||||
<dd><select id="src_forum" name="src_forum_id"><option value="0">{L_SELECT_FORUM}</option><option value="-1">------------------</option>{S_FORUM_OPTIONS}</select></dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
@@ -22,7 +22,7 @@
|
||||
<p>{L_LOOK_UP_FORUMS_EXPLAIN}</p>
|
||||
|
||||
<dl>
|
||||
<dt><label for="dest_forums">{L_COPY_PERMISSIONS_TO}{L_COLON}</label><br /><span>{L_COPY_PERMISSIONS_FORUM_TO_EXPLAIN}</span></dt>
|
||||
<dt><!-- EVENT acp_permission_forum_copy_dest_forum_prepend --><label for="dest_forums">{L_COPY_PERMISSIONS_TO}{L_COLON}</label><br /><span>{L_COPY_PERMISSIONS_FORUM_TO_EXPLAIN}</span><!-- EVENT acp_permission_forum_copy_dest_forum_append --></dt>
|
||||
<dd><select id="dest_forums" name="dest_forum_ids[]" multiple="multiple" size="10">{S_FORUM_OPTIONS}</select></dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
@@ -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;
|
||||
@@ -298,6 +303,10 @@ phpbb.ajaxify = function(options) {
|
||||
alert = phpbb.alert(res.MESSAGE_TITLE, res.MESSAGE_TEXT);
|
||||
} else {
|
||||
$dark.fadeOut(phpbb.alertTime);
|
||||
|
||||
if ($loadingIndicator) {
|
||||
$loadingIndicator.fadeOut(phpbb.alertTime);
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof phpbb.ajaxCallbacks[callback] === 'function') {
|
||||
@@ -389,8 +398,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);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -427,10 +439,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]) {
|
||||
@@ -440,39 +452,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();
|
||||
@@ -482,11 +490,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) {
|
||||
@@ -498,10 +506,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;
|
||||
@@ -512,11 +520,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) {
|
||||
@@ -529,14 +535,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() {
|
||||
@@ -551,16 +556,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),
|
||||
@@ -582,7 +587,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;
|
||||
}
|
||||
@@ -593,8 +601,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) {
|
||||
@@ -607,14 +615,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') {
|
||||
@@ -641,12 +647,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);
|
||||
@@ -683,8 +687,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();
|
||||
@@ -703,8 +706,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');
|
||||
@@ -714,12 +717,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';
|
||||
@@ -740,11 +741,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);
|
||||
@@ -753,11 +752,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);
|
||||
@@ -766,7 +763,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');
|
||||
@@ -789,7 +787,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')) {
|
||||
@@ -797,7 +795,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) {
|
||||
@@ -824,7 +822,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) {
|
||||
|
||||
@@ -893,8 +891,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') {
|
||||
@@ -985,7 +983,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:
|
||||
@@ -1022,15 +1020,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);
|
||||
}
|
||||
|
||||
@@ -1046,7 +1048,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) {
|
||||
@@ -1055,8 +1057,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));
|
||||
}
|
||||
}
|
||||
@@ -1085,7 +1086,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,
|
||||
@@ -1157,7 +1158,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,
|
||||
@@ -1173,7 +1174,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) {
|
||||
@@ -1190,7 +1191,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,
|
||||
@@ -1232,6 +1233,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
|
||||
@@ -1324,12 +1350,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');
|
||||
@@ -1391,14 +1420,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 = '';
|
||||
@@ -1409,32 +1436,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>';
|
||||
}
|
||||
}
|
||||
@@ -1445,7 +1473,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'),
|
||||
@@ -1474,15 +1502,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) {
|
||||
@@ -1503,8 +1531,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() {
|
||||
@@ -1518,11 +1545,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;
|
||||
|
||||
@@ -1587,6 +1614,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
17
phpBB/assets/plupload/plupload.full.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -25,7 +25,7 @@
|
||||
"phpbb/phpbb-core": "self.version"
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3",
|
||||
"php": ">=5.3.3,<7.0",
|
||||
"lusitanian/oauth": "0.2.*",
|
||||
"symfony/config": "2.3.*",
|
||||
"symfony/console": "2.3.*",
|
||||
@@ -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.*",
|
||||
|
533
phpBB/composer.lock
generated
533
phpBB/composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -60,6 +60,7 @@ services:
|
||||
- %core.php_ext%
|
||||
- @path_helper
|
||||
- @mimetype.guesser
|
||||
- @dispatcher
|
||||
- @cache.driver
|
||||
calls:
|
||||
- [set_name, [avatar.driver.upload]]
|
||||
|
@@ -120,6 +120,7 @@ services:
|
||||
- @config
|
||||
- @dbal.conn
|
||||
- @user
|
||||
- @dispatcher
|
||||
calls:
|
||||
- [set_name, [cron.task.core.tidy_search]]
|
||||
tags:
|
||||
|
@@ -32,3 +32,10 @@ services:
|
||||
class: phpbb\event\kernel_terminate_subscriber
|
||||
tags:
|
||||
- { name: kernel.event_subscriber }
|
||||
|
||||
symfony_response_listener:
|
||||
class: Symfony\Component\HttpKernel\EventListener\ResponseListener
|
||||
arguments:
|
||||
- UTF-8
|
||||
tags:
|
||||
- { name: kernel.event_subscriber }
|
||||
|
@@ -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')
|
||||
{
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -6,7 +6,7 @@
|
||||
<meta name="description" content="phpBB 3.1.x Changelog" />
|
||||
<title>phpBB • Changelog</title>
|
||||
|
||||
<link href="assets/css/stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
|
||||
<link href="assets/css/stylesheet.css" rel="stylesheet" type="text/css" media="screen" />
|
||||
|
||||
</head>
|
||||
|
||||
@@ -49,6 +49,9 @@
|
||||
<ol>
|
||||
<li><a href="#changelog">Changelog</a>
|
||||
<ul>
|
||||
<li><a href="#v316">Changes since 3.1.6</a></li>
|
||||
<li><a href="#v315">Changes since 3.1.5</a></li>
|
||||
<li><a href="#v314">Changes since 3.1.4</a></li>
|
||||
<li><a href="#v313">Changes since 3.1.3</a></li>
|
||||
<li><a href="#v313rc1">Changes since 3.1.3-RC1</a></li>
|
||||
<li><a href="#v312">Changes since 3.1.2</a></li>
|
||||
@@ -68,6 +71,7 @@
|
||||
<li><a href="#v310a2">Changes since 3.1.0-a2</a></li>
|
||||
<li><a href="#v310a1">Changes since 3.1.0-a1</a></li>
|
||||
<li><a href="#v30x">Changes since 3.0.x</a></li>
|
||||
<li><a href="#v3013-PL1">Changes since 3.0.13-PL1</a></li>
|
||||
<li><a href="#v3013">Changes since 3.0.13</a></li>
|
||||
<li><a href="#v3012">Changes since 3.0.12</a></li>
|
||||
<li><a href="#v3011">Changes since 3.0.11</a></li>
|
||||
@@ -110,8 +114,291 @@
|
||||
|
||||
<div class="content">
|
||||
|
||||
<a name="v316"></a><h3>Changes since 3.1.6</h3>
|
||||
|
||||
<h4>Bug</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8839">PHPBB3-8839</a>] - Wrong new status of subforumlink on index</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8920">PHPBB3-8920</a>] - PM-Report for every moderator</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9153">PHPBB3-9153</a>] - New member can delete pm just in one way</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9252">PHPBB3-9252</a>] - Conflict when (dis)approving a post by two moderators at the same time</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11468">PHPBB3-11468</a>] - Controllers can not set additional parameters of page_header()</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11971">PHPBB3-11971</a>] - Validating not correctly in Spambot countermeasures</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12616">PHPBB3-12616</a>] - Report notification is not removed when post is disapproved or deleted</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13202">PHPBB3-13202</a>] - dead code in sessions.php</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13423">PHPBB3-13423</a>] - Driver sqlite3 failed periodically</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13636">PHPBB3-13636</a>] - Unexpect return to previous page behaviour</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13656">PHPBB3-13656</a>] - database_upgrade.php fails when database password contains a % character</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13748">PHPBB3-13748</a>] - Wrong tooltip after poll vote change</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13759">PHPBB3-13759</a>] - submit_post doesn't take $data['post_time'] - into account</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13799">PHPBB3-13799</a>] - Avatar gallery subfolders paths are handled incorrectly</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13831">PHPBB3-13831</a>] - Post deletion reason is not appearing on moderation logs</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13835">PHPBB3-13835</a>] - File upload of large files where filename contains umlauts fails</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13846">PHPBB3-13846</a>] - Permissions around soft deleting are inconsistently handled</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13851">PHPBB3-13851</a>] - "Can ignore flood limit" permission not taking effect</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13892">PHPBB3-13892</a>] - "Someone reports a post" notification setting has no effect</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13945">PHPBB3-13945</a>] - Account re-activation does not create a notification</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13950">PHPBB3-13950</a>] - If disabled extension - no hidden permission set</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13960">PHPBB3-13960</a>] - Profile field validation may break</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13976">PHPBB3-13976</a>] - Fix comment typo in salted_md5 driver</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13988">PHPBB3-13988</a>] - Atom feeds use relative links for image attachments</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13992">PHPBB3-13992</a>] - Fix html5 error from output on w3.org its new validator</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14058">PHPBB3-14058</a>] - subsilver2 Contact us form doesn't have an email subject field</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14070">PHPBB3-14070</a>] - Disabled avatar types is still displayed on the forum</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14106">PHPBB3-14106</a>] - Sorting is unworkable while moderating forum (merge topics)</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14114">PHPBB3-14114</a>] - Inconsistency in install.html in 3.1.x Automatic uopdate package</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14127">PHPBB3-14127</a>] - Error in the BBCode FAQ in 'Linking to another site'</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14142">PHPBB3-14142</a>] - Remove unused ignore_configs from avatar drivers</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14143">PHPBB3-14143</a>] - Flush the in-memory mail queue when writing it to the disk</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14153">PHPBB3-14153</a>] - Notifications dropdown header doesn't clear floats</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14159">PHPBB3-14159</a>] - Not accessible link on main ACP page</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14161">PHPBB3-14161</a>] - The core.download_file_send_to_browser_before - $vars - 'extension' it does not exist</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14163">PHPBB3-14163</a>] - Select All in code bug in Edge</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14181">PHPBB3-14181</a>] - Custom report/denial reason not shown in user notifications</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14186">PHPBB3-14186</a>] - Incorrect string concatenation in phpbb_mcp_sorting()</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14200">PHPBB3-14200</a>] - Allow hidden users to see theself on viewonline</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14215">PHPBB3-14215</a>] - [ticket/14212] - Adding event after users have been removed to a group</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14217">PHPBB3-14217</a>] - [ticket/13591] - Change SQL query into array to allow</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14224">PHPBB3-14224</a>] - Fix trailing whitespaces</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14228">PHPBB3-14228</a>] - Vertical align of numbers in polls</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14236">PHPBB3-14236</a>] - Race condition in the functional tests</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14242">PHPBB3-14242</a>] - Fix on memberlist the sort method.</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14249">PHPBB3-14249</a>] - Online list isn't sorted anymore</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14258">PHPBB3-14258</a>] - Add event in auth::Login</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14271">PHPBB3-14271</a>] - Update nginx sample config</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14276">PHPBB3-14276</a>] - Function get_folder_status not setup for use of plurals</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14287">PHPBB3-14287</a>] - Loading indicator not removed after confirming action that does not produce a message</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14297">PHPBB3-14297</a>] - Uppercase and lowercase when sorting topics</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14334">PHPBB3-14334</a>] - Do not use deprecated function get_user_avatar() in user_loader</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14339">PHPBB3-14339</a>] - State support for PHP 7.0 in docs</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14346">PHPBB3-14346</a>] - Improve version check output when phpbb.com is unreachable</li>
|
||||
</ul>
|
||||
<h4>Improvement</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-7362">PHPBB3-7362</a>] - Title/Post Icons Need Attribute Text</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8800">PHPBB3-8800</a>] - Add "mark topics read" link to "View unread posts"</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10343">PHPBB3-10343</a>] - ACP: searching for users does not show inactive accounts</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13684">PHPBB3-13684</a>] - Only resize attached file comments vertically</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13934">PHPBB3-13934</a>] - Enctype clause for forms may be needed for profile fields</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14066">PHPBB3-14066</a>] - Add template events to search_body.html</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14073">PHPBB3-14073</a>] - Add core events to the several places in includes/functions_admin.php</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14075">PHPBB3-14075</a>] - Event in posting preview</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14080">PHPBB3-14080</a>] - Add template events to viewforum_body.html before/after/append/prepend the topic row</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14088">PHPBB3-14088</a>] - Add core events to the search.php</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14089">PHPBB3-14089</a>] - [Template] - posting_topic_title_after</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14098">PHPBB3-14098</a>] - Add core events to the search backends (fulltext_*.php)</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14102">PHPBB3-14102</a>] - Add core event to the mcp_topic.php</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14113">PHPBB3-14113</a>] - Add core events to the memberlist.php for customizing members search</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14117">PHPBB3-14117</a>] - Add core events to index.php to allow modifying birthdays list</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14123">PHPBB3-14123</a>] - Add more descriptive help to the CLI commands</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14126">PHPBB3-14126</a>] - Add viewtopic_topic_title_after template event</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14133">PHPBB3-14133</a>] - Comment fix for phpbb_get_user_rank()</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14154">PHPBB3-14154</a>] - Include "Clean Name" for disabled Extensions</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14155">PHPBB3-14155</a>] - Add row highlighting to extensions and style management</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14156">PHPBB3-14156</a>] - Add the Symfony ResponseListener</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14164">PHPBB3-14164</a>] - Helpful instructions for database updates</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14170">PHPBB3-14170</a>] - Fix mcp_change_poster_after event</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14201">PHPBB3-14201</a>] - Add ACP template events</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14213">PHPBB3-14213</a>] - [PHP] - core.group_add_user_after</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14219">PHPBB3-14219</a>] - Add email address into inactive user display in ACP</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14261">PHPBB3-14261</a>] - Pages served from app.php can't disable the update of session_page</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14283">PHPBB3-14283</a>] - Add a "Manage Group" link on a group page</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14313">PHPBB3-14313</a>] - Don't display quote button on unapproved posts</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14343">PHPBB3-14343</a>] - Add event when locking/unlocking posts/topics</li>
|
||||
</ul>
|
||||
<h4>New Feature</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14144">PHPBB3-14144</a>] - [Template] - quickreply_editor_subject_before</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14146">PHPBB3-14146</a>] - [Template] - viewtopic_body_post_subject_before</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14187">PHPBB3-14187</a>] - [ACP Template] - acp_styles_before_table</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14188">PHPBB3-14188</a>] - [PHP] - core.acp_styles_action_before</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14191">PHPBB3-14191</a>] - [PHP] - core.get_gravatar_url_after</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14192">PHPBB3-14192</a>] - [PHP] - core.memberlist_memberrow_before</li>
|
||||
</ul>
|
||||
<h4>Task</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14140">PHPBB3-14140</a>] - Update Symfony to benefit from improvement to the console component</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<a name="v315"></a><h3>Changes since 3.1.5</h3>
|
||||
|
||||
<h4>Bug</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10711">PHPBB3-10711</a>] - SQL error DUPLICATE for KEY in FORUMS_TRACK_TABLE </li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13711">PHPBB3-13711</a>] - disabled accounts receive mails</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13815">PHPBB3-13815</a>] - Event parameters in posting do not affect behavior as expected</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13903">PHPBB3-13903</a>] - Container naming doesn't allow Windows' semicolon</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13930">PHPBB3-13930</a>] - Check for correct spacing between keyword & parenthesis in codesniffer</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13941">PHPBB3-13941</a>] - One test is blocked in an inifinite loop on php 5.5+ and with sqlite3</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13948">PHPBB3-13948</a>] - Only reports top level WHOIS IP for a user in ACP</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13949">PHPBB3-13949</a>] - Replace colon with colon lang key in memberlist search page</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13951">PHPBB3-13951</a>] - Jump to page function does not work since 3.1.5 upgrade</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13952">PHPBB3-13952</a>] - Fulltext Native errors from tidy_search cron task</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13955">PHPBB3-13955</a>] - 3.1.5 not loading CDN resources</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13962">PHPBB3-13962</a>] - Forum dropdown in MCP queue could expand beyond screen size</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13966">PHPBB3-13966</a>] - Change post's author --> error message</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13967">PHPBB3-13967</a>] - BBCode guide - loading phpBB logo image breaks https</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13980">PHPBB3-13980</a>] - Current avatar not removed when uploading with different extension</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13984">PHPBB3-13984</a>] - AJAX Loading Indicator broken</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14037">PHPBB3-14037</a>] - Memberlist profile fields headlines not computed from same way as data</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14049">PHPBB3-14049</a>] - Plupload delete request should use config headers</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14069">PHPBB3-14069</a>] - Incorrect sql_fetchfield call in style_update_p1 migration</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14077">PHPBB3-14077</a>] - Select all code not work in Microsoft Edge</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14082">PHPBB3-14082</a>] - Fix wrong variables in fulltext native search for keyworded results</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14083">PHPBB3-14083</a>] - Fix wrong variables in fulltext mysql search for author search</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14093">PHPBB3-14093</a>] - Hardcoded language in ucp_pm_viewfolder.html</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14103">PHPBB3-14103</a>] - Underline in abbreviations in Firefox 40</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14104">PHPBB3-14104</a>] - Fix missing variable in fulltext native search query for total results for author</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14115">PHPBB3-14115</a>] - Microdata is not valid in prosilver</li>
|
||||
</ul>
|
||||
<h4>Improvement</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11530">PHPBB3-11530</a>] - Remove quotes that are too deep automatically</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12952">PHPBB3-12952</a>] - Display HTTP Output along with Status code in case assertion fails in functional tests</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13598">PHPBB3-13598</a>] - Add an option to post a locked topic</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13786">PHPBB3-13786</a>] - Add core events to add MCP post options</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13818">PHPBB3-13818</a>] - Browse Extensions Database link in Extension Manager</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13843">PHPBB3-13843</a>] - Add templates events to insert custom panel-tab into posting editor</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13863">PHPBB3-13863</a>] - [Template] - topiclist_row_append/topiclist_row_prepend in mcp_forum.html</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13879">PHPBB3-13879</a>] - We're using px most places but ems in others</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13882">PHPBB3-13882</a>] - Avatars in notifications should be lazy loaded</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13899">PHPBB3-13899</a>] - Add items to core.search_results_modify_search_title</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13911">PHPBB3-13911</a>] - Add configuration options to profile fields</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13931">PHPBB3-13931</a>] - Wrong order in docs/events.md</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13968">PHPBB3-13968</a>] - [PHP] - core.user_setup_after</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13971">PHPBB3-13971</a>] - Add draft_id variable to event core.posting_modify_template_vars</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13981">PHPBB3-13981</a>] - Events to intercept uploaded avatar deletion</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13995">PHPBB3-13995</a>] - Invalid HTML using Projection Media Type</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14002">PHPBB3-14002</a>] - Add template events before/after user details in ucp_main_front.html</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14005">PHPBB3-14005</a>] - Allow extensions control post buttons displaying</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14014">PHPBB3-14014</a>] - [PHP] - mcp_forum_view_actions</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14064">PHPBB3-14064</a>] - Add template events to ucp_pm_history.html</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14065">PHPBB3-14065</a>] - Add template events to attachment.html</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14067">PHPBB3-14067</a>] - Add template events to overall_header.html around feeds</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14068">PHPBB3-14068</a>] - New events around poll panel in viewtopic</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14072">PHPBB3-14072</a>] - Add core event to the function format_display()</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14085">PHPBB3-14085</a>] - [Template] - posting_topic_title_prepend</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14086">PHPBB3-14086</a>] - [Template] - Add mcp_forum_topic_title_*</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14090">PHPBB3-14090</a>] - [Template] - mcp_topic_topic_title_*</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14091">PHPBB3-14091</a>] - [Template] - mcp_topic_subject_*</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14101">PHPBB3-14101</a>] - Add core event to the download/file.php</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14116">PHPBB3-14116</a>] - sql_affectedrows has no arguments</li>
|
||||
</ul>
|
||||
<h4>New Feature</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12692">PHPBB3-12692</a>] - Add a console command to manage the thumbnail</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13311">PHPBB3-13311</a>] - Add php event to acp manage_forums when deleting content</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13974">PHPBB3-13974</a>] - Add php event for altering data when changing a post's poster</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13997">PHPBB3-13997</a>] - [Template] - posting_editor_submit_buttons</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14006">PHPBB3-14006</a>] - [PHP] - core.ucp_register_agreement</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14041">PHPBB3-14041</a>] - [Template] - viewtopic_dropdown_top_custom</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14042">PHPBB3-14042</a>] - [Template] - viewtopic_dropdown_bottom_custom</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14043">PHPBB3-14043</a>] - [PHP] - core.get_avatar_after</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14087">PHPBB3-14087</a>] - Add an event to ucp_activate.php.</li>
|
||||
</ul>
|
||||
<h4>Sub-task</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13694">PHPBB3-13694</a>] - Allow modifying the Postgres author search query for results</li>
|
||||
</ul>
|
||||
<h4>Task</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13947">PHPBB3-13947</a>] - Add CHItA to developer list</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14010">PHPBB3-14010</a>] - Update Plupload to 2.1.8</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14099">PHPBB3-14099</a>] - Update Twig to 1.20</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<a name="v314"></a><h3>Changes since 3.1.4</h3>
|
||||
|
||||
<h4>Bug</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-9563">PHPBB3-9563</a>] - Empty categories showing up on index</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11521">PHPBB3-11521</a>] - Missing language string when migration is invalid</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11532">PHPBB3-11532</a>] - acp_users_overview.html autocompletes "confirm email" and "password" fields in chrome</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13516">PHPBB3-13516</a>] - icc-profiler check should skip extensions vendor</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13564">PHPBB3-13564</a>] - User is not removed from oauth tables upon deletion</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13664">PHPBB3-13664</a>] - Allow changing total list for unapproved posts in mcp_front</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13755">PHPBB3-13755</a>] - uploading attachments results in error: parsing server response. </li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13763">PHPBB3-13763</a>] - Language Spelling Error: Completly</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13771">PHPBB3-13771</a>] - AJAX responses do not support exceptions messages</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13772">PHPBB3-13772</a>] - Error in @param variable type for phpbb\passwords\manager</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13779">PHPBB3-13779</a>] - Permission set migration tool grants regular users heightened permissions</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13787">PHPBB3-13787</a>] - Duplicate entry of poll_delete in prosilver template</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13792">PHPBB3-13792</a>] - Travis fails installing hhvm-nigthly</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13819">PHPBB3-13819</a>] - Add missing sql_freeresult() to files in includes/</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13822">PHPBB3-13822</a>] - Permissions are in the wrong category</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13823">PHPBB3-13823</a>] - Update package is missing file with inline whitespace changes</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13827">PHPBB3-13827</a>] - controller\helper::message does not return JSON object for AJAX requests</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13830">PHPBB3-13830</a>] - phpcs doesn't detect class using in catch blocks</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13833">PHPBB3-13833</a>] - Submit a lot of messages without timeout between messages</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13838">PHPBB3-13838</a>] - Add a sniff to ensure that the opening brace of a control statement is on the line after</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13852">PHPBB3-13852</a>] - Inconsistent tab navigation when login in</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13861">PHPBB3-13861</a>] - Old styles are not removed by style update migration</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13868">PHPBB3-13868</a>] - Adding multiple language files for acp/mcp/ucp modules is incorrectly handled for extensions</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13873">PHPBB3-13873</a>] - Remove broken print stylesheet in preference of &view=print</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13875">PHPBB3-13875</a>] - Lint test should ignore cache, ext, and store folder</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13878">PHPBB3-13878</a>] - Properly display background images when printing with webkit browser</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13888">PHPBB3-13888</a>] - "Couldn't fetch mysqli_result" error on username search and egosearch</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13913">PHPBB3-13913</a>] - Post subject of password protected and list-only forums shown on board index</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13922">PHPBB3-13922</a>] - Whitespace found at end of line phpBB/includes/functions_admin.php</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13928">PHPBB3-13928</a>] - Fix build_cfg_template_test after ticket/sec-184 </li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13939">PHPBB3-13939</a>] - phpBB no longer shows error messages when uploading files with drag/drop</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13942">PHPBB3-13942</a>] - phpbb\user::set_lang() adds extra path and PHP extension to ext lang files</li>
|
||||
</ul>
|
||||
<h4>Improvement</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12101">PHPBB3-12101</a>] - Redirect for Microsoft servers in /includes/functions.php:redirect()</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12542">PHPBB3-12542</a>] - Highlight textarea when files are dragged over it</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12717">PHPBB3-12717</a>] - Improve the code sniffer</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13200">PHPBB3-13200</a>] - Add autocomplete="off" to additional password fields</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13648">PHPBB3-13648</a>] - Allow extensions using custom bbcode validation methods</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13699">PHPBB3-13699</a>] - Add template events in viewforum_body.html before and after the title</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13745">PHPBB3-13745</a>] - Add veiwtopic.php core event to allow manipulating poll data</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13750">PHPBB3-13750</a>] - Add generate_forum_nav() core event to allow modifying navlinks text</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13752">PHPBB3-13752</a>] - Add viewonline.php core event to allow modifying forum data SQL query</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13753">PHPBB3-13753</a>] - Add template events to forum category header</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13778">PHPBB3-13778</a>] - Misleading instruction text for recaptcha plugin</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13790">PHPBB3-13790</a>] - Update phpcs to 2.3.2</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13791">PHPBB3-13791</a>] - Add more post buttons template events to viewtopic_body.html</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13808">PHPBB3-13808</a>] - Add event before and after the search form</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13809">PHPBB3-13809</a>] - Test php parsing on php7 on travis</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13841">PHPBB3-13841</a>] - Add event when topics are moved</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13858">PHPBB3-13858</a>] - Make the Plupload uploader instance available in the global namespace</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13872">PHPBB3-13872</a>] - Allow template events to have a changed tag</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13876">PHPBB3-13876</a>] - Use async webfontloader to load webfont from googles CDN</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13905">PHPBB3-13905</a>] - loading.gif loaded before document load when it isn't needed</li>
|
||||
</ul>
|
||||
<h4>Security Issue</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13917">PHPBB3-13917</a>] - Use hash_equals() if possible in password driver helper</li>
|
||||
<li>[SECURITY-184] - Do not output passwords to HTML input fields</li>
|
||||
</ul>
|
||||
<h4>Sub-task</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13660">PHPBB3-13660</a>] - Allow changing the query for total reports in mcp_front</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13661">PHPBB3-13661</a>] - Allow changing how and which logs are retrieved</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13668">PHPBB3-13668</a>] - Allow modifying the query to get details from the post report</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13672">PHPBB3-13672</a>] - Allow changing the query to obtain the user-submitted report.</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13685">PHPBB3-13685</a>] - Allow modifying the keywords search query for mysql fulltext search</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13686">PHPBB3-13686</a>] - Allow modifying the fulltext native search query for total results before before</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13689">PHPBB3-13689</a>] - Allow modifying the Postgres native search query for results</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13691">PHPBB3-13691</a>] - Allow modifying the fulltext native search query for total results for author</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13693">PHPBB3-13693</a>] - Allow modifying the MySQL author search query for results</li>
|
||||
</ul>
|
||||
<h4>Task</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13807">PHPBB3-13807</a>] - Extend event exporter to filter by min or max version to allow generating event diffs for releases</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13887">PHPBB3-13887</a>] - JS could use some refactoring</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<a name="v313"></a><h3>Changes since 3.1.3</h3>
|
||||
|
||||
<h4>Security</h4>
|
||||
<ul>
|
||||
<li>[SECURITY-180] - An insufficient check allowed users of the Google Chrome browser to be redirected to external domains (e.g. on login)</li>
|
||||
</ul>
|
||||
<h4>Bug</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-8050">PHPBB3-8050</a>] - Avatar & Long PM recipients list break out of template</li>
|
||||
@@ -2326,6 +2613,35 @@
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11870">PHPBB3-11870</a>] - No longer exclude ./phpBB/phpbb/search/fulltext_*.php from code coverage</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11885">PHPBB3-11885</a>] - Add migrations for 3.0.12-RCx and 3.0.12</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11913">PHPBB3-11913</a>] - Apply reorganisation of download.phpbb.com to build_announcement.php</li>
|
||||
</ul>
|
||||
|
||||
<a name="v3013-PL1"></a><h3>Changes since 3.0.13-PL1</h3>
|
||||
|
||||
<h4>Security</h4>
|
||||
<ul>
|
||||
<li>[SECURITY-180] - An insufficient check allowed users of the Google Chrome browser to be redirected to external domains (e.g. on login)</li>
|
||||
</ul>
|
||||
<h4>Bug</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13348">PHPBB3-13348</a>] - sql_freeresult() should be called in feed base class</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13414">PHPBB3-13414</a>] - download/file.php sends Content-Length header even when issuing 304 Not Modified</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13555">PHPBB3-13555</a>] - Poll options preview rendered incorrectly by <br /> collision</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13568">PHPBB3-13568</a>] - Imagick path validated as relative path although ACP asks for absolute path</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13617">PHPBB3-13617</a>] - Bot session continuation with invalid f= query parameter causes SQL error</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13738">PHPBB3-13738</a>] - Sami still refers to develop-* branches</li>
|
||||
</ul>
|
||||
<h4>Improvement</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12089">PHPBB3-12089</a>] - Make HTTP status code assertion failure messages more informative</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13765">PHPBB3-13765</a>] - Verify that SERVER_PROTOCOL has the expected format</li>
|
||||
</ul>
|
||||
<h4>Task</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11539">PHPBB3-11539</a>] - Add unit tests for several functions in functions.php</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13572">PHPBB3-13572</a>] - Upgrade composer to 1.0.0-alpha9</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13599">PHPBB3-13599</a>] - Remove PHP 5.2 Travis environment</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13634">PHPBB3-13634</a>] - Update README to show new branch names</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13723">PHPBB3-13723</a>] - Update docs/AUTHORS for 3.0.14-RC1 / 3.1.4-RC1</li>
|
||||
</ul>
|
||||
|
||||
<a name="v3013"></a><h3>Changes since 3.0.13</h3>
|
||||
@@ -4860,7 +5176,7 @@
|
||||
</div></div>
|
||||
|
||||
<div>
|
||||
<a id="bottom" name="bottom" accesskey="z"></a>
|
||||
<a id="bottom" accesskey="z"></a>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
@@ -23,6 +23,7 @@ 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)
|
||||
|
@@ -6,7 +6,7 @@
|
||||
<meta name="description" content="phpBB 3.1.x frequently asked questions" />
|
||||
<title>phpBB • FAQ</title>
|
||||
|
||||
<link href="assets/css/stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
|
||||
<link href="assets/css/stylesheet.css" rel="stylesheet" type="text/css" media="screen" />
|
||||
|
||||
</head>
|
||||
|
||||
@@ -343,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="assets/css/stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
|
||||
<link href="assets/css/stylesheet.css" rel="stylesheet" type="text/css" media="screen" />
|
||||
|
||||
</head>
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
<li>Oracle</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><strong>PHP 5.3.3+</strong> with support for the database you intend to use.</li>
|
||||
<li><strong>PHP 5.3.3+</strong> and <strong>PHP < 7.0</strong> with support for the database you intend to use.</li>
|
||||
<li>The following PHP modules are required:
|
||||
<ul>
|
||||
<li>json</li>
|
||||
@@ -265,7 +265,7 @@
|
||||
|
||||
<p>If you are currently using a stable release of phpBB, updating to this version is straightforward. You would have downloaded one of four packages and your choice determines what you need to do. <strong>Note</strong>: Before updating, we heavily recommend you do a <em>full backup of your database and existing phpBB files</em>! If you are unsure how to achieve this please ask your hosting provider for advice.</p>
|
||||
|
||||
<p><strong>Please make sure you update your phpBB source files too, even if you run the <code>database_update.php</code> file.</strong></p>
|
||||
<p><strong>Please make sure you update your phpBB source files too, even if you run the <code>database_update.php</code> file.</strong> If you have shell access to your server, you may wish to update via the command line interface. From your board's root, execute the following command: <code>php bin/phpbbcli.php --safe-mode db:migrate</code>.</p>
|
||||
|
||||
<a name="update_full"></a><h3>4.i. Full package</h3>
|
||||
|
||||
@@ -273,7 +273,7 @@
|
||||
|
||||
<p>First, you should make a copy of your existing <code>config.php</code> file; keep it in a safe place! Next, delete all the existing phpBB files, you may want to leave your <code>files/</code> and <code>images/</code> directories in place. You can leave alternative styles in place too. With this complete, you can upload the new phpBB files (see <a href="#install">New installation</a> for details if necessary). Once complete, copy back your saved <code>config.php</code>, replacing the new one. Another method is to just <strong>replace</strong> the existing files with the files from the full package - though make sure you do <strong>not</strong> overwrite your config.php file.</p>
|
||||
|
||||
<p>You should now run <code>install/database_update.php</code> which, depending on your previous version, will make a number of database changes. You may receive <em>FAILURES</em> during this procedure. They should not be a cause for concern unless you see an actual <em>ERROR</em>, in which case the script will stop (in this case you should seek help via our forums or bug tracker).</p>
|
||||
<p>You should now run <code>install/database_update.php</code> which, depending on your previous version, will make a number of database changes. You may receive <em>FAILURES</em> during this procedure. They should not be a cause for concern unless you see an actual <em>ERROR</em>, in which case the script will stop (in this case you should seek help via our forums or bug tracker). If you have shell access to your server, you may wish to update via the command line interface. From your board's root, execute the following command: <code>php bin/phpbbcli.php --safe-mode db:migrate</code>.</p>
|
||||
|
||||
<p>Once <code>install/database_update.php</code> has completed, you may proceed to the Administration Control Panel and then remove the install directory as advised.</p>
|
||||
|
||||
@@ -285,7 +285,7 @@
|
||||
|
||||
<p>The directory structure has been preserved, enabling you (if you wish) to simply upload the uncompressed contents of the archive to the appropriate location on your server, i.e. simply overwrite the existing files with the new versions. Do not forget that if you have installed any modifications (MODs) these files will overwrite the originals, possibly destroying them in the process. You will need to re-add MODs to any affected file before uploading.</p>
|
||||
|
||||
<p>As for the other update procedures, you should run <code>install/database_update.php</code> after you have finished updating the files. This will update your database schema and increment the version number.</p>
|
||||
<p>As for the other update procedures, you should run <code>install/database_update.php</code> after you have finished updating the files. This will update your database schema and increment the version number. If you have shell access to your server, you may wish to update via the command line interface. From your board's root, execute the following command: <code>php bin/phpbbcli.php --safe-mode db:migrate</code>.</p>
|
||||
|
||||
<a name="update_patch"></a><h3>4.iii. Patch file</h3>
|
||||
|
||||
@@ -297,13 +297,13 @@
|
||||
|
||||
<p>If you do get failures, you should look at using the <a href="#update_files">Changed Files</a> package to replace the files which failed to patch. Please note that you will need to manually re-add any MODs to these particular files. Alternatively, if you know how, you can examine the .rej files to determine what failed where and make manual adjustments to the relevant source.</p>
|
||||
|
||||
<p>You should, of course, delete the patch file (or files) after use. As for the other update procedures, you should run <code>install/database_update.php</code> after you have finished updating the files. This will update your database schema and data (if appropriate) and increment the version number.</p>
|
||||
<p>You should, of course, delete the patch file (or files) after use. As for the other update procedures, you should run <code>install/database_update.php</code> after you have finished updating the files. This will update your database schema and data (if appropriate) and increment the version number. If you have shell access to your server, you may wish to update via the command line interface. From your board's root, execute the following command: <code>php bin/phpbbcli.php --safe-mode db:migrate</code>.</p>
|
||||
|
||||
<a name="update_auto"></a><h3>4.iv. Automatic update package</h3>
|
||||
|
||||
<p>This update method is the recommended method for updating. This package detects changed files automatically and merges in changes if needed.</p>
|
||||
|
||||
<p>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.12</strong>, you need the <code>phpBB-3.0.12_to_3.0.13.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.1.5</strong>, you need the <code>phpBB-3.1.5_to_3.1.6.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>
|
||||
|
||||
@@ -507,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="assets/css/stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
|
||||
<link href="assets/css/stylesheet.css" rel="stylesheet" type="text/css" media="screen" />
|
||||
|
||||
</head>
|
||||
|
||||
@@ -323,7 +323,7 @@
|
||||
|
||||
<div class="content">
|
||||
|
||||
<p>phpBB 3.1.x takes advantage of new features added in PHP 5.3. We recommend that you upgrade to the latest stable release of PHP5 to run phpBB. The minimum version required is PHP 5.3.3.</p>
|
||||
<p>phpBB 3.1.x takes advantage of new features added in PHP 5.3. We recommend that you upgrade to the latest stable release of PHP5 to run phpBB. The minimum version required is PHP 5.3.3 and the maximum supported version is any version prior to PHP 7.0.</p>
|
||||
|
||||
<p>Please remember that running any application on a development (unstable, e.g. a beta release) version of PHP can lead to strange/unexpected results which may appear to be bugs in the application. Therefore, we recommend you upgrade to the newest stable version of PHP before running phpBB. If you are running a development version of PHP please check any bugs you find on a system running a stable release before submitting.</p>
|
||||
|
||||
@@ -366,7 +366,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="This is an explanation of how to use the phpBB auth/acl API" />
|
||||
<title>phpBB3 • Auth API</title>
|
||||
|
||||
<link href="assets/css/stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
|
||||
<link href="assets/css/stylesheet.css" rel="stylesheet" type="text/css" media="screen" />
|
||||
|
||||
</head>
|
||||
|
||||
@@ -110,7 +110,7 @@ $auth = new phpbb\auth\auth();</pre>
|
||||
<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>
|
||||
@@ -285,7 +285,7 @@ $auth_admin = new auth_admin();</pre>
|
||||
</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="Ascraeus coding guidelines document" />
|
||||
<title>phpBB3 • Coding Guidelines</title>
|
||||
|
||||
<link href="assets/css/stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
|
||||
<link href="assets/css/stylesheet.css" rel="stylesheet" type="text/css" media="screen" />
|
||||
|
||||
</head>
|
||||
|
||||
@@ -300,9 +300,9 @@ PHPBB_QA (Set board to QA-Mode, which means the updater also c
|
||||
<div class="indent">
|
||||
<p><code>$current_user</code> is right, but <code>$currentuser</code> and <code> $currentUser</code> are not.</p>
|
||||
</div>
|
||||
|
||||
|
||||
<p>In JavaScript, variable names should use camel case:</p>
|
||||
|
||||
|
||||
<div class="indent">
|
||||
<p><code>currentUser</code> is right, but <code>currentuser</code> and <code>current_user</code> are not.</p>
|
||||
</div>
|
||||
@@ -431,7 +431,7 @@ function do_stuff()
|
||||
...
|
||||
}</pre>
|
||||
</div>
|
||||
|
||||
|
||||
<p>In JavaScript code, braces always go on the same line:</p>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
@@ -2568,7 +2568,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
|
||||
</div></div>
|
||||
|
||||
<div>
|
||||
<a id="bottom" name="bottom" accesskey="z"></a>
|
||||
<a id="bottom" accesskey="z"></a>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -64,6 +64,11 @@ http {
|
||||
location / {
|
||||
# phpbb uses index.htm
|
||||
index index.php index.html index.htm;
|
||||
try_files $uri $uri/ @rewriteapp;
|
||||
}
|
||||
|
||||
location @rewriteapp {
|
||||
rewrite ^(.*)$ /app.php/$1 last;
|
||||
}
|
||||
|
||||
# Deny access to internal phpbb files.
|
||||
@@ -75,12 +80,16 @@ http {
|
||||
}
|
||||
|
||||
# Pass the php scripts to fastcgi server specified in upstream declaration.
|
||||
location ~ \.php$ {
|
||||
fastcgi_pass php;
|
||||
# Necessary for php.
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
location ~ \.php(/|$) {
|
||||
# Unmodified fastcgi_params from nginx distribution.
|
||||
include fastcgi_params;
|
||||
# Necessary for php.
|
||||
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
||||
fastcgi_param DOCUMENT_ROOT $realpath_root;
|
||||
try_files $uri $uri/ /app.php$is_args$args;
|
||||
fastcgi_pass php;
|
||||
}
|
||||
|
||||
# Deny access to version control system directories.
|
||||
|
@@ -250,6 +250,31 @@ 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 extensions 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
|
||||
* @change 3.1.7-RC1 Fixing wrong name of a variable (replacing "extension" by "extensions")
|
||||
*/
|
||||
$vars = array(
|
||||
'attach_id',
|
||||
'attachment',
|
||||
'display_cat',
|
||||
'download_mode',
|
||||
'extensions',
|
||||
'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'];
|
||||
|
@@ -106,7 +106,10 @@ class acp_attachments
|
||||
{
|
||||
case 'attach':
|
||||
|
||||
include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
|
||||
if (!function_exists('get_supported_image_types'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
|
||||
}
|
||||
|
||||
$sql = 'SELECT group_name, cat_id
|
||||
FROM ' . EXTENSION_GROUPS_TABLE . '
|
||||
|
@@ -28,7 +28,10 @@ class acp_ban
|
||||
global $user, $template, $request, $phpbb_dispatcher;
|
||||
global $phpbb_root_path, $phpEx;
|
||||
|
||||
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
if (!function_exists('user_ban'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
}
|
||||
|
||||
$bansubmit = $request->is_set_post('bansubmit');
|
||||
$unbansubmit = $request->is_set_post('unbansubmit');
|
||||
|
@@ -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;
|
||||
|
@@ -141,7 +141,11 @@ class acp_bots
|
||||
|
||||
case 'edit':
|
||||
case 'add':
|
||||
include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
|
||||
if (!function_exists('user_update_name'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
}
|
||||
|
||||
$bot_row = array(
|
||||
'bot_name' => utf8_normalize_nfc(request_var('bot_name', '', true)),
|
||||
|
@@ -25,7 +25,7 @@ class acp_captcha
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $db, $user, $auth, $template;
|
||||
global $request, $user, $auth, $template;
|
||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx, $phpbb_container;
|
||||
|
||||
$user->add_lang('acp/board');
|
||||
@@ -52,11 +52,36 @@ class acp_captcha
|
||||
else
|
||||
{
|
||||
$config_vars = array(
|
||||
'enable_confirm' => array('tpl' => 'REG_ENABLE', 'default' => false),
|
||||
'enable_post_confirm' => array('tpl' => 'POST_ENABLE', 'default' => false),
|
||||
'confirm_refresh' => array('tpl' => 'CONFIRM_REFRESH', 'default' => false),
|
||||
'max_reg_attempts' => array('tpl' => 'REG_LIMIT', 'default' => 0),
|
||||
'max_login_attempts' => array('tpl' => 'MAX_LOGIN_ATTEMPTS', 'default' => 0),
|
||||
'enable_confirm' => array(
|
||||
'tpl' => 'REG_ENABLE',
|
||||
'default' => false,
|
||||
'validate' => 'bool',
|
||||
'lang' => 'VISUAL_CONFIRM_REG',
|
||||
),
|
||||
'enable_post_confirm' => array(
|
||||
'tpl' => 'POST_ENABLE',
|
||||
'default' => false,
|
||||
'validate' => 'bool',
|
||||
'lang' => 'VISUAL_CONFIRM_POST',
|
||||
),
|
||||
'confirm_refresh' => array(
|
||||
'tpl' => 'CONFIRM_REFRESH',
|
||||
'default' => false,
|
||||
'validate' => 'bool',
|
||||
'lang' => 'VISUAL_CONFIRM_REFRESH',
|
||||
),
|
||||
'max_reg_attempts' => array(
|
||||
'tpl' => 'REG_LIMIT',
|
||||
'default' => 0,
|
||||
'validate' => 'int:0:99999',
|
||||
'lang' => 'REG_LIMIT',
|
||||
),
|
||||
'max_login_attempts' => array(
|
||||
'tpl' => 'MAX_LOGIN_ATTEMPTS',
|
||||
'default' => 0,
|
||||
'validate' => 'int:0:99999',
|
||||
'lang' => 'MAX_LOGIN_ATTEMPTS',
|
||||
),
|
||||
);
|
||||
|
||||
$this->tpl_name = 'acp_captcha';
|
||||
@@ -65,12 +90,31 @@ class acp_captcha
|
||||
add_form_key($form_key);
|
||||
|
||||
$submit = request_var('main_submit', false);
|
||||
$error = $cfg_array = array();
|
||||
|
||||
if ($submit && check_form_key($form_key))
|
||||
if ($submit)
|
||||
{
|
||||
foreach ($config_vars as $config_var => $options)
|
||||
{
|
||||
set_config($config_var, request_var($config_var, $options['default']));
|
||||
$cfg_array[$config_var] = $request->variable($config_var, $options['default']);
|
||||
}
|
||||
validate_config_vars($config_vars, $cfg_array, $error);
|
||||
|
||||
if (!check_form_key($form_key))
|
||||
{
|
||||
$error[] = $user->lang['FORM_INVALID'];
|
||||
}
|
||||
if ($error)
|
||||
{
|
||||
$submit = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ($submit)
|
||||
{
|
||||
foreach ($cfg_array as $key => $value)
|
||||
{
|
||||
$config->set($key, $value);
|
||||
}
|
||||
|
||||
if ($selected !== $config['captcha_plugin'])
|
||||
@@ -94,10 +138,6 @@ class acp_captcha
|
||||
}
|
||||
trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($this->u_action));
|
||||
}
|
||||
else if ($submit)
|
||||
{
|
||||
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
else
|
||||
{
|
||||
$captcha_select = '';
|
||||
@@ -124,6 +164,7 @@ class acp_captcha
|
||||
'CAPTCHA_PREVIEW_TPL' => $demo_captcha->get_demo_template($id),
|
||||
'S_CAPTCHA_HAS_CONFIG' => $demo_captcha->has_config(),
|
||||
'CAPTCHA_SELECT' => $captcha_select,
|
||||
'ERROR_MSG' => implode('<br />', $error),
|
||||
|
||||
'U_ACTION' => $this->u_action,
|
||||
));
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -26,9 +26,7 @@ class acp_disallow
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $db, $user, $auth, $template, $cache;
|
||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||
|
||||
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
global $config, $phpbb_admin_path;
|
||||
|
||||
$user->add_lang('acp/posting');
|
||||
|
||||
|
@@ -189,8 +189,15 @@ class acp_email
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// Send the messages
|
||||
include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
|
||||
include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
if (!class_exists('messenger'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
|
||||
}
|
||||
|
||||
if (!function_exists('get_group_name'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
}
|
||||
$messenger = new messenger($use_queue);
|
||||
|
||||
$errored = false;
|
||||
|
@@ -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);
|
||||
}
|
||||
@@ -352,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),
|
||||
@@ -369,6 +369,7 @@ class acp_extensions
|
||||
|
||||
foreach ($enabled_extension_meta_data as $name => $block_vars)
|
||||
{
|
||||
$block_vars['NAME'] = $name;
|
||||
$block_vars['U_DETAILS'] = $this->u_action . '&action=details&ext_name=' . urlencode($name);
|
||||
|
||||
$this->template->assign_block_vars('enabled', $block_vars);
|
||||
@@ -408,7 +409,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),
|
||||
@@ -425,6 +426,7 @@ class acp_extensions
|
||||
|
||||
foreach ($disabled_extension_meta_data as $name => $block_vars)
|
||||
{
|
||||
$block_vars['NAME'] = $name;
|
||||
$block_vars['U_DETAILS'] = $this->u_action . '&action=details&ext_name=' . urlencode($name);
|
||||
|
||||
$this->template->assign_block_vars('disabled', $block_vars);
|
||||
@@ -467,7 +469,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),
|
||||
@@ -484,6 +486,7 @@ class acp_extensions
|
||||
|
||||
foreach ($available_extension_meta_data as $name => $block_vars)
|
||||
{
|
||||
$block_vars['NAME'] = $name;
|
||||
$block_vars['U_DETAILS'] = $this->u_action . '&action=details&ext_name=' . urlencode($name);
|
||||
|
||||
$this->template->assign_block_vars('disabled', $block_vars);
|
||||
|
@@ -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");
|
||||
|
@@ -42,7 +42,10 @@ class acp_groups
|
||||
return;
|
||||
}
|
||||
|
||||
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
if (!function_exists('group_user_attributes'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
}
|
||||
|
||||
// Check and set some common vars
|
||||
$action = (isset($_POST['add'])) ? 'add' : ((isset($_POST['addusers'])) ? 'addusers' : request_var('action', ''));
|
||||
@@ -295,7 +298,10 @@ class acp_groups
|
||||
case 'edit':
|
||||
case 'add':
|
||||
|
||||
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
|
||||
if (!function_exists('display_forums'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
|
||||
}
|
||||
|
||||
$data = $submit_ary = array();
|
||||
|
||||
|
@@ -34,7 +34,10 @@ class acp_inactive
|
||||
global $config, $db, $user, $auth, $template, $phpbb_container;
|
||||
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix;
|
||||
|
||||
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
if (!function_exists('user_active_flip'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
}
|
||||
|
||||
$user->add_lang('memberlist');
|
||||
|
||||
@@ -109,7 +112,10 @@ class acp_inactive
|
||||
|
||||
if ($config['require_activation'] == USER_ACTIVATION_ADMIN && !empty($inactive_users))
|
||||
{
|
||||
include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
|
||||
if (!class_exists('messenger'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
|
||||
}
|
||||
|
||||
$messenger = new messenger(false);
|
||||
|
||||
@@ -196,7 +202,10 @@ class acp_inactive
|
||||
if ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
// Send the messages
|
||||
include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
|
||||
if (!class_exists('messenger'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
|
||||
}
|
||||
|
||||
$messenger = new messenger();
|
||||
$usernames = $user_ids = array();
|
||||
@@ -271,9 +280,10 @@ class acp_inactive
|
||||
|
||||
'REMINDED_EXPLAIN' => $user->lang('USER_LAST_REMINDED', (int) $row['user_reminded'], $user->format_date($row['user_reminded_time'])),
|
||||
|
||||
'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour'], false, append_sid("{$phpbb_admin_path}index.$phpEx", 'i=users&mode=overview')),
|
||||
'USERNAME_FULL' => get_username_string('full', $row['user_id'], $row['username'], $row['user_colour'], false, append_sid("{$phpbb_admin_path}index.$phpEx", 'i=users&mode=overview&redirect=acp_inactive')),
|
||||
'USERNAME' => get_username_string('username', $row['user_id'], $row['username'], $row['user_colour']),
|
||||
'USER_COLOR' => get_username_string('colour', $row['user_id'], $row['username'], $row['user_colour']),
|
||||
'USER_EMAIL' => $row['user_email'],
|
||||
|
||||
'U_USER_ADMIN' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=users&mode=overview&u={$row['user_id']}"),
|
||||
'U_SEARCH_USER' => ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", "author_id={$row['user_id']}&sr=posts") : '',
|
||||
|
@@ -34,7 +34,10 @@ class acp_jabber
|
||||
|
||||
$user->add_lang('acp/board');
|
||||
|
||||
include_once($phpbb_root_path . 'includes/functions_jabber.' . $phpEx);
|
||||
if (!class_exists('jabber'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_jabber.' . $phpEx);
|
||||
}
|
||||
|
||||
$action = request_var('action', '');
|
||||
$submit = (isset($_POST['submit'])) ? true : false;
|
||||
@@ -107,7 +110,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 +128,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(),
|
||||
|
@@ -34,7 +34,10 @@ class acp_language
|
||||
global $config, $db, $user, $template;
|
||||
global $phpbb_root_path, $phpEx, $request;
|
||||
|
||||
include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
if (!function_exists('validate_language_iso_name'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
}
|
||||
|
||||
// Check and set some common vars
|
||||
$action = (isset($_POST['update_details'])) ? 'update_details' : '';
|
||||
|
@@ -429,20 +429,28 @@ class acp_main
|
||||
));
|
||||
}
|
||||
|
||||
$version_helper = $phpbb_container->get('version_helper');
|
||||
try
|
||||
if ($auth->acl_get('a_board'))
|
||||
{
|
||||
$recheck = $request->variable('versioncheck_force', false);
|
||||
$updates_available = $version_helper->get_suggested_updates($recheck);
|
||||
$version_helper = $phpbb_container->get('version_helper');
|
||||
try
|
||||
{
|
||||
$recheck = $request->variable('versioncheck_force', false);
|
||||
$updates_available = $version_helper->get_suggested_updates($recheck);
|
||||
|
||||
$template->assign_var('S_VERSION_UP_TO_DATE', empty($updates_available));
|
||||
$template->assign_var('S_VERSION_UP_TO_DATE', empty($updates_available));
|
||||
}
|
||||
catch (\RuntimeException $e)
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_VERSIONCHECK_FAIL' => true,
|
||||
'VERSIONCHECK_FAIL_REASON' => ($e->getMessage() !== $user->lang('VERSIONCHECK_FAIL')) ? $e->getMessage() : '',
|
||||
));
|
||||
}
|
||||
}
|
||||
catch (\RuntimeException $e)
|
||||
else
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_VERSIONCHECK_FAIL' => true,
|
||||
'VERSIONCHECK_FAIL_REASON' => ($e->getMessage() !== $user->lang('VERSIONCHECK_FAIL')) ? $e->getMessage() : '',
|
||||
));
|
||||
// We set this template var to true, to not display an outdated version notice.
|
||||
$template->assign_var('S_VERSION_UP_TO_DATE', true);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -553,6 +561,7 @@ class acp_main
|
||||
'U_VERSIONCHECK' => append_sid("{$phpbb_admin_path}index.$phpEx", 'i=update&mode=version_check'),
|
||||
'U_VERSIONCHECK_FORCE' => append_sid("{$phpbb_admin_path}index.$phpEx", 'versioncheck_force=1'),
|
||||
|
||||
'S_VERSIONCHECK' => ($auth->acl_get('a_board')) ? true : false,
|
||||
'S_ACTION_OPTIONS' => ($auth->acl_get('a_board')) ? true : false,
|
||||
'S_FOUNDER' => ($user->data['user_type'] == USER_FOUNDER) ? true : false,
|
||||
)
|
||||
@@ -632,7 +641,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())
|
||||
{
|
||||
|
@@ -30,8 +30,15 @@ class acp_permission_roles
|
||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||
global $request;
|
||||
|
||||
include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
include_once($phpbb_root_path . 'includes/acp/auth.' . $phpEx);
|
||||
if (!function_exists('user_get_id_name'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
}
|
||||
|
||||
if (!class_exists('auth_admin'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/acp/auth.' . $phpEx);
|
||||
}
|
||||
|
||||
$this->auth_admin = new auth_admin();
|
||||
|
||||
|
@@ -30,8 +30,15 @@ class acp_permissions
|
||||
global $db, $user, $auth, $template, $cache, $phpbb_container;
|
||||
global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;
|
||||
|
||||
include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
include_once($phpbb_root_path . 'includes/acp/auth.' . $phpEx);
|
||||
if (!function_exists('user_get_id_name'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
}
|
||||
|
||||
if (!class_exists('auth_admin'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/acp/auth.' . $phpEx);
|
||||
}
|
||||
|
||||
$this->permissions = $phpbb_container->get('acl.permissions');
|
||||
|
||||
|
@@ -31,10 +31,17 @@ 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);
|
||||
if (!function_exists('generate_smilies'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
|
||||
}
|
||||
|
||||
if (!function_exists('user_get_id_name'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
}
|
||||
|
||||
$user->add_lang(array('ucp', 'acp/profile'));
|
||||
$this->tpl_name = 'acp_profile';
|
||||
@@ -369,6 +376,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']);
|
||||
@@ -511,13 +544,14 @@ class acp_profile
|
||||
}
|
||||
}
|
||||
|
||||
$step = (isset($_REQUEST['next'])) ? $step + 1 : ((isset($_REQUEST['prev'])) ? $step - 1 : $step);
|
||||
|
||||
if (sizeof($error))
|
||||
{
|
||||
$step--;
|
||||
$submit = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$step = (isset($_REQUEST['next'])) ? $step + 1 : ((isset($_REQUEST['prev'])) ? $step - 1 : $step);
|
||||
}
|
||||
|
||||
// Build up the specific hidden fields
|
||||
foreach ($exclude as $num => $key_ary)
|
||||
@@ -535,7 +569,7 @@ class acp_profile
|
||||
$var = $profile_field->prepare_hidden_fields($step, $key, $action, $field_data);
|
||||
if ($var !== null)
|
||||
{
|
||||
$_new_key_ary[$key] = $profile_field->prepare_hidden_fields($step, $key, $action, $field_data);
|
||||
$_new_key_ary[$key] = $var;
|
||||
}
|
||||
}
|
||||
$cp->vars = $field_data;
|
||||
@@ -545,11 +579,7 @@ class acp_profile
|
||||
|
||||
if (!sizeof($error))
|
||||
{
|
||||
if ($step == 3 && (sizeof($this->lang_defs['iso']) == 1 || $save))
|
||||
{
|
||||
$this->save_profile_field($cp, $field_type, $action);
|
||||
}
|
||||
else if ($action == 'edit' && $save)
|
||||
if (($step == 3 && (sizeof($this->lang_defs['iso']) == 1 || $save)) || ($action == 'edit' && $save))
|
||||
{
|
||||
$this->save_profile_field($cp, $field_type, $action);
|
||||
}
|
||||
@@ -644,6 +674,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 +867,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 +909,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(
|
||||
|
@@ -28,7 +28,11 @@ class acp_prune
|
||||
global $user, $phpEx, $phpbb_admin_path, $phpbb_root_path;
|
||||
|
||||
$user->add_lang('acp/prune');
|
||||
include_once($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
|
||||
if (!function_exists('user_active_flip'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
}
|
||||
|
||||
switch ($mode)
|
||||
{
|
||||
@@ -506,9 +510,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 +536,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);
|
||||
|
@@ -598,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'))
|
||||
{
|
||||
@@ -607,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;
|
||||
}
|
||||
|
@@ -27,7 +27,10 @@ class acp_send_statistics
|
||||
{
|
||||
global $config, $template, $phpbb_admin_path, $phpbb_root_path, $phpEx;
|
||||
|
||||
include($phpbb_root_path . 'includes/questionnaire/questionnaire.' . $phpEx);
|
||||
if (!class_exists('phpbb_questionnaire_data_collector'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/questionnaire/questionnaire.' . $phpEx);
|
||||
}
|
||||
|
||||
$collect_url = "https://www.phpbb.com/stats/receive_stats.php";
|
||||
|
||||
|
@@ -56,9 +56,12 @@ class acp_styles
|
||||
/** @var string */
|
||||
protected $php_ext;
|
||||
|
||||
/** @var \phpbb\event\dispatcher_interface */
|
||||
protected $dispatcher;
|
||||
|
||||
public function main($id, $mode)
|
||||
{
|
||||
global $db, $user, $phpbb_admin_path, $phpbb_root_path, $phpEx, $template, $request, $cache, $auth, $config;
|
||||
global $db, $user, $phpbb_admin_path, $phpbb_root_path, $phpEx, $template, $request, $cache, $auth, $config, $phpbb_dispatcher;
|
||||
|
||||
$this->db = $db;
|
||||
$this->user = $user;
|
||||
@@ -69,6 +72,7 @@ class acp_styles
|
||||
$this->config = $config;
|
||||
$this->phpbb_root_path = $phpbb_root_path;
|
||||
$this->php_ext = $phpEx;
|
||||
$this->dispatcher = $phpbb_dispatcher;
|
||||
|
||||
$this->default_style = $config['default_style'];
|
||||
$this->styles_path = $this->phpbb_root_path . $this->styles_path_absolute . '/';
|
||||
@@ -118,6 +122,18 @@ class acp_styles
|
||||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* Run code before ACP styles action execution
|
||||
*
|
||||
* @event core.acp_styles_action_before
|
||||
* @var int id Module ID
|
||||
* @var string mode Active module
|
||||
* @var string action Module that should be run
|
||||
* @since 3.1.7-RC1
|
||||
*/
|
||||
$vars = array('id', 'mode', 'action');
|
||||
extract($this->dispatcher->trigger_event('core.acp_styles_action_before', compact($vars)));
|
||||
|
||||
// Execute actions
|
||||
switch ($action)
|
||||
{
|
||||
@@ -995,7 +1011,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);
|
||||
}
|
||||
|
@@ -44,6 +44,11 @@ class acp_users
|
||||
$user_id = request_var('u', 0);
|
||||
$action = request_var('action', '');
|
||||
|
||||
// Get referer to redirect user to the appropriate page after delete action
|
||||
$redirect = request_var('redirect', '');
|
||||
$redirect_tag = "redirect=$redirect";
|
||||
$redirect_url = append_sid("{$phpbb_admin_path}index.$phpEx", "i=$redirect");
|
||||
|
||||
$submit = (isset($_POST['update']) && !isset($_POST['cancel'])) ? true : false;
|
||||
|
||||
$form_name = 'acp_users';
|
||||
@@ -52,7 +57,10 @@ class acp_users
|
||||
// Whois (special case)
|
||||
if ($action == 'whois')
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
if (!function_exists('user_get_id_name'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
}
|
||||
|
||||
$this->page_title = 'WHOIS';
|
||||
$this->tpl_name = 'simple_body';
|
||||
@@ -146,9 +154,9 @@ class acp_users
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'U_BACK' => $this->u_action,
|
||||
'U_BACK' => (empty($redirect)) ? $this->u_action : $redirect_url,
|
||||
'U_MODE_SELECT' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=$id&u=$user_id"),
|
||||
'U_ACTION' => $this->u_action . '&u=' . $user_id,
|
||||
'U_ACTION' => $this->u_action . '&u=' . $user_id . ((empty($redirect)) ? '' : '&' . $redirect_tag),
|
||||
'S_FORM_OPTIONS' => $s_form_options,
|
||||
'MANAGED_USERNAME' => $user_row['username'])
|
||||
);
|
||||
@@ -165,7 +173,10 @@ class acp_users
|
||||
{
|
||||
case 'overview':
|
||||
|
||||
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
if (!function_exists('user_get_id_name'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
}
|
||||
|
||||
$user->add_lang('acp/ban');
|
||||
|
||||
@@ -221,19 +232,30 @@ class acp_users
|
||||
user_delete($delete_type, $user_id, $user_row['username']);
|
||||
|
||||
add_log('admin', 'LOG_USER_DELETED', $user_row['username']);
|
||||
trigger_error($user->lang['USER_DELETED'] . adm_back_link($this->u_action));
|
||||
trigger_error($user->lang['USER_DELETED'] . adm_back_link(
|
||||
(empty($redirect)) ? $this->u_action : $redirect_url
|
||||
)
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
|
||||
$delete_confirm_hidden_fields = array(
|
||||
'u' => $user_id,
|
||||
'i' => $id,
|
||||
'mode' => $mode,
|
||||
'action' => $action,
|
||||
'update' => true,
|
||||
'delete' => 1,
|
||||
'delete_type' => $delete_type))
|
||||
'delete_type' => $delete_type,
|
||||
);
|
||||
|
||||
// Checks if the redirection page is specified
|
||||
if (!empty($redirect))
|
||||
{
|
||||
$delete_confirm_hidden_fields['redirect'] = $redirect;
|
||||
}
|
||||
|
||||
confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields($delete_confirm_hidden_fields));
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -338,7 +360,10 @@ class acp_users
|
||||
|
||||
if ($config['email_enable'])
|
||||
{
|
||||
include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
|
||||
if (!class_exists('messenger'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
|
||||
}
|
||||
|
||||
$server_url = generate_board_url();
|
||||
|
||||
@@ -421,7 +446,10 @@ class acp_users
|
||||
$phpbb_notifications = $phpbb_container->get('notification_manager');
|
||||
$phpbb_notifications->delete_notifications('notification.type.admin_activate_user', $user_row['user_id']);
|
||||
|
||||
include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
|
||||
if (!class_exists('messenger'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_messenger.' . $phpEx);
|
||||
}
|
||||
|
||||
$messenger = new messenger(false);
|
||||
|
||||
@@ -1345,7 +1373,10 @@ class acp_users
|
||||
|
||||
case 'profile':
|
||||
|
||||
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
if (!function_exists('user_get_id_name'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
}
|
||||
|
||||
$cp = $phpbb_container->get('profilefields.manager');
|
||||
|
||||
@@ -1504,7 +1535,10 @@ class acp_users
|
||||
|
||||
case 'prefs':
|
||||
|
||||
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
if (!function_exists('user_get_id_name'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
}
|
||||
|
||||
$data = array(
|
||||
'dateformat' => utf8_normalize_nfc(request_var('dateformat', $user_row['user_dateformat'], true)),
|
||||
@@ -1774,8 +1808,6 @@ class acp_users
|
||||
|
||||
case 'avatar':
|
||||
|
||||
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
|
||||
|
||||
$avatars_enabled = false;
|
||||
|
||||
if ($config['allow_avatar'])
|
||||
@@ -1930,8 +1962,15 @@ class acp_users
|
||||
|
||||
case 'sig':
|
||||
|
||||
include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
|
||||
include_once($phpbb_root_path . 'includes/functions_display.' . $phpEx);
|
||||
if (!function_exists('generate_smilies'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
|
||||
}
|
||||
|
||||
if (!function_exists('display_custom_bbcodes'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
|
||||
}
|
||||
|
||||
$enable_bbcode = ($config['allow_sig_bbcode']) ? (bool) $this->optionget($user_row, 'sig_bbcode') : false;
|
||||
$enable_smilies = ($config['allow_sig_smilies']) ? (bool) $this->optionget($user_row, 'sig_smilies') : false;
|
||||
@@ -1942,7 +1981,10 @@ class acp_users
|
||||
|
||||
if ($submit || $preview)
|
||||
{
|
||||
include_once($phpbb_root_path . 'includes/message_parser.' . $phpEx);
|
||||
if (!class_exists('messenger'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/message_parser.' . $phpEx);
|
||||
}
|
||||
|
||||
$enable_bbcode = ($config['allow_sig_bbcode']) ? ((request_var('disable_bbcode', false)) ? false : true) : false;
|
||||
$enable_smilies = ($config['allow_sig_smilies']) ? ((request_var('disable_smilies', false)) ? false : true) : false;
|
||||
@@ -2183,7 +2225,10 @@ class acp_users
|
||||
|
||||
case 'groups':
|
||||
|
||||
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
if (!function_exists('group_user_attributes'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
}
|
||||
|
||||
$user->add_lang(array('groups', 'acp/groups'));
|
||||
$group_id = request_var('g', 0);
|
||||
@@ -2399,7 +2444,10 @@ class acp_users
|
||||
|
||||
case 'perm':
|
||||
|
||||
include_once($phpbb_root_path . 'includes/acp/auth.' . $phpEx);
|
||||
if (!class_exists('auth_admin'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/acp/auth.' . $phpEx);
|
||||
}
|
||||
|
||||
$auth_admin = new auth_admin();
|
||||
|
||||
|
@@ -1113,6 +1113,11 @@ class auth_admin extends \phpbb\auth\auth
|
||||
@reset($category_array);
|
||||
while (list($cat, $cat_array) = each($category_array))
|
||||
{
|
||||
if (!$phpbb_permissions->category_defined($cat))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$template->assign_block_vars($tpl_cat, array(
|
||||
'S_YES' => ($cat_array['S_YES'] && !$cat_array['S_NEVER'] && !$cat_array['S_NO']) ? true : false,
|
||||
'S_NEVER' => ($cat_array['S_NEVER'] && !$cat_array['S_YES'] && !$cat_array['S_NO']) ? true : false,
|
||||
@@ -1139,6 +1144,11 @@ class auth_admin extends \phpbb\auth\auth
|
||||
@reset($cat_array['permissions']);
|
||||
while (list($permission, $allowed) = each($cat_array['permissions']))
|
||||
{
|
||||
if (!$phpbb_permissions->permission_defined($permission))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($s_view)
|
||||
{
|
||||
$template->assign_block_vars($tpl_cat . '.' . $tpl_mask, array(
|
||||
|
@@ -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)
|
||||
@@ -613,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.4-RC1');
|
||||
define('PHPBB_VERSION', '3.1.7');
|
||||
|
||||
// QA-related
|
||||
// define('PHPBB_QA', 1);
|
||||
|
@@ -1159,7 +1159,7 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $
|
||||
/**
|
||||
* 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.
|
||||
*
|
||||
@@ -1258,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');
|
||||
|
||||
@@ -2309,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] == '/')
|
||||
@@ -2347,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);
|
||||
}
|
||||
@@ -2389,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);
|
||||
|
||||
@@ -2544,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';
|
||||
@@ -4254,10 +4264,14 @@ function obtain_users_online_string($online_users, $item_id = 0, $item = 'forum'
|
||||
|
||||
if (sizeof($online_users['online_users']))
|
||||
{
|
||||
$sql = 'SELECT username, username_clean, user_id, user_type, user_allow_viewonline, user_colour
|
||||
FROM ' . USERS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('user_id', $online_users['online_users']) . '
|
||||
ORDER BY username_clean ASC';
|
||||
$sql_ary = array(
|
||||
'SELECT' => 'u.username, u.username_clean, u.user_id, u.user_type, u.user_allow_viewonline, u.user_colour',
|
||||
'FROM' => array(
|
||||
USERS_TABLE => 'u',
|
||||
),
|
||||
'WHERE' => $db->sql_in_set('u.user_id', $online_users['online_users']),
|
||||
'ORDER_BY' => 'u.username_clean ASC',
|
||||
);
|
||||
|
||||
/**
|
||||
* Modify SQL query to obtain online users data
|
||||
@@ -4269,13 +4283,14 @@ function obtain_users_online_string($online_users, $item_id = 0, $item = 'forum'
|
||||
* @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
|
||||
* @var string sql_ary SQL query to obtain users online data
|
||||
* @since 3.1.4-RC1
|
||||
* @changed 3.1.7-RC1 Change sql query into array and adjust var accordingly. Allows extension authors the ability to adjust the sql_ary.
|
||||
*/
|
||||
$vars = array('online_users', 'item_id', 'item', 'sql');
|
||||
$vars = array('online_users', 'item_id', 'item', 'sql_ary');
|
||||
extract($phpbb_dispatcher->trigger_event('core.obtain_users_online_string_sql', compact($vars)));
|
||||
|
||||
$result = $db->sql_query($sql);
|
||||
$result = $db->sql_query($db->sql_build_query('SELECT', $sql_ary));
|
||||
$rowset = $db->sql_fetchrowset($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
@@ -4289,7 +4304,7 @@ function obtain_users_online_string($online_users, $item_id = 0, $item = 'forum'
|
||||
$row['username'] = '<em>' . $row['username'] . '</em>';
|
||||
}
|
||||
|
||||
if (!isset($online_users['hidden_users'][$row['user_id']]) || $auth->acl_get('u_viewonline'))
|
||||
if (!isset($online_users['hidden_users'][$row['user_id']]) || $auth->acl_get('u_viewonline') || $row['user_id'] === $user->data['user_id'])
|
||||
{
|
||||
$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']);
|
||||
}
|
||||
@@ -4773,13 +4788,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);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4788,13 +4804,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);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4803,14 +4820,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)
|
||||
{
|
||||
@@ -4824,7 +4842,7 @@ function phpbb_get_avatar($row, $alt, $ignore_config = false)
|
||||
);
|
||||
|
||||
$phpbb_avatar_manager = $phpbb_container->get('avatar.manager');
|
||||
$driver = $phpbb_avatar_manager->get_driver($row['avatar_type'], $ignore_config);
|
||||
$driver = $phpbb_avatar_manager->get_driver($row['avatar_type'], !$ignore_config);
|
||||
$html = '';
|
||||
|
||||
if ($driver)
|
||||
@@ -4835,7 +4853,7 @@ function phpbb_get_avatar($row, $alt, $ignore_config = false)
|
||||
return $html;
|
||||
}
|
||||
|
||||
$avatar_data = $driver->get_data($row, $ignore_config);
|
||||
$avatar_data = $driver->get_data($row);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -4844,12 +4862,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;
|
||||
}
|
||||
|
||||
@@ -5342,6 +5395,8 @@ function page_footer($run_cron = true, $display_template = true, $exit_handler =
|
||||
return;
|
||||
}
|
||||
|
||||
$user->update_session_infos();
|
||||
|
||||
phpbb_check_and_display_sql_report($request, $auth, $db);
|
||||
|
||||
$template->assign_vars(array(
|
||||
|
@@ -164,6 +164,8 @@ function adm_page_footer($copyright_html = true)
|
||||
return;
|
||||
}
|
||||
|
||||
$user->update_session_infos();
|
||||
|
||||
phpbb_check_and_display_sql_report($request, $auth, $db);
|
||||
|
||||
$template->assign_vars(array(
|
||||
@@ -245,8 +247,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':
|
||||
|
@@ -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
|
||||
@@ -555,7 +576,7 @@ function move_topics($topic_ids, $forum_id, $auto_sync = true)
|
||||
*/
|
||||
function move_posts($post_ids, $topic_id, $auto_sync = true)
|
||||
{
|
||||
global $db;
|
||||
global $db, $phpbb_dispatcher;
|
||||
|
||||
if (!is_array($post_ids))
|
||||
{
|
||||
@@ -589,6 +610,28 @@ function move_posts($post_ids, $topic_id, $auto_sync = true)
|
||||
trigger_error('NO_TOPIC');
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform additional actions before moving posts
|
||||
*
|
||||
* @event core.move_posts_before
|
||||
* @var array post_ids Array of post ids to move
|
||||
* @var string topic_id The topic id the posts are moved to
|
||||
* @var bool auto_sync Whether or not to perform auto sync
|
||||
* @var array forum_ids Array of the forum ids the posts are moved from
|
||||
* @var array topic_ids Array of the topic ids the posts are moved from
|
||||
* @var array forum_row Array with the forum id of the topic the posts are moved to
|
||||
* @since 3.1.7-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'post_ids',
|
||||
'topic_id',
|
||||
'auto_sync',
|
||||
'forum_ids',
|
||||
'topic_ids',
|
||||
'forum_row',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.move_posts_before', compact($vars)));
|
||||
|
||||
$sql = 'UPDATE ' . POSTS_TABLE . '
|
||||
SET forum_id = ' . (int) $forum_row['forum_id'] . ", topic_id = $topic_id
|
||||
WHERE " . $db->sql_in_set('post_id', $post_ids);
|
||||
@@ -599,6 +642,28 @@ function move_posts($post_ids, $topic_id, $auto_sync = true)
|
||||
WHERE " . $db->sql_in_set('post_msg_id', $post_ids);
|
||||
$db->sql_query($sql);
|
||||
|
||||
/**
|
||||
* Perform additional actions after moving posts
|
||||
*
|
||||
* @event core.move_posts_after
|
||||
* @var array post_ids Array of the moved post ids
|
||||
* @var string topic_id The topic id the posts are moved to
|
||||
* @var bool auto_sync Whether or not to perform auto sync
|
||||
* @var array forum_ids Array of the forum ids the posts are moved from
|
||||
* @var array topic_ids Array of the topic ids the posts are moved from
|
||||
* @var array forum_row Array with the forum id of the topic the posts are moved to
|
||||
* @since 3.1.7-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'post_ids',
|
||||
'topic_id',
|
||||
'auto_sync',
|
||||
'forum_ids',
|
||||
'topic_ids',
|
||||
'forum_row',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.move_posts_after', compact($vars)));
|
||||
|
||||
if ($auto_sync)
|
||||
{
|
||||
$forum_ids[] = (int) $forum_row['forum_id'];
|
||||
@@ -764,6 +829,7 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
|
||||
'notification.type.quote',
|
||||
'notification.type.approve_post',
|
||||
'notification.type.post_in_queue',
|
||||
'notification.type.report_post',
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -865,6 +931,32 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
|
||||
|
||||
$table_ary = array(POSTS_TABLE, REPORTS_TABLE);
|
||||
|
||||
/**
|
||||
* Perform additional actions during post(s) deletion before running the queries
|
||||
*
|
||||
* @event core.delete_posts_in_transaction_before
|
||||
* @var array post_ids Array with deleted posts' ids
|
||||
* @var array poster_ids Array with deleted posts' author ids
|
||||
* @var array topic_ids Array with deleted posts' topic ids
|
||||
* @var array forum_ids Array with deleted posts' forum ids
|
||||
* @var string where_type Variable containing posts deletion mode
|
||||
* @var mixed where_ids Array or comma separated list of post ids to delete
|
||||
* @var array delete_notifications_types Array with notifications types to delete
|
||||
* @var array table_ary Array with table names to delete data from
|
||||
* @since 3.1.7-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'post_ids',
|
||||
'poster_ids',
|
||||
'topic_ids',
|
||||
'forum_ids',
|
||||
'where_type',
|
||||
'where_ids',
|
||||
'delete_notifications_types',
|
||||
'table_ary',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.delete_posts_in_transaction_before', compact($vars)));
|
||||
|
||||
foreach ($table_ary as $table)
|
||||
{
|
||||
$sql = "DELETE FROM $table
|
||||
@@ -920,7 +1012,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)
|
||||
{
|
||||
@@ -1021,7 +1113,7 @@ function delete_posts($where_type, $where_ids, $auto_sync = true, $posted_sync =
|
||||
*/
|
||||
function delete_attachments($mode, $ids, $resync = true)
|
||||
{
|
||||
global $db, $config;
|
||||
global $db, $config, $phpbb_dispatcher;
|
||||
|
||||
// 0 is as bad as an empty array
|
||||
if (empty($ids))
|
||||
@@ -1066,6 +1158,24 @@ function delete_attachments($mode, $ids, $resync = true)
|
||||
|
||||
$post_ids = $message_ids = $topic_ids = $physical = array();
|
||||
|
||||
/**
|
||||
* Perform additional actions before collecting data for attachment(s) deletion
|
||||
*
|
||||
* @event core.delete_attachments_collect_data_before
|
||||
* @var string mode Variable containing attachments deletion mode, can be: post|message|topic|attach|user
|
||||
* @var mixed ids Array or comma separated list of ids corresponding to the mode
|
||||
* @var bool resync Flag indicating if posts/messages/topics should be synchronized
|
||||
* @var string sql_id The field name to collect/delete data for depending on the mode
|
||||
* @since 3.1.7-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'mode',
|
||||
'ids',
|
||||
'resync',
|
||||
'sql_id',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.delete_attachments_collect_data_before', compact($vars)));
|
||||
|
||||
// Collect post and topic ids for later use if we need to touch remaining entries (if resync is enabled)
|
||||
$sql = 'SELECT post_msg_id, topic_id, in_message, physical_filename, thumbnail, filesize, is_orphan
|
||||
FROM ' . ATTACHMENTS_TABLE . '
|
||||
@@ -1095,6 +1205,32 @@ function delete_attachments($mode, $ids, $resync = true)
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
/**
|
||||
* Perform additional actions before attachment(s) deletion
|
||||
*
|
||||
* @event core.delete_attachments_before
|
||||
* @var string mode Variable containing attachments deletion mode, can be: post|message|topic|attach|user
|
||||
* @var mixed ids Array or comma separated list of ids corresponding to the mode
|
||||
* @var bool resync Flag indicating if posts/messages/topics should be synchronized
|
||||
* @var string sql_id The field name to collect/delete data for depending on the mode
|
||||
* @var array post_ids Array with post ids for deleted attachment(s)
|
||||
* @var array topic_ids Array with topic ids for deleted attachment(s)
|
||||
* @var array message_ids Array with private message ids for deleted attachment(s)
|
||||
* @var array physical Array with deleted attachment(s) physical file(s) data
|
||||
* @since 3.1.7-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'mode',
|
||||
'ids',
|
||||
'resync',
|
||||
'sql_id',
|
||||
'post_ids',
|
||||
'topic_ids',
|
||||
'message_ids',
|
||||
'physical',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.delete_attachments_before', compact($vars)));
|
||||
|
||||
// Delete attachments
|
||||
$sql = 'DELETE FROM ' . ATTACHMENTS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set($sql_id, $ids);
|
||||
@@ -1104,6 +1240,34 @@ function delete_attachments($mode, $ids, $resync = true)
|
||||
$db->sql_query($sql);
|
||||
$num_deleted = $db->sql_affectedrows();
|
||||
|
||||
/**
|
||||
* Perform additional actions after attachment(s) deletion from the database
|
||||
*
|
||||
* @event core.delete_attachments_from_database_after
|
||||
* @var string mode Variable containing attachments deletion mode, can be: post|message|topic|attach|user
|
||||
* @var mixed ids Array or comma separated list of ids corresponding to the mode
|
||||
* @var bool resync Flag indicating if posts/messages/topics should be synchronized
|
||||
* @var string sql_id The field name to collect/delete data for depending on the mode
|
||||
* @var array post_ids Array with post ids for deleted attachment(s)
|
||||
* @var array topic_ids Array with topic ids for deleted attachment(s)
|
||||
* @var array message_ids Array with private message ids for deleted attachment(s)
|
||||
* @var array physical Array with deleted attachment(s) physical file(s) data
|
||||
* @var int num_deleted The number of deleted attachment(s) from the database
|
||||
* @since 3.1.7-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'mode',
|
||||
'ids',
|
||||
'resync',
|
||||
'sql_id',
|
||||
'post_ids',
|
||||
'topic_ids',
|
||||
'message_ids',
|
||||
'physical',
|
||||
'num_deleted',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.delete_attachments_from_database_after', compact($vars)));
|
||||
|
||||
if (!$num_deleted)
|
||||
{
|
||||
return 0;
|
||||
@@ -1126,6 +1290,38 @@ function delete_attachments($mode, $ids, $resync = true)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform additional actions after attachment(s) deletion from the filesystem
|
||||
*
|
||||
* @event core.delete_attachments_from_filesystem_after
|
||||
* @var string mode Variable containing attachments deletion mode, can be: post|message|topic|attach|user
|
||||
* @var mixed ids Array or comma separated list of ids corresponding to the mode
|
||||
* @var bool resync Flag indicating if posts/messages/topics should be synchronized
|
||||
* @var string sql_id The field name to collect/delete data for depending on the mode
|
||||
* @var array post_ids Array with post ids for deleted attachment(s)
|
||||
* @var array topic_ids Array with topic ids for deleted attachment(s)
|
||||
* @var array message_ids Array with private message ids for deleted attachment(s)
|
||||
* @var array physical Array with deleted attachment(s) physical file(s) data
|
||||
* @var int num_deleted The number of deleted attachment(s) from the database
|
||||
* @var int space_removed The size of deleted files(s) from the filesystem
|
||||
* @var int files_removed The number of deleted file(s) from the filesystem
|
||||
* @since 3.1.7-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'mode',
|
||||
'ids',
|
||||
'resync',
|
||||
'sql_id',
|
||||
'post_ids',
|
||||
'topic_ids',
|
||||
'message_ids',
|
||||
'physical',
|
||||
'num_deleted',
|
||||
'space_removed',
|
||||
'files_removed',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.delete_attachments_from_filesystem_after', compact($vars)));
|
||||
|
||||
if ($space_removed || $files_removed)
|
||||
{
|
||||
set_config_count('upload_dir_size', $space_removed * (-1), true);
|
||||
|
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -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;
|
||||
|
@@ -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'];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -404,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'],
|
||||
@@ -522,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'];
|
||||
}
|
||||
@@ -583,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'],
|
||||
@@ -596,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']),
|
||||
@@ -732,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);
|
||||
|
||||
@@ -757,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;
|
||||
}
|
||||
@@ -1449,7 +1496,7 @@ function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id,
|
||||
* @param array $user_data the current stored users data
|
||||
* @param int $user_posts the users number of posts
|
||||
*
|
||||
* @return array An associative array containing the rank title (title), the rank image source (img) and the rank image as full img tag (img)
|
||||
* @return array An associative array containing the rank title (title), the rank image as full img tag (img) and the rank image source (img_src)
|
||||
*
|
||||
* Note: since we do not want to break backwards-compatibility, this function will only properly assign ranks to guests if you call it for them with user_posts == false
|
||||
*/
|
||||
|
@@ -388,7 +388,7 @@ function phpbb_mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by
|
||||
|
||||
if (!$auth->acl_get('m_approve', $forum_id))
|
||||
{
|
||||
$sql .= 'AND topic_visibility = ' . ITEM_APPROVED;
|
||||
$sql .= ' AND topic_visibility = ' . ITEM_APPROVED;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -404,7 +404,7 @@ function phpbb_mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by
|
||||
|
||||
if (!$auth->acl_get('m_approve', $forum_id))
|
||||
{
|
||||
$sql .= 'AND post_visibility = ' . ITEM_APPROVED;
|
||||
$sql .= ' AND post_visibility = ' . ITEM_APPROVED;
|
||||
}
|
||||
break;
|
||||
|
||||
|
@@ -902,6 +902,8 @@ class queue
|
||||
fclose($fp);
|
||||
|
||||
phpbb_chmod($this->cache_file, CHMOD_READ | CHMOD_WRITE);
|
||||
|
||||
$this->data = array();
|
||||
}
|
||||
|
||||
$lock->release();
|
||||
|
@@ -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);
|
||||
|
@@ -310,6 +310,7 @@ function posting_gen_topic_icons($mode, $icon_id)
|
||||
{
|
||||
$template->assign_block_vars('topic_icon', array(
|
||||
'ICON_ID' => $id,
|
||||
'ICON_NAME' => $data['img'],
|
||||
'ICON_IMG' => $root_path . $config['icons_path'] . '/' . $data['img'],
|
||||
'ICON_WIDTH' => $data['width'],
|
||||
'ICON_HEIGHT' => $data['height'],
|
||||
@@ -1542,7 +1543,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')
|
||||
{
|
||||
@@ -1738,6 +1746,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']))
|
||||
@@ -2209,7 +2218,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)
|
||||
{
|
||||
|
@@ -1594,7 +1594,7 @@ function get_folder_status($folder_id, $folder)
|
||||
'percent' => ($user->data['message_limit']) ? (($user->data['message_limit'] > 0) ? floor(($folder['num_messages'] / $user->data['message_limit']) * 100) : 100) : 0,
|
||||
);
|
||||
|
||||
$return['message'] = $user->lang('FOLDER_STATUS_MSG', $user->lang('MESSAGES_COUNT', (int) $return['max']), $return['cur'], $return['percent']);
|
||||
$return['message'] = $user->lang('FOLDER_STATUS_MSG', $user->lang('MESSAGES_COUNT', (int) $return['max']), (int) $return['cur'], $return['percent']);
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
@@ -213,6 +213,8 @@ class filespec
|
||||
*/
|
||||
static public function get_extension($filename)
|
||||
{
|
||||
$filename = utf8_basename($filename);
|
||||
|
||||
if (strpos($filename, '.') === false)
|
||||
{
|
||||
return '';
|
||||
|
@@ -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)
|
||||
{
|
||||
@@ -1367,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)
|
||||
{
|
||||
@@ -2663,7 +2698,7 @@ function group_delete($group_id, $group_name = false)
|
||||
*/
|
||||
function group_user_add($group_id, $user_id_ary = false, $username_ary = false, $group_name = false, $default = false, $leader = 0, $pending = 0, $group_attributes = false)
|
||||
{
|
||||
global $db, $auth, $phpbb_container;
|
||||
global $db, $auth, $phpbb_container, $phpbb_dispatcher;
|
||||
|
||||
// We need both username and user_id info
|
||||
$result = user_get_id_name($user_id_ary, $username_ary);
|
||||
@@ -2740,6 +2775,26 @@ function group_user_add($group_id, $user_id_ary = false, $username_ary = false,
|
||||
// Clear permissions cache of relevant users
|
||||
$auth->acl_clear_prefetch($user_id_ary);
|
||||
|
||||
/**
|
||||
* Event after users are added to a group
|
||||
*
|
||||
* @event core.group_add_user_after
|
||||
* @var int group_id ID of the group to which users are added
|
||||
* @var string group_name Name of the group
|
||||
* @var array user_id_ary IDs of the users which are added
|
||||
* @var array username_ary names of the users which are added
|
||||
* @var int pending Pending setting, 1 if user(s) added are pending
|
||||
* @since 3.1.7-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'group_id',
|
||||
'group_name',
|
||||
'user_id_ary',
|
||||
'username_ary',
|
||||
'pending',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.group_add_user_after', compact($vars)));
|
||||
|
||||
if (!$group_name)
|
||||
{
|
||||
$group_name = get_group_name($group_id);
|
||||
@@ -2898,6 +2953,19 @@ function group_user_del($group_id, $user_id_ary = false, $username_ary = false,
|
||||
// Clear permissions cache of relevant users
|
||||
$auth->acl_clear_prefetch($user_id_ary);
|
||||
|
||||
/**
|
||||
* Event after users are removed from a group
|
||||
*
|
||||
* @event core.group_delete_user_after
|
||||
* @var int group_id ID of the group from which users are deleted
|
||||
* @var string group_name Name of the group
|
||||
* @var array user_id_ary IDs of the users which are removed
|
||||
* @var array username_ary names of the users which are removed
|
||||
* @since 3.1.7-RC1
|
||||
*/
|
||||
$vars = array('group_id', 'group_name', 'user_id_ary', 'username_ary');
|
||||
extract($phpbb_dispatcher->trigger_event('core.group_delete_user_after', compact($vars)));
|
||||
|
||||
if (!$group_name)
|
||||
{
|
||||
$group_name = get_group_name($group_id);
|
||||
|
@@ -20,9 +20,9 @@ class mcp_pm_reports_info
|
||||
'title' => 'MCP_PM_REPORTS',
|
||||
'version' => '1.0.0',
|
||||
'modes' => array(
|
||||
'pm_reports' => array('title' => 'MCP_PM_REPORTS_OPEN', 'auth' => 'aclf_m_report', 'cat' => array('MCP_REPORTS')),
|
||||
'pm_reports_closed' => array('title' => 'MCP_PM_REPORTS_CLOSED', 'auth' => 'aclf_m_report', 'cat' => array('MCP_REPORTS')),
|
||||
'pm_report_details' => array('title' => 'MCP_PM_REPORT_DETAILS', 'auth' => 'aclf_m_report', 'cat' => array('MCP_REPORTS')),
|
||||
'pm_reports' => array('title' => 'MCP_PM_REPORTS_OPEN', 'auth' => 'acl_m_pm_report', 'cat' => array('MCP_REPORTS')),
|
||||
'pm_reports_closed' => array('title' => 'MCP_PM_REPORTS_CLOSED', 'auth' => 'acl_m_pm_report', 'cat' => array('MCP_REPORTS')),
|
||||
'pm_report_details' => array('title' => 'MCP_PM_REPORT_DETAILS', 'auth' => 'acl_m_pm_report', 'cat' => array('MCP_REPORTS')),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@@ -35,15 +35,6 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
|
||||
// merge_topic is the quickmod action, merge_topics is the mcp_forum action, and merge_select is the mcp_topic action
|
||||
$merge_select = ($action == 'merge_select' || $action == 'merge_topic' || $action == 'merge_topics') ? true : false;
|
||||
|
||||
if ($merge_select)
|
||||
{
|
||||
// Fixes a "bug" that makes forum_view use the same ordering as topic_view
|
||||
$request->overwrite('sk', null);
|
||||
$request->overwrite('sd', null);
|
||||
$request->overwrite('sk', null, \phpbb\request\request_interface::POST);
|
||||
$request->overwrite('sd', null, \phpbb\request\request_interface::POST);
|
||||
}
|
||||
|
||||
$forum_id = $forum_info['forum_id'];
|
||||
$start = request_var('start', 0);
|
||||
$topic_id_list = request_var('topic_id_list', array(0));
|
||||
@@ -77,6 +68,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);
|
||||
@@ -245,7 +274,7 @@ function mcp_front_view($id, $mode, $action)
|
||||
}
|
||||
|
||||
// Latest 5 reported PMs
|
||||
if ($module->loaded('pm_reports') && $auth->acl_getf_global('m_report'))
|
||||
if ($module->loaded('pm_reports') && $auth->acl_get('m_pm_report'))
|
||||
{
|
||||
$template->assign_var('S_SHOW_PM_REPORTS', true);
|
||||
$user->add_lang(array('ucp'));
|
||||
|
@@ -322,6 +322,22 @@ function lock_unlock($action, $ids)
|
||||
add_log('mod', $row['forum_id'], $row['topic_id'], 'LOG_' . strtoupper($action), $row['topic_title']);
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform additional actions after locking/unlocking posts/topics
|
||||
*
|
||||
* @event core.mcp_lock_unlock_after
|
||||
* @var string action Variable containing the action we perform on the posts/topics ('lock', 'unlock', 'lock_post' or 'unlock_post')
|
||||
* @var array ids Array containing the post/topic IDs that have been locked/unlocked
|
||||
* @var array data Array containing posts/topics data
|
||||
* @since 3.1.7-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'action',
|
||||
'ids',
|
||||
'data',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.mcp_lock_unlock_after', compact($vars)));
|
||||
|
||||
$success_msg = $l_prefix . ((sizeof($ids) == 1) ? '' : 'S') . '_' . (($action == 'lock' || $action == 'lock_post') ? 'LOCKED' : 'UNLOCKED') . '_SUCCESS';
|
||||
|
||||
meta_refresh(2, $redirect);
|
||||
@@ -1144,7 +1160,7 @@ function mcp_delete_post($post_ids, $is_soft = false, $soft_delete_reason = '',
|
||||
function mcp_fork_topic($topic_ids)
|
||||
{
|
||||
global $auth, $user, $db, $template, $config;
|
||||
global $phpEx, $phpbb_root_path;
|
||||
global $phpEx, $phpbb_root_path, $phpbb_dispatcher;
|
||||
|
||||
if (!phpbb_check_ids($topic_ids, TOPICS_TABLE, 'topic_id', array('m_')))
|
||||
{
|
||||
@@ -1222,7 +1238,7 @@ function mcp_fork_topic($topic_ids)
|
||||
}
|
||||
|
||||
$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);
|
||||
$search_mode = 'post';
|
||||
|
||||
if ($error)
|
||||
|
@@ -26,6 +26,7 @@ function mcp_post_details($id, $mode, $action)
|
||||
{
|
||||
global $phpEx, $phpbb_root_path, $config;
|
||||
global $template, $db, $user, $auth, $cache;
|
||||
global $phpbb_dispatcher;
|
||||
|
||||
$user->add_lang('posting');
|
||||
|
||||
@@ -106,6 +107,21 @@ function mcp_post_details($id, $mode, $action)
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
/**
|
||||
* This event allows you to handle custom post moderation options
|
||||
*
|
||||
* @event core.mcp_post_additional_options
|
||||
* @var string action Post moderation action name
|
||||
* @var array post_info Information on the affected post
|
||||
* @since 3.1.5-RC1
|
||||
*/
|
||||
$vars = array('action', 'post_info');
|
||||
extract($phpbb_dispatcher->trigger_event('core.mcp_post_additional_options', compact($vars)));
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
// Set some vars
|
||||
@@ -197,7 +213,7 @@ function mcp_post_details($id, $mode, $action)
|
||||
$l_deleted_by = '';
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
$mcp_post_template_data = array(
|
||||
'U_MCP_ACTION' => "$url&i=main&quickmod=1&mode=post_details", // Use this for mode paramaters
|
||||
'U_POST_ACTION' => "$url&i=$id&mode=post_details", // Use this for action parameters
|
||||
'U_APPROVE_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "i=queue&p=$post_id&f={$post_info['forum_id']}"),
|
||||
@@ -249,7 +265,32 @@ function mcp_post_details($id, $mode, $action)
|
||||
|
||||
'U_LOOKUP_IP' => ($auth->acl_get('m_info', $post_info['forum_id'])) ? "$url&i=$id&mode=$mode&lookup={$post_info['poster_ip']}#ip" : '',
|
||||
'U_WHOIS' => ($auth->acl_get('m_info', $post_info['forum_id'])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=$id&mode=$mode&action=whois&p=$post_id&ip={$post_info['poster_ip']}") : '',
|
||||
));
|
||||
);
|
||||
|
||||
$s_additional_opts = false;
|
||||
|
||||
/**
|
||||
* Event to add/modify MCP post template data
|
||||
*
|
||||
* @event core.mcp_post_template_data
|
||||
* @var array post_info Array with the post information
|
||||
* @var array mcp_post_template_data Array with the MCP post template data
|
||||
* @var array attachments Array with the post attachments, if any
|
||||
* @var bool s_additional_opts Must be set to true in extension if additional options are presented in MCP post panel
|
||||
* @since 3.1.5-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'post_info',
|
||||
'mcp_post_template_data',
|
||||
'attachments',
|
||||
's_additional_opts',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.mcp_post_template_data', compact($vars)));
|
||||
|
||||
$template->assign_vars($mcp_post_template_data);
|
||||
$template->assign_var('S_MCP_POST_ADDITIONAL_OPTS', $s_additional_opts);
|
||||
|
||||
unset($mcp_post_template_data);
|
||||
|
||||
// Get User Notes
|
||||
$log_data = array();
|
||||
@@ -420,7 +461,7 @@ function mcp_post_details($id, $mode, $action)
|
||||
*/
|
||||
function change_poster(&$post_info, $userdata)
|
||||
{
|
||||
global $auth, $db, $config, $phpbb_root_path, $phpEx, $user;
|
||||
global $auth, $db, $config, $phpbb_root_path, $phpEx, $user, $phpbb_dispatcher;
|
||||
|
||||
if (empty($userdata) || $userdata['user_id'] == $post_info['user_id'])
|
||||
{
|
||||
@@ -497,7 +538,7 @@ function change_poster(&$post_info, $userdata)
|
||||
{
|
||||
// We do some additional checks in the module to ensure it can actually be utilised
|
||||
$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 && method_exists($search, 'destroy_cache'))
|
||||
{
|
||||
@@ -508,6 +549,18 @@ function change_poster(&$post_info, $userdata)
|
||||
$from_username = $post_info['username'];
|
||||
$to_username = $userdata['username'];
|
||||
|
||||
/**
|
||||
* This event allows you to perform additional tasks after changing a post's poster
|
||||
*
|
||||
* @event core.mcp_change_poster_after
|
||||
* @var array userdata Information on a post's new poster
|
||||
* @var array post_info Information on the affected post
|
||||
* @since 3.1.6-RC1
|
||||
* @changed 3.1.7-RC1 Change location to prevent post_info from being set to the new post information
|
||||
*/
|
||||
$vars = array('userdata', 'post_info');
|
||||
extract($phpbb_dispatcher->trigger_event('core.mcp_change_poster_after', compact($vars)));
|
||||
|
||||
// Renew post info
|
||||
$post_info = phpbb_get_post_data(array($post_id), false, true);
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user