Compare commits
1279 Commits
release-3.
...
release-3.
Author | SHA1 | Date | |
---|---|---|---|
|
005c27e73d | ||
|
429b99922e | ||
|
199d823f7a | ||
|
dde72c58b0 | ||
|
11242dd07d | ||
|
5382552fc8 | ||
|
1ad09d9c8b | ||
|
c1702b8e19 | ||
|
d7c96cc60c | ||
|
416728fc17 | ||
|
ec207d0a71 | ||
|
89723b17d9 | ||
|
1a3350619f | ||
|
969718fc91 | ||
|
d833f29069 | ||
|
ce74a0bd6c | ||
|
cd6c0427fb | ||
|
eae592691c | ||
|
4d63032024 | ||
|
901875a1fb | ||
|
463c62df18 | ||
|
18fc621d73 | ||
|
ee658bfe7b | ||
|
bca1b96b2e | ||
|
eed355b798 | ||
|
073f3e4470 | ||
|
bc04581b80 | ||
|
313a224c68 | ||
|
17620bba46 | ||
|
9d181daa71 | ||
|
53ed8a3cd9 | ||
|
02202b1503 | ||
|
b16a56394b | ||
|
7d08bf5b3e | ||
|
84df225038 | ||
|
8575cc69d1 | ||
|
73a0988f59 | ||
|
90025ae3e7 | ||
|
23db98276f | ||
|
c60497f009 | ||
|
009a8cb2d5 | ||
|
9ab27fe129 | ||
|
d49f70fbc7 | ||
|
3521e74939 | ||
|
558d604d83 | ||
|
55907c1724 | ||
|
ddff81c21f | ||
|
a875802c06 | ||
|
1d34968967 | ||
|
284a5671c5 | ||
|
71177c38dc | ||
|
81c92a7de9 | ||
|
35d2467c94 | ||
|
d5021aeda4 | ||
|
55f6329c1d | ||
|
e120e6ac97 | ||
|
9f54d2b590 | ||
|
6c308d81bd | ||
|
418aabb46e | ||
|
335520fc45 | ||
|
bbd0a8985c | ||
|
5fc92a03b2 | ||
|
40c79f2a26 | ||
|
d6d9ff51b2 | ||
|
42d831f472 | ||
|
be472cc7bb | ||
|
1a484f08bb | ||
|
d9f4964d91 | ||
|
b9db47e3f5 | ||
|
0b52eb2298 | ||
|
90b82d1a5f | ||
|
499088b62f | ||
|
1efbb5b3bb | ||
|
9eab4ba740 | ||
|
9d75f3fca8 | ||
|
407b9d3c6b | ||
|
84d77d6cd5 | ||
|
7f2b932a1b | ||
|
44540b6112 | ||
|
50b3c2b49e | ||
|
4a08d74571 | ||
|
285e35992a | ||
|
3d0153de60 | ||
|
0bc2f9f242 | ||
|
476b762542 | ||
|
a32f4869de | ||
|
754b5d6349 | ||
|
eca0128d0a | ||
|
1df97c205d | ||
|
d4ca81f23f | ||
|
4276f49efa | ||
|
ee70b364c7 | ||
|
7f7d8d9101 | ||
|
faf267c419 | ||
|
f0619b481f | ||
|
7e8274c345 | ||
|
0a52d732e4 | ||
|
e132e9ba76 | ||
|
5b9fe33b1b | ||
|
3cb1907e76 | ||
|
aeafb90208 | ||
|
2348580255 | ||
|
9b030fd174 | ||
|
f4c423cea1 | ||
|
4ccba99047 | ||
|
d7f4715b96 | ||
|
3d7def4196 | ||
|
d087d85618 | ||
|
d5a79ad555 | ||
|
6b87e06292 | ||
|
f3ab7aae9e | ||
|
52b83bd5e9 | ||
|
bbfbb3f1fa | ||
|
0f13635fb8 | ||
|
323167bb94 | ||
|
c0104d0243 | ||
|
d0ab101c32 | ||
|
8f09ff210f | ||
|
149a2dd91a | ||
|
33738fa3db | ||
|
70f1741331 | ||
|
160ff3471d | ||
|
4618a3e2f8 | ||
|
c3720739cb | ||
|
5d8bea9060 | ||
|
5cd4941c55 | ||
|
fb71e6dde6 | ||
|
c37d5f9b7c | ||
|
18de60c0e0 | ||
|
8abf259273 | ||
|
62973faf4b | ||
|
a7b1b71921 | ||
|
2ad87c662f | ||
|
71828ee8df | ||
|
e15b9dc782 | ||
|
0daf148aaa | ||
|
df9331084b | ||
|
1e73f8d5ea | ||
|
8c73f63529 | ||
|
c814ecc143 | ||
|
4928afedc6 | ||
|
ea4b993516 | ||
|
6647d390b0 | ||
|
6b1cd2d312 | ||
|
ec855f1817 | ||
|
3e451cbe75 | ||
|
4df853abcc | ||
|
a07b29c1df | ||
|
6e5f33e5fb | ||
|
62f69224a4 | ||
|
5cd3e7627c | ||
|
14fecb2f02 | ||
|
4565cac049 | ||
|
e29e0e5018 | ||
|
335d88cdbb | ||
|
37b919142f | ||
|
c8be24fd5e | ||
|
0442957420 | ||
|
106bc1c232 | ||
|
c5a15c0635 | ||
|
d08d988df4 | ||
|
6f3f6282d1 | ||
|
3ac583271f | ||
|
9f9e392c7d | ||
|
56cbff720d | ||
|
80e1c233d9 | ||
|
b650f45d55 | ||
|
03ded5853b | ||
|
525a62f72e | ||
|
269dee4189 | ||
|
ffc5a73a0c | ||
|
d152bbc727 | ||
|
702a51b01c | ||
|
9b5493372d | ||
|
7bfb8686d9 | ||
|
c63bc6ee93 | ||
|
94b72cfbdb | ||
|
8e737e483e | ||
|
4167be1e2c | ||
|
5bfcc7e707 | ||
|
d15e5372ca | ||
|
12fe882741 | ||
|
b8c388f184 | ||
|
379eae1a92 | ||
|
e6e7d7040a | ||
|
059790f386 | ||
|
835ee2ba63 | ||
|
5e215aef26 | ||
|
461ce3f892 | ||
|
cba12aca2a | ||
|
c24a840048 | ||
|
8a06f21ea9 | ||
|
5c3ca7404d | ||
|
31ae574830 | ||
|
eff928c29b | ||
|
3f4dcc6920 | ||
|
71d3ddc623 | ||
|
d28d90bd90 | ||
|
8d6ab63fea | ||
|
3db7ac0aad | ||
|
e4b4428173 | ||
|
1f345a8cf9 | ||
|
7fd3767bbd | ||
|
098854a822 | ||
|
bbf4bcc986 | ||
|
03f9c69e60 | ||
|
60f60acea3 | ||
|
153d1691ae | ||
|
f0850f1915 | ||
|
997b229723 | ||
|
13948718c6 | ||
|
02d28c28cd | ||
|
f3d332b78f | ||
|
950c72a8a5 | ||
|
6322970766 | ||
|
fa1c61f608 | ||
|
c7ce6cd26f | ||
|
ec8aeaf2cd | ||
|
f23d2ec42f | ||
|
e31720bb6e | ||
|
f9d34a16dd | ||
|
6f56dc8568 | ||
|
bf86553daa | ||
|
b934617a3b | ||
|
957b23765f | ||
|
088907fe8e | ||
|
4398a51dc6 | ||
|
27cfda74fc | ||
|
8314ce6871 | ||
|
4559aca723 | ||
|
9e3bc9a3f9 | ||
|
877774a296 | ||
|
0a775e0433 | ||
|
39a3f4f6c8 | ||
|
25b54791f9 | ||
|
93185574b5 | ||
|
3df25babce | ||
|
bf20fb03ef | ||
|
67a963ac42 | ||
|
74385b8fce | ||
|
6111f5fa74 | ||
|
bb7d294190 | ||
|
8a4df90dac | ||
|
1bcce75633 | ||
|
072df2217c | ||
|
e1eac80b8f | ||
|
c6a371531b | ||
|
fbc603861d | ||
|
1da6b30cf0 | ||
|
cd85f1b632 | ||
|
7c5d872344 | ||
|
48b64b0a61 | ||
|
c1d644769f | ||
|
1e4853507a | ||
|
8832851b8e | ||
|
2787e799e1 | ||
|
a09d022d5e | ||
|
4e06ab16f0 | ||
|
1f2cb69c8a | ||
|
5347eac69c | ||
|
2864e77d6c | ||
|
a3be531020 | ||
|
427d2de3ea | ||
|
e86b7ce562 | ||
|
f4f983c0f6 | ||
|
bbb6d6a452 | ||
|
efee422707 | ||
|
7330c0afd3 | ||
|
6678570f49 | ||
|
e9eafece3f | ||
|
0e6cd94fb4 | ||
|
0aea283ab0 | ||
|
b1336ae016 | ||
|
7254a52812 | ||
|
5182d02da5 | ||
|
ffe0e46e82 | ||
|
d50cec998c | ||
|
b53fd867be | ||
|
a93df0e511 | ||
|
a166f6f42c | ||
|
99574cf5e5 | ||
|
19421fcdef | ||
|
9f59aa59d9 | ||
|
7f99e1c857 | ||
|
036b5c4244 | ||
|
3c23242bfe | ||
|
be30d8251a | ||
|
9232367b35 | ||
|
dd182c5433 | ||
|
67478a0f94 | ||
|
e72c1540cb | ||
|
e6bbde2bff | ||
|
ab4b1afd98 | ||
|
7127d08c8f | ||
|
b16854ab8c | ||
|
bb4287ab2d | ||
|
9628e8df3b | ||
|
2690038d40 | ||
|
3fef570950 | ||
|
69450c7152 | ||
|
3e710fe393 | ||
|
e5f2eee167 | ||
|
899173eebd | ||
|
7273591560 | ||
|
c46a6443be | ||
|
b6786f8ba1 | ||
|
ab07be8157 | ||
|
c130165bfa | ||
|
5f237a0426 | ||
|
1e94b0ae71 | ||
|
5fea945b5b | ||
|
05d8264de6 | ||
|
208923563e | ||
|
afe99f9050 | ||
|
40e676ad03 | ||
|
cc210b1842 | ||
|
36f8fb2b37 | ||
|
5b96d30540 | ||
|
6f5524de26 | ||
|
872caf805c | ||
|
ef10b02f78 | ||
|
f48cc8bbe9 | ||
|
8da3a6f117 | ||
|
f0f88c287c | ||
|
7495055907 | ||
|
5eb0d422c8 | ||
|
dff1ea6b85 | ||
|
e3e427fa24 | ||
|
9d72463824 | ||
|
35edd7a043 | ||
|
252018b813 | ||
|
be90e97452 | ||
|
a9fa20bb91 | ||
|
4b16add055 | ||
|
73d1bf9fea | ||
|
b2b5addd09 | ||
|
513b2f8296 | ||
|
32b25d7b11 | ||
|
acfb9b9539 | ||
|
1c6ebcf02b | ||
|
ebd5aace3f | ||
|
5ce89ae82f | ||
|
4b42589cfa | ||
|
ffbe8cdc96 | ||
|
4c11ea97d5 | ||
|
ed2d080551 | ||
|
33d7eb69ef | ||
|
a2fbde44c0 | ||
|
b2674cf1f6 | ||
|
c423038587 | ||
|
0cfa977953 | ||
|
12fba95892 | ||
|
c86e5e8514 | ||
|
b0383a90e1 | ||
|
a5c65449de | ||
|
ee03b4f1ef | ||
|
874f3584e2 | ||
|
9a03b3aab6 | ||
|
a35fbdb3e9 | ||
|
40798ae616 | ||
|
9cdbb69f9e | ||
|
8a0c227bf9 | ||
|
b88b8305fd | ||
|
1dce9576e9 | ||
|
7014d824f0 | ||
|
25b013f781 | ||
|
eb4594d8ee | ||
|
be1b114114 | ||
|
e08cd70a89 | ||
|
40ab75478e | ||
|
47f04d7620 | ||
|
816465bfe9 | ||
|
1367fc234f | ||
|
a737eeb6ce | ||
|
7ed065a630 | ||
|
7d6fdcfaa5 | ||
|
14585fcb4f | ||
|
7fef91afd2 | ||
|
2c9e178a42 | ||
|
9f7f366573 | ||
|
c09023d1db | ||
|
ddeb696b25 | ||
|
eaeb88133f | ||
|
e34b92882a | ||
|
4b9434bf1b | ||
|
08e186af8e | ||
|
f6057c5eab | ||
|
ed6b8f84ad | ||
|
9334100cb3 | ||
|
a5fae1b1f0 | ||
|
41966c481f | ||
|
d0e5c0a187 | ||
|
d17904884e | ||
|
6e00529f36 | ||
|
a8027c542f | ||
|
4d0b04a397 | ||
|
3134b6b70e | ||
|
d1bff80dd1 | ||
|
f02dc44a23 | ||
|
92b5222295 | ||
|
251868dd7e | ||
|
23069a13e2 | ||
|
40006376f2 | ||
|
e66a28eb14 | ||
|
03e3ee7f16 | ||
|
0beb9128f9 | ||
|
d99cd2d02e | ||
|
dab0728357 | ||
|
8002af7526 | ||
|
38c5ee6eec | ||
|
e4a041fedb | ||
|
ebbe6a7791 | ||
|
7e8bb68999 | ||
|
ff39ffacf6 | ||
|
c29db8e7a4 | ||
|
6564446b0f | ||
|
add3d3e760 | ||
|
da189a105b | ||
|
10c67fe12a | ||
|
9d2c6b6ed6 | ||
|
6b92fccd06 | ||
|
4e5e356555 | ||
|
9e38e9dc6f | ||
|
c6557e3800 | ||
|
ce47170c29 | ||
|
4df125625c | ||
|
8ef238ea73 | ||
|
c99ed64473 | ||
|
e3e16a0166 | ||
|
2a08c60a62 | ||
|
b27c0ab992 | ||
|
3bfd87cda4 | ||
|
53169b1303 | ||
|
1d49ccd920 | ||
|
f075fb78f6 | ||
|
17f4dce0fc | ||
|
1f4bb2c149 | ||
|
e8464d7fe2 | ||
|
fbf7726642 | ||
|
ff59240748 | ||
|
bfba52781b | ||
|
659e15656f | ||
|
10e72a36a3 | ||
|
e0733ae435 | ||
|
ef9abd7165 | ||
|
9cc4d60b88 | ||
|
ec749a2b39 | ||
|
6d3fca9a41 | ||
|
9cbb9b4253 | ||
|
fce1be2684 | ||
|
f02e3a4076 | ||
|
3d8aaf6aaf | ||
|
ffb7d618ac | ||
|
11269fe62a | ||
|
a5a6855a0d | ||
|
a0287a62c1 | ||
|
2b76d7dc7c | ||
|
74e8f9bd4e | ||
|
a415a4ec2b | ||
|
f756632185 | ||
|
c28ef9afdd | ||
|
ba477f77c7 | ||
|
8ed5a047ec | ||
|
e6509aaf60 | ||
|
9caec668af | ||
|
a09c38f1cc | ||
|
0f6a0d820e | ||
|
8f5e3d5efb | ||
|
67c987f0d0 | ||
|
bf59d8dd74 | ||
|
cea35c486c | ||
|
b64d8c59b0 | ||
|
349aaab6ac | ||
|
da9ac2da72 | ||
|
8ae1b0c52e | ||
|
58d8ea5b0b | ||
|
d86bdcb2a7 | ||
|
d2a4d6624f | ||
|
d9bdd05c80 | ||
|
3350df131f | ||
|
9ce8b62894 | ||
|
65ffc76e2f | ||
|
b64da23fe1 | ||
|
67c9f4d064 | ||
|
d4c078cc78 | ||
|
9d9c57f334 | ||
|
38f184ad6b | ||
|
7ba1a96427 | ||
|
e3571fc6eb | ||
|
953a98dc0b | ||
|
de3d7aca16 | ||
|
346f654b2e | ||
|
87578e90eb | ||
|
874356e57f | ||
|
26bf79425c | ||
|
d36b0452bd | ||
|
64d880a15c | ||
|
387e4b942b | ||
|
6fd8f1b835 | ||
|
2dab3c8c52 | ||
|
35b7f94754 | ||
|
2532583765 | ||
|
7a34bf9bf5 | ||
|
281cc53532 | ||
|
3638b2ff64 | ||
|
8c27c7f10b | ||
|
88034ea2f0 | ||
|
86f66b5f72 | ||
|
838b1250f6 | ||
|
4da3d41083 | ||
|
9d9b8139d0 | ||
|
179a7a4c71 | ||
|
970ed40b09 | ||
|
0e0c649477 | ||
|
b3bcc1b501 | ||
|
652a7630bb | ||
|
7dad863a41 | ||
|
c61fa1aaa1 | ||
|
8376a027a1 | ||
|
d769e59090 | ||
|
abc5dbcd71 | ||
|
59ab09273f | ||
|
92d7c16782 | ||
|
0104188074 | ||
|
d455dd68f6 | ||
|
cf036ea0e8 | ||
|
655d95002c | ||
|
0a1f8388d0 | ||
|
3f88be6527 | ||
|
50ed202aac | ||
|
a92589436a | ||
|
b0f1a0f4bb | ||
|
6ff0aaaa70 | ||
|
ffbe1d424b | ||
|
a5922a0e8b | ||
|
fa06c7967e | ||
|
d5f99e0478 | ||
|
7b43d5c54e | ||
|
3ba62628dc | ||
|
faad779cf6 | ||
|
f6b21a2789 | ||
|
867a45138c | ||
|
aea67c8e37 | ||
|
d2334ab3e0 | ||
|
5b1c9831c2 | ||
|
a66e4770c1 | ||
|
0929267e72 | ||
|
dd9c415020 | ||
|
dd6efdad59 | ||
|
13320a08ef | ||
|
8098d313e6 | ||
|
458f9cade6 | ||
|
7512efed9e | ||
|
2929f28243 | ||
|
7b0cabc416 | ||
|
6463354a39 | ||
|
9f1493ce73 | ||
|
91dc002c31 | ||
|
54b5ee5806 | ||
|
75780d7fc8 | ||
|
61df1ac2b3 | ||
|
46384adf00 | ||
|
719aa66224 | ||
|
15507ffc16 | ||
|
bb4b3d2731 | ||
|
4dab281da1 | ||
|
1aea572aca | ||
|
fda5d8d637 | ||
|
1896825f39 | ||
|
566510769b | ||
|
4700b44125 | ||
|
641a9e5441 | ||
|
7fbf5649eb | ||
|
dfbc109b59 | ||
|
0a419781c2 | ||
|
0795b6bd6c | ||
|
ddd1937655 | ||
|
3bf55c0b4d | ||
|
a8d3cbe53b | ||
|
96a734b012 | ||
|
b7f83b2cfc | ||
|
bfecae1d60 | ||
|
1c02f7e032 | ||
|
f045744606 | ||
|
10a4f79135 | ||
|
4159bb1340 | ||
|
ac8a4b05b4 | ||
|
80a7f6930c | ||
|
614f975e68 | ||
|
df3447b725 | ||
|
e9cb9baedb | ||
|
e279a779fc | ||
|
e596d0b6ce | ||
|
0388d82504 | ||
|
909bb523bf | ||
|
589394e80b | ||
|
7f7f60698c | ||
|
13d4394844 | ||
|
70483d6088 | ||
|
2f92bc38e6 | ||
|
499c1467df | ||
|
c5227ab2a5 | ||
|
fe1f7beaf8 | ||
|
ac8b07ddd9 | ||
|
aab98b8626 | ||
|
1145af71bf | ||
|
b7f69edaa2 | ||
|
8f1a1874a9 | ||
|
6f52873636 | ||
|
aa10bc2059 | ||
|
dfba919db8 | ||
|
bc7db0ae16 | ||
|
88798b3514 | ||
|
79ce924bc1 | ||
|
d43e8c94f5 | ||
|
b54dbe0df6 | ||
|
79a1495f66 | ||
|
893e4b3067 | ||
|
a349db54d6 | ||
|
41d0b5d3a2 | ||
|
a5a18fb6dd | ||
|
a8c62e707a | ||
|
b67b67f2df | ||
|
ee90d227c2 | ||
|
51f46a8f91 | ||
|
6ac088ea2f | ||
|
6a4179cef5 | ||
|
90012c86e8 | ||
|
aa3a46a35f | ||
|
2e7ae40d49 | ||
|
eb83bd5797 | ||
|
f46057ca02 | ||
|
f4898b9258 | ||
|
9c9623e47f | ||
|
1ad0dd28f1 | ||
|
ff9b541070 | ||
|
965042d015 | ||
|
9264d7c758 | ||
|
0fbe8e8e69 | ||
|
3862b60094 | ||
|
b8ecd1a656 | ||
|
bb4b04f89a | ||
|
d24fa2e777 | ||
|
9348b0c4f2 | ||
|
b00d02496e | ||
|
5f3dffa820 | ||
|
18d5ca9ce5 | ||
|
dcd0f200d6 | ||
|
a5b3393bb0 | ||
|
595f9c132b | ||
|
5c3b6a8559 | ||
|
a3b18d87dd | ||
|
0f06b88ee7 | ||
|
fd993cbaf2 | ||
|
ab69c79d07 | ||
|
f3ae5e4cb2 | ||
|
b9289340d9 | ||
|
8b71103836 | ||
|
ea101f7932 | ||
|
7700f31213 | ||
|
a609c9db82 | ||
|
a83b952f63 | ||
|
86b3c54c77 | ||
|
e283611dc2 | ||
|
8489e0bdc2 | ||
|
a415b8e37b | ||
|
30f292f5a2 | ||
|
2c15388520 | ||
|
867bfa3f9e | ||
|
4cb930c2c1 | ||
|
70692dd522 | ||
|
c174862b7e | ||
|
7c683608ab | ||
|
7f8c4d877a | ||
|
f648fe88d5 | ||
|
9649d78fa4 | ||
|
16c43b6a7d | ||
|
2e2ab7b485 | ||
|
6d3ac29aee | ||
|
f930a75471 | ||
|
171837eefe | ||
|
0017fad554 | ||
|
c98cceaf22 | ||
|
dd7e09d092 | ||
|
4ee05b1c17 | ||
|
34004612ac | ||
|
da1888a7fa | ||
|
d7d4f681ca | ||
|
8d8c2930d2 | ||
|
352648f173 | ||
|
f6e7a94bd5 | ||
|
2793f9c078 | ||
|
a080173010 | ||
|
f3373e1e32 | ||
|
f719803fdc | ||
|
d56da0d68f | ||
|
1689191f29 | ||
|
973c2a9a3a | ||
|
707a85b6c1 | ||
|
71a015557f | ||
|
bc52a84998 | ||
|
d6e8cce44b | ||
|
2d6734cb0a | ||
|
7bc1917908 | ||
|
bb75cd40f5 | ||
|
4bf3dcbebd | ||
|
c31b53942d | ||
|
1e867ce52b | ||
|
acfe6dd37d | ||
|
0019039bc1 | ||
|
ba3e4da853 | ||
|
795fd75d60 | ||
|
b84d151afa | ||
|
17d76de7b8 | ||
|
052fdcc8d9 | ||
|
266755bd82 | ||
|
7c68964153 | ||
|
31c59cad83 | ||
|
4f96688bf7 | ||
|
c1a0d1bf3d | ||
|
115bf63538 | ||
|
bd0107a2ab | ||
|
f261c748b6 | ||
|
2b55476df0 | ||
|
d4fd5e3365 | ||
|
21c8985fe8 | ||
|
765d72d194 | ||
|
a918abe113 | ||
|
7b33018ade | ||
|
fb34cbf7cd | ||
|
4ffdb12938 | ||
|
0dfe1d0d8b | ||
|
e27b69f42a | ||
|
074b91497b | ||
|
8297f700d0 | ||
|
c40d7f0896 | ||
|
556565d072 | ||
|
8a9c2c055c | ||
|
0a4ffb7cf8 | ||
|
c9db08873f | ||
|
9f9ce10f2f | ||
|
2f54ab0a24 | ||
|
a520edb8fa | ||
|
12fd9a8827 | ||
|
b99fbd0be0 | ||
|
968360fed6 | ||
|
0103478521 | ||
|
b55d744e77 | ||
|
1e4ff6105a | ||
|
8df63a4499 | ||
|
e1bf699ad4 | ||
|
526a97db7c | ||
|
f142ed28e4 | ||
|
6d533d2f86 | ||
|
09ad1d529e | ||
|
63022f3c59 | ||
|
834a93f76c | ||
|
efd4b43c1b | ||
|
430c6aa32f | ||
|
d43f196fa6 | ||
|
ec220d6494 | ||
|
3108d0b060 | ||
|
91f7d53d8e | ||
|
040fc6dd0f | ||
|
65f83b814c | ||
|
b648d3eb4c | ||
|
cd6085ebdc | ||
|
6949f64d28 | ||
|
9bd24e2efb | ||
|
4dfd4e4cd3 | ||
|
71e0de5588 | ||
|
42b595e7e7 | ||
|
a143a19b8b | ||
|
2d0917c56e | ||
|
971b30a76d | ||
|
8171087cfb | ||
|
9bb302b92c | ||
|
6a4cb42565 | ||
|
b6f0c789d5 | ||
|
483af1d036 | ||
|
7ab774bc8d | ||
|
f23634d580 | ||
|
8dd32c2bb5 | ||
|
10b628a20a | ||
|
8e64652d80 | ||
|
054ab67771 | ||
|
98711450dd | ||
|
ced316d88c | ||
|
c4628bd92a | ||
|
3fba5e317a | ||
|
101945acf9 | ||
|
92c509bc48 | ||
|
70641e701a | ||
|
9aa8f44489 | ||
|
778e0e06f3 | ||
|
8956ec0bd4 | ||
|
757e1eac7a | ||
|
95140bb724 | ||
|
d60534d52c | ||
|
a1b58d05d1 | ||
|
f432193e07 | ||
|
25a7c6e829 | ||
|
307fa831d6 | ||
|
85031a66cc | ||
|
32010de36e | ||
|
b32dc8c667 | ||
|
32881dbe31 | ||
|
3986470b3c | ||
|
e502c8db86 | ||
|
13b59af1ff | ||
|
6fd092b5df | ||
|
6cc7da0c9c | ||
|
0868831675 | ||
|
0e772afb9d | ||
|
b6a4f83c41 | ||
|
c980402a4c | ||
|
27be69e3b3 | ||
|
aede89d408 | ||
|
4ae9e8cf6e | ||
|
0843fd4b77 | ||
|
7461536459 | ||
|
d1f85f0de3 | ||
|
be8b5a41c8 | ||
|
f534503a66 | ||
|
28ef238a5c | ||
|
dde1c7424f | ||
|
8aec6b58e0 | ||
|
d9c868d0f5 | ||
|
a9249bce5e | ||
|
c3f5dc75be | ||
|
6b057e026c | ||
|
f3588c66ec | ||
|
a269929f0e | ||
|
45d054d295 | ||
|
8bdbadabb2 | ||
|
2cc9fe5267 | ||
|
c3aca59cfb | ||
|
3f3c8d74e8 | ||
|
4522db7624 | ||
|
a61299a940 | ||
|
af77106a2f | ||
|
416577f3dc | ||
|
65c3f2a8f1 | ||
|
17928563a2 | ||
|
bb4f65d743 | ||
|
932b75c166 | ||
|
1787ccb585 | ||
|
b868886b25 | ||
|
e42202e794 | ||
|
9ee177573d | ||
|
ae6a3b03c4 | ||
|
82aed75b3b | ||
|
3a2ccd079e | ||
|
197fed16bd | ||
|
c57fbe9d0d | ||
|
12033bc499 | ||
|
71c19f6eb7 | ||
|
d2cd24e875 | ||
|
9036edd935 | ||
|
fcc320e385 | ||
|
0682e5719d | ||
|
679559ce18 | ||
|
2e814cc43f | ||
|
087a5363bb | ||
|
3472b6c5bc | ||
|
e1277c26ca | ||
|
64d97d0787 | ||
|
b9c08cddd4 | ||
|
dccbd573e8 | ||
|
efe3aaaf0b | ||
|
df1212ce27 | ||
|
4c75f013de | ||
|
1f31e8e243 | ||
|
16d78407db | ||
|
4e4c3de103 | ||
|
dbaee1a5da | ||
|
6380aea647 | ||
|
47663a4ad3 | ||
|
0cdd071230 | ||
|
df5366a5ca | ||
|
91a9d25a38 | ||
|
aa916fc43f | ||
|
505ee586ff | ||
|
b295fa4f4f | ||
|
b1d7386075 | ||
|
d693d91e26 | ||
|
decabb62c0 | ||
|
cc82f95c8f | ||
|
47759eb096 | ||
|
2e5cc62071 | ||
|
9ccb87675d | ||
|
c6cca9d0d2 | ||
|
98554475be | ||
|
6cc5160d60 | ||
|
cb65cd363a | ||
|
222bec0204 | ||
|
51251293ab | ||
|
78aa120089 | ||
|
d5022d87e7 | ||
|
5431aa6391 | ||
|
c19ab58420 | ||
|
b0942fe31d | ||
|
7f347a290c | ||
|
0d1d836a89 | ||
|
79d782c1d5 | ||
|
69cf5782d4 | ||
|
1fc7bd107d | ||
|
203f9c24d4 | ||
|
79274e904c | ||
|
5441a4ea13 | ||
|
5c1ef45488 | ||
|
7a4b404af7 | ||
|
1046ada9fc | ||
|
cafd3b79fd | ||
|
a5830fe0d5 | ||
|
5cee745fc5 | ||
|
1c88a2cb25 | ||
|
9c95831f35 | ||
|
c789acc091 | ||
|
8de93bee95 | ||
|
f2e9c62a97 | ||
|
26d4483d36 | ||
|
4859cec0c5 | ||
|
0dcb874c09 | ||
|
1da1a70650 | ||
|
e78210dc96 | ||
|
81ad381263 | ||
|
18f24a2270 | ||
|
f22cd2d734 | ||
|
07e7cde560 | ||
|
ad06f6dd71 | ||
|
9ea08aa4d7 | ||
|
4e952ad443 | ||
|
6308a442d1 | ||
|
078e0c1e44 | ||
|
8443463006 | ||
|
d2e3198407 | ||
|
a43879fe91 | ||
|
103c929ff0 | ||
|
a9a67b08a5 | ||
|
b27b9a6984 | ||
|
516bd9ea51 | ||
|
14300a1475 | ||
|
6217a51920 | ||
|
c814483627 | ||
|
1cd09a03e6 | ||
|
80a9c24b6b | ||
|
08f365236a | ||
|
7a90184421 | ||
|
5847a50334 | ||
|
1ade9b39e4 | ||
|
4c94e44710 | ||
|
d640a37984 | ||
|
e4c8e4905c | ||
|
4d30633cd4 | ||
|
6a0727acdc | ||
|
df72846b89 | ||
|
b5594371ab | ||
|
d7553893c4 | ||
|
48dc4c02ae | ||
|
f796f92058 | ||
|
fad280f94b | ||
|
cf9d1fbd1a | ||
|
0bc04a4df0 | ||
|
2b47ef1266 | ||
|
fdece6cdf3 | ||
|
a623868f20 | ||
|
ce8c09f51f | ||
|
c381ad2002 | ||
|
40497ec824 | ||
|
e43d1781bf | ||
|
d51c1707e3 | ||
|
faec26b873 | ||
|
0de7adfa37 | ||
|
5581a30f58 | ||
|
0dcfcf5854 | ||
|
92f077a4e9 | ||
|
defeb1a56f | ||
|
4b99ab7066 | ||
|
9cf81ac7f5 | ||
|
1358acfd7c | ||
|
99eeb52b76 | ||
|
b9b15b7007 | ||
|
293d64e122 | ||
|
b71cf56bda | ||
|
afada9ed40 | ||
|
75b6545bc2 | ||
|
973dfbf868 | ||
|
99f63f39eb | ||
|
d4faeb064b | ||
|
981d3005f3 | ||
|
faf4b03c43 | ||
|
8f6fcd2744 | ||
|
941cf6979e | ||
|
566c8a1bbc | ||
|
53f166274a | ||
|
57a575b5f0 | ||
|
51044167d1 | ||
|
009d59335f | ||
|
ec5729a99f | ||
|
86c472f4f7 | ||
|
30213816ae | ||
|
c939f1b2c7 | ||
|
b3421e397d | ||
|
c6272fca07 | ||
|
e7ad87e15f | ||
|
737894027a | ||
|
0ba3bd9aed | ||
|
f049fcd604 | ||
|
01df1d3301 | ||
|
66342f5b89 | ||
|
dec6c7ea8c | ||
|
f847a1a567 | ||
|
6763de2f25 | ||
|
09b6add6ee | ||
|
810d249ca2 | ||
|
29ea1c85b4 | ||
|
f19a6b9714 | ||
|
d06c2cf0f7 | ||
|
7e08109229 | ||
|
defd36ad7f | ||
|
39e51e5599 | ||
|
6768490f69 | ||
|
55b97ffc27 | ||
|
e7e016637b | ||
|
58075e25e8 | ||
|
e1af6584d9 | ||
|
23a513baec | ||
|
b343bf783a | ||
|
8be701db0a | ||
|
90771c1762 | ||
|
759950c1a6 | ||
|
205be67622 | ||
|
1a128f9a76 | ||
|
223ae1dfc2 | ||
|
965894a875 | ||
|
5c54e96aab | ||
|
56d7c2c6ed | ||
|
df75b70f3e | ||
|
4bdae294cb | ||
|
253c6e1fc1 | ||
|
9c4ba813d4 | ||
|
41d660dd98 | ||
|
36d1f87c5a | ||
|
9bc9e42c94 | ||
|
eb7152436c | ||
|
2bc79701e6 | ||
|
29b54d12cc | ||
|
1a04d15d4d | ||
|
f6fc8c08a4 | ||
|
699c642128 | ||
|
d285363700 | ||
|
a9ed32663a | ||
|
911831a9c5 | ||
|
97db218829 | ||
|
5b186c936d | ||
|
eed4d0d30f | ||
|
366451c11c | ||
|
9d13b91f46 | ||
|
7f692e7b28 | ||
|
7137dc387a | ||
|
757c67b7d8 | ||
|
63bdd193e0 | ||
|
66ecbd8545 | ||
|
d64a515476 | ||
|
34a9ed3587 | ||
|
ba1776d6a9 | ||
|
4fe95d6870 | ||
|
943f2e1a7b | ||
|
c77d6f39f2 | ||
|
7bd5c793bb | ||
|
61601a052c | ||
|
0c0024497d | ||
|
46a9e5657f | ||
|
4b90357d79 | ||
|
38ac0bcc8e | ||
|
b300e06226 | ||
|
f3eaf6fe04 | ||
|
a12a7d0b90 | ||
|
7479c61d05 | ||
|
3c91fbeaa6 | ||
|
2f2a306994 | ||
|
6c284060d7 | ||
|
1e8735eac1 | ||
|
7bcf6a621f | ||
|
825af557ae | ||
|
5e86c89989 | ||
|
ce4cb9c917 | ||
|
bda6879305 | ||
|
608d3f4d8d | ||
|
51ece03612 | ||
|
682527f509 | ||
|
5354c46e01 | ||
|
8e638dbf6d | ||
|
a0673f8e10 | ||
|
4193bf5641 | ||
|
ebaec047f2 | ||
|
3d9b257597 | ||
|
9d9685eec9 | ||
|
cf2ac56950 | ||
|
240ff27707 | ||
|
90241ae4e6 | ||
|
6400902a01 | ||
|
ee758e22a6 | ||
|
2ee13bbc24 | ||
|
e5a5933db6 | ||
|
8c628a6dc2 | ||
|
1fb4ebb34a | ||
|
64eec22884 | ||
|
abb1244b44 | ||
|
e816006b8e | ||
|
c123c93ca0 | ||
|
0e27b10b8f | ||
|
a876cc8c26 | ||
|
ce4035fdd3 | ||
|
95c0d81ba1 | ||
|
40cd7570e6 | ||
|
b003019958 | ||
|
d264369441 | ||
|
75fcfb1c1d | ||
|
170b75d0c9 | ||
|
994a0dcd4c | ||
|
5314c2bddf | ||
|
b6acc1b9db | ||
|
1b393b1d0b | ||
|
effb5d95d0 | ||
|
8ab7f6b595 | ||
|
1ee4894271 | ||
|
65539df39a | ||
|
8fef959418 | ||
|
f30c5f730e | ||
|
a8e74fff9b | ||
|
cb49a0c4cc | ||
|
3a413cbf30 | ||
|
cb8b245639 | ||
|
8fb9f19aae | ||
|
a0db23bd0e | ||
|
6f66423de9 | ||
|
7efc624b0a | ||
|
9c3126add0 | ||
|
f1ab6f31a1 | ||
|
f64a937a57 | ||
|
526329e697 | ||
|
89fdd1baf2 | ||
|
e132cdd325 | ||
|
bc24c78e06 | ||
|
6f093ade8a | ||
|
a159899d02 | ||
|
eb2aa1f83a | ||
|
cee8ac9dbe | ||
|
71ac6ab2b8 | ||
|
be769d4ca6 | ||
|
e802c5f082 | ||
|
f64373a29f | ||
|
a1683dfb67 | ||
|
e803efc6fc | ||
|
459c62b339 | ||
|
1b3109d650 | ||
|
ce0c33f62a | ||
|
077db77259 | ||
|
30e1d29f58 | ||
|
04e9789e7f | ||
|
b51b4c92e2 | ||
|
74a96bf7c2 | ||
|
cd7b21a703 | ||
|
834aea70a7 | ||
|
85bc9b69ae | ||
|
f3fef8934e | ||
|
43279ee010 | ||
|
6d0697eb89 | ||
|
d5128b3e87 | ||
|
9feb7096ee | ||
|
34aad4046f | ||
|
ca7f4fb531 | ||
|
80f15a41c4 | ||
|
2f773fca18 | ||
|
ba464ec93a | ||
|
80d5a1ec1f | ||
|
f2a98339e2 | ||
|
2478eef550 | ||
|
7307380091 | ||
|
fb610f99df | ||
|
aa1ffc9319 | ||
|
ef9e0e743a | ||
|
820db008ff | ||
|
05ae327553 | ||
|
9b8d8b020f | ||
|
92b096b05b | ||
|
8bd1853b56 | ||
|
96024e88e9 | ||
|
d6008e896a | ||
|
10b6399d30 | ||
|
eeeb62b433 | ||
|
9ff6358dc9 | ||
|
bea5f94de6 | ||
|
e28b93e0cc | ||
|
9a8a0af7ba | ||
|
d03be5ea5f | ||
|
7fca351e05 | ||
|
d7c12ccd60 | ||
|
74854ac65d | ||
|
d48e4b680e | ||
|
29ffddee71 | ||
|
7fa596a991 | ||
|
77d52982c8 | ||
|
39d46e2599 | ||
|
a1dff65cd1 | ||
|
a2627e8790 | ||
|
20dfb23dd4 | ||
|
d1935b0b0b | ||
|
039b466bd0 | ||
|
c371e86fa1 | ||
|
8d0933ca4b | ||
|
6de352f7da | ||
|
c0d3cf6a27 | ||
|
f21ef60175 | ||
|
d6de9ce5d9 | ||
|
9f981a7741 | ||
|
6a33472214 | ||
|
77f8bb48fe | ||
|
84e68b3a73 | ||
|
b02e579c1c | ||
|
6851ff8fab | ||
|
7313cc777e | ||
|
ace3b806a9 | ||
|
ef58752db8 | ||
|
8b8e065441 | ||
|
e3eff2a976 | ||
|
e005455881 | ||
|
26c6ffa458 | ||
|
457e13634e | ||
|
c767712c64 | ||
|
689eaab3e2 | ||
|
fb08d1b27e | ||
|
6e4348b0ea | ||
|
4a76763a8a | ||
|
55664c1c10 | ||
|
d4938e34b0 | ||
|
c20b658f70 | ||
|
31e43ce124 | ||
|
dc65058c20 | ||
|
e59222496a | ||
|
f4761b5e08 | ||
|
9c310f789f | ||
|
ad596f4390 | ||
|
6323180344 | ||
|
9a3aeb8a99 | ||
|
3dbac0f88b | ||
|
9ebee7de32 | ||
|
0061a305d8 | ||
|
5a780dfab1 | ||
|
aaddf41e5b | ||
|
0b4944f125 | ||
|
60c9955f51 | ||
|
ae63843647 | ||
|
265c621c9e | ||
|
bfb672f326 | ||
|
fe1ab6d2ef | ||
|
5e7d9d2fcf | ||
|
496cc64bc6 | ||
|
685bdc87e6 | ||
|
8671e40217 | ||
|
67de119566 | ||
|
1e1efa294e | ||
|
9f5d383d50 | ||
|
8880871951 | ||
|
468f92261a | ||
|
6fafa40d93 | ||
|
bef207e9b7 | ||
|
1e0775a3da | ||
|
da6b378e64 | ||
|
53f597b6d0 | ||
|
d53336af06 | ||
|
292908ca4a | ||
|
7c99e30920 | ||
|
b7f54e42b2 | ||
|
9dd71fa32e | ||
|
0c4b53e2f1 | ||
|
0c109c9d37 |
9
.gitignore
vendored
@@ -1,9 +1,8 @@
|
||||
*~
|
||||
/phpunit.xml
|
||||
/phpBB/cache/twig/*
|
||||
/phpBB/cache/*.html
|
||||
/phpBB/cache/*.php
|
||||
/phpBB/cache/*.lock
|
||||
/phpBB/cache/*
|
||||
!/phpBB/cache/.htaccess
|
||||
!/phpBB/cache/index.html
|
||||
/phpBB/composer.phar
|
||||
/phpBB/config*.php
|
||||
/phpBB/ext/*
|
||||
@@ -11,6 +10,7 @@
|
||||
/phpBB/images/avatars/gallery/*
|
||||
/phpBB/images/avatars/upload/*
|
||||
/phpBB/images/ranks/*
|
||||
/phpBB/install/schemas/schema.json
|
||||
/phpBB/language/*
|
||||
!/phpBB/language/en
|
||||
/phpBB/store/*
|
||||
@@ -21,3 +21,4 @@
|
||||
/tests/phpbb_unit_tests.sqlite*
|
||||
/tests/test_config*.php
|
||||
/tests/tmp/*
|
||||
/tests/vendor
|
||||
|
@@ -16,13 +16,18 @@ matrix:
|
||||
env: DB=postgres
|
||||
- php: 5.4
|
||||
env: DB=sqlite3
|
||||
- php: 5.4
|
||||
env: DB=mysqli;SLOWTESTS=1
|
||||
- php: 5.5
|
||||
env: DB=mysqli
|
||||
- php: 5.6
|
||||
env: DB=mysqli
|
||||
- php: 7.0
|
||||
env: DB=mysqli
|
||||
- php: hhvm
|
||||
env: DB=mysqli
|
||||
allow_failures:
|
||||
- php: 7.0
|
||||
- php: hhvm
|
||||
fast_finish: true
|
||||
|
||||
@@ -34,12 +39,14 @@ install:
|
||||
|
||||
before_script:
|
||||
- travis/setup-database.sh $DB $TRAVIS_PHP_VERSION
|
||||
- phantomjs --webdriver=8910 > /dev/null &
|
||||
|
||||
script:
|
||||
- travis/phing-sniff.sh $DB $TRAVIS_PHP_VERSION
|
||||
- travis/check-sami-parse-errors.sh $DB $TRAVIS_PHP_VERSION
|
||||
- travis/check-image-icc-profiles.sh $DB $TRAVIS_PHP_VERSION
|
||||
- travis/check-executable-files.sh $DB $TRAVIS_PHP_VERSION ./
|
||||
- phpBB/vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml
|
||||
- sh -c "if [ '$SLOWTESTS' != '1' ]; then phpBB/vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml; fi"
|
||||
- sh -c "if [ '$SLOWTESTS' = '1' ]; then phpBB/vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml --group slow; fi"
|
||||
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.3.3' -a '$DB' = 'mysqli' -a '$TRAVIS_PULL_REQUEST' != 'false' ]; then git-tools/commit-msg-hook-range.sh origin/$TRAVIS_BRANCH..FETCH_HEAD; fi"
|
||||
|
||||
|
6
CONTRIBUTING.md
Normal file
@@ -0,0 +1,6 @@
|
||||
## CONTRIBUTE
|
||||
|
||||
1. [Create an account on phpBB.com](http://www.phpbb.com/community/ucp.php?mode=register)
|
||||
2. [Create a ticket (unless there already is one)](http://tracker.phpbb.com/secure/CreateIssue!default.jspa)
|
||||
3. Read our [Coding guidelines](https://wiki.phpbb.com/Coding_guidelines) and [Git Contribution Guidelines](http://wiki.phpbb.com/Git); if you're new to git, also read [the introduction guide](http://wiki.phpbb.com/display/DEV/Working+with+Git)
|
||||
4. Send us a pull request
|
@@ -27,9 +27,9 @@ To be able to run an installation from the repo (and not from a pre-built packag
|
||||
|
||||
We have unit and functional tests in order to prevent regressions. You can view the bamboo continuous integration [here](http://bamboo.phpbb.com) or check our travis build below:
|
||||
|
||||
* develop [](http://travis-ci.org/phpbb/phpbb)
|
||||
* develop-ascraeus [](http://travis-ci.org/phpbb/phpbb)
|
||||
* develop-olympus [](http://travis-ci.org/phpbb/phpbb)
|
||||
* [](http://travis-ci.org/phpbb/phpbb) **master** - Latest development version
|
||||
* [](http://travis-ci.org/phpbb/phpbb) **3.1.x** - Development of version 3.1.x
|
||||
* [](http://travis-ci.org/phpbb/phpbb) **3.0.x** - Development of version 3.0.x
|
||||
|
||||
## LICENSE
|
||||
|
||||
|
@@ -2,9 +2,9 @@
|
||||
|
||||
<project name="phpBB" description="The phpBB forum software" default="all" basedir="../">
|
||||
<!-- a few settings for the build -->
|
||||
<property name="newversion" value="3.1.0-RC4" />
|
||||
<property name="prevversion" value="3.1.0-RC3" />
|
||||
<property name="olderversions" value="3.0.12, 3.1.0-a1, 3.1.0-a2, 3.1.0-a3, 3.1.0-b1, 3.1.0-b2, 3.1.0-b3, 3.1.0-b4, 3.1.0-RC1, 3.1.0-RC2" />
|
||||
<property name="newversion" value="3.1.4" />
|
||||
<property name="prevversion" value="3.1.3" />
|
||||
<property name="olderversions" value="3.0.12, 3.0.13, 3.0.13-PL1, 3.0.14, 3.1.0, 3.1.1, 3.1.2, 3.1.4-RC1, 3.1.4-RC2" />
|
||||
<!-- no configuration should be needed beyond this point -->
|
||||
|
||||
<property name="oldversions" value="${olderversions}, ${prevversion}" />
|
||||
@@ -117,9 +117,16 @@
|
||||
</if>
|
||||
</target>
|
||||
|
||||
<!-- Builds docs for current branch into build/api/output/master -->
|
||||
<target name="docs">
|
||||
<exec dir="."
|
||||
command="phpBB/vendor/bin/sami.php update build/sami.conf.php"
|
||||
command="phpBB/vendor/bin/sami.php update build/sami-checkout.conf.php"
|
||||
passthru="true" />
|
||||
</target>
|
||||
<!-- Builds docs for multiple branches/tags into build/api/output/$branch -->
|
||||
<target name="docs-all">
|
||||
<exec dir="."
|
||||
command="phpBB/vendor/bin/sami.php update build/sami-all.conf.php"
|
||||
passthru="true" />
|
||||
</target>
|
||||
|
||||
@@ -273,6 +280,9 @@
|
||||
</else>
|
||||
</if>
|
||||
|
||||
<!-- Create schema.json -->
|
||||
<exec dir="${dir}" command="php develop/create_schema_files.php" />
|
||||
|
||||
<delete file="${dir}/config.php" />
|
||||
<delete dir="${dir}/develop" />
|
||||
<delete dir="${dir}/install/data" />
|
||||
|
@@ -20,7 +20,7 @@ if ($_SERVER['argc'] != 2)
|
||||
|
||||
$fixVersion = $_SERVER['argv'][1];
|
||||
|
||||
$query = 'project = PHPBB3
|
||||
$query = 'project IN (PHPBB3, SECURITY)
|
||||
AND resolution = Fixed
|
||||
AND fixVersion = "' . $fixVersion . '"
|
||||
AND status IN ("Unverified Fix", Closed)';
|
||||
|
@@ -84,12 +84,12 @@ class phpbb_Sniffs_Commenting_FileCommentSniff implements PHP_CodeSniffer_Sniff
|
||||
$line = $tokens[$i]['content'];
|
||||
|
||||
// Check that each line starts with a '*'
|
||||
if (substr($line, 0, 1) !== '*')
|
||||
if (substr($line, 0, 1) !== '*' && substr($line, 0, 2) !== ' *')
|
||||
{
|
||||
$message = 'The file doc comment should not be idented.';
|
||||
$message = 'The file doc comment should not be indented.';
|
||||
$phpcsFile->addWarning($message, $i);
|
||||
}
|
||||
else if (preg_match('/^\*\s+@([\w]+)\s+(.*)$/', $line, $match) !== 0)
|
||||
else if (preg_match('/^[ ]?\*\s+@([\w]+)\s+(.*)$/', $line, $match) !== 0)
|
||||
{
|
||||
if (!isset($tags[$match[1]]))
|
||||
{
|
||||
|
@@ -24,6 +24,23 @@ class phpbb_Sniffs_Namespaces_UnusedUseSniff implements PHP_CodeSniffer_Sniff
|
||||
return array(T_USE);
|
||||
}
|
||||
|
||||
protected function check($phpcsFile, $found_name, $full_name, $short_name, $line)
|
||||
{
|
||||
|
||||
if ($found_name === $full_name)
|
||||
{
|
||||
$error = 'Either use statement or full name must be used.';
|
||||
$phpcsFile->addError($error, $line, 'FullName');
|
||||
}
|
||||
|
||||
if ($found_name === $short_name)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
@@ -74,16 +91,7 @@ class phpbb_Sniffs_Namespaces_UnusedUseSniff implements PHP_CodeSniffer_Sniff
|
||||
|
||||
$simple_class_name = trim($phpcsFile->getTokensAsString($simple_class_name_start, ($simple_class_name_end - $simple_class_name_start)));
|
||||
|
||||
if ($simple_class_name === $class_name_full)
|
||||
{
|
||||
$error = 'Either use statement or full name must be used.';
|
||||
$phpcsFile->addError($error, $simple_statement, 'FullName');
|
||||
}
|
||||
|
||||
if ($simple_class_name === $class_name_short)
|
||||
{
|
||||
$ok = true;
|
||||
}
|
||||
$ok = $this->check($phpcsFile, $simple_class_name, $class_name_full, $class_name_short, $simple_statement) ? true : $ok;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,16 +106,7 @@ class phpbb_Sniffs_Namespaces_UnusedUseSniff implements PHP_CodeSniffer_Sniff
|
||||
|
||||
$paamayim_nekudotayim_class_name = trim($phpcsFile->getTokensAsString($paamayim_nekudotayim_class_name_start + 1, ($paamayim_nekudotayim_class_name_end - $paamayim_nekudotayim_class_name_start)));
|
||||
|
||||
if ($paamayim_nekudotayim_class_name === $class_name_full)
|
||||
{
|
||||
$error = 'Either use statement or full name must be used.';
|
||||
$phpcsFile->addError($error, $paamayim_nekudotayim, 'FullName');
|
||||
}
|
||||
|
||||
if ($paamayim_nekudotayim_class_name === $class_name_short)
|
||||
{
|
||||
$ok = true;
|
||||
}
|
||||
$ok = $this->check($phpcsFile, $paamayim_nekudotayim_class_name, $class_name_full, $class_name_short, $paamayim_nekudotayim) ? true : $ok;
|
||||
}
|
||||
|
||||
// Checks in implements
|
||||
@@ -126,16 +125,7 @@ class phpbb_Sniffs_Namespaces_UnusedUseSniff implements PHP_CodeSniffer_Sniff
|
||||
|
||||
$implements_class_name = trim($phpcsFile->getTokensAsString($implements_class_name_start, ($implements_class_name_end - $implements_class_name_start)));
|
||||
|
||||
if ($implements_class_name === $class_name_full)
|
||||
{
|
||||
$error = 'Either use statement or full name must be used.';
|
||||
$phpcsFile->addError($error, $implements, 'FullName');
|
||||
}
|
||||
|
||||
if ($implements_class_name === $class_name_short)
|
||||
{
|
||||
$ok = true;
|
||||
}
|
||||
$ok = $this->check($phpcsFile, $implements_class_name, $class_name_full, $class_name_short, $implements) ? true : $ok;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,34 +135,64 @@ class phpbb_Sniffs_Namespaces_UnusedUseSniff implements PHP_CodeSniffer_Sniff
|
||||
{
|
||||
$old_function_declaration = $function_declaration;
|
||||
|
||||
$end_function = $phpcsFile->findNext(array(T_CLOSE_PARENTHESIS), ($function_declaration + 1));
|
||||
$old_argument = $function_declaration;
|
||||
while (($argument = $phpcsFile->findNext(T_VARIABLE, ($old_argument + 1), $end_function)) !== false)
|
||||
// Check docblocks
|
||||
$find = array(
|
||||
T_COMMENT,
|
||||
T_DOC_COMMENT,
|
||||
T_CLASS,
|
||||
T_FUNCTION,
|
||||
T_OPEN_TAG,
|
||||
);
|
||||
|
||||
$comment_end = $phpcsFile->findPrevious($find, ($function_declaration - 1));
|
||||
if ($comment_end !== false)
|
||||
{
|
||||
$old_argument = $argument;
|
||||
|
||||
$start_argument = $phpcsFile->findPrevious(array(T_OPEN_PARENTHESIS, T_COMMA), $argument);
|
||||
$argument_class_name_start = $phpcsFile->findNext(array(T_NS_SEPARATOR, T_STRING), ($start_argument + 1), $argument);
|
||||
|
||||
// Skip the parameter if no type is defined.
|
||||
if ($argument_class_name_start !== false)
|
||||
if (!$tokens[$comment_end]['code'] !== T_DOC_COMMENT)
|
||||
{
|
||||
$argument_class_name_end = $phpcsFile->findNext($find, ($argument_class_name_start + 1), null, true);
|
||||
$comment_start = ($phpcsFile->findPrevious(T_DOC_COMMENT, ($comment_end - 1), null, true) + 1);
|
||||
$comment = $phpcsFile->getTokensAsString($comment_start, ($comment_end - $comment_start + 1));
|
||||
|
||||
$argument_class_name = $phpcsFile->getTokensAsString($argument_class_name_start, ($argument_class_name_end - $argument_class_name_start - 1));
|
||||
|
||||
if ($argument_class_name === $class_name_full)
|
||||
try
|
||||
{
|
||||
$error = 'Either use statement or full name must be used.';
|
||||
$phpcsFile->addError($error, $function_declaration, 'FullName');
|
||||
$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;
|
||||
}
|
||||
}
|
||||
|
||||
// Check @return
|
||||
$return = $comment_parser->getReturn();
|
||||
if ($return !== null)
|
||||
{
|
||||
$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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($argument_class_name === $class_name_short)
|
||||
catch (PHP_CodeSniffer_CommentParser_ParserException $e)
|
||||
{
|
||||
$ok = true;
|
||||
$line = ($e->getLineWithinComment() + $comment_start);
|
||||
$phpcsFile->addError($e->getMessage(), $line, 'FailedParse');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Check type hint
|
||||
$params = $phpcsFile->getMethodParameters($function_declaration);
|
||||
foreach ($params as $param)
|
||||
{
|
||||
$ok = $this->check($phpcsFile, $param['type_hint'], $class_name_full, $class_name_short, $function_declaration) ? true : $ok;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$ok)
|
||||
|
@@ -394,6 +394,7 @@ if (sizeof($package->old_packages))
|
||||
$package->run_command('mkdir ' . $package->get('files_directory') . '/release');
|
||||
$package->run_command('cp -Rp ' . $package->get('dest_dir') . '/docs ' . $package->get('files_directory') . '/release');
|
||||
$package->run_command('cp -Rp ' . $package->get('dest_dir') . '/install ' . $package->get('files_directory') . '/release');
|
||||
$package->run_command('cp -Rp ' . $package->get('dest_dir') . '/vendor ' . $package->get('files_directory') . '/release');
|
||||
|
||||
$package->run_command('rm -v ' . $package->get('files_directory') . '/release/install/install_install.php');
|
||||
$package->run_command('rm -v ' . $package->get('files_directory') . '/release/install/install_update.php');
|
||||
|
30
build/sami-all.conf.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?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.
|
||||
*
|
||||
*/
|
||||
|
||||
require __DIR__ . '/sami-checkout.conf.php';
|
||||
|
||||
$config['versions'] = Sami\Version\GitVersionCollection::create(__DIR__ . '/../')
|
||||
/*
|
||||
This would be nice, but currently causes various problems that need
|
||||
debugging.
|
||||
->addFromTags('release-3.0.*')
|
||||
->add('3.0.x', '3.0-next (olympus)')
|
||||
->addFromTags('release-3.1.*')
|
||||
->add('3.1.x', '3.1-next (ascraeus)')
|
||||
->add('master')
|
||||
*/
|
||||
->add('3.0.x')
|
||||
->add('3.1.x')
|
||||
;
|
||||
|
||||
return new Sami\Sami($iterator, $config);
|
@@ -31,23 +31,8 @@ $iterator = Symfony\Component\Finder\Finder::create()
|
||||
->notPath('data')
|
||||
;
|
||||
|
||||
$versions = Sami\Version\GitVersionCollection::create(__DIR__ . '/../')
|
||||
/*
|
||||
This would be nice, but currently causes various problems that need
|
||||
debugging.
|
||||
->addFromTags('release-3.0.*')
|
||||
->add('develop-olympus', '3.0-next (olympus)')
|
||||
->addFromTags('release-3.1.*')
|
||||
->add('develop-ascraeus', '3.1-next (ascraeus)')
|
||||
->add('develop')
|
||||
*/
|
||||
->add('develop-olympus')
|
||||
->add('develop-ascraeus')
|
||||
;
|
||||
|
||||
$config = array(
|
||||
'theme' => 'enhanced',
|
||||
'versions' => $versions,
|
||||
'title' => 'phpBB API Documentation',
|
||||
'build_dir' => __DIR__.'/api/output/%version%',
|
||||
'cache_dir' => __DIR__.'/api/cache/%version%',
|
BIN
composer.phar
@@ -47,6 +47,8 @@
|
||||
<dd><input id="send" type="checkbox" class="radio" name="send_immediately" checked="checked" /></dd>
|
||||
</dl>
|
||||
|
||||
<!-- EVENT acp_email_options_after -->
|
||||
|
||||
<p class="submit-buttons">
|
||||
<input class="button1" type="submit" id="submit" name="submit" value="{L_SEND_EMAIL}" />
|
||||
<input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" />
|
||||
|
@@ -111,6 +111,7 @@
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_FORUM_SETTINGS}</legend>
|
||||
<!-- EVENT acp_forums_main_settings_prepend -->
|
||||
<dl>
|
||||
<dt><label for="forum_type">{L_FORUM_TYPE}{L_COLON}</label></dt>
|
||||
<dd><select id="forum_type" name="forum_type" onchange="display_options(this.options[this.selectedIndex].value);">{S_FORUM_TYPE_OPTIONS}</select></dd>
|
||||
@@ -182,6 +183,7 @@
|
||||
<dt><label for="forum_style">{L_FORUM_STYLE}{L_COLON}</label></dt>
|
||||
<dd><select id="forum_style" name="forum_style"><option value="0">{L_DEFAULT_STYLE}</option>{S_STYLES_OPTIONS}</select></dd>
|
||||
</dl>
|
||||
<!-- EVENT acp_forums_main_settings_append -->
|
||||
</fieldset>
|
||||
|
||||
<div id="forum_cat_options">
|
||||
@@ -198,6 +200,7 @@
|
||||
<div id="forum_post_options">
|
||||
<fieldset>
|
||||
<legend>{L_GENERAL_FORUM_SETTINGS}</legend>
|
||||
<!-- EVENT acp_forums_normal_settings_prepend -->
|
||||
<dl>
|
||||
<dt><label for="forum_status">{L_FORUM_STATUS}{L_COLON}</label></dt>
|
||||
<dd><select id="forum_status" name="forum_status">{S_STATUS_OPTIONS}</select></dd>
|
||||
@@ -246,6 +249,7 @@
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_FORUM_PRUNE_SETTINGS}</legend>
|
||||
<!-- EVENT acp_forums_prune_settings_prepend -->
|
||||
<dl>
|
||||
<dt><label for="enable_prune">{L_FORUM_AUTO_PRUNE}{L_COLON}</label><br /><span>{L_FORUM_AUTO_PRUNE_EXPLAIN}</span></dt>
|
||||
<dd><label><input type="radio" class="radio" name="enable_prune" value="1"<!-- IF S_PRUNE_ENABLE --> id="enable_prune" checked="checked"<!-- ENDIF --> /> {L_YES}</label>
|
||||
@@ -291,6 +295,7 @@
|
||||
<dt><label for="prune_shadow_days">{L_AUTO_PRUNE_SHADOW_DAYS}{L_COLON}</label><br /><span>{L_AUTO_PRUNE_SHADOW_DAYS_EXPLAIN}</span></dt>
|
||||
<dd><input type="number" id="prune_shadow_days" name="prune_shadow_days" value="{PRUNE_SHADOW_DAYS}" maxlength="4" size="4" min="0" max="9999" /> {L_DAYS}</dd>
|
||||
</dl>
|
||||
<!-- EVENT acp_forums_prune_settings_append -->
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
@@ -317,6 +322,7 @@
|
||||
<div id="forum_rules_options">
|
||||
<fieldset>
|
||||
<legend>{L_FORUM_RULES}</legend>
|
||||
<!-- EVENT acp_forums_rules_settings_prepend -->
|
||||
<dl>
|
||||
<dt><label for="forum_rules_link">{L_FORUM_RULES_LINK}{L_COLON}</label><br /><span>{L_FORUM_RULES_LINK_EXPLAIN}</span></dt>
|
||||
<dd><input class="text medium" type="text" id="forum_rules_link" name="forum_rules_link" value="{FORUM_RULES_LINK}" maxlength="255" /></dd>
|
||||
@@ -334,6 +340,7 @@
|
||||
<label><input type="checkbox" class="radio" name="rules_parse_smilies"<!-- IF S_SMILIES_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_SMILIES}</label>
|
||||
<label><input type="checkbox" class="radio" name="rules_parse_urls"<!-- IF S_URLS_CHECKED --> checked="checked"<!-- ENDIF --> /> {L_PARSE_URLS}</label></dd>
|
||||
</dl>
|
||||
<!-- EVENT acp_forums_rules_settings_append -->
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
|
@@ -7,7 +7,7 @@
|
||||
<script type="text/javascript" defer="defer">
|
||||
// <![CDATA[
|
||||
<!-- IF S_ADD_CODE -->
|
||||
|
||||
|
||||
var smiley = Array();
|
||||
<!-- BEGIN smile -->
|
||||
smiley['{smile.SMILEY_URL}'] = Array();
|
||||
@@ -37,10 +37,10 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
<!-- ENDIF -->
|
||||
|
||||
|
||||
|
||||
function toggle_select(icon, display, select)
|
||||
{
|
||||
var disp = document.getElementById('order_disp_' + select);
|
||||
@@ -101,7 +101,7 @@
|
||||
<tbody>
|
||||
<!-- BEGIN items -->
|
||||
<tr>
|
||||
|
||||
|
||||
<td style="text-align: center;"><img src="{items.IMG_SRC}" alt="" title="" /><input type="hidden" name="image[{items.IMG}]" value="1" /></td>
|
||||
<td style="vertical-align: top;">[{items.IMG}]</td>
|
||||
<!-- IF S_SMILIES -->
|
||||
@@ -121,7 +121,7 @@
|
||||
<optgroup id="order_disp_{items.S_ROW_COUNT}" label="{L_DISPLAY_POSTING}" <!-- IF not items.POSTING_CHECKED -->disabled="disabled" class="disabled-options" <!-- ENDIF -->>{S_ORDER_LIST_DISPLAY}</optgroup>
|
||||
<optgroup id="order_no_disp_{items.S_ROW_COUNT}" label="{L_DISPLAY_POSTING_NO}" <!-- IF items.POSTING_CHECKED -->disabled="disabled" class="disabled-options" <!-- ENDIF -->>{S_ORDER_LIST_UNDISPLAY}</optgroup>
|
||||
</select></td>
|
||||
<!-- ENDIF -->
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_ADD -->
|
||||
<td><input type="checkbox" class="radio" name="add_img[{items.IMG}]" value="1" /></td>
|
||||
<!-- ENDIF -->
|
||||
@@ -147,6 +147,8 @@
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
<!-- ELSE -->
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row3">
|
||||
<td colspan="{COLSPAN}">{L_NO_ICONS}</td>
|
||||
</tr>
|
||||
@@ -174,7 +176,7 @@
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_IMPORT}</legend>
|
||||
|
||||
|
||||
<!-- IF not S_PAK_OPTIONS -->
|
||||
<p>{L_NO_PAK_OPTIONS}</p>
|
||||
|
||||
@@ -259,7 +261,7 @@
|
||||
</table>
|
||||
<div class="pagination">
|
||||
<!-- IF .pagination -->
|
||||
<!-- INCLUDE pagination.html -->
|
||||
<!-- INCLUDE pagination.html -->
|
||||
<!-- ENDIF -->
|
||||
</div>
|
||||
<p class="quick">
|
||||
|
@@ -8,7 +8,7 @@
|
||||
|
||||
<form id="list" method="post" action="{U_ACTION}">
|
||||
|
||||
<fieldset class="display-options" style="float: left">
|
||||
<fieldset class="display-options search-box">
|
||||
{L_SEARCH_KEYWORDS}{L_COLON} <input type="text" name="keywords" value="{S_KEYWORDS}" /> <input type="submit" class="button2" name="filter" value="{L_SEARCH}" />
|
||||
</fieldset>
|
||||
|
||||
|
@@ -2,6 +2,7 @@
|
||||
|
||||
<fieldset>
|
||||
<legend>{L_USER_PROFILE}</legend>
|
||||
<!-- EVENT acp_users_profile_before -->
|
||||
<dl>
|
||||
<dt><label for="jabber">{L_UCP_JABBER}{L_COLON}</label></dt>
|
||||
<dd><input type="email" id="jabber" name="jabber" value="{JABBER}" /></dd>
|
||||
@@ -10,6 +11,7 @@
|
||||
<dt><label for="birthday">{L_BIRTHDAY}{L_COLON}</label><br /><span>{L_BIRTHDAY_EXPLAIN}</span></dt>
|
||||
<dd>{L_DAY}{L_COLON} <select id="birthday" name="bday_day">{S_BIRTHDAY_DAY_OPTIONS}</select> {L_MONTH}{L_COLON} <select name="bday_month">{S_BIRTHDAY_MONTH_OPTIONS}</select> {L_YEAR}{L_COLON} <select name="bday_year">{S_BIRTHDAY_YEAR_OPTIONS}</select></dd>
|
||||
</dl>
|
||||
<!-- EVENT acp_users_profile_after -->
|
||||
</fieldset>
|
||||
|
||||
<!-- IF .profile_fields -->
|
||||
@@ -26,7 +28,7 @@
|
||||
<!-- END profile_fields -->
|
||||
</fieldset>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- EVENT acp_users_profile_custom_after -->
|
||||
<fieldset class="quick">
|
||||
<input class="button1" type="submit" name="update" value="{L_SUBMIT}" />
|
||||
{S_FORM_TOKEN}
|
||||
|
@@ -109,6 +109,14 @@ hr {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.search-box {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.rtl .search-box {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.small {
|
||||
font-size: 0.85em;
|
||||
}
|
||||
@@ -1773,6 +1781,7 @@ li.pagination ul {
|
||||
margin: 10px 0;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.success {
|
||||
|
@@ -2,7 +2,7 @@
|
||||
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<!-- IF META -->{META}<!-- ENDIF -->
|
||||
<title>{PAGE_TITLE}</title>
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<!-- IF META -->{META}<!-- ENDIF -->
|
||||
<title>{PAGE_TITLE}</title>
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<!-- IF META -->{META}<!-- ENDIF -->
|
||||
<title>{PAGE_TITLE}</title>
|
||||
|
||||
|
@@ -2,6 +2,7 @@
|
||||
<html dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<!-- IF META -->{META}<!-- ENDIF -->
|
||||
<title>{PAGE_TITLE}</title>
|
||||
|
||||
|
@@ -1,17 +1,25 @@
|
||||
<dl>
|
||||
<dt><label for="timezone">{L_BOARD_TIMEZONE}{L_COLON}</label></dt>
|
||||
<!-- IF S_TZ_DATE_OPTIONS -->
|
||||
<!-- IF .timezone_date -->
|
||||
<dd id="tz_select_date" style="display: none;">
|
||||
<select name="tz_date" id="tz_date" class="autowidth tz_select">
|
||||
<option value="">{L_SELECT_CURRENT_TIME}</option>
|
||||
{S_TZ_DATE_OPTIONS}
|
||||
<!-- BEGIN timezone_date -->
|
||||
<option value="{timezone_date.VALUE}"<!-- IF timezone_date.SELECTED --> selected="selected"<!-- ENDIF -->>{timezone_date.TITLE}</option>
|
||||
<!-- END timezone_date -->
|
||||
</select>
|
||||
</dd>
|
||||
<!-- ENDIF -->
|
||||
<dd>
|
||||
<select name="tz" id="timezone" class="autowidth tz_select">
|
||||
<option value="">{L_SELECT_TIMEZONE}</option>
|
||||
{S_TZ_OPTIONS}
|
||||
<!-- BEGIN timezone_select -->
|
||||
<optgroup label="{timezone_select.LABEL}" data-tz-value="{timezone_select.VALUE}">
|
||||
<!-- BEGIN timezone_options -->
|
||||
<option title="{timezone_select.timezone_options.TITLE}" value="{timezone_select.timezone_options.VALUE}"<!-- IF timezone_select.timezone_options.SELECTED --> selected="selected"<!-- ENDIF -->>{timezone_select.timezone_options.LABEL}</option>
|
||||
<!-- END timezone_options -->
|
||||
</optgroup>
|
||||
<!-- END timezone_select -->
|
||||
</select>
|
||||
|
||||
<!-- INCLUDEJS timezone.js -->
|
||||
|
@@ -386,7 +386,8 @@ phpbb.ajaxify = function(options) {
|
||||
type: method,
|
||||
data: data,
|
||||
success: returnHandler,
|
||||
error: errorHandler
|
||||
error: errorHandler,
|
||||
cache: false
|
||||
});
|
||||
request.always(function() {
|
||||
$loadingIndicator.fadeOut(phpbb.alertTime);
|
||||
@@ -407,7 +408,9 @@ phpbb.ajaxify = function(options) {
|
||||
$elements.find('input:submit').click(function () {
|
||||
var $this = $(this);
|
||||
|
||||
$this.siblings('[data-clicked]').removeAttr('data-clicked');
|
||||
// Remove data-clicked attribute from any submit button of form
|
||||
$this.parents('form:first').find('input:submit[data-clicked]').removeAttr('data-clicked');
|
||||
|
||||
$this.attr('data-clicked', 'true');
|
||||
});
|
||||
}
|
||||
@@ -786,7 +789,7 @@ phpbb.timezoneSwitchDate = function(keepSelection) {
|
||||
}
|
||||
|
||||
if ($tzDate.val() !== '') {
|
||||
$timezone.children('optgroup').remove(':not([label="' + $('#tz_date').val() + '"])');
|
||||
$timezone.children('optgroup').remove(':not([data-tz-value="' + $('#tz_date').val() + '"])');
|
||||
}
|
||||
|
||||
if ($tzDate.val() === $tzSelectDateSuggest.attr('data-suggested-tz')) {
|
||||
@@ -795,7 +798,7 @@ phpbb.timezoneSwitchDate = function(keepSelection) {
|
||||
$tzSelectDateSuggest.css('display', 'inline');
|
||||
}
|
||||
|
||||
var $tzOptions = $timezone.children('optgroup[label="' + $tzDate.val() + '"]').children('option');
|
||||
var $tzOptions = $timezone.children('optgroup[data-tz-value="' + $tzDate.val() + '"]').children('option');
|
||||
|
||||
if ($tzOptions.length === 1) {
|
||||
// If there is only one timezone for the selected date, we just select that automatically.
|
||||
@@ -849,7 +852,7 @@ phpbb.timezonePreselectSelect = function(forceSelector) {
|
||||
minutes = minutes.toString();
|
||||
}
|
||||
|
||||
var prefix = 'GMT' + sign + hours + ':' + minutes;
|
||||
var prefix = 'UTC' + sign + hours + ':' + minutes;
|
||||
var prefixLength = prefix.length;
|
||||
var selectorOptions = $('option', '#tz_date');
|
||||
var i;
|
||||
|
@@ -266,10 +266,6 @@ function mozWrap(txtarea, open, close) {
|
||||
var selEnd = txtarea.selectionEnd;
|
||||
var scrollTop = txtarea.scrollTop;
|
||||
|
||||
if (selEnd === 1 || selEnd === 2) {
|
||||
selEnd = selLength;
|
||||
}
|
||||
|
||||
var s1 = (txtarea.value).substring(0,selStart);
|
||||
var s2 = (txtarea.value).substring(selStart, selEnd);
|
||||
var s3 = (txtarea.value).substring(selEnd, selLength);
|
||||
|
@@ -34,6 +34,14 @@ phpbb.plupload.initialize = function() {
|
||||
if (uploader.features.dragdrop) {
|
||||
$('#drag-n-drop-message').show();
|
||||
}
|
||||
|
||||
// Ensure "Add files" button position is correctly calculated.
|
||||
if ($('#attach-panel-multi').is(':visible')) {
|
||||
uploader.refresh();
|
||||
}
|
||||
$('[data-subpanel="attach-panel"]').one('click', function() {
|
||||
uploader.refresh();
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
@@ -104,7 +104,7 @@ require($phpbb_root_path . 'includes/compatibility_globals.' . $phpEx);
|
||||
|
||||
// Add own hook handler
|
||||
require($phpbb_root_path . 'includes/hooks/index.' . $phpEx);
|
||||
$phpbb_hook = new phpbb_hook(array('exit_handler', 'phpbb_user_session_handler', 'append_sid', array('\phpbb\template\template', 'display')));
|
||||
$phpbb_hook = new phpbb_hook(array('exit_handler', 'phpbb_user_session_handler', 'append_sid', array('template', 'display')));
|
||||
$phpbb_hook_finder = $phpbb_container->get('hook_finder');
|
||||
|
||||
foreach ($phpbb_hook_finder->find() as $hook)
|
||||
|
191
phpBB/composer.lock
generated
@@ -108,17 +108,17 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/config",
|
||||
"version": "v2.3.19",
|
||||
"version": "v2.3.21",
|
||||
"target-dir": "Symfony/Component/Config",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/Config.git",
|
||||
"reference": "b34d2b32a92938476f0689486e7a11ea1aeb079e"
|
||||
"reference": "f9fac999dbc2c6aabd749c034d938b5f9aa5fb7d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/Config/zipball/b34d2b32a92938476f0689486e7a11ea1aeb079e",
|
||||
"reference": "b34d2b32a92938476f0689486e7a11ea1aeb079e",
|
||||
"url": "https://api.github.com/repos/symfony/Config/zipball/f9fac999dbc2c6aabd749c034d938b5f9aa5fb7d",
|
||||
"reference": "f9fac999dbc2c6aabd749c034d938b5f9aa5fb7d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -152,21 +152,21 @@
|
||||
],
|
||||
"description": "Symfony Config Component",
|
||||
"homepage": "http://symfony.com",
|
||||
"time": "2014-08-02 07:53:48"
|
||||
"time": "2014-09-23 05:15:05"
|
||||
},
|
||||
{
|
||||
"name": "symfony/console",
|
||||
"version": "v2.3.19",
|
||||
"version": "v2.3.21",
|
||||
"target-dir": "Symfony/Component/Console",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/Console.git",
|
||||
"reference": "a2723f99716c2fa6411e2eb5842edbe680e4b462"
|
||||
"reference": "aa12ac573c583a74c2cb26ad9be478e119f04ad1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/Console/zipball/a2723f99716c2fa6411e2eb5842edbe680e4b462",
|
||||
"reference": "a2723f99716c2fa6411e2eb5842edbe680e4b462",
|
||||
"url": "https://api.github.com/repos/symfony/Console/zipball/aa12ac573c583a74c2cb26ad9be478e119f04ad1",
|
||||
"reference": "aa12ac573c583a74c2cb26ad9be478e119f04ad1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -205,21 +205,21 @@
|
||||
],
|
||||
"description": "Symfony Console Component",
|
||||
"homepage": "http://symfony.com",
|
||||
"time": "2014-08-07 15:55:24"
|
||||
"time": "2014-10-05 13:45:10"
|
||||
},
|
||||
{
|
||||
"name": "symfony/debug",
|
||||
"version": "v2.3.19",
|
||||
"version": "v2.3.21",
|
||||
"target-dir": "Symfony/Component/Debug",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/Debug.git",
|
||||
"reference": "91e3a1480c67601d2406cd938735abe0243e1c95"
|
||||
"reference": "883f847ad179e92549a8cea372b08e5ef47ffe40"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/Debug/zipball/91e3a1480c67601d2406cd938735abe0243e1c95",
|
||||
"reference": "91e3a1480c67601d2406cd938735abe0243e1c95",
|
||||
"url": "https://api.github.com/repos/symfony/Debug/zipball/883f847ad179e92549a8cea372b08e5ef47ffe40",
|
||||
"reference": "883f847ad179e92549a8cea372b08e5ef47ffe40",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -261,21 +261,21 @@
|
||||
],
|
||||
"description": "Symfony Debug Component",
|
||||
"homepage": "http://symfony.com",
|
||||
"time": "2014-07-07 10:13:42"
|
||||
"time": "2014-10-09 16:42:17"
|
||||
},
|
||||
{
|
||||
"name": "symfony/dependency-injection",
|
||||
"version": "v2.3.19",
|
||||
"version": "v2.3.21",
|
||||
"target-dir": "Symfony/Component/DependencyInjection",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/DependencyInjection.git",
|
||||
"reference": "5ee5795515be251c56057d79154e561ee1efecd2"
|
||||
"reference": "e2324e1c8c39faa5f27e6170b278d7f631574141"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/DependencyInjection/zipball/5ee5795515be251c56057d79154e561ee1efecd2",
|
||||
"reference": "5ee5795515be251c56057d79154e561ee1efecd2",
|
||||
"url": "https://api.github.com/repos/symfony/DependencyInjection/zipball/e2324e1c8c39faa5f27e6170b278d7f631574141",
|
||||
"reference": "e2324e1c8c39faa5f27e6170b278d7f631574141",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -317,21 +317,21 @@
|
||||
],
|
||||
"description": "Symfony DependencyInjection Component",
|
||||
"homepage": "http://symfony.com",
|
||||
"time": "2014-08-27 08:32:18"
|
||||
"time": "2014-10-01 05:38:33"
|
||||
},
|
||||
{
|
||||
"name": "symfony/event-dispatcher",
|
||||
"version": "v2.3.19",
|
||||
"version": "v2.3.21",
|
||||
"target-dir": "Symfony/Component/EventDispatcher",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/EventDispatcher.git",
|
||||
"reference": "2c64e46d7e22bcafcab4413ff62bc389abf87ea5"
|
||||
"reference": "3e0b837811fadd73c833c7c06a92201d953df59d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/2c64e46d7e22bcafcab4413ff62bc389abf87ea5",
|
||||
"reference": "2c64e46d7e22bcafcab4413ff62bc389abf87ea5",
|
||||
"url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/3e0b837811fadd73c833c7c06a92201d953df59d",
|
||||
"reference": "3e0b837811fadd73c833c7c06a92201d953df59d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -371,21 +371,21 @@
|
||||
],
|
||||
"description": "Symfony EventDispatcher Component",
|
||||
"homepage": "http://symfony.com",
|
||||
"time": "2014-07-25 15:00:14"
|
||||
"time": "2014-10-01 05:39:06"
|
||||
},
|
||||
{
|
||||
"name": "symfony/filesystem",
|
||||
"version": "v2.3.19",
|
||||
"version": "v2.3.21",
|
||||
"target-dir": "Symfony/Component/Filesystem",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/Filesystem.git",
|
||||
"reference": "007359d2822d5eba4f04f6507bc9b46877c622b4"
|
||||
"reference": "1c3a5fab445d1d4a5d57f8fbf1379696c9785942"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/Filesystem/zipball/007359d2822d5eba4f04f6507bc9b46877c622b4",
|
||||
"reference": "007359d2822d5eba4f04f6507bc9b46877c622b4",
|
||||
"url": "https://api.github.com/repos/symfony/Filesystem/zipball/1c3a5fab445d1d4a5d57f8fbf1379696c9785942",
|
||||
"reference": "1c3a5fab445d1d4a5d57f8fbf1379696c9785942",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -418,21 +418,21 @@
|
||||
],
|
||||
"description": "Symfony Filesystem Component",
|
||||
"homepage": "http://symfony.com",
|
||||
"time": "2014-08-31 03:30:23"
|
||||
"time": "2014-09-22 08:32:35"
|
||||
},
|
||||
{
|
||||
"name": "symfony/http-foundation",
|
||||
"version": "v2.3.19",
|
||||
"version": "v2.3.21",
|
||||
"target-dir": "Symfony/Component/HttpFoundation",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/HttpFoundation.git",
|
||||
"reference": "d0125fed988da9e189864c2e6de967b3ee7f1d98"
|
||||
"reference": "30c90f08f948dd43e7310beae7a85c02ad2b655d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/d0125fed988da9e189864c2e6de967b3ee7f1d98",
|
||||
"reference": "d0125fed988da9e189864c2e6de967b3ee7f1d98",
|
||||
"url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/30c90f08f948dd43e7310beae7a85c02ad2b655d",
|
||||
"reference": "30c90f08f948dd43e7310beae7a85c02ad2b655d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -468,21 +468,21 @@
|
||||
],
|
||||
"description": "Symfony HttpFoundation Component",
|
||||
"homepage": "http://symfony.com",
|
||||
"time": "2014-09-03 07:39:11"
|
||||
"time": "2014-10-23 13:11:04"
|
||||
},
|
||||
{
|
||||
"name": "symfony/http-kernel",
|
||||
"version": "v2.3.19",
|
||||
"version": "v2.3.21",
|
||||
"target-dir": "Symfony/Component/HttpKernel",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/HttpKernel.git",
|
||||
"reference": "a24817f69012b23ce7c554af6b4c7b53235c7c55"
|
||||
"reference": "0154ff659004d4148e8da0f2bdb672efe55e6ee5"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/HttpKernel/zipball/a24817f69012b23ce7c554af6b4c7b53235c7c55",
|
||||
"reference": "a24817f69012b23ce7c554af6b4c7b53235c7c55",
|
||||
"url": "https://api.github.com/repos/symfony/HttpKernel/zipball/0154ff659004d4148e8da0f2bdb672efe55e6ee5",
|
||||
"reference": "0154ff659004d4148e8da0f2bdb672efe55e6ee5",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -539,21 +539,21 @@
|
||||
],
|
||||
"description": "Symfony HttpKernel Component",
|
||||
"homepage": "http://symfony.com",
|
||||
"time": "2014-09-03 09:45:27"
|
||||
"time": "2014-10-24 05:54:08"
|
||||
},
|
||||
{
|
||||
"name": "symfony/routing",
|
||||
"version": "v2.3.19",
|
||||
"version": "v2.3.21",
|
||||
"target-dir": "Symfony/Component/Routing",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/Routing.git",
|
||||
"reference": "aa2beef5d5f1d84250b5ca73a4056c0504e5969e"
|
||||
"reference": "f7f8ebf9c99e5ebfdb908c3558a818c2883eab1f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/Routing/zipball/aa2beef5d5f1d84250b5ca73a4056c0504e5969e",
|
||||
"reference": "aa2beef5d5f1d84250b5ca73a4056c0504e5969e",
|
||||
"url": "https://api.github.com/repos/symfony/Routing/zipball/f7f8ebf9c99e5ebfdb908c3558a818c2883eab1f",
|
||||
"reference": "f7f8ebf9c99e5ebfdb908c3558a818c2883eab1f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -563,6 +563,7 @@
|
||||
"doctrine/common": "~2.2",
|
||||
"psr/log": "~1.0",
|
||||
"symfony/config": "~2.2",
|
||||
"symfony/http-foundation": "~2.3",
|
||||
"symfony/yaml": "~2.0"
|
||||
},
|
||||
"suggest": {
|
||||
@@ -597,21 +598,21 @@
|
||||
],
|
||||
"description": "Symfony Routing Component",
|
||||
"homepage": "http://symfony.com",
|
||||
"time": "2014-08-15 09:05:55"
|
||||
"time": "2014-10-13 12:38:27"
|
||||
},
|
||||
{
|
||||
"name": "symfony/yaml",
|
||||
"version": "v2.3.19",
|
||||
"version": "v2.3.21",
|
||||
"target-dir": "Symfony/Component/Yaml",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/Yaml.git",
|
||||
"reference": "71ceeca3d8164f0c5313127b24ad056071ccf2c6"
|
||||
"reference": "34687c6236f1dfcebc874fbebd8da74d90f9f64f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/Yaml/zipball/71ceeca3d8164f0c5313127b24ad056071ccf2c6",
|
||||
"reference": "71ceeca3d8164f0c5313127b24ad056071ccf2c6",
|
||||
"url": "https://api.github.com/repos/symfony/Yaml/zipball/34687c6236f1dfcebc874fbebd8da74d90f9f64f",
|
||||
"reference": "34687c6236f1dfcebc874fbebd8da74d90f9f64f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -644,7 +645,7 @@
|
||||
],
|
||||
"description": "Symfony Yaml Component",
|
||||
"homepage": "http://symfony.com",
|
||||
"time": "2014-08-28 01:42:35"
|
||||
"time": "2014-10-01 05:38:33"
|
||||
},
|
||||
{
|
||||
"name": "twig/twig",
|
||||
@@ -702,21 +703,21 @@
|
||||
"packages-dev": [
|
||||
{
|
||||
"name": "fabpot/goutte",
|
||||
"version": "v1.0.3",
|
||||
"version": "v1.0.7",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/fabpot/Goutte.git",
|
||||
"reference": "75c9f23c4122caf4ea3e87a42a00b471366e707f"
|
||||
"url": "https://github.com/FriendsOfPHP/Goutte.git",
|
||||
"reference": "794b196e76bdd37b5155cdecbad311f0a3b07625"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/fabpot/Goutte/zipball/75c9f23c4122caf4ea3e87a42a00b471366e707f",
|
||||
"reference": "75c9f23c4122caf4ea3e87a42a00b471366e707f",
|
||||
"url": "https://api.github.com/repos/FriendsOfPHP/Goutte/zipball/794b196e76bdd37b5155cdecbad311f0a3b07625",
|
||||
"reference": "794b196e76bdd37b5155cdecbad311f0a3b07625",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-curl": "*",
|
||||
"guzzle/http": ">=3.0.5,<3.8-dev",
|
||||
"guzzle/http": "~3.1",
|
||||
"php": ">=5.3.0",
|
||||
"symfony/browser-kit": "~2.1",
|
||||
"symfony/css-selector": "~2.1",
|
||||
@@ -725,8 +726,8 @@
|
||||
"symfony/process": "~2.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"guzzle/plugin-history": ">=3.0.5,<3.8-dev",
|
||||
"guzzle/plugin-mock": ">=3.0.5,<3.8-dev"
|
||||
"guzzle/plugin-history": "~3.1",
|
||||
"guzzle/plugin-mock": "~3.1"
|
||||
},
|
||||
"type": "application",
|
||||
"extra": {
|
||||
@@ -746,9 +747,7 @@
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
"email": "fabien@symfony.com",
|
||||
"homepage": "http://fabien.potencier.org",
|
||||
"role": "Lead Developer"
|
||||
"email": "fabien@symfony.com"
|
||||
}
|
||||
],
|
||||
"description": "A simple PHP Web Scraper",
|
||||
@@ -756,7 +755,7 @@
|
||||
"keywords": [
|
||||
"scraper"
|
||||
],
|
||||
"time": "2013-08-16 06:03:22"
|
||||
"time": "2014-10-09 15:52:51"
|
||||
},
|
||||
{
|
||||
"name": "guzzle/common",
|
||||
@@ -1591,16 +1590,16 @@
|
||||
},
|
||||
{
|
||||
"name": "sami/sami",
|
||||
"version": "v1.3",
|
||||
"version": "v1.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/fabpot/Sami.git",
|
||||
"reference": "76f2ed80b3420f7e2f6dcd5b7218b5a5781f4110"
|
||||
"url": "https://github.com/FriendsOfPHP/Sami.git",
|
||||
"reference": "70f29c781f7bef30181c814b9471b2ceac694454"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/fabpot/Sami/zipball/76f2ed80b3420f7e2f6dcd5b7218b5a5781f4110",
|
||||
"reference": "76f2ed80b3420f7e2f6dcd5b7218b5a5781f4110",
|
||||
"url": "https://api.github.com/repos/FriendsOfPHP/Sami/zipball/70f29c781f7bef30181c814b9471b2ceac694454",
|
||||
"reference": "70f29c781f7bef30181c814b9471b2ceac694454",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1621,7 +1620,7 @@
|
||||
"type": "application",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.3-dev"
|
||||
"dev-master": "1.4-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@@ -1636,9 +1635,7 @@
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
"email": "fabien@symfony.com",
|
||||
"homepage": "http://fabien.potencier.org",
|
||||
"role": "Lead Developer"
|
||||
"email": "fabien@symfony.com"
|
||||
}
|
||||
],
|
||||
"description": "Sami, an API documentation generator",
|
||||
@@ -1646,7 +1643,7 @@
|
||||
"keywords": [
|
||||
"phpdoc"
|
||||
],
|
||||
"time": "2013-11-30 17:16:25"
|
||||
"time": "2014-06-25 11:24:03"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/comparator",
|
||||
@@ -1987,17 +1984,17 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/browser-kit",
|
||||
"version": "v2.3.19",
|
||||
"version": "v2.3.21",
|
||||
"target-dir": "Symfony/Component/BrowserKit",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/BrowserKit.git",
|
||||
"reference": "262d698efaa788ce24ff9c987378789bf3f81ce9"
|
||||
"reference": "6a403eedacb56d32dc2cc657cfeac09d640ae6bc"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/BrowserKit/zipball/262d698efaa788ce24ff9c987378789bf3f81ce9",
|
||||
"reference": "262d698efaa788ce24ff9c987378789bf3f81ce9",
|
||||
"url": "https://api.github.com/repos/symfony/BrowserKit/zipball/6a403eedacb56d32dc2cc657cfeac09d640ae6bc",
|
||||
"reference": "6a403eedacb56d32dc2cc657cfeac09d640ae6bc",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2038,21 +2035,21 @@
|
||||
],
|
||||
"description": "Symfony BrowserKit Component",
|
||||
"homepage": "http://symfony.com",
|
||||
"time": "2014-08-05 07:20:55"
|
||||
"time": "2014-09-22 08:32:35"
|
||||
},
|
||||
{
|
||||
"name": "symfony/css-selector",
|
||||
"version": "v2.3.19",
|
||||
"version": "v2.3.21",
|
||||
"target-dir": "Symfony/Component/CssSelector",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/CssSelector.git",
|
||||
"reference": "8953d325d3341c246abadb79be172de95ef80664"
|
||||
"reference": "d9943386b648d21746bed25cc24f61fab1387943"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/CssSelector/zipball/8953d325d3341c246abadb79be172de95ef80664",
|
||||
"reference": "8953d325d3341c246abadb79be172de95ef80664",
|
||||
"url": "https://api.github.com/repos/symfony/CssSelector/zipball/d9943386b648d21746bed25cc24f61fab1387943",
|
||||
"reference": "d9943386b648d21746bed25cc24f61fab1387943",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2089,21 +2086,21 @@
|
||||
],
|
||||
"description": "Symfony CssSelector Component",
|
||||
"homepage": "http://symfony.com",
|
||||
"time": "2014-08-27 08:24:06"
|
||||
"time": "2014-10-09 12:30:02"
|
||||
},
|
||||
{
|
||||
"name": "symfony/dom-crawler",
|
||||
"version": "v2.3.19",
|
||||
"version": "v2.3.21",
|
||||
"target-dir": "Symfony/Component/DomCrawler",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/DomCrawler.git",
|
||||
"reference": "bad8d98561f071639fa67b20680bffcc256ce252"
|
||||
"reference": "64b90870ee3a4e88c9a7a12861683864de029d31"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/DomCrawler/zipball/bad8d98561f071639fa67b20680bffcc256ce252",
|
||||
"reference": "bad8d98561f071639fa67b20680bffcc256ce252",
|
||||
"url": "https://api.github.com/repos/symfony/DomCrawler/zipball/64b90870ee3a4e88c9a7a12861683864de029d31",
|
||||
"reference": "64b90870ee3a4e88c9a7a12861683864de029d31",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2142,21 +2139,21 @@
|
||||
],
|
||||
"description": "Symfony DomCrawler Component",
|
||||
"homepage": "http://symfony.com",
|
||||
"time": "2014-08-21 00:21:59"
|
||||
"time": "2014-10-01 05:38:33"
|
||||
},
|
||||
{
|
||||
"name": "symfony/finder",
|
||||
"version": "v2.3.19",
|
||||
"version": "v2.3.21",
|
||||
"target-dir": "Symfony/Component/Finder",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/Finder.git",
|
||||
"reference": "f7a5a5a3b1fc0ec9a1a5b4429223a8726e0f4b55"
|
||||
"reference": "fc25dab213d14468c39f12d47e5b79a72b898d4d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/Finder/zipball/f7a5a5a3b1fc0ec9a1a5b4429223a8726e0f4b55",
|
||||
"reference": "f7a5a5a3b1fc0ec9a1a5b4429223a8726e0f4b55",
|
||||
"url": "https://api.github.com/repos/symfony/Finder/zipball/fc25dab213d14468c39f12d47e5b79a72b898d4d",
|
||||
"reference": "fc25dab213d14468c39f12d47e5b79a72b898d4d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2189,21 +2186,21 @@
|
||||
],
|
||||
"description": "Symfony Finder Component",
|
||||
"homepage": "http://symfony.com",
|
||||
"time": "2014-08-31 04:03:32"
|
||||
"time": "2014-10-01 05:39:06"
|
||||
},
|
||||
{
|
||||
"name": "symfony/process",
|
||||
"version": "v2.3.19",
|
||||
"version": "v2.3.21",
|
||||
"target-dir": "Symfony/Component/Process",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/Process.git",
|
||||
"reference": "b8fc0e4b6750e4c458a38d038e6b4d538d4fe2bb"
|
||||
"reference": "0434822691030547f2439d30ff68758c5576a0ce"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/Process/zipball/b8fc0e4b6750e4c458a38d038e6b4d538d4fe2bb",
|
||||
"reference": "b8fc0e4b6750e4c458a38d038e6b4d538d4fe2bb",
|
||||
"url": "https://api.github.com/repos/symfony/Process/zipball/0434822691030547f2439d30ff68758c5576a0ce",
|
||||
"reference": "0434822691030547f2439d30ff68758c5576a0ce",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -2236,7 +2233,7 @@
|
||||
],
|
||||
"description": "Symfony Process Component",
|
||||
"homepage": "http://symfony.com",
|
||||
"time": "2014-08-28 09:02:24"
|
||||
"time": "2014-10-01 05:38:33"
|
||||
}
|
||||
],
|
||||
"aliases": [
|
||||
|
@@ -1,4 +1,9 @@
|
||||
services:
|
||||
# ----- Auth management -----
|
||||
auth:
|
||||
class: phpbb\auth\auth
|
||||
|
||||
# ----- Auth providers -----
|
||||
auth.provider_collection:
|
||||
class: phpbb\auth\provider_collection
|
||||
arguments:
|
||||
@@ -6,6 +11,7 @@ services:
|
||||
- @config
|
||||
tags:
|
||||
- { name: service_collection, tag: auth.provider }
|
||||
|
||||
auth.provider.db:
|
||||
class: phpbb\auth\provider\db
|
||||
arguments:
|
||||
@@ -19,6 +25,7 @@ services:
|
||||
- %core.php_ext%
|
||||
tags:
|
||||
- { name: auth.provider }
|
||||
|
||||
auth.provider.apache:
|
||||
class: phpbb\auth\provider\apache
|
||||
arguments:
|
||||
@@ -31,6 +38,7 @@ services:
|
||||
- %core.php_ext%
|
||||
tags:
|
||||
- { name: auth.provider }
|
||||
|
||||
auth.provider.ldap:
|
||||
class: phpbb\auth\provider\ldap
|
||||
arguments:
|
||||
@@ -40,6 +48,7 @@ services:
|
||||
- @user
|
||||
tags:
|
||||
- { name: auth.provider }
|
||||
|
||||
auth.provider.oauth:
|
||||
class: phpbb\auth\provider\oauth\oauth
|
||||
arguments:
|
||||
@@ -57,12 +66,15 @@ services:
|
||||
- %core.php_ext%
|
||||
tags:
|
||||
- { name: auth.provider }
|
||||
|
||||
# ----- OAuth services providers -----
|
||||
auth.provider.oauth.service_collection:
|
||||
class: phpbb\di\service_collection
|
||||
arguments:
|
||||
- @service_container
|
||||
tags:
|
||||
- { name: service_collection, tag: auth.provider.oauth.service }
|
||||
|
||||
auth.provider.oauth.service.bitly:
|
||||
class: phpbb\auth\provider\oauth\service\bitly
|
||||
arguments:
|
||||
@@ -70,6 +82,7 @@ services:
|
||||
- @request
|
||||
tags:
|
||||
- { name: auth.provider.oauth.service }
|
||||
|
||||
auth.provider.oauth.service.facebook:
|
||||
class: phpbb\auth\provider\oauth\service\facebook
|
||||
arguments:
|
||||
@@ -77,6 +90,7 @@ services:
|
||||
- @request
|
||||
tags:
|
||||
- { name: auth.provider.oauth.service }
|
||||
|
||||
auth.provider.oauth.service.google:
|
||||
class: phpbb\auth\provider\oauth\service\google
|
||||
arguments:
|
@@ -1,4 +1,18 @@
|
||||
services:
|
||||
avatar.manager:
|
||||
class: phpbb\avatar\manager
|
||||
arguments:
|
||||
- @config
|
||||
- @avatar.driver_collection
|
||||
|
||||
# ----- Avatar drivers -----
|
||||
avatar.driver_collection:
|
||||
class: phpbb\di\service_collection
|
||||
arguments:
|
||||
- @service_container
|
||||
tags:
|
||||
- { name: service_collection, tag: avatar.driver }
|
||||
|
||||
avatar.driver.gravatar:
|
||||
class: phpbb\avatar\driver\gravatar
|
||||
arguments:
|
||||
@@ -51,10 +65,3 @@ services:
|
||||
- [set_name, [avatar.driver.upload]]
|
||||
tags:
|
||||
- { name: avatar.driver }
|
||||
|
||||
avatar.driver_collection:
|
||||
class: phpbb\di\service_collection
|
||||
arguments:
|
||||
- @service_container
|
||||
tags:
|
||||
- { name: service_collection, tag: avatar.driver }
|
@@ -1,8 +1,3 @@
|
||||
parameters:
|
||||
tables.captcha_qa_questions: %core.table_prefix%captcha_questions
|
||||
tables.captcha_qa_answers: %core.table_prefix%captcha_answers
|
||||
tables.captcha_qa_confirm: %core.table_prefix%qa_confirm
|
||||
|
||||
services:
|
||||
captcha.factory:
|
||||
class: phpbb\captcha\factory
|
||||
@@ -10,6 +5,8 @@ services:
|
||||
- @service_container
|
||||
- @captcha.plugins.service_collection
|
||||
|
||||
# ----- Captcha plugins -----
|
||||
# Scope MUST be prototype for all the plugins to work.
|
||||
captcha.plugins.service_collection:
|
||||
class: phpbb\di\service_collection
|
||||
arguments:
|
||||
@@ -19,7 +16,7 @@ services:
|
||||
|
||||
core.captcha.plugins.gd:
|
||||
class: phpbb\captcha\plugins\gd
|
||||
scope: prototype # scope MUST be prototype for this to work!
|
||||
scope: prototype
|
||||
calls:
|
||||
- [set_name, [core.captcha.plugins.gd]]
|
||||
tags:
|
||||
@@ -27,7 +24,7 @@ services:
|
||||
|
||||
core.captcha.plugins.gd_wave:
|
||||
class: phpbb\captcha\plugins\gd_wave
|
||||
scope: prototype # scope MUST be prototype for this to work!
|
||||
scope: prototype
|
||||
calls:
|
||||
- [set_name, [core.captcha.plugins.gd_wave]]
|
||||
tags:
|
||||
@@ -35,7 +32,7 @@ services:
|
||||
|
||||
core.captcha.plugins.nogd:
|
||||
class: phpbb\captcha\plugins\nogd
|
||||
scope: prototype # scope MUST be prototype for this to work!
|
||||
scope: prototype
|
||||
calls:
|
||||
- [set_name, [core.captcha.plugins.nogd]]
|
||||
tags:
|
||||
@@ -43,7 +40,7 @@ services:
|
||||
|
||||
core.captcha.plugins.qa:
|
||||
class: phpbb\captcha\plugins\qa
|
||||
scope: prototype # scope MUST be prototype for this to work!
|
||||
scope: prototype
|
||||
arguments:
|
||||
- %tables.captcha_qa_questions%
|
||||
- %tables.captcha_qa_answers%
|
||||
@@ -55,7 +52,7 @@ services:
|
||||
|
||||
core.captcha.plugins.recaptcha:
|
||||
class: phpbb\captcha\plugins\recaptcha
|
||||
scope: prototype # scope MUST be prototype for this to work!
|
||||
scope: prototype
|
||||
calls:
|
||||
- [set_name, [core.captcha.plugins.recaptcha]]
|
||||
tags:
|
||||
|
@@ -84,6 +84,7 @@ services:
|
||||
- @config
|
||||
- @cache
|
||||
- @log
|
||||
- %core.root_path%
|
||||
tags:
|
||||
- { name: console.command }
|
||||
|
||||
|
72
phpBB/config/content.yml
Normal file
@@ -0,0 +1,72 @@
|
||||
services:
|
||||
content.visibility:
|
||||
class: phpbb\content_visibility
|
||||
arguments:
|
||||
- @auth
|
||||
- @config
|
||||
- @dispatcher
|
||||
- @dbal.conn
|
||||
- @user
|
||||
- %core.root_path%
|
||||
- %core.php_ext%
|
||||
- %tables.forums%
|
||||
- %tables.posts%
|
||||
- %tables.topics%
|
||||
- %tables.users%
|
||||
|
||||
groupposition.legend:
|
||||
class: phpbb\groupposition\legend
|
||||
arguments:
|
||||
- @dbal.conn
|
||||
- @user
|
||||
|
||||
groupposition.teampage:
|
||||
class: phpbb\groupposition\teampage
|
||||
arguments:
|
||||
- @dbal.conn
|
||||
- @user
|
||||
- @cache.driver
|
||||
|
||||
message.form.admin:
|
||||
class: phpbb\message\admin_form
|
||||
arguments:
|
||||
- @auth
|
||||
- @config
|
||||
- @config_text
|
||||
- @dbal.conn
|
||||
- @user
|
||||
- %core.root_path%
|
||||
- %core.php_ext%
|
||||
|
||||
message.form.topic:
|
||||
class: phpbb\message\topic_form
|
||||
arguments:
|
||||
- @auth
|
||||
- @config
|
||||
- @dbal.conn
|
||||
- @user
|
||||
- %core.root_path%
|
||||
- %core.php_ext%
|
||||
|
||||
message.form.user:
|
||||
class: phpbb\message\user_form
|
||||
arguments:
|
||||
- @auth
|
||||
- @config
|
||||
- @dbal.conn
|
||||
- @user
|
||||
- %core.root_path%
|
||||
- %core.php_ext%
|
||||
|
||||
pagination:
|
||||
class: phpbb\pagination
|
||||
arguments:
|
||||
- @template
|
||||
- @user
|
||||
- @controller.helper
|
||||
- @dispatcher
|
||||
|
||||
viewonline_helper:
|
||||
class: phpbb\viewonline_helper
|
||||
arguments:
|
||||
- @filesystem
|
@@ -1,4 +1,26 @@
|
||||
services:
|
||||
cron.manager:
|
||||
class: phpbb\cron\manager
|
||||
arguments:
|
||||
- @cron.task_collection
|
||||
- %core.root_path%
|
||||
- %core.php_ext%
|
||||
|
||||
cron.lock_db:
|
||||
class: phpbb\lock\db
|
||||
arguments:
|
||||
- cron_lock
|
||||
- @config
|
||||
- @dbal.conn
|
||||
|
||||
# ----- Cron tasks -----
|
||||
cron.task_collection:
|
||||
class: phpbb\di\service_collection
|
||||
arguments:
|
||||
- @service_container
|
||||
tags:
|
||||
- { name: service_collection, tag: cron.task }
|
||||
|
||||
cron.task.core.prune_all_forums:
|
||||
class: phpbb\cron\task\core\prune_all_forums
|
||||
arguments:
|
@@ -1,7 +1,24 @@
|
||||
services:
|
||||
dbal.conn:
|
||||
class: phpbb\db\driver\factory
|
||||
arguments:
|
||||
- @service_container
|
||||
|
||||
dbal.conn.driver:
|
||||
class: %dbal.driver.class%
|
||||
calls:
|
||||
- [sql_connect, [%dbal.dbhost%, %dbal.dbuser%, %dbal.dbpasswd%, %dbal.dbname%, %dbal.dbport%, false, %dbal.new_link%]]
|
||||
|
||||
dbal.tools:
|
||||
class: phpbb\db\tools
|
||||
arguments:
|
||||
- @dbal.conn
|
||||
|
||||
# ----- Migrator -----
|
||||
migrator:
|
||||
class: phpbb\db\migrator
|
||||
arguments:
|
||||
- @service_container
|
||||
- @config
|
||||
- @dbal.conn
|
||||
- @dbal.tools
|
||||
@@ -15,6 +32,7 @@ services:
|
||||
migrator.helper:
|
||||
class: phpbb\db\migration\helper
|
||||
|
||||
# ----- Migrator's tools -----
|
||||
migrator.tool_collection:
|
||||
class: phpbb\di\service_collection
|
||||
arguments:
|
34
phpBB/config/event.yml
Normal file
@@ -0,0 +1,34 @@
|
||||
services:
|
||||
dispatcher:
|
||||
class: phpbb\event\dispatcher
|
||||
arguments:
|
||||
- @service_container
|
||||
|
||||
hook_finder:
|
||||
class: phpbb\hook\finder
|
||||
arguments:
|
||||
- %core.root_path%
|
||||
- %core.php_ext%
|
||||
- @cache.driver
|
||||
|
||||
kernel_request_subscriber:
|
||||
class: phpbb\event\kernel_request_subscriber
|
||||
arguments:
|
||||
- @ext.manager
|
||||
- %core.root_path%
|
||||
- %core.php_ext%
|
||||
tags:
|
||||
- { name: kernel.event_subscriber }
|
||||
|
||||
kernel_exception_subscriber:
|
||||
class: phpbb\event\kernel_exception_subscriber
|
||||
arguments:
|
||||
- @template
|
||||
- @user
|
||||
tags:
|
||||
- { name: kernel.event_subscriber }
|
||||
|
||||
kernel_terminate_subscriber:
|
||||
class: phpbb\event\kernel_terminate_subscriber
|
||||
tags:
|
||||
- { name: kernel.event_subscriber }
|
@@ -1,11 +1,11 @@
|
||||
parameters:
|
||||
mimetype.guesser.priority.lowest: -2
|
||||
mimetype.guesser.priority.low: -1
|
||||
mimetype.guesser.priority.default: 0
|
||||
mimetype.guesser.priority.high: 1
|
||||
mimetype.guesser.priority.highest: 2
|
||||
|
||||
services:
|
||||
mimetype.guesser_collection:
|
||||
class: phpbb\di\service_collection
|
||||
arguments:
|
||||
- @service_container
|
||||
tags:
|
||||
- { name: service_collection, tag: mimetype.guessers }
|
||||
|
||||
mimetype.fileinfo_mimetype_guesser:
|
||||
class: Symfony\Component\HttpFoundation\File\MimeType\FileinfoMimeTypeGuesser
|
||||
tags:
|
||||
@@ -30,13 +30,6 @@ services:
|
||||
tags:
|
||||
- { name: mimetype.guessers }
|
||||
|
||||
mimetype.guesser_collection:
|
||||
class: phpbb\di\service_collection
|
||||
arguments:
|
||||
- @service_container
|
||||
tags:
|
||||
- { name: service_collection, tag: mimetype.guessers }
|
||||
|
||||
mimetype.guesser:
|
||||
class: phpbb\mimetype\guesser
|
||||
arguments:
|
@@ -1,4 +1,24 @@
|
||||
services:
|
||||
notification_manager:
|
||||
class: phpbb\notification\manager
|
||||
arguments:
|
||||
- @notification.type_collection
|
||||
- @notification.method_collection
|
||||
- @service_container
|
||||
- @user_loader
|
||||
- @config
|
||||
- @dispatcher
|
||||
- @dbal.conn
|
||||
- @cache
|
||||
- @user
|
||||
- %core.root_path%
|
||||
- %core.php_ext%
|
||||
- %tables.notification_types%
|
||||
- %tables.notifications%
|
||||
- %tables.user_notifications%
|
||||
|
||||
# ----- Notification's types -----
|
||||
# Scope MUST be prototype for all the plugins to work.
|
||||
notification.type_collection:
|
||||
class: phpbb\di\service_collection
|
||||
arguments:
|
||||
@@ -6,16 +26,9 @@ services:
|
||||
tags:
|
||||
- { name: service_collection, tag: notification.type }
|
||||
|
||||
notification.method_collection:
|
||||
class: phpbb\di\service_collection
|
||||
arguments:
|
||||
- @service_container
|
||||
tags:
|
||||
- { name: service_collection, tag: notification.method }
|
||||
|
||||
notification.type.approve_post:
|
||||
class: phpbb\notification\type\approve_post
|
||||
scope: prototype # scope MUST be prototype for this to work! # scope MUST be prototype for this to work!
|
||||
scope: prototype
|
||||
arguments:
|
||||
- @user_loader
|
||||
- @dbal.conn
|
||||
@@ -33,7 +46,7 @@ services:
|
||||
|
||||
notification.type.approve_topic:
|
||||
class: phpbb\notification\type\approve_topic
|
||||
scope: prototype # scope MUST be prototype for this to work!
|
||||
scope: prototype
|
||||
arguments:
|
||||
- @user_loader
|
||||
- @dbal.conn
|
||||
@@ -51,7 +64,7 @@ services:
|
||||
|
||||
notification.type.bookmark:
|
||||
class: phpbb\notification\type\bookmark
|
||||
scope: prototype # scope MUST be prototype for this to work!
|
||||
scope: prototype
|
||||
arguments:
|
||||
- @user_loader
|
||||
- @dbal.conn
|
||||
@@ -69,7 +82,7 @@ services:
|
||||
|
||||
notification.type.disapprove_post:
|
||||
class: phpbb\notification\type\disapprove_post
|
||||
scope: prototype # scope MUST be prototype for this to work!
|
||||
scope: prototype
|
||||
arguments:
|
||||
- @user_loader
|
||||
- @dbal.conn
|
||||
@@ -87,7 +100,7 @@ services:
|
||||
|
||||
notification.type.disapprove_topic:
|
||||
class: phpbb\notification\type\disapprove_topic
|
||||
scope: prototype # scope MUST be prototype for this to work!
|
||||
scope: prototype
|
||||
arguments:
|
||||
- @user_loader
|
||||
- @dbal.conn
|
||||
@@ -105,7 +118,7 @@ services:
|
||||
|
||||
notification.type.group_request:
|
||||
class: phpbb\notification\type\group_request
|
||||
scope: prototype # scope MUST be prototype for this to work!
|
||||
scope: prototype
|
||||
arguments:
|
||||
- @user_loader
|
||||
- @dbal.conn
|
||||
@@ -123,7 +136,7 @@ services:
|
||||
|
||||
notification.type.group_request_approved:
|
||||
class: phpbb\notification\type\group_request_approved
|
||||
scope: prototype # scope MUST be prototype for this to work!
|
||||
scope: prototype
|
||||
arguments:
|
||||
- @user_loader
|
||||
- @dbal.conn
|
||||
@@ -141,7 +154,7 @@ services:
|
||||
|
||||
notification.type.pm:
|
||||
class: phpbb\notification\type\pm
|
||||
scope: prototype # scope MUST be prototype for this to work!
|
||||
scope: prototype
|
||||
arguments:
|
||||
- @user_loader
|
||||
- @dbal.conn
|
||||
@@ -159,7 +172,7 @@ services:
|
||||
|
||||
notification.type.post:
|
||||
class: phpbb\notification\type\post
|
||||
scope: prototype # scope MUST be prototype for this to work!
|
||||
scope: prototype
|
||||
arguments:
|
||||
- @user_loader
|
||||
- @dbal.conn
|
||||
@@ -177,7 +190,7 @@ services:
|
||||
|
||||
notification.type.post_in_queue:
|
||||
class: phpbb\notification\type\post_in_queue
|
||||
scope: prototype # scope MUST be prototype for this to work!
|
||||
scope: prototype
|
||||
arguments:
|
||||
- @user_loader
|
||||
- @dbal.conn
|
||||
@@ -195,7 +208,7 @@ services:
|
||||
|
||||
notification.type.quote:
|
||||
class: phpbb\notification\type\quote
|
||||
scope: prototype # scope MUST be prototype for this to work!
|
||||
scope: prototype
|
||||
arguments:
|
||||
- @user_loader
|
||||
- @dbal.conn
|
||||
@@ -213,7 +226,7 @@ services:
|
||||
|
||||
notification.type.report_pm:
|
||||
class: phpbb\notification\type\report_pm
|
||||
scope: prototype # scope MUST be prototype for this to work!
|
||||
scope: prototype
|
||||
arguments:
|
||||
- @user_loader
|
||||
- @dbal.conn
|
||||
@@ -231,7 +244,7 @@ services:
|
||||
|
||||
notification.type.report_pm_closed:
|
||||
class: phpbb\notification\type\report_pm_closed
|
||||
scope: prototype # scope MUST be prototype for this to work!
|
||||
scope: prototype
|
||||
arguments:
|
||||
- @user_loader
|
||||
- @dbal.conn
|
||||
@@ -249,7 +262,7 @@ services:
|
||||
|
||||
notification.type.report_post:
|
||||
class: phpbb\notification\type\report_post
|
||||
scope: prototype # scope MUST be prototype for this to work!
|
||||
scope: prototype
|
||||
arguments:
|
||||
- @user_loader
|
||||
- @dbal.conn
|
||||
@@ -267,7 +280,7 @@ services:
|
||||
|
||||
notification.type.report_post_closed:
|
||||
class: phpbb\notification\type\report_post_closed
|
||||
scope: prototype # scope MUST be prototype for this to work!
|
||||
scope: prototype
|
||||
arguments:
|
||||
- @user_loader
|
||||
- @dbal.conn
|
||||
@@ -285,7 +298,7 @@ services:
|
||||
|
||||
notification.type.topic:
|
||||
class: phpbb\notification\type\topic
|
||||
scope: prototype # scope MUST be prototype for this to work!
|
||||
scope: prototype
|
||||
arguments:
|
||||
- @user_loader
|
||||
- @dbal.conn
|
||||
@@ -303,7 +316,7 @@ services:
|
||||
|
||||
notification.type.topic_in_queue:
|
||||
class: phpbb\notification\type\topic_in_queue
|
||||
scope: prototype # scope MUST be prototype for this to work!
|
||||
scope: prototype
|
||||
arguments:
|
||||
- @user_loader
|
||||
- @dbal.conn
|
||||
@@ -321,7 +334,7 @@ services:
|
||||
|
||||
notification.type.admin_activate_user:
|
||||
class: phpbb\notification\type\admin_activate_user
|
||||
scope: prototype # scope MUST be prototype for this to work!
|
||||
scope: prototype
|
||||
arguments:
|
||||
- @user_loader
|
||||
- @dbal.conn
|
||||
@@ -336,10 +349,19 @@ services:
|
||||
- %tables.user_notifications%
|
||||
tags:
|
||||
- { name: notification.type }
|
||||
|
||||
# ----- Notification's methods -----
|
||||
# Scope MUST be prototype for all the plugins to work.
|
||||
notification.method_collection:
|
||||
class: phpbb\di\service_collection
|
||||
arguments:
|
||||
- @service_container
|
||||
tags:
|
||||
- { name: service_collection, tag: notification.method }
|
||||
|
||||
notification.method.email:
|
||||
class: phpbb\notification\method\email
|
||||
scope: prototype # scope MUST be prototype for this to work!
|
||||
scope: prototype
|
||||
arguments:
|
||||
- @user_loader
|
||||
- @dbal.conn
|
||||
@@ -354,7 +376,7 @@ services:
|
||||
|
||||
notification.method.jabber:
|
||||
class: phpbb\notification\method\jabber
|
||||
scope: prototype # scope MUST be prototype for this to work!
|
||||
scope: prototype
|
||||
arguments:
|
||||
- @user_loader
|
||||
- @dbal.conn
|
@@ -1,3 +1,20 @@
|
||||
parameters:
|
||||
# Disable the usage of the super globals (_GET, _POST, _SERVER...)
|
||||
core.disable_super_globals: true
|
||||
|
||||
# Datetime class to use
|
||||
datetime.class: \phpbb\datetime
|
||||
|
||||
# Mimetype guesser priorities
|
||||
mimetype.guesser.priority.lowest: -2
|
||||
mimetype.guesser.priority.low: -1
|
||||
mimetype.guesser.priority.default: 0
|
||||
mimetype.guesser.priority.high: 1
|
||||
mimetype.guesser.priority.highest: 2
|
||||
|
||||
# List of default password driver types
|
||||
passwords.algorithms:
|
||||
- passwords.driver.bcrypt_2y
|
||||
- passwords.driver.bcrypt
|
||||
- passwords.driver.salted_md5
|
||||
- passwords.driver.phpass
|
||||
|
@@ -1,11 +1,29 @@
|
||||
parameters:
|
||||
passwords.algorithms:
|
||||
- passwords.driver.bcrypt_2y
|
||||
- passwords.driver.bcrypt
|
||||
- passwords.driver.salted_md5
|
||||
- passwords.driver.phpass
|
||||
|
||||
services:
|
||||
# ----- Password management -----
|
||||
passwords.manager:
|
||||
class: phpbb\passwords\manager
|
||||
arguments:
|
||||
- @config
|
||||
- @passwords.driver_collection
|
||||
- @passwords.helper
|
||||
- %passwords.algorithms%
|
||||
|
||||
passwords.helper:
|
||||
class: phpbb\passwords\helper
|
||||
|
||||
passwords.driver_helper:
|
||||
class: phpbb\passwords\driver\helper
|
||||
arguments:
|
||||
- @config
|
||||
|
||||
# ----- Password's drivers -----
|
||||
passwords.driver_collection:
|
||||
class: phpbb\di\service_collection
|
||||
arguments:
|
||||
- @service_container
|
||||
tags:
|
||||
- { name: service_collection, tag: passwords.driver }
|
||||
|
||||
passwords.driver.bcrypt:
|
||||
class: phpbb\passwords\driver\bcrypt
|
||||
arguments:
|
||||
@@ -83,6 +101,7 @@ services:
|
||||
arguments:
|
||||
- @request
|
||||
- @passwords.driver.salted_md5
|
||||
- @passwords.driver_helper
|
||||
- %core.root_path%
|
||||
- %core.php_ext%
|
||||
tags:
|
||||
@@ -103,26 +122,3 @@ services:
|
||||
- @passwords.driver_helper
|
||||
tags:
|
||||
- { name: passwords.driver }
|
||||
|
||||
passwords.driver_collection:
|
||||
class: phpbb\di\service_collection
|
||||
arguments:
|
||||
- @service_container
|
||||
tags:
|
||||
- { name: service_collection, tag: passwords.driver }
|
||||
|
||||
passwords.driver_helper:
|
||||
class: phpbb\passwords\driver\helper
|
||||
arguments:
|
||||
- @config
|
||||
|
||||
passwords.manager:
|
||||
class: phpbb\passwords\manager
|
||||
arguments:
|
||||
- @config
|
||||
- @passwords.driver_collection
|
||||
- @passwords.helper
|
||||
- %passwords.algorithms%
|
||||
|
||||
passwords.helper:
|
||||
class: phpbb\passwords\helper
|
@@ -19,6 +19,7 @@ services:
|
||||
- @dbal.conn
|
||||
- %tables.profile_fields_options_language%
|
||||
|
||||
# ----- Profile fields types -----
|
||||
profilefields.type_collection:
|
||||
class: phpbb\di\service_collection
|
||||
arguments:
|
@@ -1,7 +1,7 @@
|
||||
# Structure:
|
||||
#
|
||||
# foo_controller:
|
||||
# pattern: /foo
|
||||
# path: /foo
|
||||
# defaults: { _controller: foo_sevice:method }
|
||||
#
|
||||
# The above will be accessed via app.php?controller=foo and it will
|
||||
|
@@ -1,34 +1,23 @@
|
||||
imports:
|
||||
- { resource: tables.yml }
|
||||
- { resource: cron_tasks.yml }
|
||||
- { resource: notifications.yml }
|
||||
- { resource: migrator.yml }
|
||||
- { resource: avatars.yml }
|
||||
- { resource: feed.yml }
|
||||
- { resource: auth_providers.yml }
|
||||
- { resource: console.yml }
|
||||
- { resource: mimetype_guessers.yml }
|
||||
- { resource: passwords.yml }
|
||||
- { resource: profilefields.yml }
|
||||
- { resource: auth.yml }
|
||||
- { resource: avatar.yml }
|
||||
- { resource: captcha.yml }
|
||||
- { resource: console.yml }
|
||||
- { resource: content.yml }
|
||||
- { resource: cron.yml }
|
||||
- { resource: db.yml }
|
||||
- { resource: event.yml }
|
||||
- { resource: feed.yml }
|
||||
- { resource: mimetype_guesser.yml }
|
||||
- { resource: notification.yml }
|
||||
- { resource: password.yml }
|
||||
- { resource: profilefield.yml }
|
||||
- { resource: user.yml }
|
||||
|
||||
- { resource: tables.yml }
|
||||
- { resource: parameters.yml }
|
||||
|
||||
services:
|
||||
acl.permissions:
|
||||
class: phpbb\permissions
|
||||
arguments:
|
||||
- @dispatcher
|
||||
- @user
|
||||
|
||||
auth:
|
||||
class: phpbb\auth\auth
|
||||
|
||||
avatar.manager:
|
||||
class: phpbb\avatar\manager
|
||||
arguments:
|
||||
- @config
|
||||
- @avatar.driver_collection
|
||||
|
||||
cache:
|
||||
class: phpbb\cache\service
|
||||
arguments:
|
||||
@@ -77,20 +66,6 @@ services:
|
||||
- @dbal.conn
|
||||
- %tables.config_text%
|
||||
|
||||
content.visibility:
|
||||
class: phpbb\content_visibility
|
||||
arguments:
|
||||
- @auth
|
||||
- @config
|
||||
- @dbal.conn
|
||||
- @user
|
||||
- %core.root_path%
|
||||
- %core.php_ext%
|
||||
- %tables.forums%
|
||||
- %tables.posts%
|
||||
- %tables.topics%
|
||||
- %tables.users%
|
||||
|
||||
controller.helper:
|
||||
class: phpbb\controller\helper
|
||||
arguments:
|
||||
@@ -100,6 +75,7 @@ services:
|
||||
- @controller.provider
|
||||
- @ext.manager
|
||||
- @symfony_request
|
||||
- @request
|
||||
- @filesystem
|
||||
- %core.root_path%
|
||||
- %core.php_ext%
|
||||
@@ -117,47 +93,6 @@ services:
|
||||
calls:
|
||||
- [find, [%core.root_path%]]
|
||||
|
||||
cron.task_collection:
|
||||
class: phpbb\di\service_collection
|
||||
arguments:
|
||||
- @service_container
|
||||
tags:
|
||||
- { name: service_collection, tag: cron.task }
|
||||
|
||||
cron.manager:
|
||||
class: phpbb\cron\manager
|
||||
arguments:
|
||||
- @cron.task_collection
|
||||
- %core.root_path%
|
||||
- %core.php_ext%
|
||||
|
||||
cron.lock_db:
|
||||
class: phpbb\lock\db
|
||||
arguments:
|
||||
- cron_lock
|
||||
- @config
|
||||
- @dbal.conn
|
||||
|
||||
dispatcher:
|
||||
class: phpbb\event\dispatcher
|
||||
arguments:
|
||||
- @service_container
|
||||
|
||||
dbal.conn:
|
||||
class: phpbb\db\driver\factory
|
||||
arguments:
|
||||
- @service_container
|
||||
|
||||
dbal.conn.driver:
|
||||
class: %dbal.driver.class%
|
||||
calls:
|
||||
- [sql_connect, [%dbal.dbhost%, %dbal.dbuser%, %dbal.dbpasswd%, %dbal.dbname%, %dbal.dbport%, false, %dbal.new_link%]]
|
||||
|
||||
dbal.tools:
|
||||
class: phpbb\db\tools
|
||||
arguments:
|
||||
- @dbal.conn
|
||||
|
||||
ext.manager:
|
||||
class: phpbb\extension\manager
|
||||
arguments:
|
||||
@@ -174,18 +109,8 @@ services:
|
||||
filesystem:
|
||||
class: phpbb\filesystem
|
||||
|
||||
groupposition.legend:
|
||||
class: phpbb\groupposition\legend
|
||||
arguments:
|
||||
- @dbal.conn
|
||||
- @user
|
||||
|
||||
groupposition.teampage:
|
||||
class: phpbb\groupposition\teampage
|
||||
arguments:
|
||||
- @dbal.conn
|
||||
- @user
|
||||
- @cache.driver
|
||||
file_downloader:
|
||||
class: phpbb\file_downloader
|
||||
|
||||
http_kernel:
|
||||
class: Symfony\Component\HttpKernel\HttpKernel
|
||||
@@ -193,35 +118,6 @@ services:
|
||||
- @dispatcher
|
||||
- @controller.resolver
|
||||
|
||||
hook_finder:
|
||||
class: phpbb\hook\finder
|
||||
arguments:
|
||||
- %core.root_path%
|
||||
- %core.php_ext%
|
||||
- @cache.driver
|
||||
|
||||
kernel_request_subscriber:
|
||||
class: phpbb\event\kernel_request_subscriber
|
||||
arguments:
|
||||
- @ext.manager
|
||||
- %core.root_path%
|
||||
- %core.php_ext%
|
||||
tags:
|
||||
- { name: kernel.event_subscriber }
|
||||
|
||||
kernel_exception_subscriber:
|
||||
class: phpbb\event\kernel_exception_subscriber
|
||||
arguments:
|
||||
- @template
|
||||
- @user
|
||||
tags:
|
||||
- { name: kernel.event_subscriber }
|
||||
|
||||
kernel_terminate_subscriber:
|
||||
class: phpbb\event\kernel_terminate_subscriber
|
||||
tags:
|
||||
- { name: kernel.event_subscriber }
|
||||
|
||||
log:
|
||||
class: phpbb\log\log
|
||||
arguments:
|
||||
@@ -234,61 +130,6 @@ services:
|
||||
- %core.php_ext%
|
||||
- %tables.log%
|
||||
|
||||
message.form.admin:
|
||||
class: phpbb\message\admin_form
|
||||
arguments:
|
||||
- @auth
|
||||
- @config
|
||||
- @config_text
|
||||
- @dbal.conn
|
||||
- @user
|
||||
- %core.root_path%
|
||||
- %core.php_ext%
|
||||
|
||||
message.form.topic:
|
||||
class: phpbb\message\topic_form
|
||||
arguments:
|
||||
- @auth
|
||||
- @config
|
||||
- @dbal.conn
|
||||
- @user
|
||||
- %core.root_path%
|
||||
- %core.php_ext%
|
||||
|
||||
message.form.user:
|
||||
class: phpbb\message\user_form
|
||||
arguments:
|
||||
- @auth
|
||||
- @config
|
||||
- @dbal.conn
|
||||
- @user
|
||||
- %core.root_path%
|
||||
- %core.php_ext%
|
||||
|
||||
notification_manager:
|
||||
class: phpbb\notification\manager
|
||||
arguments:
|
||||
- @notification.type_collection
|
||||
- @notification.method_collection
|
||||
- @service_container
|
||||
- @user_loader
|
||||
- @config
|
||||
- @dbal.conn
|
||||
- @cache
|
||||
- @user
|
||||
- %core.root_path%
|
||||
- %core.php_ext%
|
||||
- %tables.notification_types%
|
||||
- %tables.notifications%
|
||||
- %tables.user_notifications%
|
||||
|
||||
pagination:
|
||||
class: phpbb\pagination
|
||||
arguments:
|
||||
- @template
|
||||
- @user
|
||||
- @controller.helper
|
||||
|
||||
path_helper:
|
||||
class: phpbb\path_helper
|
||||
arguments:
|
||||
@@ -318,6 +159,8 @@ services:
|
||||
- null
|
||||
- %core.disable_super_globals%
|
||||
|
||||
# WARNING: The Symfony request does not escape the input and should be used very carefully
|
||||
# prefer the phpbb request (service @request) as possible
|
||||
symfony_request:
|
||||
class: phpbb\symfony_request
|
||||
arguments:
|
||||
@@ -335,28 +178,11 @@ services:
|
||||
template_context:
|
||||
class: phpbb\template\context
|
||||
|
||||
user:
|
||||
class: phpbb\user
|
||||
arguments:
|
||||
- %datetime.class%
|
||||
|
||||
user_loader:
|
||||
class: phpbb\user_loader
|
||||
arguments:
|
||||
- @dbal.conn
|
||||
- %core.root_path%
|
||||
- %core.php_ext%
|
||||
- %tables.users%
|
||||
|
||||
version_helper:
|
||||
class: phpbb\version_helper
|
||||
scope: prototype
|
||||
arguments:
|
||||
- @cache
|
||||
- @config
|
||||
- @file_downloader
|
||||
- @user
|
||||
|
||||
viewonline_helper:
|
||||
class: phpbb\viewonline_helper
|
||||
arguments:
|
||||
- @filesystem
|
||||
|
@@ -1,6 +1,9 @@
|
||||
parameters:
|
||||
tables.auth_provider_oauth_token_storage: %core.table_prefix%oauth_tokens
|
||||
tables.auth_provider_oauth_account_assoc: %core.table_prefix%oauth_accounts
|
||||
tables.captcha_qa_questions: %core.table_prefix%captcha_questions
|
||||
tables.captcha_qa_answers: %core.table_prefix%captcha_answers
|
||||
tables.captcha_qa_confirm: %core.table_prefix%qa_confirm
|
||||
tables.config: %core.table_prefix%config
|
||||
tables.config_text: %core.table_prefix%config_text
|
||||
tables.ext: %core.table_prefix%ext
|
||||
|
19
phpBB/config/user.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
services:
|
||||
acl.permissions:
|
||||
class: phpbb\permissions
|
||||
arguments:
|
||||
- @dispatcher
|
||||
- @user
|
||||
|
||||
user:
|
||||
class: phpbb\user
|
||||
arguments:
|
||||
- %datetime.class%
|
||||
|
||||
user_loader:
|
||||
class: phpbb\user_loader
|
||||
arguments:
|
||||
- @dbal.conn
|
||||
- %core.root_path%
|
||||
- %core.php_ext%
|
||||
- %tables.users%
|
@@ -198,9 +198,9 @@ $prefixes = array('f_', 'a_', 'm_', 'u_');
|
||||
foreach ($prefixes as $prefix)
|
||||
{
|
||||
$var = $prefix . 'permissions';
|
||||
if (sizeof($$var))
|
||||
if (sizeof(${$var}))
|
||||
{
|
||||
foreach ($$var as $auth_option => $l_ary)
|
||||
foreach (${$var} as $auth_option => $l_ary)
|
||||
{
|
||||
$sql_ary = array(
|
||||
'auth_option' => $auth_option,
|
||||
|
@@ -51,10 +51,9 @@ $classes = $finder->core_path('phpbb/')
|
||||
$db = new \phpbb\db\driver\sqlite();
|
||||
$schema_generator = new \phpbb\db\migration\schema_generator($classes, new \phpbb\config\config(array()), $db, new \phpbb\db\tools($db, true), $phpbb_root_path, $phpEx, $table_prefix);
|
||||
$schema_data = $schema_generator->get_schema();
|
||||
$dbms_type_map = phpbb\db\tools::get_dbms_type_map();
|
||||
|
||||
$fp = fopen($schema_path . 'schema.json', 'wb');
|
||||
fwrite($fp, json_encode($schema_data, JSON_PRETTY_PRINT));
|
||||
fclose($fp);
|
||||
|
||||
echo 'done';
|
||||
echo 'Successfully created schema file';
|
||||
|
@@ -62,10 +62,14 @@ echo "USE $dbname;$newline$newline";
|
||||
|
||||
@set_time_limit(0);
|
||||
|
||||
require($phpbb_root_path . 'includes/db/schema_data.' . $phpEx);
|
||||
require($phpbb_root_path . 'phpbb/db/tools.' . $phpEx);
|
||||
$finder = new \phpbb\finder(new \phpbb\filesystem(), $phpbb_root_path);
|
||||
$classes = $finder->core_path('phpbb/')
|
||||
->directory('/db/migration/data')
|
||||
->get_classes();
|
||||
|
||||
$dbms_type_map = phpbb\db\tools::get_dbms_type_map();
|
||||
$schema_generator = new \phpbb\db\migration\schema_generator($classes, $config, $db, new \phpbb\db\tools($db, true), $phpbb_root_path, $phpEx, $table_prefix);
|
||||
$schema_data = $schema_generator->get_schema();
|
||||
$dbms_type_map = \phpbb\db\tools::get_dbms_type_map();
|
||||
|
||||
foreach ($schema_data as $table_name => $table_data)
|
||||
{
|
||||
|
151
phpBB/develop/regex_idn.php
Normal file
@@ -0,0 +1,151 @@
|
||||
<?php
|
||||
//
|
||||
// Security message:
|
||||
//
|
||||
// This script is potentially dangerous.
|
||||
// Remove or comment the next line (die(".... ) to enable this script.
|
||||
// Do NOT FORGET to either remove this script or disable it after you have used it.
|
||||
//
|
||||
die("Please read the first lines of this script for instructions on how to enable it");
|
||||
|
||||
// IP regular expressions
|
||||
|
||||
$dec_octet = '(?:\d{1,2}|1\d\d|2[0-4]\d|25[0-5])';
|
||||
$h16 = '[\dA-F]{1,4}';
|
||||
$ipv4 = "(?:$dec_octet\.){3}$dec_octet";
|
||||
$ls32 = "(?:$h16:$h16|$ipv4)";
|
||||
|
||||
$ipv6_construct = array(
|
||||
array(false, '', '{6}', $ls32),
|
||||
array(false, '::', '{0,5}', "(?:$h16(?::$h16)?|$ipv4)"),
|
||||
array('', ':', '{4}', $ls32),
|
||||
array('{1,2}', ':', '{3}', $ls32),
|
||||
array('{1,3}', ':', '{2}', $ls32),
|
||||
array('{1,4}', ':', '', $ls32),
|
||||
array('{1,5}', ':', false, $ls32),
|
||||
array('{1,6}', ':', false, $h16),
|
||||
array('{1,7}', ':', false, ''),
|
||||
array(false, '::', false, '')
|
||||
);
|
||||
|
||||
$ipv6 = '(?:';
|
||||
foreach ($ipv6_construct as $ip_type)
|
||||
{
|
||||
$ipv6 .= '(?:';
|
||||
if ($ip_type[0] !== false)
|
||||
{
|
||||
$ipv6 .= "(?:$h16:)" . $ip_type[0];
|
||||
}
|
||||
$ipv6 .= $ip_type[1];
|
||||
if ($ip_type[2] !== false)
|
||||
{
|
||||
$ipv6 .= "(?:$h16:)" . $ip_type[2];
|
||||
}
|
||||
$ipv6 .= $ip_type[3] . ')|';
|
||||
}
|
||||
$ipv6 = substr($ipv6, 0, -1) . ')';
|
||||
|
||||
echo 'IPv4: ' . $ipv4 . "<br /><br />\n\nIPv6: " . $ipv6 . "<br /><br />\n\n";
|
||||
|
||||
// URL regular expressions
|
||||
|
||||
/* IDN2008 characters derivation
|
||||
** http://unicode.org/faq/idn.html#33 - IDN FAQ: derivation of valid characters in terms of Unicode properties
|
||||
** http://unicode.org/reports/tr46/ - Unicode Technical Standard #46. Unicode IDNA Compatibility Processing
|
||||
** http://www.unicode.org/Public/UNIDATA/DerivedNormalizationProps.txt - Unicode Character Database
|
||||
*/
|
||||
/*
|
||||
** Remove Control Characters and Whitespace (as in IDNA2003)
|
||||
*/
|
||||
$no_cc = '\p{C}\p{Z}';
|
||||
/*
|
||||
** Remove Symbols, Punctuation, non-decimal Numbers, and Enclosing Marks
|
||||
*/
|
||||
$no_symbol = '\p{S}\p{P}\p{Nl}\p{No}\p{Me}';
|
||||
/*
|
||||
** Remove characters used for archaic Hangul (Korean) - \p{HST=L} and \p{HST=V}
|
||||
** as per http://unicode.org/Public/UNIDATA/HangulSyllableType.txt
|
||||
*/
|
||||
$no_hangul = '\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}';
|
||||
/*
|
||||
** Remove three blocks of technical or archaic symbols.
|
||||
*/
|
||||
$no_cdm = '\x{20D0}-\x{20FF}'; // \p{block=Combining_Diacritical_Marks_For_Symbols}
|
||||
$no_musical = '\x{1D100}-\x{1D1FF}'; // \p{block=Musical_Symbols}
|
||||
$no_ancient_greek_musical = '\x{1D200}-\x{1D24F}'; // \p{block=Ancient_Greek_Musical_Notation}
|
||||
/* Remove certain exceptions:
|
||||
** U+0640 ARABIC TATWEEL
|
||||
** U+07FA NKO LAJANYALAN
|
||||
** U+302E HANGUL SINGLE DOT TONE MARK
|
||||
** U+302F HANGUL DOUBLE DOT TONE MARK
|
||||
** U+3031 VERTICAL KANA REPEAT MARK
|
||||
** U+3032 VERTICAL KANA REPEAT WITH VOICED SOUND MARK
|
||||
** ..
|
||||
** U+3035 VERTICAL KANA REPEAT MARK LOWER HALF
|
||||
** U+303B VERTICAL IDEOGRAPHIC ITERATION MARK
|
||||
*/
|
||||
$no_certain_exceptions = '\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}';
|
||||
/* Add certain exceptions:
|
||||
** U+00B7 MIDDLE DOT
|
||||
** U+0375 GREEK LOWER NUMERAL SIGN
|
||||
** U+05F3 HEBREW PUNCTUATION GERESH
|
||||
** U+05F4 HEBREW PUNCTUATION GERSHAYIM
|
||||
** U+30FB KATAKANA MIDDLE DOT
|
||||
** U+002D HYPHEN-MINUS
|
||||
** U+06FD ARABIC SIGN SINDHI AMPERSAND
|
||||
** U+06FE ARABIC SIGN SINDHI POSTPOSITION MEN
|
||||
** U+0F0B TIBETAN MARK INTERSYLLABIC TSHEG
|
||||
** U+3007 IDEOGRAPHIC NUMBER ZERO
|
||||
*/
|
||||
$add_certain_exceptions = '\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}';
|
||||
/* Add special exceptions (Deviations):
|
||||
** U+00DF LATIN SMALL LETTER SHARP S
|
||||
** U+03C2 GREEK SMALL LETTER FINAL SIGMA
|
||||
** U+200C ZERO WIDTH NON-JOINER
|
||||
** U+200D ZERO WIDTH JOINER
|
||||
*/
|
||||
$add_deviations = '\x{00DF}\x{03C2}\x{200C}\x{200D}';
|
||||
|
||||
// Concatenate remove/add regexes respectively
|
||||
$remove_chars = "$no_cc$no_symbol$no_hangul$no_cdm$no_musical$no_ancient_greek_musical$no_certain_exceptions";
|
||||
$add_chars = "$add_certain_exceptions$add_deviations";
|
||||
|
||||
// Initialize inline mode
|
||||
$inline = false;
|
||||
|
||||
do
|
||||
{
|
||||
$inline = !$inline;
|
||||
|
||||
$pct_encoded = "%[\dA-F]{2}";
|
||||
$unreserved = "$add_chars\pL0-9\-._~";
|
||||
$sub_delims = ($inline) ? '!$&\'(*+,;=' : '!$&\'()*+,;=';
|
||||
$scheme = ($inline) ? '[a-z][a-z\d+]*': '[a-z][a-z\d+\-.]*' ; // avoid automatic parsing of "word" in "last word.http://..."
|
||||
$pchar = "(?:[^$remove_chars]*[$unreserved$sub_delims:@|]+|$pct_encoded)"; // rfc: no "|"
|
||||
|
||||
$reg_name = "(?:[^$remove_chars]*[$unreserved$sub_delims:@|]+|$pct_encoded)+"; // rfc: * instead of + and no "|" and no "@" and no ":" (included instead of userinfo)
|
||||
//$userinfo = "(?:(?:[$unreserved$sub_delims:]+|$pct_encoded))*";
|
||||
$ipv4_simple = '[0-9.]+';
|
||||
$ipv6_simple = '\[[a-z0-9.]+:[a-z0-9.]+:[a-z0-9.:]+\]';
|
||||
$host = "(?:$reg_name|$ipv4_simple|$ipv6_simple)";
|
||||
$port = '\d*';
|
||||
//$authority = "(?:$userinfo@)?$host(?::$port)?";
|
||||
$authority = "$host(?::$port)?";
|
||||
$segment = "$pchar*";
|
||||
$path_abempty = "(?:/$segment)*";
|
||||
$hier_part = "/{2}$authority$path_abempty";
|
||||
$query = "(?:[^$remove_chars]*[$unreserved$sub_delims:@/?|]+|$pct_encoded)*"; // pchar | "/" | "?", rfc: no "|"
|
||||
$fragment = $query;
|
||||
|
||||
$url = "$scheme:$hier_part(?:\?$query)?(?:\#$fragment)?";
|
||||
echo (($inline) ? 'URL inline: ' : 'URL: ') . $url . "<br /><br />\n\n";
|
||||
|
||||
// no scheme, shortened authority, but host has to start with www.
|
||||
$www_url = "www\.$reg_name(?::$port)?$path_abempty(?:\?$query)?(?:\#$fragment)?";
|
||||
echo (($inline) ? 'www.URL_inline: ' : 'www.URL: ') . $www_url . "<br /><br />\n\n";
|
||||
|
||||
// no schema and no authority
|
||||
$relative_url = "$segment$path_abempty(?:\?$query)?(?:\#$fragment)?";
|
||||
echo (($inline) ? 'relative URL inline: ' : 'relative URL: ') . $relative_url . "<br /><br />\n\n";
|
||||
}
|
||||
while ($inline);
|
@@ -24,10 +24,10 @@ phpBB Lead Developer: naderman (Nils Adermann)
|
||||
|
||||
phpBB Developers: bantu (Andreas Fischer)
|
||||
dhruv.goel92 (Dhruv Goel)
|
||||
EXreaction (Nathan Guse)
|
||||
Elsensee (Oliver Schramm)
|
||||
marc1706 (Marc Alexander)
|
||||
nickvergessen (Joas Schilling)
|
||||
nicofuma (Tristan Darricau)
|
||||
Nicofuma (Tristan Darricau)
|
||||
prototech (Cesar Gallegos)
|
||||
|
||||
For a list of phpBB Team members, please see:
|
||||
@@ -53,6 +53,7 @@ phpBB Developers: A_Jelly_Doughnut (Josh Woody) [01/2010 - 11/2010]
|
||||
ckwalsh (Cullen Walsh) [01/2010 - 07/2011]
|
||||
DavidMJ (David M.) [12/2005 - 08/2009]
|
||||
dhn (Dominik Dröscher) [05/2007 - 01/2011]
|
||||
EXreaction (Nathan Guse) [07/2012 - 05/2014]
|
||||
GrahamJE (Graham Eames) [09/2005 - 11/2006]
|
||||
igorw (Igor Wiedler) [08/2010 - 02/2013]
|
||||
imkingdavid (David King) [11/2012 - 06/2014]
|
||||
|
@@ -4,9 +4,9 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="keywords" content="" />
|
||||
<meta name="description" content="phpBB 3.1.x frequently asked questions" />
|
||||
<title>phpBB3 • FAQ</title>
|
||||
<title>phpBB • FAQ</title>
|
||||
|
||||
<link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
|
||||
<link href="assets/css/stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
|
||||
|
||||
</head>
|
||||
|
||||
@@ -16,16 +16,16 @@
|
||||
<a id="top" name="top" accesskey="t"></a>
|
||||
<div id="page-header">
|
||||
<div class="headerbar">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div id="doc-description">
|
||||
<a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a>
|
||||
<a href="../index.php" id="logo"><img src="assets/images/site_logo.gif" alt="" /></a>
|
||||
<h1>phpBB 3.1.x FAQ</h1>
|
||||
<p>phpBB 3.1.x frequently asked questions</p>
|
||||
<p style="display: none;"><a href="#start_here">Skip</a></p>
|
||||
</div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -35,12 +35,17 @@
|
||||
|
||||
<!-- BEGIN DOCUMENT -->
|
||||
|
||||
<p>This is a very basic Frequently Asked Questions (FAQ) page which attempts to answer some of the more commonly asked questions. It is by no means exhaustive and should be used in combination with the 'built-in' User FAQ within phpBB3, the community forums and our IRC channel (see <a href="README.html">README</a> for details).</p>
|
||||
<p class="paragraph main-description">
|
||||
This is a very basic Frequently Asked Questions (FAQ) page which attempts to answer some of the
|
||||
more commonly asked questions. It is by no means exhaustive and should be used in combination with
|
||||
the 'built-in' User FAQ within phpBB3, the community forums and our IRC channel
|
||||
(see <a href="README.html">README</a> for details).
|
||||
</p>
|
||||
|
||||
<h1>FAQ</h1>
|
||||
|
||||
<div class="paragraph menu">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -66,7 +71,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -74,11 +79,11 @@
|
||||
<a name="install"></a><h2>I am finding phpBB too difficult to install. Will you do it for me?</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
<p>Simple answer, no we will not. We are not being difficult when we say this we are actually trying to help you. phpBB has a reputation for being easy to install, that reputation is we believe well deserved. It is a simple process of unarchiving a single file, uploading the resulting directory/files to their intended location and entering some data in a web based form. The sequence of events, what to type where, etc. is covered in detail in the accompanying <a href="INSTALL.html">INSTALL.html</a> documentation. If you cannot install phpBB3 the chances are you will be unable to administer or update it.</p>
|
||||
<p>Simple answer, no we will not. We are not being difficult when we say this we are actually trying to help you. phpBB has a reputation for being easy to install, that reputation is we believe well deserved. It is a simple process of unarchiving a single file, uploading the resulting directory/files to their intended location and entering some data in a web based form. The sequence of events, what to type where, etc. is covered in detail in the accompanying <a href="INSTALL.html">INSTALL.html</a> documentation. If you cannot install phpBB the chances are you will be unable to administer or update it.</p>
|
||||
|
||||
<p>There are people, companies (unrelated to your hosting provider), etc. that will install your forum, either for free or for a payment. We do not recommend you make use of these offers. Unless the service is provided by your hosting company you will have to divulge passwords and other sensitive details. If you did not know how to use an ATM would you give a passer-by your bank card and PIN and ask them to show you what to do? No, probably not! The same applies to your hosting account details!</p>
|
||||
|
||||
@@ -88,7 +93,7 @@
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -99,7 +104,7 @@ A board is dealing in warez/porn/etc., you need to prevent them doing this!<br /
|
||||
I want to sue you because i think you host an illegal board!</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -111,7 +116,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -119,7 +124,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
<a name="viewonline"></a><h2>According to viewonline a user is doing/reading something they should not be able to!</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -131,7 +136,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -139,7 +144,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
<a name="mail"></a><h2>I keep getting Mail sending errors when I (or my users) post/send PM's/etc.!</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -151,7 +156,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -159,7 +164,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
<a name="mail_language"></a><h2>My users are complaining that emails are not in their selected language!</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -171,7 +176,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -179,7 +184,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
<a name="aol_browser"></a><h2>My AOL based users keep getting logged out!</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -193,7 +198,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -201,7 +206,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
<a name="avatars"></a><h2>I am unable to upload avatars from my computer, regardless of the settings.</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -213,7 +218,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -221,7 +226,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
<a name="gallery_avatars"></a><h2>I just cannot get gallery avatars to appear!</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -231,7 +236,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -239,17 +244,17 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
<a name="permissions"></a><h2>How do I use/set permissions?</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
<p>Please read the paragraph about permissions in our extensive <a href="https://www.phpbb.com/support/documentation/3.0/">online documentation</a>.</p>
|
||||
<p>Please read the paragraph about permissions in our extensive <a href="https://www.phpbb.com/support/docs/en/3.1/ug/">online documentation</a>.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -257,7 +262,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
<a name="login_issues"></a><h2>I (or my users) cannot stay logged in to the forum!</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -269,7 +274,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -277,7 +282,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
<a name="logout_issues"></a><h2>My users are complaining about being logged out too quickly!</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -287,7 +292,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -295,11 +300,11 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
<a name="not_answered"></a><h2>My question isn't answered here!</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
<p>Please read our <a href="https://www.phpbb.com/support/documentation/3.0/">extensive user documentation</a> first, it may just explain what you want to know.</p>
|
||||
<p>Please read our <a href="https://www.phpbb.com/support/docs/en/3.1/ug/">extensive user documentation</a> first, it may just explain what you want to know.</p>
|
||||
|
||||
<p>Feel free to search our community forum for the information you require. <strong>PLEASE DO NOT</strong> post your question without having first used search, chances are someone has already asked and answered your question. You can find our board here:</p>
|
||||
|
||||
@@ -309,7 +314,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -317,7 +322,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
<a name="disclaimer"></a><h2>Copyright and disclaimer</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -327,7 +332,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- END DOCUMENT -->
|
||||
|
@@ -4,9 +4,9 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="keywords" content="" />
|
||||
<meta name="description" content="phpBB 3.1.x Installation, updating and conversion informations" />
|
||||
<title>phpBB3 • Install</title>
|
||||
<title>phpBB • Install</title>
|
||||
|
||||
<link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
|
||||
<link href="assets/css/stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
|
||||
|
||||
</head>
|
||||
|
||||
@@ -16,16 +16,16 @@
|
||||
<a id="top" name="top" accesskey="t"></a>
|
||||
<div id="page-header">
|
||||
<div class="headerbar">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div id="doc-description">
|
||||
<a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a>
|
||||
<a href="../index.php" id="logo"><img src="assets/images/site_logo.gif" alt="" /></a>
|
||||
<h1>phpBB 3.1.x Install</h1>
|
||||
<p>phpBB 3.1.x Installation, updating and conversion informations</p>
|
||||
<p style="display: none;"><a href="#start_here">Skip</a></p>
|
||||
</div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -35,16 +35,22 @@
|
||||
|
||||
<!-- BEGIN DOCUMENT -->
|
||||
|
||||
<p><strong>Please read this document completely before proceeding with installation, updating or converting.</strong></p>
|
||||
<div class="paragraph">
|
||||
<p><strong>Please read this document completely before proceeding with installation, updating or converting.</strong></p>
|
||||
|
||||
<p>This document will walk you through the basics on installing, updating and converting the forum software.</p>
|
||||
|
||||
<p>A basic overview of running phpBB3 can be found in the accompanying <a href="README.html">README</a> file. Please ensure you read that document in addition to this! For more detailed information on using, installing, updating and converting phpBB3 you should read <a href="https://www.phpbb.com/support/documentation/3.0/">the documentation</a> available online.</p>
|
||||
<p>This document will walk you through the basics on installing, updating and converting the forum software.</p>
|
||||
|
||||
<p>
|
||||
A basic overview of running phpBB can be found in the accompanying <a href="README.html">README</a> file.
|
||||
Please ensure you read that document in addition to this! For more detailed information on using, installing,
|
||||
updating and converting phpBB you should read <a href="https://www.phpbb.com/support/docs/en/3.1/ug/">the documentation</a>
|
||||
available online.
|
||||
</p>
|
||||
</div>
|
||||
<h1>Install</h1>
|
||||
|
||||
<div class="paragraph menu">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -82,7 +88,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -90,7 +96,7 @@
|
||||
<a name="quickinstall"></a><h2>1. Quick install</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -114,7 +120,7 @@
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -122,7 +128,7 @@
|
||||
<a name="require"></a><h2>2. Requirements</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -142,10 +148,11 @@
|
||||
</ul>
|
||||
</li>
|
||||
<li><strong>PHP 5.3.3+</strong> with support for the database you intend to use.</li>
|
||||
<li>The following PHP modules are required:</li>
|
||||
<li>The following PHP modules are required:
|
||||
<ul>
|
||||
<li>json</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>getimagesize() function must be enabled.</li>
|
||||
<li>Presence of the following modules within PHP will provide access to additional features, but they are not required:
|
||||
<ul>
|
||||
@@ -164,7 +171,7 @@
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -172,27 +179,27 @@
|
||||
<a name="install"></a><h2>3. New installation</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
<p>Installation of phpBB3 will vary according to your server and database. If you have <em>shell access</em> to your account (via telnet or ssh for example) you may want to upload the entire phpBB3 archive (in binary mode!) to a directory on your host and unarchive it there.</p>
|
||||
<p>Installation of phpBB will vary according to your server and database. If you have <em>shell access</em> to your account (via telnet or ssh for example) you may want to upload the entire phpBB archive (in binary mode!) to a directory on your host and unarchive it there.</p>
|
||||
|
||||
<p>If you do not have shell access or do not wish to use it, you will need to decompress the phpBB3 archive to a local directory on your system using your favourite compression program, e.g. winzip, rar, zip, etc. From there you must FTP <strong>ALL</strong> the files it contains (being sure to retain the directory structure and filenames) to your host. Please ensure that the cases of filenames are retained, do <strong>NOT</strong> force filenames to all lower or upper case as doing so will cause errors later.</p>
|
||||
<p>If you do not have shell access or do not wish to use it, you will need to decompress the phpBB archive to a local directory on your system using your favourite compression program, e.g. winzip, rar, zip, etc. From there you must FTP <strong>ALL</strong> the files it contains (being sure to retain the directory structure and filenames) to your host. Please ensure that the cases of filenames are retained, do <strong>NOT</strong> force filenames to all lower or upper case as doing so will cause errors later.</p>
|
||||
|
||||
<p>All .php, .sql, .cfg, .css, .js, .html, .htaccess and .txt files should be uploaded in <strong>ASCII</strong> mode, while all graphics should be uploaded in <strong>BINARY</strong> mode. If you are unfamiliar with what this means please refer to your FTP client documentation. In most cases this is all handled transparantly by your ftp client, but if you encounter problems later you should be sure the files were uploaded correctly as described here.</p>
|
||||
|
||||
<p>phpBB3 comes supplied with British English as its standard language. However, a number of separate packs for different languages are available. If you are not a native English speaker you may wish to install one or more of these packages before continuing. The installation process below will allow you to select a default language from those available (you can, of course, change this default at a later stage). For more details on language packs, where to obtain them and how to install them please see the <a href="README.html#i18n">README</a>.</p>
|
||||
<p>phpBB comes supplied with British English as its standard language. However, a number of separate packs for different languages are available. If you are not a native English speaker you may wish to install one or more of these packages before continuing. The installation process below will allow you to select a default language from those available (you can, of course, change this default at a later stage). For more details on language packs, where to obtain them and how to install them please see the <a href="README.html#i18n">README</a>.</p>
|
||||
|
||||
<p>Once all the files have been uploaded to your site, you should point your browser at this location with the addition of <code>/install/</code>. For example, if your domain name is <code>www.example.com</code> and you placed the phpBB3 files in the directory <code>/phpBB3</code> off your web root you would enter <code>http://www.example.com/phpBB3/install/</code> or (alternatively) <code>http://www.example.com/phpBB3/install/index.php</code> into your browser. When you have done this, you should see the <strong><em>phpBB3 Introduction</em></strong> screen appear.</p>
|
||||
<p>Once all the files have been uploaded to your site, you should point your browser at this location with the addition of <code>/install/</code>. For example, if your domain name is <code>www.example.com</code> and you placed the phpBB files in the directory <code>/phpBB3</code> off your web root you would enter <code>http://www.example.com/phpBB3/install/</code> or (alternatively) <code>http://www.example.com/phpBB3/install/index.php</code> into your browser. When you have done this, you should see the <strong><em>phpBB Introduction</em></strong> screen appear.</p>
|
||||
|
||||
<h4>Introduction:</h4>
|
||||
|
||||
<p>The initial screen gives you a short introduction into phpBB. It allows you to read the license phpBB3 is released under (General Public License v2) and provides information about how you can receive support. To start the installation, use the <strong><em>INSTALL</em></strong> tab.</p>
|
||||
<p>The initial screen gives you a short introduction into phpBB. It allows you to read the license phpBB is released under (General Public License v2) and provides information about how you can receive support. To start the installation, use the <strong><em>INSTALL</em></strong> tab.</p>
|
||||
|
||||
<h4>Requirements</h4>
|
||||
|
||||
<p>The first page you will see after starting the installation is the Requirements list. phpBB3 automatically checks whether everything that it needs to run properly is installed on your server. You need to have at least the minimum PHP version installed, and at least one database available to continue the installation. Also important, is that all shown folders are available and have the correct permissions. Please see the description of each section to find out whether they are optional or required for phpBB3 to run. If everything is in order, you can continue the installation with <em>Start Install</em>.</p>
|
||||
<p>The first page you will see after starting the installation is the Requirements list. phpBB automatically checks whether everything that it needs to run properly is installed on your server. You need to have at least the minimum PHP version installed, and at least one database available to continue the installation. Also important, is that all shown folders are available and have the correct permissions. Please see the description of each section to find out whether they are optional or required for phpBB to run. If everything is in order, you can continue the installation with <em>Start Install</em>.</p>
|
||||
|
||||
<h4>Database settings</h4>
|
||||
|
||||
@@ -212,7 +219,7 @@
|
||||
|
||||
<p>You don't need to change the Prefix for tables in database setting, unless you plan on using multipe phpBB installations on one database. In this case, you can use a different prefix for each installation to make it work.</p>
|
||||
|
||||
<p>After you entered your details, you can continue with the <em>Proceed to next step</em> button. Now phpBB3 will check whether the data you entered will lead to a successful database connection and whether tables with the same prefix already exist.</p>
|
||||
<p>After you entered your details, you can continue with the <em>Proceed to next step</em> button. Now phpBB will check whether the data you entered will lead to a successful database connection and whether tables with the same prefix already exist.</p>
|
||||
|
||||
<p>A <em>Could not connect to the database</em> error means that you didn't enter the database data correctly and it is not possible for phpBB to connect. Make sure that everything you entered is in order and try again. Again, if you are unsure about your database settings, please contact your host.</p>
|
||||
|
||||
@@ -222,7 +229,7 @@
|
||||
|
||||
<h4>Administrator details</h4>
|
||||
|
||||
<p>Now you have to create your administration user. This user will have full administration access and he/she will be the first user on your forum. All fields on this page are required. You can also set the default language of your forum on this page. In a vanilla phpBB3 installation, we only include British English. You can download further languages from <a href="https://www.phpbb.com/">www.phpbb.com</a>, and add them before installing or later.</p>
|
||||
<p>Now you have to create your administration user. This user will have full administration access and he/she will be the first user on your forum. All fields on this page are required. You can also set the default language of your forum on this page. In a vanilla phpBB installation, we only include British English. You can download further languages from <a href="https://www.phpbb.com/">www.phpbb.com</a>, and add them before installing or later.</p>
|
||||
|
||||
<h4>Configuration file</h4>
|
||||
|
||||
@@ -236,7 +243,7 @@
|
||||
|
||||
<p>If the installation was successful, you can now use the <em>Login</em> button to visit the Administration Control Panel. Congratulations, you have installed phpBB successfully. But there is still work ahead!</p>
|
||||
|
||||
<p>If you are unable to get phpBB3 installed even after reading this guide, please look at the support section of the installer's introduction page to find out where you can ask for further assistance.</p>
|
||||
<p>If you are unable to get phpBB installed even after reading this guide, please look at the support section of the installer's introduction page to find out where you can ask for further assistance.</p>
|
||||
|
||||
<p>At this point if you are converting from phpBB 2.0.x, you should refer to the <a href="#convert">conversion steps</a> for further information. If not, you should remove the install directory from your server as you will only be able to access the Administration Control Panel whilst it is present.</p>
|
||||
|
||||
@@ -244,7 +251,7 @@
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -252,19 +259,19 @@
|
||||
<a name="update"></a><h2>4. Updating from stable releases of phpBB 3.1.x</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
<p>If you are currently using a stable release of phpBB3, 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 phpBB3 files</em>! If you are unsure how to achieve this please ask your hosting provider for advice.</p>
|
||||
<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 phpBB3 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></p>
|
||||
|
||||
<a name="update_full"></a><h3>4.i. Full package</h3>
|
||||
|
||||
<p>The full package is normally meant for new installations only, but if you want to replace all source files, this package comes in handy.</p>
|
||||
|
||||
<p>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 phpBB3 files, you may want to leave your <code>files/</code> and <code>images/</code> directorie 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>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>
|
||||
|
||||
@@ -296,14 +303,14 @@
|
||||
|
||||
<p>This update method is the recommended method for updating. This package detects changed files automatically and merges in changes if needed.</p>
|
||||
|
||||
<p>The automatic update package will update the board from a given version to the latest version. A number of automatic update files are available, and you should choose the one that corresponds to the version of the board that you are currently running. For example, if your current version is <strong>3.0.10</strong>, you need the <code>phpBB-3.0.10_to_3.0.11.zip/tar.bz2</code> file.</p>
|
||||
<p>The automatic update package will update the board from a given version to the latest version. A number of automatic update files are available, and you should choose the one that corresponds to the version of the board that you are currently running. For example, if your current version is <strong>3.0.13</strong>, you need the <code>phpBB-3.0.13_to_3.0.14.zip/tar.bz2</code> file.</p>
|
||||
|
||||
<p>To perform the update, either follow the instructions from the <strong>Administration Control Panel->System</strong> Tab - this should point out that you are running an outdated version and will guide you through the update - or follow the instructions listed below.</p>
|
||||
|
||||
<ul>
|
||||
<li>Go to the <a href="https://www.phpbb.com/downloads/">downloads page</a> and download the latest update package listed there, matching your current version.</li>
|
||||
<li>Upload the uncompressed archive contents to your phpBB installation - only the install folder is required. Upload the whole install folder, retaining the file structure.</li>
|
||||
<li>After the install folder is present, phpBB3 will go offline automatically.</li>
|
||||
<li>Upload the uncompressed archive contents to your phpBB installation - only the <code>install/</code> and <code>vendor/</code> folders are required. Upload these folders in their entirety, retaining the file structure.</li>
|
||||
<li>After the install folder is present, phpBB will go offline automatically.</li>
|
||||
<li>Point your browser to the install directory, for example <code>http://www.example.com/phpBB3/install/</code></li>
|
||||
<li>Choose the "Update" Tab and follow the instructions</li>
|
||||
</ul>
|
||||
@@ -320,7 +327,7 @@
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -346,7 +353,7 @@
|
||||
<li>The <code>store/</code> directory</li>
|
||||
</ul></li>
|
||||
|
||||
<li>Upload the contents of the 3.1.x Full Package into your forum's directory.</li>
|
||||
<li>Upload the contents of the 3.1.x Full Package into your forum's directory. Make sure the root level .htaccess file is included in the upload.</li>
|
||||
<li>Browse to install/database_update.php</li>
|
||||
<li>Delete the <code>install/</code> directory</li>
|
||||
</ol>
|
||||
@@ -362,7 +369,7 @@
|
||||
<a name="convert"></a><h2>6. Conversion from phpBB 2.0.x to phpBB 3.1.x</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -417,7 +424,7 @@
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -425,17 +432,17 @@
|
||||
<a name="postinstall"></a><h2>7. Important (security related) post-Install tasks for all installation methods</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
<p>Once you have successfully installed phpBB3 you <strong>MUST</strong> ensure you remove the entire <code>install/</code> directory. Leaving the install directory in place is a <em>very serious potential security issue</em> which may lead to deletion or alteration of files, etc. Please note that until this directory is removed, phpBB will not operate and a warning message will be displayed. Beyond this <strong>essential</strong> deletion, you may also wish to delete the docs/ directory if you wish.</p>
|
||||
<p>Once you have successfully installed phpBB you <strong>MUST</strong> ensure you remove the entire <code>install/</code> directory. Leaving the install directory in place is a <em>very serious potential security issue</em> which may lead to deletion or alteration of files, etc. Please note that until this directory is removed, phpBB will not operate and a warning message will be displayed. Beyond this <strong>essential</strong> deletion, you may also wish to delete the docs/ directory if you wish.</p>
|
||||
|
||||
<p>With these directories deleted, you should proceed to the administration panel. Depending on how the installation completed, you may have been directed there automatically. If not, login as the administrator you specified during install/conversion and click the <strong>Administration Control Panel</strong> link at the bottom of any page. Ensure that details specified on the <strong>General</strong> tab are correct!</p>
|
||||
|
||||
<a name="avatars"></a><h3>6.i. Uploadable avatars</h3>
|
||||
|
||||
<p>phpBB3 supports several methods for allowing users to select their own <em>avatar</em> (an avatar is a small image generally unique to a user and displayed just below their username in posts).</p>
|
||||
<p>phpBB supports several methods for allowing users to select their own <em>avatar</em> (an avatar is a small image generally unique to a user and displayed just below their username in posts).</p>
|
||||
|
||||
<p>Two of these options allow users to upload an avatar from their machine or a remote location (via a URL). If you wish to enable this function you should first ensure the correct path for uploadable avatars is set in <strong>Administration Control Panel -> General -> Board Configuration -> Avatar settings</strong>. By default this is <code>images/avatars/uploads</code>, but you can set it to whatever you like, just ensure the configuration setting is updated. You must also ensure this directory can be written to by the webserver. Usually this means you have to alter its permissions to allow anyone to read and write to it. Exactly how you should do this depends on your FTP client or server operating system.</p>
|
||||
|
||||
@@ -455,15 +462,15 @@
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<a name="anti_spam"></a><h2>8. Anti-Spam Measures</h2>
|
||||
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
<p>Like any online site that allows user input, your board could be subject to unwanted posts; often referred to as <a href="http://en.wikipedia.org/wiki/Forum_spam">forum spam</a>. The vast majority of these attacks will be from automated computer programs known as <a href="http://en.wikipedia.org/wiki/Spambot">spambots</a>. The attacks, generally, are not personal as the spammers are just trying to find accessible targets. phpBB has a number of anti-spam measures built in, including a range of CAPTCHAs. However, administrators are strongly urged to read and follow the advice for <a href="https://www.phpbb.com/support/spam/">Preventing Spam in phpBB</a> as soon as possible after completing the installation of your board.</p>
|
||||
@@ -471,7 +478,7 @@
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -479,7 +486,7 @@
|
||||
<a name="disclaimer"></a><h2>9. Copyright and disclaimer</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -489,7 +496,7 @@
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- END DOCUMENT -->
|
||||
|
@@ -4,9 +4,9 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="keywords" content="" />
|
||||
<meta name="description" content="phpBB 3.1.x Readme" />
|
||||
<title>phpBB3 • Readme</title>
|
||||
<title>phpBB • Readme</title>
|
||||
|
||||
<link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
|
||||
<link href="assets/css/stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
|
||||
|
||||
</head>
|
||||
|
||||
@@ -16,15 +16,15 @@
|
||||
<a id="top" name="top" accesskey="t"></a>
|
||||
<div id="page-header">
|
||||
<div class="headerbar">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div id="doc-description">
|
||||
<a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a>
|
||||
<a href="../index.php" id="logo"><img src="assets/images/site_logo.gif" alt="" /></a>
|
||||
<h1>phpBB 3.1.x Readme</h1>
|
||||
<p style="display: none;"><a href="#start_here">Skip</a></p>
|
||||
</div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -34,25 +34,29 @@
|
||||
|
||||
<!-- BEGIN DOCUMENT -->
|
||||
|
||||
<p>Thank you for downloading phpBB3. This README will guide you through the basics of installation and operation of phpBB3. Please ensure you read this and the accompanying documentation fully <strong>before</strong> proceeding with the installation.</p>
|
||||
<p class="paragraph main-description">
|
||||
Thank you for downloading phpBB. This README will guide you through the basics of installation
|
||||
and operation of phpBB. Please ensure you read this and the accompanying documentation fully
|
||||
<strong>before</strong> proceeding with the installation.
|
||||
</p>
|
||||
|
||||
<h1>Readme</h1>
|
||||
|
||||
<div class="paragraph menu">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
<ol>
|
||||
<li><a href="#install">Installing phpBB3</a></li>
|
||||
<li><a href="#run">Running phpBB3</a>
|
||||
<li><a href="#install">Installing phpBB</a></li>
|
||||
<li><a href="#run">Running phpBB</a>
|
||||
<ol style="list-style-type: lower-roman;">
|
||||
<li><a href="#i18n">Languages (Internationalisation - i18n)</a></li>
|
||||
<li><a href="#styles">Styles</a></li>
|
||||
<li><a href="#mods">Modifications</a></li>
|
||||
<li><a href="#extensions">Extensions</a></li>
|
||||
</ol>
|
||||
</li>
|
||||
<li><a href="#help">Getting help with phpBB3</a>
|
||||
<li><a href="#help">Getting help with phpBB</a>
|
||||
<ol style="list-style-type: lower-roman;">
|
||||
<li><a href="#docs">Documentation</a></li>
|
||||
<li><a href="#kb">Knowledge Base</a></li>
|
||||
@@ -73,15 +77,15 @@
|
||||
|
||||
</div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<a name="install"></a><h2>1. Installing phpBB3</h2>
|
||||
<a name="install"></a><h2>1. Installing phpBB</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
<p>Installation, update and conversion instructions can be found in the <a href="INSTALL.html">INSTALL</a> document in this directory. If you are intending on converting from a phpBB 2.0.x or 3.0.x installation we highly recommend that you backup any existing data before proceeding!</p>
|
||||
@@ -110,15 +114,15 @@
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<a name="run"></a><h2>2. Running phpBB3</h2>
|
||||
<a name="run"></a><h2>2. Running phpBB</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -132,55 +136,55 @@
|
||||
|
||||
<p>This is the <em>official</em> location for all supported language sets. If you download a package from a 3rd party site you do so with the understanding that we cannot offer support. Please do not ask for support if you download a language pack from a 3rd party site.</p>
|
||||
|
||||
<p>Installation of these packages is straightforward: simply download the required language pack, uncompress (unzip) it and via FTP transfer the included <code>language</code> and <code>styles</code> folders to the root of your board installation. The language can then be installed via the Administration Control Panel of your board: <code>System tab -> General Tasks -> Language packs</code>. A more detailed description of the process is in the Knowledge Base article, <a href="https://www.phpbb.com/kb/article/how-to-install-a-language-pack/">How to Install a Language Pack</a>.</p>
|
||||
<p>Installation of these packages is straightforward: simply download the required language pack, uncompress (unzip) it and via FTP transfer the included <code>language</code> and <code>styles</code> folders to the root of your board installation. The language can then be installed via the Administration Control Panel of your board: <code>Customise tab -> Language management -> Language packs</code>. A more detailed description of the process is in the Knowledge Base article, <a href="https://www.phpbb.com/kb/article/how-to-install-a-language-pack/">How to Install a Language Pack</a>.</p>
|
||||
|
||||
<p>If your language is not available, please visit our <a href="https://www.phpbb.com/community/viewforum.php?f=66">[3.0.x] Translations</a> forum where you will find topics on translations in progress. Should you wish to volunteer to translate a language not currently available or assist in maintaining an existing language pack, you can <a href="https://www.phpbb.com/languages/apply.php">Apply to become a translator</a>.</p>
|
||||
<p>If your language is not available, please visit our <a href="https://www.phpbb.com/community/viewforum.php?f=491">[3.1.x] Translations</a> forum where you will find topics on translations in progress. Should you wish to volunteer to translate a language not currently available or assist in maintaining an existing language pack, you can <a href="https://www.phpbb.com/languages/apply.php">Apply to become a translator</a>.</p>
|
||||
|
||||
<a name="styles"></a><h3>2.ii. Styles</h3>
|
||||
|
||||
<p>Although we are rather proud of the included styles, we realise that they may not be to everyone's taste. Therefore, phpBB3 allows styles to be switched with relative ease. First, you need to locate and download a style you like. You can find them listed in the <a href="https://www.phpbb.com/customise/db/styles-2/">Styles</a> section of our <a href="https://www.phpbb.com/customise/db/">Customisation Database</a>.</p>
|
||||
<p>Although we are rather proud of the included styles, we realise that they may not be to everyone's taste. Therefore, phpBB allows styles to be switched with relative ease. First, you need to locate and download a style you like. You can find them listed in the <a href="https://www.phpbb.com/customise/db/styles-2/">Styles</a> section of our <a href="https://www.phpbb.com/customise/db/">Customisation Database</a>.</p>
|
||||
|
||||
<p>For more information about styles, please see: <a href="https://www.phpbb.com/styles/">https://www.phpbb.com/styles/</a></p>
|
||||
|
||||
<p><strong>Please note</strong> that 3rd party styles downloaded for versions of phpBB2 will <strong>not</strong> work in phpBB3. It is also important to ensure that the style is updated to match the current version of the phpBB software you are using.</p>
|
||||
|
||||
<p>Once you have downloaded a style, the usual next step is to unarchive (or upload the unarchived contents of) the package into your <code>styles/</code> directory. You then need to visit <code>Administration Control Panel -> Styles tab</code> where you should see the new style available. Click "Install" to install the style.</p>
|
||||
<p>Once you have downloaded a style, the usual next step is to unarchive (or upload the unarchived contents of) the package into your <code>styles/</code> directory. You then need to visit <code>Administration Control Panel -> Customise tab -> Style management -> Install Styles</code> where you should see the new style available. Click "Install style" to install the style.</p>
|
||||
|
||||
<p><strong>Please note</strong> that to improve efficiency, the software caches certain data. For this reason, if you create your own style or modify existing ones, please remember to "Refresh" the appropriate style components <code>Administration Control Panel -> Styles tab -> Style Components</code> screen. You may also need to reload the page you have changed in your web browser to overcome browser caching. If the changed components are not refreshed you will not see your changes taking effect.</p>
|
||||
<p><strong>Please note</strong> that to improve efficiency, the software caches certain data. For this reason, if you create your own style or modify existing ones, please remember to purge the board cache by clicking the <code>Run now</code> button next to the <code>Purge the cache</code> option in the index page of the Administration Control Panel. You may also need to reload the page you have changed in your web browser to overcome browser caching. If the cache is not purged, you will not see your changes taking effect.</p>
|
||||
|
||||
<a name="mods"></a><h3>2.iii. Modifications</h3>
|
||||
<a name="extensions"></a><h3>2.iii. Extensions</h3>
|
||||
|
||||
<p>We are proud to have a thriving modifications community. These third party modifications to the standard phpBB software, known as <strong>MODs</strong>, extend its capabilities still further. You can browse through many of the MODs in the <a href="https://www.phpbb.com/customise/db/modifications-1/">Modifications</a> section of our <a href="https://www.phpbb.com/customise/db/">Customisation Database</a>.</p>
|
||||
<p>We are proud to have a thriving extensions community. These third party extensions to the standard phpBB software, extend its capabilities still further. You can browse through many of the extensions in the <a href="https://www.phpbb.com/customise/db/extensions-36">Extensions</a> section of our <a href="https://www.phpbb.com/customise/db/">Customisation Database</a>.</p>
|
||||
|
||||
<p>For more information about MODs, please see: <a href="https://www.phpbb.com/mods/">https://www.phpbb.com/mods/</a></p>
|
||||
<p>For more information about extensions, please see: <a href="https://www.phpbb.com/extensions">https://www.phpbb.com/extensions</a></p>
|
||||
|
||||
<p><strong>Please remember</strong> that any bugs or other issues that occur after you have added any modification should <strong>NOT</strong> be reported to the bug tracker (see below). First remove the MOD and see if the problem is resolved. Any support for a MOD should only be sought in the "Discussion/Support" forum for that MOD.</p>
|
||||
<p><strong>Please remember</strong> that any bugs or other issues that occur after you have added any extension should <strong>NOT</strong> be reported to the bug tracker (see below). First disable the extension and see if the problem is resolved. Any support for an extension should only be sought in the "Discussion/Support" forum for that extension.</p>
|
||||
|
||||
<p>Also remember that any modifications, particularly those which modify the database in any way, may render upgrading your forum to future versions more difficult. With all this said, many users have and continue to utilise many of the MODs already available with great success.</p>
|
||||
<p>Also remember that any extensions which modify the database in any way, may render upgrading your forum to future versions more difficult.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<a name="help"></a><h2>3. Getting help with phpBB3</h2>
|
||||
<a name="help"></a><h2>3. Getting help with phpBB</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
<p>phpBB3 can sometimes seem a little daunting to new users, particularly with regards to the permission system. The first thing you should do is check the <a href="FAQ.html">FAQ</a>, which covers a few basic getting started questions. If you need additional help there are several places you can find it.</p>
|
||||
<p>phpBB can sometimes seem a little daunting to new users, particularly with regards to the permission system. The first thing you should do is check the <a href="FAQ.html">FAQ</a>, which covers a few basic getting started questions. If you need additional help there are several places you can find it.</p>
|
||||
|
||||
<a name="docs"></a><h3>3.i. phpBB3 Documentation</h3>
|
||||
<a name="docs"></a><h3>3.i. phpBB Documentation</h3>
|
||||
|
||||
<p>Comprehensive documentation is now available on the phpBB website:</p>
|
||||
|
||||
<p><a href="https://www.phpbb.com/support/documentation/3.0/">https://www.phpbb.com/support/documentation/3.0/</a></p>
|
||||
<p><a href="https://www.phpbb.com/support/docs/en/3.1/ug/">https://www.phpbb.com/support/docs/en/3.1/ug/</a></p>
|
||||
|
||||
<p>This covers everything from installation to setting permissions and managing users.</p>
|
||||
|
||||
@@ -208,7 +212,7 @@
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -216,7 +220,7 @@
|
||||
<a name="status"></a><h2>4. Status of this version</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -232,7 +236,7 @@
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -240,20 +244,20 @@
|
||||
<a name="bugs"></a><h2>5. Reporting Bugs</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
<p>The phpBB Limited uses a bug tracking system to store, list and manage all reported bugs, it can be found at the location listed below. Please <strong>DO NOT</strong> post bug reports to our forums. In addition please <strong>DO NOT</strong> use the bug tracker for support requests. Posting such a request will only see you directed to the support forums (while taking time away from working on real bugs).</p>
|
||||
<p>The phpBB developers use a bug tracking system to store, list and manage all reported bugs, it can be found at the location listed below. Please <strong>DO NOT</strong> post bug reports to our forums. In addition please <strong>DO NOT</strong> use the bug tracker for support requests. Posting such a request will only see you directed to the support forums (while taking time away from working on real bugs).</p>
|
||||
|
||||
<p><a href="http://tracker.phpbb.com/browse/PHPBB3">http://tracker.phpbb.com/browse/PHPBB3</a></p>
|
||||
|
||||
<p>While we very much appreciate receiving bug reports (the more reports the more stable phpBB will be) we ask you carry out a few steps before adding new entries:</p>
|
||||
|
||||
<ul>
|
||||
<li>First, determine if your bug is reproduceable; how to determine this depends on the bug in question. Only if the bug is reproduceable is it likely to be a problem with phpBB3 (or in some way connected). If something cannot be reproduced it may turn out to have been your hosting provider working on something, a user doing something silly, etc. Bug reports for non-reproduceable events can slow down our attempts to fix real, reproduceable issues<br /><br /></li>
|
||||
<li>First, determine if your bug is reproduceable; how to determine this depends on the bug in question. Only if the bug is reproduceable is it likely to be a problem with phpBB (or in some way connected). If something cannot be reproduced it may turn out to have been your hosting provider working on something, a user doing something silly, etc. Bug reports for non-reproduceable events can slow down our attempts to fix real, reproduceable issues<br /><br /></li>
|
||||
<li>Next, please read or search through the existing bug reports to see if <em>your</em> bug (or one very similar to it) is already listed. If it is please add to that existing bug rather than creating a new duplicate entry (all this does is slow us down).<br /><br /></li>
|
||||
<li>Check the forums (use search!) to see if people have discussed anything that sounds similar to what you are seeing. However, as noted above please <strong>DO NOT</strong> post your particular bug to the forum unless it's non-reproduceable or you are sure it’s related to something you have done rather than phpBB3<br /><br /></li>
|
||||
<li>Check the forums (use search!) to see if people have discussed anything that sounds similar to what you are seeing. However, as noted above please <strong>DO NOT</strong> post your particular bug to the forum unless it's non-reproduceable or you are sure it’s related to something you have done rather than phpBB<br /><br /></li>
|
||||
<li>If no existing bug exists then please feel free to add it</li>
|
||||
</ul>
|
||||
|
||||
@@ -267,7 +271,7 @@
|
||||
|
||||
<p>The relevant database type/version is listed within the administration control panel.</p>
|
||||
|
||||
<p>Please be as detailed as you can in your report, and if possible, list the steps required to duplicate the problem. If you have a patch that fixes the issue, please attach it to the ticket or submit a pull request to our repository <a href="https://github.com/phpbb/phpbb3">on GitHub</a>.</p>
|
||||
<p>Please be as detailed as you can in your report, and if possible, list the steps required to duplicate the problem. If you have a patch that fixes the issue, please attach it to the ticket or submit a pull request to our repository <a href="https://github.com/phpbb/phpbb">on GitHub</a>.</p>
|
||||
|
||||
<p>If you create a patch, it is very much appreciated (but not required) if you follow the phpBB coding guidelines. Please note that the coding guidelines are somewhat different between different versions of phpBB. For phpBB 3.1.x the coding guidelines may be found here: <a href="http://area51.phpbb.com/docs/31x/coding-guidelines.html">http://area51.phpbb.com/docs/31x/coding-guidelines.html</a></p>
|
||||
|
||||
@@ -283,7 +287,7 @@
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -291,7 +295,7 @@
|
||||
<a name="curbugs"></a><h2>6. Overview of current bug list</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -307,7 +311,7 @@
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -315,13 +319,13 @@
|
||||
<a name="php"></a><h2>7. PHP compatibility issues</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
<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>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 phpBB3. If you are running a development version of PHP please check any bugs you find on a system running a stable release before submitting.</p>
|
||||
<p>Please remember that running any application on a development (unstable, e.g. a beta release) version of PHP can lead to strange/unexpected results which may appear to be bugs in the application. Therefore, we recommend you upgrade to the newest stable version of PHP before running phpBB. If you are running a development version of PHP please check any bugs you find on a system running a stable release before submitting.</p>
|
||||
|
||||
<p>This board has been developed and tested under Linux and Windows (amongst others) running Apache using MySQL 3.23, 4.x, 5.x, MariaDB 5.x, MSSQL Server 2000, PostgreSQL 8.x, Oracle 8, SQLite 2 and SQLite 3. Versions of PHP used range from 5.3.x to 5.4.x without problem.</p>
|
||||
|
||||
@@ -333,7 +337,7 @@
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -341,7 +345,7 @@
|
||||
<a name="disclaimer"></a><h2>8. Copyright and disclaimer</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -351,7 +355,7 @@
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- END DOCUMENT -->
|
||||
|
@@ -11,13 +11,21 @@ body {
|
||||
font-family: Verdana, Helvetica, Arial, sans-serif;
|
||||
color: #828282;
|
||||
background-color: #FFFFFF;
|
||||
font-size: 12px;
|
||||
font-size: 10px;
|
||||
margin: 0;
|
||||
padding: 12px 0;
|
||||
}
|
||||
|
||||
img { border-width: 0; }
|
||||
|
||||
ul, ol {
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
ul ul, ol ol {
|
||||
font-size: inherit;
|
||||
}
|
||||
|
||||
p {
|
||||
line-height: 1.3em;
|
||||
font-size: 1.1em;
|
||||
@@ -70,7 +78,7 @@ h3 {
|
||||
border-bottom: 1px solid #CCCCCC;
|
||||
margin-bottom: 3px;
|
||||
padding-bottom: 2px;
|
||||
font-size: 1.05em;
|
||||
font-size: 1.1em;
|
||||
color: #115098;
|
||||
margin-top: 20px;
|
||||
}
|
||||
@@ -80,7 +88,7 @@ h4 {
|
||||
font-weight: bold;
|
||||
margin-bottom: 3px;
|
||||
padding-bottom: 2px;
|
||||
font-size: 1.05em;
|
||||
font-size: 1.1em;
|
||||
color: #115098;
|
||||
margin-top: 20px;
|
||||
}
|
||||
@@ -104,6 +112,7 @@ code {
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
background-color: #FAFAFA;
|
||||
padding: 0 4px;
|
||||
}
|
||||
|
||||
#wrap {
|
||||
@@ -145,44 +154,16 @@ a#logo:hover {
|
||||
|
||||
.headerbar {
|
||||
background: #ebebeb none repeat-x 0 0;
|
||||
border-radius: 7px;
|
||||
color: #FFFFFF;
|
||||
margin-bottom: 4px;
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
span.corners-top, span.corners-bottom, span.corners-top span, span.corners-bottom span {
|
||||
font-size: 1px;
|
||||
line-height: 1px;
|
||||
display: block;
|
||||
height: 5px;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
span.corners-top {
|
||||
background-image: none;
|
||||
background-position: 0 0;
|
||||
margin: 0 -5px;
|
||||
}
|
||||
|
||||
span.corners-top span {
|
||||
background-image: none;
|
||||
background-position: 100% 0;
|
||||
}
|
||||
|
||||
span.corners-bottom {
|
||||
background-image: none;
|
||||
background-position: 0 100%;
|
||||
margin: 0 -5px;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
span.corners-bottom span {
|
||||
background-image: none;
|
||||
background-position: 100% 100%;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.paragraph {
|
||||
padding: 0 10px;
|
||||
border-radius: 7px;
|
||||
font-size: 1.1em;
|
||||
padding: 5px 10px;
|
||||
margin-bottom: 4px;
|
||||
background-repeat: no-repeat;
|
||||
background-position: 100% 0;
|
||||
@@ -197,6 +178,10 @@ span.corners-bottom span {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.main-description {
|
||||
font-size: 1.15em;
|
||||
}
|
||||
|
||||
.content {
|
||||
color: #333333;
|
||||
}
|
||||
@@ -222,7 +207,7 @@ hr {
|
||||
|
||||
.headerbar {
|
||||
background-color: #12A3EB;
|
||||
background-image: url("bg_header.gif");
|
||||
background-image: url("../images/bg_header.gif");
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
@@ -231,23 +216,6 @@ hr {
|
||||
color: #28313F;
|
||||
}
|
||||
|
||||
|
||||
span.corners-top {
|
||||
background-image: url("corners_left.png");
|
||||
}
|
||||
|
||||
span.corners-top span {
|
||||
background-image: url("corners_right.png");
|
||||
}
|
||||
|
||||
span.corners-bottom {
|
||||
background-image: url("corners_left.png");
|
||||
}
|
||||
|
||||
span.corners-bottom span {
|
||||
background-image: url("corners_right.png");
|
||||
}
|
||||
|
||||
.error {
|
||||
color: #BC2A4D;
|
||||
}
|
||||
@@ -257,10 +225,6 @@ a:visited { color: #105289; }
|
||||
a:hover { color: #D31141; }
|
||||
a:active { color: #368AD2; }
|
||||
|
||||
.paragraph span.corners-top, .paragraph span.corners-bottom {
|
||||
margin: 0 -10px;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 0;
|
||||
line-height: 1.48em;
|
||||
@@ -288,13 +252,17 @@ a:active { color: #368AD2; }
|
||||
}
|
||||
|
||||
* html hr { margin: 0; }
|
||||
* html span.corners-top, * html span.corners-bottom { background-image: url("corners_left.gif"); }
|
||||
* html span.corners-top span, * html span.corners-bottom span { background-image: url("corners_right.gif"); }
|
||||
|
||||
.back2top {
|
||||
clear: both;
|
||||
.top {
|
||||
background: url("../images/icon_back_top.gif") no-repeat top left;
|
||||
text-decoration: none;
|
||||
width: 11px;
|
||||
height: 11px;
|
||||
text-align: right;
|
||||
display: block;
|
||||
float: right;
|
||||
overflow: hidden;
|
||||
letter-spacing: 1000px;
|
||||
text-indent: 11px;
|
||||
}
|
||||
|
||||
.content ol, .content ul {
|
||||
@@ -350,3 +318,9 @@ a:active { color: #368AD2; }
|
||||
clear: both;
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
.inner:after {
|
||||
clear: both;
|
||||
content: '';
|
||||
display: block;
|
||||
}
|
Before Width: | Height: | Size: 690 B After Width: | Height: | Size: 690 B |
BIN
phpBB/docs/assets/images/icon_back_top.gif
Normal file
After Width: | Height: | Size: 204 B |
BIN
phpBB/docs/assets/images/site_logo.gif
Normal file
After Width: | Height: | Size: 5.0 KiB |
@@ -6,7 +6,7 @@
|
||||
<meta name="description" content="This is an explanation of how to use the phpBB auth/acl API" />
|
||||
<title>phpBB3 • Auth API</title>
|
||||
|
||||
<link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
|
||||
<link href="assets/css/stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
|
||||
|
||||
</head>
|
||||
|
||||
@@ -16,16 +16,16 @@
|
||||
<a id="top" name="top" accesskey="t"></a>
|
||||
<div id="page-header">
|
||||
<div class="headerbar">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div id="doc-description">
|
||||
<a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a>
|
||||
<a href="../index.php" id="logo"><img src="assets/images/site_logo.gif" alt="" /></a>
|
||||
<h1>Auth API</h1>
|
||||
<p>This is an explanation of how to use the phpBB auth/acl API</p>
|
||||
<p style="display: none;"><a href="#start_here">Skip</a></p>
|
||||
</div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -35,12 +35,12 @@
|
||||
|
||||
<!-- BEGIN DOCUMENT -->
|
||||
|
||||
<p>This is an explanation of how to use the phpBB auth/acl API.</p>
|
||||
<p class="paragraph main-description">This is an explanation of how to use the phpBB auth/acl API.</p>
|
||||
|
||||
<h1>Auth API</h1>
|
||||
|
||||
<div class="paragraph menu">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -73,7 +73,7 @@
|
||||
<a name="intro"></a><h2>1. Introduction</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -86,8 +86,8 @@
|
||||
<p>To use any methods contained with the <code>auth</code> class it first needs to be instantiated. This is best achieved early in the execution of the script in the following manner:</p>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
$auth = new phpbb\auth\auth();
|
||||
</pre></div>
|
||||
$auth = new phpbb\auth\auth();</pre>
|
||||
</div>
|
||||
|
||||
<p>Once an instance of the class has been created you are free to call the various methods it contains. Please note that should you wish to use the <code>auth_admin</code> methods you will need to instantiate this separately but in the same way.</p>
|
||||
|
||||
@@ -95,7 +95,7 @@ $auth = new phpbb\auth\auth();
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -103,7 +103,7 @@ $auth = new phpbb\auth\auth();
|
||||
<a name="methods"></a><h2>2. Methods</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -114,8 +114,8 @@ $auth = new phpbb\auth\auth();
|
||||
<p>The <code>acl</code> method is the initialisation routine for all the acl functions. If you intend calling any acl method you must first call this. The method takes as its one and only required parameter an associative array containing user information as stored in the database. This array must contain at least the following information; user_id, user_permissions and user_type. It is called in the following way:</p>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
$auth->acl(<code>userdata</code>);
|
||||
</pre></div>
|
||||
$auth->acl(<code>userdata</code>);</pre>
|
||||
</div>
|
||||
|
||||
<p>Where userdata is the array containing the aforementioned data.</p>
|
||||
|
||||
@@ -124,8 +124,8 @@ $auth->acl(<code>userdata</code>);
|
||||
<p>This method is the primary way of determining what a user can and cannot do for a given option globally or in a given forum. The method should be called in the following way:</p>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
$result = $auth->acl_get(<code>option</code>[, <code>forum</code>]);
|
||||
</pre></div>
|
||||
$result = $auth->acl_get(<code>option</code>[, <code>forum</code>]);</pre>
|
||||
</div>
|
||||
|
||||
<p>Where option is a string representing the required option, e.g. 'f_list', 'm_edit', 'a_adduser', etc. By adding a ! in front of the option, e.g. '!f_list' the result of this method will be negated. The optional forum term is the integer forum_id.</p>
|
||||
|
||||
@@ -142,8 +142,8 @@ $result = $auth->acl_get(<code>option</code>[, <code>forum</code>]);
|
||||
<p>The method should be called thus:</p>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
$result = $auth->acl_gets(<code>option1</code>[, <code>option2</code>, ..., <code>optionN</code>, <code>forum</code>]);
|
||||
</pre></div>
|
||||
$result = $auth->acl_gets(<code>option1</code>[, <code>option2</code>, ..., <code>optionN</code>, <code>forum</code>]);</pre>
|
||||
</div>
|
||||
|
||||
<p>As with the <code>acl_get</code> method the options are strings representing the required permissions to check. The forum again is an integer representing a given forum_id.</p>
|
||||
|
||||
@@ -154,16 +154,16 @@ $result = $auth->acl_gets(<code>option1</code>[, <code>option2</code>, ..., <
|
||||
<p>This method is used to find out in which forums a user is allowed to carry out an operation or to find out in which forums he is not allowed to carry out an operation. The method should be called in the following way:</p>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
$result = $auth->acl_getf(<code>option</code>[, <code>clean</code>]);
|
||||
</pre></div>
|
||||
$result = $auth->acl_getf(<code>option</code>[, <code>clean</code>]);</pre>
|
||||
</div>
|
||||
|
||||
<p>Just like in the <code>acl_get</code> method the option is a string specifying the permission which has to be checked (negation using ! is allowed). The second parameter is a boolean. If it is set to false this method returns all forums with either zero or a positive integer. If it is set to true only those forums with a positive integer as the result will be returned.</p>
|
||||
|
||||
<p>The method returns an associative array of the form:</p>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
array(<em>forum_id1</em> => array(<em>option</em> => <em>integer</em>), <em>forum_id2</em> => ...)
|
||||
</pre></div>
|
||||
array(<em>forum_id1</em> => array(<em>option</em> => <em>integer</em>), <em>forum_id2</em> => ...)</pre>
|
||||
</div>
|
||||
|
||||
<p>Where option is the option passed to the method and integer is either zero or a positive integer and the same <code>acl_get(option, forum_id)</code> would return.</p>
|
||||
|
||||
@@ -172,8 +172,8 @@ array(<em>forum_id1</em> => array(<em>option</em> => <em>integer</em>), <e
|
||||
<p>This method is used to find out whether a user has a permission in at least one forum or globally. This method is similar to checking whether <code>acl_getf(option, true)</code> returned one or more forums but it's faster. It should be called in the following way:</p>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
$result = $auth->acl_getf_global(<code>option</code>)
|
||||
</pre></div>
|
||||
$result = $auth->acl_getf_global(<code>option</code>)</pre>
|
||||
</div>
|
||||
|
||||
<p>As with the previous methods option is a string specifying the permission which has to be checked.</p>
|
||||
|
||||
@@ -230,7 +230,7 @@ $result = $auth->acl_get_list($user_id, $permissions, $forum_id);
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -238,7 +238,7 @@ $result = $auth->acl_get_list($user_id, $permissions, $forum_id);
|
||||
<a name="admin_related"></a><h2>3. Admin related functions</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -247,8 +247,8 @@ $result = $auth->acl_get_list($user_id, $permissions, $forum_id);
|
||||
<p>To use any methods this class contains it first needs to be instantiated separately from <code>auth</code>. This is achieved in the same way as <code>auth</code>:</p>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
$auth_admin = new auth_admin();
|
||||
</pre></div>
|
||||
$auth_admin = new auth_admin();</pre>
|
||||
</div>
|
||||
|
||||
<p>This instance gives you access to both the methods of this specific class and that of <code>auth</code>.</p>
|
||||
|
||||
@@ -256,7 +256,7 @@ $auth_admin = new auth_admin();
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -264,7 +264,7 @@ $auth_admin = new auth_admin();
|
||||
<a name="disclaimer"></a><h2>4. Copyright and disclaimer</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -274,7 +274,7 @@ $auth_admin = new auth_admin();
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- END DOCUMENT -->
|
||||
|
@@ -6,7 +6,7 @@
|
||||
<meta name="description" content="Ascraeus coding guidelines document" />
|
||||
<title>phpBB3 • Coding Guidelines</title>
|
||||
|
||||
<link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
|
||||
<link href="assets/css/stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
|
||||
|
||||
</head>
|
||||
|
||||
@@ -16,16 +16,16 @@
|
||||
<a id="top" name="top" accesskey="t"></a>
|
||||
<div id="page-header">
|
||||
<div class="headerbar">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div id="doc-description">
|
||||
<a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a>
|
||||
<a href="../index.php" id="logo"><img src="assets/images/site_logo.gif" alt="" /></a>
|
||||
<h1>Coding Guidelines</h1>
|
||||
<p>Ascraeus coding guidelines document</p>
|
||||
<p style="display: none;"><a href="#start_here">Skip</a></p>
|
||||
</div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -35,12 +35,14 @@
|
||||
|
||||
<!-- BEGIN DOCUMENT -->
|
||||
|
||||
<p>These are the phpBB Coding Guidelines for Ascraeus, all attempts should be made to follow them as closely as possible.</p>
|
||||
<p class="paragraph main-description">
|
||||
These are the phpBB Coding Guidelines for Ascraeus, all attempts should be made to follow them as closely as possible.
|
||||
</p>
|
||||
|
||||
<h1>Coding Guidelines</h1>
|
||||
|
||||
<div class="paragraph menu">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -89,7 +91,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -97,7 +99,7 @@
|
||||
<a name="defaults"></a><h2>1. Defaults</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -109,8 +111,8 @@
|
||||
|
||||
<div class="codebox"><pre>
|
||||
{TAB}$mode{TAB}{TAB}= $request->variable('mode', '');
|
||||
{TAB}$search_id{TAB}= $request->variable('search_id', '');
|
||||
</pre></div>
|
||||
{TAB}$search_id{TAB}= $request->variable('search_id', '');</pre>
|
||||
</div>
|
||||
|
||||
<p>If entered with tabs (replace the {TAB}) both equal signs need to be on the same column.</p>
|
||||
|
||||
@@ -133,8 +135,8 @@
|
||||
* For full copyright and license information, please see
|
||||
* the docs/CREDITS.txt file.
|
||||
*
|
||||
*/
|
||||
</pre></div>
|
||||
*/</pre>
|
||||
</div>
|
||||
|
||||
<p>Please see the <a href="#locations">File Locations section</a> for the correct package name.</p>
|
||||
|
||||
@@ -157,8 +159,8 @@
|
||||
|
||||
/**
|
||||
*/
|
||||
{CODE}
|
||||
</pre></div>
|
||||
{CODE}</pre>
|
||||
</div>
|
||||
|
||||
<h4>Files containing only functions:</h4>
|
||||
|
||||
@@ -185,8 +187,8 @@ Small code snipped, mostly one or two defines or an if statement
|
||||
/**
|
||||
* {DOCUMENTATION}
|
||||
*/
|
||||
class ...
|
||||
</pre></div>
|
||||
class ...</pre>
|
||||
</div>
|
||||
|
||||
<a name="locations"></a><h3>1.iii. File Locations</h3>
|
||||
|
||||
@@ -274,7 +276,7 @@ PHPBB_QA (Set board to QA-Mode, which means the updater also c
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -282,7 +284,7 @@ PHPBB_QA (Set board to QA-Mode, which means the updater also c
|
||||
<a name="code"></a><h2>2. Code Layout/Guidelines</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -317,8 +319,8 @@ for ($i = 0; $i < $outer_size; $i++)
|
||||
{
|
||||
foo($i, $j);
|
||||
}
|
||||
}
|
||||
</pre></div>
|
||||
}</pre>
|
||||
</div>
|
||||
|
||||
<h4>Function Names:</h4>
|
||||
<p>Functions should also be named descriptively. We're not programming in C here, we don't want to write functions called things like "stristr()". Again, all lower-case names with words separated by a single underscore character in PHP, and camel caps in JavaScript. Function names should be prefixed with "phpbb_" and preferably have a verb in them somewhere. Good function names are <code>phpbb_print_login_status()</code>, <code>phpbb_get_user_data()</code>, etc. Constructor functions in JavaScript should begin with a capital letter.</p>
|
||||
@@ -344,14 +346,14 @@ phpbb/
|
||||
dir/
|
||||
class_name.php
|
||||
subdir/
|
||||
class_name.php
|
||||
</pre></div>
|
||||
class_name.php</pre>
|
||||
</div>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
\phpbb\class_name - phpbb/class_name.php
|
||||
\phpbb\dir\class_name - phpbb/dir/class_name.php
|
||||
\phpbb\dir\subdir\class_name - phpbb/dir/subdir/class_name.php
|
||||
</pre></div>
|
||||
\phpbb\dir\subdir\class_name - phpbb/dir/subdir/class_name.php</pre>
|
||||
</div>
|
||||
|
||||
|
||||
<h4>Summary:</h4>
|
||||
@@ -377,8 +379,8 @@ while (condition)
|
||||
do_stuff();
|
||||
|
||||
for ($i = 0; $i < size; $i++)
|
||||
do_stuff($i);
|
||||
</pre></div>
|
||||
do_stuff($i);</pre>
|
||||
</div>
|
||||
|
||||
<p class="good">// These are all right. </p>
|
||||
<div class="codebox"><pre>
|
||||
@@ -395,8 +397,8 @@ while (condition)
|
||||
for ($i = 0; $i < size; $i++)
|
||||
{
|
||||
do_stuff();
|
||||
}
|
||||
</pre></div>
|
||||
}</pre>
|
||||
</div>
|
||||
|
||||
<h4>Where to put the braces:</h4>
|
||||
<p>In PHP code, braces always go on their own line. The closing brace should also always be at the same column as the corresponding opening brace, examples:</p>
|
||||
@@ -427,8 +429,8 @@ while (condition)
|
||||
function do_stuff()
|
||||
{
|
||||
...
|
||||
}
|
||||
</pre></div>
|
||||
}</pre>
|
||||
</div>
|
||||
|
||||
<p>In JavaScript code, braces always go on the same line:</p>
|
||||
|
||||
@@ -451,8 +453,8 @@ while (condition) {
|
||||
|
||||
function do_stuff() {
|
||||
...
|
||||
}
|
||||
</pre></div>
|
||||
}</pre>
|
||||
</div>
|
||||
|
||||
<h4>Use spaces between tokens:</h4>
|
||||
<p>This is another simple, easy step that helps keep code readable without much effort. Whenever you write an assignment, expression, etc.. Always leave <em>one</em> space between the tokens. Basically, write code as if it was English. Put spaces between variable names and operators. Don't put spaces just after an opening bracket or before a closing bracket. Don't put spaces just before a comma or a semicolon. This is best shown with a few examples, examples:</p>
|
||||
@@ -476,26 +478,26 @@ for($i=0; $i<$size; $i++) ...
|
||||
for ($i = 0; $i < $size; $i++) ...
|
||||
|
||||
$i=($j < $size)?0:1;
|
||||
$i = ($j < $size) ? 0 : 1;
|
||||
</pre></div>
|
||||
$i = ($j < $size) ? 0 : 1;</pre>
|
||||
</div>
|
||||
|
||||
<h4>Operator precedence:</h4>
|
||||
<p>Do you know the exact precedence of all the operators in PHP? Neither do I. Don't guess. Always make it obvious by using brackets to force the precedence of an equation so you know what it does. Remember to not over-use this, as it may harden the readability. Basically, do not enclose single expressions. Examples:</p>
|
||||
|
||||
<p class="bad">// what's the result? who knows. </p>
|
||||
<div class="codebox"><pre>
|
||||
$bool = ($i < 7 && $j > 8 || $k == 4);
|
||||
</pre></div>
|
||||
<div class="codebox">
|
||||
<pre>$bool = ($i < 7 && $j > 8 || $k == 4);</pre>
|
||||
</div>
|
||||
|
||||
<p class="bad">// now you can be certain what I'm doing here.</p>
|
||||
<div class="codebox"><pre>
|
||||
$bool = (($i < 7) && (($j < 8) || ($k == 4)));
|
||||
</pre></div>
|
||||
<div class="codebox">
|
||||
<pre>$bool = (($i < 7) && (($j < 8) || ($k == 4)));</pre>
|
||||
</div>
|
||||
|
||||
<p class="good">// But this one is even better, because it is easier on the eye but the intention is preserved</p>
|
||||
<div class="codebox"><pre>
|
||||
$bool = ($i < 7 && ($j < 8 || $k == 4));
|
||||
</pre></div>
|
||||
<div class="codebox">
|
||||
<pre>$bool = ($i < 7 && ($j < 8 || $k == 4));</pre>
|
||||
</div>
|
||||
|
||||
<h4>Quoting strings:</h4>
|
||||
<p>There are two different ways to quote strings in PHP - either with single quotes or with double quotes. The main difference is that the parser does variable interpolation in double-quoted strings, but not in single quoted strings. Because of this, you should <em>always</em> use single quotes <em>unless</em> you specifically need variable interpolation to be done on that string. This way, we can save the parser the trouble of parsing a bunch of strings where no interpolation needs to be done.</p>
|
||||
@@ -505,25 +507,25 @@ $bool = ($i < 7 && ($j < 8 || $k == 4));
|
||||
<div class="codebox"><pre>
|
||||
$str = "This is a really long string with no variables for the parser to find.";
|
||||
|
||||
do_stuff("$str");
|
||||
</pre></div>
|
||||
do_stuff("$str");</pre>
|
||||
</div>
|
||||
|
||||
<p class="good">// right</p>
|
||||
<div class="codebox"><pre>
|
||||
$str = 'This is a really long string with no variables for the parser to find.';
|
||||
|
||||
do_stuff($str);
|
||||
</pre></div>
|
||||
do_stuff($str);</pre>
|
||||
</div>
|
||||
|
||||
<p class="bad">// Sometimes single quotes are just not right</p>
|
||||
<div class="codebox"><pre>
|
||||
$post_url = $phpbb_root_path . 'posting.' . $phpEx . '?mode=' . $mode . '&amp;start=' . $start;
|
||||
</pre></div>
|
||||
$post_url = $phpbb_root_path . 'posting.' . $phpEx . '?mode=' . $mode . '&amp;start=' . $start;</pre>
|
||||
</div>
|
||||
|
||||
<p class="good">// Double quotes are sometimes needed to not overcrowd the line with concatenations.</p>
|
||||
<div class="codebox"><pre>
|
||||
$post_url = "{$phpbb_root_path}posting.$phpEx?mode=$mode&amp;start=$start";
|
||||
</pre></div>
|
||||
$post_url = "{$phpbb_root_path}posting.$phpEx?mode=$mode&amp;start=$start";</pre>
|
||||
</div>
|
||||
|
||||
<p>In SQL statements mixing single and double quotes is partly allowed (following the guidelines listed here about SQL formatting), else one should try to only use one method - mostly single quotes.</p>
|
||||
|
||||
@@ -535,40 +537,40 @@ $post_url = "{$phpbb_root_path}posting.$phpEx?mode=$mode&amp;start=$start";
|
||||
$foo = array(
|
||||
'bar' => 42,
|
||||
'boo' => 23
|
||||
);
|
||||
</pre></div>
|
||||
);</pre>
|
||||
</div>
|
||||
|
||||
<p class="good">// right </p>
|
||||
<div class="codebox"><pre>
|
||||
$foo = array(
|
||||
'bar' => 42,
|
||||
'boo' => 23,
|
||||
);
|
||||
</pre></div>
|
||||
);</pre>
|
||||
</div>
|
||||
|
||||
|
||||
<h4>Associative array keys:</h4>
|
||||
<p>In PHP, it's legal to use a literal string as a key to an associative array without quoting that string. We don't want to do this -- the string should always be quoted to avoid confusion. Note that this is only when we're using a literal, not when we're using a variable, examples:</p>
|
||||
|
||||
<p class="bad">// wrong</p>
|
||||
<div class="codebox"><pre>
|
||||
$foo = $assoc_array[blah];
|
||||
</pre></div>
|
||||
<div class="codebox">
|
||||
<pre>$foo = $assoc_array[blah];</pre>
|
||||
</div>
|
||||
|
||||
<p class="good">// right </p>
|
||||
<div class="codebox"><pre>
|
||||
$foo = $assoc_array['blah'];
|
||||
</pre></div>
|
||||
<div class="codebox">
|
||||
<pre>$foo = $assoc_array['blah'];</pre>
|
||||
</div>
|
||||
|
||||
<p class="bad">// wrong</p>
|
||||
<div class="codebox"><pre>
|
||||
$foo = $assoc_array["$var"];
|
||||
</pre></div>
|
||||
<div class="codebox">
|
||||
<pre>$foo = $assoc_array["$var"];</pre>
|
||||
</div>
|
||||
|
||||
<p class="good">// right </p>
|
||||
<div class="codebox"><pre>
|
||||
$foo = $assoc_array[$var];
|
||||
</pre></div>
|
||||
<div class="codebox">
|
||||
<pre>$foo = $assoc_array[$var];</pre>
|
||||
</div>
|
||||
|
||||
<h4>Comments:</h4>
|
||||
<p>Each complex function should be preceded by a comment that tells a programmer everything they need to know to use that function. The meaning of every parameter, the expected input, and the output are required as a minimal comment. The function's behaviour in error conditions (and what those error conditions are) should also be present - but mostly included within the comment about the output.<br /><br />Especially important to document are any assumptions the code makes, or preconditions for its proper operation. Any one of the developers should be able to look at any part of the application and figure out what's going on in a reasonable amount of time.<br /><br />Avoid using <code>/* */</code> comment blocks for one-line comments, <code>//</code> should be used for one/two-liners.</p>
|
||||
@@ -582,8 +584,8 @@ $foo = $assoc_array[$var];
|
||||
<p class="bad">// wrong </p>
|
||||
<div class="codebox"><pre>
|
||||
$array[++$i] = $j;
|
||||
$array[$i++] = $k;
|
||||
</pre></div>
|
||||
$array[$i++] = $k;</pre>
|
||||
</div>
|
||||
|
||||
<p class="good">// right </p>
|
||||
<div class="codebox"><pre>
|
||||
@@ -591,39 +593,38 @@ $i++;
|
||||
$array[$i] = $j;
|
||||
|
||||
$array[$i] = $k;
|
||||
$i++;
|
||||
</pre></div>
|
||||
$i++;</pre>
|
||||
</div>
|
||||
|
||||
<h4>Inline conditionals:</h4>
|
||||
<p>Inline conditionals should only be used to do very simple things. Preferably, they will only be used to do assignments, and not for function calls or anything complex at all. They can be harmful to readability if used incorrectly, so don't fall in love with saving typing by using them, examples:</p>
|
||||
|
||||
<p class="bad">// Bad place to use them</p>
|
||||
<div class="codebox"><pre>
|
||||
($i < $size && $j > $size) ? do_stuff($foo) : do_stuff($bar);
|
||||
</pre></div>
|
||||
($i < $size && $j > $size) ? do_stuff($foo) : do_stuff($bar);</pre>
|
||||
</div>
|
||||
|
||||
<p class="good">// OK place to use them </p>
|
||||
<div class="codebox"><pre>
|
||||
$min = ($i < $j) ? $i : $j;
|
||||
</pre></div>
|
||||
$min = ($i < $j) ? $i : $j;</pre>
|
||||
</div>
|
||||
|
||||
<h4>Don't use uninitialized variables.</h4>
|
||||
<p>For phpBB3, we intend to use a higher level of run-time error reporting. This will mean that the use of an uninitialized variable will be reported as a warning. These warnings can be avoided by using the built-in isset() function to check whether a variable has been set - but preferably the variable is always existing. For checking if an array has a key set this can come in handy though, examples:</p>
|
||||
|
||||
<p class="bad">// Wrong </p>
|
||||
<div class="codebox"><pre>
|
||||
if ($forum) ...
|
||||
</pre></div>
|
||||
<div class="codebox">
|
||||
<pre>if ($forum) ...</pre>
|
||||
</div>
|
||||
|
||||
<p class="good">// Right </p>
|
||||
<div class="codebox"><pre>
|
||||
if (isset($forum)) ...
|
||||
</pre></div>
|
||||
<div class="codebox">
|
||||
<pre>if (isset($forum)) ...</pre></div>
|
||||
|
||||
<p class="good">// Also possible</p>
|
||||
<div class="codebox"><pre>
|
||||
if (isset($forum) && $forum == 5)
|
||||
</pre></div>
|
||||
<div class="codebox">
|
||||
<pre>if (isset($forum) && $forum == 5)</pre>
|
||||
</div>
|
||||
|
||||
<p>The <code>empty()</code> function is useful if you want to check if a variable is not set or being empty (an empty string, 0 as an integer or string, NULL, false, an empty array or a variable declared, but without a value in a class). Therefore empty should be used in favor of <code>isset($array) && sizeof($array) > 0</code> - this can be written in a shorter way as <code>!empty($array)</code>.</p>
|
||||
|
||||
@@ -640,8 +641,8 @@ switch ($mode)
|
||||
case 'mode2':
|
||||
// I am doing something completely different here
|
||||
break;
|
||||
}
|
||||
</pre></div>
|
||||
}</pre>
|
||||
</div>
|
||||
|
||||
<p class="good">// Good </p>
|
||||
<div class="codebox"><pre>
|
||||
@@ -658,8 +659,8 @@ switch ($mode)
|
||||
default:
|
||||
// Always assume that a case was not caught
|
||||
break;
|
||||
}
|
||||
</pre></div>
|
||||
}</pre>
|
||||
</div>
|
||||
|
||||
<p class="good">// Also good, if you have more code between the case and the break </p>
|
||||
<div class="codebox"><pre>
|
||||
@@ -682,8 +683,8 @@ switch ($mode)
|
||||
// Always assume that a case was not caught
|
||||
|
||||
break;
|
||||
}
|
||||
</pre></div>
|
||||
}</pre>
|
||||
</div>
|
||||
|
||||
<p>Even if the break for the default case is not needed, it is sometimes better to include it just for readability and completeness.</p>
|
||||
|
||||
@@ -710,8 +711,8 @@ switch ($mode)
|
||||
// Always assume that a case was not caught
|
||||
|
||||
break;
|
||||
}
|
||||
</pre></div>
|
||||
}</pre>
|
||||
</div>
|
||||
|
||||
<h4>Class Members</h4>
|
||||
<p>Use the explicit visibility qualifiers <code>public</code>, <code>private</code> and <code>protected</code> for all properties instead of <code>var</code>.
|
||||
@@ -721,14 +722,14 @@ switch ($mode)
|
||||
<p class="bad">//Wrong </p>
|
||||
<div class="codebox"><pre>
|
||||
var $x;
|
||||
private static function f()
|
||||
</pre></div>
|
||||
private static function f()</pre>
|
||||
</div>
|
||||
|
||||
<p class="good">// Right </p>
|
||||
<div class="codebox"><pre>
|
||||
public $x;
|
||||
static private function f()
|
||||
</pre></div>
|
||||
static private function f()</pre>
|
||||
</div>
|
||||
|
||||
<h4>Constants</h4>
|
||||
<p>Prefer class constants over global constants created with <code>define()</code>.</p>
|
||||
@@ -748,8 +749,8 @@ $sql = 'SELECT *
|
||||
<-one tab->WHERE a = 1
|
||||
<-two tabs->AND (b = 2
|
||||
<-three tabs->OR b = 3)
|
||||
<-one tab->ORDER BY b';
|
||||
</pre></div>
|
||||
<-one tab->ORDER BY b';</pre>
|
||||
</div>
|
||||
|
||||
<p>Here the example with the tabs applied:</p>
|
||||
|
||||
@@ -759,8 +760,8 @@ $sql = 'SELECT *
|
||||
WHERE a = 1
|
||||
AND (b = 2
|
||||
OR b = 3)
|
||||
ORDER BY b';
|
||||
</pre></div>
|
||||
ORDER BY b';</pre>
|
||||
</div>
|
||||
|
||||
<h4>SQL Quotes: </h4>
|
||||
<p>Use double quotes where applicable. (The variables in these examples are typecasted to integers beforehand.) Examples: </p>
|
||||
@@ -769,16 +770,16 @@ $sql = 'SELECT *
|
||||
<div class="codebox"><pre>
|
||||
"UPDATE " . SOME_TABLE . " SET something = something_else WHERE a = $b";
|
||||
|
||||
'UPDATE ' . SOME_TABLE . ' SET something = ' . $user_id . ' WHERE a = ' . $something;
|
||||
</pre></div>
|
||||
'UPDATE ' . SOME_TABLE . ' SET something = ' . $user_id . ' WHERE a = ' . $something;</pre>
|
||||
</div>
|
||||
|
||||
<p class="good">// These are right. </p>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
'UPDATE ' . SOME_TABLE . " SET something = something_else WHERE a = $b";
|
||||
|
||||
'UPDATE ' . SOME_TABLE . " SET something = $user_id WHERE a = $something";
|
||||
</pre></div>
|
||||
'UPDATE ' . SOME_TABLE . " SET something = $user_id WHERE a = $something";</pre>
|
||||
</div>
|
||||
|
||||
<p>In other words use single quotes where no variable substitution is required or where the variable involved shouldn't appear within double quotes. Otherwise use double quotes.</p>
|
||||
|
||||
@@ -789,15 +790,15 @@ $sql = 'SELECT *
|
||||
<div class="codebox"><pre>
|
||||
$sql = 'SELECT *
|
||||
FROM ' . SOME_TABLE . '
|
||||
WHERE a != 2';
|
||||
</pre></div>
|
||||
WHERE a != 2';</pre>
|
||||
</div>
|
||||
|
||||
<p class="good">// This is right. </p>
|
||||
<div class="codebox"><pre>
|
||||
$sql = 'SELECT *
|
||||
FROM ' . SOME_TABLE . '
|
||||
WHERE a <> 2';
|
||||
</pre></div>
|
||||
WHERE a <> 2';</pre>
|
||||
</div>
|
||||
|
||||
<h4>Common DBAL methods: </h4>
|
||||
|
||||
@@ -808,8 +809,8 @@ $sql = 'SELECT *
|
||||
<div class="codebox"><pre>
|
||||
$sql = 'SELECT *
|
||||
FROM ' . SOME_TABLE . "
|
||||
WHERE username = '" . $db->sql_escape($username) . "'";
|
||||
</pre></div>
|
||||
WHERE username = '" . $db->sql_escape($username) . "'";</pre>
|
||||
</div>
|
||||
|
||||
<h4>sql_query_limit():</h4>
|
||||
|
||||
@@ -830,8 +831,8 @@ $sql_ary = array(
|
||||
'moredata' => $another_int,
|
||||
);
|
||||
|
||||
$db->sql_query('INSERT INTO ' . SOME_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
|
||||
</pre></div>
|
||||
$db->sql_query('INSERT INTO ' . SOME_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));</pre>
|
||||
</div>
|
||||
|
||||
<p>To complete the example, this is how an update statement would look like:</p>
|
||||
|
||||
@@ -845,8 +846,8 @@ $sql_ary = array(
|
||||
$sql = 'UPDATE ' . SOME_TABLE . '
|
||||
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
|
||||
WHERE user_id = ' . (int) $user_id;
|
||||
$db->sql_query($sql);
|
||||
</pre></div>
|
||||
$db->sql_query($sql);</pre>
|
||||
</div>
|
||||
|
||||
<p>The <code>$db->sql_build_array()</code> function supports the following modes: <code>INSERT</code> (example above), <code>INSERT_SELECT</code> (building query for <code>INSERT INTO table (...) SELECT value, column ...</code> statements), <code>UPDATE</code> (example above) and <code>SELECT</code> (for building WHERE statement [AND logic]).</p>
|
||||
|
||||
@@ -869,8 +870,8 @@ $sql_ary[] = array(
|
||||
'moredata' => $another_int_2,
|
||||
);
|
||||
|
||||
$db->sql_multi_insert(SOME_TABLE, $sql_ary);
|
||||
</pre></div>
|
||||
$db->sql_multi_insert(SOME_TABLE, $sql_ary);</pre>
|
||||
</div>
|
||||
|
||||
<h4>sql_in_set():</h4>
|
||||
|
||||
@@ -880,22 +881,22 @@ $db->sql_multi_insert(SOME_TABLE, $sql_ary);
|
||||
$sql = 'SELECT *
|
||||
FROM ' . FORUMS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('forum_id', $forum_ids);
|
||||
$db->sql_query($sql);
|
||||
</pre></div>
|
||||
$db->sql_query($sql);</pre>
|
||||
</div>
|
||||
|
||||
<p>Based on the number of values in $forum_ids, the query can look differently.</p>
|
||||
|
||||
<p class="good">// SQL Statement if $forum_ids = array(1, 2, 3);</p>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
SELECT FROM phpbb_forums WHERE forum_id IN (1, 2, 3)
|
||||
</pre></div>
|
||||
SELECT FROM phpbb_forums WHERE forum_id IN (1, 2, 3)</pre>
|
||||
</div>
|
||||
|
||||
<p class="good">// SQL Statement if $forum_ids = array(1) or $forum_ids = 1</p>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
SELECT FROM phpbb_forums WHERE forum_id = 1
|
||||
</pre></div>
|
||||
SELECT FROM phpbb_forums WHERE forum_id = 1</pre>
|
||||
</div>
|
||||
|
||||
<p>Of course the same is possible for doing a negative match against a number of values:</p>
|
||||
|
||||
@@ -903,22 +904,22 @@ SELECT FROM phpbb_forums WHERE forum_id = 1
|
||||
$sql = 'SELECT *
|
||||
FROM ' . FORUMS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('forum_id', $forum_ids, <strong>true</strong>);
|
||||
$db->sql_query($sql);
|
||||
</pre></div>
|
||||
$db->sql_query($sql);</pre>
|
||||
</div>
|
||||
|
||||
<p>Based on the number of values in $forum_ids, the query can look differently here too.</p>
|
||||
|
||||
<p class="good">// SQL Statement if $forum_ids = array(1, 2, 3);</p>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
SELECT FROM phpbb_forums WHERE forum_id <strong>NOT</strong> IN (1, 2, 3)
|
||||
</pre></div>
|
||||
SELECT FROM phpbb_forums WHERE forum_id <strong>NOT</strong> IN (1, 2, 3)</pre>
|
||||
</div>
|
||||
|
||||
<p class="good">// SQL Statement if $forum_ids = array(1) or $forum_ids = 1</p>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
SELECT FROM phpbb_forums WHERE forum_id <strong><></strong> 1
|
||||
</pre></div>
|
||||
SELECT FROM phpbb_forums WHERE forum_id <strong><></strong> 1</pre>
|
||||
</div>
|
||||
|
||||
<p>If the given array is empty, an error will be produced.</p>
|
||||
|
||||
@@ -948,8 +949,8 @@ $sql_array = array(
|
||||
'ORDER_BY' => 'left_id',
|
||||
);
|
||||
|
||||
$sql = $db->sql_build_query('SELECT', $sql_array);
|
||||
</pre></div>
|
||||
$sql = $db->sql_build_query('SELECT', $sql_array);</pre>
|
||||
</div>
|
||||
|
||||
<p>The possible first parameter for sql_build_query() is SELECT or SELECT_DISTINCT. As you can see, the logic is pretty self-explaining. For the LEFT_JOIN key, just add another array if you want to join on to tables for example. The added benefit of using this construct is that you are able to easily build the query statement based on conditions - for example the above LEFT_JOIN is only necessary if server side topic tracking is enabled; a slight adjustement would be:</p>
|
||||
|
||||
@@ -984,8 +985,8 @@ else
|
||||
// Here we read the cookie data
|
||||
}
|
||||
|
||||
$sql = $db->sql_build_query('SELECT', $sql_array);
|
||||
</pre></div>
|
||||
$sql = $db->sql_build_query('SELECT', $sql_array);</pre>
|
||||
</div>
|
||||
|
||||
<a name="optimizing"></a><h3>2.iv. Optimizations</h3>
|
||||
|
||||
@@ -997,16 +998,16 @@ $sql = $db->sql_build_query('SELECT', $sql_array);
|
||||
for ($i = 0; $i < sizeof($post_data); $i++)
|
||||
{
|
||||
do_something();
|
||||
}
|
||||
</pre></div>
|
||||
}</pre>
|
||||
</div>
|
||||
|
||||
<p class="good">// You are able to assign the (not changing) result within the loop itself</p>
|
||||
<div class="codebox"><pre>
|
||||
for ($i = 0, $size = sizeof($post_data); $i < $size; $i++)
|
||||
{
|
||||
do_something();
|
||||
}
|
||||
</pre></div>
|
||||
}</pre>
|
||||
</div>
|
||||
|
||||
<h4>Use of in_array(): </h4>
|
||||
<p>Try to avoid using in_array() on huge arrays, and try to not place them into loops if the array to check consist of more than 20 entries. in_array() can be very time consuming and uses a lot of cpu processing time. For little checks it is not noticeable, but if checked against a huge array within a loop those checks alone can take several seconds. If you need this functionality, try using isset() on the arrays keys instead, actually shifting the values into keys and vice versa. A call to <code>isset($array[$var])</code> is a lot faster than <code>in_array($var, array_keys($array))</code> for example.</p>
|
||||
@@ -1028,29 +1029,29 @@ for ($i = 0, $size = sizeof($post_data); $i < $size; $i++)
|
||||
<p class="bad">// Old method, do not use it</p>
|
||||
<div class="codebox"><pre>
|
||||
$start = (isset($HTTP_GET_VARS['start'])) ? intval($HTTP_GET_VARS['start']) : intval($HTTP_POST_VARS['start']);
|
||||
$submit = (isset($HTTP_POST_VARS['submit'])) ? true : false;
|
||||
</pre></div>
|
||||
$submit = (isset($HTTP_POST_VARS['submit'])) ? true : false;</pre>
|
||||
</div>
|
||||
|
||||
<p class="good">// Use request var and define a default variable (use the correct type)</p>
|
||||
<div class="codebox"><pre>
|
||||
$start = $request->variable('start', 0);
|
||||
$submit = $request->is_set_post('submit');
|
||||
</pre></div>
|
||||
$submit = $request->is_set_post('submit');</pre>
|
||||
</div>
|
||||
|
||||
<p class="bad">// $start is an int, the following use of $request->variable() therefore is not allowed</p>
|
||||
<div class="codebox"><pre>
|
||||
$start = $request->variable('start', '0');
|
||||
</pre></div>
|
||||
$start = $request->variable('start', '0');</pre>
|
||||
</div>
|
||||
|
||||
<p class="good">// Getting an array, keys are integers, value defaults to 0</p>
|
||||
<div class="codebox"><pre>
|
||||
$mark_array = $request->variable('mark', array(0));
|
||||
</pre></div>
|
||||
$mark_array = $request->variable('mark', array(0));</pre>
|
||||
</div>
|
||||
|
||||
<p class="good">// Getting an array, keys are strings, value defaults to 0</p>
|
||||
<div class="codebox"><pre>
|
||||
$action_ary = $request->variable('action', array('' => 0));
|
||||
</pre></div>
|
||||
$action_ary = $request->variable('action', array('' => 0));</pre>
|
||||
</div>
|
||||
|
||||
<h4>Login checks/redirection: </h4>
|
||||
<p>To show a forum login box use <code>login_forum_box($forum_data)</code>, else use the <code>login_box()</code> function.</p>
|
||||
@@ -1073,8 +1074,8 @@ $action_ary = $request->variable('action', array('' => 0));
|
||||
{
|
||||
trigger_error('FORM_INVALID');
|
||||
}
|
||||
}
|
||||
</pre></div>
|
||||
}</pre>
|
||||
</div>
|
||||
|
||||
<p>The string passed to <code>add_form_key()</code> needs to match the string passed to <code>check_form_key()</code>. Another requirement for this to work correctly is that all forms include the <code>{S_FORM_TOKEN}</code> template variable.</p>
|
||||
|
||||
@@ -1085,8 +1086,8 @@ $action_ary = $request->variable('action', array('' => 0));
|
||||
<div class="codebox"><pre>
|
||||
$user->session_begin();
|
||||
$auth->acl($user->data);
|
||||
$user->setup();
|
||||
</pre></div>
|
||||
$user->setup();</pre>
|
||||
</div>
|
||||
|
||||
<p>The <code>$user->setup()</code> call can be used to pass on additional language definition and a custom style (used in viewforum).</p>
|
||||
|
||||
@@ -1094,16 +1095,16 @@ $user->setup();
|
||||
<p>All messages/errors should be outputted by calling <code>trigger_error()</code> using the appropriate message type and language string. Example:</p>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
trigger_error('NO_FORUM');
|
||||
</pre></div>
|
||||
trigger_error('NO_FORUM');</pre>
|
||||
</div>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
trigger_error($user->lang['NO_FORUM']);
|
||||
</pre></div>
|
||||
trigger_error($user->lang['NO_FORUM']);</pre>
|
||||
</div>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
trigger_error('NO_MODE', E_USER_ERROR);
|
||||
</pre></div>
|
||||
trigger_error('NO_MODE', E_USER_ERROR);</pre>
|
||||
</div>
|
||||
|
||||
<h4>Url formatting</h4>
|
||||
|
||||
@@ -1112,8 +1113,8 @@ trigger_error('NO_MODE', E_USER_ERROR);
|
||||
<p>The <code>append_sid()</code> function from 2.0.x is available too, though it does not handle url alterations automatically. Please have a look at the code documentation if you want to get more details on how to use append_sid(). A sample call to append_sid() can look like this:</p>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;g=' . $row['group_id'])
|
||||
</pre></div>
|
||||
append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;g=' . $row['group_id'])</pre>
|
||||
</div>
|
||||
|
||||
<h4>General function usage: </h4>
|
||||
|
||||
@@ -1169,14 +1170,14 @@ append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<a name="styling"></a><h2>3. Styling</h2>
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
<a name="cfgfiles"></a><h3>3.i. Style Config Files</h3>
|
||||
@@ -1193,8 +1194,8 @@ phpbb_version = 3.1.0
|
||||
|
||||
# Parent style
|
||||
# Set value to empty or to this style's name if this style does not have a parent style
|
||||
parent = prosilver
|
||||
</pre></div>
|
||||
parent = prosilver</pre>
|
||||
</div>
|
||||
<a name="genstyling"></a><h3>3.2. General Styling Rules</h3>
|
||||
<p>Templates should be produced in a consistent manner. Where appropriate they should be based off an existing copy, e.g. index, viewforum or viewtopic (the combination of which implement a range of conditional and variable forms). Please also note that the indentation and coding guidelines also apply to templates where possible.</p>
|
||||
|
||||
@@ -1252,14 +1253,14 @@ parent = prosilver
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<a name="templating"></a><h2>4. Templating</h2>
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
<a name="templates"></a><h3>4.i. General Templating</h3>
|
||||
@@ -1748,7 +1749,7 @@ This may span multiple lines.
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -1758,7 +1759,7 @@ This may span multiple lines.
|
||||
<a name="charsets"></a><h2>5. Character Sets and Encodings</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -1821,7 +1822,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -1829,7 +1830,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
|
||||
<a name="translation"></a><h2>6. Translation (<abbr title="Internationalisation">i18n</abbr>/<abbr title="Localisation">L10n</abbr>) Guidelines</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -2356,8 +2357,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
|
||||
'PAGE_OF' => 'Page %s of %s',
|
||||
/* Just grabbing the replacements as they
|
||||
come and hope they are in the right order */
|
||||
...
|
||||
</pre></div>
|
||||
...</pre>
|
||||
</div>
|
||||
|
||||
<p>… a clearer way to show explicit replacement ordering is to do:</p>
|
||||
|
||||
@@ -2366,8 +2367,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
|
||||
'PAGE_OF' => 'Page %1$s of %2$s',
|
||||
/* Explicit ordering of the replacements,
|
||||
even if they are the same order as English */
|
||||
...
|
||||
</pre></div>
|
||||
...</pre>
|
||||
</div>
|
||||
|
||||
<p>Why bother at all? Because some languages, the string transliterated back to English might read something like:</p>
|
||||
|
||||
@@ -2376,8 +2377,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
|
||||
'PAGE_OF' => 'Total of %2$s pages, currently on page %1$s',
|
||||
/* Explicit ordering of the replacements,
|
||||
reversed compared to English as the total comes first */
|
||||
...
|
||||
</pre></div>
|
||||
...</pre>
|
||||
</div>
|
||||
|
||||
<a name="usingplurals"></a><h3>6.iv. Using plurals</h3>
|
||||
|
||||
@@ -2395,8 +2396,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
|
||||
<div class="codebox"><pre>
|
||||
...
|
||||
$user->lang('NUMBER_OF_ELEPHANTS', $number_of_elephants);
|
||||
...
|
||||
</pre></div>
|
||||
...</pre>
|
||||
</div>
|
||||
|
||||
<p>And the English translation would be:</p>
|
||||
|
||||
@@ -2407,8 +2408,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
|
||||
1 => 'You have 1 elephant', // Singular
|
||||
2 => 'You have %d elephants', // Plural
|
||||
),
|
||||
...
|
||||
</pre></div>
|
||||
...</pre>
|
||||
</div>
|
||||
|
||||
<p>While the Bosnian translation can have more cases:</p>
|
||||
|
||||
@@ -2420,16 +2421,16 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
|
||||
2 => 'You have %d slona', // Used for 5, 6,
|
||||
3 => ...
|
||||
),
|
||||
...
|
||||
</pre></div>
|
||||
...</pre>
|
||||
</div>
|
||||
|
||||
<p><strong>NOTE:</strong> It is okay to use plurals for an unknown number compared to a single item, when the number is not known and displayed:</p>
|
||||
<div class="codebox"><pre>
|
||||
...
|
||||
'MODERATOR' => 'Moderator', // Your board has 1 moderator
|
||||
'MODERATORS' => 'Moderators', // Your board has multiple moderators
|
||||
...
|
||||
</pre></div>
|
||||
...</pre>
|
||||
</div>
|
||||
|
||||
<a name="writingstyle"></a><h3>6.v. Writing Style</h3>
|
||||
|
||||
@@ -2443,8 +2444,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
|
||||
...
|
||||
'CONV_ERROR_NO_AVATAR_PATH'
|
||||
=> 'Note to developer: you must specify $convertor['avatar_path'] to use %s.',
|
||||
...
|
||||
</pre></div>
|
||||
...</pre>
|
||||
</div>
|
||||
|
||||
<p class="good">// Good - Literal straight quotes should be escaped with a backslash, ie: \</p>
|
||||
|
||||
@@ -2452,8 +2453,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
|
||||
...
|
||||
'CONV_ERROR_NO_AVATAR_PATH'
|
||||
=> 'Note to developer: you must specify $convertor[\'avatar_path\'] to use %s.',
|
||||
...
|
||||
</pre></div>
|
||||
...</pre>
|
||||
</div>
|
||||
|
||||
<p>However, because phpBB3 now uses UTF-8 as its sole encoding, we can actually use this to our advantage and not have to remember to escape a straight quote when we don't have to:</p>
|
||||
|
||||
@@ -2462,24 +2463,24 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
|
||||
<div class="codebox"><pre>
|
||||
...
|
||||
'USE_PERMISSIONS' => 'Test out user's permissions',
|
||||
...
|
||||
</pre></div>
|
||||
...</pre>
|
||||
</div>
|
||||
|
||||
<p class="good">// Okay - However, non-programmers wouldn't type "user\'s" automatically</p>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
...
|
||||
'USE_PERMISSIONS' => 'Test out user\'s permissions',
|
||||
...
|
||||
</pre></div>
|
||||
...</pre>
|
||||
</div>
|
||||
|
||||
<p class="good">// Best - Use the Unicode Right-Single-Quotation-Mark character</p>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
...
|
||||
'USE_PERMISSIONS' => 'Test out user’s permissions',
|
||||
...
|
||||
</pre></div>
|
||||
...</pre>
|
||||
</div>
|
||||
|
||||
<p>The <code>"</code> (straight double quote), <code><</code> (less-than sign) and <code>></code> (greater-than sign) characters can all be used as displayed glyphs or as part of HTML markup, for example:</p>
|
||||
|
||||
@@ -2489,8 +2490,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
|
||||
...
|
||||
'FOO_BAR' => 'PHP version < 5.3.3.<br />
|
||||
Visit "Downloads" at <a href="http://www.php.net/">www.php.net</a>.',
|
||||
...
|
||||
</pre></div>
|
||||
...</pre>
|
||||
</div>
|
||||
|
||||
<p class="good">// Okay - No more invalid HTML, but "&quot;" is rather clumsy</p>
|
||||
|
||||
@@ -2498,8 +2499,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
|
||||
...
|
||||
'FOO_BAR' => 'PHP version &lt; 5.3.3.<br />
|
||||
Visit &quot;Downloads&quot; at <a href="http://www.php.net/">www.php.net</a>.',
|
||||
...
|
||||
</pre></div>
|
||||
...</pre>
|
||||
</div>
|
||||
|
||||
<p class="good">// Best - No more invalid HTML, and usage of correct typographical quotation marks</p>
|
||||
|
||||
@@ -2507,8 +2508,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
|
||||
...
|
||||
'FOO_BAR' => 'PHP version &lt; 5.3.3.<br />
|
||||
Visit “Downloads” at <a href="http://www.php.net/">www.php.net</a>.',
|
||||
...
|
||||
</pre></div>
|
||||
...</pre>
|
||||
</div>
|
||||
|
||||
<p>Lastly, the <code>&</code> (ampersand) must always be entitised regardless of where it is used:</p>
|
||||
|
||||
@@ -2517,16 +2518,16 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
|
||||
<div class="codebox"><pre>
|
||||
...
|
||||
'FOO_BAR' => '<a href="http://somedomain.tld/?foo=1&bar=2">Foo & Bar</a>.',
|
||||
...
|
||||
</pre></div>
|
||||
...</pre>
|
||||
</div>
|
||||
|
||||
<p class="good">// Good - Valid HTML, amperands are correctly entitised in all cases</p>
|
||||
|
||||
<div class="codebox"><pre>
|
||||
...
|
||||
'FOO_BAR' => '<a href="http://somedomain.tld/?foo=1&amp;bar=2">Foo &amp; Bar</a>.',
|
||||
...
|
||||
</pre></div>
|
||||
...</pre>
|
||||
</div>
|
||||
|
||||
<p>As for how these charcters are entered depends very much on choice of Operating System, current language locale/keyboard configuration and native abilities of the text editor used to edit phpBB language files. Please see <a href="http://en.wikipedia.org/wiki/Unicode#Input_methods">http://en.wikipedia.org/wiki/Unicode#Input_methods</a> for more information.</p>
|
||||
|
||||
@@ -2538,7 +2539,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
@@ -2546,7 +2547,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
|
||||
<a name="disclaimer"></a><h2>7. Copyright and disclaimer</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
|
||||
@@ -2556,7 +2557,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
|
||||
|
||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- END DOCUMENT -->
|
||||
|
Before Width: | Height: | Size: 55 B |
Before Width: | Height: | Size: 195 B |
Before Width: | Height: | Size: 56 B |
Before Width: | Height: | Size: 201 B |
@@ -16,11 +16,59 @@ acp_bbcodes_edit_fieldsets_after
|
||||
* Since: 3.1.0-a3
|
||||
* Purpose: Add settings to BBCode add/edit form
|
||||
|
||||
acp_email_options_after
|
||||
===
|
||||
* Location: adm/style/acp_email.html
|
||||
* Since: 3.1.2-RC1
|
||||
* Purpose: Add settings to mass email form
|
||||
|
||||
acp_forums_main_settings_append
|
||||
===
|
||||
* Location: adm/style/acp_forums.html
|
||||
* Since: 3.1.2-RC1
|
||||
* Purpose: Add settings to forums at end of main settings section
|
||||
|
||||
acp_forums_main_settings_prepend
|
||||
===
|
||||
* Location: adm/style/acp_forums.html
|
||||
* Since: 3.1.2-RC1
|
||||
* Purpose: Add settings to forums before main settings section
|
||||
|
||||
acp_forums_normal_settings_append
|
||||
===
|
||||
* Location: adm/style/acp_forums.html
|
||||
* Since: 3.1.0-a1
|
||||
* Purpose: Add settings to forums
|
||||
* Purpose: Add settings to forums at end of normal settings section
|
||||
|
||||
acp_forums_normal_settings_prepend
|
||||
===
|
||||
* Location: adm/style/acp_forums.html
|
||||
* Since: 3.1.2-RC1
|
||||
* Purpose: Add settings to forums before normal settings section
|
||||
|
||||
acp_forums_prune_settings_append
|
||||
===
|
||||
* Location: adm/style/acp_forums.html
|
||||
* Since: 3.1.2-RC1
|
||||
* Purpose: Add settings to forums at end of prune settings section
|
||||
|
||||
acp_forums_prune_settings_prepend
|
||||
===
|
||||
* Location: adm/style/acp_forums.html
|
||||
* Since: 3.1.2-RC1
|
||||
* Purpose: Add settings to forums before prune settings section
|
||||
|
||||
acp_forums_rules_settings_append
|
||||
===
|
||||
* Location: adm/style/acp_forums.html
|
||||
* Since: 3.1.2-RC1
|
||||
* Purpose: Add settings to forums at end of rules settings section
|
||||
|
||||
acp_forums_rules_settings_prepend
|
||||
===
|
||||
* Location: adm/style/acp_forums.html
|
||||
* Since: 3.1.2-RC1
|
||||
* Purpose: Add settings to forums before rules settings section
|
||||
|
||||
acp_group_options_before
|
||||
===
|
||||
@@ -111,7 +159,7 @@ acp_ranks_list_column_before
|
||||
* Locations:
|
||||
+ adm/style/acp_ranks.html
|
||||
* Since: 3.1.0-RC3
|
||||
* Purpose: Add content after the last column (but before the action column)
|
||||
* Purpose: Add content after the last column (but before the action column)
|
||||
in the ranks list in the ACP
|
||||
|
||||
acp_ranks_list_header_after
|
||||
@@ -126,9 +174,30 @@ acp_ranks_list_header_before
|
||||
* Locations:
|
||||
+ adm/style/acp_ranks.html
|
||||
* Since: 3.1.0-RC3
|
||||
* Purpose: Add content after the last header-column (but before the action column)
|
||||
* Purpose: Add content after the last header-column (but before the action column)
|
||||
in the ranks list in the ACP
|
||||
|
||||
acp_users_profile_before
|
||||
===
|
||||
* Locations:
|
||||
+ adm/style/acp_users_profile.html
|
||||
* Since: 3.1.4-RC1
|
||||
* Purpose: Add content before the profile details when editing a user in the ACP
|
||||
|
||||
acp_users_profile_after
|
||||
===
|
||||
* Locations:
|
||||
+ adm/style/acp_users_profile.html
|
||||
* Since: 3.1.4-RC1
|
||||
* Purpose: Add content after the profile details but before the custom profile fields when editing a user in the ACP
|
||||
|
||||
acp_users_profile_custom_after
|
||||
===
|
||||
* Locations:
|
||||
+ adm/style/acp_users_profile.html
|
||||
* Since: 3.1.4-RC1
|
||||
* Purpose: Add content after the the custom profile fields when editing a user in the ACP
|
||||
|
||||
acp_simple_footer_after
|
||||
===
|
||||
* Location: adm/style/simple_footer.html
|
||||
@@ -224,6 +293,38 @@ forumlist_body_category_header_before
|
||||
* Since: 3.1.0-a4
|
||||
* Purpose: Add content before the header of the category on the forum list.
|
||||
|
||||
forumlist_body_forum_row_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/forumlist_body.html
|
||||
+ styles/subsilver2/template/forumlist_body.html
|
||||
* Since: 3.1.0-RC5
|
||||
* Purpose: Add content after the forum list item.
|
||||
|
||||
forumlist_body_forum_row_append
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/forumlist_body.html
|
||||
+ styles/subsilver2/template/forumlist_body.html
|
||||
* Since: 3.1.0-RC5
|
||||
* Purpose: Add content at the start of the forum list item.
|
||||
|
||||
forumlist_body_forum_row_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/forumlist_body.html
|
||||
+ styles/subsilver2/template/forumlist_body.html
|
||||
* Since: 3.1.0-RC5
|
||||
* Purpose: Add content before the forum list item.
|
||||
|
||||
forumlist_body_forum_row_prepend
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/forumlist_body.html
|
||||
+ styles/subsilver2/template/forumlist_body.html
|
||||
* Since: 3.1.0-RC5
|
||||
* Purpose: Add content at the end of the forum list item.
|
||||
|
||||
forumlist_body_last_post_title_prepend
|
||||
===
|
||||
* Locations:
|
||||
@@ -304,6 +405,14 @@ index_body_block_stats_prepend
|
||||
* Since: 3.1.0-b3
|
||||
* Purpose: Prepend content to the statistics list on the Board index
|
||||
|
||||
index_body_forumlist_body_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/index_body.html
|
||||
+ styles/subsilver2/template/index_body.html
|
||||
* Since: 3.1.1
|
||||
* Purpose: Add content after the forum list body on the index page
|
||||
|
||||
index_body_markforums_after
|
||||
===
|
||||
* Locations:
|
||||
@@ -368,6 +477,46 @@ mcp_ban_unban_before
|
||||
* Since: 3.1.0-RC3
|
||||
* Purpose: Add additional fields to the unban form in MCP
|
||||
|
||||
mcp_front_latest_logs_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/mcp_front.html
|
||||
+ styles/subsilver2/template/mcp_front.html
|
||||
* Since: 3.1.3-RC1
|
||||
* Purpose: Add content after latest logs list
|
||||
|
||||
mcp_front_latest_logs_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/mcp_front.html
|
||||
+ styles/subsilver2/template/mcp_front.html
|
||||
* Since: 3.1.3-RC1
|
||||
* Purpose: Add content before latest logs list
|
||||
|
||||
mcp_front_latest_reported_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/mcp_front.html
|
||||
+ styles/subsilver2/template/mcp_front.html
|
||||
* Since: 3.1.3-RC1
|
||||
* Purpose: Add content before latest reported posts list
|
||||
|
||||
mcp_front_latest_reported_pms_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/mcp_front.html
|
||||
+ styles/subsilver2/template/mcp_front.html
|
||||
* Since: 3.1.3-RC1
|
||||
* Purpose: Add content before latest reported private messages list
|
||||
|
||||
mcp_front_latest_unapproved_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/mcp_front.html
|
||||
+ styles/subsilver2/template/mcp_front.html
|
||||
* Since: 3.1.3-RC1
|
||||
* Purpose: Add content before latest unapproved posts list
|
||||
|
||||
memberlist_body_username_append
|
||||
===
|
||||
* Locations:
|
||||
@@ -386,6 +535,30 @@ memberlist_body_username_prepend
|
||||
* Purpose: Add information before every username in the memberlist. Works in
|
||||
all display modes (leader, group and normal memberlist).
|
||||
|
||||
memberlist_search_fields_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/memberlist_search.html
|
||||
+ styles/subsilver2/template/memberlist_search.html
|
||||
* Since: 3.1.2-RC1
|
||||
* Purpose: Add information after the search fields column.
|
||||
|
||||
memberlist_search_fields_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/memberlist_search.html
|
||||
+ styles/subsilver2/template/memberlist_search.html
|
||||
* Since: 3.1.2-RC1
|
||||
* Purpose: Add information before the search fields column.
|
||||
|
||||
memberlist_search_sorting_options_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/memberlist_search.html
|
||||
+ styles/subsilver2/template/memberlist_search.html
|
||||
* Since: 3.1.2-RC1
|
||||
* Purpose: Add information before the search sorting options field.
|
||||
|
||||
memberlist_view_contact_after
|
||||
===
|
||||
* Locations:
|
||||
@@ -523,6 +696,14 @@ overall_footer_after
|
||||
* Since: 3.1.0-a1
|
||||
* Purpose: Add content at the end of the file, directly prior to the `</body>` tag
|
||||
|
||||
overall_footer_body_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/overall_footer.html
|
||||
+ styles/subsilver2/template/overall_footer.html
|
||||
* Since: 3.1.3-RC1
|
||||
* Purpose: Add content before the `</body>` tag but after the $SCRIPTS var, i.e. after the js scripts have been loaded
|
||||
|
||||
overall_footer_breadcrumb_append
|
||||
===
|
||||
* Locations:
|
||||
@@ -659,6 +840,14 @@ overall_header_head_append
|
||||
* Since: 3.1.0-a1
|
||||
* Purpose: Add asset calls directly before the `</head>` tag
|
||||
|
||||
overall_header_navbar_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/overall_header.html
|
||||
+ styles/subsilver2/template/overall_header.html
|
||||
* Since: 3.1.4-RC1
|
||||
* Purpose: Add content before the navigation bar
|
||||
|
||||
overall_header_navigation_append
|
||||
===
|
||||
* Locations:
|
||||
@@ -699,6 +888,13 @@ overall_header_page_body_before
|
||||
* Since: 3.1.0-b3
|
||||
* Purpose: Add content after the page-header, but before the page-body
|
||||
|
||||
overall_header_searchbox_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/overall_header.html
|
||||
* Since: 3.1.4-RC1
|
||||
* Purpose: Add content before the search box in the header
|
||||
|
||||
overall_header_stylesheets_after
|
||||
===
|
||||
* Locations:
|
||||
@@ -708,6 +904,14 @@ overall_header_stylesheets_after
|
||||
* Purpose: Add asset calls after stylesheets within the `</head>` tag.
|
||||
Note that INCLUDECSS will not work with this event.
|
||||
|
||||
posting_editor_bbcode_status_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/posting_editor.html
|
||||
+ styles/subsilver2/template/posting_body.html
|
||||
* Since: 3.1.4-RC1
|
||||
* Purpose: Add content after bbcode status
|
||||
|
||||
posting_editor_buttons_after
|
||||
===
|
||||
* Locations:
|
||||
@@ -724,6 +928,14 @@ posting_editor_buttons_before
|
||||
* Since: 3.1.0-a3
|
||||
* Purpose: Add content before the BBCode posting buttons
|
||||
|
||||
posting_editor_buttons_custom_tags_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/posting_buttons.html
|
||||
+ styles/subsilver2/template/posting_buttons.html
|
||||
* Since: 3.1.2-RC1
|
||||
* Purpose: Add content inside the BBCode posting buttons and before the customs BBCode
|
||||
|
||||
posting_editor_message_after
|
||||
===
|
||||
* Locations:
|
||||
@@ -748,6 +960,22 @@ posting_editor_options_prepend
|
||||
* Since: 3.1.0-a1
|
||||
* Purpose: Add posting options on the posting screen
|
||||
|
||||
posting_editor_smilies_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/posting_editor.html
|
||||
+ styles/subsilver2/template/posting_body.html
|
||||
* Since: 3.1.4-RC1
|
||||
* Purpose: Add content after smilies
|
||||
|
||||
posting_editor_smilies_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/posting_editor.html
|
||||
+ styles/subsilver2/template/posting_body.html
|
||||
* Since: 3.1.4-RC1
|
||||
* Purpose: Add content before the smilies
|
||||
|
||||
posting_editor_subject_after
|
||||
===
|
||||
* Locations:
|
||||
@@ -780,6 +1008,28 @@ posting_pm_header_find_username_before
|
||||
* Since: 3.1.0-RC4
|
||||
* Purpose: Add content before the find username link on composing pm
|
||||
|
||||
posting_pm_layout_include_pm_header_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/posting_pm_layout.html
|
||||
* Since: 3.1.4-RC1
|
||||
* Purpose: Add content after the include of posting_pm_header.html
|
||||
|
||||
posting_pm_layout_include_pm_header_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/posting_pm_layout.html
|
||||
* Since: 3.1.4-RC1
|
||||
* Purpose: Add content before the include of posting_pm_header.html
|
||||
|
||||
posting_poll_body_options_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/posting_poll_body.html
|
||||
+ styles/subsilver2/template/posting_poll_body.html
|
||||
* Since: 3.1.4-RC1
|
||||
* Purpose: Add content after the poll options on creating a poll
|
||||
|
||||
quickreply_editor_panel_after
|
||||
===
|
||||
* Locations:
|
||||
@@ -812,6 +1062,22 @@ quickreply_editor_message_before
|
||||
* Since: 3.1.0-a4
|
||||
* Purpose: Add content before the quick reply textbox
|
||||
|
||||
search_results_header_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/search_results.html
|
||||
+ styles/subsilver2/template/search_results.html
|
||||
* Since: 3.1.4-RC1
|
||||
* Purpose: Add content after the header of the search results
|
||||
|
||||
search_results_header_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/search_results.html
|
||||
+ styles/subsilver2/template/search_results.html
|
||||
* Since: 3.1.4-RC1
|
||||
* Purpose: Add content before the header of the search results.
|
||||
|
||||
search_results_post_after
|
||||
===
|
||||
* Locations:
|
||||
@@ -842,6 +1108,14 @@ search_results_postprofile_before
|
||||
* Since: 3.1.0-b3
|
||||
* Purpose: Add content directly before the post author in search results (posts view mode)
|
||||
|
||||
search_results_searchbox_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/search_results.html
|
||||
+ styles/subsilver2/template/search_results.html
|
||||
* Since: 3.1.4-RC1
|
||||
* Purpose: Add content right after the searchbox of the search results.
|
||||
|
||||
search_results_topic_after
|
||||
===
|
||||
* Locations:
|
||||
@@ -979,7 +1253,7 @@ ucp_pm_viewmessage_post_buttons_after
|
||||
+ styles/prosilver/template/ucp_pm_viewmessage.html
|
||||
+ styles/subsilver2/template/ucp_pm_viewmessage.html
|
||||
* Since: 3.1.0-RC3
|
||||
* Purpose: Add post button to private messages (next to edit, quote etc), at
|
||||
* Purpose: Add post button to private messages (next to edit, quote etc), at
|
||||
the end of the list.
|
||||
|
||||
ucp_pm_viewmessage_post_buttons_before
|
||||
@@ -988,7 +1262,7 @@ ucp_pm_viewmessage_post_buttons_before
|
||||
+ styles/prosilver/template/ucp_pm_viewmessage.html
|
||||
+ styles/subsilver2/template/ucp_pm_viewmessage.html
|
||||
* Since: 3.1.0-RC3
|
||||
* Purpose: Add post button to private messages (next to edit, quote etc), at
|
||||
* Purpose: Add post button to private messages (next to edit, quote etc), at
|
||||
the start of the list.
|
||||
|
||||
ucp_pm_viewmessage_print_head_append
|
||||
@@ -1067,6 +1341,38 @@ ucp_prefs_view_select_menu_append
|
||||
* Purpose: Add options to the bottom of the drop-down lists block of the Edit
|
||||
Display Options screen
|
||||
|
||||
ucp_profile_profile_info_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/ucp_profile_profile_info.html
|
||||
+ styles/subsilver2/template/ucp_profile_profile_info.html
|
||||
* Since: 3.1.4-RC1
|
||||
* Purpose: Add options in profile page fieldset - before jabber field.
|
||||
|
||||
ucp_profile_profile_info_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/ucp_profile_profile_info.html
|
||||
+ styles/subsilver2/template/ucp_profile_profile_info.html
|
||||
* Since: 3.1.4-RC1
|
||||
* Purpose: Add options in profile page fieldset - after custom profile fields.
|
||||
|
||||
ucp_profile_register_details_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/ucp_profile_reg_details.html
|
||||
+ styles/subsilver2/template/ucp_profile_reg_details.html
|
||||
* Since: 3.1.4-RC1
|
||||
* Purpose: Add options in profile page fieldset - before first field.
|
||||
|
||||
ucp_profile_register_details_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/ucp_profile_reg_details.html
|
||||
+ styles/subsilver2/template/ucp_profile_reg_details.html
|
||||
* Since: 3.1.4-RC1
|
||||
* Purpose: Add options in profile page fieldset - after confirm password field.
|
||||
|
||||
ucp_register_credentials_before
|
||||
===
|
||||
* Locations:
|
||||
@@ -1123,6 +1429,70 @@ ucp_friend_list_after
|
||||
* Since: 3.1.0-a4
|
||||
* Purpose: Add optional elements after list of friends in UCP
|
||||
|
||||
viewforum_buttons_bottom_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/viewforum_body.html
|
||||
+ styles/subsilver2/template/viewforum_body.html
|
||||
* Since: 3.1.0-RC5
|
||||
* Purpose: Add buttons before New Topic button on the bottom of the topic's list
|
||||
|
||||
viewforum_buttons_bottom_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/viewforum_body.html
|
||||
+ styles/subsilver2/template/viewforum_body.html
|
||||
* Since: 3.1.0-RC5
|
||||
* Purpose: Add buttons after New Topic button on the bottom of the topic's list
|
||||
|
||||
viewforum_buttons_top_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/viewforum_body.html
|
||||
+ styles/subsilver2/template/viewforum_body.html
|
||||
* Since: 3.1.0-RC5
|
||||
* Purpose: Add buttons before New Topic button on the top of the topic's list
|
||||
|
||||
viewforum_buttons_top_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/viewforum_body.html
|
||||
+ styles/subsilver2/template/viewforum_body.html
|
||||
* Since: 3.1.0-RC5
|
||||
* Purpose: Add buttons after New Topic button on the top of the topic's list
|
||||
|
||||
viewtopic_buttons_bottom_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/viewtopic_body.html
|
||||
+ styles/subsilver2/template/viewtopic_body.html
|
||||
* Since: 3.1.0-RC5
|
||||
* Purpose: Add buttons before Post Reply button on the bottom of the posts's list
|
||||
|
||||
viewtopic_buttons_bottom_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/viewtopic_body.html
|
||||
+ styles/subsilver2/template/viewtopic_body.html
|
||||
* Since: 3.1.0-RC5
|
||||
* Purpose: Add buttons after Post Reply button on the bottom of the posts's list
|
||||
|
||||
viewtopic_buttons_top_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/viewtopic_body.html
|
||||
+ styles/subsilver2/template/viewtopic_body.html
|
||||
* Since: 3.1.0-RC5
|
||||
* Purpose: Add buttons before Post Reply button on the top of the posts's list
|
||||
|
||||
viewtopic_buttons_top_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/viewtopic_body.html
|
||||
+ styles/subsilver2/template/viewtopic_body.html
|
||||
* Since: 3.1.0-RC5
|
||||
* Purpose: Add buttons after Post Reply button on the top of the posts's list
|
||||
|
||||
viewforum_forum_name_append
|
||||
===
|
||||
* Locations:
|
||||
@@ -1147,6 +1517,14 @@ viewtopic_print_head_append
|
||||
* Since: 3.1.0-a1
|
||||
* Purpose: Add asset calls directly before the `</head>` tag of the Print Topic screen
|
||||
|
||||
viewtopic_body_pagination_top_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/viewtopic_body.html
|
||||
+ styles/subsilver2/template/viewtopic_body.html
|
||||
* Since: 3.1.4-RC1
|
||||
* Purpose: Add content after the pagination at top
|
||||
|
||||
viewtopic_body_avatar_after
|
||||
===
|
||||
* Locations:
|
||||
@@ -1223,6 +1601,22 @@ viewtopic_body_poll_question_prepend
|
||||
* Since: 3.1.0-b3
|
||||
* Purpose: Add content directly before the poll question on the View topic screen
|
||||
|
||||
viewtopic_body_post_author_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/viewtopic_body.html
|
||||
+ styles/subsilver2/template/viewtopic_body.html
|
||||
* Since: 3.1.3-RC1
|
||||
* Purpose: Add content directly after the post author on the view topic screen
|
||||
|
||||
viewtopic_body_post_author_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/viewtopic_body.html
|
||||
+ styles/subsilver2/template/viewtopic_body.html
|
||||
* Since: 3.1.3-RC1
|
||||
* Purpose: Add content directly before the post author on the view topic screen
|
||||
|
||||
viewtopic_body_post_buttons_after
|
||||
===
|
||||
* Locations:
|
||||
@@ -1283,6 +1677,22 @@ viewtopic_body_postrow_post_content_footer
|
||||
* Since: 3.1.0-RC4
|
||||
* Purpose: Add data at the end of the posts.
|
||||
|
||||
viewtopic_body_postrow_post_details_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/viewtopic_body.html
|
||||
+ styles/subsilver2/template/viewtopic_body.html
|
||||
* Since: 3.1.4-RC1
|
||||
* Purpose: Add content after the post details
|
||||
|
||||
viewtopic_body_postrow_post_details_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/viewtopic_body.html
|
||||
+ styles/subsilver2/template/viewtopic_body.html
|
||||
* Since: 3.1.4-RC1
|
||||
* Purpose: Add content before the post details
|
||||
|
||||
viewtopic_body_postrow_post_notices_after
|
||||
===
|
||||
* Locations:
|
||||
|
Before Width: | Height: | Size: 3.3 KiB |
@@ -35,8 +35,30 @@ switch ($mode)
|
||||
break;
|
||||
|
||||
default:
|
||||
$l_title = $user->lang['FAQ_EXPLAIN'];
|
||||
$user->add_lang('faq', false, true);
|
||||
$page_title = $user->lang['FAQ_EXPLAIN'];
|
||||
$ext_name = $lang_file = '';
|
||||
|
||||
/**
|
||||
* You can use this event display a custom help page
|
||||
*
|
||||
* @event core.faq_mode_validation
|
||||
* @var string page_title Title of the page
|
||||
* @var string mode FAQ that is going to be displayed
|
||||
* @var string lang_file Language file containing the help data
|
||||
* @var string ext_name Vendor and extension name where the help
|
||||
* language file can be loaded from
|
||||
* @since 3.1.4-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'page_title',
|
||||
'mode',
|
||||
'lang_file',
|
||||
'ext_name',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.faq_mode_validation', compact($vars)));
|
||||
|
||||
$l_title = $page_title;
|
||||
$user->add_lang(($lang_file) ? $lang_file : 'faq', false, true, $ext_name);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@@ -165,7 +165,6 @@ if (defined('DEBUG') && request_var('explain', 0) && $auth->acl_get('a_'))
|
||||
header('Content-type: text/html; charset=UTF-8');
|
||||
header('Cache-Control: private, no-cache="set-cookie"');
|
||||
header('Expires: ' . gmdate('D, d M Y H:i:s', time()) . ' GMT');
|
||||
header('Pragma: no-cache');
|
||||
|
||||
$mtime = explode(' ', microtime());
|
||||
$totaltime = $mtime[0] + $mtime[1] - $starttime;
|
||||
|
@@ -153,7 +153,7 @@ class acp_attachments
|
||||
'img_create_thumbnail' => array('lang' => 'CREATE_THUMBNAIL', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'img_max_thumb_width' => array('lang' => 'MAX_THUMB_WIDTH', 'validate' => 'int:0:999999999999999', 'type' => 'number:0:999999999999999', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
|
||||
'img_min_thumb_filesize' => array('lang' => 'MIN_THUMB_FILESIZE', 'validate' => 'int:0:999999999999999', 'type' => 'number:0:999999999999999', 'explain' => true, 'append' => ' ' . $user->lang['BYTES']),
|
||||
'img_imagick' => array('lang' => 'IMAGICK_PATH', 'validate' => 'string', 'type' => 'text:20:200', 'explain' => true, 'append' => ' <span>[ <a href="' . $this->u_action . '&action=imgmagick">' . $user->lang['SEARCH_IMAGICK'] . '</a> ]</span>'),
|
||||
'img_imagick' => array('lang' => 'IMAGICK_PATH', 'validate' => 'absolute_path', 'type' => 'text:20:200', 'explain' => true, 'append' => ' <span>[ <a href="' . $this->u_action . '&action=imgmagick">' . $user->lang['SEARCH_IMAGICK'] . '</a> ]</span>'),
|
||||
'img_max' => array('lang' => 'MAX_IMAGE_SIZE', 'validate' => 'int:0:9999', 'type' => 'dimension:0:9999', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
|
||||
'img_link' => array('lang' => 'IMAGE_LINK_SIZE', 'validate' => 'int:0:9999', 'type' => 'dimension:0:9999', 'explain' => true, 'append' => ' ' . $user->lang['PIXEL']),
|
||||
)
|
||||
|
@@ -25,14 +25,13 @@ class acp_ban
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $config, $db, $user, $auth, $template, $cache;
|
||||
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix;
|
||||
global $user, $template, $request, $phpbb_dispatcher;
|
||||
global $phpbb_root_path, $phpEx;
|
||||
|
||||
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
|
||||
$bansubmit = (isset($_POST['bansubmit'])) ? true : false;
|
||||
$unbansubmit = (isset($_POST['unbansubmit'])) ? true : false;
|
||||
$current_time = time();
|
||||
$bansubmit = $request->is_set_post('bansubmit');
|
||||
$unbansubmit = $request->is_set_post('unbansubmit');
|
||||
|
||||
$user->add_lang(array('acp/ban', 'acp/users'));
|
||||
$this->tpl_name = 'acp_ban';
|
||||
@@ -48,23 +47,79 @@ class acp_ban
|
||||
if ($bansubmit)
|
||||
{
|
||||
// Grab the list of entries
|
||||
$ban = utf8_normalize_nfc(request_var('ban', '', true));
|
||||
$ban_len = request_var('banlength', 0);
|
||||
$ban_len_other = request_var('banlengthother', '');
|
||||
$ban_exclude = request_var('banexclude', 0);
|
||||
$ban_reason = utf8_normalize_nfc(request_var('banreason', '', true));
|
||||
$ban_give_reason = utf8_normalize_nfc(request_var('bangivereason', '', true));
|
||||
$ban = $request->variable('ban', '', true);
|
||||
$ban_length = $request->variable('banlength', 0);
|
||||
$ban_length_other = $request->variable('banlengthother', '');
|
||||
$ban_exclude = $request->variable('banexclude', 0);
|
||||
$ban_reason = $request->variable('banreason', '', true);
|
||||
$ban_give_reason = $request->variable('bangivereason', '', true);
|
||||
|
||||
if ($ban)
|
||||
{
|
||||
user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reason, $ban_give_reason);
|
||||
$abort_ban = false;
|
||||
/**
|
||||
* Use this event to modify the ban details before the ban is performed
|
||||
*
|
||||
* @event core.acp_ban_before
|
||||
* @var string mode One of the following: user, ip, email
|
||||
* @var string ban Either string or array with usernames, ips or email addresses
|
||||
* @var int ban_length Ban length in minutes
|
||||
* @var string ban_length_other Ban length as a date (YYYY-MM-DD)
|
||||
* @var bool ban_exclude Are we banning or excluding from another ban
|
||||
* @var string ban_reason Ban reason displayed to moderators
|
||||
* @var string ban_give_reason Ban reason displayed to the banned user
|
||||
* @var mixed abort_ban Either false, or an error message that is displayed to the user.
|
||||
* If a string is given the bans are not issued.
|
||||
* @since 3.1.0-RC5
|
||||
*/
|
||||
$vars = array(
|
||||
'mode',
|
||||
'ban',
|
||||
'ban_length',
|
||||
'ban_length_other',
|
||||
'ban_exclude',
|
||||
'ban_reason',
|
||||
'ban_give_reason',
|
||||
'abort_ban',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.acp_ban_before', compact($vars)));
|
||||
|
||||
if ($abort_ban)
|
||||
{
|
||||
trigger_error($abort_ban . adm_back_link($this->u_action));
|
||||
}
|
||||
user_ban($mode, $ban, $ban_length, $ban_length_other, $ban_exclude, $ban_reason, $ban_give_reason);
|
||||
|
||||
/**
|
||||
* Use this event to perform actions after the ban has been performed
|
||||
*
|
||||
* @event core.acp_ban_after
|
||||
* @var string mode One of the following: user, ip, email
|
||||
* @var string ban Either string or array with usernames, ips or email addresses
|
||||
* @var int ban_length Ban length in minutes
|
||||
* @var string ban_length_other Ban length as a date (YYYY-MM-DD)
|
||||
* @var bool ban_exclude Are we banning or excluding from another ban
|
||||
* @var string ban_reason Ban reason displayed to moderators
|
||||
* @var string ban_give_reason Ban reason displayed to the banned user
|
||||
* @since 3.1.0-RC5
|
||||
*/
|
||||
$vars = array(
|
||||
'mode',
|
||||
'ban',
|
||||
'ban_length',
|
||||
'ban_length_other',
|
||||
'ban_exclude',
|
||||
'ban_reason',
|
||||
'ban_give_reason',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.acp_ban_after', compact($vars)));
|
||||
|
||||
trigger_error($user->lang['BAN_UPDATE_SUCCESSFUL'] . adm_back_link($this->u_action));
|
||||
}
|
||||
}
|
||||
else if ($unbansubmit)
|
||||
{
|
||||
$ban = request_var('unban', array(''));
|
||||
$ban = $request->variable('unban', array(''));
|
||||
|
||||
if ($ban)
|
||||
{
|
||||
|
@@ -409,7 +409,9 @@ class acp_bbcodes
|
||||
{
|
||||
$bbcode_match = trim($bbcode_match);
|
||||
$bbcode_tpl = trim($bbcode_tpl);
|
||||
$utf8 = strpos($bbcode_match, 'INTTEXT') !== false;
|
||||
|
||||
// Allow unicode characters for URL|LOCAL_URL|RELATIVE_URL|INTTEXT tokens
|
||||
$utf8 = preg_match('/(URL|LOCAL_URL|RELATIVE_URL|INTTEXT)/', $bbcode_match);
|
||||
|
||||
$utf8_pcre_properties = phpbb_pcre_utf8_support();
|
||||
|
||||
|
@@ -65,13 +65,16 @@ class acp_board
|
||||
'default_lang' => array('lang' => 'DEFAULT_LANGUAGE', 'validate' => 'lang', 'type' => 'select', 'function' => 'language_select', 'params' => array('{CONFIG_VALUE}'), 'explain' => false),
|
||||
'default_dateformat' => array('lang' => 'DEFAULT_DATE_FORMAT', 'validate' => 'string', 'type' => 'custom', 'method' => 'dateformat_select', 'explain' => true),
|
||||
'board_timezone' => array('lang' => 'SYSTEM_TIMEZONE', 'validate' => 'timezone', 'type' => 'custom', 'method' => 'timezone_select', 'explain' => true),
|
||||
'default_style' => array('lang' => 'DEFAULT_STYLE', 'validate' => 'int', 'type' => 'select', 'function' => 'style_select', 'params' => array('{CONFIG_VALUE}', false), 'explain' => false),
|
||||
|
||||
'legend2' => 'BOARD_STYLE',
|
||||
'default_style' => array('lang' => 'DEFAULT_STYLE', 'validate' => 'int', 'type' => 'select', 'function' => 'style_select', 'params' => array('{CONFIG_VALUE}', false), 'explain' => true),
|
||||
'guest_style' => array('lang' => 'GUEST_STYLE', 'validate' => 'int', 'type' => 'select', 'function' => 'style_select', 'params' => array($this->guest_style_get(), false), 'explain' => true),
|
||||
'override_user_style' => array('lang' => 'OVERRIDE_STYLE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
|
||||
'legend2' => 'WARNINGS',
|
||||
'legend3' => 'WARNINGS',
|
||||
'warnings_expire_days' => array('lang' => 'WARNINGS_EXPIRE', 'validate' => 'int:0:9999', 'type' => 'number:0:9999', 'explain' => true, 'append' => ' ' . $user->lang['DAYS']),
|
||||
|
||||
'legend3' => 'ACP_SUBMIT_CHANGES',
|
||||
'legend4' => 'ACP_SUBMIT_CHANGES',
|
||||
)
|
||||
);
|
||||
break;
|
||||
@@ -509,6 +512,14 @@ class acp_board
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($config_name == 'guest_style')
|
||||
{
|
||||
if (isset($cfg_array[$config_name])) {
|
||||
$this->guest_style_set($cfg_array[$config_name]);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
$this->new_config[$config_name] = $config_value = $cfg_array[$config_name];
|
||||
|
||||
if ($config_name == 'email_function_name')
|
||||
@@ -604,7 +615,15 @@ class acp_board
|
||||
{
|
||||
add_log('admin', 'LOG_CONFIG_' . strtoupper($mode));
|
||||
|
||||
trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($this->u_action));
|
||||
$message = $user->lang('CONFIG_UPDATED');
|
||||
$message_type = E_USER_NOTICE;
|
||||
if (!$config['email_enable'] && in_array($mode, array('email', 'registration')) &&
|
||||
in_array($config['require_activation'], array(USER_ACTIVATION_SELF, USER_ACTIVATION_ADMIN)))
|
||||
{
|
||||
$message .= '<br /><br />' . $user->lang('ACC_ACTIVATION_WARNING');
|
||||
$message_type = E_USER_WARNING;
|
||||
}
|
||||
trigger_error($message . adm_back_link($this->u_action), $message_type);
|
||||
}
|
||||
|
||||
$this->tpl_name = 'acp_board';
|
||||
@@ -781,20 +800,19 @@ class acp_board
|
||||
global $user, $config;
|
||||
|
||||
$act_ary = array(
|
||||
'ACC_DISABLE' => USER_ACTIVATION_DISABLE,
|
||||
'ACC_NONE' => USER_ACTIVATION_NONE,
|
||||
'ACC_DISABLE' => array(true, USER_ACTIVATION_DISABLE),
|
||||
'ACC_NONE' => array(true, USER_ACTIVATION_NONE),
|
||||
'ACC_USER' => array($config['email_enable'], USER_ACTIVATION_SELF),
|
||||
'ACC_ADMIN' => array($config['email_enable'], USER_ACTIVATION_ADMIN),
|
||||
);
|
||||
if ($config['email_enable'])
|
||||
{
|
||||
$act_ary['ACC_USER'] = USER_ACTIVATION_SELF;
|
||||
$act_ary['ACC_ADMIN'] = USER_ACTIVATION_ADMIN;
|
||||
}
|
||||
$act_options = '';
|
||||
|
||||
foreach ($act_ary as $key => $value)
|
||||
$act_options = '';
|
||||
foreach ($act_ary as $key => $data)
|
||||
{
|
||||
list($available, $value) = $data;
|
||||
$selected = ($selected_value == $value) ? ' selected="selected"' : '';
|
||||
$act_options .= '<option value="' . $value . '"' . $selected . '>' . $user->lang[$key] . '</option>';
|
||||
$class = (!$available) ? ' class="disabled-option"' : '';
|
||||
$act_options .= '<option value="' . $value . '"' . $selected . $class . '>' . $user->lang($key) . '</option>';
|
||||
}
|
||||
|
||||
return $act_options;
|
||||
@@ -904,12 +922,44 @@ class acp_board
|
||||
*/
|
||||
function timezone_select($value, $key)
|
||||
{
|
||||
global $user;
|
||||
global $template, $user;
|
||||
|
||||
$timezone_select = phpbb_timezone_select($user, $value, true);
|
||||
$timezone_select['tz_select'];
|
||||
$timezone_select = phpbb_timezone_select($template, $user, $value, true);
|
||||
|
||||
return '<select name="config[' . $key . ']" id="' . $key . '">' . $timezone_select['tz_select'] . '</select>';
|
||||
return '<select name="config[' . $key . ']" id="' . $key . '">' . $timezone_select . '</select>';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get guest style
|
||||
*/
|
||||
public function guest_style_get()
|
||||
{
|
||||
global $db;
|
||||
|
||||
$sql = 'SELECT user_style
|
||||
FROM ' . USERS_TABLE . '
|
||||
WHERE user_id = ' . ANONYMOUS;
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$style = (int) $db->sql_fetchfield('user_style');
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
return $style;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set guest style
|
||||
*
|
||||
* @param int $style_id The style ID
|
||||
*/
|
||||
public function guest_style_set($style_id)
|
||||
{
|
||||
global $db;
|
||||
|
||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||
SET user_style = ' . (int) $style_id . '
|
||||
WHERE user_id = ' . ANONYMOUS;
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -269,7 +269,7 @@ class acp_database
|
||||
break;
|
||||
}
|
||||
|
||||
header('Pragma: no-cache');
|
||||
header('Cache-Control: private, no-cache');
|
||||
header("Content-Type: $mimetype; name=\"$name\"");
|
||||
header("Content-disposition: attachment; filename=$name");
|
||||
|
||||
@@ -510,7 +510,7 @@ class base_extractor
|
||||
if ($download == true)
|
||||
{
|
||||
$name = $filename . $ext;
|
||||
header('Pragma: no-cache');
|
||||
header('Cache-Control: private, no-cache');
|
||||
header("Content-Type: $mimetype; name=\"$name\"");
|
||||
header("Content-disposition: attachment; filename=$name");
|
||||
|
||||
|
@@ -26,7 +26,7 @@ class acp_email
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $config, $db, $user, $auth, $template, $cache;
|
||||
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix;
|
||||
global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix, $phpbb_dispatcher;
|
||||
|
||||
$user->add_lang('acp/email');
|
||||
$this->tpl_name = 'acp_email';
|
||||
@@ -40,6 +40,7 @@ class acp_email
|
||||
$error = array();
|
||||
|
||||
$usernames = request_var('usernames', '', true);
|
||||
$usernames = (!empty($usernames)) ? explode("\n", $usernames) : array();
|
||||
$group_id = request_var('g', 0);
|
||||
$subject = utf8_normalize_nfc(request_var('subject', '', true));
|
||||
$message = utf8_normalize_nfc(request_var('message', '', true));
|
||||
@@ -69,14 +70,18 @@ class acp_email
|
||||
|
||||
if (!sizeof($error))
|
||||
{
|
||||
if ($usernames)
|
||||
if (!empty($usernames))
|
||||
{
|
||||
// If giving usernames the admin is able to email inactive users too...
|
||||
$sql = 'SELECT username, user_email, user_jabber, user_notify_type, user_lang
|
||||
FROM ' . USERS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('username_clean', array_map('utf8_clean_string', explode("\n", $usernames))) . '
|
||||
AND user_allow_massemail = 1
|
||||
ORDER BY user_lang, user_notify_type'; // , SUBSTRING(user_email FROM INSTR(user_email, '@'))
|
||||
$sql_ary = array(
|
||||
'SELECT' => 'username, user_email, user_jabber, user_notify_type, user_lang',
|
||||
'FROM' => array(
|
||||
USERS_TABLE => '',
|
||||
),
|
||||
'WHERE' => $db->sql_in_set('username_clean', array_map('utf8_clean_string', $usernames)) . '
|
||||
AND user_allow_massemail = 1',
|
||||
'ORDER_BY' => 'user_lang, user_notify_type',
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -123,8 +128,18 @@ class acp_email
|
||||
),
|
||||
);
|
||||
}
|
||||
$sql = $db->sql_build_query('SELECT', $sql_ary);
|
||||
}
|
||||
/**
|
||||
* Modify sql query to change the list of users the email is sent to
|
||||
*
|
||||
* @event core.acp_email_modify_sql
|
||||
* @var array sql_ary Array which is used to build the sql query
|
||||
* @since 3.1.2-RC1
|
||||
*/
|
||||
$vars = array('sql_ary');
|
||||
extract($phpbb_dispatcher->trigger_event('core.acp_email_modify_sql', compact($vars)));
|
||||
|
||||
$sql = $db->sql_build_query('SELECT', $sql_ary);
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
|
||||
@@ -180,6 +195,39 @@ class acp_email
|
||||
|
||||
$errored = false;
|
||||
|
||||
$email_template = 'admin_send_email';
|
||||
$template_data = array(
|
||||
'CONTACT_EMAIL' => phpbb_get_board_contact($config, $phpEx),
|
||||
'MESSAGE' => htmlspecialchars_decode($message),
|
||||
);
|
||||
$generate_log_entry = true;
|
||||
|
||||
/**
|
||||
* Modify email template data before the emails are sent
|
||||
*
|
||||
* @event core.acp_email_send_before
|
||||
* @var string email_template The template to be used for sending the email
|
||||
* @var string subject The subject of the email
|
||||
* @var array template_data Array with template data assigned to email template
|
||||
* @var bool generate_log_entry If false, no log entry will be created
|
||||
* @var array usernames Usernames which will be displayed in log entry, if it will be created
|
||||
* @var int group_id The group this email will be sent to
|
||||
* @var bool use_queue If true, email queue will be used for sending
|
||||
* @var int priority Priority of sent emails
|
||||
* @since 3.1.3-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'email_template',
|
||||
'subject',
|
||||
'template_data',
|
||||
'generate_log_entry',
|
||||
'usernames',
|
||||
'group_id',
|
||||
'use_queue',
|
||||
'priority',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.acp_email_send_before', compact($vars)));
|
||||
|
||||
for ($i = 0, $size = sizeof($email_list); $i < $size; $i++)
|
||||
{
|
||||
$used_lang = $email_list[$i][0]['lang'];
|
||||
@@ -193,17 +241,14 @@ class acp_email
|
||||
$messenger->im($email_row['jabber'], $email_row['name']);
|
||||
}
|
||||
|
||||
$messenger->template('admin_send_email', $used_lang);
|
||||
$messenger->template($email_template, $used_lang);
|
||||
|
||||
$messenger->anti_abuse_headers($config, $user);
|
||||
|
||||
$messenger->subject(htmlspecialchars_decode($subject));
|
||||
$messenger->set_mail_priority($priority);
|
||||
|
||||
$messenger->assign_vars(array(
|
||||
'CONTACT_EMAIL' => phpbb_get_board_contact($config, $phpEx),
|
||||
'MESSAGE' => htmlspecialchars_decode($message))
|
||||
);
|
||||
$messenger->assign_vars($template_data);
|
||||
|
||||
if (!($messenger->send($used_method)))
|
||||
{
|
||||
@@ -214,24 +259,26 @@ class acp_email
|
||||
|
||||
$messenger->save_queue();
|
||||
|
||||
if ($usernames)
|
||||
if ($generate_log_entry)
|
||||
{
|
||||
$usernames = explode("\n", $usernames);
|
||||
add_log('admin', 'LOG_MASS_EMAIL', implode(', ', utf8_normalize_nfc($usernames)));
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($group_id)
|
||||
if (!empty($usernames))
|
||||
{
|
||||
$group_name = get_group_name($group_id);
|
||||
add_log('admin', 'LOG_MASS_EMAIL', implode(', ', utf8_normalize_nfc($usernames)));
|
||||
}
|
||||
else
|
||||
{
|
||||
// Not great but the logging routine doesn't cope well with localising on the fly
|
||||
$group_name = $user->lang['ALL_USERS'];
|
||||
}
|
||||
if ($group_id)
|
||||
{
|
||||
$group_name = get_group_name($group_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Not great but the logging routine doesn't cope well with localising on the fly
|
||||
$group_name = $user->lang['ALL_USERS'];
|
||||
}
|
||||
|
||||
add_log('admin', 'LOG_MASS_EMAIL', $group_name);
|
||||
add_log('admin', 'LOG_MASS_EMAIL', $group_name);
|
||||
}
|
||||
}
|
||||
|
||||
if (!$errored)
|
||||
@@ -267,17 +314,31 @@ class acp_email
|
||||
$s_priority_options .= '<option value="' . MAIL_NORMAL_PRIORITY . '" selected="selected">' . $user->lang['MAIL_NORMAL_PRIORITY'] . '</option>';
|
||||
$s_priority_options .= '<option value="' . MAIL_HIGH_PRIORITY . '">' . $user->lang['MAIL_HIGH_PRIORITY'] . '</option>';
|
||||
|
||||
$template->assign_vars(array(
|
||||
$template_data = array(
|
||||
'S_WARNING' => (sizeof($error)) ? true : false,
|
||||
'WARNING_MSG' => (sizeof($error)) ? implode('<br />', $error) : '',
|
||||
'U_ACTION' => $this->u_action,
|
||||
'S_GROUP_OPTIONS' => $select_list,
|
||||
'USERNAMES' => $usernames,
|
||||
'USERNAMES' => implode("\n", $usernames),
|
||||
'U_FIND_USERNAME' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=acp_email&field=usernames'),
|
||||
'SUBJECT' => $subject,
|
||||
'MESSAGE' => $message,
|
||||
'S_PRIORITY_OPTIONS' => $s_priority_options)
|
||||
'S_PRIORITY_OPTIONS' => $s_priority_options,
|
||||
);
|
||||
|
||||
/**
|
||||
* Modify custom email template data before we display the form
|
||||
*
|
||||
* @event core.acp_email_display
|
||||
* @var array template_data Array with template data assigned to email template
|
||||
* @var array exclude Array with groups which are excluded from group selection
|
||||
* @var array usernames Usernames which will be displayed in form
|
||||
*
|
||||
* @since 3.1.4-RC1
|
||||
*/
|
||||
$vars = array('template_data', 'exclude', 'usernames');
|
||||
extract($phpbb_dispatcher->trigger_event('core.acp_email_display', compact($vars)));
|
||||
|
||||
$template->assign_vars($template_data);
|
||||
}
|
||||
}
|
||||
|
@@ -174,11 +174,6 @@ class acp_extensions
|
||||
trigger_error($user->lang['EXTENSION_NOT_ENABLEABLE'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
if ($phpbb_extension_manager->is_enabled($ext_name))
|
||||
{
|
||||
redirect($this->u_action);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
while ($phpbb_extension_manager->enable_step($ext_name))
|
||||
@@ -537,7 +532,7 @@ class acp_extensions
|
||||
|
||||
$version_check = $meta['extra']['version-check'];
|
||||
|
||||
$version_helper = new \phpbb\version_helper($this->cache, $this->config, $this->user);
|
||||
$version_helper = new \phpbb\version_helper($this->cache, $this->config, new \phpbb\file_downloader(), $this->user);
|
||||
$version_helper->set_current_version($meta['version']);
|
||||
$version_helper->set_file_location($version_check['host'], $version_check['directory'], $version_check['filename']);
|
||||
$version_helper->force_stability($this->config['extension_force_unstable'] ? 'unstable' : null);
|
||||
|
@@ -737,7 +737,7 @@ class acp_icons
|
||||
{
|
||||
garbage_collection();
|
||||
|
||||
header('Pragma: public');
|
||||
header('Cache-Control: public');
|
||||
|
||||
// Send out the Headers
|
||||
header('Content-Type: text/x-delimtext; name="' . $mode . '.pak"');
|
||||
|
@@ -655,8 +655,8 @@ class acp_main
|
||||
'S_MBSTRING_LOADED' => true,
|
||||
'S_MBSTRING_FUNC_OVERLOAD_FAIL' => (intval(@ini_get('mbstring.func_overload')) & (MB_OVERLOAD_MAIL | MB_OVERLOAD_STRING)),
|
||||
'S_MBSTRING_ENCODING_TRANSLATION_FAIL' => (@ini_get('mbstring.encoding_translation') != 0),
|
||||
'S_MBSTRING_HTTP_INPUT_FAIL' => (@ini_get('mbstring.http_input') != 'pass'),
|
||||
'S_MBSTRING_HTTP_OUTPUT_FAIL' => (@ini_get('mbstring.http_output') != 'pass'),
|
||||
'S_MBSTRING_HTTP_INPUT_FAIL' => !in_array(@ini_get('mbstring.http_input'), array('pass', '')),
|
||||
'S_MBSTRING_HTTP_OUTPUT_FAIL' => !in_array(@ini_get('mbstring.http_output'), array('pass', '')),
|
||||
));
|
||||
}
|
||||
|
||||
|
@@ -460,7 +460,7 @@ class acp_profile
|
||||
|
||||
if (!$cp->vars[$key] && $action == 'edit')
|
||||
{
|
||||
$cp->vars[$key] = $$key;
|
||||
$cp->vars[$key] = ${$key};
|
||||
}
|
||||
|
||||
$field_data = $cp->vars;
|
||||
|
@@ -397,7 +397,7 @@ class acp_prune
|
||||
$joined_after = request_var('joined_after', '');
|
||||
$active = request_var('active', '');
|
||||
|
||||
$count = request_var('count', 0);
|
||||
$count = ($request->variable('count', '') === '') ? false : $request->variable('count', 0);
|
||||
|
||||
$active = ($active) ? explode('-', $active) : array();
|
||||
$joined_before = ($joined_before) ? explode('-', $joined_before) : array();
|
||||
@@ -439,7 +439,7 @@ class acp_prune
|
||||
$where_sql .= ($username) ? ' AND username_clean ' . $db->sql_like_expression(str_replace('*', $db->get_any_char(), utf8_clean_string($username))) : '';
|
||||
$where_sql .= ($email) ? ' AND user_email ' . $db->sql_like_expression(str_replace('*', $db->get_any_char(), $email)) . ' ' : '';
|
||||
$where_sql .= $joined_sql;
|
||||
$where_sql .= ($count) ? " AND user_posts " . $key_match[$count_select] . ' ' . (int) $count . ' ' : '';
|
||||
$where_sql .= ($count !== false) ? " AND user_posts " . $key_match[$count_select] . ' ' . (int) $count . ' ' : '';
|
||||
|
||||
// First handle pruning of users who never logged in, last active date is 0000-00-00
|
||||
if (sizeof($active) && (int) $active[0] == 0 && (int) $active[1] == 0 && (int) $active[2] == 0)
|
||||
@@ -507,7 +507,7 @@ class acp_prune
|
||||
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) : '') . '
|
||||
((!empty($user_ids)) ? ' AND ' . $db->sql_in_set('ug.user_id', $user_ids) : '') . '
|
||||
AND u.user_id = ug.user_id';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
@@ -533,7 +533,7 @@ class acp_prune
|
||||
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) : '') . '
|
||||
((!empty($user_ids)) ? ' AND ' . $db->sql_in_set('p.poster_id', $user_ids) : '') . '
|
||||
AND ' . $db->sql_in_set('p.post_visibility', array(ITEM_UNAPPROVED, ITEM_REAPPROVE)) . '
|
||||
AND u.user_id = p.poster_id
|
||||
GROUP BY p.poster_id
|
||||
|
@@ -449,7 +449,6 @@ class acp_search
|
||||
|
||||
$search = null;
|
||||
$error = false;
|
||||
$search_options = '';
|
||||
foreach ($search_types as $type)
|
||||
{
|
||||
if ($this->init_search($type, $search, $error) || !method_exists($search, 'index_created'))
|
||||
|
@@ -29,14 +29,31 @@ class acp_styles
|
||||
protected $styles_path;
|
||||
protected $styles_path_absolute = 'styles';
|
||||
protected $default_style = 0;
|
||||
protected $styles_list_cols = 0;
|
||||
protected $reserved_style_names = array('adm', 'admin', 'all');
|
||||
|
||||
/** @var \phpbb\db\driver\driver_interface */
|
||||
protected $db;
|
||||
|
||||
/** @var \phpbb\user */
|
||||
protected $user;
|
||||
|
||||
/** @var \phpbb\template\template */
|
||||
protected $template;
|
||||
|
||||
/** @var \phpbb\request\request_interface */
|
||||
protected $request;
|
||||
|
||||
/** @var \phpbb\cache\driver\driver_interface */
|
||||
protected $cache;
|
||||
|
||||
/** @var \phpbb\auth\auth */
|
||||
protected $auth;
|
||||
|
||||
/** @var string */
|
||||
protected $phpbb_root_path;
|
||||
|
||||
/** @var string */
|
||||
protected $php_ext;
|
||||
|
||||
public function main($id, $mode)
|
||||
@@ -70,11 +87,6 @@ class acp_styles
|
||||
$action = $this->request->variable('action', '');
|
||||
$post_actions = array('install', 'activate', 'deactivate', 'uninstall');
|
||||
|
||||
if ($action && in_array($action, $post_actions) && !check_link_hash($request->variable('hash', ''), $action))
|
||||
{
|
||||
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
foreach ($post_actions as $key)
|
||||
{
|
||||
if ($this->request->is_set_post($key))
|
||||
@@ -83,6 +95,18 @@ class acp_styles
|
||||
}
|
||||
}
|
||||
|
||||
// The uninstall action uses confirm_box() to verify the validity of the request,
|
||||
// so there is no need to check for a valid token here.
|
||||
if (in_array($action, $post_actions) && $action != 'uninstall')
|
||||
{
|
||||
$is_valid_request = check_link_hash($request->variable('hash', ''), $action) || check_form_key('styles_management');
|
||||
|
||||
if (!$is_valid_request)
|
||||
{
|
||||
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
}
|
||||
|
||||
if ($action != '')
|
||||
{
|
||||
$this->s_hidden_fields['action'] = $action;
|
||||
@@ -122,6 +146,8 @@ class acp_styles
|
||||
*/
|
||||
protected function frontend()
|
||||
{
|
||||
add_form_key('styles_management');
|
||||
|
||||
// Check mode
|
||||
switch ($this->mode)
|
||||
{
|
||||
@@ -133,32 +159,10 @@ class acp_styles
|
||||
$this->welcome_message('INSTALL_STYLES', 'INSTALL_STYLES_EXPLAIN');
|
||||
$this->show_available();
|
||||
return;
|
||||
case 'cache':
|
||||
$this->action_cache();
|
||||
return;
|
||||
}
|
||||
trigger_error($this->user->lang['NO_MODE'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
/**
|
||||
* Purge cache
|
||||
*/
|
||||
protected function action_cache()
|
||||
{
|
||||
global $db, $cache, $auth;
|
||||
|
||||
$this->config->increment('assets_version', 1);
|
||||
$this->cache->purge();
|
||||
|
||||
// Clear permissions
|
||||
$this->auth->acl_clear_prefetch();
|
||||
phpbb_cache_moderators($db, $cache, $auth);
|
||||
|
||||
add_log('admin', 'LOG_PURGE_CACHE');
|
||||
|
||||
trigger_error($this->user->lang['PURGED_CACHE'] . adm_back_link($this->u_base_action), E_USER_NOTICE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Install style(s)
|
||||
*/
|
||||
@@ -177,6 +181,12 @@ class acp_styles
|
||||
$last_installed = false;
|
||||
foreach ($dirs as $dir)
|
||||
{
|
||||
if (in_array($dir, $this->reserved_style_names))
|
||||
{
|
||||
$messages[] = $this->user->lang('STYLE_NAME_RESERVED', htmlspecialchars($dir));
|
||||
continue;
|
||||
}
|
||||
|
||||
$found = false;
|
||||
foreach ($styles as &$style)
|
||||
{
|
||||
@@ -822,7 +832,7 @@ class acp_styles
|
||||
* Update styles tree
|
||||
*
|
||||
* @param array $styles Styles list, passed as reference
|
||||
* @param array $style Current style, false if root
|
||||
* @param array|false $style Current style, false if root
|
||||
* @return bool True if something was updated, false if not
|
||||
*/
|
||||
protected function update_styles_tree(&$styles, $style = false)
|
||||
@@ -1104,7 +1114,7 @@ class acp_styles
|
||||
/**
|
||||
* Install style
|
||||
*
|
||||
* @param $style style data
|
||||
* @param array $style style data
|
||||
* @return int Style id
|
||||
*/
|
||||
protected function install_style($style)
|
||||
|
@@ -173,6 +173,21 @@ class acp_users
|
||||
$delete_type = request_var('delete_type', '');
|
||||
$ip = request_var('ip', 'ip');
|
||||
|
||||
/**
|
||||
* Run code at beginning of ACP users overview
|
||||
*
|
||||
* @event core.acp_users_overview_before
|
||||
* @var array user_row Current user data
|
||||
* @var string mode Active module
|
||||
* @var string action Module that should be run
|
||||
* @var bool submit Do we display the form only
|
||||
* or did the user press submit
|
||||
* @var array error Array holding error messages
|
||||
* @since 3.1.3-RC1
|
||||
*/
|
||||
$vars = array('user_row', 'mode', 'action', 'submit', 'error');
|
||||
extract($phpbb_dispatcher->trigger_event('core.acp_users_overview_before', compact($vars)));
|
||||
|
||||
if ($submit)
|
||||
{
|
||||
if ($delete)
|
||||
@@ -1362,6 +1377,19 @@ class acp_users
|
||||
$data['bday_year'] = request_var('bday_year', $data['bday_year']);
|
||||
$data['user_birthday'] = sprintf('%2d-%2d-%4d', $data['bday_day'], $data['bday_month'], $data['bday_year']);
|
||||
|
||||
/**
|
||||
* Modify user data on editing profile in ACP
|
||||
*
|
||||
* @event core.acp_users_modify_profile
|
||||
* @var array data Array with user profile data
|
||||
* @var bool submit Flag indicating if submit button has been pressed
|
||||
* @var int user_id The user id
|
||||
* @var array user_row Array with the full user data
|
||||
* @since 3.1.4-RC1
|
||||
*/
|
||||
$vars = array('data', 'submit', 'user_id', 'user_row');
|
||||
extract($phpbb_dispatcher->trigger_event('core.acp_users_modify_profile', compact($vars)));
|
||||
|
||||
if ($submit)
|
||||
{
|
||||
$error = validate_data($data, array(
|
||||
@@ -1386,6 +1414,18 @@ class acp_users
|
||||
$error[] = 'FORM_INVALID';
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate profile data in ACP before submitting to the database
|
||||
*
|
||||
* @event core.acp_users_profile_validate
|
||||
* @var bool submit Flag indicating if submit button has been pressed
|
||||
* @var array data Array with user profile data
|
||||
* @var array error Array with the form errors
|
||||
* @since 3.1.4-RC1
|
||||
*/
|
||||
$vars = array('submit', 'data', 'error');
|
||||
extract($phpbb_dispatcher->trigger_event('core.acp_users_profile_validate', compact($vars)));
|
||||
|
||||
if (!sizeof($error))
|
||||
{
|
||||
$sql_ary = array(
|
||||
@@ -1393,6 +1433,20 @@ class acp_users
|
||||
'user_birthday' => $data['user_birthday'],
|
||||
);
|
||||
|
||||
/**
|
||||
* Modify profile data in ACP before submitting to the database
|
||||
*
|
||||
* @event core.acp_users_profile_modify_sql_ary
|
||||
* @var array cp_data Array with the user custom profile fields data
|
||||
* @var array data Array with user profile data
|
||||
* @var int user_id The user id
|
||||
* @var array user_row Array with the full user data
|
||||
* @var array sql_ary Array with sql data
|
||||
* @since 3.1.4-RC1
|
||||
*/
|
||||
$vars = array('cp_data', 'data', 'user_id', 'user_row', 'sql_ary');
|
||||
extract($phpbb_dispatcher->trigger_event('core.acp_users_profile_modify_sql_ary', compact($vars)));
|
||||
|
||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . "
|
||||
WHERE user_id = $user_id";
|
||||
@@ -1661,7 +1715,7 @@ class acp_users
|
||||
${'s_sort_' . $sort_option . '_dir'} .= '</select>';
|
||||
}
|
||||
|
||||
$timezone_selects = phpbb_timezone_select($user, $data['tz'], true);
|
||||
phpbb_timezone_select($template, $user, $data['tz'], true);
|
||||
$user_prefs_data = array(
|
||||
'S_PREFS' => true,
|
||||
'S_JABBER_DISABLED' => ($config['jab_enable'] && $user_row['user_jabber'] && @extension_loaded('xml')) ? false : true,
|
||||
@@ -1700,8 +1754,6 @@ class acp_users
|
||||
|
||||
'S_LANG_OPTIONS' => language_select($data['lang']),
|
||||
'S_STYLE_OPTIONS' => style_select($data['style']),
|
||||
'S_TZ_OPTIONS' => $timezone_selects['tz_select'],
|
||||
'S_TZ_DATE_OPTIONS' => $timezone_selects['tz_dates'],
|
||||
);
|
||||
|
||||
/**
|
||||
|
@@ -22,7 +22,6 @@ class acp_styles_info
|
||||
'modes' => array(
|
||||
'style' => array('title' => 'ACP_STYLES', 'auth' => 'acl_a_styles', 'cat' => array('ACP_STYLE_MANAGEMENT')),
|
||||
'install' => array('title' => 'ACP_STYLES_INSTALL', 'auth' => 'acl_a_styles', 'cat' => array('ACP_STYLE_MANAGEMENT')),
|
||||
'cache' => array('title' => 'ACP_STYLES_CACHE', 'auth' => 'acl_a_styles', 'cat' => array('ACP_STYLE_MANAGEMENT')),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
@@ -129,7 +129,7 @@ class bbcode
|
||||
*/
|
||||
function bbcode_cache_init()
|
||||
{
|
||||
global $phpbb_root_path, $phpEx, $config, $user, $phpbb_extension_manager, $phpbb_path_helper;
|
||||
global $phpbb_root_path, $phpEx, $config, $user, $phpbb_dispatcher, $phpbb_extension_manager, $phpbb_path_helper;
|
||||
|
||||
if (empty($this->template_filename))
|
||||
{
|
||||
@@ -388,6 +388,26 @@ class bbcode
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$bbcode_cache = $this->bbcode_cache;
|
||||
$bbcode_bitfield = $this->bbcode_bitfield;
|
||||
$bbcode_uid = $this->bbcode_uid;
|
||||
|
||||
/**
|
||||
* Use this event to modify the bbcode_cache
|
||||
*
|
||||
* @event core.bbcode_cache_init_end
|
||||
* @var array bbcode_cache The array of cached search and replace patterns of bbcodes
|
||||
* @var string bbcode_bitfield The bbcode bitfield
|
||||
* @var string bbcode_uid The bbcode uid
|
||||
* @since 3.1.3-RC1
|
||||
*/
|
||||
$vars = array('bbcode_cache', 'bbcode_bitfield', 'bbcode_uid');
|
||||
extract($phpbb_dispatcher->trigger_event('core.bbcode_cache_init_end', compact($vars)));
|
||||
|
||||
$this->bbcode_cache = $bbcode_cache;
|
||||
$this->bbcode_bitfield = $bbcode_bitfield;
|
||||
$this->bbcode_uid = $bbcode_uid;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -28,7 +28,7 @@ if (!defined('IN_PHPBB'))
|
||||
*/
|
||||
|
||||
// phpBB Version
|
||||
define('PHPBB_VERSION', '3.1.0-RC4');
|
||||
define('PHPBB_VERSION', '3.1.4');
|
||||
|
||||
// QA-related
|
||||
// define('PHPBB_QA', 1);
|
||||
|
@@ -31,7 +31,7 @@ function phpbb_load_extensions_autoloaders($phpbb_root_path)
|
||||
new \phpbb\recursive_dot_prefix_filter_iterator(
|
||||
new \RecursiveDirectoryIterator(
|
||||
$phpbb_root_path . 'ext/',
|
||||
\FilesystemIterator::SKIP_DOTS
|
||||
\FilesystemIterator::SKIP_DOTS | \FilesystemIterator::FOLLOW_SYMLINKS
|
||||
)
|
||||
),
|
||||
\RecursiveIteratorIterator::SELF_FIRST
|
||||
@@ -937,14 +937,20 @@ function style_select($default = '', $all = false)
|
||||
* Format the timezone offset with hours and minutes
|
||||
*
|
||||
* @param int $tz_offset Timezone offset in seconds
|
||||
* @param bool $show_null Whether null offsets should be shown
|
||||
* @return string Normalized offset string: -7200 => -02:00
|
||||
* 16200 => +04:30
|
||||
*/
|
||||
function phpbb_format_timezone_offset($tz_offset)
|
||||
function phpbb_format_timezone_offset($tz_offset, $show_null = false)
|
||||
{
|
||||
$sign = ($tz_offset < 0) ? '-' : '+';
|
||||
$time_offset = abs($tz_offset);
|
||||
|
||||
if ($time_offset == 0 && $show_null == false)
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
$offset_seconds = $time_offset % 3600;
|
||||
$offset_minutes = $offset_seconds / 60;
|
||||
$offset_hours = ($time_offset - $offset_seconds) / 3600;
|
||||
@@ -1040,13 +1046,14 @@ function phpbb_get_timezone_identifiers($selected_timezone)
|
||||
/**
|
||||
* Options to pick a timezone and date/time
|
||||
*
|
||||
* @param \phpbb\template\template $template phpBB template object
|
||||
* @param \phpbb\user $user Object of the current user
|
||||
* @param string $default A timezone to select
|
||||
* @param boolean $truncate Shall we truncate the options text
|
||||
*
|
||||
* @return array Returns an array, also containing the options for the time selector.
|
||||
* @return array Returns an array containing the options for the time selector.
|
||||
*/
|
||||
function phpbb_timezone_select($user, $default = '', $truncate = false)
|
||||
function phpbb_timezone_select($template, $user, $default = '', $truncate = false)
|
||||
{
|
||||
static $timezones;
|
||||
|
||||
@@ -1062,15 +1069,15 @@ function phpbb_timezone_select($user, $default = '', $truncate = false)
|
||||
$dt = $user->create_datetime('now', $tz);
|
||||
$offset = $dt->getOffset();
|
||||
$current_time = $dt->format($user->lang['DATETIME_FORMAT'], true);
|
||||
$offset_string = phpbb_format_timezone_offset($offset);
|
||||
$timezones['GMT' . $offset_string . ' - ' . $timezone] = array(
|
||||
$offset_string = phpbb_format_timezone_offset($offset, true);
|
||||
$timezones['UTC' . $offset_string . ' - ' . $timezone] = array(
|
||||
'tz' => $timezone,
|
||||
'offset' => 'GMT' . $offset_string,
|
||||
'offset' => $offset_string,
|
||||
'current' => $current_time,
|
||||
);
|
||||
if ($timezone === $default)
|
||||
{
|
||||
$default_offset = 'GMT' . $offset_string;
|
||||
$default_offset = 'UTC' . $offset_string;
|
||||
}
|
||||
}
|
||||
unset($unsorted_timezones);
|
||||
@@ -1078,18 +1085,27 @@ function phpbb_timezone_select($user, $default = '', $truncate = false)
|
||||
uksort($timezones, 'phpbb_tz_select_compare');
|
||||
}
|
||||
|
||||
$tz_select = $tz_dates = $opt_group = '';
|
||||
$tz_select = $opt_group = '';
|
||||
|
||||
foreach ($timezones as $timezone)
|
||||
foreach ($timezones as $key => $timezone)
|
||||
{
|
||||
if ($opt_group != $timezone['offset'])
|
||||
{
|
||||
// Generate tz_select for backwards compatibility
|
||||
$tz_select .= ($opt_group) ? '</optgroup>' : '';
|
||||
$tz_select .= '<optgroup label="' . $timezone['offset'] . ' - ' . $timezone['current'] . '">';
|
||||
$tz_select .= '<optgroup label="' . $user->lang(array('timezones', 'UTC_OFFSET_CURRENT'), $timezone['offset'], $timezone['current']) . '">';
|
||||
$opt_group = $timezone['offset'];
|
||||
$template->assign_block_vars('timezone_select', array(
|
||||
'LABEL' => $user->lang(array('timezones', 'UTC_OFFSET_CURRENT'), $timezone['offset'], $timezone['current']),
|
||||
'VALUE' => $key . ' - ' . $timezone['current'],
|
||||
));
|
||||
|
||||
$selected = ($default_offset == $timezone['offset']) ? ' selected="selected"' : '';
|
||||
$tz_dates .= '<option value="' . $timezone['offset'] . ' - ' . $timezone['current'] . '"' . $selected . '>' . $timezone['offset'] . ' - ' . $timezone['current'] . '</option>';
|
||||
$selected = (!empty($default_offset) && strpos($key, $default_offset) !== false) ? ' selected="selected"' : '';
|
||||
$template->assign_block_vars('timezone_date', array(
|
||||
'VALUE' => $key . ' - ' . $timezone['current'],
|
||||
'SELECTED' => !empty($selected),
|
||||
'TITLE' => $user->lang(array('timezones', 'UTC_OFFSET_CURRENT'), $timezone['offset'], $timezone['current']),
|
||||
));
|
||||
}
|
||||
|
||||
$label = $timezone['tz'];
|
||||
@@ -1097,22 +1113,26 @@ function phpbb_timezone_select($user, $default = '', $truncate = false)
|
||||
{
|
||||
$label = $user->lang['timezones'][$label];
|
||||
}
|
||||
$title = $timezone['offset'] . ' - ' . $label;
|
||||
$title = $user->lang(array('timezones', 'UTC_OFFSET_CURRENT'), $timezone['offset'], $label);
|
||||
|
||||
if ($truncate)
|
||||
{
|
||||
$label = truncate_string($label, 50, 255, false, '...');
|
||||
}
|
||||
|
||||
// Also generate timezone_select for backwards compatibility
|
||||
$selected = ($timezone['tz'] === $default) ? ' selected="selected"' : '';
|
||||
$tz_select .= '<option title="' . $title . '" value="' . $timezone['tz'] . '"' . $selected . '>' . $label . '</option>';
|
||||
$template->assign_block_vars('timezone_select.timezone_options', array(
|
||||
'TITLE' => $title,
|
||||
'VALUE' => $timezone['tz'],
|
||||
'SELECTED' => !empty($selected),
|
||||
'LABEL' => $label,
|
||||
));
|
||||
}
|
||||
$tz_select .= '</optgroup>';
|
||||
|
||||
return array(
|
||||
'tz_select' => $tz_select,
|
||||
'tz_dates' => $tz_dates,
|
||||
);
|
||||
return $tz_select;
|
||||
}
|
||||
|
||||
// Functions handling topic/post tracking/marking
|
||||
@@ -1130,10 +1150,43 @@ function phpbb_timezone_select($user, $default = '', $truncate = false)
|
||||
function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $user_id = 0)
|
||||
{
|
||||
global $db, $user, $config;
|
||||
global $request, $phpbb_container;
|
||||
global $request, $phpbb_container, $phpbb_dispatcher;
|
||||
|
||||
$post_time = ($post_time === 0 || $post_time > time()) ? time() : (int) $post_time;
|
||||
|
||||
$should_markread = true;
|
||||
|
||||
/**
|
||||
* This event is used for performing actions directly before marking forums,
|
||||
* topics or posts as read.
|
||||
*
|
||||
* It is also possible to prevent the marking. For that, the $should_markread parameter
|
||||
* should be set to FALSE.
|
||||
*
|
||||
* @event core.markread_before
|
||||
* @var string mode Variable containing marking mode value
|
||||
* @var mixed forum_id Variable containing forum id, or false
|
||||
* @var mixed topic_id Variable containing topic id, or false
|
||||
* @var int post_time Variable containing post time
|
||||
* @var int user_id Variable containing the user id
|
||||
* @var bool should_markread Flag indicating if the markread should be done or not.
|
||||
* @since 3.1.4-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'mode',
|
||||
'forum_id',
|
||||
'topic_id',
|
||||
'post_time',
|
||||
'user_id',
|
||||
'should_markread',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.markread_before', compact($vars)));
|
||||
|
||||
if (!$should_markread)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ($mode == 'all')
|
||||
{
|
||||
if ($forum_id === false || !sizeof($forum_id))
|
||||
@@ -1628,6 +1681,7 @@ function get_complete_topic_tracking($forum_id, $topic_ids, $global_announce_lis
|
||||
function get_unread_topics($user_id = false, $sql_extra = '', $sql_sort = '', $sql_limit = 1001, $sql_limit_offset = 0)
|
||||
{
|
||||
global $config, $db, $user;
|
||||
global $phpbb_dispatcher;
|
||||
|
||||
$user_id = ($user_id === false) ? (int) $user->data['user_id'] : (int) $user_id;
|
||||
|
||||
@@ -1671,6 +1725,24 @@ function get_unread_topics($user_id = false, $sql_extra = '', $sql_sort = '', $s
|
||||
$sql_sort",
|
||||
);
|
||||
|
||||
/**
|
||||
* Change SQL query for fetching unread topics data
|
||||
*
|
||||
* @event core.get_unread_topics_modify_sql
|
||||
* @var array sql_array Fully assembled SQL query with keys SELECT, FROM, LEFT_JOIN, WHERE
|
||||
* @var int last_mark User's last_mark time
|
||||
* @var string sql_extra Extra WHERE SQL statement
|
||||
* @var string sql_sort ORDER BY SQL sorting statement
|
||||
* @since 3.1.4-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'sql_array',
|
||||
'last_mark',
|
||||
'sql_extra',
|
||||
'sql_sort',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.get_unread_topics_modify_sql', compact($vars)));
|
||||
|
||||
$sql = $db->sql_build_query('SELECT', $sql_array);
|
||||
$result = $db->sql_query_limit($sql, $sql_limit, $sql_limit_offset);
|
||||
|
||||
@@ -2237,7 +2309,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] == '/')
|
||||
@@ -2275,7 +2347,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);
|
||||
}
|
||||
@@ -2376,26 +2448,7 @@ function build_url($strip_vars = false)
|
||||
{
|
||||
global $config, $user, $phpbb_path_helper;
|
||||
|
||||
$php_ext = $phpbb_path_helper->get_php_ext();
|
||||
$page = $user->page['page'];
|
||||
|
||||
// We need to be cautious here.
|
||||
// On some situations, the redirect path is an absolute URL, sometimes a relative path
|
||||
// For a relative path, let's prefix it with $phpbb_root_path to point to the correct location,
|
||||
// else we use the URL directly.
|
||||
$url_parts = parse_url($page);
|
||||
|
||||
// URL
|
||||
if ($url_parts === false || empty($url_parts['scheme']) || empty($url_parts['host']))
|
||||
{
|
||||
// Remove 'app.php/' from the page, when rewrite is enabled
|
||||
if ($config['enable_mod_rewrite'] && strpos($page, 'app.' . $php_ext . '/') === 0)
|
||||
{
|
||||
$page = substr($page, strlen('app.' . $php_ext . '/'));
|
||||
}
|
||||
|
||||
$page = $phpbb_path_helper->get_phpbb_root_path() . $page;
|
||||
}
|
||||
$page = $phpbb_path_helper->get_valid_page($user->page['page'], $config['enable_mod_rewrite']);
|
||||
|
||||
// Append SID
|
||||
$redirect = append_sid($page, false, false);
|
||||
@@ -2491,13 +2544,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';
|
||||
@@ -2637,7 +2696,7 @@ function check_form_key($form_name, $timespan = false)
|
||||
function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_body.html', $u_action = '')
|
||||
{
|
||||
global $user, $template, $db, $request;
|
||||
global $phpEx, $phpbb_root_path, $request;
|
||||
global $config, $phpbb_path_helper;
|
||||
|
||||
if (isset($_POST['cancel']))
|
||||
{
|
||||
@@ -2699,8 +2758,8 @@ function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_bo
|
||||
}
|
||||
|
||||
// re-add sid / transform & to & for user->page (user->page is always using &)
|
||||
$use_page = ($u_action) ? $phpbb_root_path . $u_action : $phpbb_root_path . str_replace('&', '&', $user->page['page']);
|
||||
$u_action = reapply_sid($use_page);
|
||||
$use_page = ($u_action) ? $u_action : str_replace('&', '&', $user->page['page']);
|
||||
$u_action = reapply_sid($phpbb_path_helper->get_valid_page($use_page, $config['enable_mod_rewrite']));
|
||||
$u_action .= ((strpos($u_action, '?') === false) ? '?' : '&') . 'confirm_key=' . $confirm_key;
|
||||
|
||||
$template->assign_vars(array(
|
||||
@@ -2748,7 +2807,7 @@ function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_bo
|
||||
function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = false, $s_display = true)
|
||||
{
|
||||
global $db, $user, $template, $auth, $phpEx, $phpbb_root_path, $config;
|
||||
global $request, $phpbb_container;
|
||||
global $request, $phpbb_container, $phpbb_dispatcher;
|
||||
|
||||
$err = '';
|
||||
|
||||
@@ -2834,6 +2893,18 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
|
||||
{
|
||||
$redirect = request_var('redirect', "{$phpbb_root_path}index.$phpEx");
|
||||
|
||||
/**
|
||||
* This event allows an extension to modify the redirection when a user successfully logs in
|
||||
*
|
||||
* @event core.login_box_redirect
|
||||
* @var string redirect Redirect string
|
||||
* @var boolean admin Is admin?
|
||||
* @var bool return If true, do not redirect but return the sanitized URL.
|
||||
* @since 3.1.0-RC5
|
||||
*/
|
||||
$vars = array('redirect', 'admin', 'return');
|
||||
extract($phpbb_dispatcher->trigger_event('core.login_box_redirect', compact($vars)));
|
||||
|
||||
// append/replace SID (may change during the session for AOL users)
|
||||
$redirect = reapply_sid($redirect);
|
||||
|
||||
@@ -2855,19 +2926,6 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
|
||||
// Special cases... determine
|
||||
switch ($result['status'])
|
||||
{
|
||||
case LOGIN_ERROR_ATTEMPTS:
|
||||
|
||||
$captcha = $phpbb_container->get('captcha.factory')->get_instance($config['captcha_plugin']);
|
||||
$captcha->init(CONFIRM_LOGIN);
|
||||
// $captcha->reset();
|
||||
|
||||
$template->assign_vars(array(
|
||||
'CAPTCHA_TEMPLATE' => $captcha->get_template(),
|
||||
));
|
||||
|
||||
$err = $user->lang[$result['error_msg']];
|
||||
break;
|
||||
|
||||
case LOGIN_ERROR_PASSWORD_CONVERT:
|
||||
$err = sprintf(
|
||||
$user->lang[$result['error_msg']],
|
||||
@@ -2878,6 +2936,17 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
|
||||
);
|
||||
break;
|
||||
|
||||
case LOGIN_ERROR_ATTEMPTS:
|
||||
|
||||
$captcha = $phpbb_container->get('captcha.factory')->get_instance($config['captcha_plugin']);
|
||||
$captcha->init(CONFIRM_LOGIN);
|
||||
// $captcha->reset();
|
||||
|
||||
$template->assign_vars(array(
|
||||
'CAPTCHA_TEMPLATE' => $captcha->get_template(),
|
||||
));
|
||||
// no break;
|
||||
|
||||
// Username, password, etc...
|
||||
default:
|
||||
$err = $user->lang[$result['error_msg']];
|
||||
@@ -2890,6 +2959,19 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
/**
|
||||
* This event allows an extension to process when a user fails a login attempt
|
||||
*
|
||||
* @event core.login_box_failed
|
||||
* @var array result Login result data
|
||||
* @var string username User name used to login
|
||||
* @var string password Password used to login
|
||||
* @var string err Error message
|
||||
* @since 3.1.3-RC1
|
||||
*/
|
||||
$vars = array('result', 'username', 'password', 'err');
|
||||
extract($phpbb_dispatcher->trigger_event('core.login_box_failed', compact($vars)));
|
||||
}
|
||||
|
||||
// Assign credential for username/password pair
|
||||
@@ -3269,7 +3351,7 @@ function get_preg_expression($mode)
|
||||
case 'email':
|
||||
// Regex written by James Watts and Francisco Jose Martin Moreno
|
||||
// http://fightingforalostcause.net/misc/2006/compare-email-regex.php
|
||||
return '([\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+\.)*(?:[\w\!\#$\%\'\*\+\-\/\=\?\^\`{\|\}\~]|&)+@((((([a-z0-9]{1}[a-z0-9\-]{0,62}[a-z0-9]{1})|[a-z])\.)+[a-z]{2,63})|(\d{1,3}\.){3}\d{1,3}(\:\d{1,5})?)';
|
||||
return '((?:[\w\!\#$\%\&\'\*\+\-\/\=\?\^\`{\|\}\~]+\.)*(?:[\w\!\#$\%\'\*\+\-\/\=\?\^\`{\|\}\~]|&)+)@((((([a-z0-9]{1}[a-z0-9\-]{0,62}[a-z0-9]{1})|[a-z])\.)+[a-z]{2,63})|(\d{1,3}\.){3}\d{1,3}(\:\d{1,5})?)';
|
||||
break;
|
||||
|
||||
case 'bbcode_htm':
|
||||
@@ -3295,23 +3377,33 @@ function get_preg_expression($mode)
|
||||
break;
|
||||
|
||||
case 'url':
|
||||
// generated with regex_idn.php file in the develop folder
|
||||
return "[a-z][a-z\d+\-.]*:/{2}(?:(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'()*+,;=:@|]+|%[\dA-F]{2})+|[0-9.]+|\[[a-z0-9.]+:[a-z0-9.]+:[a-z0-9.:]+\])(?::\d*)?(?:/(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'()*+,;=:@|]+|%[\dA-F]{2})*)*(?:\?(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'()*+,;=:@/?|]+|%[\dA-F]{2})*)?(?:\#(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'()*+,;=:@/?|]+|%[\dA-F]{2})*)?";
|
||||
break;
|
||||
|
||||
case 'url_inline':
|
||||
$inline = ($mode == 'url') ? ')' : '';
|
||||
$scheme = ($mode == 'url') ? '[a-z\d+\-.]' : '[a-z\d+]'; // avoid automatic parsing of "word" in "last word.http://..."
|
||||
// generated with regex generation file in the develop folder
|
||||
return "[a-z]$scheme*:/{2}(?:(?:[a-z0-9\-._~!$&'($inline*+,;=:@|]+|%[\dA-F]{2})+|[0-9.]+|\[[a-z0-9.]+:[a-z0-9.]+:[a-z0-9.:]+\])(?::\d*)?(?:/(?:[a-z0-9\-._~!$&'($inline*+,;=:@|]+|%[\dA-F]{2})*)*(?:\?(?:[a-z0-9\-._~!$&'($inline*+,;=:@/?|]+|%[\dA-F]{2})*)?(?:\#(?:[a-z0-9\-._~!$&'($inline*+,;=:@/?|]+|%[\dA-F]{2})*)?";
|
||||
// generated with regex_idn.php file in the develop folder
|
||||
return "[a-z][a-z\d+]*:/{2}(?:(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'(*+,;=:@|]+|%[\dA-F]{2})+|[0-9.]+|\[[a-z0-9.]+:[a-z0-9.]+:[a-z0-9.:]+\])(?::\d*)?(?:/(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'(*+,;=:@|]+|%[\dA-F]{2})*)*(?:\?(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'(*+,;=:@/?|]+|%[\dA-F]{2})*)?(?:\#(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'(*+,;=:@/?|]+|%[\dA-F]{2})*)?";
|
||||
break;
|
||||
|
||||
case 'www_url':
|
||||
// generated with regex_idn.php file in the develop folder
|
||||
return "www\.(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'()*+,;=:@|]+|%[\dA-F]{2})+(?::\d*)?(?:/(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'()*+,;=:@|]+|%[\dA-F]{2})*)*(?:\?(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'()*+,;=:@/?|]+|%[\dA-F]{2})*)?(?:\#(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'()*+,;=:@/?|]+|%[\dA-F]{2})*)?";
|
||||
break;
|
||||
|
||||
case 'www_url_inline':
|
||||
$inline = ($mode == 'www_url') ? ')' : '';
|
||||
return "www\.(?:[a-z0-9\-._~!$&'($inline*+,;=:@|]+|%[\dA-F]{2})+(?::\d*)?(?:/(?:[a-z0-9\-._~!$&'($inline*+,;=:@|]+|%[\dA-F]{2})*)*(?:\?(?:[a-z0-9\-._~!$&'($inline*+,;=:@/?|]+|%[\dA-F]{2})*)?(?:\#(?:[a-z0-9\-._~!$&'($inline*+,;=:@/?|]+|%[\dA-F]{2})*)?";
|
||||
// generated with regex_idn.php file in the develop folder
|
||||
return "www\.(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'(*+,;=:@|]+|%[\dA-F]{2})+(?::\d*)?(?:/(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'(*+,;=:@|]+|%[\dA-F]{2})*)*(?:\?(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'(*+,;=:@/?|]+|%[\dA-F]{2})*)?(?:\#(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'(*+,;=:@/?|]+|%[\dA-F]{2})*)?";
|
||||
break;
|
||||
|
||||
case 'relative_url':
|
||||
// generated with regex_idn.php file in the develop folder
|
||||
return "(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'()*+,;=:@|]+|%[\dA-F]{2})*(?:/(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'()*+,;=:@|]+|%[\dA-F]{2})*)*(?:\?(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'()*+,;=:@/?|]+|%[\dA-F]{2})*)?(?:\#(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'()*+,;=:@/?|]+|%[\dA-F]{2})*)?";
|
||||
break;
|
||||
|
||||
case 'relative_url_inline':
|
||||
$inline = ($mode == 'relative_url') ? ')' : '';
|
||||
return "(?:[a-z0-9\-._~!$&'($inline*+,;=:@|]+|%[\dA-F]{2})*(?:/(?:[a-z0-9\-._~!$&'($inline*+,;=:@|]+|%[\dA-F]{2})*)*(?:\?(?:[a-z0-9\-._~!$&'($inline*+,;=:@/?|]+|%[\dA-F]{2})*)?(?:\#(?:[a-z0-9\-._~!$&'($inline*+,;=:@/?|]+|%[\dA-F]{2})*)?";
|
||||
// generated with regex_idn.php file in the develop folder
|
||||
return "(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'(*+,;=:@|]+|%[\dA-F]{2})*(?:/(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'(*+,;=:@|]+|%[\dA-F]{2})*)*(?:\?(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'(*+,;=:@/?|]+|%[\dA-F]{2})*)?(?:\#(?:[^\p{C}\p{Z}\p{S}\p{P}\p{Nl}\p{No}\p{Me}\x{1100}-\x{115F}\x{A960}-\x{A97C}\x{1160}-\x{11A7}\x{D7B0}-\x{D7C6}\x{20D0}-\x{20FF}\x{1D100}-\x{1D1FF}\x{1D200}-\x{1D24F}\x{0640}\x{07FA}\x{302E}\x{302F}\x{3031}-\x{3035}\x{303B}]*[\x{00B7}\x{0375}\x{05F3}\x{05F4}\x{30FB}\x{002D}\x{06FD}\x{06FE}\x{0F0B}\x{3007}\x{00DF}\x{03C2}\x{200C}\x{200D}\pL0-9\-._~!$&'(*+,;=:@/?|]+|%[\dA-F]{2})*)?";
|
||||
break;
|
||||
|
||||
case 'table_prefix':
|
||||
@@ -4159,9 +4251,10 @@ function obtain_users_online($item_id = 0, $item = 'forum')
|
||||
*/
|
||||
function obtain_users_online_string($online_users, $item_id = 0, $item = 'forum')
|
||||
{
|
||||
global $config, $db, $user, $auth;
|
||||
global $config, $db, $user, $auth, $phpbb_dispatcher;
|
||||
|
||||
$user_online_link = $online_userlist = '';
|
||||
$guests_online = $hidden_online = $l_online_users = $online_userlist = $visible_online = '';
|
||||
$user_online_link = $rowset = array();
|
||||
// Need caps version of $item for language-strings
|
||||
$item_caps = strtoupper($item);
|
||||
|
||||
@@ -4171,9 +4264,28 @@ function obtain_users_online_string($online_users, $item_id = 0, $item = 'forum'
|
||||
FROM ' . USERS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('user_id', $online_users['online_users']) . '
|
||||
ORDER BY username_clean ASC';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
/**
|
||||
* Modify SQL query to obtain online users data
|
||||
*
|
||||
* @event core.obtain_users_online_string_sql
|
||||
* @var array online_users Array with online users data
|
||||
* from obtain_users_online()
|
||||
* @var int item_id Restrict online users to item id
|
||||
* @var string item Restrict online users to a certain
|
||||
* session item, e.g. forum for
|
||||
* session_forum_id
|
||||
* @var string sql SQL query to obtain users online data
|
||||
* @since 3.1.4-RC1
|
||||
*/
|
||||
$vars = array('online_users', 'item_id', 'item', 'sql');
|
||||
extract($phpbb_dispatcher->trigger_event('core.obtain_users_online_string_sql', compact($vars)));
|
||||
|
||||
$result = $db->sql_query($sql);
|
||||
$rowset = $db->sql_fetchrowset($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
foreach ($rowset as $row)
|
||||
{
|
||||
// User is logged in and therefore not a guest
|
||||
if ($row['user_id'] != ANONYMOUS)
|
||||
@@ -4185,13 +4297,12 @@ function obtain_users_online_string($online_users, $item_id = 0, $item = 'forum'
|
||||
|
||||
if (!isset($online_users['hidden_users'][$row['user_id']]) || $auth->acl_get('u_viewonline'))
|
||||
{
|
||||
$user_online_link = get_username_string(($row['user_type'] <> USER_IGNORE) ? 'full' : 'no_profile', $row['user_id'], $row['username'], $row['user_colour']);
|
||||
$online_userlist .= ($online_userlist != '') ? ', ' . $user_online_link : $user_online_link;
|
||||
$user_online_link[$row['user_id']] = get_username_string(($row['user_type'] <> USER_IGNORE) ? 'full' : 'no_profile', $row['user_id'], $row['username'], $row['user_colour']);
|
||||
}
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
$online_userlist = implode(', ', $user_online_link);
|
||||
|
||||
if (!$online_userlist)
|
||||
{
|
||||
@@ -4224,6 +4335,33 @@ function obtain_users_online_string($online_users, $item_id = 0, $item = 'forum'
|
||||
$l_online_users = $user->lang('ONLINE_USERS_TOTAL', (int) $online_users['total_online'], $visible_online, $hidden_online);
|
||||
}
|
||||
|
||||
/**
|
||||
* Modify online userlist data
|
||||
*
|
||||
* @event core.obtain_users_online_string_modify
|
||||
* @var array online_users Array with online users data
|
||||
* from obtain_users_online()
|
||||
* @var int item_id Restrict online users to item id
|
||||
* @var string item Restrict online users to a certain
|
||||
* session item, e.g. forum for
|
||||
* session_forum_id
|
||||
* @var array rowset Array with online users data
|
||||
* @var array user_online_link Array with online users items (usernames)
|
||||
* @var string online_userlist String containing users online list
|
||||
* @var string l_online_users String with total online users count info
|
||||
* @since 3.1.4-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'online_users',
|
||||
'item_id',
|
||||
'item',
|
||||
'rowset',
|
||||
'user_online_link',
|
||||
'online_userlist',
|
||||
'l_online_users',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.obtain_users_online_string_modify', compact($vars)));
|
||||
|
||||
return array(
|
||||
'online_userlist' => $online_userlist,
|
||||
'l_online_users' => $l_online_users,
|
||||
@@ -4903,7 +5041,7 @@ function page_header($page_title = '', $display_online_list = false, $item_id =
|
||||
}
|
||||
|
||||
$dt = $user->create_datetime();
|
||||
$timezone_offset = 'GMT' . phpbb_format_timezone_offset($dt->getOffset());
|
||||
$timezone_offset = $user->lang(array('timezones', 'UTC_OFFSET'), phpbb_format_timezone_offset($dt->getOffset()));
|
||||
$timezone_name = $user->timezone->getName();
|
||||
if (isset($user->lang['timezones'][$timezone_name]))
|
||||
{
|
||||
@@ -5068,7 +5206,6 @@ function page_header($page_title = '', $display_online_list = false, $item_id =
|
||||
'Content-type' => 'text/html; charset=UTF-8',
|
||||
'Cache-Control' => 'private, no-cache="set-cookie"',
|
||||
'Expires' => gmdate('D, d M Y H:i:s', time()) . ' GMT',
|
||||
'Pragma' => 'no-cache',
|
||||
);
|
||||
if (!empty($user->data['is_bot']))
|
||||
{
|
||||
@@ -5223,7 +5360,7 @@ function page_footer($run_cron = true, $display_template = true, $exit_handler =
|
||||
|
||||
// Call cron-type script
|
||||
$call_cron = false;
|
||||
if (!defined('IN_CRON') && !$config['use_system_cron'] && $run_cron && !$config['board_disable'] && !$user->data['is_bot'] && !$cache->get('cron.lock_check'))
|
||||
if (!defined('IN_CRON') && !$config['use_system_cron'] && $run_cron && !$config['board_disable'] && !$user->data['is_bot'] && !$cache->get('_cron.lock_check'))
|
||||
{
|
||||
$call_cron = true;
|
||||
$time_now = (!empty($user->time_now) && is_int($user->time_now)) ? $user->time_now : time();
|
||||
@@ -5255,10 +5392,22 @@ function page_footer($run_cron = true, $display_template = true, $exit_handler =
|
||||
}
|
||||
else
|
||||
{
|
||||
$cache->put('cron.lock_check', true, 300);
|
||||
$cache->put('_cron.lock_check', true, 60);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute code and/or modify output before displaying the template.
|
||||
*
|
||||
* @event core.page_footer_after
|
||||
* @var bool display_template Whether or not to display the template
|
||||
* @var bool exit_handler Whether or not to run the exit_handler()
|
||||
*
|
||||
* @since 3.1.0-RC5
|
||||
*/
|
||||
$vars = array('display_template', 'exit_handler');
|
||||
extract($phpbb_dispatcher->trigger_event('core.page_footer_after', compact($vars)));
|
||||
|
||||
if ($display_template)
|
||||
{
|
||||
$template->display('body');
|
||||
|
@@ -113,7 +113,6 @@ function adm_page_header($page_title)
|
||||
'Content-type' => 'text/html; charset=UTF-8',
|
||||
'Cache-Control' => 'private, no-cache="set-cookie"',
|
||||
'Expires' => gmdate('D, d M Y H:i:s', time()) . ' GMT',
|
||||
'Pragma' => 'no-cache',
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -551,6 +550,9 @@ function validate_config_vars($config_vars, &$cfg_array, &$error)
|
||||
|
||||
$cfg_array[$config_name] = trim($destination);
|
||||
|
||||
// Absolute file path
|
||||
case 'absolute_path':
|
||||
case 'absolute_path_writable':
|
||||
// Path being relative (still prefixed by phpbb_root_path), but with the ability to escape the root dir...
|
||||
case 'path':
|
||||
case 'wpath':
|
||||
@@ -569,20 +571,22 @@ function validate_config_vars($config_vars, &$cfg_array, &$error)
|
||||
break;
|
||||
}
|
||||
|
||||
if (!file_exists($phpbb_root_path . $cfg_array[$config_name]))
|
||||
$path = in_array($config_definition['validate'], array('wpath', 'path', 'rpath', 'rwpath')) ? $phpbb_root_path . $cfg_array[$config_name] : $cfg_array[$config_name];
|
||||
|
||||
if (!file_exists($path))
|
||||
{
|
||||
$error[] = sprintf($user->lang['DIRECTORY_DOES_NOT_EXIST'], $cfg_array[$config_name]);
|
||||
}
|
||||
|
||||
if (file_exists($phpbb_root_path . $cfg_array[$config_name]) && !is_dir($phpbb_root_path . $cfg_array[$config_name]))
|
||||
if (file_exists($path) && !is_dir($path))
|
||||
{
|
||||
$error[] = sprintf($user->lang['DIRECTORY_NOT_DIR'], $cfg_array[$config_name]);
|
||||
}
|
||||
|
||||
// Check if the path is writable
|
||||
if ($config_definition['validate'] == 'wpath' || $config_definition['validate'] == 'rwpath')
|
||||
if ($config_definition['validate'] == 'wpath' || $config_definition['validate'] == 'rwpath' || $config_definition['validate'] === 'absolute_path_writable')
|
||||
{
|
||||
if (file_exists($phpbb_root_path . $cfg_array[$config_name]) && !phpbb_is_writable($phpbb_root_path . $cfg_array[$config_name]))
|
||||
if (file_exists($path) && !phpbb_is_writable($path))
|
||||
{
|
||||
$error[] = sprintf($user->lang['DIRECTORY_NOT_WRITABLE'], $cfg_array[$config_name]);
|
||||
}
|
||||
|
@@ -618,7 +618,7 @@ function move_posts($post_ids, $topic_id, $auto_sync = true)
|
||||
*/
|
||||
function delete_topics($where_type, $where_ids, $auto_sync = true, $post_count_sync = true, $call_delete_posts = true)
|
||||
{
|
||||
global $db, $config, $phpbb_container;
|
||||
global $db, $config, $phpbb_container, $phpbb_dispatcher;
|
||||
|
||||
$approved_topics = 0;
|
||||
$forum_ids = $topic_ids = array();
|
||||
@@ -672,6 +672,20 @@ function delete_topics($where_type, $where_ids, $auto_sync = true, $post_count_s
|
||||
|
||||
$table_ary = array(BOOKMARKS_TABLE, TOPICS_TRACK_TABLE, TOPICS_POSTED_TABLE, POLL_VOTES_TABLE, POLL_OPTIONS_TABLE, TOPICS_WATCH_TABLE, TOPICS_TABLE);
|
||||
|
||||
/**
|
||||
* Perform additional actions before topic(s) deletion
|
||||
*
|
||||
* @event core.delete_topics_before_query
|
||||
* @var array table_ary Array of tables from which all rows will be deleted that hold a topic_id occuring in topic_ids
|
||||
* @var array topic_ids Array of topic ids to delete
|
||||
* @since 3.1.4-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'table_ary',
|
||||
'topic_ids',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.delete_topics_before_query', compact($vars)));
|
||||
|
||||
foreach ($table_ary as $table)
|
||||
{
|
||||
$sql = "DELETE FROM $table
|
||||
@@ -680,6 +694,18 @@ function delete_topics($where_type, $where_ids, $auto_sync = true, $post_count_s
|
||||
}
|
||||
unset($table_ary);
|
||||
|
||||
/**
|
||||
* Perform additional actions after topic(s) deletion
|
||||
*
|
||||
* @event core.delete_topics_after_query
|
||||
* @var array topic_ids Array of topic ids that were deleted
|
||||
* @since 3.1.4-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'topic_ids',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.delete_topics_after_query', compact($vars)));
|
||||
|
||||
$moved_topic_ids = array();
|
||||
|
||||
// update the other forums
|
||||
@@ -2311,7 +2337,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
*/
|
||||
function prune($forum_id, $prune_mode, $prune_date, $prune_flags = 0, $auto_sync = true)
|
||||
{
|
||||
global $db;
|
||||
global $db, $phpbb_dispatcher;
|
||||
|
||||
if (!is_array($forum_id))
|
||||
{
|
||||
@@ -2351,6 +2377,21 @@ function prune($forum_id, $prune_mode, $prune_date, $prune_flags = 0, $auto_sync
|
||||
$sql_and .= ' AND topic_status = ' . ITEM_MOVED . " AND topic_last_post_time < $prune_date";
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this event to modify the SQL that selects topics to be pruned
|
||||
*
|
||||
* @event core.prune_sql
|
||||
* @var string forum_id The forum id
|
||||
* @var string prune_mode The prune mode
|
||||
* @var string prune_date The prune date
|
||||
* @var int prune_flags The prune flags
|
||||
* @var bool auto_sync Whether or not to perform auto sync
|
||||
* @var string sql_and SQL text appended to where clause
|
||||
* @since 3.1.3-RC1
|
||||
*/
|
||||
$vars = array('forum_id', 'prune_mode', 'prune_date', 'prune_flags', 'auto_sync', 'sql_and');
|
||||
extract($phpbb_dispatcher->trigger_event('core.prune_sql', compact($vars)));
|
||||
|
||||
$sql = 'SELECT topic_id
|
||||
FROM ' . TOPICS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('forum_id', $forum_id) . "
|
||||
@@ -2512,6 +2553,7 @@ function phpbb_cache_moderators($db, $cache, $auth)
|
||||
{
|
||||
$usernames_ary[$row['user_id']] = $row['username'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
foreach ($hold_ary as $user_id => $forum_id_ary)
|
||||
{
|
||||
@@ -2806,6 +2848,7 @@ function view_inactive_users(&$users, &$user_count, $limit = 0, $offset = 0, $li
|
||||
|
||||
$users[] = $row;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
return $offset;
|
||||
}
|
||||
@@ -2980,68 +3023,21 @@ function get_database_size()
|
||||
|
||||
/**
|
||||
* Retrieve contents from remotely stored file
|
||||
*
|
||||
* @deprecated 3.1.2 Use file_downloader instead
|
||||
*/
|
||||
function get_remote_file($host, $directory, $filename, &$errstr, &$errno, $port = 80, $timeout = 6)
|
||||
{
|
||||
global $user;
|
||||
global $phpbb_container;
|
||||
|
||||
if ($fsock = @fsockopen($host, $port, $errno, $errstr, $timeout))
|
||||
{
|
||||
@fputs($fsock, "GET $directory/$filename HTTP/1.0\r\n");
|
||||
@fputs($fsock, "HOST: $host\r\n");
|
||||
@fputs($fsock, "Connection: close\r\n\r\n");
|
||||
// Get file downloader and assign $errstr and $errno
|
||||
$file_downloader = $phpbb_container->get('file_downloader');
|
||||
|
||||
$timer_stop = time() + $timeout;
|
||||
stream_set_timeout($fsock, $timeout);
|
||||
$file_data = $file_downloader->get($host, $directory, $filename, $port, $timeout);
|
||||
$errstr = $file_downloader->get_error_string();
|
||||
$errno = $file_downloader->get_error_number();
|
||||
|
||||
$file_info = '';
|
||||
$get_info = false;
|
||||
|
||||
while (!@feof($fsock))
|
||||
{
|
||||
if ($get_info)
|
||||
{
|
||||
$file_info .= @fread($fsock, 1024);
|
||||
}
|
||||
else
|
||||
{
|
||||
$line = @fgets($fsock, 1024);
|
||||
if ($line == "\r\n")
|
||||
{
|
||||
$get_info = true;
|
||||
}
|
||||
else if (stripos($line, '404 not found') !== false)
|
||||
{
|
||||
$errstr = $user->lang('FILE_NOT_FOUND', $filename);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$stream_meta_data = stream_get_meta_data($fsock);
|
||||
|
||||
if (!empty($stream_meta_data['timed_out']) || time() >= $timer_stop)
|
||||
{
|
||||
$errstr = $user->lang['FSOCK_TIMEOUT'];
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@fclose($fsock);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($errstr)
|
||||
{
|
||||
$errstr = utf8_convert_message($errstr);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$errstr = $user->lang['FSOCK_DISABLED'];
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return $file_info;
|
||||
return $file_data;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@@ -101,18 +101,21 @@ function phpbb_clean_path($path)
|
||||
}
|
||||
else if (!$phpbb_path_helper)
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
|
||||
// The container is not yet loaded, use a new instance
|
||||
if (!class_exists('\phpbb\path_helper'))
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
require($phpbb_root_path . 'phpbb/path_helper.' . $phpEx);
|
||||
}
|
||||
|
||||
$request = new phpbb\request\request();
|
||||
$phpbb_path_helper = new phpbb\path_helper(
|
||||
new phpbb\symfony_request(
|
||||
new phpbb\request\request()
|
||||
$request
|
||||
),
|
||||
new phpbb\filesystem(),
|
||||
$request,
|
||||
$phpbb_root_path,
|
||||
$phpEx
|
||||
);
|
||||
@@ -133,10 +136,9 @@ function phpbb_clean_path($path)
|
||||
*/
|
||||
function tz_select($default = '', $truncate = false)
|
||||
{
|
||||
global $user;
|
||||
global $template, $user;
|
||||
|
||||
$timezone_select = phpbb_timezone_select($user, $default, $truncate);
|
||||
return $timezone_select['tz_select'];
|
||||
return phpbb_timezone_select($template, $user, $default, $truncate);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -166,3 +168,30 @@ function update_foes($group_id = false, $user_id = false)
|
||||
global $db, $auth;
|
||||
return phpbb_update_foes($db, $auth, $group_id, $user_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user rank title and image
|
||||
*
|
||||
* @param int $user_rank the current stored users rank id
|
||||
* @param int $user_posts the users number of posts
|
||||
* @param string &$rank_title the rank title will be stored here after execution
|
||||
* @param string &$rank_img the rank image as full img tag is stored here after execution
|
||||
* @param string &$rank_img_src the rank image source is stored here after execution
|
||||
*
|
||||
* @deprecated 3.1.0-RC5 (To be removed: 3.3.0)
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
function get_user_rank($user_rank, $user_posts, &$rank_title, &$rank_img, &$rank_img_src)
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
if (!function_exists('phpbb_get_user_rank'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
|
||||
}
|
||||
|
||||
$rank_data = phpbb_get_user_rank(array('user_rank' => $user_rank), $user_posts);
|
||||
$rank_title = $rank_data['title'];
|
||||
$rank_img = $rank_data['img'];
|
||||
$rank_img_src = $rank_data['img_src'];
|
||||
}
|
||||
|
@@ -509,7 +509,7 @@ class compress_zip extends compress
|
||||
|
||||
$mimetype = 'application/zip';
|
||||
|
||||
header('Pragma: no-cache');
|
||||
header('Cache-Control: private, no-cache');
|
||||
header("Content-Type: $mimetype; name=\"$download_name.zip\"");
|
||||
header("Content-disposition: attachment; filename=$download_name.zip");
|
||||
|
||||
@@ -757,7 +757,7 @@ class compress_tar extends compress
|
||||
break;
|
||||
}
|
||||
|
||||
header('Pragma: no-cache');
|
||||
header('Cache-Control: private, no-cache');
|
||||
header("Content-Type: $mimetype; name=\"$download_name$this->type\"");
|
||||
header("Content-disposition: attachment; filename=$download_name$this->type");
|
||||
|
||||
|
@@ -78,7 +78,7 @@ function gen_sort_selects(&$limit_days, &$sort_by_text, &$sort_days, &$sort_key,
|
||||
foreach ($sorts as $name => $sort_ary)
|
||||
{
|
||||
$key = $sort_ary['key'];
|
||||
$selected = $$sort_ary['key'];
|
||||
$selected = ${$sort_ary['key']};
|
||||
|
||||
// Check if the key is selectable. If not, we reset to the default or first key found.
|
||||
// This ensures the values are always valid. We also set $sort_dir/sort_key/etc. to the
|
||||
@@ -87,12 +87,12 @@ function gen_sort_selects(&$limit_days, &$sort_by_text, &$sort_days, &$sort_key,
|
||||
{
|
||||
if ($sort_ary['default'] !== false)
|
||||
{
|
||||
$selected = $$key = $sort_ary['default'];
|
||||
$selected = ${$key} = $sort_ary['default'];
|
||||
}
|
||||
else
|
||||
{
|
||||
@reset($sort_ary['options']);
|
||||
$selected = $$key = key($sort_ary['options']);
|
||||
$selected = ${$key} = key($sort_ary['options']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -712,7 +712,7 @@ function make_clickable_callback($type, $whitespace, $url, $relative_url, $class
|
||||
break;
|
||||
}
|
||||
|
||||
$short_url = (strlen($url) > 55) ? substr($url, 0, 39) . ' ... ' . substr($url, -10) : $url;
|
||||
$short_url = (utf8_strlen($url) > 55) ? utf8_substr($url, 0, 39) . ' ... ' . utf8_substr($url, -10) : $url;
|
||||
|
||||
switch ($type)
|
||||
{
|
||||
@@ -788,28 +788,28 @@ function make_clickable($text, $server_url = false, $class = 'postlink')
|
||||
|
||||
// relative urls for this board
|
||||
$magic_url_match_args[$server_url][] = array(
|
||||
'#(^|[\n\t (>.])(' . preg_quote($server_url, '#') . ')/(' . get_preg_expression('relative_url_inline') . ')#i',
|
||||
'#(^|[\n\t (>.])(' . preg_quote($server_url, '#') . ')/(' . get_preg_expression('relative_url_inline') . ')#iu',
|
||||
MAGIC_URL_LOCAL,
|
||||
$local_class,
|
||||
);
|
||||
|
||||
// matches a xxxx://aaaaa.bbb.cccc. ...
|
||||
$magic_url_match_args[$server_url][] = array(
|
||||
'#(^|[\n\t (>.])(' . get_preg_expression('url_inline') . ')#i',
|
||||
'#(^|[\n\t (>.])(' . get_preg_expression('url_inline') . ')#iu',
|
||||
MAGIC_URL_FULL,
|
||||
$class,
|
||||
);
|
||||
|
||||
// matches a "www.xxxx.yyyy[/zzzz]" kinda lazy URL thing
|
||||
$magic_url_match_args[$server_url][] = array(
|
||||
'#(^|[\n\t (>])(' . get_preg_expression('www_url_inline') . ')#i',
|
||||
'#(^|[\n\t (>])(' . get_preg_expression('www_url_inline') . ')#iu',
|
||||
MAGIC_URL_WWW,
|
||||
$class,
|
||||
);
|
||||
|
||||
// matches an email@domain type address at the start of a line, or after a space or after what might be a BBCode.
|
||||
$magic_url_match_args[$server_url][] = array(
|
||||
'/(^|[\n\t (>])(' . get_preg_expression('email') . ')/i',
|
||||
'/(^|[\n\t (>])(' . get_preg_expression('email') . ')/iu',
|
||||
MAGIC_URL_EMAIL,
|
||||
'',
|
||||
);
|
||||
@@ -912,7 +912,7 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count,
|
||||
return;
|
||||
}
|
||||
|
||||
global $template, $cache, $user;
|
||||
global $template, $cache, $user, $phpbb_dispatcher;
|
||||
global $extensions, $config, $phpbb_root_path, $phpEx;
|
||||
|
||||
//
|
||||
@@ -1187,6 +1187,34 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this event to modify the attachment template data.
|
||||
*
|
||||
* This event is triggered once per attachment.
|
||||
*
|
||||
* @event core.parse_attachments_modify_template_data
|
||||
* @var array attachment Array with attachment data
|
||||
* @var array block_array Template data of the attachment
|
||||
* @var int display_cat Attachment category data
|
||||
* @var string download_link Attachment download link
|
||||
* @var array extensions Array with attachment extensions data
|
||||
* @var mixed forum_id The forum id the attachments are displayed in (false if in private message)
|
||||
* @var bool preview Flag indicating if we are in post preview mode
|
||||
* @var array update_count Array with attachment ids to update download count
|
||||
* @since 3.1.0-RC5
|
||||
*/
|
||||
$vars = array(
|
||||
'attachment',
|
||||
'block_array',
|
||||
'display_cat',
|
||||
'download_link',
|
||||
'extensions',
|
||||
'forum_id',
|
||||
'preview',
|
||||
'update_count',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.parse_attachments_modify_template_data', compact($vars)));
|
||||
|
||||
$template->assign_block_vars('_file', $block_array);
|
||||
|
||||
$compiled_attachments[] = $template->assign_display('attachment_tpl');
|
||||
|
@@ -2148,6 +2148,7 @@ function fix_empty_primary_groups()
|
||||
}
|
||||
|
||||
$sql = 'SELECT user_id FROM ' . USER_GROUP_TABLE . ' WHERE group_id = ' . get_group_id('global_moderators');
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$user_ids = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
|
@@ -375,6 +375,28 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||
get_moderators($forum_moderators, $forum_ids_moderator);
|
||||
}
|
||||
|
||||
/**
|
||||
* Event to perform additional actions before the forum list is being generated
|
||||
*
|
||||
* @event core.display_forums_before
|
||||
* @var array active_forum_ary Array with forum data to display active topics
|
||||
* @var bool display_moderators Flag indicating if we display forum moderators
|
||||
* @var array forum_moderators Array with forum moderators list
|
||||
* @var array forum_rows Data array of all forums we display
|
||||
* @var bool return_moderators Flag indicating if moderators list should be returned
|
||||
* @var array root_data Array with the root forum data
|
||||
* @since 3.1.4-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'active_forum_ary',
|
||||
'display_moderators',
|
||||
'forum_moderators',
|
||||
'forum_rows',
|
||||
'return_moderators',
|
||||
'root_data',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.display_forums_before', compact($vars)));
|
||||
|
||||
// Used to tell whatever we have to create a dummy category or not.
|
||||
$last_catless = true;
|
||||
foreach ($forum_rows as $row)
|
||||
@@ -649,6 +671,28 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||
'UNAPPROVED_POST_IMG' => $user->img('icon_topic_unapproved', 'POSTS_UNAPPROVED_FORUM'),
|
||||
));
|
||||
|
||||
/**
|
||||
* Event to perform additional actions after the forum list has been generated
|
||||
*
|
||||
* @event core.display_forums_after
|
||||
* @var array active_forum_ary Array with forum data to display active topics
|
||||
* @var bool display_moderators Flag indicating if we display forum moderators
|
||||
* @var array forum_moderators Array with forum moderators list
|
||||
* @var array forum_rows Data array of all forums we display
|
||||
* @var bool return_moderators Flag indicating if moderators list should be returned
|
||||
* @var array root_data Array with the root forum data
|
||||
* @since 3.1.0-RC5
|
||||
*/
|
||||
$vars = array(
|
||||
'active_forum_ary',
|
||||
'display_moderators',
|
||||
'forum_moderators',
|
||||
'forum_rows',
|
||||
'return_moderators',
|
||||
'root_data',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.display_forums_after', compact($vars)));
|
||||
|
||||
if ($return_moderators)
|
||||
{
|
||||
return array($active_forum_ary, $forum_moderators);
|
||||
@@ -1402,17 +1446,34 @@ function watch_topic_forum($mode, &$s_watching, $user_id, $forum_id, $topic_id,
|
||||
/**
|
||||
* Get user rank title and image
|
||||
*
|
||||
* @param int $user_rank the current stored users rank id
|
||||
* @param array $user_data the current stored users data
|
||||
* @param int $user_posts the users number of posts
|
||||
* @param string &$rank_title the rank title will be stored here after execution
|
||||
* @param string &$rank_img the rank image as full img tag is stored here after execution
|
||||
* @param string &$rank_img_src the rank image source is stored here after execution
|
||||
*
|
||||
* @return array An associative array containing the rank title (title), the rank image source (img) and the rank image as full img tag (img)
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
function get_user_rank($user_rank, $user_posts, &$rank_title, &$rank_img, &$rank_img_src)
|
||||
function phpbb_get_user_rank($user_data, $user_posts)
|
||||
{
|
||||
global $ranks, $config, $phpbb_root_path, $phpbb_path_helper;
|
||||
global $ranks, $config, $phpbb_root_path, $phpbb_path_helper, $phpbb_dispatcher;
|
||||
|
||||
$user_rank_data = array(
|
||||
'title' => null,
|
||||
'img' => null,
|
||||
'img_src' => null,
|
||||
);
|
||||
|
||||
/**
|
||||
* Preparing a user's rank before displaying
|
||||
*
|
||||
* @event core.modify_user_rank
|
||||
* @var array user_data Array with user's data
|
||||
* @var int user_posts User_posts to change
|
||||
* @since 3.1.0-RC4
|
||||
*/
|
||||
|
||||
$vars = array('user_data', 'user_posts');
|
||||
extract($phpbb_dispatcher->trigger_event('core.modify_user_rank', compact($vars)));
|
||||
|
||||
if (empty($ranks))
|
||||
{
|
||||
@@ -1420,11 +1481,14 @@ function get_user_rank($user_rank, $user_posts, &$rank_title, &$rank_img, &$rank
|
||||
$ranks = $cache->obtain_ranks();
|
||||
}
|
||||
|
||||
if (!empty($user_rank))
|
||||
if (!empty($user_data['user_rank']))
|
||||
{
|
||||
$rank_title = (isset($ranks['special'][$user_rank]['rank_title'])) ? $ranks['special'][$user_rank]['rank_title'] : '';
|
||||
$rank_img_src = (!empty($ranks['special'][$user_rank]['rank_image'])) ? $phpbb_path_helper->update_web_root_path($phpbb_root_path . $config['ranks_path'] . '/' . $ranks['special'][$user_rank]['rank_image']) : '';
|
||||
$rank_img = (!empty($ranks['special'][$user_rank]['rank_image'])) ? '<img src="' . $rank_img_src . '" alt="' . $ranks['special'][$user_rank]['rank_title'] . '" title="' . $ranks['special'][$user_rank]['rank_title'] . '" />' : '';
|
||||
|
||||
$user_rank_data['title'] = (isset($ranks['special'][$user_data['user_rank']]['rank_title'])) ? $ranks['special'][$user_data['user_rank']]['rank_title'] : '';
|
||||
|
||||
$user_rank_data['img_src'] = (!empty($ranks['special'][$user_data['user_rank']]['rank_image'])) ? $phpbb_path_helper->update_web_root_path($phpbb_root_path . $config['ranks_path'] . '/' . $ranks['special'][$user_data['user_rank']]['rank_image']) : '';
|
||||
|
||||
$user_rank_data['img'] = (!empty($ranks['special'][$user_data['user_rank']]['rank_image'])) ? '<img src="' . $user_rank_data['img_src'] . '" alt="' . $ranks['special'][$user_data['user_rank']]['rank_title'] . '" title="' . $ranks['special'][$user_data['user_rank']]['rank_title'] . '" />' : '';
|
||||
}
|
||||
else if ($user_posts !== false)
|
||||
{
|
||||
@@ -1434,28 +1498,29 @@ function get_user_rank($user_rank, $user_posts, &$rank_title, &$rank_img, &$rank
|
||||
{
|
||||
if ($user_posts >= $rank['rank_min'])
|
||||
{
|
||||
$rank_title = $rank['rank_title'];
|
||||
$rank_img_src = (!empty($rank['rank_image'])) ? $phpbb_path_helper->update_web_root_path($phpbb_root_path . $config['ranks_path'] . '/' . $rank['rank_image']) : '';
|
||||
$rank_img = (!empty($rank['rank_image'])) ? '<img src="' . $rank_img_src . '" alt="' . $rank['rank_title'] . '" title="' . $rank['rank_title'] . '" />' : '';
|
||||
$user_rank_data['title'] = $rank['rank_title'];
|
||||
$user_rank_data['img_src'] = (!empty($rank['rank_image'])) ? $phpbb_path_helper->update_web_root_path($phpbb_root_path . $config['ranks_path'] . '/' . $rank['rank_image']) : '';
|
||||
$user_rank_data['img'] = (!empty($rank['rank_image'])) ? '<img src="' . $user_rank_data['img_src'] . '" alt="' . $rank['rank_title'] . '" title="' . $rank['rank_title'] . '" />' : '';
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $user_rank_data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare profile data
|
||||
*/
|
||||
function phpbb_show_profile($data, $user_notes_enabled = false, $warn_user_enabled = false)
|
||||
function phpbb_show_profile($data, $user_notes_enabled = false, $warn_user_enabled = false, $check_can_receive_pm = true)
|
||||
{
|
||||
global $config, $auth, $user, $phpEx, $phpbb_root_path, $phpbb_dispatcher;
|
||||
|
||||
$username = $data['username'];
|
||||
$user_id = $data['user_id'];
|
||||
|
||||
$rank_title = $rank_img = $rank_img_src = '';
|
||||
get_user_rank($data['user_rank'], (($user_id == ANONYMOUS) ? false : $data['user_posts']), $rank_title, $rank_img, $rank_img_src);
|
||||
$user_rank_data = phpbb_get_user_rank($data, (($user_id == ANONYMOUS) ? false : $data['user_posts']));
|
||||
|
||||
if ((!empty($data['user_allow_viewemail']) && $auth->acl_get('u_sendemail')) || $auth->acl_get('a_user'))
|
||||
{
|
||||
@@ -1516,7 +1581,7 @@ function phpbb_show_profile($data, $user_notes_enabled = false, $warn_user_enabl
|
||||
}
|
||||
|
||||
// Can this user receive a Private Message?
|
||||
$can_receive_pm = (
|
||||
$can_receive_pm = $check_can_receive_pm && (
|
||||
// They must be a "normal" user
|
||||
$data['user_type'] != USER_IGNORE &&
|
||||
|
||||
@@ -1536,7 +1601,7 @@ function phpbb_show_profile($data, $user_notes_enabled = false, $warn_user_enabl
|
||||
// Dump it out to the template
|
||||
$template_data = array(
|
||||
'AGE' => $age,
|
||||
'RANK_TITLE' => $rank_title,
|
||||
'RANK_TITLE' => $user_rank_data['title'],
|
||||
'JOINED' => $user->format_date($data['user_regdate']),
|
||||
'LAST_ACTIVE' => (empty($last_active)) ? ' - ' : $user->format_date($last_active),
|
||||
'POSTS' => ($data['user_posts']) ? $data['user_posts'] : 0,
|
||||
@@ -1552,8 +1617,8 @@ function phpbb_show_profile($data, $user_notes_enabled = false, $warn_user_enabl
|
||||
'AVATAR_IMG' => phpbb_get_user_avatar($data),
|
||||
'ONLINE_IMG' => (!$config['load_onlinetrack']) ? '' : (($online) ? $user->img('icon_user_online', 'ONLINE') : $user->img('icon_user_offline', 'OFFLINE')),
|
||||
'S_ONLINE' => ($config['load_onlinetrack'] && $online) ? true : false,
|
||||
'RANK_IMG' => $rank_img,
|
||||
'RANK_IMG_SRC' => $rank_img_src,
|
||||
'RANK_IMG' => $user_rank_data['img'],
|
||||
'RANK_IMG_SRC' => $user_rank_data['img_src'],
|
||||
'S_JABBER_ENABLED' => ($config['jab_enable']) ? true : false,
|
||||
|
||||
'S_WARNINGS' => ($auth->acl_getf_global('m_') || $auth->acl_get('m_warn')) ? true : false,
|
||||
@@ -1565,8 +1630,8 @@ function phpbb_show_profile($data, $user_notes_enabled = false, $warn_user_enabl
|
||||
'U_EMAIL' => $email,
|
||||
'U_JABBER' => ($data['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=contact&action=jabber&u=' . $user_id) : '',
|
||||
|
||||
'USER_JABBER' => $data['user_jabber'],
|
||||
'USER_JABBER_IMG' => ($data['user_jabber']) ? $user->img('icon_contact_jabber', $data['user_jabber']) : '',
|
||||
'USER_JABBER' => ($config['jab_enable']) ? $data['user_jabber'] : '',
|
||||
'USER_JABBER_IMG' => ($config['jab_enable'] && $data['user_jabber']) ? $user->img('icon_contact_jabber', $data['user_jabber']) : '',
|
||||
|
||||
'L_SEND_EMAIL_USER' => $user->lang('SEND_EMAIL_USER', $username),
|
||||
'L_CONTACT_USER' => $user->lang('CONTACT_USER', $username),
|
||||
|
@@ -45,12 +45,12 @@ function send_avatar_to_browser($file, $browser)
|
||||
|
||||
if ((@file_exists($file_path) && @is_readable($file_path)) && !headers_sent())
|
||||
{
|
||||
header('Pragma: public');
|
||||
header('Cache-Control: public');
|
||||
|
||||
$image_data = @getimagesize($file_path);
|
||||
header('Content-Type: ' . image_type_to_mime_type($image_data[2]));
|
||||
|
||||
if ((strpos(strtolower($user->browser), 'msie') !== false) && !phpbb_is_greater_ie_version($browser, 7))
|
||||
if ((strpos(strtolower($browser), 'msie') !== false) && !phpbb_is_greater_ie_version($browser, 7))
|
||||
{
|
||||
header('Content-Disposition: attachment; ' . header_filename($file));
|
||||
|
||||
@@ -175,7 +175,7 @@ function send_file_to_browser($attachment, $upload_dir, $category)
|
||||
}
|
||||
|
||||
// Now the tricky part... let's dance
|
||||
header('Pragma: public');
|
||||
header('Cache-Control: public');
|
||||
|
||||
// Send out the Headers. Do not set Content-Disposition to inline please, it is a security measure for users using the Internet Explorer.
|
||||
header('Content-Type: ' . $attachment['mimetype']);
|
||||
@@ -210,11 +210,6 @@ function send_file_to_browser($attachment, $upload_dir, $category)
|
||||
}
|
||||
}
|
||||
|
||||
if ($size)
|
||||
{
|
||||
header("Content-Length: $size");
|
||||
}
|
||||
|
||||
// Close the db connection before sending the file etc.
|
||||
file_gc(false);
|
||||
|
||||
@@ -238,6 +233,11 @@ function send_file_to_browser($attachment, $upload_dir, $category)
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($size)
|
||||
{
|
||||
header("Content-Length: $size");
|
||||
}
|
||||
|
||||
// Try to deliver in chunks
|
||||
@set_time_limit(0);
|
||||
|
||||
@@ -420,7 +420,7 @@ function set_modified_headers($stamp, $browser)
|
||||
{
|
||||
send_status_line(304, 'Not Modified');
|
||||
// seems that we need those too ... browsers
|
||||
header('Pragma: public');
|
||||
header('Cache-Control: public');
|
||||
header('Expires: ' . gmdate('D, d M Y H:i:s', time() + 31536000) . ' GMT');
|
||||
return true;
|
||||
}
|
||||
|
@@ -368,7 +368,7 @@ function phpbb_get_pm_data($pm_ids)
|
||||
*/
|
||||
function phpbb_mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql, &$sort_order_sql, &$total, $forum_id = 0, $topic_id = 0, $where_sql = 'WHERE')
|
||||
{
|
||||
global $db, $user, $auth, $template;
|
||||
global $db, $user, $auth, $template, $phpbb_dispatcher;
|
||||
|
||||
$sort_days = request_var('st', 0);
|
||||
$min_time = ($sort_days) ? time() - ($sort_days * 86400) : 0;
|
||||
@@ -553,6 +553,56 @@ function phpbb_mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by
|
||||
break;
|
||||
}
|
||||
|
||||
// Default total to -1 to allow editing by the event
|
||||
$total = -1;
|
||||
|
||||
/**
|
||||
* This event allows you to control the SQL query used to get the total number
|
||||
* of reports the user can access.
|
||||
*
|
||||
* This total is used for the pagination and for displaying the total number
|
||||
* of reports to the user
|
||||
*
|
||||
*
|
||||
* @event core.mcp_sorting_query_before
|
||||
* @var string sql The current SQL search string
|
||||
* @var string mode An id related to the module(s) the user is viewing
|
||||
* @var string type Which kind of information is this being used for displaying. Posts, topics, etc...
|
||||
* @var int forum_id The forum id of the posts the user is trying to access, if not 0
|
||||
* @var int topic_id The topic id of the posts the user is trying to access, if not 0
|
||||
* @var int sort_days The max age of the oldest report to be shown, in days
|
||||
* @var string sort_key The way the user has decided to sort the data.
|
||||
* The valid values must be in the keys of the sort_by_* variables
|
||||
* @var string sort_dir Either 'd' for "DESC" or 'a' for 'ASC' in the SQL query
|
||||
* @var int limit_days The possible max ages of the oldest report for the user to choose, in days.
|
||||
* @var array sort_by_sql SQL text (values) for the possible names of the ways of sorting data (keys).
|
||||
* @var array sort_by_text Language text (values) for the possible names of the ways of sorting data (keys).
|
||||
* @var int min_time Integer with the minimum post time that the user is searching for
|
||||
* @var int limit_time_sql Time limiting options used in the SQL query.
|
||||
* @var int total The total number of reports that exist. Only set if you want to override the result
|
||||
* @var string where_sql Extra information included in the WHERE clause. It must end with "WHERE" or "AND" or "OR".
|
||||
* Set to "WHERE" and set total above -1 to override the total value
|
||||
* @since 3.1.4-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'sql',
|
||||
'mode',
|
||||
'type',
|
||||
'forum_id',
|
||||
'topic_id',
|
||||
'sort_days',
|
||||
'sort_key',
|
||||
'sort_dir',
|
||||
'limit_days',
|
||||
'sort_by_sql',
|
||||
'sort_by_text',
|
||||
'min_time',
|
||||
'limit_time_sql',
|
||||
'total',
|
||||
'where_sql',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.mcp_sorting_query_before', compact($vars)));
|
||||
|
||||
if (!isset($sort_by_sql[$sort_key]))
|
||||
{
|
||||
$sort_key = $default_key;
|
||||
@@ -584,7 +634,7 @@ function phpbb_mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by
|
||||
$total = (int) $db->sql_fetchfield('total');
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
else
|
||||
else if ($total < -1)
|
||||
{
|
||||
$total = -1;
|
||||
}
|
||||
|
@@ -510,7 +510,7 @@ class messenger
|
||||
|
||||
foreach ($address_ary as $which_ary)
|
||||
{
|
||||
$$type .= (($$type != '') ? ', ' : '') . (($which_ary['name'] != '') ? mail_encode($which_ary['name'], $encode_eol) . ' <' . $which_ary['email'] . '>' : $which_ary['email']);
|
||||
${$type} .= ((${$type} != '') ? ', ' : '') . (($which_ary['name'] != '') ? mail_encode($which_ary['name'], $encode_eol) . ' <' . $which_ary['email'] . '>' : $which_ary['email']);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1036,8 +1036,8 @@ function load_drafts($topic_id = 0, $forum_id = 0, $id = 0, $pm_action = '', $ms
|
||||
*/
|
||||
function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id = 0, $show_quote_button = true)
|
||||
{
|
||||
global $user, $auth, $db, $template, $bbcode, $cache;
|
||||
global $config, $phpbb_root_path, $phpEx, $phpbb_container;
|
||||
global $user, $auth, $db, $template, $cache;
|
||||
global $config, $phpbb_root_path, $phpEx, $phpbb_container, $phpbb_dispatcher;
|
||||
|
||||
$phpbb_content_visibility = $phpbb_container->get('content.visibility');
|
||||
$sql_sort = ($mode == 'post_review') ? 'ASC' : 'DESC';
|
||||
@@ -1094,13 +1094,11 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
|
||||
$sql = $db->sql_build_query('SELECT', $sql_ary);
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$bbcode_bitfield = '';
|
||||
$rowset = array();
|
||||
$has_attachments = false;
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$rowset[$row['post_id']] = $row;
|
||||
$bbcode_bitfield = $bbcode_bitfield | base64_decode($row['bbcode_bitfield']);
|
||||
|
||||
if ($row['post_attachment'])
|
||||
{
|
||||
@@ -1109,13 +1107,6 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// Instantiate BBCode class
|
||||
if (!isset($bbcode) && $bbcode_bitfield !== '')
|
||||
{
|
||||
include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx);
|
||||
$bbcode = new bbcode(base64_encode($bbcode_bitfield));
|
||||
}
|
||||
|
||||
// Grab extensions
|
||||
$extensions = $attachments = array();
|
||||
if ($has_attachments && $auth->acl_get('u_download') && $auth->acl_get('f_download', $forum_id))
|
||||
@@ -1176,7 +1167,7 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
|
||||
$post_anchor = ($mode == 'post_review') ? 'ppr' . $row['post_id'] : 'pr' . $row['post_id'];
|
||||
$u_show_post = append_sid($phpbb_root_path . 'viewtopic.' . $phpEx, "f=$forum_id&t=$topic_id&p={$row['post_id']}&view=show#p{$row['post_id']}");
|
||||
|
||||
$template->assign_block_vars($mode . '_row', array(
|
||||
$post_row = array(
|
||||
'POST_AUTHOR_FULL' => get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
|
||||
'POST_AUTHOR_COLOUR' => get_username_string('colour', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
|
||||
'POST_AUTHOR' => get_username_string('username', $poster_id, $row['username'], $row['user_colour'], $row['post_username']),
|
||||
@@ -1195,9 +1186,37 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
|
||||
'POST_ID' => $row['post_id'],
|
||||
'U_MINI_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'p=' . $row['post_id']) . '#p' . $row['post_id'],
|
||||
'U_MCP_DETAILS' => ($auth->acl_get('m_info', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&mode=post_details&f=' . $forum_id . '&p=' . $row['post_id'], true, $user->session_id) : '',
|
||||
'POSTER_QUOTE' => ($show_quote_button && $auth->acl_get('f_reply', $forum_id)) ? addslashes(get_username_string('username', $poster_id, $row['username'], $row['user_colour'], $row['post_username'])) : '')
|
||||
'POSTER_QUOTE' => ($show_quote_button && $auth->acl_get('f_reply', $forum_id)) ? addslashes(get_username_string('username', $poster_id, $row['username'], $row['user_colour'], $row['post_username'])) : '',
|
||||
);
|
||||
|
||||
$current_row_number = $i;
|
||||
|
||||
/**
|
||||
* Event to modify the template data block for topic reviews
|
||||
*
|
||||
* @event core.topic_review_modify_row
|
||||
* @var string mode The review mode
|
||||
* @var int topic_id The topic that is being reviewed
|
||||
* @var int forum_id The topic's forum
|
||||
* @var int cur_post_id Post offset id
|
||||
* @var int current_row_number Number of the current row being iterated
|
||||
* @var array post_row Template block array of the current post
|
||||
* @var array row Array with original post and user data
|
||||
* @since 3.1.4-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'mode',
|
||||
'topic_id',
|
||||
'forum_id',
|
||||
'cur_post_id',
|
||||
'current_row_number',
|
||||
'post_row',
|
||||
'row',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.topic_review_modify_row', compact($vars)));
|
||||
|
||||
$template->assign_block_vars($mode . '_row', $post_row);
|
||||
|
||||
// Display not already displayed Attachments for this post, we already parsed them. ;)
|
||||
if (!empty($attachments[$row['post_id']]))
|
||||
{
|
||||
@@ -1825,6 +1844,30 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
||||
break;
|
||||
}
|
||||
|
||||
/**
|
||||
* Modify sql query data for post submitting
|
||||
*
|
||||
* @event core.submit_post_modify_sql_data
|
||||
* @var array data Array with the data for the post
|
||||
* @var array poll Array with the poll data for the post
|
||||
* @var string post_mode Variable containing posting mode value
|
||||
* @var bool sql_data Array with the data for the posting SQL query
|
||||
* @var string subject Variable containing post subject value
|
||||
* @var int topic_type Variable containing topic type value
|
||||
* @var string username Variable containing post author name
|
||||
* @since 3.1.3-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'data',
|
||||
'poll',
|
||||
'post_mode',
|
||||
'sql_data',
|
||||
'subject',
|
||||
'topic_type',
|
||||
'username',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.submit_post_modify_sql_data', compact($vars)));
|
||||
|
||||
// Submit new topic
|
||||
if ($post_mode == 'post')
|
||||
{
|
||||
@@ -2384,6 +2427,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
||||
* @var int topic_type Variable containing topic type value
|
||||
* @var array poll Array with the poll data for the post
|
||||
* @var array data Array with the data for the post
|
||||
* @var int post_visibility Variable containing up to date post visibility
|
||||
* @var bool update_message Flag indicating if the post will be updated
|
||||
* @var bool update_search_index Flag indicating if the search index will be updated
|
||||
* @var string url The "Return to topic" URL
|
||||
@@ -2399,6 +2443,7 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
|
||||
'topic_type',
|
||||
'poll',
|
||||
'data',
|
||||
'post_visibility',
|
||||
'update_message',
|
||||
'update_search_index',
|
||||
'url',
|
||||
|
@@ -914,6 +914,24 @@ function update_unread_status($unread, $msg_id, $user_id, $folder_id)
|
||||
}
|
||||
}
|
||||
|
||||
function mark_folder_read($user_id, $folder_id)
|
||||
{
|
||||
global $db;
|
||||
|
||||
$sql = 'SELECT msg_id
|
||||
FROM ' . PRIVMSGS_TO_TABLE . '
|
||||
WHERE folder_id = ' . ((int) $folder_id) . '
|
||||
AND user_id = ' . ((int) $user_id) . '
|
||||
AND pm_unread = 1';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
update_unread_status(true, $row['msg_id'], $user_id, $folder_id);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle all actions possible with marked messages
|
||||
*/
|
||||
@@ -1397,9 +1415,9 @@ function rebuild_header($check_ary)
|
||||
$_types = array('u', 'g');
|
||||
foreach ($_types as $type)
|
||||
{
|
||||
if (sizeof($$type))
|
||||
if (sizeof(${$type}))
|
||||
{
|
||||
foreach ($$type as $id)
|
||||
foreach (${$type} as $id)
|
||||
{
|
||||
$address[$type][$id] = $check_type;
|
||||
}
|
||||
@@ -1573,7 +1591,7 @@ function get_folder_status($folder_id, $folder)
|
||||
'cur' => $folder['num_messages'],
|
||||
'remaining' => ($user->data['message_limit']) ? $user->data['message_limit'] - $folder['num_messages'] : 0,
|
||||
'max' => $user->data['message_limit'],
|
||||
'percent' => ($user->data['message_limit']) ? (($user->data['message_limit'] > 0) ? round(($folder['num_messages'] / $user->data['message_limit']) * 100) : 100) : 0,
|
||||
'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']);
|
||||
@@ -1939,7 +1957,7 @@ function submit_pm($mode, $subject, &$data, $put_in_outbox = true)
|
||||
*/
|
||||
function message_history($msg_id, $user_id, $message_row, $folder, $in_post_mode = false)
|
||||
{
|
||||
global $db, $user, $config, $template, $phpbb_root_path, $phpEx, $auth, $bbcode;
|
||||
global $db, $user, $config, $template, $phpbb_root_path, $phpEx, $auth;
|
||||
|
||||
// Select all receipts and the author from the pm we currently view, to only display their pm-history
|
||||
$sql = 'SELECT author_id, user_id
|
||||
@@ -1991,7 +2009,6 @@ function message_history($msg_id, $user_id, $message_row, $folder, $in_post_mode
|
||||
$title = $row['message_subject'];
|
||||
|
||||
$rowset = array();
|
||||
$bbcode_bitfield = '';
|
||||
$folder_url = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm') . '&folder=';
|
||||
|
||||
do
|
||||
@@ -2007,7 +2024,6 @@ function message_history($msg_id, $user_id, $message_row, $folder, $in_post_mode
|
||||
else
|
||||
{
|
||||
$rowset[$row['msg_id']] = $row;
|
||||
$bbcode_bitfield = $bbcode_bitfield | base64_decode($row['bbcode_bitfield']);
|
||||
}
|
||||
}
|
||||
while ($row = $db->sql_fetchrow($result));
|
||||
@@ -2018,16 +2034,6 @@ function message_history($msg_id, $user_id, $message_row, $folder, $in_post_mode
|
||||
return false;
|
||||
}
|
||||
|
||||
// Instantiate BBCode class
|
||||
if ((empty($bbcode) || $bbcode === false) && $bbcode_bitfield !== '')
|
||||
{
|
||||
if (!class_exists('bbcode'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/bbcode.' . $phpEx);
|
||||
}
|
||||
$bbcode = new bbcode(base64_encode($bbcode_bitfield));
|
||||
}
|
||||
|
||||
$title = censor_text($title);
|
||||
|
||||
$url = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm');
|
||||
|
@@ -44,13 +44,13 @@ function user_get_id_name(&$user_id_ary, &$username_ary, $user_type = false)
|
||||
|
||||
$which_ary = ($user_id_ary) ? 'user_id_ary' : 'username_ary';
|
||||
|
||||
if ($$which_ary && !is_array($$which_ary))
|
||||
if (${$which_ary} && !is_array(${$which_ary}))
|
||||
{
|
||||
$$which_ary = array($$which_ary);
|
||||
${$which_ary} = array(${$which_ary});
|
||||
}
|
||||
|
||||
$sql_in = ($which_ary == 'user_id_ary') ? array_map('intval', $$which_ary) : array_map('utf8_clean_string', $$which_ary);
|
||||
unset($$which_ary);
|
||||
$sql_in = ($which_ary == 'user_id_ary') ? array_map('intval', ${$which_ary}) : array_map('utf8_clean_string', ${$which_ary});
|
||||
unset(${$which_ary});
|
||||
|
||||
$user_id_ary = $username_ary = array();
|
||||
|
||||
@@ -161,9 +161,10 @@ function user_update_name($old_name, $new_name)
|
||||
*
|
||||
* @param mixed $user_row An array containing the following keys (and the appropriate values): username, group_id (the group to place the user in), user_email and the user_type(usually 0). Additional entries not overridden by defaults will be forwarded.
|
||||
* @param string $cp_data custom profile fields, see custom_profile::build_insert_sql_array
|
||||
* @param array $notifications_data The notifications settings for the new user
|
||||
* @return the new user's ID.
|
||||
*/
|
||||
function user_add($user_row, $cp_data = false)
|
||||
function user_add($user_row, $cp_data = false, $notifications_data = null)
|
||||
{
|
||||
global $db, $user, $auth, $config, $phpbb_root_path, $phpEx;
|
||||
global $phpbb_dispatcher, $phpbb_container;
|
||||
@@ -347,6 +348,31 @@ function user_add($user_row, $cp_data = false)
|
||||
set_config('newest_user_colour', $row['group_colour'], true);
|
||||
}
|
||||
|
||||
// Use default notifications settings if notifications_data is not set
|
||||
if ($notifications_data === null)
|
||||
{
|
||||
$notifications_data = array(
|
||||
array(
|
||||
'item_type' => 'notification.type.post',
|
||||
'method' => 'notification.method.email',
|
||||
),
|
||||
array(
|
||||
'item_type' => 'notification.type.topic',
|
||||
'method' => 'notification.method.email',
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
// Subscribe user to notifications if necessary
|
||||
if (!empty($notifications_data))
|
||||
{
|
||||
$phpbb_notifications = $phpbb_container->get('notification_manager');
|
||||
foreach ($notifications_data as $subscription)
|
||||
{
|
||||
$phpbb_notifications->add_subscription($subscription['item_type'], 0, $subscription['method'], $user_id);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Event that returns user id, user detals and user CPF of newly registared user
|
||||
*
|
||||
@@ -363,12 +389,16 @@ function user_add($user_row, $cp_data = false)
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove User
|
||||
* @param $mode Either 'retain' or 'remove'
|
||||
*/
|
||||
* Remove User
|
||||
*
|
||||
* @param string $mode Either 'retain' or 'remove'
|
||||
* @param mixed $user_ids Either an array of integers or an integer
|
||||
* @param bool $retain_username
|
||||
* @return bool
|
||||
*/
|
||||
function user_delete($mode, $user_ids, $retain_username = true)
|
||||
{
|
||||
global $cache, $config, $db, $user, $auth, $phpbb_dispatcher;
|
||||
global $cache, $config, $db, $user, $phpbb_dispatcher, $phpbb_container;
|
||||
global $phpbb_root_path, $phpEx;
|
||||
|
||||
$db->sql_transaction('begin');
|
||||
@@ -555,11 +585,6 @@ function user_delete($mode, $user_ids, $retain_username = true)
|
||||
WHERE ' . $db->sql_in_set('poster_id', $user_ids);
|
||||
$db->sql_query($sql);
|
||||
|
||||
$sql = 'UPDATE ' . POSTS_TABLE . '
|
||||
SET post_edit_user = ' . ANONYMOUS . '
|
||||
WHERE ' . $db->sql_in_set('post_edit_user', $user_ids);
|
||||
$db->sql_query($sql);
|
||||
|
||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||
SET user_posts = user_posts + ' . $added_guest_posts . '
|
||||
WHERE user_id = ' . ANONYMOUS;
|
||||
@@ -589,6 +614,30 @@ function user_delete($mode, $user_ids, $retain_username = true)
|
||||
|
||||
$cache->destroy('sql', MODERATOR_CACHE_TABLE);
|
||||
|
||||
// Change user_id to anonymous for posts edited by this user
|
||||
$sql = 'UPDATE ' . POSTS_TABLE . '
|
||||
SET post_edit_user = ' . ANONYMOUS . '
|
||||
WHERE ' . $db->sql_in_set('post_edit_user', $user_ids);
|
||||
$db->sql_query($sql);
|
||||
|
||||
// Change user_id to anonymous for pms edited by this user
|
||||
$sql = 'UPDATE ' . PRIVMSGS_TABLE . '
|
||||
SET message_edit_user = ' . ANONYMOUS . '
|
||||
WHERE ' . $db->sql_in_set('message_edit_user', $user_ids);
|
||||
$db->sql_query($sql);
|
||||
|
||||
// Change user_id to anonymous for posts deleted by this user
|
||||
$sql = 'UPDATE ' . POSTS_TABLE . '
|
||||
SET post_delete_user = ' . ANONYMOUS . '
|
||||
WHERE ' . $db->sql_in_set('post_delete_user', $user_ids);
|
||||
$db->sql_query($sql);
|
||||
|
||||
// Change user_id to anonymous for topics deleted by this user
|
||||
$sql = 'UPDATE ' . TOPICS_TABLE . '
|
||||
SET topic_delete_user = ' . ANONYMOUS . '
|
||||
WHERE ' . $db->sql_in_set('topic_delete_user', $user_ids);
|
||||
$db->sql_query($sql);
|
||||
|
||||
// Delete user log entries about this user
|
||||
$sql = 'DELETE FROM ' . LOG_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('reportee_id', $user_ids);
|
||||
@@ -623,6 +672,9 @@ function user_delete($mode, $user_ids, $retain_username = true)
|
||||
}
|
||||
phpbb_delete_users_pms($user_ids);
|
||||
|
||||
$phpbb_notifications = $phpbb_container->get('notification_manager');
|
||||
$phpbb_notifications->delete_notifications('notification.type.admin_activate_user', $user_ids);
|
||||
|
||||
$db->sql_transaction('commit');
|
||||
|
||||
/**
|
||||
@@ -654,7 +706,7 @@ function user_delete($mode, $user_ids, $retain_username = true)
|
||||
*/
|
||||
function user_active_flip($mode, $user_id_ary, $reason = INACTIVE_MANUAL)
|
||||
{
|
||||
global $config, $db, $user, $auth;
|
||||
global $config, $db, $user, $auth, $phpbb_dispatcher;
|
||||
|
||||
$deactivated = $activated = 0;
|
||||
$sql_statements = array();
|
||||
@@ -707,6 +759,21 @@ function user_active_flip($mode, $user_id_ary, $reason = INACTIVE_MANUAL)
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
/**
|
||||
* Check or modify activated/deactivated users data before submitting it to the database
|
||||
*
|
||||
* @event core.user_active_flip_before
|
||||
* @var string mode User type changing mode, can be: flip|activate|deactivate
|
||||
* @var int reason Reason for changing user type, can be: INACTIVE_REGISTER|INACTIVE_PROFILE|INACTIVE_MANUAL|INACTIVE_REMIND
|
||||
* @var int activated The number of users to be activated
|
||||
* @var int deactivated The number of users to be deactivated
|
||||
* @var array user_id_ary Array with user ids to change user type
|
||||
* @var array sql_statements Array with users data to submit to the database, keys: user ids, values: arrays with user data
|
||||
* @since 3.1.4-RC1
|
||||
*/
|
||||
$vars = array('mode', 'reason', 'activated', 'deactivated', 'user_id_ary', 'sql_statements');
|
||||
extract($phpbb_dispatcher->trigger_event('core.user_active_flip_before', compact($vars)));
|
||||
|
||||
if (sizeof($sql_statements))
|
||||
{
|
||||
foreach ($sql_statements as $user_id => $sql_ary)
|
||||
@@ -720,6 +787,21 @@ function user_active_flip($mode, $user_id_ary, $reason = INACTIVE_MANUAL)
|
||||
$auth->acl_clear_prefetch(array_keys($sql_statements));
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform additional actions after the users have been activated/deactivated
|
||||
*
|
||||
* @event core.user_active_flip_after
|
||||
* @var string mode User type changing mode, can be: flip|activate|deactivate
|
||||
* @var int reason Reason for changing user type, can be: INACTIVE_REGISTER|INACTIVE_PROFILE|INACTIVE_MANUAL|INACTIVE_REMIND
|
||||
* @var int activated The number of users to be activated
|
||||
* @var int deactivated The number of users to be deactivated
|
||||
* @var array user_id_ary Array with user ids to change user type
|
||||
* @var array sql_statements Array with users data to submit to the database, keys: user ids, values: arrays with user data
|
||||
* @since 3.1.4-RC1
|
||||
*/
|
||||
$vars = array('mode', 'reason', 'activated', 'deactivated', 'user_id_ary', 'sql_statements');
|
||||
extract($phpbb_dispatcher->trigger_event('core.user_active_flip_after', compact($vars)));
|
||||
|
||||
if ($deactivated)
|
||||
{
|
||||
set_config_count('num_users', $deactivated * (-1), true);
|
||||
|
@@ -25,7 +25,7 @@ class mcp_ban
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $config, $db, $user, $auth, $template, $cache;
|
||||
global $db, $user, $auth, $template, $request, $phpbb_dispatcher;
|
||||
global $phpbb_root_path, $phpEx;
|
||||
|
||||
include($phpbb_root_path . 'includes/functions_user.' . $phpEx);
|
||||
@@ -33,55 +33,133 @@ class mcp_ban
|
||||
// Include the admin banning interface...
|
||||
include($phpbb_root_path . 'includes/acp/acp_ban.' . $phpEx);
|
||||
|
||||
$bansubmit = (isset($_POST['bansubmit'])) ? true : false;
|
||||
$unbansubmit = (isset($_POST['unbansubmit'])) ? true : false;
|
||||
$current_time = time();
|
||||
$bansubmit = $request->is_set_post('bansubmit');
|
||||
$unbansubmit = $request->is_set_post('unbansubmit');
|
||||
|
||||
$user->add_lang(array('acp/ban', 'acp/users'));
|
||||
$this->tpl_name = 'mcp_ban';
|
||||
|
||||
/**
|
||||
* Use this event to pass perform actions when a ban is issued or revoked
|
||||
*
|
||||
* @event core.mcp_ban_main
|
||||
* @var bool bansubmit True if a ban is issued
|
||||
* @var bool unbansubmit True if a ban is removed
|
||||
* @var string mode Mode of the ban that is being worked on
|
||||
* @since 3.1.0-RC5
|
||||
*/
|
||||
$vars = array(
|
||||
'bansubmit',
|
||||
'unbansubmit',
|
||||
'mode',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.mcp_ban_main', compact($vars)));
|
||||
|
||||
// Ban submitted?
|
||||
if ($bansubmit)
|
||||
{
|
||||
// Grab the list of entries
|
||||
$ban = request_var('ban', '', ($mode === 'user') ? true : false);
|
||||
|
||||
if ($mode === 'user')
|
||||
{
|
||||
$ban = utf8_normalize_nfc($ban);
|
||||
}
|
||||
|
||||
$ban_len = request_var('banlength', 0);
|
||||
$ban_len_other = request_var('banlengthother', '');
|
||||
$ban_exclude = request_var('banexclude', 0);
|
||||
$ban_reason = utf8_normalize_nfc(request_var('banreason', '', true));
|
||||
$ban_give_reason = utf8_normalize_nfc(request_var('bangivereason', '', true));
|
||||
$ban = $request->variable('ban', '', $mode === 'user');
|
||||
$ban_length = $request->variable('banlength', 0);
|
||||
$ban_length_other = $request->variable('banlengthother', '');
|
||||
$ban_exclude = $request->variable('banexclude', 0);
|
||||
$ban_reason = $request->variable('banreason', '', true);
|
||||
$ban_give_reason = $request->variable('bangivereason', '', true);
|
||||
|
||||
if ($ban)
|
||||
{
|
||||
if (confirm_box(true))
|
||||
{
|
||||
user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reason, $ban_give_reason);
|
||||
$abort_ban = false;
|
||||
/**
|
||||
* Use this event to modify the ban details before the ban is performed
|
||||
*
|
||||
* @event core.mcp_ban_before
|
||||
* @var string mode One of the following: user, ip, email
|
||||
* @var string ban Either string or array with usernames, ips or email addresses
|
||||
* @var int ban_length Ban length in minutes
|
||||
* @var string ban_length_other Ban length as a date (YYYY-MM-DD)
|
||||
* @var bool ban_exclude Are we banning or excluding from another ban
|
||||
* @var string ban_reason Ban reason displayed to moderators
|
||||
* @var string ban_give_reason Ban reason displayed to the banned user
|
||||
* @var mixed abort_ban Either false, or an error message that is displayed to the user.
|
||||
* If a string is given the bans are not issued.
|
||||
* @since 3.1.0-RC5
|
||||
*/
|
||||
$vars = array(
|
||||
'mode',
|
||||
'ban',
|
||||
'ban_length',
|
||||
'ban_length_other',
|
||||
'ban_exclude',
|
||||
'ban_reason',
|
||||
'ban_give_reason',
|
||||
'abort_ban',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.mcp_ban_before', compact($vars)));
|
||||
|
||||
if ($abort_ban)
|
||||
{
|
||||
trigger_error($abort_ban);
|
||||
}
|
||||
user_ban($mode, $ban, $ban_length, $ban_length_other, $ban_exclude, $ban_reason, $ban_give_reason);
|
||||
|
||||
/**
|
||||
* Use this event to perform actions after the ban has been performed
|
||||
*
|
||||
* @event core.mcp_ban_after
|
||||
* @var string mode One of the following: user, ip, email
|
||||
* @var string ban Either string or array with usernames, ips or email addresses
|
||||
* @var int ban_length Ban length in minutes
|
||||
* @var string ban_length_other Ban length as a date (YYYY-MM-DD)
|
||||
* @var bool ban_exclude Are we banning or excluding from another ban
|
||||
* @var string ban_reason Ban reason displayed to moderators
|
||||
* @var string ban_give_reason Ban reason displayed to the banned user
|
||||
* @since 3.1.0-RC5
|
||||
*/
|
||||
$vars = array(
|
||||
'mode',
|
||||
'ban',
|
||||
'ban_length',
|
||||
'ban_length_other',
|
||||
'ban_exclude',
|
||||
'ban_reason',
|
||||
'ban_give_reason',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.mcp_ban_after', compact($vars)));
|
||||
|
||||
trigger_error($user->lang['BAN_UPDATE_SUCCESSFUL'] . '<br /><br /><a href="' . $this->u_action . '">« ' . $user->lang['BACK_TO_PREV'] . '</a>');
|
||||
}
|
||||
else
|
||||
{
|
||||
confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array(
|
||||
$hidden_fields = array(
|
||||
'mode' => $mode,
|
||||
'ban' => $ban,
|
||||
'bansubmit' => true,
|
||||
'banlength' => $ban_len,
|
||||
'banlengthother' => $ban_len_other,
|
||||
'banlength' => $ban_length,
|
||||
'banlengthother' => $ban_length_other,
|
||||
'banexclude' => $ban_exclude,
|
||||
'banreason' => $ban_reason,
|
||||
'bangivereason' => $ban_give_reason)));
|
||||
'bangivereason' => $ban_give_reason,
|
||||
);
|
||||
|
||||
/**
|
||||
* Use this event to pass data from the ban form to the confirmation screen
|
||||
*
|
||||
* @event core.mcp_ban_confirm
|
||||
* @var array hidden_fields Hidden fields that are passed through the confirm screen
|
||||
* @since 3.1.0-RC5
|
||||
*/
|
||||
$vars = array('hidden_fields');
|
||||
extract($phpbb_dispatcher->trigger_event('core.mcp_ban_confirm', compact($vars)));
|
||||
|
||||
confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields($hidden_fields));
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ($unbansubmit)
|
||||
{
|
||||
$ban = request_var('unban', array(''));
|
||||
$ban = $request->variable('unban', array(''));
|
||||
|
||||
if ($ban)
|
||||
{
|
||||
@@ -157,9 +235,9 @@ class mcp_ban
|
||||
}
|
||||
|
||||
// As a "service" we will check if any post id is specified and populate the username of the poster id if given
|
||||
$post_id = request_var('p', 0);
|
||||
$user_id = request_var('u', 0);
|
||||
$username = $pre_fill = false;
|
||||
$post_id = $request->variable('p', 0);
|
||||
$user_id = $request->variable('u', 0);
|
||||
$pre_fill = false;
|
||||
|
||||
if ($user_id && $user_id <> ANONYMOUS)
|
||||
{
|
||||
|