mirror of
https://github.com/phpbb/phpbb.git
synced 2025-09-10 16:20:46 +02:00
Compare commits
662 Commits
release-3.
...
release-3.
Author | SHA1 | Date | |
---|---|---|---|
|
af7dca6acd | ||
|
c494d8f53e | ||
|
a35c8a924e | ||
|
9d72c4a66a | ||
|
185bda094b | ||
|
ddfc52a5f6 | ||
|
37a3bd131b | ||
|
54751991ad | ||
|
90b59bb547 | ||
|
6a568719d0 | ||
|
5f56e9025b | ||
|
7fedc19cc4 | ||
|
467e603570 | ||
|
4c36ca4b85 | ||
|
1be233a801 | ||
|
69a5ed78cf | ||
|
f2fde5e7a3 | ||
|
829e147504 | ||
|
129bfd5e62 | ||
|
e5504b74f0 | ||
|
72529cd179 | ||
|
3322117c38 | ||
|
591eff9e78 | ||
|
375e264a47 | ||
|
103d344cd4 | ||
|
32aa0596f3 | ||
|
6c35ca80ed | ||
|
164a4190d5 | ||
|
533d2b90b8 | ||
|
99a99c5412 | ||
|
57915a8aaa | ||
|
ab58bb8744 | ||
|
c9e493a911 | ||
|
0256c69191 | ||
|
45dda53310 | ||
|
1f305e4025 | ||
|
8481bd4e18 | ||
|
376042d845 | ||
|
346f31a031 | ||
|
17e8726582 | ||
|
5505f98aad | ||
|
dfc5a2b7cd | ||
|
fbe5193359 | ||
|
3acee9a3ee | ||
|
5895f56de0 | ||
|
8ded30bbbe | ||
|
9b4190e136 | ||
|
15f433f00f | ||
|
c54838b25f | ||
|
afe16a6272 | ||
|
e02aca8399 | ||
|
b9c284d85b | ||
|
1f27097208 | ||
|
9f3b151dab | ||
|
dee5e6e076 | ||
|
b1596fda7f | ||
|
edfc4f3efc | ||
|
4f0627de03 | ||
|
2fa23c9b3f | ||
|
e308093d75 | ||
|
88f197e67a | ||
|
fd37919ecb | ||
|
d62d35ad46 | ||
|
64f0d74489 | ||
|
f604e1ab5d | ||
|
930b02342e | ||
|
ffe900c72d | ||
|
69dece6197 | ||
|
e519b21b2e | ||
|
67c3bd4a90 | ||
|
65d6e338a9 | ||
|
eb1ade6768 | ||
|
89fef2ce13 | ||
|
80a63a9a94 | ||
|
f9b46a4ae7 | ||
|
cba4f4f568 | ||
|
4451db9f22 | ||
|
ade5183ba1 | ||
|
90a5e22eb5 | ||
|
c07ecb060d | ||
|
cc7a0aa4fb | ||
|
9fb2a5d5f8 | ||
|
c1035c98e4 | ||
|
6f315da9ab | ||
|
430ec6f61d | ||
|
c5e0635bc7 | ||
|
267d1b15c4 | ||
|
8fb2347cfa | ||
|
36460ebdf6 | ||
|
9525a64d64 | ||
|
c30394ff4a | ||
|
487df8befc | ||
|
48db9cbcf0 | ||
|
b51247e1da | ||
|
1e667ce8cc | ||
|
3e8071478b | ||
|
098764a0aa | ||
|
9d4c51f8ba | ||
|
74f49387e1 | ||
|
c3caa3d9dc | ||
|
0c96873e73 | ||
|
c60caace5d | ||
|
a99cb31a52 | ||
|
8f84119743 | ||
|
d817f3cc67 | ||
|
207b52c77f | ||
|
1639cb93a8 | ||
|
1ee9cc91d4 | ||
|
9bdd002f58 | ||
|
3ad13ebd88 | ||
|
e1d2c4c900 | ||
|
0e53442fd4 | ||
|
bad9943208 | ||
|
2fcc1b4d18 | ||
|
7671c971e4 | ||
|
1c567daf39 | ||
|
365489a317 | ||
|
b24c2ea5be | ||
|
10753454bf | ||
|
0881bbbb64 | ||
|
d894472866 | ||
|
a3faf1fefc | ||
|
0e8a573a71 | ||
|
642bfe9a39 | ||
|
88c921be23 | ||
|
48d6abcf0a | ||
|
4fce18609f | ||
|
5e36dd3d0b | ||
|
0f46d35f75 | ||
|
b01b3b8b94 | ||
|
9432662c37 | ||
|
997bdc7778 | ||
|
30b3fbb2cf | ||
|
ff76a3e433 | ||
|
6c98e3b12f | ||
|
08bf8812d3 | ||
|
9aa017d0f7 | ||
|
390a37492d | ||
|
23f5b6debd | ||
|
145ba85d98 | ||
|
3e1f9c4201 | ||
|
592ef2eff4 | ||
|
16620ea3d2 | ||
|
2df3703b2a | ||
|
a1a3daaca8 | ||
|
453d9113f1 | ||
|
dbd9c1f242 | ||
|
c3108d44ce | ||
|
d98fd7868b | ||
|
20771271ca | ||
|
6d58c4a4b5 | ||
|
0d15a95f97 | ||
|
6bbc18fa40 | ||
|
8f19d16b2a | ||
|
16c3b40b4e | ||
|
ad4889be4b | ||
|
9343317121 | ||
|
c6bed98cf5 | ||
|
34ebbbc7c3 | ||
|
4844370c26 | ||
|
1ff01d722a | ||
|
5a82061c3a | ||
|
a96fc3d87f | ||
|
e974f338af | ||
|
ba5243ba76 | ||
|
da428b1fd3 | ||
|
edaa36205f | ||
|
8323de331e | ||
|
b80b624551 | ||
|
8a3147faf8 | ||
|
6e6a2c5df8 | ||
|
df0388ccc5 | ||
|
260dc5ed7c | ||
|
f8fb3e0f9f | ||
|
9c7e8c2dc5 | ||
|
372324cead | ||
|
2319748c08 | ||
|
39f5b82bc3 | ||
|
55f7438187 | ||
|
4a1e5df654 | ||
|
c77798b1a3 | ||
|
ef77852aff | ||
|
221cd3eb68 | ||
|
728335820c | ||
|
bc4c82bae5 | ||
|
78db28286e | ||
|
577d669ba7 | ||
|
dd561ec275 | ||
|
a298ed1a66 | ||
|
8d3d396f1b | ||
|
43ea7168d1 | ||
|
c9ea560c63 | ||
|
0fd04f2e6f | ||
|
74285b4308 | ||
|
cdf6464382 | ||
|
4533dd9fa0 | ||
|
9b1e2e523c | ||
|
0e114f91f4 | ||
|
50f5efba9c | ||
|
9be9062df3 | ||
|
cd348b200a | ||
|
dc32b900c5 | ||
|
ac36cc25eb | ||
|
af2bf4ef36 | ||
|
87209fdd06 | ||
|
c259a9b387 | ||
|
ecb81894cc | ||
|
ad4fe1799f | ||
|
6984f17f62 | ||
|
4d07f8a134 | ||
|
d90afa67d8 | ||
|
2f6a258175 | ||
|
094ac6b60f | ||
|
552691efbf | ||
|
33f1934b72 | ||
|
f658e062b2 | ||
|
85898d3d2c | ||
|
466bdee8e6 | ||
|
10f430f393 | ||
|
ffc6623dd4 | ||
|
b8ef36ddb1 | ||
|
e3a85ff0a7 | ||
|
b13910ee45 | ||
|
163292bc11 | ||
|
a41b16d06a | ||
|
52b1a9d4fa | ||
|
cac8ac8242 | ||
|
6f8c0df1c6 | ||
|
c891277996 | ||
|
cefbd39b82 | ||
|
77f1bac64b | ||
|
849cd74700 | ||
|
51ef1ae346 | ||
|
a02b124dd0 | ||
|
2a038d45df | ||
|
3cb09358fe | ||
|
9f2867b115 | ||
|
2059d57c04 | ||
|
0cc0920734 | ||
|
8b8f693d00 | ||
|
8afa9fdf28 | ||
|
244ff0f969 | ||
|
eca10dc08f | ||
|
8e54c9ef8b | ||
|
832a87b924 | ||
|
fd7244c892 | ||
|
05d0879795 | ||
|
f02afe58bc | ||
|
d98a1c4bc4 | ||
|
868d55913d | ||
|
20148e4d06 | ||
|
fce30d1d91 | ||
|
2406fe2e5e | ||
|
1f0c616974 | ||
|
4dfadfc97f | ||
|
84a8cf00ad | ||
|
1dd0ceabf6 | ||
|
322b86da1f | ||
|
b2711371f1 | ||
|
35ad0f1249 | ||
|
82105070ad | ||
|
1100db7e86 | ||
|
8ce95413aa | ||
|
4d4d3824f3 | ||
|
98a6133c1e | ||
|
380be9f1fd | ||
|
722639a0e2 | ||
|
d15269950d | ||
|
297376ee94 | ||
|
1d40c0f43b | ||
|
7bb4e88acd | ||
|
1ad64f89b8 | ||
|
bf8ee698f9 | ||
|
59b52d6312 | ||
|
40354f1f90 | ||
|
71e632b9f0 | ||
|
cb226f83be | ||
|
4c60995d7a | ||
|
7a5fbd0257 | ||
|
b28fe0a7fa | ||
|
85e4566223 | ||
|
722fe0ca48 | ||
|
55a0570567 | ||
|
89a564adb2 | ||
|
b4e673acc1 | ||
|
5075090d4f | ||
|
cd4190a72d | ||
|
6b798d02fb | ||
|
78333e300c | ||
|
cdaed8dabf | ||
|
165e0edb2a | ||
|
328a7afcc3 | ||
|
5a6933fee7 | ||
|
047c7375a5 | ||
|
57fc321c4d | ||
|
f1eda6868f | ||
|
4e5f29a21b | ||
|
88d7c4fe57 | ||
|
e362ff1f3c | ||
|
32d569c594 | ||
|
5b32019ad6 | ||
|
c6383d3f89 | ||
|
1d25c80a9c | ||
|
0b3951cb81 | ||
|
ae76bfc99e | ||
|
cc62b68243 | ||
|
737ef92a1e | ||
|
6972d06f59 | ||
|
2fd2fb94cf | ||
|
06c980f1ec | ||
|
f66ca6a9cc | ||
|
ec24f739e8 | ||
|
c588332aa5 | ||
|
ef755ffd38 | ||
|
de2c70127f | ||
|
9e52ed9af1 | ||
|
164f0e031d | ||
|
51d830a6d3 | ||
|
32d9efff47 | ||
|
7d73d1ff83 | ||
|
c958ba13e8 | ||
|
2f17757f4e | ||
|
187c6df18a | ||
|
b8bbf9db03 | ||
|
713f25e552 | ||
|
4267cc3a43 | ||
|
90e9d5c462 | ||
|
b59e41d289 | ||
|
fdd4f68aea | ||
|
cdd56c0505 | ||
|
1fff455862 | ||
|
18f9c9f6e2 | ||
|
97040dc6ff | ||
|
e02dc7a9c1 | ||
|
931582aad9 | ||
|
4db52518a9 | ||
|
3910387ee5 | ||
|
73d150db80 | ||
|
d2f95ef875 | ||
|
dcc7118c0d | ||
|
537dca0892 | ||
|
9a64bffd68 | ||
|
77e14c3030 | ||
|
a5ccdc7997 | ||
|
becb1e1fff | ||
|
bc6dc9f173 | ||
|
2436af94e3 | ||
|
430c266eb2 | ||
|
75f57fa407 | ||
|
35c62d1e74 | ||
|
6ae405f743 | ||
|
65ef56ed71 | ||
|
2b22adbcac | ||
|
6242698a84 | ||
|
a078336cb1 | ||
|
229472cb07 | ||
|
e0d9f2aad6 | ||
|
4da479d47f | ||
|
19bbbfe0f3 | ||
|
bc08813866 | ||
|
6b435cbf13 | ||
|
72f6241aa2 | ||
|
585a3ed863 | ||
|
abb01946bd | ||
|
47d2f34a1b | ||
|
27e33f39f7 | ||
|
631b0f2dba | ||
|
c3578bc3e3 | ||
|
0d3ca3883e | ||
|
a084b07495 | ||
|
e76ea47fb8 | ||
|
bf397cb985 | ||
|
b0ff957684 | ||
|
73b9327631 | ||
|
aa95636a4d | ||
|
bd59241110 | ||
|
2dbc9e1016 | ||
|
33584f12f0 | ||
|
2ae08dc3ba | ||
|
271e8b43f9 | ||
|
32ba128ea5 | ||
|
142f937354 | ||
|
70aa4407d3 | ||
|
5503c09cd5 | ||
|
6d589a8bb9 | ||
|
43c52b073b | ||
|
1a187e0607 | ||
|
316b69805b | ||
|
4b8e8df55c | ||
|
14cc4f3ae2 | ||
|
dccb5564d2 | ||
|
0aa289e4d9 | ||
|
857a085496 | ||
|
d2750b650f | ||
|
ce48b4de57 | ||
|
051323dbc6 | ||
|
2efdaaa0e2 | ||
|
801519ca4d | ||
|
f6b376def8 | ||
|
a4f42ced3d | ||
|
a01c773fa2 | ||
|
312ca75be5 | ||
|
64178b40b8 | ||
|
86752fc6df | ||
|
62e8ba3d49 | ||
|
08f558d8f7 | ||
|
65921a7891 | ||
|
a3dc829dab | ||
|
4b6c2c8cde | ||
|
dff950162c | ||
|
f008708d5c | ||
|
05e6ed04ed | ||
|
d737430a03 | ||
|
2c6543cb6e | ||
|
b3e8eb9feb | ||
|
bd0244180b | ||
|
7b880af02e | ||
|
3ee5472a8c | ||
|
557f85e7fc | ||
|
a2838ad0b1 | ||
|
a019a86bfc | ||
|
7c79e7844c | ||
|
71a70500ea | ||
|
08c6f56f4b | ||
|
863d65112b | ||
|
17421195df | ||
|
3b395aa7a4 | ||
|
5c8fd9760b | ||
|
4f8fcaa95b | ||
|
0048c2b613 | ||
|
8e787cba7a | ||
|
0d39e659fe | ||
|
429ecb938c | ||
|
f814840568 | ||
|
43762950bc | ||
|
cd2649273b | ||
|
cd0ffc5de6 | ||
|
a36f96aefa | ||
|
06bfae8edb | ||
|
b14043b276 | ||
|
f054ab972d | ||
|
76748183bb | ||
|
6bcc372af5 | ||
|
eccb3d6602 | ||
|
a37f10ae09 | ||
|
88384a1e63 | ||
|
773f6d08a5 | ||
|
463e8e4b13 | ||
|
7c99fcf782 | ||
|
775d1c855a | ||
|
e050cf5c11 | ||
|
e4671c1521 | ||
|
0eb44fc934 | ||
|
bb11294b96 | ||
|
723d9d8e4c | ||
|
488fd8f54c | ||
|
c044a41d07 | ||
|
f68e98c064 | ||
|
c016e09ca4 | ||
|
bc823a18be | ||
|
4466ef1bc4 | ||
|
48696b5148 | ||
|
758fe20f4b | ||
|
0d1b7b3935 | ||
|
263fbe54fc | ||
|
4a92a8efb5 | ||
|
03be89ebd7 | ||
|
210310b584 | ||
|
c12d67cd90 | ||
|
52afa74f4e | ||
|
b00a39b9ad | ||
|
6078bae7f8 | ||
|
317f3e848f | ||
|
3346609126 | ||
|
4938887e5d | ||
|
2ee8bd0c4a | ||
|
a277f9cf07 | ||
|
8e1461ca61 | ||
|
9fb649793d | ||
|
b74e811496 | ||
|
260a0a29ad | ||
|
7e1e3e1a5e | ||
|
0771eaa732 | ||
|
1455be2260 | ||
|
3bf64de247 | ||
|
55f98d0941 | ||
|
f04685200b | ||
|
dd01de03bf | ||
|
801183a99b | ||
|
9225a0fdff | ||
|
c9ada4d201 | ||
|
2dae36e3fb | ||
|
6fd507f60d | ||
|
6cc4d78ebf | ||
|
5330ea0f09 | ||
|
55123bc94c | ||
|
8a9cf32b1d | ||
|
3038bf5eaf | ||
|
ba13832085 | ||
|
2081a78095 | ||
|
37880af03c | ||
|
c64b8102b7 | ||
|
3d4660a703 | ||
|
f68820762b | ||
|
f222f8a84a | ||
|
d51c67440e | ||
|
0cc41be3c0 | ||
|
bd1d734dcc | ||
|
4ac2547d62 | ||
|
ef132e1531 | ||
|
69d2bad929 | ||
|
61a147546d | ||
|
ed2c8b5bf7 | ||
|
55223e6840 | ||
|
29d2c66922 | ||
|
88db46946e | ||
|
941be83395 | ||
|
8e8e25cc1f | ||
|
e7289fa019 | ||
|
5b501e594c | ||
|
4eecc95a42 | ||
|
5eb493fa86 | ||
|
43e0283fb1 | ||
|
8cf2790d55 | ||
|
4ad0c3e903 | ||
|
eaafb758ce | ||
|
89461d982c | ||
|
33cd613406 | ||
|
4554c030c0 | ||
|
20e08aa2a0 | ||
|
da7c41f167 | ||
|
13a756bfb7 | ||
|
486ffa85a2 | ||
|
d2ff12256c | ||
|
ef91c6abed | ||
|
f3fe610a5e | ||
|
5cba468c35 | ||
|
0026ed02ae | ||
|
7195f51806 | ||
|
11532bd8c1 | ||
|
e9e6847803 | ||
|
e7ce7ecbe7 | ||
|
befacabf7e | ||
|
775df0eb8a | ||
|
4e480d46f5 | ||
|
3df9b2c8f8 | ||
|
f2a1fbadbc | ||
|
e8454e018d | ||
|
d3f017c149 | ||
|
78a0d10a5a | ||
|
e4aa8806b9 | ||
|
960dc08946 | ||
|
be8bf42fe3 | ||
|
d0a5f87a44 | ||
|
4e7705fcaf | ||
|
a1ecb6db69 | ||
|
44303aa425 | ||
|
63db42522b | ||
|
a840d70bbf | ||
|
51952005eb | ||
|
d6303ed592 | ||
|
6f1b635992 | ||
|
019e85d064 | ||
|
b54aa81cdd | ||
|
b14c088ce7 | ||
|
6f109dd1ef | ||
|
c9cfde7837 | ||
|
ebdef04f5d | ||
|
d47a22dda0 | ||
|
61bca182f6 | ||
|
38082c41e3 | ||
|
d53f75f668 | ||
|
c1cb59c237 | ||
|
652e3da28d | ||
|
7f50c798e6 | ||
|
927cc2ebad | ||
|
24da2db987 | ||
|
2ec4855cba | ||
|
45ba2e9770 | ||
|
55b854906d | ||
|
1c52968df6 | ||
|
24b80d6bd7 | ||
|
bb83af0a0a | ||
|
cddb884be6 | ||
|
51181c6ea1 | ||
|
53b9216c78 | ||
|
a3c10f575b | ||
|
2f53761eaf | ||
|
95520d2ff2 | ||
|
8829772631 | ||
|
c4b93c9c1c | ||
|
65a4f0d631 | ||
|
1298591dff | ||
|
7404155a1e | ||
|
37cf178c0c | ||
|
dbf02b4514 | ||
|
9170261885 | ||
|
f75a01182f | ||
|
27f16a195e | ||
|
471a773bcf | ||
|
963a03b120 | ||
|
7f1c4cd205 | ||
|
e4336de68d | ||
|
1a0e40489f | ||
|
63b902c2f9 | ||
|
4653951673 | ||
|
597e7163c0 | ||
|
4efaeabc8c | ||
|
fa878f2818 | ||
|
a19bf11f73 | ||
|
19da62f873 | ||
|
09c602425c | ||
|
219977ccf3 | ||
|
9595946508 | ||
|
773a701d62 | ||
|
9639f6ad63 | ||
|
d5e342db3a | ||
|
cc628f06b2 | ||
|
a460aec68c | ||
|
c60dbede3e | ||
|
6a48cad4a2 | ||
|
abe93918b4 | ||
|
450e5b36b8 | ||
|
aaa99b4719 | ||
|
70b04016eb | ||
|
804236bce4 | ||
|
63d3b240a4 | ||
|
cf8c13b04c | ||
|
9551475fce | ||
|
4d50a1daa5 | ||
|
3708770eb9 | ||
|
e9cbb45435 | ||
|
2a53831124 | ||
|
7dc1af25bc | ||
|
25ae8876b6 | ||
|
797565dfa7 | ||
|
800b7be873 | ||
|
a90d8fa8d4 | ||
|
4cf666f0bc | ||
|
33d1d19f97 | ||
|
9961aefa38 | ||
|
6350798e97 | ||
|
10d96d4f33 | ||
|
85fdff8230 | ||
|
e6e4c0e62d | ||
|
3f1580263c | ||
|
559325fbd6 | ||
|
0d7625c534 | ||
|
9ca3cd519a | ||
|
96973a7cec | ||
|
42053efb51 | ||
|
2ca49e02b4 | ||
|
40aac1cd57 | ||
|
3cd0c53118 | ||
|
6196e4ae4d | ||
|
269e253524 | ||
|
23bdb2eede | ||
|
c938077172 | ||
|
e80f79fc9a | ||
|
920219dc56 | ||
|
04f320cb01 | ||
|
054da80114 |
4
.gitignore
vendored
4
.gitignore
vendored
@@ -4,7 +4,7 @@
|
||||
!/phpBB/cache/.htaccess
|
||||
!/phpBB/cache/index.html
|
||||
/phpBB/composer.phar
|
||||
/phpBB/config*.php
|
||||
/phpBB/config*.php*
|
||||
/phpBB/ext/*
|
||||
/phpBB/files/*
|
||||
/phpBB/images/avatars/gallery/*
|
||||
@@ -22,3 +22,5 @@
|
||||
/tests/test_config*.php
|
||||
/tests/tmp/*
|
||||
/tests/vendor
|
||||
/vagrant/phpbb-install-config.yml
|
||||
.vagrant
|
||||
|
@@ -19,6 +19,7 @@
|
||||
"jquery": true,
|
||||
|
||||
"globals": {
|
||||
"JSON": true
|
||||
"JSON": true,
|
||||
"phpbb": true
|
||||
}
|
||||
}
|
||||
|
@@ -22,10 +22,15 @@ matrix:
|
||||
env: DB=mysqli
|
||||
- php: 7.0
|
||||
env: DB=mysqli
|
||||
- php: 7.1
|
||||
env: DB=mysqli
|
||||
- php: nightly
|
||||
env: DB=mysqli
|
||||
- php: hhvm
|
||||
env: DB=mysqli
|
||||
allow_failures:
|
||||
- php: hhvm
|
||||
- php: nightly
|
||||
fast_finish: true
|
||||
|
||||
services:
|
||||
|
@@ -23,6 +23,10 @@ To be able to run an installation from the repo (and not from a pre-built packag
|
||||
3. Read our [Coding guidelines](https://wiki.phpbb.com/Coding_guidelines) and [Git Contribution Guidelines](http://wiki.phpbb.com/Git)
|
||||
4. Send us a pull request
|
||||
|
||||
## VAGRANT
|
||||
|
||||
Read our [Vagrant documentation](phpBB/docs/vagrant.md) to find out how to use Vagrant to develop and contribute to phpBB.
|
||||
|
||||
## AUTOMATED TESTING
|
||||
|
||||
We have unit and functional tests in order to prevent regressions. You can view the bamboo continuous integration [here](http://bamboo.phpbb.com) or check our travis builds below:
|
||||
|
25
Vagrantfile
vendored
Normal file
25
Vagrantfile
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
require 'json'
|
||||
require 'yaml'
|
||||
|
||||
VAGRANTFILE_API_VERSION ||= "2"
|
||||
confDir = $confDir ||= File.expand_path("phpBB/vendor/laravel/homestead", File.dirname(__FILE__))
|
||||
|
||||
homesteadYamlPath = "vagrant/bootstrap.yaml"
|
||||
afterScriptPath = "vagrant/after.sh"
|
||||
aliasesPath = "vagrant/aliases"
|
||||
|
||||
require File.expand_path(confDir + '/scripts/homestead.rb')
|
||||
|
||||
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||
if File.exists? aliasesPath then
|
||||
config.vm.provision "file", source: aliasesPath, destination: "~/.bash_aliases"
|
||||
end
|
||||
|
||||
if File.exists? homesteadYamlPath then
|
||||
Homestead.configure(config, YAML::load(File.read(homesteadYamlPath)))
|
||||
end
|
||||
|
||||
if File.exists? afterScriptPath then
|
||||
config.vm.provision "shell", path: afterScriptPath
|
||||
end
|
||||
end
|
103
build/build.xml
103
build/build.xml
@@ -2,9 +2,9 @@
|
||||
|
||||
<project name="phpBB" description="The phpBB forum software" default="all" basedir="../">
|
||||
<!-- a few settings for the build -->
|
||||
<property name="newversion" value="3.2.0-RC1" />
|
||||
<property name="prevversion" value="3.2.0-b2" />
|
||||
<property name="olderversions" value="3.0.14, 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.7-pl1, 3.1.8, 3.1.9, 3.2.0-a1, 3.2.0-a2, 3.2.0-b1" />
|
||||
<property name="newversion" value="3.2.0-RC2" />
|
||||
<property name="prevversion" value="3.2.0-RC1" />
|
||||
<property name="olderversions" value="3.0.14, 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 3.1.7, 3.1.7-pl1, 3.1.8, 3.1.9, 3.1.10, 3.2.0-a1, 3.2.0-a2, 3.2.0-b1, 3.2.0-b2" />
|
||||
<!-- no configuration should be needed beyond this point -->
|
||||
|
||||
<property name="oldversions" value="${olderversions}, ${prevversion}" />
|
||||
@@ -49,7 +49,7 @@
|
||||
-->
|
||||
<target name="composer">
|
||||
<exec dir="phpBB"
|
||||
command="php ../composer.phar install --dev"
|
||||
command="php ../composer.phar install --ignore-platform-reqs"
|
||||
checkreturn="true"
|
||||
passthru="true" />
|
||||
</target>
|
||||
@@ -142,7 +142,9 @@
|
||||
|
||||
<phingcall target="export">
|
||||
<property name="revision" value="release-${version}" />
|
||||
<property name="version" value="${version}" />
|
||||
<property name="dir" value="build/old_versions/release-${version}" />
|
||||
<property name="skip-composer" value="true" />
|
||||
</phingcall>
|
||||
|
||||
<phingcall target="clean-diff-dir">
|
||||
@@ -248,26 +250,35 @@
|
||||
<equals arg1="${composer-has-dependencies}" arg2="1" trim="true" />
|
||||
<then>
|
||||
<!-- We have non-dev composer dependencies -->
|
||||
<exec dir="."
|
||||
command="git ls-tree ${revision} composer.phar"
|
||||
checkreturn="true"
|
||||
outputProperty='composer-ls-tree-output' />
|
||||
<if>
|
||||
<equals arg1="${composer-ls-tree-output}" arg2="" trim="true" />
|
||||
<not><isset property="skip-composer" /></not>
|
||||
<then>
|
||||
<fail message="There are composer dependencies, but composer.phar is missing." />
|
||||
</then>
|
||||
<else>
|
||||
<!-- Export the phar, install dependencies, delete phar. -->
|
||||
<exec dir="."
|
||||
command="git archive ${revision} composer.phar | tar -xf - -C ${dir}"
|
||||
checkreturn="true" />
|
||||
<exec dir="${dir}"
|
||||
command="php composer.phar install --no-dev --optimize-autoloader"
|
||||
command="git ls-tree ${revision} composer.phar"
|
||||
checkreturn="true"
|
||||
passthru="true" />
|
||||
<delete file="${dir}/composer.phar" />
|
||||
</else>
|
||||
outputProperty='composer-ls-tree-output' />
|
||||
<if>
|
||||
<equals arg1="${composer-ls-tree-output}" arg2="" trim="true" />
|
||||
<then>
|
||||
<fail message="There are composer dependencies, but composer.phar is missing." />
|
||||
</then>
|
||||
<else>
|
||||
<!-- Export the phar, install dependencies, delete phar. -->
|
||||
<exec dir="."
|
||||
command="git archive ${revision} composer.phar | tar -xf - -C ${dir}"
|
||||
checkreturn="true" />
|
||||
<exec dir="${dir}"
|
||||
command="php composer.phar install --no-dev --optimize-autoloader --ignore-platform-reqs"
|
||||
checkreturn="true"
|
||||
passthru="true" />
|
||||
<delete file="${dir}/composer.phar" />
|
||||
|
||||
<phingcall target="clean-vendor-dir">
|
||||
<property name="dir" value="${dir}" />
|
||||
</phingcall>
|
||||
</else>
|
||||
</if>
|
||||
</then>
|
||||
</if>
|
||||
</then>
|
||||
<else>
|
||||
@@ -277,6 +288,54 @@
|
||||
</else>
|
||||
</if>
|
||||
|
||||
<!-- Checkout latest viglink to ext folder -->
|
||||
<available file="${dir}/ext" type="dir" property="add-viglink-ext" />
|
||||
<exec dir="${dir}"
|
||||
command='php -r "echo version_compare('${version}', '3.2.0-RC2', '>=') ? 'true' : 'false';"'
|
||||
checkreturn="true"
|
||||
outputProperty='viglink-available' />
|
||||
<if>
|
||||
<and>
|
||||
<equals arg1="${add-viglink-ext}" arg2="1" trim="true" />
|
||||
<or>
|
||||
<equals arg1="${revision}" arg2="HEAD" trim="true" />
|
||||
<equals arg1="${viglink-available}" arg2="1" trim="true" />
|
||||
</or>
|
||||
</and>
|
||||
<then>
|
||||
<exec dir="${dir}/ext" command="mkdir phpbb" passthru="true" />
|
||||
|
||||
<exec dir="${dir}/ext/phpbb" command="git clone https://github.com/phpbb-extensions/viglink.git viglink" passthru="true" checkreturn="true" />
|
||||
<if>
|
||||
<equals arg1="${revision}" arg2="HEAD" trim="true" />
|
||||
<then>
|
||||
<exec dir="${dir}/ext/phpbb/viglink"
|
||||
command="git rev-parse release-phpbb-${version}"
|
||||
returnProperty='viglink_head_tag_exists' />
|
||||
<if>
|
||||
<equals arg1="${viglink_head_tag_exists}" arg2="0" trim="true" />
|
||||
<then>
|
||||
<exec dir="${dir}/ext/phpbb/viglink" command="git checkout release-phpbb-${version}" passthru="true" />
|
||||
</then>
|
||||
<else>
|
||||
<exec dir="${dir}/ext/phpbb/viglink" command="git checkout master" passthru="true" />
|
||||
</else>
|
||||
</if>
|
||||
</then>
|
||||
<else>
|
||||
<exec dir="${dir}/ext/phpbb/viglink" command="git checkout release-phpbb-${version}" passthru="true" />
|
||||
</else>
|
||||
</if>
|
||||
<delete dir="${dir}/ext/phpbb/viglink/.git" />
|
||||
<delete dir="${dir}/ext/phpbb/viglink/tests" />
|
||||
<delete dir="${dir}/ext/phpbb/viglink/travis" />
|
||||
<delete file="${dir}/ext/phpbb/viglink/.gitattributes" />
|
||||
<delete file="${dir}/ext/phpbb/viglink/.travis.yml" />
|
||||
<delete file="${dir}/ext/phpbb/viglink/phpunit.xml.dist" />
|
||||
<delete file="${dir}/ext/phpbb/viglink/README.md" />
|
||||
</then>
|
||||
</if>
|
||||
|
||||
<!-- Create schema.json -->
|
||||
<exec dir="${dir}" command="php develop/create_schema_files.php" />
|
||||
|
||||
@@ -286,10 +345,6 @@
|
||||
<delete dir="${dir}/config/development" />
|
||||
<delete dir="${dir}/config/test" />
|
||||
|
||||
<phingcall target="clean-vendor-dir">
|
||||
<property name="dir" value="${dir}" />
|
||||
</phingcall>
|
||||
|
||||
<echo msg="Setting permissions for checkout of ${revision} in ${dir}" />
|
||||
<!-- set permissions of all files to 644, directories to 755 -->
|
||||
<exec dir="${dir}" command="find . -type f|xargs chmod 644" escape="false" />
|
||||
|
@@ -25,6 +25,7 @@ $config['versions'] = Sami\Version\GitVersionCollection::create(__DIR__ . '/../'
|
||||
*/
|
||||
->add('3.0.x')
|
||||
->add('3.1.x')
|
||||
->add('3.2.x')
|
||||
->add('master')
|
||||
;
|
||||
|
||||
|
@@ -41,6 +41,7 @@ if (!isset($user->data['session_admin']) || !$user->data['session_admin'])
|
||||
// check specific permissions but this is a catchall
|
||||
if (!$auth->acl_get('a_'))
|
||||
{
|
||||
send_status_line(403, 'Forbidden');
|
||||
trigger_error('NO_ADMIN');
|
||||
}
|
||||
|
||||
|
@@ -44,7 +44,7 @@
|
||||
<tbody>
|
||||
<!-- IF .enabled -->
|
||||
<tr>
|
||||
<td class="row3" colspan="4"><strong>{L_EXTENSIONS_ENABLED}</strong></td>
|
||||
<td class="row3" colspan="4"><strong>{L_EXTENSIONS_ENABLED}</strong><!-- EVENT acp_ext_list_enabled_title_after --></td>
|
||||
</tr>
|
||||
<!-- BEGIN enabled -->
|
||||
<tr class="ext_enabled row-highlight">
|
||||
@@ -69,7 +69,7 @@
|
||||
|
||||
<!-- IF .disabled -->
|
||||
<tr>
|
||||
<td class="row3" colspan="4"><strong>{L_EXTENSIONS_DISABLED}</strong></td>
|
||||
<td class="row3" colspan="4"><strong>{L_EXTENSIONS_DISABLED}</strong><!-- EVENT acp_ext_list_disabled_title_after --></td>
|
||||
</tr>
|
||||
<!-- BEGIN disabled -->
|
||||
<tr class="ext_disabled row-highlight">
|
||||
|
61
phpBB/adm/style/acp_help_phpbb.html
Normal file
61
phpBB/adm/style/acp_help_phpbb.html
Normal file
@@ -0,0 +1,61 @@
|
||||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<a id="maincontent"></a>
|
||||
|
||||
<h1>{L_ACP_HELP_PHPBB}</h1>
|
||||
|
||||
<form id="acp_help_phpbb" method="post" action="{U_ACTION}" data-ajax-action="{U_COLLECT_STATS}">
|
||||
<div class="send-stats-row">
|
||||
<!-- EVENT acp_help_phpbb_stats_before -->
|
||||
<div class="send-stats-tile">
|
||||
<h2><i class="icon fa-bar-chart"></i>Send statistics</h2>
|
||||
<p>{L_EXPLAIN_SEND_STATISTICS}</p>
|
||||
<div class="send-stats-row">
|
||||
<div class="send-stats-data-row send-stats-data-only-row">
|
||||
<a id="trigger-configlist" data-ajax="toggle_link" data-overlay="false" data-toggle-text="{L_HIDE_STATISTICS}"><span>{L_SHOW_STATISTICS}</span><i class="icon fa-angle-down"></i></a>
|
||||
</div>
|
||||
<div class="send-stats-data-row">
|
||||
<div class="configlist" id="configlist">
|
||||
<!-- BEGIN providers -->
|
||||
<fieldset>
|
||||
<legend>{providers.NAME}</legend>
|
||||
<!-- BEGIN values -->
|
||||
<dl>
|
||||
<dt>{providers.values.KEY}</dt>
|
||||
<dd>{providers.values.VALUE}</dd>
|
||||
</dl>
|
||||
<!-- END values -->
|
||||
</fieldset>
|
||||
<!-- END providers -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<dl class="send-stats-settings">
|
||||
<dt>
|
||||
<input name="help_send_statistics" id="help_send_statistics" type="checkbox"<!-- IF S_COLLECT_STATS --> checked="checked"<!-- ENDIF --> />
|
||||
<label for="help_send_statistics"></label>
|
||||
</dt>
|
||||
<dd>{L_SEND_STATISTICS_LONG}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<!-- EVENT acp_help_phpbb_stats_after -->
|
||||
<fieldset>
|
||||
<p class="submit-buttons">
|
||||
<input type="hidden" name="systemdata" value="{RAW_DATA}" />
|
||||
<input type="hidden" name="help_send_statistics_time" value="{COLLECT_STATS_TIME}" />
|
||||
<input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" />
|
||||
</p>
|
||||
{S_FORM_TOKEN}
|
||||
</fieldset>
|
||||
</div>
|
||||
</form>
|
||||
<form action="{U_COLLECT_STATS}" method="post" target="questionaire_result" id="questionnaire-form">
|
||||
<fieldset>
|
||||
<p class="submit-buttons">
|
||||
<input type="hidden" name="systemdata" value="{RAW_DATA}" />
|
||||
<input class="button1" type="submit" id="submit_stats" name="submit" value="{L_SEND_STATISTICS}" />
|
||||
</p>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<!-- INCLUDE overall_footer.html -->
|
@@ -14,7 +14,11 @@
|
||||
|
||||
<p>{L_ADMIN_INTRO}</p>
|
||||
|
||||
<!-- IF S_VERSIONCHECK_FAIL -->
|
||||
<!-- IF S_UPDATE_INCOMPLETE -->
|
||||
<div class="errorbox">
|
||||
<p>{L_UPDATE_INCOMPLETE} <a href="{U_VERSIONCHECK}">{L_MORE_INFORMATION}</a></p>
|
||||
</div>
|
||||
<!-- ELSEIF S_VERSIONCHECK_FAIL -->
|
||||
<div class="errorbox notice">
|
||||
<p>{L_VERSIONCHECK_FAIL}</p>
|
||||
<p>{VERSIONCHECK_FAIL_REASON}</p>
|
||||
|
@@ -63,6 +63,7 @@
|
||||
<!-- ENDIF -->
|
||||
<!-- ENDIF -->
|
||||
</select>
|
||||
<!-- EVENT acp_posting_buttons_custom_tags_before -->
|
||||
<!-- BEGIN custom_tags -->
|
||||
<input type="button" class="button2" name="addbbcode{custom_tags.BBCODE_ID}" value="{custom_tags.BBCODE_TAG}" onclick="bbstyle({custom_tags.BBCODE_ID})" title="{custom_tags.BBCODE_HELPLINE}" />
|
||||
<!-- END custom_tags -->
|
||||
|
@@ -1,64 +0,0 @@
|
||||
<!-- INCLUDE overall_header.html -->
|
||||
|
||||
<a id="maincontent"></a>
|
||||
|
||||
<h1>{L_SEND_STATISTICS}</h1>
|
||||
|
||||
<p>{L_EXPLAIN_SEND_STATISTICS}</p>
|
||||
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
var iframect = 0;
|
||||
|
||||
function iframe_updated()
|
||||
{
|
||||
if (iframect++ == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
phpbb.toggleDisplay('questionnaire-form', -1);
|
||||
phpbb.toggleDisplay('questionnaire-thanks', 1);
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
<iframe onload="iframe_updated();" name="questionaire_result" style="display: none;"></iframe>
|
||||
|
||||
<form action="{U_COLLECT_STATS}" method="post" target="questionaire_result" id="questionnaire-form">
|
||||
|
||||
<p><a href="{U_ACP_MAIN}">{L_DONT_SEND_STATISTICS}</a></p>
|
||||
|
||||
<p>{L_EXPLAIN_SHOW_STATISTICS}</p>
|
||||
|
||||
<p id="show-button"><input type="button" class="button2" onclick="phpbb.toggleDisplay('configlist', 1); phpbb.toggleDisplay('show-button', -1);" value="{L_SHOW_STATISTICS}" /></p>
|
||||
|
||||
<div id="configlist">
|
||||
<input type="button" class="button2" onclick="phpbb.toggleDisplay('show-button', 1); phpbb.toggleDisplay('configlist', -1);" value="{L_HIDE_STATISTICS}" />
|
||||
<p class="submit-buttons">
|
||||
<input class="button1" type="submit" id="submit" name="submit" value="{L_SEND_STATISTICS}" />
|
||||
</p>
|
||||
|
||||
<!-- BEGIN providers -->
|
||||
<fieldset>
|
||||
<legend>{providers.NAME}</legend>
|
||||
<!-- BEGIN values -->
|
||||
<dl>
|
||||
<dt>{providers.values.KEY}</dt>
|
||||
<dd>{providers.values.VALUE}</dd>
|
||||
</dl>
|
||||
<!-- END values -->
|
||||
</fieldset>
|
||||
<!-- END providers -->
|
||||
</div>
|
||||
<p class="submit-buttons">
|
||||
<input type="hidden" name="systemdata" value="{RAW_DATA}" />
|
||||
<input class="button1" type="submit" id="submit" name="submit" value="{L_SEND_STATISTICS}" />
|
||||
</p>
|
||||
</form>
|
||||
|
||||
<div id="questionnaire-thanks" class="successbox">
|
||||
<p><strong>{L_THANKS_SEND_STATISTICS}</strong><br /><br /><a href="{U_ACP_MAIN}">« {L_GO_ACP_MAIN}</a></p>
|
||||
</div>
|
||||
|
||||
<!-- INCLUDE overall_footer.html -->
|
@@ -6,11 +6,16 @@
|
||||
|
||||
<p>{L_VERSION_CHECK_EXPLAIN}</p>
|
||||
|
||||
<!-- IF S_UPDATE_INCOMPLETE -->
|
||||
<div class="errorbox">
|
||||
<p>{L_UPDATE_INCOMPLETE} {L_UPDATE_INCOMPLETE_MORE}</p>
|
||||
</div>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF S_UP_TO_DATE -->
|
||||
<div class="successbox">
|
||||
<p>{L_VERSION_UP_TO_DATE_ACP} - <a href="{U_VERSIONCHECK_FORCE}">{L_VERSIONCHECK_FORCE_UPDATE}</a></p>
|
||||
</div>
|
||||
<!-- ELSE -->
|
||||
<!-- ELSEIF not S_UPDATE_INCOMPLETE -->
|
||||
<div class="errorbox">
|
||||
<p>{L_VERSION_NOT_UP_TO_DATE_ACP} - <a href="{U_VERSIONCHECK_FORCE}">{L_VERSIONCHECK_FORCE_UPDATE}</a></p>
|
||||
</div>
|
||||
@@ -18,10 +23,21 @@
|
||||
|
||||
<fieldset>
|
||||
<legend></legend>
|
||||
<!-- IF not S_UPDATE_INCOMPLETE -->
|
||||
<dl>
|
||||
<dt><label>{L_CURRENT_VERSION}</label></dt>
|
||||
<dd><strong>{CURRENT_VERSION}</strong></dd>
|
||||
</dl>
|
||||
<!-- ELSE -->
|
||||
<dl>
|
||||
<dt><label>{L_FILES_VERSION}</label></dt>
|
||||
<dd><strong>{FILES_VERSION}</strong></dd>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt><label>{L_DATABASE_VERSION}</label></dt>
|
||||
<dd><strong>{CURRENT_VERSION}</strong></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
</fieldset>
|
||||
|
||||
<!-- BEGIN updates_available -->
|
||||
@@ -38,6 +54,11 @@
|
||||
</fieldset>
|
||||
<!-- END updates_available -->
|
||||
|
||||
<!-- IF S_UPDATE_INCOMPLETE -->
|
||||
{INCOMPLETE_INSTRUCTIONS}
|
||||
<br>
|
||||
<!-- ENDIF -->
|
||||
|
||||
<!-- IF not S_UP_TO_DATE -->
|
||||
{UPDATE_INSTRUCTIONS}
|
||||
<br /><br />
|
||||
|
@@ -2583,3 +2583,111 @@ fieldset.permissions .padding {
|
||||
line-height: 25px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.send-stats-row {
|
||||
margin: 15px 0;
|
||||
}
|
||||
|
||||
.send-stats-row:before {
|
||||
display: table;
|
||||
content: " ";
|
||||
}
|
||||
|
||||
.send-stats-tile {
|
||||
position: relative;
|
||||
padding: 14px;
|
||||
margin-bottom: 20px;
|
||||
background-color: #eff0f2;
|
||||
border-radius: 6px;
|
||||
box-shadow: rgba(0,0,0,0.3) 1px 1px 5px;
|
||||
}
|
||||
|
||||
.send-stats-tile h2 {
|
||||
margin-top: 0;
|
||||
text-align: center;
|
||||
padding-bottom: 1em;
|
||||
}
|
||||
|
||||
.send-stats-tile i {
|
||||
padding-right: 0.3em;
|
||||
}
|
||||
|
||||
.icon {
|
||||
font-family: FontAwesome;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.send-stats-data-row {
|
||||
background: #f9f9f9;
|
||||
border-radius: 6px;
|
||||
border: #DEDEDE 1px solid;
|
||||
padding: 10px;
|
||||
border-top-width: 0;
|
||||
border-top-right-radius: 0;
|
||||
border-top-left-radius: 0;
|
||||
}
|
||||
|
||||
.send-stats-data-hidden .configlist {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.send-stats-data-only-row {
|
||||
border-radius: 6px !important;
|
||||
border-bottom-width: 1px !important;
|
||||
}
|
||||
|
||||
.send-stats-data-hidden {
|
||||
padding: 0;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.send-stats-row > .send-stats-data-row:first-child {
|
||||
background-color: #d9edf7;
|
||||
border-bottom-width: 0;
|
||||
border-top-right-radius: 6px;
|
||||
border-top-left-radius: 6px;
|
||||
border-top-width: 1px;
|
||||
border-bottom-left-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
}
|
||||
|
||||
.send-stats-settings dt, .send-stats-settings dd {
|
||||
min-width: 25px;
|
||||
}
|
||||
|
||||
.send-stats-settings dd {
|
||||
line-height: 1.5em;
|
||||
}
|
||||
|
||||
.send-stats-settings input {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.send-stats-settings input[type=checkbox] + label:before {
|
||||
content: "\f096";
|
||||
font-family: FontAwesome;
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
.send-stats-settings input[type=checkbox]:checked + label:before {
|
||||
content: "\f14a";
|
||||
color: #3c763d;
|
||||
}
|
||||
|
||||
.send-stats-data-row a:hover span {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.send-stats-data-row a {
|
||||
text-decoration: none;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.send-stats-data-row i {
|
||||
padding-left: 6px;
|
||||
}
|
||||
|
||||
.configlist {
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
@@ -243,8 +243,16 @@ function parse_document(container)
|
||||
|
||||
parse_document($('body'));
|
||||
|
||||
// Hide configlist and success message in send statistics page
|
||||
phpbb.toggleDisplay('configlist', -1);
|
||||
phpbb.toggleDisplay('questionnaire-thanks', -1);
|
||||
$('#questionnaire-form').css('display', 'none');
|
||||
var $triggerConfiglist = $('#trigger-configlist');
|
||||
|
||||
$triggerConfiglist.on('click', function () {
|
||||
var $configlist = $('#configlist');
|
||||
$configlist.closest('.send-stats-data-row').toggleClass('send-stats-data-hidden');
|
||||
$configlist.closest('.send-stats-row').find('.send-stats-data-row:first-child').toggleClass('send-stats-data-only-row');
|
||||
$(this).find('i').toggleClass('fa-angle-down fa-angle-up');
|
||||
});
|
||||
|
||||
$('#configlist').closest('.send-stats-data-row').addClass('send-stats-data-hidden');
|
||||
});
|
||||
})(jQuery);
|
||||
|
@@ -4,6 +4,101 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
|
||||
phpbb.prepareSendStats = function () {
|
||||
var $form = $('#acp_help_phpbb');
|
||||
var $dark = $('#darkenwrapper');
|
||||
var $loadingIndicator;
|
||||
|
||||
$form.on('submit', function (event) {
|
||||
var $this = $(this),
|
||||
currentTime = Math.floor(new Date().getTime() / 1000),
|
||||
statsTime = parseInt($this.find('input[name=help_send_statistics_time]').val(), 10);
|
||||
|
||||
event.preventDefault();
|
||||
$this.unbind('submit');
|
||||
|
||||
// Skip ajax request if form is submitted too early or send stats
|
||||
// checkbox is not checked
|
||||
if (!$this.find('input[name=help_send_statistics]').is(':checked') ||
|
||||
statsTime > currentTime) {
|
||||
$form.find('input[type=submit]').click();
|
||||
setTimeout(function () {
|
||||
$form.find('input[type=submit]').click();
|
||||
}, 300);
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Handler for AJAX errors
|
||||
*/
|
||||
function errorHandler(jqXHR, textStatus, errorThrown) {
|
||||
if (typeof console !== 'undefined' && console.log) {
|
||||
console.log('AJAX error. status: ' + textStatus + ', message: ' + errorThrown);
|
||||
}
|
||||
phpbb.clearLoadingTimeout();
|
||||
var errorText = '';
|
||||
|
||||
if (typeof errorThrown === 'string' && errorThrown.length > 0) {
|
||||
errorText = errorThrown;
|
||||
} else {
|
||||
errorText = $dark.attr('data-ajax-error-text-' + textStatus);
|
||||
if (typeof errorText !== 'string' || !errorText.length) {
|
||||
errorText = $dark.attr('data-ajax-error-text');
|
||||
}
|
||||
}
|
||||
phpbb.alert($dark.attr('data-ajax-error-title'), errorText);
|
||||
}
|
||||
|
||||
/**
|
||||
* This is a private function used to handle the callbacks, refreshes
|
||||
* and alert. It calls the callback, refreshes the page if necessary, and
|
||||
* displays an alert to the user and removes it after an amount of time.
|
||||
*
|
||||
* It cannot be called from outside this function, and is purely here to
|
||||
* avoid repetition of code.
|
||||
*
|
||||
* @param {object} res The object sent back by the server.
|
||||
*/
|
||||
function returnHandler(res) {
|
||||
phpbb.clearLoadingTimeout();
|
||||
|
||||
// If a confirmation is not required, display an alert and call the
|
||||
// callbacks.
|
||||
$dark.fadeOut(phpbb.alertTime);
|
||||
|
||||
if ($loadingIndicator) {
|
||||
$loadingIndicator.fadeOut(phpbb.alertTime);
|
||||
}
|
||||
|
||||
var $sendStatisticsSuccess = $('<input />', {
|
||||
type: 'hidden',
|
||||
name: 'send_statistics_response',
|
||||
value: res
|
||||
});
|
||||
$sendStatisticsSuccess.appendTo('p.submit-buttons');
|
||||
|
||||
// Finish actual form submission
|
||||
$form.find('input[type=submit]').click();
|
||||
}
|
||||
|
||||
$loadingIndicator = phpbb.loadingIndicator();
|
||||
|
||||
$.ajax({
|
||||
url: $this.attr('data-ajax-action').replace('&', '&'),
|
||||
type: 'POST',
|
||||
data: 'systemdata=' + encodeURIComponent($this.find('input[name=systemdata]').val()),
|
||||
success: returnHandler,
|
||||
error: errorHandler,
|
||||
cache: false
|
||||
}).always(function() {
|
||||
if ($loadingIndicator && $loadingIndicator.is(':visible')) {
|
||||
$loadingIndicator.fadeOut(phpbb.alertTime);
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* The following callbacks are for reording items. row_down
|
||||
* is triggered when an item is moved down, and row_up is triggered when
|
||||
@@ -62,7 +157,137 @@ phpbb.addAjaxCallback('row_delete', function(res) {
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Handler for submitting permissions form in chunks
|
||||
* This call will submit permissions forms in chunks of 5 fieldsets.
|
||||
*/
|
||||
function submitPermissions() {
|
||||
var $form = $('form#set-permissions'),
|
||||
fieldsetList = $form.find('fieldset[id^=perm]'),
|
||||
formDataSets = [],
|
||||
dataSetIndex = 0,
|
||||
$submitAllButton = $form.find('input[type=submit][name^=action]')[0],
|
||||
$submitButton = $form.find('input[type=submit][data-clicked=true]')[0];
|
||||
|
||||
// Set proper start values for handling refresh of page
|
||||
var permissionSubmitSize = 0,
|
||||
permissionRequestCount = 0,
|
||||
forumIds = [],
|
||||
permissionSubmitFailed = false;
|
||||
|
||||
if ($submitAllButton !== $submitButton) {
|
||||
fieldsetList = $form.find('fieldset#' + $submitButton.closest('fieldset.permissions').id);
|
||||
}
|
||||
|
||||
$.each(fieldsetList, function (key, value) {
|
||||
dataSetIndex = Math.floor(key / 5);
|
||||
var $fieldset = $('fieldset#' + value.id);
|
||||
if (key % 5 === 0) {
|
||||
formDataSets[dataSetIndex] = $fieldset.find('select:visible, input:not([data-name])').serialize();
|
||||
} else {
|
||||
formDataSets[dataSetIndex] += '&' + $fieldset.find('select:visible, input:not([data-name])').serialize();
|
||||
}
|
||||
|
||||
// Find proper role value
|
||||
var roleInput = $fieldset.find('input[name^=role][data-name]');
|
||||
if (roleInput.val()) {
|
||||
formDataSets[dataSetIndex] += '&' + roleInput.attr('name') + '=' + roleInput.val();
|
||||
} else {
|
||||
formDataSets[dataSetIndex] += '&' + roleInput.attr('name') + '=' +
|
||||
$fieldset.find('select[name="' + roleInput.attr('name') + '"]').val();
|
||||
}
|
||||
});
|
||||
|
||||
permissionSubmitSize = formDataSets.length;
|
||||
|
||||
// Add each forum ID to forum ID list to preserve selected forums
|
||||
$.each($form.find('input[type=hidden][name^=forum_id]'), function (key, value) {
|
||||
if (value.name.match(/^forum_id\[([0-9]+)\]$/)) {
|
||||
forumIds.push(value.value);
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Handler for submitted permissions form chunk
|
||||
*
|
||||
* @param {object} res Object returned by AJAX call
|
||||
*/
|
||||
function handlePermissionReturn(res) {
|
||||
permissionRequestCount++;
|
||||
var $dark = $('#darkenwrapper');
|
||||
|
||||
if (res.S_USER_WARNING) {
|
||||
phpbb.alert(res.MESSAGE_TITLE, res.MESSAGE_TEXT);
|
||||
permissionSubmitFailed = true;
|
||||
} else if (!permissionSubmitFailed && res.S_USER_NOTICE) {
|
||||
// Display success message at the end of submitting the form
|
||||
if (permissionRequestCount >= permissionSubmitSize) {
|
||||
var $alert = phpbb.alert(res.MESSAGE_TITLE, res.MESSAGE_TEXT);
|
||||
var $alertBoxLink = $alert.find('p.alert_text > a');
|
||||
|
||||
// Create form to submit instead of normal "Back to previous page" link
|
||||
if ($alertBoxLink) {
|
||||
// Remove forum_id[] from URL
|
||||
$alertBoxLink.attr('href', $alertBoxLink.attr('href').replace(/(&forum_id\[\]=[0-9]+)/g, ''));
|
||||
var previousPageForm = '<form action="' + $alertBoxLink.attr('href') + '" method="post">';
|
||||
$.each(forumIds, function (key, value) {
|
||||
previousPageForm += '<input type="text" name="forum_id[]" value="' + value + '" />';
|
||||
});
|
||||
previousPageForm += '</form>';
|
||||
|
||||
$alertBoxLink.on('click', function (e) {
|
||||
var $previousPageForm = $(previousPageForm);
|
||||
$('body').append($previousPageForm);
|
||||
e.preventDefault();
|
||||
$previousPageForm.submit();
|
||||
});
|
||||
}
|
||||
|
||||
// Do not allow closing alert
|
||||
$dark.off('click');
|
||||
$alert.find('.alert_close').hide();
|
||||
|
||||
if (typeof res.REFRESH_DATA !== 'undefined') {
|
||||
setTimeout(function () {
|
||||
// Create forum to submit using POST. This will prevent
|
||||
// exceeding the maximum length of URLs
|
||||
var form = '<form action="' + res.REFRESH_DATA.url.replace(/(&forum_id\[\]=[0-9]+)/g, '') + '" method="post">';
|
||||
$.each(forumIds, function (key, value) {
|
||||
form += '<input type="text" name="forum_id[]" value="' + value + '" />';
|
||||
});
|
||||
form += '</form>';
|
||||
$form = $(form);
|
||||
$('body').append($form);
|
||||
|
||||
// Hide the alert even if we refresh the page, in case the user
|
||||
// presses the back button.
|
||||
$dark.fadeOut(phpbb.alertTime, function () {
|
||||
if (typeof $alert !== 'undefined') {
|
||||
$alert.hide();
|
||||
}
|
||||
});
|
||||
|
||||
// Submit form
|
||||
$form.submit();
|
||||
}, res.REFRESH_DATA.time * 1000); // Server specifies time in seconds
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Create AJAX request for each form data set
|
||||
$.each(formDataSets, function (key, formData) {
|
||||
$.ajax({
|
||||
url: $form.action,
|
||||
type: 'POST',
|
||||
data: formData + '&' + $submitAllButton.name + '=' + encodeURIComponent($submitAllButton.value) +
|
||||
'&creation_time=' + $form.find('input[type=hidden][name=creation_time]')[0].value +
|
||||
'&form_token=' + $form.find('input[type=hidden][name=form_token]')[0].value,
|
||||
success: handlePermissionReturn,
|
||||
error: handlePermissionReturn
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
$('[data-ajax]').each(function() {
|
||||
var $this = $(this),
|
||||
@@ -83,6 +308,22 @@ $('[data-ajax]').each(function() {
|
||||
*/
|
||||
$(function() {
|
||||
phpbb.resizeTextArea($('textarea:not(.no-auto-resize)'), {minHeight: 75});
|
||||
|
||||
var $setPermissionsForm = $('form#set-permissions');
|
||||
if ($setPermissionsForm.length) {
|
||||
$setPermissionsForm.on('submit', function (e) {
|
||||
submitPermissions();
|
||||
e.preventDefault();
|
||||
});
|
||||
$setPermissionsForm.find('input[type=submit]').click(function() {
|
||||
$('input[type=submit]', $(this).parents($('form#set-permissions'))).removeAttr('data-clicked');
|
||||
$(this).attr('data-clicked', true);
|
||||
});
|
||||
}
|
||||
|
||||
if ($('#acp_help_phpbb')) {
|
||||
phpbb.prepareSendStats();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
@@ -7,6 +7,7 @@
|
||||
<!-- IF META -->{META}<!-- ENDIF -->
|
||||
<title>{PAGE_TITLE}</title>
|
||||
|
||||
<link href="{T_FONT_AWESOME_LINK}" rel="stylesheet">
|
||||
<link href="style/admin.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" type="text/css" media="screen" />
|
||||
|
||||
<script type="text/javascript">
|
||||
|
@@ -211,6 +211,23 @@ $(function() {
|
||||
|
||||
// Prepare dropdown
|
||||
phpbb.prepareRolesDropdown();
|
||||
|
||||
// Reset role drop-down on modifying permissions in advanced tab
|
||||
$('div.permissions-switch > a').on('click', function () {
|
||||
$.each($('input[type=radio][name^="setting["]'), function () {
|
||||
var $this = $(this);
|
||||
$this.on('click', function () {
|
||||
var $rolesOptions = $this.closest('fieldset.permissions').find('.roles-options'),
|
||||
rolesSelect = $rolesOptions.find('select > option')[0];
|
||||
|
||||
// Set selected setting
|
||||
$rolesOptions.children('span')
|
||||
.text(rolesSelect.text);
|
||||
$rolesOptions.children('input[type=hidden]')
|
||||
.val(rolesSelect.value);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
})(jQuery); // Avoid conflicts with other libraries
|
||||
|
@@ -42,6 +42,7 @@ require($phpbb_root_path . 'includes/constants.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/functions.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
|
||||
require($phpbb_root_path . 'includes/functions_compatibility.' . $phpEx);
|
||||
|
||||
$phpbb_container_builder = new \phpbb\di\container_builder($phpbb_root_path, $phpEx);
|
||||
$phpbb_container = $phpbb_container_builder->with_config($phpbb_config_php_file);
|
||||
@@ -70,17 +71,16 @@ require($phpbb_root_path . 'includes/compatibility_globals.' . $phpEx);
|
||||
|
||||
register_compatibility_globals();
|
||||
|
||||
/** @var \phpbb\language\language $language */
|
||||
$language = $phpbb_container->get('language');
|
||||
$language->add_lang(array('common', 'acp/common', 'cli'));
|
||||
|
||||
/* @var $user \phpbb\user */
|
||||
$user = $phpbb_container->get('user');
|
||||
$user->data['user_id'] = ANONYMOUS;
|
||||
$user->ip = '127.0.0.1';
|
||||
$user->add_lang('acp/common');
|
||||
$user->add_lang('cli');
|
||||
|
||||
/* @var $lang \phpbb\language\language */
|
||||
$lang = $phpbb_container->get('language');
|
||||
|
||||
$application = new \phpbb\console\application('phpBB Console', PHPBB_VERSION, $lang);
|
||||
$application = new \phpbb\console\application('phpBB Console', PHPBB_VERSION, $language);
|
||||
$application->setDispatcher($phpbb_container->get('dispatcher'));
|
||||
$application->register_container_commands($phpbb_container->get('console.command_collection'));
|
||||
$application->run($input);
|
||||
|
@@ -25,41 +25,42 @@
|
||||
"phpbb/phpbb-core": "self.version"
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.4,<7.1",
|
||||
"php": ">=5.4",
|
||||
"bantu/ini-get-wrapper": "1.0.*",
|
||||
"google/recaptcha": "~1.1",
|
||||
"guzzlehttp/guzzle": "~5.3",
|
||||
"lusitanian/oauth": "^0.8.1",
|
||||
"marc1706/fast-image-size": "1.1.*",
|
||||
"paragonie/random_compat": "^1.2",
|
||||
"patchwork/utf8": "1.1.*",
|
||||
"s9e/text-formatter": "^0.4.2",
|
||||
"symfony/config": "2.8.*",
|
||||
"symfony/console": "2.8.*",
|
||||
"symfony/debug": "2.8.*",
|
||||
"symfony/dependency-injection": "2.8.*",
|
||||
"symfony/event-dispatcher": "2.8.*",
|
||||
"symfony/filesystem": "2.8.*",
|
||||
"symfony/finder": "2.8.*",
|
||||
"symfony/http-foundation": "2.8.*",
|
||||
"symfony/http-kernel": "2.8.*",
|
||||
"symfony/proxy-manager-bridge": "2.8.*",
|
||||
"symfony/routing": "2.8.*",
|
||||
"symfony/twig-bridge": "2.8.*",
|
||||
"symfony/yaml": "2.8.*",
|
||||
"twig/twig": "1.*"
|
||||
"marc1706/fast-image-size": "^1.1",
|
||||
"paragonie/random_compat": "^1.4",
|
||||
"patchwork/utf8": "^1.1",
|
||||
"s9e/text-formatter": "~0.8.0",
|
||||
"symfony/config": "^2.8",
|
||||
"symfony/console": "^2.8",
|
||||
"symfony/debug": "^2.8",
|
||||
"symfony/dependency-injection": "^2.8",
|
||||
"symfony/event-dispatcher": "^2.8",
|
||||
"symfony/filesystem": "^2.8",
|
||||
"symfony/finder": "^2.8",
|
||||
"symfony/http-foundation": "^2.8",
|
||||
"symfony/http-kernel": "^2.8",
|
||||
"symfony/proxy-manager-bridge": "^2.8",
|
||||
"symfony/routing": "^2.8",
|
||||
"symfony/twig-bridge": "^2.8",
|
||||
"symfony/yaml": "^2.8",
|
||||
"twig/twig": "^1.0,<1.25"
|
||||
},
|
||||
"require-dev": {
|
||||
"fabpot/goutte": "~2.0",
|
||||
"facebook/webdriver": "~1.1",
|
||||
"laravel/homestead": "~2.2",
|
||||
"phing/phing": "2.4.*",
|
||||
"phpunit/dbunit": "1.3.*",
|
||||
"phpunit/phpunit": "4.1.*",
|
||||
"sami/sami": "1.*",
|
||||
"squizlabs/php_codesniffer": "2.*",
|
||||
"symfony/browser-kit": "2.8.*",
|
||||
"symfony/css-selector": "2.8.*",
|
||||
"symfony/dom-crawler": "2.8.*"
|
||||
"symfony/browser-kit": "^2.8",
|
||||
"symfony/css-selector": "^2.8",
|
||||
"symfony/dom-crawler": "^2.8"
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
|
497
phpBB/composer.lock
generated
497
phpBB/composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -108,7 +108,7 @@ services:
|
||||
- '%tables.ext%'
|
||||
- '%core.root_path%'
|
||||
- '%core.php_ext%'
|
||||
- '@cache.driver'
|
||||
- '@cache'
|
||||
|
||||
file_downloader:
|
||||
class: phpbb\file_downloader
|
||||
|
@@ -63,6 +63,7 @@ services:
|
||||
- '@auth.provider.oauth.service_collection'
|
||||
- '%tables.users%'
|
||||
- '@service_container'
|
||||
- '@dispatcher'
|
||||
- '%core.root_path%'
|
||||
- '%core.php_ext%'
|
||||
tags:
|
||||
@@ -99,3 +100,11 @@ services:
|
||||
- '@request'
|
||||
tags:
|
||||
- { name: auth.provider.oauth.service }
|
||||
|
||||
auth.provider.oauth.service.twitter:
|
||||
class: phpbb\auth\provider\oauth\service\twitter
|
||||
arguments:
|
||||
- '@config'
|
||||
- '@request'
|
||||
tags:
|
||||
- { name: auth.provider.oauth.service }
|
||||
|
@@ -220,6 +220,16 @@ services:
|
||||
tags:
|
||||
- { name: console.command }
|
||||
|
||||
console.command.update.check:
|
||||
class: phpbb\console\command\update\check
|
||||
arguments:
|
||||
- '@user'
|
||||
- '@config'
|
||||
- '@service_container'
|
||||
- '@language'
|
||||
tags:
|
||||
- { name: console.command }
|
||||
|
||||
console.command.user.activate:
|
||||
class: phpbb\console\command\user\activate
|
||||
arguments:
|
||||
|
@@ -71,11 +71,3 @@ services:
|
||||
- '%core.root_path%'
|
||||
- '@request'
|
||||
- '@dbal.conn.driver'
|
||||
|
||||
dbal.extractor.extractors.sqlite_extractor:
|
||||
class: phpbb\db\extractor\sqlite_extractor
|
||||
shared: false
|
||||
arguments:
|
||||
- '%core.root_path%'
|
||||
- '@request'
|
||||
- '@dbal.conn.driver'
|
||||
|
@@ -11,6 +11,7 @@ services:
|
||||
- '@feed.helper'
|
||||
- '@user'
|
||||
- '@auth'
|
||||
- '@dispatcher'
|
||||
- '%core.php_ext%'
|
||||
|
||||
feed.helper:
|
||||
@@ -32,6 +33,7 @@ services:
|
||||
- '@user'
|
||||
- '@auth'
|
||||
- '@content.visibility'
|
||||
- '@dispatcher'
|
||||
- '%core.php_ext%'
|
||||
|
||||
feed.forums:
|
||||
@@ -45,6 +47,7 @@ services:
|
||||
- '@user'
|
||||
- '@auth'
|
||||
- '@content.visibility'
|
||||
- '@dispatcher'
|
||||
- '%core.php_ext%'
|
||||
|
||||
feed.news:
|
||||
@@ -58,6 +61,7 @@ services:
|
||||
- '@user'
|
||||
- '@auth'
|
||||
- '@content.visibility'
|
||||
- '@dispatcher'
|
||||
- '%core.php_ext%'
|
||||
|
||||
feed.overall:
|
||||
@@ -71,6 +75,7 @@ services:
|
||||
- '@user'
|
||||
- '@auth'
|
||||
- '@content.visibility'
|
||||
- '@dispatcher'
|
||||
- '%core.php_ext%'
|
||||
|
||||
feed.topic:
|
||||
@@ -84,6 +89,7 @@ services:
|
||||
- '@user'
|
||||
- '@auth'
|
||||
- '@content.visibility'
|
||||
- '@dispatcher'
|
||||
- '%core.php_ext%'
|
||||
|
||||
feed.topics:
|
||||
@@ -97,6 +103,7 @@ services:
|
||||
- '@user'
|
||||
- '@auth'
|
||||
- '@content.visibility'
|
||||
- '@dispatcher'
|
||||
- '%core.php_ext%'
|
||||
|
||||
feed.topics_active:
|
||||
@@ -110,4 +117,5 @@ services:
|
||||
- '@user'
|
||||
- '@auth'
|
||||
- '@content.visibility'
|
||||
- '@dispatcher'
|
||||
- '%core.php_ext%'
|
||||
|
@@ -37,7 +37,7 @@ services:
|
||||
- '@request'
|
||||
|
||||
files.types.local:
|
||||
class: phpbb\files\types\form
|
||||
class: phpbb\files\types\local
|
||||
shared: false
|
||||
arguments:
|
||||
- '@files.factory'
|
||||
|
@@ -1,3 +1,6 @@
|
||||
parameters:
|
||||
passwords.driver.bcrypt_cost: 10
|
||||
|
||||
services:
|
||||
# ----- Password management -----
|
||||
passwords.manager:
|
||||
@@ -29,6 +32,7 @@ services:
|
||||
arguments:
|
||||
- '@config'
|
||||
- '@passwords.driver_helper'
|
||||
- '%passwords.driver.bcrypt_cost%'
|
||||
tags:
|
||||
- { name: passwords.driver }
|
||||
|
||||
@@ -37,6 +41,7 @@ services:
|
||||
arguments:
|
||||
- '@config'
|
||||
- '@passwords.driver_helper'
|
||||
- '%passwords.driver.bcrypt_cost%'
|
||||
tags:
|
||||
- { name: passwords.driver }
|
||||
|
||||
|
@@ -88,6 +88,12 @@ services:
|
||||
calls:
|
||||
- [setLexer, ['@template.twig.lexer']]
|
||||
|
||||
user:
|
||||
class: phpbb\user
|
||||
arguments:
|
||||
- '@language'
|
||||
- '%datetime.class%'
|
||||
|
||||
console.exception_subscriber:
|
||||
class: phpbb\console\exception_subscriber
|
||||
arguments:
|
||||
|
@@ -7,6 +7,16 @@ services:
|
||||
tags:
|
||||
- { name: install_finish, order: 10 }
|
||||
|
||||
installer.install_finish.install_extensions:
|
||||
class: phpbb\install\module\install_finish\task\install_extensions
|
||||
arguments:
|
||||
- '@installer.helper.container_factory'
|
||||
- '@installer.helper.config'
|
||||
- '@installer.helper.iohandler'
|
||||
- '%core.root_path%'
|
||||
tags:
|
||||
- { name: install_finish, order: 20 }
|
||||
|
||||
installer.install_finish.notify_user:
|
||||
class: phpbb\install\module\install_finish\task\notify_user
|
||||
arguments:
|
||||
@@ -16,7 +26,7 @@ services:
|
||||
- '%core.root_path%'
|
||||
- '%core.php_ext%'
|
||||
tags:
|
||||
- { name: install_finish, order: 20 }
|
||||
- { name: install_finish, order: 30 }
|
||||
|
||||
installer.module.install_finish_collection:
|
||||
class: phpbb\di\ordered_service_collection
|
||||
|
@@ -11,6 +11,17 @@ services:
|
||||
tags:
|
||||
- { name: update_database_task, order: 10 }
|
||||
|
||||
installer.update_database.update_extensions:
|
||||
class: phpbb\install\module\update_database\task\update_extensions
|
||||
arguments:
|
||||
- '@installer.helper.container_factory'
|
||||
- '@installer.helper.config'
|
||||
- '@installer.helper.iohandler'
|
||||
- '@installer.helper.update_helper'
|
||||
- '%core.root_path%'
|
||||
tags:
|
||||
- { name: update_database_task, order: 20 }
|
||||
|
||||
installer.module.update_database_collection:
|
||||
class: phpbb\di\ordered_service_collection
|
||||
arguments:
|
||||
|
@@ -43,7 +43,7 @@ phpbb_convert_intro:
|
||||
start_new: 0
|
||||
|
||||
phpbb_convert_settings:
|
||||
path: /convert/settings/{convertor}
|
||||
path: /convert/settings/{converter}
|
||||
defaults:
|
||||
_controller: phpbb.installer.controller.convert:settings
|
||||
requirements:
|
||||
|
@@ -379,8 +379,6 @@ function mass_auth($ug_type, $forum_id, $ug_id, $acl_list, $setting)
|
||||
$sql = 'VALUES ' . implode(', ', preg_replace('#^(.*?)$#', '(\1)', $sql_subary));
|
||||
break;
|
||||
|
||||
case 'mssql':
|
||||
case 'sqlite':
|
||||
case 'sqlite3':
|
||||
$sql = implode(' UNION ALL ', preg_replace('#^(.*?)$#', 'SELECT \1', $sql_subary));
|
||||
break;
|
||||
|
@@ -49,7 +49,7 @@ $classes = $finder->core_path('phpbb/')
|
||||
->directory('/db/migration/data')
|
||||
->get_classes();
|
||||
|
||||
$db = new \phpbb\db\driver\sqlite();
|
||||
$db = new \phpbb\db\driver\sqlite3();
|
||||
$factory = new \phpbb\db\tools\factory();
|
||||
$db_tools = $factory->get($db, true);
|
||||
|
||||
|
@@ -50,11 +50,13 @@
|
||||
<ol>
|
||||
<li><a href="#changelog">Changelog</a>
|
||||
<ul>
|
||||
<li><a href="#v320rc1">Changes since 3.2.0-RC1</a></li>
|
||||
<li><a href="#v320b2">Changes since 3.2.0-b2</a></li>
|
||||
<li><a href="#v320b1">Changes since 3.2.0-b1</a></li>
|
||||
<li><a href="#v320a2">Changes since 3.2.0-a2</a></li>
|
||||
<li><a href="#v320a1">Changes since 3.2.0-a1</a></li>
|
||||
<li><a href="#v31x">Changes since 3.1.x</a></li>
|
||||
<li><a href="#v319">Changes since 3.1.9</a></li>
|
||||
<li><a href="#v318">Changes since 3.1.8</a></li>
|
||||
<li><a href="#v317pl1">Changes since 3.1.7-PL1</a></li>
|
||||
<li><a href="#v317">Changes since 3.1.7</a></li>
|
||||
@@ -122,6 +124,86 @@
|
||||
<div class="inner">
|
||||
|
||||
<div class="content">
|
||||
<a name="v320rc1"></a><h3>Changes since 3.2.0-RC1</h3>
|
||||
<h4>Bug</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14588">PHPBB3-14588</a>] - RTL Search Bar</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14612">PHPBB3-14612</a>] - Double .panel class on confirmation page (ajax error?)</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14628">PHPBB3-14628</a>] - CLI installer doesn't support the translatable error messages</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14633">PHPBB3-14633</a>] - Creating a new topic leaves a white page</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14636">PHPBB3-14636</a>] - BC compatibility broken using request_var</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14640">PHPBB3-14640</a>] - Wrong link to documentation in language/en/install.php</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14660">PHPBB3-14660</a>] - Emails are being sent unparsed</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14663">PHPBB3-14663</a>] - Incorrect unicode chars handling in custom BBCode</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14665">PHPBB3-14665</a>] - Invalid syntax in report_id_auto_increment migration</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14684">PHPBB3-14684</a>] - Extension Sniff script should use NOTESTS</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14690">PHPBB3-14690</a>] - Email queue cron task never runs for phpBB 3.2</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14692">PHPBB3-14692</a>] - Duplicate subexpression in questionnaire.php</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14700">PHPBB3-14700</a>] - Updating from 3.1 to 3.2, just stops</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14706">PHPBB3-14706</a>] - nested BB-Code [list] - shows different behaviour between 3.1 and 3.2</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14709">PHPBB3-14709</a>] - Deleting posts from mcp_main causes missing post_id notice</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14714">PHPBB3-14714</a>] - Update composer dependencies to latest versions</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14716">PHPBB3-14716</a>] - Impossible to install with open basedir restrictions</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14717">PHPBB3-14717</a>] - Quote any scalar in yaml files</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14739">PHPBB3-14739</a>] - Remove old SQLite 2.8.х database driver</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14740">PHPBB3-14740</a>] - BBcodes with quotes dont get parsed correctly</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14742">PHPBB3-14742</a>] - Improvements to migrator</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14746">PHPBB3-14746</a>] - Don't depend on container in installer msg_handler</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14748">PHPBB3-14748</a>] - Modify tests to pass PHP 7.1 tests</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14763">PHPBB3-14763</a>] - Files services definition specifies form for local type</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14764">PHPBB3-14764</a>] - Incomplete update notification points to wrong update-link</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14765">PHPBB3-14765</a>] - Parameter vs requirement spelling mismatch in installer routing config</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14774">PHPBB3-14774</a>] - Content-Range only supported for resuming downloads</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14782">PHPBB3-14782</a>] - Quick Links > Your Posts gives mysql error</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14788">PHPBB3-14788</a>] - Update developer list to reflect team changes</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14791">PHPBB3-14791</a>] - Trying to get form from wrong button in search test base</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14793">PHPBB3-14793</a>] - "A non-numeric value encountered" PHP warning on PHP 7.1+</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14794">PHPBB3-14794</a>] - Fix redirect behavior in according to parse_url() behavior changes in PHP 7.1+</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14797">PHPBB3-14797</a>] - Remove PHP 7.1 builds from allowed failures</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14799">PHPBB3-14799</a>] - purge_notifications() leaves open transaction for bad notification types.</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14813">PHPBB3-14813</a>] - functions_compatibility missing in phpbbcli</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14814">PHPBB3-14814</a>] - Text reparser reparses already correctly [re] -parsed objects</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14821">PHPBB3-14821</a>] - Do not expect parsed HTML in kernel subscriber output</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14846">PHPBB3-14846</a>] - Swapped variables in bbcode, first one doesn't get parsed</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14873">PHPBB3-14873</a>] - Missing width and height variables for smilies</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14875">PHPBB3-14875</a>] - Cannot use HTML entity type database passwords during installation</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14883">PHPBB3-14883</a>] - Text Reparser is Reparsing Empty Data</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14892">PHPBB3-14892</a>] - Assets paths broken on Windows instances</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14894">PHPBB3-14894</a>] - Update: download of conflict files offers .tar file without file extension</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14896">PHPBB3-14896</a>] - Link after installation fails at redirecting to ACP</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14897">PHPBB3-14897</a>] - IOHandler in the installer declares member variable only in the constructor</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14900">PHPBB3-14900</a>] - Disabled extension breakage in ACP</li>
|
||||
</ul>
|
||||
<h4>Improvement</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10961">PHPBB3-10961</a>] - "You are not authorised..." still sends HTTP status 200 instead of i.e. 403</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13709">PHPBB3-13709</a>] - Fallback to english in email templates by extensions</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14586">PHPBB3-14586</a>] - phpBB Oauth V1 Wrapper Support</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14595">PHPBB3-14595</a>] - smtp port</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14620">PHPBB3-14620</a>] - Update docs/ for 3.2.x</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14689">PHPBB3-14689</a>] - Build 3.2.x API docs</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14729">PHPBB3-14729</a>] - Report post controller and report helper require specific implementation of config class</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14734">PHPBB3-14734</a>] - Use SVG emoji</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14805">PHPBB3-14805</a>] - Allow building package for previous versions on PHP 7</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14867">PHPBB3-14867</a>] - INCLUDECSS Path broken</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14885">PHPBB3-14885</a>] - Migrator logs need line breaks</li>
|
||||
</ul>
|
||||
<h4>New Feature</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12610">PHPBB3-12610</a>] - Add a command to check if the board is up to date.</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14484">PHPBB3-14484</a>] - Support extensions in UI tests</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14492">PHPBB3-14492</a>] - Improve send stats page and include VigLink</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14547">PHPBB3-14547</a>] - Add Vagrant Support</li>
|
||||
</ul>
|
||||
<h4>Task</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-10809">PHPBB3-10809</a>] - Remove PHP MSSQL Support</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13573">PHPBB3-13573</a>] - Investigate ability to use set_config() and similar compatibility functions.</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14671">PHPBB3-14671</a>] - Deduplicate database schema definiton</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14696">PHPBB3-14696</a>] - Fix email template test for '0' username</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14807">PHPBB3-14807</a>] - Updates dependencies</li>
|
||||
</ul>
|
||||
|
||||
<a name="v320b2"></a><h3>Changes since 3.2.0-b2</h3>
|
||||
<h4>Bug</h4>
|
||||
<ul>
|
||||
@@ -527,7 +609,88 @@
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14265">PHPBB3-14265</a>] - Make all tables available in the container</li>
|
||||
</ul>
|
||||
|
||||
<a name="v318"></a><h3>Changes since 3.1.8</h3>
|
||||
<a name="v319"></a><h3>Changes since 3.1.9</h3>
|
||||
|
||||
<h4>Bug</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-11446">PHPBB3-11446</a>] - Use sql_in_set as designed and consistent with the rest of phpBB code in phpbb_notification_manager</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12230">PHPBB3-12230</a>] - Do not auto remove user group when Newly Registered Users group was disabled</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12925">PHPBB3-12925</a>] - Use plural for permanent delete posts/topics confirmation</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14109">PHPBB3-14109</a>] - MySQL InnoDB does not support multiple index definitions on the same query.</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14291">PHPBB3-14291</a>] - Function send_file_to_browser() endlessly overwrites 'filesize' in ATTACHMENTS_TABLE</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14610">PHPBB3-14610</a>] - Q&A CAPTCHA logs error when it has been solved</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14615">PHPBB3-14615</a>] - delete avatar triggers the new min max value in the HTML5 inputs</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14616">PHPBB3-14616</a>] - Auto-prune fails on large forums</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14631">PHPBB3-14631</a>] - 3.1.9 DB cli update crashes with PHP Fatal error: Call to undefined function phpbb\truncate_string()</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14654">PHPBB3-14654</a>] - Imagemagick > ImageMagick</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14661">PHPBB3-14661</a>] - Fix a typo in twig.php</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14673">PHPBB3-14673</a>] - Missing Language Variable</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14683">PHPBB3-14683</a>] - Typos in operators in some email templates</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14703">PHPBB3-14703</a>] - module.add adds a module to the wrong parent</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14704">PHPBB3-14704</a>] - Remove unused language files and corresponding functions</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14721">PHPBB3-14721</a>] - New registrants choosing old deleted usernames get linked to old accounts with namechange</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14742">PHPBB3-14742</a>] - Improvements to migrator</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14745">PHPBB3-14745</a>] - "U_NOTIFICATION_SETTINGS" contains an HTML entity but is printed in a plaintext email</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14755">PHPBB3-14755</a>] - Error in MCP Move posts</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14782">PHPBB3-14782</a>] - Quick Links > Your Posts gives mysql error</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14788">PHPBB3-14788</a>] - Update developer list to reflect team changes</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14796">PHPBB3-14796</a>] - Log table is using constant in log delete method</li>
|
||||
</ul>
|
||||
<h4>Improvement</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13709">PHPBB3-13709</a>] - Fallback to english in email templates by extensions</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13716">PHPBB3-13716</a>] - Check phpBB version constant against config version</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13865">PHPBB3-13865</a>] - Complement core event search_modify_param</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14184">PHPBB3-14184</a>] - Missing info on SMTP mail function option</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14429">PHPBB3-14429</a>] - core.obtain_users_online_string_modify</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14466">PHPBB3-14466</a>] - Add an event to cron.php</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14469">PHPBB3-14469</a>] - [Template] - <!-- EVENT viewforum_topicrow_before --></li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14516">PHPBB3-14516</a>] - [Template] - memberlist_email_before</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14581">PHPBB3-14581</a>] - Add core events relating to soft delete</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14592">PHPBB3-14592</a>] - [PHP] - core.search_backend_search_after</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14596">PHPBB3-14596</a>] - Prevent installs of 3.1 on PHP 7</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14624">PHPBB3-14624</a>] - Add event to ucp_profile in signature section</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14630">PHPBB3-14630</a>] - Add event to ucp_pm_compose</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14638">PHPBB3-14638</a>] - [PHP] - multiple UCP subscription events for form data and template variables</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14643">PHPBB3-14643</a>] - Select newest file in restore list</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14652">PHPBB3-14652</a>] - Typo birthdays</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14664">PHPBB3-14664</a>] - Fix PHPDoc comment in cron manager</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14672">PHPBB3-14672</a>] - Add template event to viewforum</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14685">PHPBB3-14685</a>] - PHP event for altering announcements sql</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14687">PHPBB3-14687</a>] - Modify viewforum_modify_topicrow</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14688">PHPBB3-14688</a>] - Add core events to the feeds</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14689">PHPBB3-14689</a>] - Build 3.2.x API docs</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14695">PHPBB3-14695</a>] - Add posting_editor_subject_prepend/append template events</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14712">PHPBB3-14712</a>] - Add search.php core event to allow modifying the forum select list</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14713">PHPBB3-14713</a>] - Add core event to the admin function get_forum_list()</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14715">PHPBB3-14715</a>] - Add template events in posting_topic_review & mcp_topic</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14720">PHPBB3-14720</a>] - Add global javascript variable 'phpbb' to jshint settings</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14727">PHPBB3-14727</a>] - Event core.search_modify_submit_parameters</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14738">PHPBB3-14738</a>] - Add core events to improve modifying forum lists</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14747">PHPBB3-14747</a>] - Add topic_last_poster_id and topic_last_post_time to Event core.modify_posting_auth</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14762">PHPBB3-14762</a>] - Add core event to session.php to alter IP address</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14781">PHPBB3-14781</a>] - Add core event to the function group_user_attributes()</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14783">PHPBB3-14783</a>] - Event - ACP Posting Buttons Before Custom BBCodes</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14784">PHPBB3-14784</a>] - missing rewrite for lighttpd</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14785">PHPBB3-14785</a>] - [Template event] - overall_header_headerbar_append</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14787">PHPBB3-14787</a>] - Add more parameters to the core.search_modify_url_parameters event</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14789">PHPBB3-14789</a>] - Add missing link hash and form token checks to ACP</li>
|
||||
</ul>
|
||||
<h4>New Feature</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-13978">PHPBB3-13978</a>] - [PHP] - User control panel - on signature change</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14484">PHPBB3-14484</a>] - Support extensions in UI tests</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14506">PHPBB3-14506</a>] - [Template] - mcp_move_before</li>
|
||||
</ul>
|
||||
<h4>Task</h4>
|
||||
<ul>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-12133">PHPBB3-12133</a>] - Update list of browsers supporting filename* in Content-Disposition</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14538">PHPBB3-14538</a>] - Update composer dependencies</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14598">PHPBB3-14598</a>] - Phing Sniffer Testing Use Statements in DocBlocks</li>
|
||||
<li>[<a href="http://tracker.phpbb.com/browse/PHPBB3-14743">PHPBB3-14743</a>] - Remove PHP7 from test matrix in 3.1.x</li>
|
||||
</ul>
|
||||
|
||||
<a name="v318"></a><h3>Changes since 3.1.8</h3>
|
||||
|
||||
<h4>Bug</h4>
|
||||
<ul>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
*
|
||||
* phpBB © Copyright phpBB Limited 2003-2014
|
||||
* phpBB © Copyright phpBB Limited 2003-2016
|
||||
* http://www.phpbb.com
|
||||
*
|
||||
* phpBB is free software. You can redistribute it and/or modify it
|
||||
@@ -20,14 +20,13 @@
|
||||
|
||||
phpBB Project Manager: Marshalrusty (Yuriy Rusko)
|
||||
|
||||
phpBB Lead Developer: naderman (Nils Adermann)
|
||||
phpBB Product Manager: naderman (Nils Adermann)
|
||||
|
||||
phpBB Lead Developer: Marc (Marc Alexander)
|
||||
|
||||
phpBB Developers: bantu (Andreas Fischer)
|
||||
CHItA (Máté Bartus)
|
||||
dhruv.goel92 (Dhruv Goel)
|
||||
Elsensee (Oliver Schramm)
|
||||
marc1706 (Marc Alexander)
|
||||
nickvergessen (Joas Schilling)
|
||||
Nicofuma (Tristan Darricau)
|
||||
prototech (Cesar Gallegos)
|
||||
|
||||
@@ -54,11 +53,13 @@ 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]
|
||||
dhruv.goel92 (Dhruv Goel) [04/2013 - 05/2016]
|
||||
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]
|
||||
kellanved (Henry Sudhof) [04/2007 - 03/2011]
|
||||
nickvergessen (Joas Schilling)[04/2010 - 12/2015]
|
||||
Oleg (Oleg Pudeyev) [01/2011 - 05/2013]
|
||||
rxu (Ruslan Uzdenov) [04/2010 - 12/2012]
|
||||
TerraFrost (Jim Wigginton) [04/2009 - 01/2011]
|
||||
|
@@ -249,7 +249,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
|
||||
<div class="content">
|
||||
|
||||
<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>
|
||||
<p>Please read the paragraph about permissions in our extensive <a href="https://www.phpbb.com/support/docs/en/3.2/ug/">online documentation</a>.</p>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -305,7 +305,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||
|
||||
<div class="content">
|
||||
|
||||
<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>Please read our <a href="https://www.phpbb.com/support/docs/en/3.2/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>
|
||||
|
||||
|
@@ -59,7 +59,7 @@
|
||||
<li><a href="#quickinstall">Quick install</a></li>
|
||||
<li><a href="#require">Requirements</a></li>
|
||||
<li><a href="#install">New installation</a></li>
|
||||
<li><a href="#update">Updating from stable releases of phpBB 3.1.x</a>
|
||||
<li><a href="#update">Updating from stable releases of phpBB 3.2.x</a>
|
||||
<ol style="list-style-type: lower-roman;">
|
||||
<li><a href="#update_full">Full package</a></li>
|
||||
<li><a href="#update_files">Changed files</a></li>
|
||||
@@ -68,8 +68,8 @@
|
||||
<li><a href="#update_all">All package types</a></li>
|
||||
</ol>
|
||||
</li>
|
||||
<li><a href="#update30">Updating from phpBB 3.0.x to phpBB 3.1.x</a></li>
|
||||
<li><a href="#convert">Conversion from phpBB 2.0.x to phpBB 3.1.x</a>
|
||||
<li><a href="#update30_31">Updating from phpBB 3.0.x/3.1.x to phpBB 3.2.x</a></li>
|
||||
<li><a href="#convert">Conversion from phpBB 2.0.x to phpBB 3.2.x</a>
|
||||
<ol style="list-style-type: lower-roman;">
|
||||
<li><a href="#prereq">Requirements before converting</a></li>
|
||||
<li><a href="#conversion">Converting</a></li>
|
||||
@@ -109,7 +109,7 @@
|
||||
<li>Change the permissions on config.php to be writable by all (666 or -rw-rw-rw- within your FTP Client)</li>
|
||||
<li>Change the permissions on the following directories to be writable by all (777 or -rwxrwxrwx within your FTP Client):<br />
|
||||
<code>store/</code>, <code>cache/</code>, <code>files/</code> and <code>images/avatars/upload/</code>.</li>
|
||||
<li>Point your web browser to the location where you uploaded the phpBB3 files with the addition of <code>install/index.php</code> or simply <code>install/</code>, e.g. <code>http://www.example.com/phpBB3/install/index.php</code>, <code>http://www.example.com/forum/install/</code>.</li>
|
||||
<li>Point your web browser to the location where you uploaded the phpBB3 files with the addition of <code>install/app.php</code> or simply <code>install/</code>, e.g. <code>http://www.example.com/phpBB3/install/app.php</code>, <code>http://www.example.com/forum/install/</code>.</li>
|
||||
<li>Click the <strong><em>INSTALL</em></strong> tab, follow the steps and fill out all the requested information.</li>
|
||||
<li>Change the permissions on config.php to be writable only by yourself (644 or -rw-r--r-- within your FTP Client)</li>
|
||||
<li>phpBB3 should now be available, please <strong>MAKE SURE</strong> you read at least <a href="#postinstall">Section 6</a> below for important, security related post-installation instructions, and also take note of <a href="#anti_spam">Section 7</a> regarding anti-spam measures.</li>
|
||||
@@ -142,13 +142,12 @@
|
||||
<li>MySQL 3.23 or above (MySQLi supported)</li>
|
||||
<li>MariaDB 5.1 or above</li>
|
||||
<li>PostgreSQL 8.3+</li>
|
||||
<li>SQLite 2.8.2+</li>
|
||||
<li>SQLite 3.6.15+</li>
|
||||
<li>MS SQL Server 2000 or above (directly or via ODBC or the native adapter)</li>
|
||||
<li>MS SQL Server 2000 or above (via ODBC or the native adapter)</li>
|
||||
<li>Oracle</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><strong>PHP 5.4.0+</strong> and <strong>PHP < 7.1</strong> with support for the database you intend to use.</li>
|
||||
<li><strong>PHP 5.4.0+</strong> with support for the database you intend to use.</li>
|
||||
<li>The following PHP modules are required:
|
||||
<ul>
|
||||
<li>json</li>
|
||||
@@ -160,7 +159,7 @@
|
||||
<li>zlib Compression support</li>
|
||||
<li>Remote FTP support</li>
|
||||
<li>XML support</li>
|
||||
<li>Imagemagick support</li>
|
||||
<li>ImageMagick support</li>
|
||||
<li>GD Support</li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -192,7 +191,7 @@
|
||||
|
||||
<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 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>
|
||||
<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/app.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>
|
||||
|
||||
@@ -272,11 +271,11 @@
|
||||
|
||||
<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 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>First, you should make a copy of your existing <code>config.php</code> file; keep it in a safe place! Next, delete all the existing phpBB files, you may want to leave your <code>files/</code>, <code>images/</code> and <code>ext/</code> directories in place, otherwise you will lose your file attachments, uploaded images and get error due to missing extension files. You can leave alternative styles in place too. With this complete, you can upload the new phpBB files (see <a href="#install">New installation</a> for details if necessary). Once complete, copy back your saved <code>config.php</code>, replacing the new one. Another method is to just <strong>replace</strong> the existing files with the files from the full package - though make sure you do <strong>not</strong> overwrite your config.php file.</p>
|
||||
|
||||
<p>You should now run <code>install/database_update.php</code> which, depending on your previous version, will make a number of database changes. You may receive <em>FAILURES</em> during this procedure. They should not be a cause for concern unless you see an actual <em>ERROR</em>, in which case the script will stop (in this case you should seek help via our forums or bug tracker). If you have shell access to your server, you may wish to update via the command line interface. From your board's root, execute the following command: <code>php bin/phpbbcli.php --safe-mode db:migrate</code>.</p>
|
||||
<p>You should now got to <code>/install/app.php/update</code> which will display a warning: <strong>No valid update directory was found, please make sure you uploaded the relevant files</strong>. Beneath that warning you will see a radion button <em>Update database only</em>, just click <strong>Submit</strong>. Depending on your previous version this will make a number of database changes. You may receive <em>FAILURES</em> during this procedure. They should not be a cause for concern unless you see an actual <em>ERROR</em>, in which case the script will stop (in this case you should seek help via our forums or bug tracker). If you have shell access to your server, you may wish to update via the command line interface. From your board's root, execute the following command: <code>php bin/phpbbcli.php --safe-mode db:migrate</code>.</p>
|
||||
|
||||
<p>Once <code>install/database_update.php</code> has completed, you may proceed to the Administration Control Panel and then remove the install directory as advised.</p>
|
||||
<p>Once <code>/install/app.php/update</code> has completed, it displays the success message: <strong>The database update was successful</strong>. You may proceed to the Administration Control Panel and then remove the install directory as advised.</p>
|
||||
|
||||
<a name="update_files"></a><h3>4.ii. Changed files</h3>
|
||||
|
||||
@@ -292,9 +291,9 @@
|
||||
|
||||
<p>The patch file package is for those wanting to update through the patch application, and should only be used by those who are comfortable with it.</p>
|
||||
|
||||
<p>The patch file is one solution for those with many Modifications (MODs) or other changes and do not want to re-add them back to all the changed files. To use this you will need command line access to a standard UNIX type <strong>patch</strong> application. If you do not have access to such an application, but still want to use this update approach, we strongly recommend the <a href="#update_auto">Automatic update package</a> explained below. It is also the recommended update method.</p>
|
||||
<p>The patch file is one solution for those with changes in to the phpBB core files and do not want to re-add them back to all the changed files. To use this you will need command line access to a standard UNIX type <strong>patch</strong> application. If you do not have access to such an application, but still want to use this update approach, we strongly recommend the <a href="#update_auto">Automatic update package</a> explained below. It is also the recommended update method.</p>
|
||||
|
||||
<p>A number of patch files are provided to allow you to update from previous stable releases. Select the correct patch, e.g. if your current version is <strong>3.1.0</strong>, you need the <code>phpBB-3.1.1-patch.zip/tar.bz2</code> file. Place the correct patch in the parent directory containing the phpBB core files (i.e. index.php, viewforum.php, etc.). With this done you should run the following command: <code>patch -cl -d [PHPBB DIRECTORY] -p1 < [PATCH NAME]</code> (where PHPBB DIRECTORY is the directory name your phpBB Installation resides in, for example phpBB, and where PATCH NAME is the relevant filename of the selected patch file). This should complete quickly, hopefully without any HUNK FAILED comments.</p>
|
||||
<p>A number of patch files are provided to allow you to update from previous stable releases. Select the correct patch, e.g. if your current version is <strong>3.2.0</strong>, you need the <code>phpBB-3.2.1-patch.zip/tar.bz2</code> file. Place the correct patch in the parent directory containing the phpBB core files (i.e. index.php, viewforum.php, etc.). With this done you should run the following command: <code>patch -cl -d [PHPBB DIRECTORY] -p1 < [PATCH NAME]</code> (where PHPBB DIRECTORY is the directory name your phpBB Installation resides in, for example phpBB, and where PATCH NAME is the relevant filename of the selected patch file). This should complete quickly, hopefully without any HUNK FAILED comments.</p>
|
||||
|
||||
<p>If you do get failures, you should look at using the <a href="#update_files">Changed Files</a> package to replace the files which failed to patch. Please note that you will need to manually re-add any MODs to these particular files. Alternatively, if you know how, you can examine the .rej files to determine what failed where and make manual adjustments to the relevant source.</p>
|
||||
|
||||
@@ -304,7 +303,7 @@
|
||||
|
||||
<p>This update method is the recommended method for updating. This package detects changed files automatically and merges in changes if needed.</p>
|
||||
|
||||
<p>The automatic update package will update the board from a given version to the latest version. A number of automatic update files are available, and you should choose the one that corresponds to the version of the board that you are currently running. For example, if your current version is <strong>3.1.5</strong>, you need the <code>phpBB-3.1.5_to_3.1.6.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.2.0</strong>, you need the <code>phpBB-3.2.0_to_3.2.1.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>
|
||||
|
||||
@@ -333,16 +332,16 @@
|
||||
|
||||
<hr />
|
||||
|
||||
<a name="update30"></a><h2>5. Updating from phpBB 3.0.x to phpBB 3.1.x</h2>
|
||||
<a name="update30_31"></a><h2>5. Updating from phpBB 3.0.x/3.1x to phpBB 3.2.x</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner"><span class="corners-top"><span></span></span>
|
||||
|
||||
<div class="content">
|
||||
|
||||
<p>Updating from phpBB 3.0.x to 3.1.x is just the same as <a href="#update">updating from stable releases of phpBB 3.1.x</a></p>
|
||||
<p>Updating from phpBB 3.0.x or 3.1.x to 3.2.x is just the same as <a href="#update">updating from stable releases of phpBB 3.2.x</a></p>
|
||||
|
||||
<p>However you can also start with a new set of phpBB 3.1.x files.</p>
|
||||
<p>However you can also start with a new set of phpBB 3.2.x files.</p>
|
||||
|
||||
<ol>
|
||||
<li>Delete all files <strong>EXCEPT</strong> for the following:
|
||||
@@ -352,10 +351,12 @@
|
||||
<li>The <code>images/</code> directory</li>
|
||||
<li>The <code>files/</code> directory</li>
|
||||
<li>The <code>store/</code> directory</li>
|
||||
<li>(The <code>ext/</code> directory</li>
|
||||
</ul></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>Upload the contents of the 3.2.x Full Package into your forum's directory. Make sure the root level .htaccess file is included in the upload.</li>
|
||||
<li>Browse to <code>/install/app.php/update</code></li>
|
||||
<li>Read the notice <em>Update database only</em> and press <strong>Submit</strong></li>
|
||||
<li>Delete the <code>install/</code> directory</li>
|
||||
</ol>
|
||||
</div>
|
||||
@@ -367,7 +368,7 @@
|
||||
|
||||
<hr />
|
||||
|
||||
<a name="convert"></a><h2>6. Conversion from phpBB 2.0.x to phpBB 3.1.x</h2>
|
||||
<a name="convert"></a><h2>6. Conversion from phpBB 2.0.x to phpBB 3.2.x</h2>
|
||||
|
||||
<div class="paragraph">
|
||||
<div class="inner">
|
||||
|
@@ -91,24 +91,23 @@
|
||||
<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>
|
||||
|
||||
<p>Users of phpBB 3.0 and 3.1 Beta versions cannot directly update.</p>
|
||||
<p>Users of phpBB 3.0, 3.1 and 3.2 Beta versions cannot directly update.</p>
|
||||
|
||||
<p>Please note that we don't support the following installation types:</p>
|
||||
<ul>
|
||||
<li>Updates from phpBB 3.0 Beta versions to phpBB 3.0 RC1 and higher</li>
|
||||
<li>Updates from phpBB 3.1 Beta versions to phpBB 3.1 RC1 and higher</li>
|
||||
<li>Conversions from phpBB 2.0.x to phpBB 3.0 or 3.1 Beta versions</li>
|
||||
<li>phpBB 3.0 or 3.1 Beta installations</li>
|
||||
<li>Updates from phpBB Beta versions and lower to phpBB Release Candidates and higher</li>
|
||||
<li>Conversions from phpBB 2.0.x to phpBB 3.0 Beta, 3.1 Beta and 3.2 Beta versions</li>
|
||||
<li>phpBB 3.0 Beta, 3.1 Beta or 3.2 beta installations</li>
|
||||
</ul>
|
||||
|
||||
<p>We give support for the following installation types:</p>
|
||||
|
||||
<ul>
|
||||
<li>Updates from phpBB 3.0 RC1 and 3.1 RC1 to the latest version</li>
|
||||
<li>Updates from phpBB 3.0 RC1, 3.1 RC1 and 3.2 RC1 to the latest version</li>
|
||||
<li>Note: if using the <em>Automatic Update Package</em>, updates are supported from phpBB 3.0.2 onward. To update a pre-3.0.2 installation, first update to 3.0.2 and then update to the current version.</li>
|
||||
<li>Conversions from phpBB 2.0.x to the latest version</li>
|
||||
<li>New installations of phpBB 3.0.x - only the latest released version</li>
|
||||
<li>New installations of phpBB 3.1.x - only the latest released version</li>
|
||||
<li>New installations of phpBB 3.2.x - only the latest released version</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
@@ -131,7 +130,7 @@
|
||||
|
||||
<a name="i18n"></a><h3>2.i. Languages (Internationalisation - i18n)</h3>
|
||||
|
||||
<p>A number of language packs with included style localisations are available. You can find them listed in the <a href="https://www.phpbb.com/languages/">Language Packs</a> pages of our downloads section or from the <a href="https://www.phpbb.com/customise/db/language_packs-25/">Language Packs</a> section of the <a href="https://www.phpbb.com/customise/db/">Customisation Database</a>.</p>
|
||||
<p>A number of language packs with included style localisations are available. You can find them listed in the <a href="https://www.phpbb.com/languages/">Language Packs</a> pages of our downloads section or from the <a href="https://www.phpbb.com/customise/db/language_packs-25">Language Packs</a> section of the <a href="https://www.phpbb.com/customise/db/">Customisation Database</a>.</p>
|
||||
|
||||
<p>For more information about language packs, please see: <a href="https://www.phpbb.com/languages/">https://www.phpbb.com/languages/</a></p>
|
||||
|
||||
@@ -139,7 +138,7 @@
|
||||
|
||||
<p>Installation of these packages is straightforward: simply download the required language pack, uncompress (unzip) it and via FTP transfer the included <code>language</code> and <code>styles</code> folders to the root of your board installation. The language can then be installed via the Administration Control Panel of your board: <code>Customise tab -> Language management -> Language packs</code>. A more detailed description of the process is in the Knowledge Base article, <a href="https://www.phpbb.com/kb/article/how-to-install-a-language-pack/">How to Install a Language Pack</a>.</p>
|
||||
|
||||
<p>If your language is not available, please visit our <a href="https://www.phpbb.com/community/viewforum.php?f=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>
|
||||
<p>If your language is not available, please visit our <a href="https://www.phpbb.com/community/viewforum.php?f=566">[3.2.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>
|
||||
|
||||
@@ -185,7 +184,7 @@
|
||||
|
||||
<p>Comprehensive documentation is now available on the phpBB website:</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><a href="https://www.phpbb.com/support/docs/en/3.2/ug/">https://www.phpbb.com/support/docs/en/3.2/ug/</a></p>
|
||||
|
||||
<p>This covers everything from installation to setting permissions and managing users.</p>
|
||||
|
||||
@@ -267,14 +266,14 @@
|
||||
<ul>
|
||||
<li>Your server type/version, e.g. Apache 2.2.3, IIS 7, Sambar, etc.</li>
|
||||
<li>PHP version and mode of operation, e.g. PHP 5.4.0 as a module, PHP 5.4.0 running as CGI, etc.</li>
|
||||
<li>DB type/version, e.g. MySQL 5.0.77, PostgreSQL 9.0.6, MSSQL Server 2000 SP1, etc.</li>
|
||||
<li>DB type/version, e.g. MySQL 5.0.77, PostgreSQL 9.0.6, MSSQL Server 2000 (via ODBC), etc.</li>
|
||||
</ul>
|
||||
|
||||
<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/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>
|
||||
<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.2.x the coding guidelines may be found here: <a href="http://area51.phpbb.com/docs/32x/coding-guidelines.html">http://area51.phpbb.com/docs/32x/coding-guidelines.html</a></p>
|
||||
|
||||
<p>Once a bug has been submitted you will be emailed any follow up comments added to it. <strong>Please</strong> if you are requested to supply additional information, do so! It is frustrating for us to receive bug reports, ask for additional information but get nothing. In these cases we have a policy of closing the bug, which may leave a very real problem in place. Obviously we would rather not have this situation arise.</p>
|
||||
|
||||
@@ -324,11 +323,11 @@
|
||||
|
||||
<div class="content">
|
||||
|
||||
<p>phpBB 3.2.x takes advantage of new features added in PHP 5.4. We recommend that you upgrade to the latest stable release of PHP to run phpBB. The minimum version required is PHP 5.4.0 and the maximum supported version is PHP 7.0.</p>
|
||||
<p>phpBB 3.2.x takes advantage of new features added in PHP 5.4. We recommend that you upgrade to the latest stable release of PHP to run phpBB. The minimum version required is PHP 5.4.0 and the maximum supported version is the latest stable version of PHP.</p>
|
||||
|
||||
<p>Please remember that running any application on a development (unstable, e.g. a beta release) version of PHP can lead to strange/unexpected results which may appear to be bugs in the application. Therefore, we recommend you upgrade to the newest stable version of PHP before running phpBB. If you are running a development version of PHP please check any bugs you find on a system running a stable release before submitting.</p>
|
||||
|
||||
<p>This board has been developed and tested under Linux and Windows (amongst others) running Apache using MySQL 3.23, 4.x, 5.x, MariaDB 5.x, MSSQL Server 2000, PostgreSQL 8.x, Oracle 8, SQLite 2 and SQLite 3. Versions of PHP used range from 5.4.x to 5.6.x without problem.</p>
|
||||
<p>This board has been developed and tested under Linux and Windows (amongst others) running Apache using MySQL 3.23, 4.x, 5.x, MariaDB 5.x, PostgreSQL 8.x, Oracle 8 and SQLite 3. Versions of PHP used range from 5.4.x above 5.6.x to 7.0.x without problem.</p>
|
||||
|
||||
<a name="phpsec"></a><h3>7.i. Notice on PHP security issues</h3>
|
||||
|
||||
|
@@ -1122,9 +1122,6 @@ append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;
|
||||
<p>Some of these functions are only chosen over others because of personal preference and have no benefit other than maintaining consistency throughout the code.</p>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<p>Use <code>sizeof</code> instead of <code>count</code></p>
|
||||
</li>
|
||||
<li>
|
||||
<p>Use <code>strpos</code> instead of <code>strstr</code></p>
|
||||
</li>
|
||||
|
@@ -58,6 +58,18 @@ acp_email_options_after
|
||||
* Since: 3.1.2-RC1
|
||||
* Purpose: Add settings to mass email form
|
||||
|
||||
acp_ext_list_disabled_title_after
|
||||
===
|
||||
* Location: adm/style/acp_ext_list.html
|
||||
* Since: 3.1.11-RC1
|
||||
* Purpose: Add text after disabled extensions section title.
|
||||
|
||||
acp_ext_list_enabled_title_after
|
||||
===
|
||||
* Location: adm/style/acp_ext_list.html
|
||||
* Since: 3.1.11-RC1
|
||||
* Purpose: Add text after enabled extensions section title.
|
||||
|
||||
acp_forums_custom_settings
|
||||
===
|
||||
* Location: adm/style/acp_forums.html
|
||||
@@ -184,6 +196,18 @@ acp_groups_position_teampage_add_button_before
|
||||
* Since: 3.1.7-RC1
|
||||
* Purpose: Add content before adding group to teampage submit button
|
||||
|
||||
acp_help_phpbb_stats_after
|
||||
===
|
||||
* Location: adm/style/acp_help_phpbb.html
|
||||
* Since: 3.2.0-RC2
|
||||
* Purpose: Add content after send statistics tile
|
||||
|
||||
acp_help_phpbb_stats_before
|
||||
===
|
||||
* Location: adm/style/acp_help_phpbb.html
|
||||
* Since: 3.2.0-RC2
|
||||
* Purpose: Add content before send statistics tile
|
||||
|
||||
acp_logs_quick_select_forum_button_append
|
||||
===
|
||||
* Location: adm/style/acp_logs.html
|
||||
@@ -343,6 +367,13 @@ acp_posting_buttons_before
|
||||
* Since: 3.1.0-b4
|
||||
* Purpose: Add content before BBCode posting buttons in the ACP
|
||||
|
||||
acp_posting_buttons_custom_tags_before
|
||||
===
|
||||
* Locations:
|
||||
+ adm/style/acp_posting_buttons.html
|
||||
* Since: 3.1.10-RC1
|
||||
* Purpose: Add content before the custom BBCodes in the ACP
|
||||
|
||||
acp_profile_contact_before
|
||||
===
|
||||
* Locations:
|
||||
@@ -758,6 +789,20 @@ mcp_ban_unban_before
|
||||
* Since: 3.1.0-RC3
|
||||
* Purpose: Add additional fields to the unban form in MCP
|
||||
|
||||
mcp_forum_actions_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/mcp_forum.html
|
||||
* Since: 3.1.11-RC1
|
||||
* Purpose: Add some information after actions fieldset
|
||||
|
||||
mcp_forum_actions_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/mcp_forum.html
|
||||
* Since: 3.1.11-RC1
|
||||
* Purpose: Add some information before actions fieldset
|
||||
|
||||
mcp_forum_topic_title_before
|
||||
===
|
||||
* Locations:
|
||||
@@ -807,6 +852,13 @@ mcp_front_latest_unapproved_before
|
||||
* Since: 3.1.3-RC1
|
||||
* Purpose: Add content before latest unapproved posts list
|
||||
|
||||
mcp_move_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/mcp_move.html
|
||||
* Since: 3.1.10-RC1
|
||||
* Purpose: Add content before move topic/post form
|
||||
|
||||
mcp_post_additional_options
|
||||
===
|
||||
* Locations:
|
||||
@@ -828,6 +880,20 @@ mcp_topic_options_before
|
||||
* Since: 3.1.6-RC1
|
||||
* Purpose: Add some options (field, checkbox, ...) before the subject field when split a subject
|
||||
|
||||
mcp_topic_postrow_post_details_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/mcp_topic.html
|
||||
* Since: 3.1.10-RC1
|
||||
* Purpose: Add content after post details in topic moderation
|
||||
|
||||
mcp_topic_postrow_post_details_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/mcp_topic.html
|
||||
* Since: 3.1.10-RC1
|
||||
* Purpose: Add content before post details in topic moderation
|
||||
|
||||
mcp_topic_topic_title_after
|
||||
===
|
||||
* Locations:
|
||||
@@ -902,6 +968,13 @@ memberlist_body_username_prepend
|
||||
* Purpose: Add information before every username in the memberlist. Works in
|
||||
all display modes (leader, group and normal memberlist).
|
||||
|
||||
memberlist_email_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/memberlist_email.html
|
||||
* Since: 3.1.10-RC1
|
||||
* Purpose: Allow adding customizations before the memberlist_email form.
|
||||
|
||||
memberlist_search_fields_after
|
||||
===
|
||||
* Locations:
|
||||
@@ -1238,6 +1311,20 @@ overall_header_head_append
|
||||
* Since: 3.1.0-a1
|
||||
* Purpose: Add asset calls directly before the `</head>` tag
|
||||
|
||||
overall_header_headerbar_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/overall_header.html
|
||||
* Since: 3.1.10-RC1
|
||||
* Purpose: Add content at the end of the headerbar
|
||||
|
||||
overall_header_headerbar_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/overall_header.html
|
||||
* Since: 3.1.10-RC1
|
||||
* Purpose: Add content at the beginning of the headerbar
|
||||
|
||||
overall_header_navbar_before
|
||||
===
|
||||
* Locations:
|
||||
@@ -1280,6 +1367,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_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/overall_header.html
|
||||
* Since: 3.1.11-RC1
|
||||
* Purpose: Add content after the search box in the header
|
||||
|
||||
overall_header_searchbox_before
|
||||
===
|
||||
* Locations:
|
||||
@@ -1372,6 +1466,13 @@ posting_editor_subject_after
|
||||
* Since: 3.1.0-a2
|
||||
* Purpose: Add field (e.g. textbox) to the posting screen after the subject
|
||||
|
||||
posting_editor_subject_append
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/posting_editor.html
|
||||
* Since: 3.1.10-RC1
|
||||
* Purpose: Add field, text, etc. to the posting after the subject text box
|
||||
|
||||
posting_editor_subject_before
|
||||
===
|
||||
* Locations:
|
||||
@@ -1379,6 +1480,13 @@ posting_editor_subject_before
|
||||
* Since: 3.1.0-a2
|
||||
* Purpose: Add field (e.g. textbox) to the posting screen before the subject
|
||||
|
||||
posting_editor_subject_prepend
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/posting_editor.html
|
||||
* Since: 3.1.10-RC1
|
||||
* Purpose: Add field, text, etc. to the posting before the subject text box
|
||||
|
||||
posting_editor_submit_buttons
|
||||
===
|
||||
* Locations:
|
||||
@@ -1435,6 +1543,20 @@ posting_preview_poll_after
|
||||
* Since: 3.1.7-RC1
|
||||
* Purpose: Add content after the poll preview block
|
||||
|
||||
posting_topic_review_row_post_details_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/posting_topic_review.html
|
||||
* Since: 3.1.10-RC1
|
||||
* Purpose: Add content after post details in topic review
|
||||
|
||||
posting_topic_review_row_post_details_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/posting_topic_review.html
|
||||
* Since: 3.1.10-RC1
|
||||
* Purpose: Add content before post details in topic review
|
||||
|
||||
posting_topic_title_after
|
||||
===
|
||||
* Locations:
|
||||
@@ -1694,6 +1816,15 @@ topiclist_row_append
|
||||
* Changed: 3.1.6-RC1 Added event to mcp_forum.html
|
||||
* Purpose: Add content into topic rows (inside the elements containing topic titles)
|
||||
|
||||
topiclist_row_topic_title_after
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/search_results.html
|
||||
+ styles/prosilver/template/viewforum_body.html
|
||||
+ styles/prosilver/template/mcp_forum.html
|
||||
* Since: 3.1.10-RC1
|
||||
* Purpose: Add content into topic rows (after the elements containing the topic titles)
|
||||
|
||||
ucp_agreement_terms_after
|
||||
===
|
||||
* Locations:
|
||||
@@ -2034,6 +2165,13 @@ viewforum_body_topic_row_prepend
|
||||
* Since: 3.1.7-RC1
|
||||
* Purpose: Add content at the end of the topic list item.
|
||||
|
||||
viewforum_body_topicrow_row_before
|
||||
===
|
||||
* Locations:
|
||||
+ styles/prosilver/template/viewforum_body.html
|
||||
* Since: 3.1.10-RC1
|
||||
* Purpose: Add content before list of topics.
|
||||
|
||||
viewforum_buttons_bottom_before
|
||||
===
|
||||
* Locations:
|
||||
|
@@ -34,3 +34,5 @@ installer:
|
||||
server_name: localhost
|
||||
server_port: 80
|
||||
script_path: /
|
||||
|
||||
extensions: ['phpbb/viglink']
|
||||
|
@@ -1,7 +1,7 @@
|
||||
# Sample lighttpd configuration file for phpBB.
|
||||
# Global settings have been removed, copy them
|
||||
# from your system's lighttpd.conf.
|
||||
# Tested with lighttpd 1.4.26
|
||||
# Tested with lighttpd 1.4.35
|
||||
|
||||
# If you want to use the X-Sendfile feature,
|
||||
# uncomment the 'allow-x-send-file' for the fastcgi
|
||||
@@ -16,6 +16,7 @@
|
||||
server.modules += (
|
||||
"mod_access",
|
||||
"mod_fastcgi",
|
||||
"mod_rewrite",
|
||||
"mod_accesslog"
|
||||
)
|
||||
|
||||
@@ -49,7 +50,15 @@ $HTTP["host"] == "www.myforums.com" {
|
||||
$HTTP["url"] =~ "/\.htaccess|/\.htpasswd|/\.htgroups" {
|
||||
url.access-deny = ( "" )
|
||||
}
|
||||
|
||||
|
||||
# The following 3 lines will rewrite URLs passed through the front controller
|
||||
# to not require app.php in the actual URL. In other words, a controller is
|
||||
# by default accessed at /app.php/my/controller, but can also be accessed at
|
||||
# /my/controller
|
||||
url.rewrite-if-not-file = (
|
||||
"^/(.*)$" => "/app.php/$1"
|
||||
)
|
||||
|
||||
fastcgi.server = ( ".php" =>
|
||||
((
|
||||
"bin-path" => "/usr/bin/php-cgi",
|
||||
|
@@ -1,2 +1,3 @@
|
||||
updater:
|
||||
type: all
|
||||
extensions: ['phpbb/viglink']
|
||||
|
123
phpBB/docs/vagrant.md
Normal file
123
phpBB/docs/vagrant.md
Normal file
@@ -0,0 +1,123 @@
|
||||
## Using Vagrant with phpBB
|
||||
|
||||
phpBB includes support for Vagrant. This allows developers and contributors to run phpBB without the need to set up their own local web server with traditional WAMP/MAMP stacks. It also provides a consistent environment between developers for writing and debugging code changes more productively.
|
||||
|
||||
phpBB uses the [Laravel/Homestead](https://laravel.com/docs/5.1/homestead) Vagrant box. It runs a Linux server with Ubuntu 14.04, PHP 5.6, Nginx, SQLite3, MySQL, and a whole lot more (complete specs below).
|
||||
|
||||
## Get Started
|
||||
|
||||
* Download and Install [Vagrant](https://www.vagrantup.com/downloads.html)
|
||||
* Download and Install [VirtualBox](https://www.virtualbox.org/wiki/Downloads)
|
||||
* Run `vagrant up` from the root of your cloned fork of the phpBB Git repository
|
||||
|
||||
```sh
|
||||
$ vagrant up
|
||||
```
|
||||
|
||||
* Access phpBB at `http://192.168.10.10/`
|
||||
* Username: **admin**
|
||||
* Password: **adminadmin**
|
||||
|
||||
## Additional commands:
|
||||
* Access your Linux server from the command line:
|
||||
|
||||
```sh
|
||||
$ vagrant ssh
|
||||
```
|
||||
|
||||
* Pause your server:
|
||||
|
||||
```sh
|
||||
$ vagrant suspend
|
||||
```
|
||||
|
||||
* Shut down your server:
|
||||
|
||||
```sh
|
||||
$ vagrant halt
|
||||
```
|
||||
|
||||
* Delete and remove your server:
|
||||
|
||||
```sh
|
||||
$ vagrant destroy
|
||||
```
|
||||
|
||||
> Note: destroying the vagrant server will remove all traces of the VM from your computer, reclaiming any disk space used by it. However, it also means the next time you vagrant up, you will be creating a brand new VM with a fresh install of phpBB and a new database.
|
||||
|
||||
## Customising the phpBB configuration
|
||||
|
||||
By default, phpBB is pre-configured to install with a MySQL database. You can, however, switch to PostegreSQL or SQLite3 by editing the `phpbb-install-config.yml` file in the vagrant directory. The next time you run `vagrant up` (or `vagrant provision`) it will be installed under the new configuration.
|
||||
|
||||
If you prefer to access phpBB from the more friendly URL `http://phpbb.app` then you must update your computer's hosts file. This file is typically located at `/etc/hosts` for Mac/Linux or `C:\Windows\System32\drivers\etc\hosts` for Windows. Open this file and add the following line to it, at the very bottom, and save.
|
||||
|
||||
```
|
||||
192.168.10.10 phpbb.app
|
||||
```
|
||||
|
||||
## How it all works
|
||||
|
||||
When you vagrant up, the Laravel/Homestead box is transparently loaded as a Virtual Machine on your computer (this may take several minutes the very first time while it downloads the VM image to your computer). Your local phpBB repository clone is mirrored/shared with the VM, so you can work on the phpBB code on your computer, and see the changes immediately when you browse to phpBB at the URL provided by the VM.
|
||||
|
||||
This is very similar to traditional methods of working with a local WAMP/MAMP stack, except the webserver is now being provided by a VM of a Linux server. The advantages here are the exact same Linux server environment is being used by everybody who uses Vagrant with phpBB, so there will be consist behaviour unlike when everybody is developing on different versions of PHP, server configurations, etc.
|
||||
|
||||
The environment is also "sandboxed" from your system. This means you don't need to worry about adjusting your own computer's internal PHP settings, setting up databases, or doing damage to your system or to phpBB. Other than the phpBB codebase, which lives on your computer, all execution is taking place within the VM and you can at any time, halt or destroy the VM and start a brand new one.
|
||||
|
||||
There are some caveats, however. You can only run one vagrant VM for the phpBB repository. And of course, the database will be destroyed when you vagrant destroy. If the database is important, you should SSH into your vagrant VM and export/import the DB as needed using SSH commands.
|
||||
|
||||
For example, to export/import a MySQL database (using phpBB's `store` directory):
|
||||
|
||||
SSH into the VM
|
||||
|
||||
```sh
|
||||
$ vagrant ssh
|
||||
```
|
||||
|
||||
Export MySQL:
|
||||
|
||||
```sh
|
||||
$ mysqldump -uhomestead -psecret phpbb > /home/vagrant/phpbb/phpBB/store/phpbb.sql
|
||||
```
|
||||
|
||||
Import MySQL:
|
||||
|
||||
```sh
|
||||
$ mysql -uhomestead -psecret phpbb < /home/vagrant/phpbb/phpBB/store/phpbb.sql
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## About the Laravel/Homestead box
|
||||
|
||||
### Included Software
|
||||
|
||||
* Ubuntu 14.04
|
||||
* Git
|
||||
* PHP 5.6
|
||||
* HHVM
|
||||
* Nginx
|
||||
* MySQL
|
||||
* Sqlite3
|
||||
* Postgres
|
||||
* Composer
|
||||
* Node (With PM2, Bower, Grunt, and Gulp)
|
||||
* Redis
|
||||
* Memcached
|
||||
* Beanstalkd
|
||||
* Blackfire Profiler
|
||||
|
||||
### MySQL Access
|
||||
|
||||
- Hostname: 127.0.0.1
|
||||
- Username: homestead
|
||||
- Password: secret
|
||||
- Database: phpbb
|
||||
- Port: 3306
|
||||
|
||||
### PostgreSQL Access
|
||||
|
||||
- Hostname: 127.0.0.1
|
||||
- Username: homestead
|
||||
- Password: secret
|
||||
- Database: phpbb
|
||||
- Port: 5432
|
@@ -48,7 +48,7 @@ class acp_attachments
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $db, $user, $auth, $template, $cache, $phpbb_container, $phpbb_filesystem;
|
||||
global $db, $user, $auth, $template, $cache, $phpbb_container, $phpbb_filesystem, $phpbb_dispatcher;
|
||||
global $config, $phpbb_admin_path, $phpbb_root_path, $phpEx, $phpbb_log, $request;
|
||||
|
||||
$this->id = $id;
|
||||
@@ -170,6 +170,18 @@ class acp_attachments
|
||||
)
|
||||
);
|
||||
|
||||
/**
|
||||
* Event to add and/or modify acp_attachement configurations
|
||||
*
|
||||
* @event core.acp_attachments_config_edit_add
|
||||
* @var array display_vars Array of config values to display and process
|
||||
* @var string mode Mode of the config page we are displaying
|
||||
* @var boolean submit Do we display the form or process the submission
|
||||
* @since 3.1.11-RC1
|
||||
*/
|
||||
$vars = array('display_vars', 'mode', 'submit');
|
||||
extract($phpbb_dispatcher->trigger_event('core.acp_attachments_config_edit_add', compact($vars)));
|
||||
|
||||
$this->new_config = $config;
|
||||
$cfg_array = (isset($_REQUEST['config'])) ? $request->variable('config', array('' => '')) : $this->new_config;
|
||||
$error = array();
|
||||
|
@@ -452,7 +452,7 @@ class acp_board
|
||||
|
||||
'legend2' => 'SMTP_SETTINGS',
|
||||
'smtp_delivery' => array('lang' => 'USE_SMTP', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'smtp_host' => array('lang' => 'SMTP_SERVER', 'validate' => 'string', 'type' => 'text:25:50', 'explain' => false),
|
||||
'smtp_host' => array('lang' => 'SMTP_SERVER', 'validate' => 'string', 'type' => 'text:25:50', 'explain' => true),
|
||||
'smtp_port' => array('lang' => 'SMTP_PORT', 'validate' => 'int:0:99999', 'type' => 'number:0:99999', 'explain' => true),
|
||||
'smtp_auth_method' => array('lang' => 'SMTP_AUTH_METHOD', 'validate' => 'string', 'type' => 'select', 'method' => 'mail_auth_select', 'explain' => true),
|
||||
'smtp_username' => array('lang' => 'SMTP_USERNAME', 'validate' => 'string', 'type' => 'text:25:255', 'explain' => true),
|
||||
@@ -642,6 +642,9 @@ class acp_board
|
||||
$messenger->template('test');
|
||||
$messenger->set_addresses($user->data);
|
||||
$messenger->anti_abuse_headers($config, $user);
|
||||
$messenger->assign_vars(array(
|
||||
'USERNAME' => htmlspecialchars_decode($user->data['username']),
|
||||
));
|
||||
$messenger->send(NOTIFY_EMAIL);
|
||||
|
||||
trigger_error($user->lang('TEST_EMAIL_SENT') . adm_back_link($this->u_action));
|
||||
@@ -1041,7 +1044,7 @@ class acp_board
|
||||
$user->timezone = $old_tz;
|
||||
|
||||
return "<select name=\"dateoptions\" id=\"dateoptions\" onchange=\"if (this.value == 'custom') { document.getElementById('" . addslashes($key) . "').value = '" . addslashes($value) . "'; } else { document.getElementById('" . addslashes($key) . "').value = this.value; }\">$dateformat_options</select>
|
||||
<input type=\"text\" name=\"config[$key]\" id=\"$key\" value=\"$value\" maxlength=\"30\" />";
|
||||
<input type=\"text\" name=\"config[$key]\" id=\"$key\" value=\"$value\" maxlength=\"64\" />";
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -38,6 +38,9 @@ class acp_database
|
||||
|
||||
$action = $request->variable('action', '');
|
||||
|
||||
$form_key = 'acp_database';
|
||||
add_form_key($form_key);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'MODE' => $mode
|
||||
));
|
||||
@@ -61,6 +64,11 @@ class acp_database
|
||||
trigger_error($user->lang['TABLE_SELECT_ERROR'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
if (!check_form_key($form_key))
|
||||
{
|
||||
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
$store = $download = $structure = $schema_data = false;
|
||||
|
||||
if ($where == 'store_and_download' || $where == 'store')
|
||||
@@ -107,12 +115,10 @@ class acp_database
|
||||
// We might wanna empty out all that junk :D
|
||||
switch ($db->get_sql_layer())
|
||||
{
|
||||
case 'sqlite':
|
||||
case 'sqlite3':
|
||||
$extractor->flush('DELETE FROM ' . $table_name . ";\n");
|
||||
break;
|
||||
|
||||
case 'mssql':
|
||||
case 'mssql_odbc':
|
||||
case 'mssqlnative':
|
||||
$extractor->flush('TRUNCATE TABLE ' . $table_name . "GO\n");
|
||||
@@ -297,7 +303,6 @@ class acp_database
|
||||
case 'mysql':
|
||||
case 'mysql4':
|
||||
case 'mysqli':
|
||||
case 'sqlite':
|
||||
case 'sqlite3':
|
||||
while (($sql = $fgetd($fp, ";\n", $read, $seek, $eof)) !== false)
|
||||
{
|
||||
@@ -352,7 +357,6 @@ class acp_database
|
||||
}
|
||||
break;
|
||||
|
||||
case 'mssql':
|
||||
case 'mssql_odbc':
|
||||
case 'mssqlnative':
|
||||
while (($sql = $fgetd($fp, "GO\n", $read, $seek, $eof)) !== false)
|
||||
|
@@ -11,6 +11,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
use phpbb\exception\exception_interface;
|
||||
use phpbb\exception\version_check_exception;
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
@@ -34,7 +37,7 @@ class acp_extensions
|
||||
function main()
|
||||
{
|
||||
// Start the page
|
||||
global $config, $user, $template, $request, $phpbb_extension_manager, $db, $phpbb_root_path, $phpbb_log, $cache;
|
||||
global $config, $user, $template, $request, $phpbb_extension_manager, $db, $phpbb_root_path, $phpbb_log, $cache, $phpbb_dispatcher;
|
||||
|
||||
$this->db = $db;
|
||||
$this->config = $config;
|
||||
@@ -43,6 +46,7 @@ class acp_extensions
|
||||
$this->cache = $cache;
|
||||
$this->request = $request;
|
||||
$this->log = $phpbb_log;
|
||||
$this->phpbb_dispatcher = $phpbb_dispatcher;
|
||||
|
||||
$user->add_lang(array('install', 'acp/extensions', 'migrator'));
|
||||
|
||||
@@ -55,6 +59,21 @@ class acp_extensions
|
||||
$safe_time_limit = (ini_get('max_execution_time') / 2);
|
||||
$start_time = time();
|
||||
|
||||
/**
|
||||
* Event to run a specific action on extension
|
||||
*
|
||||
* @event core.acp_extensions_run_action
|
||||
* @var string action Action to run
|
||||
* @var string u_action Url we are at
|
||||
* @var string ext_name Extension name from request
|
||||
* @var int safe_time_limit Safe limit of execution time
|
||||
* @var int start_time Start time
|
||||
* @since 3.1.11-RC1
|
||||
*/
|
||||
$u_action = $this->u_action;
|
||||
$vars = array('action', 'u_action', 'ext_name', 'safe_time_limit', 'start_time');
|
||||
extract($this->phpbb_dispatcher->trigger_event('core.acp_extensions_run_action', compact($vars)));
|
||||
|
||||
// Cancel action
|
||||
if ($request->is_set_post('cancel'))
|
||||
{
|
||||
@@ -70,13 +89,13 @@ class acp_extensions
|
||||
// If they've specified an extension, let's load the metadata manager and validate it.
|
||||
if ($ext_name)
|
||||
{
|
||||
$md_manager = new \phpbb\extension\metadata_manager($ext_name, $config, $phpbb_extension_manager, $template, $phpbb_root_path);
|
||||
$md_manager = new \phpbb\extension\metadata_manager($ext_name, $config, $phpbb_extension_manager, $phpbb_root_path);
|
||||
|
||||
try
|
||||
{
|
||||
$md_manager->get_metadata('all');
|
||||
}
|
||||
catch (\phpbb\extension\exception $e)
|
||||
catch (exception_interface $e)
|
||||
{
|
||||
$message = call_user_func_array(array($this->user, 'lang'), array_merge(array($e->getMessage()), $e->get_parameters()));
|
||||
trigger_error($message, E_USER_WARNING);
|
||||
@@ -287,11 +306,11 @@ class acp_extensions
|
||||
|
||||
case 'details':
|
||||
// Output it to the template
|
||||
$md_manager->output_template_data();
|
||||
$md_manager->output_template_data($template);
|
||||
|
||||
try
|
||||
{
|
||||
$updates_available = $this->version_check($md_manager, $request->variable('versioncheck_force', false));
|
||||
$updates_available = $phpbb_extension_manager->version_check($md_manager, $request->variable('versioncheck_force', false), $this->config['extension_force_unstable'] ? 'unstable' : null);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_UP_TO_DATE' => empty($updates_available),
|
||||
@@ -304,11 +323,13 @@ class acp_extensions
|
||||
$template->assign_block_vars('updates_available', $version_data);
|
||||
}
|
||||
}
|
||||
catch (\RuntimeException $e)
|
||||
catch (exception_interface $e)
|
||||
{
|
||||
$message = call_user_func_array(array($this->user, 'lang'), array_merge(array($e->getMessage()), $e->get_parameters()));
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_VERSIONCHECK_STATUS' => $e->getCode(),
|
||||
'VERSIONCHECK_FAIL_REASON' => ($e->getMessage() !== $user->lang('VERSIONCHECK_FAIL')) ? $e->getMessage() : '',
|
||||
'VERSIONCHECK_FAIL_REASON' => ($e->getMessage() !== 'VERSIONCHECK_FAIL') ? $message : '',
|
||||
));
|
||||
}
|
||||
|
||||
@@ -334,7 +355,7 @@ class acp_extensions
|
||||
|
||||
foreach ($phpbb_extension_manager->all_enabled() as $name => $location)
|
||||
{
|
||||
$md_manager = $phpbb_extension_manager->create_extension_metadata_manager($name, $this->template);
|
||||
$md_manager = $phpbb_extension_manager->create_extension_metadata_manager($name);
|
||||
|
||||
try
|
||||
{
|
||||
@@ -344,14 +365,28 @@ class acp_extensions
|
||||
'META_VERSION' => $meta['version'],
|
||||
);
|
||||
|
||||
$force_update = $this->request->variable('versioncheck_force', false);
|
||||
$updates = $this->version_check($md_manager, $force_update, !$force_update);
|
||||
if (isset($meta['extra']['version-check']))
|
||||
{
|
||||
try
|
||||
{
|
||||
$force_update = $this->request->variable('versioncheck_force', false);
|
||||
$updates = $phpbb_extension_manager->version_check($md_manager, $force_update, !$force_update);
|
||||
|
||||
$enabled_extension_meta_data[$name]['S_UP_TO_DATE'] = empty($updates);
|
||||
$enabled_extension_meta_data[$name]['S_VERSIONCHECK'] = true;
|
||||
$enabled_extension_meta_data[$name]['U_VERSIONCHECK_FORCE'] = $this->u_action . '&action=details&versioncheck_force=1&ext_name=' . urlencode($md_manager->get_metadata('name'));
|
||||
$enabled_extension_meta_data[$name]['S_UP_TO_DATE'] = empty($updates);
|
||||
$enabled_extension_meta_data[$name]['S_VERSIONCHECK'] = true;
|
||||
$enabled_extension_meta_data[$name]['U_VERSIONCHECK_FORCE'] = $this->u_action . '&action=details&versioncheck_force=1&ext_name=' . urlencode($md_manager->get_metadata('name'));
|
||||
}
|
||||
catch (exception_interface $e)
|
||||
{
|
||||
// Ignore exceptions due to the version check
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$enabled_extension_meta_data[$name]['S_VERSIONCHECK'] = false;
|
||||
}
|
||||
}
|
||||
catch (\phpbb\extension\exception $e)
|
||||
catch (exception_interface $e)
|
||||
{
|
||||
$message = call_user_func_array(array($this->user, 'lang'), array_merge(array($e->getMessage()), $e->get_parameters()));
|
||||
$this->template->assign_block_vars('disabled', array(
|
||||
@@ -392,7 +427,7 @@ class acp_extensions
|
||||
|
||||
foreach ($phpbb_extension_manager->all_disabled() as $name => $location)
|
||||
{
|
||||
$md_manager = $phpbb_extension_manager->create_extension_metadata_manager($name, $this->template);
|
||||
$md_manager = $phpbb_extension_manager->create_extension_metadata_manager($name);
|
||||
|
||||
try
|
||||
{
|
||||
@@ -402,14 +437,25 @@ class acp_extensions
|
||||
'META_VERSION' => $meta['version'],
|
||||
);
|
||||
|
||||
$force_update = $this->request->variable('versioncheck_force', false);
|
||||
$updates = $this->version_check($md_manager, $force_update, !$force_update);
|
||||
if (isset($meta['extra']['version-check']))
|
||||
{
|
||||
$force_update = $this->request->variable('versioncheck_force', false);
|
||||
$updates = $phpbb_extension_manager->version_check($md_manager, $force_update, !$force_update);
|
||||
|
||||
$disabled_extension_meta_data[$name]['S_UP_TO_DATE'] = empty($updates);
|
||||
$disabled_extension_meta_data[$name]['S_VERSIONCHECK'] = true;
|
||||
$disabled_extension_meta_data[$name]['U_VERSIONCHECK_FORCE'] = $this->u_action . '&action=details&versioncheck_force=1&ext_name=' . urlencode($md_manager->get_metadata('name'));
|
||||
$disabled_extension_meta_data[$name]['S_UP_TO_DATE'] = empty($updates);
|
||||
$disabled_extension_meta_data[$name]['S_VERSIONCHECK'] = true;
|
||||
$disabled_extension_meta_data[$name]['U_VERSIONCHECK_FORCE'] = $this->u_action . '&action=details&versioncheck_force=1&ext_name=' . urlencode($md_manager->get_metadata('name'));
|
||||
}
|
||||
else
|
||||
{
|
||||
$disabled_extension_meta_data[$name]['S_VERSIONCHECK'] = false;
|
||||
}
|
||||
}
|
||||
catch (\phpbb\extension\exception $e)
|
||||
catch (version_check_exception $e)
|
||||
{
|
||||
$disabled_extension_meta_data[$name]['S_VERSIONCHECK'] = false;
|
||||
}
|
||||
catch (exception_interface $e)
|
||||
{
|
||||
$message = call_user_func_array(array($this->user, 'lang'), array_merge(array($e->getMessage()), $e->get_parameters()));
|
||||
$this->template->assign_block_vars('disabled', array(
|
||||
@@ -419,7 +465,7 @@ class acp_extensions
|
||||
}
|
||||
catch (\RuntimeException $e)
|
||||
{
|
||||
$disabeld_extension_meta_data[$name]['S_VERSIONCHECK'] = false;
|
||||
$disabled_extension_meta_data[$name]['S_VERSIONCHECK'] = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -453,7 +499,7 @@ class acp_extensions
|
||||
|
||||
foreach ($uninstalled as $name => $location)
|
||||
{
|
||||
$md_manager = $phpbb_extension_manager->create_extension_metadata_manager($name, $this->template);
|
||||
$md_manager = $phpbb_extension_manager->create_extension_metadata_manager($name);
|
||||
|
||||
try
|
||||
{
|
||||
@@ -463,14 +509,25 @@ class acp_extensions
|
||||
'META_VERSION' => $meta['version'],
|
||||
);
|
||||
|
||||
$force_update = $this->request->variable('versioncheck_force', false);
|
||||
$updates = $this->version_check($md_manager, $force_update, !$force_update);
|
||||
if (isset($meta['extra']['version-check']))
|
||||
{
|
||||
$force_update = $this->request->variable('versioncheck_force', false);
|
||||
$updates = $phpbb_extension_manager->version_check($md_manager, $force_update, !$force_update);
|
||||
|
||||
$available_extension_meta_data[$name]['S_UP_TO_DATE'] = empty($updates);
|
||||
$available_extension_meta_data[$name]['S_VERSIONCHECK'] = true;
|
||||
$available_extension_meta_data[$name]['U_VERSIONCHECK_FORCE'] = $this->u_action . '&action=details&versioncheck_force=1&ext_name=' . urlencode($md_manager->get_metadata('name'));
|
||||
$available_extension_meta_data[$name]['S_UP_TO_DATE'] = empty($updates);
|
||||
$available_extension_meta_data[$name]['S_VERSIONCHECK'] = true;
|
||||
$available_extension_meta_data[$name]['U_VERSIONCHECK_FORCE'] = $this->u_action . '&action=details&versioncheck_force=1&ext_name=' . urlencode($md_manager->get_metadata('name'));
|
||||
}
|
||||
else
|
||||
{
|
||||
$available_extension_meta_data[$name]['S_VERSIONCHECK'] = false;
|
||||
}
|
||||
}
|
||||
catch (\phpbb\extension\exception $e)
|
||||
catch (version_check_exception $e)
|
||||
{
|
||||
$available_extension_meta_data[$name]['S_VERSIONCHECK'] = false;
|
||||
}
|
||||
catch (exception_interface $e)
|
||||
{
|
||||
$message = call_user_func_array(array($this->user, 'lang'), array_merge(array($e->getMessage()), $e->get_parameters()));
|
||||
$this->template->assign_block_vars('disabled', array(
|
||||
@@ -478,10 +535,6 @@ class acp_extensions
|
||||
'S_VERSIONCHECK' => false,
|
||||
));
|
||||
}
|
||||
catch (\RuntimeException $e)
|
||||
{
|
||||
$available_extension_meta_data[$name]['S_VERSIONCHECK'] = false;
|
||||
}
|
||||
}
|
||||
|
||||
uasort($available_extension_meta_data, array($this, 'sort_extension_meta_data_table'));
|
||||
@@ -517,34 +570,6 @@ class acp_extensions
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the version and return the available updates.
|
||||
*
|
||||
* @param \phpbb\extension\metadata_manager $md_manager The metadata manager for the version to check.
|
||||
* @param bool $force_update Ignores cached data. Defaults to false.
|
||||
* @param bool $force_cache Force the use of the cache. Override $force_update.
|
||||
* @return string
|
||||
* @throws RuntimeException
|
||||
*/
|
||||
protected function version_check(\phpbb\extension\metadata_manager $md_manager, $force_update = false, $force_cache = false)
|
||||
{
|
||||
$meta = $md_manager->get_metadata('all');
|
||||
|
||||
if (!isset($meta['extra']['version-check']))
|
||||
{
|
||||
throw new \RuntimeException($this->user->lang('NO_VERSIONCHECK'), 1);
|
||||
}
|
||||
|
||||
$version_check = $meta['extra']['version-check'];
|
||||
|
||||
$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'], isset($version_check['ssl']) ? $version_check['ssl'] : false);
|
||||
$version_helper->force_stability($this->config['extension_force_unstable'] ? 'unstable' : null);
|
||||
|
||||
return $updates = $version_helper->get_suggested_updates($force_update, $force_cache);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sort helper for the table containing the metadata about the extensions.
|
||||
*/
|
||||
|
@@ -843,9 +843,26 @@ class acp_forums
|
||||
ORDER BY left_id";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
if ($row = $db->sql_fetchrow($result))
|
||||
$rowset = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
do
|
||||
$rowset[(int) $row['forum_id']] = $row;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
/**
|
||||
* Modify the forum list data
|
||||
*
|
||||
* @event core.acp_manage_forums_modify_forum_list
|
||||
* @var array rowset Array with the forums list data
|
||||
* @since 3.1.10-RC1
|
||||
*/
|
||||
$vars = array('rowset');
|
||||
extract($phpbb_dispatcher->trigger_event('core.acp_manage_forums_modify_forum_list', compact($vars)));
|
||||
|
||||
if (!empty($rowset))
|
||||
{
|
||||
foreach ($rowset as $row)
|
||||
{
|
||||
$forum_type = $row['forum_type'];
|
||||
|
||||
@@ -889,7 +906,6 @@ class acp_forums
|
||||
'U_SYNC' => $url . '&action=sync')
|
||||
);
|
||||
}
|
||||
while ($row = $db->sql_fetchrow($result));
|
||||
}
|
||||
else if ($this->parent_id)
|
||||
{
|
||||
@@ -905,7 +921,7 @@ class acp_forums
|
||||
'U_SYNC' => $url . '&action=sync')
|
||||
);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
unset($rowset);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'ERROR_MSG' => (sizeof($errors)) ? implode('<br />', $errors) : '',
|
||||
|
@@ -223,6 +223,7 @@ class acp_groups
|
||||
}
|
||||
else if ($action === 'delete' && $group_row['group_type'] == GROUP_SPECIAL)
|
||||
{
|
||||
send_status_line(403, 'Forbidden');
|
||||
trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
@@ -235,6 +236,7 @@ class acp_groups
|
||||
case 'delete':
|
||||
if (!$auth->acl_get('a_groupdel'))
|
||||
{
|
||||
send_status_line(403, 'Forbidden');
|
||||
trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
@@ -313,6 +315,7 @@ class acp_groups
|
||||
|
||||
if ($action == 'add' && !$auth->acl_get('a_groupadd'))
|
||||
{
|
||||
send_status_line(403, 'Forbidden');
|
||||
trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
|
143
phpBB/includes/acp/acp_help_phpbb.php
Normal file
143
phpBB/includes/acp/acp_help_phpbb.php
Normal file
@@ -0,0 +1,143 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* This file is part of the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*
|
||||
* For full copyright and license information, please see
|
||||
* the docs/CREDITS.txt file.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
class acp_help_phpbb
|
||||
{
|
||||
var $u_action;
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $config, $request, $template, $user, $phpbb_dispatcher, $phpbb_admin_path, $phpbb_root_path, $phpEx;
|
||||
|
||||
if (!class_exists('phpbb_questionnaire_data_collector'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/questionnaire/questionnaire.' . $phpEx);
|
||||
}
|
||||
|
||||
$collect_url = "https://www.phpbb.com/stats/receive_stats.php";
|
||||
|
||||
$this->tpl_name = 'acp_help_phpbb';
|
||||
$this->page_title = 'ACP_HELP_PHPBB';
|
||||
|
||||
$submit = ($request->is_set_post('submit')) ? true : false;
|
||||
|
||||
$form_key = 'acp_help_phpbb';
|
||||
add_form_key($form_key);
|
||||
$error = array();
|
||||
|
||||
if ($submit && !check_form_key($form_key))
|
||||
{
|
||||
$error[] = $user->lang['FORM_INVALID'];
|
||||
}
|
||||
// Do not write values if there is an error
|
||||
if (sizeof($error))
|
||||
{
|
||||
$submit = false;
|
||||
}
|
||||
|
||||
// generate a unique id if necessary
|
||||
if (!isset($config['questionnaire_unique_id']))
|
||||
{
|
||||
$install_id = unique_id();
|
||||
$config->set('questionnaire_unique_id', $install_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
$install_id = $config['questionnaire_unique_id'];
|
||||
}
|
||||
|
||||
$collector = new phpbb_questionnaire_data_collector($install_id);
|
||||
|
||||
// Add data provider
|
||||
$collector->add_data_provider(new phpbb_questionnaire_php_data_provider());
|
||||
$collector->add_data_provider(new phpbb_questionnaire_system_data_provider());
|
||||
$collector->add_data_provider(new phpbb_questionnaire_phpbb_data_provider($config));
|
||||
|
||||
/**
|
||||
* Event to modify ACP help phpBB page and/or listen to submit
|
||||
*
|
||||
* @event core.acp_help_phpbb_submit_before
|
||||
* @var boolean submit Do we display the form or process the submission
|
||||
* @since 3.2.0-RC2
|
||||
*/
|
||||
$vars = array('submit');
|
||||
extract($phpbb_dispatcher->trigger_event('core.acp_help_phpbb_submit_before', compact($vars)));
|
||||
|
||||
if ($submit)
|
||||
{
|
||||
$config->set('help_send_statistics', $request->variable('help_send_statistics', false));
|
||||
$response = $request->variable('send_statistics_response', '');
|
||||
|
||||
$config->set('help_send_statistics_time', time());
|
||||
|
||||
if (!empty($response))
|
||||
{
|
||||
if ((strpos($response, 'Thank you') !== false || strpos($response, 'Flood protection') !== false))
|
||||
{
|
||||
trigger_error($user->lang('THANKS_SEND_STATISTICS') . adm_back_link($this->u_action));
|
||||
}
|
||||
else
|
||||
{
|
||||
trigger_error($user->lang('FAIL_SEND_STATISTICS') . adm_back_link($this->u_action));
|
||||
}
|
||||
}
|
||||
|
||||
trigger_error($user->lang('CONFIG_UPDATED') . adm_back_link($this->u_action));
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'U_COLLECT_STATS' => $collect_url,
|
||||
'S_COLLECT_STATS' => (!empty($config['help_send_statistics'])) ? true : false,
|
||||
'RAW_DATA' => $collector->get_data_for_form(),
|
||||
'U_ACP_MAIN' => append_sid("{$phpbb_admin_path}index.$phpEx"),
|
||||
'U_ACTION' => $this->u_action,
|
||||
// Pass earliest time we should try to send stats again
|
||||
'COLLECT_STATS_TIME' => intval($config['help_send_statistics_time']) + 86400,
|
||||
));
|
||||
|
||||
$raw = $collector->get_data_raw();
|
||||
|
||||
foreach ($raw as $provider => $data)
|
||||
{
|
||||
if ($provider == 'install_id')
|
||||
{
|
||||
$data = array($provider => $data);
|
||||
}
|
||||
|
||||
$template->assign_block_vars('providers', array(
|
||||
'NAME' => htmlspecialchars($provider),
|
||||
));
|
||||
|
||||
foreach ($data as $key => $value)
|
||||
{
|
||||
if (is_array($value))
|
||||
{
|
||||
$value = utf8_wordwrap(serialize($value), 75, "\n", true);
|
||||
}
|
||||
|
||||
$template->assign_block_vars('providers.values', array(
|
||||
'KEY' => utf8_htmlspecialchars($key),
|
||||
'VALUE' => utf8_htmlspecialchars($value),
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -40,6 +40,10 @@ class acp_icons
|
||||
$action = (isset($_POST['edit'])) ? 'edit' : $action;
|
||||
$action = (isset($_POST['import'])) ? 'import' : $action;
|
||||
$icon_id = $request->variable('id', 0);
|
||||
$submit = $request->is_set_post('submit', false);
|
||||
|
||||
$form_key = 'acp_icons';
|
||||
add_form_key($form_key);
|
||||
|
||||
$mode = ($mode == 'smilies') ? 'smilies' : 'icons';
|
||||
|
||||
@@ -325,6 +329,11 @@ class acp_icons
|
||||
case 'create':
|
||||
case 'modify':
|
||||
|
||||
if (!check_form_key($form_key))
|
||||
{
|
||||
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
// Get items to create/modify
|
||||
$images = (isset($_POST['image'])) ? array_keys($request->variable('image', array('' => 0))) : array();
|
||||
|
||||
@@ -522,6 +531,11 @@ class acp_icons
|
||||
{
|
||||
$order = 0;
|
||||
|
||||
if (!check_form_key($form_key))
|
||||
{
|
||||
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
if (!($pak_ary = @file($phpbb_root_path . $img_path . '/' . $pak)))
|
||||
{
|
||||
trigger_error($user->lang['PAK_FILE_NOT_READABLE'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
@@ -549,7 +563,6 @@ class acp_icons
|
||||
{
|
||||
switch ($db->get_sql_layer())
|
||||
{
|
||||
case 'sqlite':
|
||||
case 'sqlite3':
|
||||
$db->sql_query('DELETE FROM ' . $table);
|
||||
break;
|
||||
@@ -708,7 +721,7 @@ class acp_icons
|
||||
|
||||
$template->assign_vars(array(
|
||||
'MESSAGE_TITLE' => $user->lang['EXPORT_' . $lang],
|
||||
'MESSAGE_TEXT' => sprintf($user->lang['EXPORT_' . $lang . '_EXPLAIN'], '<a href="' . $this->u_action . '&action=send">', '</a>'),
|
||||
'MESSAGE_TEXT' => sprintf($user->lang['EXPORT_' . $lang . '_EXPLAIN'], '<a href="' . $this->u_action . '&action=send&hash=' . generate_link_hash('acp_icons') . '">', '</a>'),
|
||||
|
||||
'S_USER_NOTICE' => true,
|
||||
)
|
||||
@@ -720,6 +733,11 @@ class acp_icons
|
||||
|
||||
case 'send':
|
||||
|
||||
if (!check_link_hash($request->variable('hash', ''), 'acp_icons'))
|
||||
{
|
||||
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
$sql = "SELECT *
|
||||
FROM $table
|
||||
ORDER BY {$fields}_order";
|
||||
@@ -822,6 +840,11 @@ class acp_icons
|
||||
case 'move_up':
|
||||
case 'move_down':
|
||||
|
||||
if (!check_link_hash($request->variable('hash', ''), 'acp_icons'))
|
||||
{
|
||||
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
// Get current order id...
|
||||
$sql = "SELECT {$fields}_order as current_order
|
||||
FROM $table
|
||||
@@ -941,8 +964,8 @@ class acp_icons
|
||||
'EMOTION' => (isset($row['emotion'])) ? $row['emotion'] : '',
|
||||
'U_EDIT' => $this->u_action . '&action=edit&id=' . $row[$fields . '_id'],
|
||||
'U_DELETE' => $this->u_action . '&action=delete&id=' . $row[$fields . '_id'],
|
||||
'U_MOVE_UP' => $this->u_action . '&action=move_up&id=' . $row[$fields . '_id'] . '&start=' . $pagination_start,
|
||||
'U_MOVE_DOWN' => $this->u_action . '&action=move_down&id=' . $row[$fields . '_id'] . '&start=' . $pagination_start,
|
||||
'U_MOVE_UP' => $this->u_action . '&action=move_up&id=' . $row[$fields . '_id'] . '&start=' . $pagination_start . '&hash=' . generate_link_hash('acp_icons'),
|
||||
'U_MOVE_DOWN' => $this->u_action . '&action=move_down&id=' . $row[$fields . '_id'] . '&start=' . $pagination_start . '&hash=' . generate_link_hash('acp_icons'),
|
||||
));
|
||||
|
||||
if (!$spacer && !$row['display_on_posting'])
|
||||
|
@@ -164,6 +164,7 @@ class acp_inactive
|
||||
{
|
||||
if (!$auth->acl_get('a_userdel'))
|
||||
{
|
||||
send_status_line(403, 'Forbidden');
|
||||
trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
|
@@ -244,6 +244,11 @@ class acp_language
|
||||
break;
|
||||
|
||||
case 'install':
|
||||
if (!check_link_hash($request->variable('hash', ''), 'acp_language'))
|
||||
{
|
||||
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
$lang_iso = $request->variable('iso', '');
|
||||
$lang_iso = basename($lang_iso);
|
||||
|
||||
@@ -405,7 +410,7 @@ class acp_language
|
||||
'ISO' => htmlspecialchars($lang_ary['iso']),
|
||||
'LOCAL_NAME' => htmlspecialchars($lang_ary['local_name'], ENT_COMPAT, 'UTF-8'),
|
||||
'NAME' => htmlspecialchars($lang_ary['name'], ENT_COMPAT, 'UTF-8'),
|
||||
'U_INSTALL' => $this->u_action . '&action=install&iso=' . urlencode($lang_ary['iso']))
|
||||
'U_INSTALL' => $this->u_action . '&action=install&iso=' . urlencode($lang_ary['iso']) . '&hash=' . generate_link_hash('acp_language'))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@@ -118,6 +118,7 @@ class acp_main
|
||||
case 'online':
|
||||
if (!$auth->acl_get('a_board'))
|
||||
{
|
||||
send_status_line(403, 'Forbidden');
|
||||
trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
@@ -134,6 +135,7 @@ class acp_main
|
||||
case 'stats':
|
||||
if (!$auth->acl_get('a_board'))
|
||||
{
|
||||
send_status_line(403, 'Forbidden');
|
||||
trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
@@ -189,6 +191,7 @@ class acp_main
|
||||
case 'user':
|
||||
if (!$auth->acl_get('a_board'))
|
||||
{
|
||||
send_status_line(403, 'Forbidden');
|
||||
trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
@@ -256,6 +259,7 @@ class acp_main
|
||||
case 'date':
|
||||
if (!$auth->acl_get('a_board'))
|
||||
{
|
||||
send_status_line(403, 'Forbidden');
|
||||
trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
@@ -271,7 +275,6 @@ class acp_main
|
||||
case 'db_track':
|
||||
switch ($db->get_sql_layer())
|
||||
{
|
||||
case 'sqlite':
|
||||
case 'sqlite3':
|
||||
$db->sql_query('DELETE FROM ' . TOPICS_POSTED_TABLE);
|
||||
break;
|
||||
@@ -372,6 +375,7 @@ class acp_main
|
||||
case 'purge_sessions':
|
||||
if ((int) $user->data['user_type'] !== USER_FOUNDER)
|
||||
{
|
||||
send_status_line(403, 'Forbidden');
|
||||
trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
@@ -381,7 +385,6 @@ class acp_main
|
||||
{
|
||||
switch ($db->get_sql_layer())
|
||||
{
|
||||
case 'sqlite':
|
||||
case 'sqlite3':
|
||||
$db->sql_query("DELETE FROM $table");
|
||||
break;
|
||||
@@ -447,9 +450,10 @@ class acp_main
|
||||
}
|
||||
catch (\RuntimeException $e)
|
||||
{
|
||||
$message = call_user_func_array(array($user, 'lang'), array_merge(array($e->getMessage()), $e->get_parameters()));
|
||||
$template->assign_vars(array(
|
||||
'S_VERSIONCHECK_FAIL' => true,
|
||||
'VERSIONCHECK_FAIL_REASON' => ($e->getMessage() !== $user->lang('VERSIONCHECK_FAIL')) ? $e->getMessage() : '',
|
||||
'VERSIONCHECK_FAIL_REASON' => ($e->getMessage() !== 'VERSIONCHECK_FAIL') ? $message : '',
|
||||
));
|
||||
}
|
||||
}
|
||||
@@ -459,6 +463,12 @@ class acp_main
|
||||
$template->assign_var('S_VERSION_UP_TO_DATE', true);
|
||||
}
|
||||
|
||||
// Incomplete update?
|
||||
if (phpbb_version_compare($config['version'], PHPBB_VERSION, '<'))
|
||||
{
|
||||
$template->assign_var('S_UPDATE_INCOMPLETE', true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Notice admin
|
||||
*
|
||||
|
@@ -50,6 +50,9 @@ class acp_modules
|
||||
$user->add_lang('acp/modules');
|
||||
$this->tpl_name = 'acp_modules';
|
||||
|
||||
$form_key = 'acp_modules';
|
||||
add_form_key($form_key);
|
||||
|
||||
// module class
|
||||
$this->module_class = $mode;
|
||||
|
||||
@@ -130,6 +133,11 @@ class acp_modules
|
||||
trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);
|
||||
}
|
||||
|
||||
if (!check_link_hash($request->variable('hash', ''), 'acp_modules'))
|
||||
{
|
||||
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);
|
||||
}
|
||||
|
||||
$sql = 'SELECT *
|
||||
FROM ' . MODULES_TABLE . "
|
||||
WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
|
||||
@@ -161,6 +169,11 @@ class acp_modules
|
||||
trigger_error($user->lang['NO_MODULE_ID'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);
|
||||
}
|
||||
|
||||
if (!check_link_hash($request->variable('hash', ''), 'acp_modules'))
|
||||
{
|
||||
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);
|
||||
}
|
||||
|
||||
$sql = 'SELECT *
|
||||
FROM ' . MODULES_TABLE . "
|
||||
WHERE module_class = '" . $db->sql_escape($this->module_class) . "'
|
||||
@@ -305,6 +318,11 @@ class acp_modules
|
||||
|
||||
if ($submit)
|
||||
{
|
||||
if (!check_form_key($form_key))
|
||||
{
|
||||
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);
|
||||
}
|
||||
|
||||
if (!$module_data['module_langname'])
|
||||
{
|
||||
trigger_error($user->lang['NO_MODULE_LANGNAME'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);
|
||||
@@ -506,12 +524,12 @@ class acp_modules
|
||||
'S_ACP_MODULE_MANAGEMENT' => ($this->module_class == 'acp' && ($row['module_basename'] == 'modules' || $row['module_langname'] == 'ACP_MODULE_MANAGEMENT')) ? true : false,
|
||||
|
||||
'U_MODULE' => $this->u_action . '&parent_id=' . $row['module_id'],
|
||||
'U_MOVE_UP' => $url . '&action=move_up',
|
||||
'U_MOVE_DOWN' => $url . '&action=move_down',
|
||||
'U_MOVE_UP' => $url . '&action=move_up&hash=' . generate_link_hash('acp_modules'),
|
||||
'U_MOVE_DOWN' => $url . '&action=move_down&hash=' . generate_link_hash('acp_modules'),
|
||||
'U_EDIT' => $url . '&action=edit',
|
||||
'U_DELETE' => $url . '&action=delete',
|
||||
'U_ENABLE' => $url . '&action=enable',
|
||||
'U_DISABLE' => $url . '&action=disable')
|
||||
'U_ENABLE' => $url . '&action=enable&hash=' . generate_link_hash('acp_modules'),
|
||||
'U_DISABLE' => $url . '&action=disable&hash=' . generate_link_hash('acp_modules'))
|
||||
);
|
||||
}
|
||||
while ($row = $db->sql_fetchrow($result));
|
||||
@@ -538,8 +556,8 @@ class acp_modules
|
||||
|
||||
'U_EDIT' => $url . '&action=edit',
|
||||
'U_DELETE' => $url . '&action=delete',
|
||||
'U_ENABLE' => $url . '&action=enable',
|
||||
'U_DISABLE' => $url . '&action=disable')
|
||||
'U_ENABLE' => $url . '&action=enable&hash=' . generate_link_hash('acp_modules'),
|
||||
'U_DISABLE' => $url . '&action=disable&hash=' . generate_link_hash('acp_modules'))
|
||||
);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
@@ -367,6 +367,11 @@ class acp_permission_roles
|
||||
case 'move_up':
|
||||
case 'move_down':
|
||||
|
||||
if (!check_link_hash($request->variable('hash', ''), 'acp_permission_roles'))
|
||||
{
|
||||
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
$sql = 'SELECT role_order
|
||||
FROM ' . ACL_ROLES_TABLE . "
|
||||
WHERE role_id = $role_id";
|
||||
@@ -441,8 +446,8 @@ class acp_permission_roles
|
||||
|
||||
'U_EDIT' => $this->u_action . '&action=edit&role_id=' . $row['role_id'],
|
||||
'U_REMOVE' => $this->u_action . '&action=remove&role_id=' . $row['role_id'],
|
||||
'U_MOVE_UP' => $this->u_action . '&action=move_up&role_id=' . $row['role_id'],
|
||||
'U_MOVE_DOWN' => $this->u_action . '&action=move_down&role_id=' . $row['role_id'],
|
||||
'U_MOVE_UP' => $this->u_action . '&action=move_up&role_id=' . $row['role_id'] . '&hash=' . generate_link_hash('acp_permission_roles'),
|
||||
'U_MOVE_DOWN' => $this->u_action . '&action=move_down&role_id=' . $row['role_id'] . '&hash=' . generate_link_hash('acp_permission_roles'),
|
||||
'U_DISPLAY_ITEMS' => ($row['role_id'] == $display_item) ? '' : $this->u_action . '&display_item=' . $row['role_id'] . '#assigned_to')
|
||||
);
|
||||
|
||||
|
@@ -315,6 +315,7 @@ class acp_permissions
|
||||
case 'apply_permissions':
|
||||
if (!isset($_POST['setting']))
|
||||
{
|
||||
send_status_line(403, 'Forbidden');
|
||||
trigger_error($user->lang['NO_AUTH_SETTING_FOUND'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
if (!check_form_key($form_name))
|
||||
@@ -328,6 +329,7 @@ class acp_permissions
|
||||
case 'apply_all_permissions':
|
||||
if (!isset($_POST['setting']))
|
||||
{
|
||||
send_status_line(403, 'Forbidden');
|
||||
trigger_error($user->lang['NO_AUTH_SETTING_FOUND'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
if (!check_form_key($form_name))
|
||||
@@ -687,6 +689,7 @@ class acp_permissions
|
||||
// Check the permission setting again
|
||||
if (!$auth->acl_get('a_' . str_replace('_', '', $permission_type) . 'auth') || !$auth->acl_get('a_auth' . $ug_type . 's'))
|
||||
{
|
||||
send_status_line(403, 'Forbidden');
|
||||
trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
@@ -755,6 +758,7 @@ class acp_permissions
|
||||
|
||||
$this->log_action($mode, 'add', $permission_type, $ug_type, $ug_id, $forum_id);
|
||||
|
||||
meta_refresh(5, $this->u_action);
|
||||
trigger_error($user->lang['AUTH_UPDATED'] . adm_back_link($this->u_action));
|
||||
}
|
||||
|
||||
@@ -772,6 +776,7 @@ class acp_permissions
|
||||
// Check the permission setting again
|
||||
if (!$auth->acl_get('a_' . str_replace('_', '', $permission_type) . 'auth') || !$auth->acl_get('a_auth' . $ug_type . 's'))
|
||||
{
|
||||
send_status_line(403, 'Forbidden');
|
||||
trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
@@ -825,10 +830,12 @@ class acp_permissions
|
||||
|
||||
if ($mode == 'setting_forum_local' || $mode == 'setting_mod_local')
|
||||
{
|
||||
meta_refresh(5, $this->u_action . '&forum_id[]=' . implode('&forum_id[]=', $forum_ids));
|
||||
trigger_error($user->lang['AUTH_UPDATED'] . adm_back_link($this->u_action . '&forum_id[]=' . implode('&forum_id[]=', $forum_ids)));
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_refresh(5, $this->u_action);
|
||||
trigger_error($user->lang['AUTH_UPDATED'] . adm_back_link($this->u_action));
|
||||
}
|
||||
}
|
||||
@@ -884,6 +891,7 @@ class acp_permissions
|
||||
// Check the permission setting again
|
||||
if (!$auth->acl_get('a_' . str_replace('_', '', $permission_type) . 'auth') || !$auth->acl_get('a_auth' . $ug_type . 's'))
|
||||
{
|
||||
send_status_line(403, 'Forbidden');
|
||||
trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
@@ -899,10 +907,12 @@ class acp_permissions
|
||||
|
||||
if ($mode == 'setting_forum_local' || $mode == 'setting_mod_local')
|
||||
{
|
||||
meta_refresh(5, $this->u_action . '&forum_id[]=' . implode('&forum_id[]=', $forum_id));
|
||||
trigger_error($user->lang['AUTH_UPDATED'] . adm_back_link($this->u_action . '&forum_id[]=' . implode('&forum_id[]=', $forum_id)));
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_refresh(5, $this->u_action);
|
||||
trigger_error($user->lang['AUTH_UPDATED'] . adm_back_link($this->u_action));
|
||||
}
|
||||
}
|
||||
|
@@ -56,6 +56,9 @@ class acp_profile
|
||||
|
||||
$error = array();
|
||||
|
||||
$form_key = 'acp_profile';
|
||||
add_form_key($form_key);
|
||||
|
||||
if (!$field_id && in_array($action, array('delete','activate', 'deactivate', 'move_up', 'move_down', 'edit')))
|
||||
{
|
||||
trigger_error($user->lang['NO_FIELD_ID'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
@@ -166,6 +169,11 @@ class acp_profile
|
||||
|
||||
case 'activate':
|
||||
|
||||
if (!check_link_hash($request->variable('hash', ''), 'acp_profile'))
|
||||
{
|
||||
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
$sql = 'SELECT lang_id
|
||||
FROM ' . LANG_TABLE . "
|
||||
WHERE lang_iso = '" . $db->sql_escape($config['default_lang']) . "'";
|
||||
@@ -206,6 +214,11 @@ class acp_profile
|
||||
|
||||
case 'deactivate':
|
||||
|
||||
if (!check_link_hash($request->variable('hash', ''), 'acp_profile'))
|
||||
{
|
||||
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
$sql = 'UPDATE ' . PROFILE_FIELDS_TABLE . "
|
||||
SET field_active = 0
|
||||
WHERE field_id = $field_id";
|
||||
@@ -235,6 +248,11 @@ class acp_profile
|
||||
case 'move_up':
|
||||
case 'move_down':
|
||||
|
||||
if (!check_link_hash($request->variable('hash', ''), 'acp_profile'))
|
||||
{
|
||||
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
$sql = 'SELECT field_order
|
||||
FROM ' . PROFILE_FIELDS_TABLE . "
|
||||
WHERE field_id = $field_id";
|
||||
@@ -586,6 +604,11 @@ class acp_profile
|
||||
{
|
||||
if (($step == 3 && (sizeof($this->lang_defs['iso']) == 1 || $save)) || ($action == 'edit' && $save))
|
||||
{
|
||||
if (!check_form_key($form_key))
|
||||
{
|
||||
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
$this->save_profile_field($cp, $field_type, $action);
|
||||
}
|
||||
}
|
||||
@@ -734,18 +757,22 @@ class acp_profile
|
||||
$s_one_need_edit = true;
|
||||
}
|
||||
|
||||
if (!isset($this->type_collection[$row['field_type']]))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
$profile_field = $this->type_collection[$row['field_type']];
|
||||
$template->assign_block_vars('fields', array(
|
||||
'FIELD_IDENT' => $row['field_ident'],
|
||||
'FIELD_TYPE' => $profile_field->get_name(),
|
||||
|
||||
'L_ACTIVATE_DEACTIVATE' => $user->lang[$active_lang],
|
||||
'U_ACTIVATE_DEACTIVATE' => $this->u_action . "&action=$active_value&field_id=$id",
|
||||
'U_ACTIVATE_DEACTIVATE' => $this->u_action . "&action=$active_value&field_id=$id" . '&hash=' . generate_link_hash('acp_profile'),
|
||||
'U_EDIT' => $this->u_action . "&action=edit&field_id=$id",
|
||||
'U_TRANSLATE' => $this->u_action . "&action=edit&field_id=$id&step=3",
|
||||
'U_DELETE' => $this->u_action . "&action=delete&field_id=$id",
|
||||
'U_MOVE_UP' => $this->u_action . "&action=move_up&field_id=$id",
|
||||
'U_MOVE_DOWN' => $this->u_action . "&action=move_down&field_id=$id",
|
||||
'U_MOVE_UP' => $this->u_action . "&action=move_up&field_id=$id" . '&hash=' . generate_link_hash('acp_profile'),
|
||||
'U_MOVE_DOWN' => $this->u_action . "&action=move_down&field_id=$id" . '&hash=' . generate_link_hash('acp_profile'),
|
||||
|
||||
'S_NEED_EDIT' => $s_need_edit)
|
||||
);
|
||||
|
@@ -231,7 +231,6 @@ class acp_reasons
|
||||
break;
|
||||
|
||||
// Standard? What's that?
|
||||
case 'mssql':
|
||||
case 'mssql_odbc':
|
||||
case 'mssqlnative':
|
||||
// Change the reports using this reason to 'other'
|
||||
@@ -251,7 +250,6 @@ class acp_reasons
|
||||
// Teh standard
|
||||
case 'postgres':
|
||||
case 'oracle':
|
||||
case 'sqlite':
|
||||
case 'sqlite3':
|
||||
// Change the reports using this reason to 'other'
|
||||
$sql = 'UPDATE ' . REPORTS_TABLE . '
|
||||
@@ -281,6 +279,11 @@ class acp_reasons
|
||||
case 'move_up':
|
||||
case 'move_down':
|
||||
|
||||
if (!check_link_hash($request->variable('hash', ''), 'acp_reasons'))
|
||||
{
|
||||
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
$sql = 'SELECT reason_order
|
||||
FROM ' . REPORTS_REASONS_TABLE . "
|
||||
WHERE reason_id = $reason_id";
|
||||
@@ -382,8 +385,8 @@ class acp_reasons
|
||||
|
||||
'U_EDIT' => $this->u_action . '&action=edit&id=' . $row['reason_id'],
|
||||
'U_DELETE' => (!$other_reason) ? $this->u_action . '&action=delete&id=' . $row['reason_id'] : '',
|
||||
'U_MOVE_UP' => $this->u_action . '&action=move_up&id=' . $row['reason_id'],
|
||||
'U_MOVE_DOWN' => $this->u_action . '&action=move_down&id=' . $row['reason_id'])
|
||||
'U_MOVE_UP' => $this->u_action . '&action=move_up&id=' . $row['reason_id'] . '&hash=' . generate_link_hash('acp_reasons'),
|
||||
'U_MOVE_DOWN' => $this->u_action . '&action=move_down&id=' . $row['reason_id'] . '&hash=' . generate_link_hash('acp_reasons'))
|
||||
);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
@@ -55,6 +55,11 @@ class acp_search
|
||||
|
||||
$submit = (isset($_POST['submit'])) ? true : false;
|
||||
|
||||
if ($submit && !check_link_hash($request->variable('hash', ''), 'acp_search'))
|
||||
{
|
||||
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
$search_types = $this->get_search_types();
|
||||
|
||||
$settings = array(
|
||||
@@ -226,7 +231,7 @@ class acp_search
|
||||
'S_YES_SEARCH' => (bool) $config['load_search'],
|
||||
'S_SETTINGS' => true,
|
||||
|
||||
'U_ACTION' => $this->u_action)
|
||||
'U_ACTION' => $this->u_action . '&hash=' . generate_link_hash('acp_search'))
|
||||
);
|
||||
}
|
||||
|
||||
@@ -244,6 +249,12 @@ class acp_search
|
||||
$this->state = array();
|
||||
$this->save_state();
|
||||
}
|
||||
$submit = $request->is_set_post('submit', false);
|
||||
|
||||
if (!check_link_hash($request->variable('hash', ''), 'acp_search') && in_array($action, array('create', 'delete')))
|
||||
{
|
||||
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
if ($action)
|
||||
{
|
||||
@@ -294,7 +305,7 @@ class acp_search
|
||||
if (method_exists($this->search, 'delete_index'))
|
||||
{
|
||||
// pass a reference to myself so the $search object can make use of save_state() and attributes
|
||||
if ($error = $this->search->delete_index($this, append_sid("{$phpbb_admin_path}index.$phpEx", "i=$id&mode=$mode&action=delete", false)))
|
||||
if ($error = $this->search->delete_index($this, append_sid("{$phpbb_admin_path}index.$phpEx", "i=$id&mode=$mode&action=delete&hash=" . generate_link_hash('acp_search'), false)))
|
||||
{
|
||||
$this->state = array('');
|
||||
$this->save_state();
|
||||
@@ -337,7 +348,7 @@ class acp_search
|
||||
{
|
||||
$totaltime = microtime(true) - $starttime;
|
||||
$rows_per_second = $row_count / $totaltime;
|
||||
meta_refresh(1, append_sid($this->u_action . '&action=delete&skip_rows=' . $post_counter));
|
||||
meta_refresh(1, append_sid($this->u_action . '&action=delete&skip_rows=' . $post_counter . '&hash=' . generate_link_hash('acp_search')));
|
||||
trigger_error($user->lang('SEARCH_INDEX_DELETE_REDIRECT', (int) $row_count, $post_counter, $rows_per_second));
|
||||
}
|
||||
}
|
||||
@@ -425,7 +436,7 @@ class acp_search
|
||||
{
|
||||
$totaltime = microtime(true) - $starttime;
|
||||
$rows_per_second = $row_count / $totaltime;
|
||||
meta_refresh(1, append_sid($this->u_action . '&action=create&skip_rows=' . $post_counter));
|
||||
meta_refresh(1, append_sid($this->u_action . '&action=create&skip_rows=' . $post_counter . '&hash=' . generate_link_hash('acp_search')));
|
||||
trigger_error($user->lang('SEARCH_INDEX_CREATE_REDIRECT', (int) $row_count, $post_counter) . $user->lang('SEARCH_INDEX_CREATE_REDIRECT_RATE', $rows_per_second));
|
||||
}
|
||||
}
|
||||
@@ -504,7 +515,7 @@ class acp_search
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_INDEX' => true,
|
||||
'U_ACTION' => $this->u_action,
|
||||
'U_ACTION' => $this->u_action . '&hash=' . generate_link_hash('acp_search'),
|
||||
'U_PROGRESS_BAR' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=$id&mode=$mode&action=progress_bar"),
|
||||
'UA_PROGRESS_BAR' => addslashes(append_sid("{$phpbb_admin_path}index.$phpEx", "i=$id&mode=$mode&action=progress_bar")),
|
||||
));
|
||||
@@ -513,7 +524,7 @@ class acp_search
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_CONTINUE_INDEXING' => $this->state[1],
|
||||
'U_CONTINUE_INDEXING' => $this->u_action . '&action=' . $this->state[1],
|
||||
'U_CONTINUE_INDEXING' => $this->u_action . '&action=' . $this->state[1] . '&hash=' . generate_link_hash('acp_search'),
|
||||
'L_CONTINUE' => ($this->state[1] == 'create') ? $user->lang['CONTINUE_INDEXING'] : $user->lang['CONTINUE_DELETING_INDEX'],
|
||||
'L_CONTINUE_EXPLAIN' => ($this->state[1] == 'create') ? $user->lang['CONTINUE_INDEXING_EXPLAIN'] : $user->lang['CONTINUE_DELETING_INDEX_EXPLAIN'])
|
||||
);
|
||||
|
@@ -1,91 +0,0 @@
|
||||
<?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.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
if (!defined('IN_PHPBB'))
|
||||
{
|
||||
exit;
|
||||
}
|
||||
|
||||
class acp_send_statistics
|
||||
{
|
||||
var $u_action;
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $config, $template, $phpbb_admin_path, $phpbb_root_path, $phpEx;
|
||||
|
||||
if (!class_exists('phpbb_questionnaire_data_collector'))
|
||||
{
|
||||
include($phpbb_root_path . 'includes/questionnaire/questionnaire.' . $phpEx);
|
||||
}
|
||||
|
||||
$collect_url = "https://www.phpbb.com/stats/receive_stats.php";
|
||||
|
||||
$this->tpl_name = 'acp_send_statistics';
|
||||
$this->page_title = 'ACP_SEND_STATISTICS';
|
||||
|
||||
// generate a unique id if necessary
|
||||
if (!isset($config['questionnaire_unique_id']))
|
||||
{
|
||||
$install_id = unique_id();
|
||||
$config->set('questionnaire_unique_id', $install_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
$install_id = $config['questionnaire_unique_id'];
|
||||
}
|
||||
|
||||
$collector = new phpbb_questionnaire_data_collector($install_id);
|
||||
|
||||
// Add data provider
|
||||
$collector->add_data_provider(new phpbb_questionnaire_php_data_provider());
|
||||
$collector->add_data_provider(new phpbb_questionnaire_system_data_provider());
|
||||
$collector->add_data_provider(new phpbb_questionnaire_phpbb_data_provider($config));
|
||||
|
||||
$template->assign_vars(array(
|
||||
'U_COLLECT_STATS' => $collect_url,
|
||||
'RAW_DATA' => $collector->get_data_for_form(),
|
||||
'U_ACP_MAIN' => append_sid("{$phpbb_admin_path}index.$phpEx"),
|
||||
));
|
||||
|
||||
$raw = $collector->get_data_raw();
|
||||
|
||||
foreach ($raw as $provider => $data)
|
||||
{
|
||||
if ($provider == 'install_id')
|
||||
{
|
||||
$data = array($provider => $data);
|
||||
}
|
||||
|
||||
$template->assign_block_vars('providers', array(
|
||||
'NAME' => htmlspecialchars($provider),
|
||||
));
|
||||
|
||||
foreach ($data as $key => $value)
|
||||
{
|
||||
if (is_array($value))
|
||||
{
|
||||
$value = utf8_wordwrap(serialize($value), 75, "\n", true);
|
||||
}
|
||||
|
||||
$template->assign_block_vars('providers.values', array(
|
||||
'KEY' => utf8_htmlspecialchars($key),
|
||||
'VALUE' => utf8_htmlspecialchars($value),
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -63,5 +63,17 @@ class acp_update
|
||||
|
||||
'UPDATE_INSTRUCTIONS' => sprintf($user->lang['UPDATE_INSTRUCTIONS'], $update_link),
|
||||
));
|
||||
|
||||
// Incomplete update?
|
||||
if (phpbb_version_compare($config['version'], PHPBB_VERSION, '<'))
|
||||
{
|
||||
$database_update_link = $phpbb_root_path . 'install/app.php/update';
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_UPDATE_INCOMPLETE' => true,
|
||||
'FILES_VERSION' => PHPBB_VERSION,
|
||||
'INCOMPLETE_INSTRUCTIONS' => $user->lang('UPDATE_INCOMPLETE_EXPLAIN', $database_update_link),
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -205,6 +205,7 @@ class acp_users
|
||||
{
|
||||
if (!$auth->acl_get('a_userdel'))
|
||||
{
|
||||
send_status_line(403, 'Forbidden');
|
||||
trigger_error($user->lang['NO_AUTH_OPERATION'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING);
|
||||
}
|
||||
|
||||
@@ -370,11 +371,6 @@ class acp_users
|
||||
if ($user_row['user_type'] == USER_NORMAL)
|
||||
{
|
||||
user_active_flip('deactivate', $user_id, INACTIVE_REMIND);
|
||||
|
||||
$sql = 'UPDATE ' . USERS_TABLE . "
|
||||
SET user_actkey = '" . $db->sql_escape($user_actkey) . "'
|
||||
WHERE user_id = $user_id";
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -383,8 +379,18 @@ class acp_users
|
||||
FROM ' . USERS_TABLE . '
|
||||
WHERE user_id = ' . $user_id;
|
||||
$result = $db->sql_query($sql);
|
||||
$user_actkey = (string) $db->sql_fetchfield('user_actkey');
|
||||
$user_activation_key = (string) $db->sql_fetchfield('user_actkey');
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$user_actkey = empty($user_activation_key) ? $user_actkey : $user_activation_key;
|
||||
}
|
||||
|
||||
if ($user_row['user_type'] == USER_NORMAL || empty($user_activation_key))
|
||||
{
|
||||
$sql = 'UPDATE ' . USERS_TABLE . "
|
||||
SET user_actkey = '" . $db->sql_escape($user_actkey) . "'
|
||||
WHERE user_id = $user_id";
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
$messenger = new messenger(false);
|
||||
@@ -1953,7 +1959,7 @@ class acp_users
|
||||
|
||||
'S_FORM_ENCTYPE' => ' enctype="multipart/form-data"',
|
||||
|
||||
'L_AVATAR_EXPLAIN' => sprintf($user->lang['AVATAR_EXPLAIN'], $config['avatar_max_width'], $config['avatar_max_height'], $config['avatar_filesize'] / 1024),
|
||||
'L_AVATAR_EXPLAIN' => $user->lang(($config['avatar_filesize'] == 0) ? 'AVATAR_EXPLAIN_NO_FILESIZE' : 'AVATAR_EXPLAIN', $config['avatar_max_width'], $config['avatar_max_height'], $config['avatar_filesize'] / 1024),
|
||||
|
||||
'S_AVATARS_ENABLED' => ($config['allow_avatar'] && $avatars_enabled),
|
||||
));
|
||||
@@ -2310,6 +2316,12 @@ class acp_users
|
||||
{
|
||||
trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING);
|
||||
}
|
||||
|
||||
if (!check_link_hash($request->variable('hash', ''), 'acp_users'))
|
||||
{
|
||||
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
group_user_attributes($action, $group_id, $user_id);
|
||||
|
||||
if ($action == 'default')
|
||||
@@ -2470,8 +2482,8 @@ class acp_users
|
||||
{
|
||||
$template->assign_block_vars('group', array(
|
||||
'U_EDIT_GROUP' => append_sid("{$phpbb_admin_path}index.$phpEx", "i=groups&mode=manage&action=edit&u=$user_id&g={$data['group_id']}&back_link=acp_users_groups"),
|
||||
'U_DEFAULT' => $this->u_action . "&action=default&u=$user_id&g=" . $data['group_id'],
|
||||
'U_DEMOTE_PROMOTE' => $this->u_action . '&action=' . (($data['group_leader']) ? 'demote' : 'promote') . "&u=$user_id&g=" . $data['group_id'],
|
||||
'U_DEFAULT' => $this->u_action . "&action=default&u=$user_id&g=" . $data['group_id'] . '&hash=' . generate_link_hash('acp_users'),
|
||||
'U_DEMOTE_PROMOTE' => $this->u_action . '&action=' . (($data['group_leader']) ? 'demote' : 'promote') . "&u=$user_id&g=" . $data['group_id'] . '&hash=' . generate_link_hash('acp_users'),
|
||||
'U_DELETE' => $this->u_action . "&action=delete&u=$user_id&g=" . $data['group_id'],
|
||||
'U_APPROVE' => ($group_type == 'pending') ? $this->u_action . "&action=approve&u=$user_id&g=" . $data['group_id'] : '',
|
||||
|
||||
|
@@ -11,15 +11,15 @@
|
||||
*
|
||||
*/
|
||||
|
||||
class acp_send_statistics_info
|
||||
class acp_help_phpbb_info
|
||||
{
|
||||
function module()
|
||||
{
|
||||
return array(
|
||||
'filename' => 'acp_send_statistics',
|
||||
'title' => 'ACP_SEND_STATISTICS',
|
||||
'filename' => 'acp_help_phpbb',
|
||||
'title' => 'ACP_HELP_PHPBB',
|
||||
'modes' => array(
|
||||
'send_statistics' => array('title' => 'ACP_SEND_STATISTICS', 'auth' => 'acl_a_server', 'cat' => array('ACP_SERVER_CONFIGURATION')),
|
||||
'help_phpbb' => array('title' => 'ACP_HELP_PHPBB', 'auth' => 'acl_a_server', 'cat' => array('ACP_SERVER_CONFIGURATION')),
|
||||
),
|
||||
);
|
||||
}
|
@@ -42,6 +42,8 @@ function register_compatibility_globals()
|
||||
|
||||
/* @var $request \phpbb\request\request_interface */
|
||||
$request = $phpbb_container->get('request');
|
||||
// Inject request instance, so only this instance is used with request_var
|
||||
request_var('', 0, false, false, $request);
|
||||
|
||||
/* @var $user \phpbb\user */
|
||||
$user = $phpbb_container->get('user');
|
||||
@@ -55,6 +57,8 @@ function register_compatibility_globals()
|
||||
// Grab global variables, re-cache if necessary
|
||||
/* @var $config phpbb\config\db */
|
||||
$config = $phpbb_container->get('config');
|
||||
set_config('', '', false, $config);
|
||||
set_config_count('', 0, false, $config);
|
||||
|
||||
/* @var $phpbb_log \phpbb\log\log_interface */
|
||||
$phpbb_log = $phpbb_container->get('log');
|
||||
|
@@ -28,7 +28,7 @@ if (!defined('IN_PHPBB'))
|
||||
*/
|
||||
|
||||
// phpBB Version
|
||||
@define('PHPBB_VERSION', '3.2.0-RC1');
|
||||
@define('PHPBB_VERSION', '3.2.0-RC2');
|
||||
|
||||
// QA-related
|
||||
// define('PHPBB_QA', 1);
|
||||
|
@@ -853,7 +853,7 @@ function markread($mode, $forum_id = false, $topic_id = false, $post_time = 0, $
|
||||
$tracking['tf'][$forum_id][$topic_id36] = true;
|
||||
}
|
||||
|
||||
$tracking['t'][$topic_id36] = base_convert($post_time - $config['board_startdate'], 10, 36);
|
||||
$tracking['t'][$topic_id36] = base_convert($post_time - (int) $config['board_startdate'], 10, 36);
|
||||
|
||||
// If the cookie grows larger than 10000 characters we will remove the smallest value
|
||||
// This can result in old topics being unread - but most of the time it should be accurate...
|
||||
@@ -1647,13 +1647,6 @@ function generate_board_url($without_script_path = false)
|
||||
global $config, $user, $request;
|
||||
|
||||
$server_name = $user->host;
|
||||
$server_port = $request->server('SERVER_PORT', 0);
|
||||
$forwarded_proto = $request->server('HTTP_X_FORWARDED_PROTO');
|
||||
|
||||
if (!empty($forwarded_proto) && $forwarded_proto === 'https')
|
||||
{
|
||||
$server_port = 443;
|
||||
}
|
||||
|
||||
// Forcing server vars is the only way to specify/override the protocol
|
||||
if ($config['force_server_vars'] || !$server_name)
|
||||
@@ -1668,6 +1661,13 @@ function generate_board_url($without_script_path = false)
|
||||
}
|
||||
else
|
||||
{
|
||||
$server_port = $request->server('SERVER_PORT', 0);
|
||||
$forwarded_proto = $request->server('HTTP_X_FORWARDED_PROTO');
|
||||
|
||||
if (!empty($forwarded_proto) && $forwarded_proto === 'https')
|
||||
{
|
||||
$server_port = 443;
|
||||
}
|
||||
// Do not rely on cookie_secure, users seem to think that it means a secured cookie instead of an encrypted connection
|
||||
$cookie_secure = $request->is_secure() ? 1 : 0;
|
||||
$url = (($cookie_secure) ? 'https://' : 'http://') . $server_name;
|
||||
@@ -1723,8 +1723,8 @@ function redirect($url, $return = false, $disable_cd_check = false)
|
||||
|
||||
if ($url_parts === false)
|
||||
{
|
||||
// Malformed url, redirect to current page...
|
||||
$url = generate_board_url() . '/' . $user->page['page'];
|
||||
// Malformed url
|
||||
trigger_error('INSECURE_REDIRECT', E_USER_ERROR);
|
||||
}
|
||||
else if (!empty($url_parts['scheme']) && !empty($url_parts['host']))
|
||||
{
|
||||
@@ -2021,8 +2021,9 @@ function check_link_hash($token, $link_name)
|
||||
/**
|
||||
* Add a secret token to the form (requires the S_FORM_TOKEN template variable)
|
||||
* @param string $form_name The name of the form; has to match the name used in check_form_key, otherwise no restrictions apply
|
||||
* @param string $template_variable_suffix A string that is appended to the name of the template variable to which the form elements are assigned
|
||||
*/
|
||||
function add_form_key($form_name)
|
||||
function add_form_key($form_name, $template_variable_suffix = '')
|
||||
{
|
||||
global $config, $template, $user, $phpbb_dispatcher;
|
||||
|
||||
@@ -2039,13 +2040,15 @@ function add_form_key($form_name)
|
||||
* Perform additional actions on creation of the form token
|
||||
*
|
||||
* @event core.add_form_key
|
||||
* @var string form_name The form name
|
||||
* @var int now Current time timestamp
|
||||
* @var string s_fields Generated hidden fields
|
||||
* @var string token Form token
|
||||
* @var string token_sid User session ID
|
||||
* @var string form_name The form name
|
||||
* @var int now Current time timestamp
|
||||
* @var string s_fields Generated hidden fields
|
||||
* @var string token Form token
|
||||
* @var string token_sid User session ID
|
||||
* @var string template_variable_suffix The string that is appended to template variable name
|
||||
*
|
||||
* @since 3.1.0-RC3
|
||||
* @changed 3.1.11-RC1 Added template_variable_suffix
|
||||
*/
|
||||
$vars = array(
|
||||
'form_name',
|
||||
@@ -2053,12 +2056,11 @@ function add_form_key($form_name)
|
||||
's_fields',
|
||||
'token',
|
||||
'token_sid',
|
||||
'template_variable_suffix',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.add_form_key', compact($vars)));
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_FORM_TOKEN' => $s_fields,
|
||||
));
|
||||
$template->assign_var('S_FORM_TOKEN' . $template_variable_suffix, $s_fields);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2186,7 +2188,7 @@ function confirm_box($check, $title = '', $hidden = '', $html_body = 'confirm_bo
|
||||
$u_action .= ((strpos($u_action, '?') === false) ? '?' : '&') . 'confirm_key=' . $confirm_key;
|
||||
|
||||
$template->assign_vars(array(
|
||||
'MESSAGE_TITLE' => (!isset($user->lang[$title])) ? $user->lang['CONFIRM'] : $user->lang[$title],
|
||||
'MESSAGE_TITLE' => (!isset($user->lang[$title])) ? $user->lang['CONFIRM'] : $user->lang($title, 1),
|
||||
'MESSAGE_TEXT' => (!isset($user->lang[$title . '_CONFIRM'])) ? $title : $user->lang[$title . '_CONFIRM'],
|
||||
|
||||
'YES_VALUE' => $user->lang['YES'],
|
||||
@@ -2264,6 +2266,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
|
||||
{
|
||||
$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_ADMIN_AUTH_FAIL');
|
||||
}
|
||||
send_status_line(403, 'Forbidden');
|
||||
trigger_error('NO_AUTH_ADMIN');
|
||||
}
|
||||
|
||||
@@ -2280,6 +2283,7 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
|
||||
{
|
||||
$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_ADMIN_AUTH_FAIL');
|
||||
}
|
||||
send_status_line(403, 'Forbidden');
|
||||
trigger_error('NO_AUTH_ADMIN');
|
||||
}
|
||||
|
||||
@@ -2301,6 +2305,8 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa
|
||||
{
|
||||
// We log the attempt to use a different username...
|
||||
$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_ADMIN_AUTH_FAIL');
|
||||
|
||||
send_status_line(403, 'Forbidden');
|
||||
trigger_error('NO_AUTH_ADMIN_USER_DIFFER');
|
||||
}
|
||||
|
||||
@@ -3516,7 +3522,7 @@ function obtain_guest_count($item_id = 0, $item = 'forum')
|
||||
|
||||
// Get number of online guests
|
||||
|
||||
if ($db->get_sql_layer() === 'sqlite' || $db->get_sql_layer() === 'sqlite3')
|
||||
if ($db->get_sql_layer() === 'sqlite3')
|
||||
{
|
||||
$sql = 'SELECT COUNT(session_ip) as num_guests
|
||||
FROM (
|
||||
@@ -3669,6 +3675,30 @@ function obtain_users_online_string($online_users, $item_id = 0, $item = 'forum'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Modify online userlist data
|
||||
*
|
||||
* @event core.obtain_users_online_string_before_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)
|
||||
* @since 3.1.10-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'online_users',
|
||||
'item_id',
|
||||
'item',
|
||||
'rowset',
|
||||
'user_online_link',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.obtain_users_online_string_before_modify', compact($vars)));
|
||||
|
||||
$online_userlist = implode(', ', $user_online_link);
|
||||
|
||||
if (!$online_userlist)
|
||||
|
@@ -88,6 +88,7 @@ function adm_page_header($page_title)
|
||||
'T_ICONS_PATH' => "{$phpbb_root_path}{$config['icons_path']}/",
|
||||
'T_RANKS_PATH' => "{$phpbb_root_path}{$config['ranks_path']}/",
|
||||
'T_UPLOAD_PATH' => "{$phpbb_root_path}{$config['upload_path']}/",
|
||||
'T_FONT_AWESOME_LINK' => !empty($config['allow_cdn']) && !empty($config['load_font_awesome_url']) ? $config['load_font_awesome_url'] : "{$phpbb_root_path}assets/css/font-awesome.min.css?assets_version=" . $config['assets_version'],
|
||||
|
||||
'T_ASSETS_VERSION' => $config['assets_version'],
|
||||
|
||||
|
@@ -65,7 +65,7 @@ function recalc_nested_sets(&$new_id, $pkey, $table, $parent_id = 0, $where = ar
|
||||
*/
|
||||
function make_forum_select($select_id = false, $ignore_id = false, $ignore_acl = false, $ignore_nonpost = false, $ignore_emptycat = true, $only_acl_post = false, $return_array = false)
|
||||
{
|
||||
global $db, $auth;
|
||||
global $db, $auth, $phpbb_dispatcher;
|
||||
|
||||
// This query is identical to the jumpbox one
|
||||
$sql = 'SELECT forum_id, forum_name, parent_id, forum_type, forum_flags, forum_options, left_id, right_id
|
||||
@@ -73,16 +73,33 @@ function make_forum_select($select_id = false, $ignore_id = false, $ignore_acl =
|
||||
ORDER BY left_id ASC';
|
||||
$result = $db->sql_query($sql, 600);
|
||||
|
||||
$rowset = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$rowset[(int) $row['forum_id']] = $row;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$right = 0;
|
||||
$padding_store = array('0' => '');
|
||||
$padding = '';
|
||||
$forum_list = ($return_array) ? array() : '';
|
||||
|
||||
/**
|
||||
* Modify the forum list data
|
||||
*
|
||||
* @event core.make_forum_select_modify_forum_list
|
||||
* @var array rowset Array with the forums list data
|
||||
* @since 3.1.10-RC1
|
||||
*/
|
||||
$vars = array('rowset');
|
||||
extract($phpbb_dispatcher->trigger_event('core.make_forum_select_modify_forum_list', compact($vars)));
|
||||
|
||||
// Sometimes it could happen that forums will be displayed here not be displayed within the index page
|
||||
// This is the result of forums not displayed at index, having list permissions and a parent of a forum with no permissions.
|
||||
// If this happens, the padding could be "broken"
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
foreach ($rowset as $row)
|
||||
{
|
||||
if ($row['left_id'] < $right)
|
||||
{
|
||||
@@ -133,8 +150,7 @@ function make_forum_select($select_id = false, $ignore_id = false, $ignore_acl =
|
||||
$forum_list .= '<option value="' . $row['forum_id'] . '"' . (($disabled) ? ' disabled="disabled" class="disabled-option"' : $selected) . '>' . $padding . $row['forum_name'] . '</option>';
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
unset($padding_store);
|
||||
unset($padding_store, $rowset);
|
||||
|
||||
return $forum_list;
|
||||
}
|
||||
@@ -204,7 +220,7 @@ function group_select_options($group_id, $exclude_ids = false, $manage_founder =
|
||||
*/
|
||||
function get_forum_list($acl_list = 'f_list', $id_only = true, $postable_only = false, $no_cache = false)
|
||||
{
|
||||
global $db, $auth;
|
||||
global $db, $auth, $phpbb_dispatcher;
|
||||
static $forum_rows;
|
||||
|
||||
if (!isset($forum_rows))
|
||||
@@ -259,6 +275,16 @@ function get_forum_list($acl_list = 'f_list', $id_only = true, $postable_only =
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Modify the forum list data
|
||||
*
|
||||
* @event core.get_forum_list_modify_data
|
||||
* @var array rowset Array with the forum list data
|
||||
* @since 3.1.10-RC1
|
||||
*/
|
||||
$vars = array('rowset');
|
||||
extract($phpbb_dispatcher->trigger_event('core.get_forum_list_modify_data', compact($vars)));
|
||||
|
||||
return $rowset;
|
||||
}
|
||||
|
||||
@@ -2221,7 +2247,7 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
||||
/**
|
||||
* Prune function
|
||||
*/
|
||||
function prune($forum_id, $prune_mode, $prune_date, $prune_flags = 0, $auto_sync = true)
|
||||
function prune($forum_id, $prune_mode, $prune_date, $prune_flags = 0, $auto_sync = true, $prune_limit = 0)
|
||||
{
|
||||
global $db, $phpbb_dispatcher;
|
||||
|
||||
@@ -2273,9 +2299,19 @@ function prune($forum_id, $prune_mode, $prune_date, $prune_flags = 0, $auto_sync
|
||||
* @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
|
||||
* @var int prune_limit The prune limit
|
||||
* @since 3.1.3-RC1
|
||||
* @changed 3.1.10-RC1 Added prune_limit
|
||||
*/
|
||||
$vars = array('forum_id', 'prune_mode', 'prune_date', 'prune_flags', 'auto_sync', 'sql_and');
|
||||
$vars = array(
|
||||
'forum_id',
|
||||
'prune_mode',
|
||||
'prune_date',
|
||||
'prune_flags',
|
||||
'auto_sync',
|
||||
'sql_and',
|
||||
'prune_limit',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.prune_sql', compact($vars)));
|
||||
|
||||
$sql = 'SELECT topic_id
|
||||
@@ -2283,7 +2319,7 @@ function prune($forum_id, $prune_mode, $prune_date, $prune_flags = 0, $auto_sync
|
||||
WHERE ' . $db->sql_in_set('forum_id', $forum_id) . "
|
||||
AND poll_start = 0
|
||||
$sql_and";
|
||||
$result = $db->sql_query($sql);
|
||||
$result = $db->sql_query_limit($sql, $prune_limit);
|
||||
|
||||
$topic_list = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
@@ -2300,7 +2336,7 @@ function prune($forum_id, $prune_mode, $prune_date, $prune_flags = 0, $auto_sync
|
||||
AND poll_start > 0
|
||||
AND poll_last_vote < $prune_date
|
||||
$sql_and";
|
||||
$result = $db->sql_query($sql);
|
||||
$result = $db->sql_query_limit($sql, $prune_limit);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
@@ -2333,12 +2369,15 @@ function auto_prune($forum_id, $prune_mode, $prune_flags, $prune_days, $prune_fr
|
||||
$prune_date = time() - ($prune_days * 86400);
|
||||
$next_prune = time() + ($prune_freq * 86400);
|
||||
|
||||
prune($forum_id, $prune_mode, $prune_date, $prune_flags, true);
|
||||
$result = prune($forum_id, $prune_mode, $prune_date, $prune_flags, true, 300);
|
||||
|
||||
$sql = 'UPDATE ' . FORUMS_TABLE . "
|
||||
SET prune_next = $next_prune
|
||||
WHERE forum_id = $forum_id";
|
||||
$db->sql_query($sql);
|
||||
if ($result['topics'] == 0 && $result['posts'] == 0)
|
||||
{
|
||||
$sql = 'UPDATE ' . FORUMS_TABLE . "
|
||||
SET prune_next = $next_prune
|
||||
WHERE forum_id = $forum_id";
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_AUTO_PRUNE', false, array($row['forum_name']));
|
||||
}
|
||||
@@ -2364,7 +2403,6 @@ function phpbb_cache_moderators($db, $cache, $auth)
|
||||
// Clear table
|
||||
switch ($db->get_sql_layer())
|
||||
{
|
||||
case 'sqlite':
|
||||
case 'sqlite3':
|
||||
$db->sql_query('DELETE FROM ' . MODERATOR_CACHE_TABLE);
|
||||
break;
|
||||
@@ -2822,7 +2860,6 @@ function get_database_size()
|
||||
}
|
||||
break;
|
||||
|
||||
case 'sqlite':
|
||||
case 'sqlite3':
|
||||
global $dbhost;
|
||||
|
||||
@@ -2833,7 +2870,6 @@ function get_database_size()
|
||||
|
||||
break;
|
||||
|
||||
case 'mssql':
|
||||
case 'mssql_odbc':
|
||||
case 'mssqlnative':
|
||||
$sql = 'SELECT @@VERSION AS mssql_version';
|
||||
|
@@ -163,16 +163,33 @@ function make_jumpbox($action, $forum_id = false, $select_all = false, $acl_list
|
||||
ORDER BY left_id ASC';
|
||||
$result = $db->sql_query($sql, 600);
|
||||
|
||||
$rowset = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$rowset[(int) $row['forum_id']] = $row;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
$right = $padding = 0;
|
||||
$padding_store = array('0' => 0);
|
||||
$display_jumpbox = false;
|
||||
$iteration = 0;
|
||||
|
||||
/**
|
||||
* Modify the jumpbox forum list data
|
||||
*
|
||||
* @event core.make_jumpbox_modify_forum_list
|
||||
* @var array rowset Array with the forums list data
|
||||
* @since 3.1.10-RC1
|
||||
*/
|
||||
$vars = array('rowset');
|
||||
extract($phpbb_dispatcher->trigger_event('core.make_jumpbox_modify_forum_list', compact($vars)));
|
||||
|
||||
// Sometimes it could happen that forums will be displayed here not be displayed within the index page
|
||||
// This is the result of forums not displayed at index, having list permissions and a parent of a forum with no permissions.
|
||||
// If this happens, the padding could be "broken"
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
foreach ($rowset as $row)
|
||||
{
|
||||
if ($row['left_id'] < $right)
|
||||
{
|
||||
@@ -254,8 +271,7 @@ function make_jumpbox($action, $forum_id = false, $select_all = false, $acl_list
|
||||
}
|
||||
$iteration++;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
unset($padding_store);
|
||||
unset($padding_store, $rowset);
|
||||
|
||||
$url_parts = $phpbb_path_helper->get_url_parts($action);
|
||||
|
||||
@@ -1019,7 +1035,7 @@ function bbcode_nl2br($text)
|
||||
*/
|
||||
function smiley_text($text, $force_option = false)
|
||||
{
|
||||
global $config, $user, $phpbb_path_helper;
|
||||
global $config, $user, $phpbb_path_helper, $phpbb_dispatcher;
|
||||
|
||||
if ($force_option || !$config['allow_smilies'] || !$user->optionget('viewsmilies'))
|
||||
{
|
||||
@@ -1028,6 +1044,16 @@ function smiley_text($text, $force_option = false)
|
||||
else
|
||||
{
|
||||
$root_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? generate_board_url() . '/' : $phpbb_path_helper->get_web_root_path();
|
||||
|
||||
/**
|
||||
* Event to override the root_path for smilies
|
||||
*
|
||||
* @event core.smiley_text_root_path
|
||||
* @var string root_path root_path for smilies
|
||||
* @since 3.1.11-RC1
|
||||
*/
|
||||
$vars = array('root_path');
|
||||
extract($phpbb_dispatcher->trigger_event('core.smiley_text_root_path', compact($vars)));
|
||||
return preg_replace('#<!\-\- s(.*?) \-\-><img src="\{SMILIES_PATH\}\/(.*?) \/><!\-\- s\1 \-\->#', '<img class="smilies" src="' . $root_path . $config['smilies_path'] . '/\2 />', $text);
|
||||
}
|
||||
}
|
||||
|
@@ -1652,8 +1652,6 @@ function mass_auth($ug_type, $forum_id, $ug_id, $acl_list, $setting = ACL_NO)
|
||||
$sql = 'VALUES ' . implode(', ', preg_replace('#^(.*?)$#', '(\1)', $sql_subary));
|
||||
break;
|
||||
|
||||
case 'mssql':
|
||||
case 'sqlite':
|
||||
case 'sqlite3':
|
||||
case 'mssqlnative':
|
||||
$sql = implode(' UNION ALL ', preg_replace('#^(.*?)$#', 'SELECT \1', $sql_subary));
|
||||
@@ -2041,7 +2039,6 @@ function update_topics_posted()
|
||||
|
||||
switch ($db->get_sql_layer())
|
||||
{
|
||||
case 'sqlite':
|
||||
case 'sqlite3':
|
||||
$db->sql_query('DELETE FROM ' . TOPICS_POSTED_TABLE);
|
||||
break;
|
||||
|
@@ -282,6 +282,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||
$subforums[$parent_id][$forum_id]['name'] = $row['forum_name'];
|
||||
$subforums[$parent_id][$forum_id]['orig_forum_last_post_time'] = $row['forum_last_post_time'];
|
||||
$subforums[$parent_id][$forum_id]['children'] = array();
|
||||
$subforums[$parent_id][$forum_id]['type'] = $row['forum_type'];
|
||||
|
||||
if (isset($subforums[$parent_id][$row['parent_id']]) && !$row['display_on_index'])
|
||||
{
|
||||
@@ -490,6 +491,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||
'link' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $subforum_id),
|
||||
'name' => $subforum_row['name'],
|
||||
'unread' => $subforum_unread,
|
||||
'type' => $subforum_row['type'],
|
||||
);
|
||||
}
|
||||
else
|
||||
@@ -571,6 +573,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||
'U_SUBFORUM' => $subforum['link'],
|
||||
'SUBFORUM_NAME' => $subforum['name'],
|
||||
'S_UNREAD' => $subforum['unread'],
|
||||
'IS_LINK' => $subforum['type'] == FORUM_LINK,
|
||||
);
|
||||
}
|
||||
$s_subforums_list = (string) implode($user->lang['COMMA_SEPARATOR'], $s_subforums_list);
|
||||
@@ -726,6 +729,11 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
|
||||
*/
|
||||
function generate_forum_rules(&$forum_data)
|
||||
{
|
||||
if ($forum_data['forum_rules'])
|
||||
{
|
||||
$forum_data['forum_rules'] = generate_text_for_display($forum_data['forum_rules'], $forum_data['forum_rules_uid'], $forum_data['forum_rules_bitfield'], $forum_data['forum_rules_options']);
|
||||
}
|
||||
|
||||
if (!$forum_data['forum_rules'] && !$forum_data['forum_rules_link'])
|
||||
{
|
||||
return;
|
||||
@@ -733,11 +741,6 @@ function generate_forum_rules(&$forum_data)
|
||||
|
||||
global $template;
|
||||
|
||||
if ($forum_data['forum_rules'])
|
||||
{
|
||||
$forum_data['forum_rules'] = generate_text_for_display($forum_data['forum_rules'], $forum_data['forum_rules_uid'], $forum_data['forum_rules_bitfield'], $forum_data['forum_rules_options']);
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_FORUM_RULES' => true,
|
||||
'U_FORUM_RULES' => $forum_data['forum_rules_link'],
|
||||
|
@@ -254,11 +254,21 @@ function send_file_to_browser($attachment, $upload_dir, $category)
|
||||
send_status_line(206, 'Partial Content');
|
||||
header('Content-Range: bytes ' . $range['byte_pos_start'] . '-' . $range['byte_pos_end'] . '/' . $range['bytes_total']);
|
||||
header('Content-Length: ' . $range['bytes_requested']);
|
||||
}
|
||||
|
||||
while (!feof($fp))
|
||||
// First read chunks
|
||||
while (!feof($fp) && ftell($fp) < $range['byte_pos_end'] - 8192)
|
||||
{
|
||||
echo fread($fp, 8192);
|
||||
}
|
||||
// Then, read the remainder
|
||||
echo fread($fp, $range['bytes_requested'] % 8192);
|
||||
}
|
||||
else
|
||||
{
|
||||
echo fread($fp, 8192);
|
||||
while (!feof($fp))
|
||||
{
|
||||
echo fread($fp, 8192);
|
||||
}
|
||||
}
|
||||
fclose($fp);
|
||||
}
|
||||
@@ -284,7 +294,7 @@ function header_filename($file)
|
||||
|
||||
// There be dragons here.
|
||||
// Not many follows the RFC...
|
||||
if (strpos($user_agent, 'MSIE') !== false || strpos($user_agent, 'Safari') !== false || strpos($user_agent, 'Konqueror') !== false)
|
||||
if (strpos($user_agent, 'MSIE') !== false || strpos($user_agent, 'Konqueror') !== false)
|
||||
{
|
||||
return "filename=" . rawurlencode($file);
|
||||
}
|
||||
@@ -529,6 +539,9 @@ function phpbb_find_range_request()
|
||||
*/
|
||||
function phpbb_parse_range_request($request_array, $filesize)
|
||||
{
|
||||
$first_byte_pos = -1;
|
||||
$last_byte_pos = -1;
|
||||
|
||||
// Go through all ranges
|
||||
foreach ($request_array as $range_string)
|
||||
{
|
||||
@@ -540,62 +553,61 @@ function phpbb_parse_range_request($request_array, $filesize)
|
||||
continue;
|
||||
}
|
||||
|
||||
// Substitute defaults
|
||||
if ($range[0] === '')
|
||||
{
|
||||
// Return last $range[1] bytes.
|
||||
|
||||
if (!$range[1])
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($range[1] >= $filesize)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$first_byte_pos = $filesize - (int) $range[1];
|
||||
$last_byte_pos = $filesize - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Return bytes from $range[0] to $range[1]
|
||||
|
||||
$first_byte_pos = (int) $range[0];
|
||||
$last_byte_pos = (int) $range[1];
|
||||
|
||||
if ($last_byte_pos && $last_byte_pos < $first_byte_pos)
|
||||
{
|
||||
// The requested range contains 0 bytes.
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($first_byte_pos >= $filesize)
|
||||
{
|
||||
// Requested range not satisfiable
|
||||
return false;
|
||||
}
|
||||
|
||||
// Adjust last-byte-pos if it is absent or greater than the content.
|
||||
if ($range[1] === '' || $last_byte_pos >= $filesize)
|
||||
{
|
||||
$last_byte_pos = $filesize - 1;
|
||||
}
|
||||
$range[0] = 0;
|
||||
}
|
||||
|
||||
// We currently do not support range requests that end before the end of the file
|
||||
if ($last_byte_pos != $filesize - 1)
|
||||
if ($range[1] === '')
|
||||
{
|
||||
$range[1] = $filesize - 1;
|
||||
}
|
||||
|
||||
if ($last_byte_pos >= 0 && $last_byte_pos + 1 != $range[0])
|
||||
{
|
||||
// We only support contiguous ranges, no multipart stuff :(
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($range[1] && $range[1] < $range[0])
|
||||
{
|
||||
// The requested range contains 0 bytes.
|
||||
continue;
|
||||
}
|
||||
|
||||
return array(
|
||||
'byte_pos_start' => $first_byte_pos,
|
||||
'byte_pos_end' => $last_byte_pos,
|
||||
'bytes_requested' => $last_byte_pos - $first_byte_pos + 1,
|
||||
'bytes_total' => $filesize,
|
||||
);
|
||||
// Return bytes from $range[0] to $range[1]
|
||||
if ($first_byte_pos < 0)
|
||||
{
|
||||
$first_byte_pos = (int) $range[0];
|
||||
}
|
||||
|
||||
$last_byte_pos = (int) $range[1];
|
||||
|
||||
if ($first_byte_pos >= $filesize)
|
||||
{
|
||||
// Requested range not satisfiable
|
||||
return false;
|
||||
}
|
||||
|
||||
// Adjust last-byte-pos if it is absent or greater than the content.
|
||||
if ($range[1] === '' || $last_byte_pos >= $filesize)
|
||||
{
|
||||
$last_byte_pos = $filesize - 1;
|
||||
}
|
||||
}
|
||||
|
||||
if ($first_byte_pos < 0 || $last_byte_pos < 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return array(
|
||||
'byte_pos_start' => $first_byte_pos,
|
||||
'byte_pos_end' => $last_byte_pos,
|
||||
'bytes_requested' => $last_byte_pos - $first_byte_pos + 1,
|
||||
'bytes_total' => $filesize,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -677,6 +689,8 @@ function phpbb_download_handle_forum_auth($db, $auth, $topic_id)
|
||||
*/
|
||||
function phpbb_download_handle_pm_auth($db, $auth, $user_id, $msg_id)
|
||||
{
|
||||
global $phpbb_dispatcher;
|
||||
|
||||
if (!$auth->acl_get('u_pm_download'))
|
||||
{
|
||||
send_status_line(403, 'Forbidden');
|
||||
@@ -685,6 +699,18 @@ function phpbb_download_handle_pm_auth($db, $auth, $user_id, $msg_id)
|
||||
|
||||
$allowed = phpbb_download_check_pm_auth($db, $user_id, $msg_id);
|
||||
|
||||
/**
|
||||
* Event to modify PM attachments download auth
|
||||
*
|
||||
* @event core.modify_pm_attach_download_auth
|
||||
* @var bool allowed Whether the user is allowed to download from that PM or not
|
||||
* @var int msg_id The id of the PM to download from
|
||||
* @var int user_id The user id for auth check
|
||||
* @since 3.1.11-RC1
|
||||
*/
|
||||
$vars = array('allowed', 'msg_id', 'user_id');
|
||||
extract($phpbb_dispatcher->trigger_event('core.modify_pm_attach_download_auth', compact($vars)));
|
||||
|
||||
if (!$allowed)
|
||||
{
|
||||
send_status_line(403, 'Forbidden');
|
||||
|
@@ -225,6 +225,13 @@ class messenger
|
||||
$template_lang = basename($config['default_lang']);
|
||||
}
|
||||
|
||||
$ext_template_paths = array(
|
||||
array(
|
||||
'name' => $template_lang . '_email',
|
||||
'ext_path' => 'language/' . $template_lang . '/email' . $template_dir_prefix,
|
||||
),
|
||||
);
|
||||
|
||||
if ($template_path)
|
||||
{
|
||||
$template_paths = array(
|
||||
@@ -240,23 +247,38 @@ class messenger
|
||||
$template_path . $template_dir_prefix,
|
||||
);
|
||||
|
||||
$board_language = basename($config['default_lang']);
|
||||
|
||||
// we can only specify default language fallback when the path is not a custom one for which we
|
||||
// do not know the default language alternative
|
||||
if ($template_lang !== basename($config['default_lang']))
|
||||
if ($template_lang !== $board_language)
|
||||
{
|
||||
$fallback_template_path = (!empty($user->lang_path)) ? $user->lang_path : $phpbb_root_path . 'language/';
|
||||
$fallback_template_path .= basename($config['default_lang']) . '/email';
|
||||
$fallback_template_path .= $board_language . '/email';
|
||||
|
||||
$template_paths[] = $fallback_template_path . $template_dir_prefix;
|
||||
|
||||
$ext_template_paths[] = array(
|
||||
'name' => $board_language . '_email',
|
||||
'ext_path' => 'language/' . $board_language . '/email' . $template_dir_prefix,
|
||||
);
|
||||
}
|
||||
// If everything fails just fall back to en template
|
||||
if ($template_lang !== 'en' && $board_language !== 'en')
|
||||
{
|
||||
$fallback_template_path = (!empty($user->lang_path)) ? $user->lang_path : $phpbb_root_path . 'language/';
|
||||
$fallback_template_path .= 'en/email';
|
||||
|
||||
$template_paths[] = $fallback_template_path . $template_dir_prefix;
|
||||
|
||||
$ext_template_paths[] = array(
|
||||
'name' => 'en_email',
|
||||
'ext_path' => 'language/en/email' . $template_dir_prefix,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$this->set_template_paths(array(
|
||||
array(
|
||||
'name' => $template_lang . '_email',
|
||||
'ext_path' => 'language/' . $template_lang . '/email' . $template_dir_prefix,
|
||||
),
|
||||
), $template_paths);
|
||||
$this->set_template_paths($ext_template_paths, $template_paths);
|
||||
|
||||
$this->template->set_filenames(array(
|
||||
'body' => $template_file . '.txt',
|
||||
@@ -409,7 +431,7 @@ class messenger
|
||||
*/
|
||||
function build_header($to, $cc, $bcc)
|
||||
{
|
||||
global $config;
|
||||
global $config, $phpbb_dispatcher;
|
||||
|
||||
// We could use keys here, but we won't do this for 3.0.x to retain backwards compatibility
|
||||
$headers = array();
|
||||
@@ -441,6 +463,16 @@ class messenger
|
||||
$headers[] = 'X-MimeOLE: phpBB3';
|
||||
$headers[] = 'X-phpBB-Origin: phpbb://' . str_replace(array('http://', 'https://'), array('', ''), generate_board_url());
|
||||
|
||||
/**
|
||||
* Event to modify email header entries
|
||||
*
|
||||
* @event core.modify_email_headers
|
||||
* @var array headers Array containing email header entries
|
||||
* @since 3.1.11-RC1
|
||||
*/
|
||||
$vars = array('headers');
|
||||
extract($phpbb_dispatcher->trigger_event('core.modify_email_headers', compact($vars)));
|
||||
|
||||
if (sizeof($this->extra_headers))
|
||||
{
|
||||
$headers = array_merge($headers, $this->extra_headers);
|
||||
@@ -624,31 +656,34 @@ class messenger
|
||||
*/
|
||||
protected function setup_template()
|
||||
{
|
||||
global $phpbb_extension_manager, $phpbb_container, $phpbb_filesystem;
|
||||
global $phpbb_container;
|
||||
|
||||
if ($this->template instanceof \phpbb\template\template)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$template_environment = new \phpbb\template\twig\environment(
|
||||
$phpbb_container->get('config'),
|
||||
$phpbb_container->get('filesystem'),
|
||||
$phpbb_container->get('path_helper'),
|
||||
$phpbb_container->getParameter('core.template.cache_path'),
|
||||
$phpbb_container->get('ext.manager'),
|
||||
new \phpbb\template\twig\loader(
|
||||
$phpbb_container->get('filesystem')
|
||||
)
|
||||
);
|
||||
$template_environment->setLexer($phpbb_container->get('template.twig.lexer'));
|
||||
|
||||
$this->template = new \phpbb\template\twig\twig(
|
||||
$phpbb_container->get('path_helper'),
|
||||
$phpbb_container->get('config'),
|
||||
new \phpbb\template\context(),
|
||||
new \phpbb\template\twig\environment(
|
||||
$phpbb_container->get('config'),
|
||||
$phpbb_container->get('filesystem'),
|
||||
$phpbb_container->get('path_helper'),
|
||||
$phpbb_container->getParameter('core.cache_dir'),
|
||||
$phpbb_container->get('ext.manager'),
|
||||
new \phpbb\template\twig\loader(
|
||||
$phpbb_filesystem
|
||||
)
|
||||
),
|
||||
$phpbb_container->getParameter('core.cache_dir'),
|
||||
$template_environment,
|
||||
$phpbb_container->getParameter('core.template.cache_path'),
|
||||
$phpbb_container->get('user'),
|
||||
$phpbb_container->get('template.twig.extensions.collection'),
|
||||
$phpbb_extension_manager
|
||||
$phpbb_container->get('ext.manager')
|
||||
);
|
||||
}
|
||||
|
||||
@@ -684,10 +719,10 @@ class queue
|
||||
*/
|
||||
function queue()
|
||||
{
|
||||
global $phpEx, $phpbb_root_path, $phpbb_filesystem;
|
||||
global $phpEx, $phpbb_root_path, $phpbb_filesystem, $phpbb_container;
|
||||
|
||||
$this->data = array();
|
||||
$this->cache_file = "{$phpbb_root_path}cache/queue.$phpEx";
|
||||
$this->cache_file = $phpbb_container->getParameter('core.cache_dir') . "queue.$phpEx";
|
||||
$this->filesystem = $phpbb_filesystem;
|
||||
}
|
||||
|
||||
|
@@ -120,6 +120,15 @@ function generate_smilies($mode, $forum_id)
|
||||
|
||||
foreach ($smilies as $row)
|
||||
{
|
||||
/**
|
||||
* Modify smiley root path before populating smiley list
|
||||
*
|
||||
* @event core.generate_smilies_before
|
||||
* @var string root_path root_path for smilies
|
||||
* @since 3.1.11-RC1
|
||||
*/
|
||||
$vars = array('root_path');
|
||||
extract($phpbb_dispatcher->trigger_event('core.generate_smilies_before', compact($vars)));
|
||||
$template->assign_block_vars('smiley', array(
|
||||
'SMILEY_CODE' => $row['code'],
|
||||
'A_SMILEY_CODE' => addslashes($row['code']),
|
||||
@@ -544,7 +553,7 @@ function create_thumbnail($source, $destination, $mimetype)
|
||||
|
||||
$used_imagick = false;
|
||||
|
||||
// Only use imagemagick if defined and the passthru function not disabled
|
||||
// Only use ImageMagick if defined and the passthru function not disabled
|
||||
if ($config['img_imagick'] && function_exists('passthru'))
|
||||
{
|
||||
if (substr($config['img_imagick'], -1) !== '/')
|
||||
@@ -924,7 +933,7 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
|
||||
}
|
||||
|
||||
$sql_ary = array(
|
||||
'SELECT' => 'u.username, u.user_id, u.user_colour, p.*, z.friend, z.foe',
|
||||
'SELECT' => 'u.username, u.user_id, u.user_colour, p.*, z.friend, z.foe, uu.username as post_delete_username, uu.user_colour as post_delete_user_colour',
|
||||
|
||||
'FROM' => array(
|
||||
USERS_TABLE => 'u',
|
||||
@@ -936,6 +945,10 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
|
||||
'FROM' => array(ZEBRA_TABLE => 'z'),
|
||||
'ON' => 'z.user_id = ' . $user->data['user_id'] . ' AND z.zebra_id = p.poster_id',
|
||||
),
|
||||
array(
|
||||
'FROM' => array(USERS_TABLE => 'uu'),
|
||||
'ON' => 'uu.user_id = p.post_delete_user',
|
||||
),
|
||||
),
|
||||
|
||||
'WHERE' => $db->sql_in_set('p.post_id', $post_list) . '
|
||||
@@ -1042,6 +1055,31 @@ 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']}");
|
||||
|
||||
$l_deleted_message = '';
|
||||
if ($row['post_visibility'] == ITEM_DELETED)
|
||||
{
|
||||
$display_postername = get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']);
|
||||
|
||||
// User having deleted the post also being the post author?
|
||||
if (!$row['post_delete_user'] || $row['post_delete_user'] == $poster_id)
|
||||
{
|
||||
$display_username = $display_postername;
|
||||
}
|
||||
else
|
||||
{
|
||||
$display_username = get_username_string('full', $row['post_delete_user'], $row['post_delete_username'], $row['post_delete_user_colour']);
|
||||
}
|
||||
|
||||
if ($row['post_delete_reason'])
|
||||
{
|
||||
$l_deleted_message = $user->lang('POST_DELETED_BY_REASON', $display_postername, $display_username, $user->format_date($row['post_delete_time'], false, true), $row['post_delete_reason']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$l_deleted_message = $user->lang('POST_DELETED_BY', $display_postername, $display_username, $user->format_date($row['post_delete_time'], false, true));
|
||||
}
|
||||
}
|
||||
|
||||
$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']),
|
||||
@@ -1052,6 +1090,8 @@ function topic_review($topic_id, $forum_id, $mode = 'topic_review', $cur_post_id
|
||||
'S_FRIEND' => ($row['friend']) ? true : false,
|
||||
'S_IGNORE_POST' => ($row['foe']) ? true : false,
|
||||
'L_IGNORE_POST' => ($row['foe']) ? sprintf($user->lang['POST_BY_FOE'], get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), "<a href=\"{$u_show_post}\" onclick=\"phpbb.toggleDisplay('{$post_anchor}', 1); return false;\">", '</a>') : '',
|
||||
'S_POST_DELETED' => ($row['post_visibility'] == ITEM_DELETED) ? true : false,
|
||||
'L_DELETE_POST' => $l_deleted_message,
|
||||
|
||||
'POST_SUBJECT' => $post_subject,
|
||||
'MINI_POST_IMG' => $user->img('icon_post_target', $user->lang['POST']),
|
||||
|
@@ -801,6 +801,7 @@ function move_pm($user_id, $message_limit, $move_msg_ids, $dest_folder, $cur_fol
|
||||
|
||||
if (!$row)
|
||||
{
|
||||
send_status_line(403, 'Forbidden');
|
||||
trigger_error('NOT_AUTHORISED');
|
||||
}
|
||||
|
||||
@@ -888,9 +889,16 @@ function update_unread_status($unread, $msg_id, $user_id, $folder_id)
|
||||
SET pm_unread = 0
|
||||
WHERE msg_id = $msg_id
|
||||
AND user_id = $user_id
|
||||
AND folder_id = $folder_id";
|
||||
AND folder_id = $folder_id
|
||||
AND pm_unread = 1";
|
||||
$db->sql_query($sql);
|
||||
|
||||
// If the message is already marked as read, we just skip the rest to avoid negative PM count
|
||||
if (!$db->sql_affectedrows())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$sql = 'UPDATE ' . USERS_TABLE . "
|
||||
SET user_unread_privmsg = user_unread_privmsg - 1
|
||||
WHERE user_id = $user_id";
|
||||
@@ -965,6 +973,7 @@ function handle_mark_actions($user_id, $mark_action)
|
||||
|
||||
if (!$auth->acl_get('u_pm_delete'))
|
||||
{
|
||||
send_status_line(403, 'Forbidden');
|
||||
trigger_error('NO_AUTH_DELETE_MESSAGE');
|
||||
}
|
||||
|
||||
|
@@ -119,19 +119,29 @@ function user_update_name($old_name, $new_name)
|
||||
global $config, $db, $cache, $phpbb_dispatcher;
|
||||
|
||||
$update_ary = array(
|
||||
FORUMS_TABLE => array('forum_last_poster_name'),
|
||||
MODERATOR_CACHE_TABLE => array('username'),
|
||||
POSTS_TABLE => array('post_username'),
|
||||
TOPICS_TABLE => array('topic_first_poster_name', 'topic_last_poster_name'),
|
||||
FORUMS_TABLE => array(
|
||||
'forum_last_poster_id' => 'forum_last_poster_name',
|
||||
),
|
||||
MODERATOR_CACHE_TABLE => array(
|
||||
'user_id' => 'username',
|
||||
),
|
||||
POSTS_TABLE => array(
|
||||
'poster_id' => 'post_username',
|
||||
),
|
||||
TOPICS_TABLE => array(
|
||||
'topic_poster' => 'topic_first_poster_name',
|
||||
'topic_last_poster_id' => 'topic_last_poster_name',
|
||||
),
|
||||
);
|
||||
|
||||
foreach ($update_ary as $table => $field_ary)
|
||||
{
|
||||
foreach ($field_ary as $field)
|
||||
foreach ($field_ary as $id_field => $name_field)
|
||||
{
|
||||
$sql = "UPDATE $table
|
||||
SET $field = '" . $db->sql_escape($new_name) . "'
|
||||
WHERE $field = '" . $db->sql_escape($old_name) . "'";
|
||||
SET $name_field = '" . $db->sql_escape($new_name) . "'
|
||||
WHERE $name_field = '" . $db->sql_escape($old_name) . "'
|
||||
AND $id_field <> " . ANONYMOUS;
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
}
|
||||
@@ -2194,7 +2204,7 @@ function phpbb_avatar_explanation_string()
|
||||
{
|
||||
global $config, $user;
|
||||
|
||||
return $user->lang('AVATAR_EXPLAIN',
|
||||
return $user->lang(($config['avatar_filesize'] == 0) ? 'AVATAR_EXPLAIN_NO_FILESIZE' : 'AVATAR_EXPLAIN',
|
||||
$user->lang('PIXELS', (int) $config['avatar_max_width']),
|
||||
$user->lang('PIXELS', (int) $config['avatar_max_height']),
|
||||
round($config['avatar_filesize'] / 1024));
|
||||
@@ -3010,7 +3020,7 @@ function remove_default_rank($group_id, $user_ids)
|
||||
*/
|
||||
function group_user_attributes($action, $group_id, $user_id_ary = false, $username_ary = false, $group_name = false, $group_attributes = false)
|
||||
{
|
||||
global $db, $auth, $user, $phpbb_container, $phpbb_log;
|
||||
global $db, $auth, $user, $phpbb_container, $phpbb_log, $phpbb_dispatcher;
|
||||
|
||||
// We need both username and user_id info
|
||||
$result = user_get_id_name($user_id_ary, $username_ary);
|
||||
@@ -3142,6 +3152,28 @@ function group_user_attributes($action, $group_id, $user_id_ary = false, $userna
|
||||
break;
|
||||
}
|
||||
|
||||
/**
|
||||
* Event to perform additional actions on setting user group attributes
|
||||
*
|
||||
* @event core.user_set_group_attributes
|
||||
* @var int group_id ID of the group
|
||||
* @var string group_name Name of the group
|
||||
* @var array user_id_ary IDs of the users to set group attributes
|
||||
* @var array username_ary Names of the users to set group attributes
|
||||
* @var array group_attributes Group attributes which were changed
|
||||
* @var string action Action to perform over the group members
|
||||
* @since 3.1.10-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'group_id',
|
||||
'group_name',
|
||||
'user_id_ary',
|
||||
'username_ary',
|
||||
'group_attributes',
|
||||
'action',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.user_set_group_attributes', compact($vars)));
|
||||
|
||||
// Clear permissions cache of relevant users
|
||||
$auth->acl_clear_prefetch($user_id_ary);
|
||||
|
||||
|
@@ -274,7 +274,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
|
||||
'TOPIC_ICON_IMG_WIDTH' => (!empty($icons[$row_ary['icon_id']])) ? $icons[$row_ary['icon_id']]['width'] : '',
|
||||
'TOPIC_ICON_IMG_HEIGHT' => (!empty($icons[$row_ary['icon_id']])) ? $icons[$row_ary['icon_id']]['height'] : '',
|
||||
'UNAPPROVED_IMG' => ($topic_unapproved || $posts_unapproved) ? $user->img('icon_topic_unapproved', ($topic_unapproved) ? 'TOPIC_UNAPPROVED' : 'POSTS_UNAPPROVED') : '',
|
||||
'DELETED_IMG' => ($topic_deleted) ? $user->img('icon_topic_deleted', 'POSTS_DELETED') : '',
|
||||
'DELETED_IMG' => ($topic_deleted) ? $user->img('icon_topic_deleted', 'TOPIC_DELETED') : '',
|
||||
|
||||
'TOPIC_AUTHOR' => get_username_string('username', $row_ary['topic_poster'], $row_ary['topic_first_poster_name'], $row_ary['topic_first_poster_colour']),
|
||||
'TOPIC_AUTHOR_COLOUR' => get_username_string('colour', $row_ary['topic_poster'], $row_ary['topic_first_poster_name'], $row_ary['topic_first_poster_colour']),
|
||||
@@ -404,7 +404,7 @@ function mcp_resync_topics($topic_ids)
|
||||
*/
|
||||
function merge_topics($forum_id, $topic_ids, $to_topic_id)
|
||||
{
|
||||
global $db, $template, $user, $phpEx, $phpbb_root_path, $phpbb_log, $request;
|
||||
global $db, $template, $user, $phpEx, $phpbb_root_path, $phpbb_log, $request, $phpbb_dispatcher;
|
||||
|
||||
if (!sizeof($topic_ids))
|
||||
{
|
||||
@@ -419,21 +419,23 @@ function merge_topics($forum_id, $topic_ids, $to_topic_id)
|
||||
|
||||
$sync_topics = array_merge($topic_ids, array($to_topic_id));
|
||||
|
||||
$topic_data = phpbb_get_topic_data($sync_topics, 'm_merge');
|
||||
$all_topic_data = phpbb_get_topic_data($sync_topics, 'm_merge');
|
||||
|
||||
if (!sizeof($topic_data) || empty($topic_data[$to_topic_id]))
|
||||
if (!sizeof($all_topic_data) || empty($all_topic_data[$to_topic_id]))
|
||||
{
|
||||
$template->assign_var('MESSAGE', $user->lang['NO_FINAL_TOPIC_SELECTED']);
|
||||
return;
|
||||
}
|
||||
|
||||
$sync_forums = array();
|
||||
foreach ($topic_data as $data)
|
||||
$topic_views = 0;
|
||||
foreach ($all_topic_data as $data)
|
||||
{
|
||||
$sync_forums[$data['forum_id']] = $data['forum_id'];
|
||||
$topic_views = max($topic_views, $data['topic_views']);
|
||||
}
|
||||
|
||||
$topic_data = $topic_data[$to_topic_id];
|
||||
$to_topic_data = $all_topic_data[$to_topic_id];
|
||||
|
||||
$post_id_list = $request->variable('post_id_list', array(0));
|
||||
$start = $request->variable('start', 0);
|
||||
@@ -481,16 +483,22 @@ function merge_topics($forum_id, $topic_ids, $to_topic_id)
|
||||
|
||||
if (confirm_box(true))
|
||||
{
|
||||
$to_forum_id = $topic_data['forum_id'];
|
||||
$to_forum_id = $to_topic_data['forum_id'];
|
||||
|
||||
move_posts($post_id_list, $to_topic_id, false);
|
||||
|
||||
$phpbb_log->add('mod', $user->data['user_id'], $user->ip, 'LOG_MERGE', false, array(
|
||||
'forum_id' => $to_forum_id,
|
||||
'topic_id' => $to_topic_id,
|
||||
$topic_data['topic_title']
|
||||
$to_topic_data['topic_title']
|
||||
));
|
||||
|
||||
// Update topic views count
|
||||
$sql = 'UPDATE ' . TOPICS_TABLE . '
|
||||
SET topic_views = ' . $topic_views . '
|
||||
WHERE topic_id = ' . $to_topic_id;
|
||||
$db->sql_query($sql);
|
||||
|
||||
// Message and return links
|
||||
$success_msg = 'POSTS_MERGED_SUCCESS';
|
||||
|
||||
@@ -516,6 +524,20 @@ function merge_topics($forum_id, $topic_ids, $to_topic_id)
|
||||
$redirect = $request->variable('redirect', "{$phpbb_root_path}viewtopic.$phpEx?f=$to_forum_id&t=$to_topic_id");
|
||||
$redirect = reapply_sid($redirect);
|
||||
|
||||
/**
|
||||
* Perform additional actions after merging topics.
|
||||
*
|
||||
* @event core.mcp_forum_merge_topics_after
|
||||
* @var array all_topic_data The data from all topics involved in the merge
|
||||
* @var int to_topic_id The ID of the topic into which the rest are merged
|
||||
* @since 3.1.11-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'all_topic_data',
|
||||
'to_topic_id',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.mcp_forum_merge_topics_after', compact($vars)));
|
||||
|
||||
meta_refresh(3, $redirect);
|
||||
trigger_error($user->lang[$success_msg] . '<br /><br />' . $return_link);
|
||||
}
|
||||
|
@@ -83,6 +83,7 @@ class mcp_logs
|
||||
|
||||
if (!in_array($forum_id, $forum_list))
|
||||
{
|
||||
send_status_line(403, 'Forbidden');
|
||||
trigger_error('NOT_AUTHORISED');
|
||||
}
|
||||
|
||||
@@ -101,6 +102,7 @@ class mcp_logs
|
||||
|
||||
if (!in_array($forum_id, $forum_list))
|
||||
{
|
||||
send_status_line(403, 'Forbidden');
|
||||
trigger_error('NOT_AUTHORISED');
|
||||
}
|
||||
|
||||
|
@@ -907,11 +907,12 @@ function mcp_delete_topic($topic_ids, $is_soft = false, $soft_delete_reason = ''
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_SHADOW_TOPICS' => $only_shadow,
|
||||
'S_SOFTDELETED' => $only_softdeleted,
|
||||
'S_TOPIC_MODE' => true,
|
||||
'S_ALLOWED_DELETE' => $auth->acl_get('m_delete', $forum_id),
|
||||
'S_ALLOWED_SOFTDELETE' => $auth->acl_get('m_softdelete', $forum_id),
|
||||
'S_SHADOW_TOPICS' => $only_shadow,
|
||||
'S_SOFTDELETED' => $only_softdeleted,
|
||||
'S_TOPIC_MODE' => true,
|
||||
'S_ALLOWED_DELETE' => $auth->acl_get('m_delete', $forum_id),
|
||||
'S_ALLOWED_SOFTDELETE' => $auth->acl_get('m_softdelete', $forum_id),
|
||||
'DELETE_TOPIC_PERMANENTLY_EXPLAIN' => $user->lang('DELETE_TOPIC_PERMANENTLY', sizeof($topic_ids)),
|
||||
));
|
||||
|
||||
$l_confirm = (sizeof($topic_ids) == 1) ? 'DELETE_TOPIC' : 'DELETE_TOPICS';
|
||||
@@ -1012,6 +1013,7 @@ function mcp_delete_post($post_ids, $is_soft = false, $soft_delete_reason = '',
|
||||
$approve_log[] = array(
|
||||
'forum_id' => $post_data['forum_id'],
|
||||
'topic_id' => $post_data['topic_id'],
|
||||
'post_id' => $post_id,
|
||||
'post_subject' => $post_data['post_subject'],
|
||||
'poster_id' => $post_data['poster_id'],
|
||||
'post_username' => $post_data['post_username'],
|
||||
@@ -1161,9 +1163,10 @@ function mcp_delete_post($post_ids, $is_soft = false, $soft_delete_reason = '',
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_SOFTDELETED' => $only_softdeleted,
|
||||
'S_ALLOWED_DELETE' => $auth->acl_get('m_delete', $forum_id),
|
||||
'S_ALLOWED_SOFTDELETE' => $auth->acl_get('m_softdelete', $forum_id),
|
||||
'S_SOFTDELETED' => $only_softdeleted,
|
||||
'S_ALLOWED_DELETE' => $auth->acl_get('m_delete', $forum_id),
|
||||
'S_ALLOWED_SOFTDELETE' => $auth->acl_get('m_softdelete', $forum_id),
|
||||
'DELETE_POST_PERMANENTLY_EXPLAIN' => $user->lang('DELETE_POST_PERMANENTLY', sizeof($post_ids)),
|
||||
));
|
||||
|
||||
$l_confirm = (sizeof($post_ids) == 1) ? 'DELETE_POST' : 'DELETE_POSTS';
|
||||
|
@@ -104,7 +104,7 @@ class mcp_queue
|
||||
|
||||
if (!empty($topic_id_list) && $mode == 'deleted_topics')
|
||||
{
|
||||
if (!function_exists('mcp_delete_topics'))
|
||||
if (!function_exists('mcp_delete_topic'))
|
||||
{
|
||||
global $phpbb_root_path, $phpEx;
|
||||
include($phpbb_root_path . 'includes/mcp/mcp_main.' . $phpEx);
|
||||
@@ -622,6 +622,7 @@ class mcp_queue
|
||||
|
||||
if (!phpbb_check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_approve')))
|
||||
{
|
||||
send_status_line(403, 'Forbidden');
|
||||
trigger_error('NOT_AUTHORISED');
|
||||
}
|
||||
|
||||
@@ -877,6 +878,7 @@ class mcp_queue
|
||||
|
||||
if (!phpbb_check_ids($topic_id_list, TOPICS_TABLE, 'topic_id', array('m_approve')))
|
||||
{
|
||||
send_status_line(403, 'Forbidden');
|
||||
trigger_error('NOT_AUTHORISED');
|
||||
}
|
||||
|
||||
@@ -1074,6 +1076,7 @@ class mcp_queue
|
||||
|
||||
if (!phpbb_check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_approve')))
|
||||
{
|
||||
send_status_line(403, 'Forbidden');
|
||||
trigger_error('NOT_AUTHORISED');
|
||||
}
|
||||
|
||||
|
@@ -542,6 +542,7 @@ function close_report($report_id_list, $mode, $action, $pm = false)
|
||||
{
|
||||
if (!$auth->acl_getf_global('m_report'))
|
||||
{
|
||||
send_status_line(403, 'Forbidden');
|
||||
trigger_error('NOT_AUTHORISED');
|
||||
}
|
||||
}
|
||||
@@ -549,6 +550,7 @@ function close_report($report_id_list, $mode, $action, $pm = false)
|
||||
{
|
||||
if (!phpbb_check_ids($post_id_list, POSTS_TABLE, 'post_id', array('m_report')))
|
||||
{
|
||||
send_status_line(403, 'Forbidden');
|
||||
trigger_error('NOT_AUTHORISED');
|
||||
}
|
||||
}
|
||||
|
@@ -1470,7 +1470,6 @@ class parse_message extends bbcode_firstpass
|
||||
// For now setting the ttl to 10 minutes
|
||||
switch ($db->get_sql_layer())
|
||||
{
|
||||
case 'mssql':
|
||||
case 'mssql_odbc':
|
||||
case 'mssqlnative':
|
||||
$sql = 'SELECT *
|
||||
@@ -1861,7 +1860,7 @@ class parse_message extends bbcode_firstpass
|
||||
// Parse Poll Option text
|
||||
$tmp_message = $this->message;
|
||||
|
||||
$poll['poll_options'] = explode("\n", trim($poll['poll_option_text']));
|
||||
$poll['poll_options'] = preg_split('/\s*?\n\s*/', trim($poll['poll_option_text']));
|
||||
$poll['poll_options_size'] = sizeof($poll['poll_options']);
|
||||
|
||||
foreach ($poll['poll_options'] as &$poll_option)
|
||||
|
@@ -46,9 +46,9 @@ class phpbb_questionnaire_data_collector
|
||||
$this->providers = array();
|
||||
}
|
||||
|
||||
function add_data_provider(&$provider)
|
||||
function add_data_provider($provider)
|
||||
{
|
||||
$this->providers[] = &$provider;
|
||||
$this->providers[] = $provider;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -80,7 +80,7 @@ class phpbb_questionnaire_data_collector
|
||||
{
|
||||
foreach (array_keys($this->providers) as $key)
|
||||
{
|
||||
$provider = &$this->providers[$key];
|
||||
$provider = $this->providers[$key];
|
||||
$this->data[$provider->get_identifier()] = $provider->get_data();
|
||||
}
|
||||
$this->data['install_id'] = $this->install_id;
|
||||
@@ -190,7 +190,6 @@ class phpbb_questionnaire_system_data_provider
|
||||
// - 192.168.0.0/16
|
||||
if ($ip_address_ary[0] == '10' ||
|
||||
($ip_address_ary[0] == '172' && intval($ip_address_ary[1]) > 15 && intval($ip_address_ary[1]) < 32) ||
|
||||
($ip_address_ary[0] == '192' && $ip_address_ary[1] == '168') ||
|
||||
($ip_address_ary[0] == '192' && $ip_address_ary[1] == '168'))
|
||||
{
|
||||
return true;
|
||||
|
@@ -67,6 +67,7 @@ class ucp_activate
|
||||
{
|
||||
login_box('', $user->lang['NO_AUTH_OPERATION']);
|
||||
}
|
||||
send_status_line(403, 'Forbidden');
|
||||
trigger_error('NO_AUTH_OPERATION');
|
||||
}
|
||||
|
||||
|
@@ -87,6 +87,7 @@ class ucp_groups
|
||||
|
||||
if (!$auth->acl_get('u_chggrp'))
|
||||
{
|
||||
send_status_line(403, 'Forbidden');
|
||||
trigger_error($user->lang['NOT_AUTHORISED'] . $return_page);
|
||||
}
|
||||
|
||||
|
@@ -35,7 +35,7 @@ class ucp_main
|
||||
|
||||
function main($id, $mode)
|
||||
{
|
||||
global $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx;
|
||||
global $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx, $phpbb_dispatcher;
|
||||
global $request;
|
||||
|
||||
switch ($mode)
|
||||
@@ -215,6 +215,14 @@ class ucp_main
|
||||
|
||||
$unwatch = (isset($_POST['unwatch'])) ? true : false;
|
||||
|
||||
/**
|
||||
* Read and potentially modify the post data used to remove subscriptions to forums/topics
|
||||
*
|
||||
* @event core.ucp_main_subscribed_post_data
|
||||
* @since 3.1.10-RC1
|
||||
*/
|
||||
$phpbb_dispatcher->dispatch('core.ucp_main_subscribed_post_data');
|
||||
|
||||
if ($unwatch)
|
||||
{
|
||||
if (check_form_key('ucp_front_subscribed'))
|
||||
@@ -299,6 +307,20 @@ class ucp_main
|
||||
$tracking_topics = ($tracking_topics) ? tracking_unserialize($tracking_topics) : array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Modify the query used to retrieve a list of subscribed forums
|
||||
*
|
||||
* @event core.ucp_main_subscribed_forums_modify_query
|
||||
* @var array sql_array The subscribed forums query
|
||||
* @var array forbidden_forums The list of forbidden forums
|
||||
* @since 3.1.10-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'sql_array',
|
||||
'forbidden_forums',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.ucp_main_subscribed_forums_modify_query', compact($vars)));
|
||||
|
||||
$sql = $db->sql_build_query('SELECT', $sql_array);
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
@@ -340,7 +362,7 @@ class ucp_main
|
||||
$last_post_time = $last_post_url = '';
|
||||
}
|
||||
|
||||
$template->assign_block_vars('forumrow', array(
|
||||
$template_vars = array(
|
||||
'FORUM_ID' => $forum_id,
|
||||
'FORUM_IMG_STYLE' => $folder_image,
|
||||
'FORUM_FOLDER_IMG' => $user->img($folder_image, $folder_alt),
|
||||
@@ -359,8 +381,36 @@ class ucp_main
|
||||
'S_UNREAD_FORUM' => $unread_forum,
|
||||
|
||||
'U_LAST_POST' => $last_post_url,
|
||||
'U_VIEWFORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id']))
|
||||
'U_VIEWFORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $row['forum_id'])
|
||||
);
|
||||
|
||||
/**
|
||||
* Add template variables to a subscribed forum row.
|
||||
*
|
||||
* @event core.ucp_main_subscribed_forum_modify_template_vars
|
||||
* @var array template_vars Array containing the template variables for the row
|
||||
* @var array row Array containing the subscribed forum row data
|
||||
* @var int forum_id Forum ID
|
||||
* @var string folder_image Folder image
|
||||
* @var string folder_alt Alt text for the folder image
|
||||
* @var bool unread_forum Whether the forum has unread content or not
|
||||
* @var string last_post_time The time of the most recent post, expressed as a formatted date string
|
||||
* @var string last_post_url The URL of the most recent post in the forum
|
||||
* @since 3.1.10-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'template_vars',
|
||||
'row',
|
||||
'forum_id',
|
||||
'folder_image',
|
||||
'folder_alt',
|
||||
'unread_forum',
|
||||
'last_post_time',
|
||||
'last_post_url',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.ucp_main_subscribed_forum_modify_template_vars', compact($vars)));
|
||||
|
||||
$template->assign_block_vars('forumrow', $template_vars);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
@@ -642,7 +692,7 @@ class ucp_main
|
||||
*/
|
||||
function assign_topiclist($mode = 'subscribed', $forbidden_forum_ary = array())
|
||||
{
|
||||
global $user, $db, $template, $config, $cache, $auth, $phpbb_root_path, $phpEx, $phpbb_container, $request;
|
||||
global $user, $db, $template, $config, $cache, $auth, $phpbb_root_path, $phpEx, $phpbb_container, $request, $phpbb_dispatcher;
|
||||
|
||||
/* @var $pagination \phpbb\pagination */
|
||||
$pagination = $phpbb_container->get('pagination');
|
||||
@@ -664,6 +714,23 @@ class ucp_main
|
||||
AND i.user_id = ' . $user->data['user_id'] . '
|
||||
AND ' . $db->sql_in_set('t.forum_id', $forbidden_forum_ary, true, true),
|
||||
);
|
||||
|
||||
/**
|
||||
* Modify the query used to retrieve the count of subscribed/bookmarked topics
|
||||
*
|
||||
* @event core.ucp_main_topiclist_count_modify_query
|
||||
* @var array sql_array The subscribed/bookmarked topics query
|
||||
* @var array forbidden_forum_ary The list of forbidden forums
|
||||
* @var string mode The type of topic list ('subscribed' or 'bookmarks')
|
||||
* @since 3.1.10-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'sql_array',
|
||||
'forbidden_forum_ary',
|
||||
'mode',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.ucp_main_topiclist_count_modify_query', compact($vars)));
|
||||
|
||||
$sql = $db->sql_build_query('SELECT', $sql_array);
|
||||
$result = $db->sql_query($sql);
|
||||
$topics_count = (int) $db->sql_fetchfield('topics_count');
|
||||
@@ -732,6 +799,22 @@ class ucp_main
|
||||
$sql_array['SELECT'] .= ', tp.topic_posted';
|
||||
}
|
||||
|
||||
/**
|
||||
* Modify the query used to retrieve the list of subscribed/bookmarked topics
|
||||
*
|
||||
* @event core.ucp_main_topiclist_modify_query
|
||||
* @var array sql_array The subscribed/bookmarked topics query
|
||||
* @var array forbidden_forum_ary The list of forbidden forums
|
||||
* @var string mode The type of topic list ('subscribed' or 'bookmarks')
|
||||
* @since 3.1.10-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'sql_array',
|
||||
'forbidden_forum_ary',
|
||||
'mode',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.ucp_main_topiclist_modify_query', compact($vars)));
|
||||
|
||||
$sql = $db->sql_build_query('SELECT', $sql_array);
|
||||
$result = $db->sql_query_limit($sql, $config['topics_per_page'], $start);
|
||||
|
||||
@@ -797,7 +880,7 @@ class ucp_main
|
||||
$view_topic_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params);
|
||||
|
||||
// Send vars to template
|
||||
$template->assign_block_vars('topicrow', array(
|
||||
$template_vars = array(
|
||||
'FORUM_ID' => $forum_id,
|
||||
'TOPIC_ID' => $topic_id,
|
||||
'FIRST_POST_TIME' => $user->format_date($row['topic_time']),
|
||||
@@ -839,7 +922,41 @@ class ucp_main
|
||||
'U_LAST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", $view_topic_url_params . '&p=' . $row['topic_last_post_id']) . '#p' . $row['topic_last_post_id'],
|
||||
'U_VIEW_TOPIC' => $view_topic_url,
|
||||
'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id),
|
||||
));
|
||||
);
|
||||
|
||||
/**
|
||||
* Add template variables to a subscribed/bookmarked topic row.
|
||||
*
|
||||
* @event core.ucp_main_topiclist_topic_modify_template_vars
|
||||
* @var array template_vars Array containing the template variables for the row
|
||||
* @var array row Array containing the subscribed/bookmarked topic row data
|
||||
* @var int forum_id ID of the forum containing the topic
|
||||
* @var int topic_id Topic ID
|
||||
* @var int replies Number of replies in the topic
|
||||
* @var string topic_type Topic type
|
||||
* @var string folder_img Folder image
|
||||
* @var string folder_alt Alt text for the folder image
|
||||
* @var array icons Array containing topic icons
|
||||
* @var bool unread_topic Whether the topic has unread content or not
|
||||
* @var string view_topic_url The URL of the topic
|
||||
* @since 3.1.10-RC1
|
||||
*/
|
||||
$vars = array(
|
||||
'template_vars',
|
||||
'row',
|
||||
'forum_id',
|
||||
'topic_id',
|
||||
'replies',
|
||||
'topic_type',
|
||||
'folder_img',
|
||||
'folder_alt',
|
||||
'icons',
|
||||
'unread_topic',
|
||||
'view_topic_url',
|
||||
);
|
||||
extract($phpbb_dispatcher->trigger_event('core.ucp_main_topiclist_topic_modify_template_vars', compact($vars)));
|
||||
|
||||
$template->assign_block_vars('topicrow', $template_vars);
|
||||
|
||||
$pagination->generate_template_pagination(append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . "&t=$topic_id"), 'topicrow.pagination', 'start', $replies + 1, $config['posts_per_page'], 1, true, true);
|
||||
}
|
||||
|
@@ -166,6 +166,7 @@ class ucp_pm
|
||||
|
||||
if (!$auth->acl_get('u_readpm'))
|
||||
{
|
||||
send_status_line(403, 'Forbidden');
|
||||
trigger_error('NO_AUTH_READ_MESSAGE');
|
||||
}
|
||||
|
||||
|
@@ -171,6 +171,7 @@ function compose_pm($id, $mode, $action, $user_folders = array())
|
||||
case 'post':
|
||||
if (!$auth->acl_get('u_sendpm'))
|
||||
{
|
||||
send_status_line(403, 'Forbidden');
|
||||
trigger_error('NO_AUTH_SEND_MESSAGE');
|
||||
}
|
||||
break;
|
||||
@@ -186,6 +187,7 @@ function compose_pm($id, $mode, $action, $user_folders = array())
|
||||
|
||||
if (!$auth->acl_get('u_sendpm'))
|
||||
{
|
||||
send_status_line(403, 'Forbidden');
|
||||
trigger_error('NO_AUTH_SEND_MESSAGE');
|
||||
}
|
||||
|
||||
@@ -226,6 +228,7 @@ function compose_pm($id, $mode, $action, $user_folders = array())
|
||||
case 'delete':
|
||||
if (!$auth->acl_get('u_pm_delete'))
|
||||
{
|
||||
send_status_line(403, 'Forbidden');
|
||||
trigger_error('NO_AUTH_DELETE_MESSAGE');
|
||||
}
|
||||
|
||||
@@ -251,11 +254,13 @@ function compose_pm($id, $mode, $action, $user_folders = array())
|
||||
|
||||
if ($action == 'forward' && (!$config['forward_pm'] || !$auth->acl_get('u_pm_forward')))
|
||||
{
|
||||
send_status_line(403, 'Forbidden');
|
||||
trigger_error('NO_AUTH_FORWARD_MESSAGE');
|
||||
}
|
||||
|
||||
if ($action == 'edit' && !$auth->acl_get('u_pm_edit'))
|
||||
{
|
||||
send_status_line(403, 'Forbidden');
|
||||
trigger_error('NO_AUTH_EDIT_MESSAGE');
|
||||
}
|
||||
|
||||
@@ -321,6 +326,7 @@ function compose_pm($id, $mode, $action, $user_folders = array())
|
||||
{
|
||||
if (($post['forum_id'] && !$auth->acl_get('f_read', $post['forum_id'])) || (!$post['forum_id'] && !$auth->acl_getf_global('f_read')))
|
||||
{
|
||||
send_status_line(403, 'Forbidden');
|
||||
trigger_error('NOT_AUTHORISED');
|
||||
}
|
||||
|
||||
@@ -456,6 +462,7 @@ function compose_pm($id, $mode, $action, $user_folders = array())
|
||||
|
||||
if (($to_group_id || isset($address_list['g'])) && (!$config['allow_mass_pm'] || !$auth->acl_get('u_masspm_group')))
|
||||
{
|
||||
send_status_line(403, 'Forbidden');
|
||||
trigger_error('NO_AUTH_GROUP_MESSAGE');
|
||||
}
|
||||
|
||||
|
@@ -41,6 +41,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
|
||||
$message = $user->lang['NO_AUTH_READ_REMOVED_MESSAGE'];
|
||||
|
||||
$message .= '<br /><br />' . sprintf($user->lang['RETURN_FOLDER'], '<a href="' . $meta_info . '">', '</a>');
|
||||
send_status_line(403, 'Forbidden');
|
||||
trigger_error($message);
|
||||
}
|
||||
|
||||
|
@@ -279,6 +279,7 @@ class ucp_profile
|
||||
// Do not display profile information panel if not authed to do so
|
||||
if (!$auth->acl_get('u_chgprofileinfo'))
|
||||
{
|
||||
send_status_line(403, 'Forbidden');
|
||||
trigger_error('NO_AUTH_PROFILEINFO');
|
||||
}
|
||||
|
||||
@@ -464,6 +465,7 @@ class ucp_profile
|
||||
|
||||
if (!$auth->acl_get('u_sig'))
|
||||
{
|
||||
send_status_line(403, 'Forbidden');
|
||||
trigger_error('NO_AUTH_SIGNATURE');
|
||||
}
|
||||
|
||||
@@ -558,6 +560,16 @@ class ucp_profile
|
||||
'user_sig_bbcode_bitfield' => $bbcode_bitfield
|
||||
);
|
||||
|
||||
/**
|
||||
* Modify user registration data before submitting it to the database
|
||||
*
|
||||
* @event core.ucp_profile_modify_signature_sql_ary
|
||||
* @var array sql_ary Array with user signature data to submit to the database
|
||||
* @since 3.1.10-RC1
|
||||
*/
|
||||
$vars = array('sql_ary');
|
||||
extract($phpbb_dispatcher->trigger_event('core.ucp_profile_modify_signature_sql_ary', compact($vars)));
|
||||
|
||||
$sql = 'UPDATE ' . USERS_TABLE . '
|
||||
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
|
||||
WHERE user_id = ' . $user->data['user_id'];
|
||||
|
@@ -79,6 +79,7 @@ class ucp_remind
|
||||
|
||||
if (!$auth2->acl_get('u_chgpasswd'))
|
||||
{
|
||||
send_status_line(403, 'Forbidden');
|
||||
trigger_error('NO_AUTH_PASSWORD_REMINDER');
|
||||
}
|
||||
|
||||
|
@@ -188,8 +188,8 @@ if ($config['load_birthdays'] && $config['allow_birthdays'] && $auth->acl_gets('
|
||||
* Event to modify the birthdays list
|
||||
*
|
||||
* @event core.index_modify_birthdays_list
|
||||
* @var array birthdays Array with the users birhtdays data
|
||||
* @var array rows Array with the birhtdays SQL query result
|
||||
* @var array birthdays Array with the users birthdays data
|
||||
* @var array rows Array with the birthdays SQL query result
|
||||
* @since 3.1.7-RC1
|
||||
*/
|
||||
$vars = array('birthdays', 'rows');
|
||||
|
@@ -410,7 +410,6 @@ class convertor
|
||||
|
||||
switch ($this->db->get_sql_layer())
|
||||
{
|
||||
case 'sqlite':
|
||||
case 'sqlite3':
|
||||
$this->db->sql_query('DELETE FROM ' . $this->session_keys_table);
|
||||
$this->db->sql_query('DELETE FROM ' . $this->session_table);
|
||||
|
@@ -144,7 +144,6 @@ class convertor
|
||||
$convert->mysql_convert = false;
|
||||
switch ($src_db->sql_layer)
|
||||
{
|
||||
case 'sqlite':
|
||||
case 'sqlite3':
|
||||
$convert->src_truncate_statement = 'DELETE FROM ';
|
||||
break;
|
||||
@@ -176,7 +175,6 @@ class convertor
|
||||
|
||||
switch ($db->get_sql_layer())
|
||||
{
|
||||
case 'sqlite':
|
||||
case 'sqlite3':
|
||||
$convert->truncate_statement = 'DELETE FROM ';
|
||||
break;
|
||||
@@ -717,7 +715,6 @@ class convertor
|
||||
{
|
||||
switch ($db->get_sql_layer())
|
||||
{
|
||||
case 'mssql':
|
||||
case 'mssql_odbc':
|
||||
case 'mssqlnative':
|
||||
$db->sql_query('SET IDENTITY_INSERT ' . $schema['target'] . ' ON');
|
||||
@@ -845,7 +842,6 @@ class convertor
|
||||
{
|
||||
switch ($db->get_sql_layer())
|
||||
{
|
||||
case 'mssql':
|
||||
case 'mssql_odbc':
|
||||
case 'mssqlnative':
|
||||
$db->sql_query('SET IDENTITY_INSERT ' . $schema['target'] . ' OFF');
|
||||
|
@@ -38,7 +38,7 @@ $dbms = $phpbb_config_php_file->convert_30_dbms_to_31($dbms);
|
||||
$convertor_data = array(
|
||||
'forum_name' => 'phpBB 2.0.x',
|
||||
'version' => '1.0.3',
|
||||
'phpbb_version' => '3.2.0-RC1',
|
||||
'phpbb_version' => '3.2.0-RC2',
|
||||
'author' => '<a href="https://www.phpbb.com/">phpBB Limited</a>',
|
||||
'dbms' => $dbms,
|
||||
'dbhost' => $dbhost,
|
||||
|
@@ -94,7 +94,6 @@ function phpbb_insert_forums()
|
||||
|
||||
switch ($db->get_sql_layer())
|
||||
{
|
||||
case 'mssql':
|
||||
case 'mssql_odbc':
|
||||
case 'mssqlnative':
|
||||
$db->sql_query('SET IDENTITY_INSERT ' . FORUMS_TABLE . ' ON');
|
||||
@@ -294,7 +293,6 @@ function phpbb_insert_forums()
|
||||
$db->sql_query("SELECT SETVAL('" . FORUMS_TABLE . "_seq',(select case when max(forum_id)>0 then max(forum_id)+1 else 1 end from " . FORUMS_TABLE . '));');
|
||||
break;
|
||||
|
||||
case 'mssql':
|
||||
case 'mssql_odbc':
|
||||
case 'mssqlnative':
|
||||
$db->sql_query('SET IDENTITY_INSERT ' . FORUMS_TABLE . ' OFF');
|
||||
@@ -1780,7 +1778,6 @@ function phpbb_create_userconv_table()
|
||||
$map_dbms = 'mysql_41';
|
||||
break;
|
||||
|
||||
case 'mssql':
|
||||
case 'mssql_odbc':
|
||||
case 'mssqlnative':
|
||||
$map_dbms = 'mssql';
|
||||
@@ -1830,7 +1827,6 @@ function phpbb_create_userconv_table()
|
||||
)';
|
||||
break;
|
||||
|
||||
case 'sqlite':
|
||||
case 'sqlite3':
|
||||
$create_sql = 'CREATE TABLE ' . USERCONV_TABLE . ' (
|
||||
user_id INTEGER NOT NULL DEFAULT \'0\',
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user