mirror of
https://github.com/flarum/core.git
synced 2025-08-23 00:23:25 +02:00
Compare commits
655 Commits
as/code-mo
...
1.x
Author | SHA1 | Date | |
---|---|---|---|
|
dcbba5fccc | ||
|
a7144274ed | ||
|
a5728eaa5c | ||
|
ea6e1a07aa | ||
|
a05aaea3ee | ||
|
1b888e02dd | ||
|
f54d972ce2 | ||
|
2bc42a0190 | ||
|
2e5a801616 | ||
|
3d6084192d | ||
|
3f977c6c1f | ||
|
9a43105605 | ||
|
991a243c9d | ||
|
45cb384241 | ||
|
b028314ff8 | ||
|
f26c50fc6c | ||
|
be27dab12c | ||
|
553d74d1f3 | ||
|
a94bf44072 | ||
|
ce82834a58 | ||
|
397642ab5a | ||
|
79e17b3bde | ||
|
c6ba2cd0d5 | ||
|
5d6795c353 | ||
|
d61c3cf277 | ||
|
a0b9add2d8 | ||
|
88abe63a8f | ||
|
9d00490591 | ||
|
7c1f55d985 | ||
|
345023242b | ||
|
00329eaee0 | ||
|
6c89f8161e | ||
|
8eb56b16cf | ||
|
634132e06e | ||
|
6de38ff4c9 | ||
|
391a8613cf | ||
|
448f201fa6 | ||
|
0694651fe9 | ||
|
92b2b4aad1 | ||
|
0b55830693 | ||
|
c42f0a5d0e | ||
|
821ca01460 | ||
|
6f48557c3a | ||
|
cc1d2aaade | ||
|
3a45ebc716 | ||
|
5bd7e5dfe3 | ||
|
956ac20c4c | ||
|
b7e41ce82f | ||
|
c737d7b8f5 | ||
|
9295e7b96f | ||
|
9377256409 | ||
|
9c91c89326 | ||
|
8169550f1c | ||
|
d5a1653d24 | ||
|
db605bdbaa | ||
|
1665d47adc | ||
|
1c71ee0968 | ||
|
6846f4232c | ||
|
88f182cc93 | ||
|
ed72aa0128 | ||
|
12d21cdbfc | ||
|
359681f3c6 | ||
|
1a4c4a0275 | ||
|
ea2fd2cade | ||
|
772852b3b3 | ||
|
71717f9ebb | ||
|
449ba48ba3 | ||
|
4d75da36b8 | ||
|
d4fe5f5a7a | ||
|
256c1846b7 | ||
|
1fee96aebe | ||
|
b49b3104e4 | ||
|
7d8cfdfaec | ||
|
845c38d6cb | ||
|
4912a2e059 | ||
|
ca6d826f79 | ||
|
dce2549ff7 | ||
|
306d0bc124 | ||
|
e3d07cb8cc | ||
|
9bc8c7de99 | ||
|
5076da9b38 | ||
|
2c4d64cd20 | ||
|
c9bd7dab1e | ||
|
df14216e1b | ||
|
de36551b45 | ||
|
54fbcdedd5 | ||
|
e9c8890686 | ||
|
6dd0c0e915 | ||
|
444df80caf | ||
|
3ebd218588 | ||
|
9038ff64f8 | ||
|
f8c30c96dc | ||
|
3743bc0886 | ||
|
5855134b79 | ||
|
7f657dac04 | ||
|
84414c6699 | ||
|
bf0d895106 | ||
|
c942f3100d | ||
|
d5882d9357 | ||
|
7540ede897 | ||
|
77d1a3d04b | ||
|
c79d2892de | ||
|
46cdaf5d1a | ||
|
4d59ec4600 | ||
|
e0adf90453 | ||
|
07a1781181 | ||
|
80e70f4980 | ||
|
e43530e40a | ||
|
24e88d12b8 | ||
|
b3366e4c93 | ||
|
8415d2233e | ||
|
a52959ccf2 | ||
|
b2044ff312 | ||
|
50dd73b07c | ||
|
4f4977b7a5 | ||
|
24b7dcb102 | ||
|
25beb7919d | ||
|
207032f6ff | ||
|
8205ae5bf5 | ||
|
ac6f4d4d0c | ||
|
56b2b3b2bc | ||
|
7fb0e08c0a | ||
|
2a693db1b6 | ||
|
7d70328471 | ||
|
45a8b572e3 | ||
|
5d14f96c32 | ||
|
2299541e4d | ||
|
a131132654 | ||
|
7743a2bcd4 | ||
|
62080303bf | ||
|
480093d023 | ||
|
1c421fc266 | ||
|
f07336e204 | ||
|
95061a2ed4 | ||
|
c3fadbf6b1 | ||
|
82e08e3fa5 | ||
|
2c4a2b8d9e | ||
|
00866fbba9 | ||
|
0d1d4d46d1 | ||
|
b1383a955f | ||
|
daeab48ae8 | ||
|
e03ca4406d | ||
|
7894c6a69b | ||
|
102e31754a | ||
|
8538f9c8f6 | ||
|
5a4bb7ccf2 | ||
|
d2a6329689 | ||
|
2bc2899a1d | ||
|
5437bf5c23 | ||
|
717af13bb1 | ||
|
e72541e35d | ||
|
577890d89c | ||
|
253a3d281d | ||
|
d27f952584 | ||
|
e5abffc75b | ||
|
d1059c1cc7 | ||
|
777c304ab7 | ||
|
789246b621 | ||
|
980cfd6c28 | ||
|
65390a4fc0 | ||
|
c7c86a77e9 | ||
|
f1f6051deb | ||
|
bded3da42d | ||
|
231cee1f78 | ||
|
f6c9bbb427 | ||
|
feb968780a | ||
|
5b89d3e91a | ||
|
ba7599e6fe | ||
|
80b34d1164 | ||
|
3accdc322c | ||
|
4247e54c64 | ||
|
ef35faaded | ||
|
715b8c39ae | ||
|
232618aba6 | ||
|
96e1411b7d | ||
|
21b483625e | ||
|
9363682e1c | ||
|
c766881e1f | ||
|
e63e161be6 | ||
|
3264455068 | ||
|
d7fcd8a9e5 | ||
|
b4f3f0558e | ||
|
919c3bb770 | ||
|
7298ccb301 | ||
|
cfdd6910eb | ||
|
7ebeb9c0a5 | ||
|
af3f91ca5b | ||
|
4784307e26 | ||
|
105b22976e | ||
|
fea31a8290 | ||
|
accdfde6e1 | ||
|
7684a1086a | ||
|
f8577c8078 | ||
|
e55844f3db | ||
|
1d20f4d4aa | ||
|
803f0cd0f4 | ||
|
8576df1a43 | ||
|
1792e22639 | ||
|
5e281136f6 | ||
|
b868c3d763 | ||
|
297a2d8c5c | ||
|
c0af41c305 | ||
|
d0669b08aa | ||
|
6b8e9ce1db | ||
|
fbbece4bda | ||
|
13e655aca5 | ||
|
c00e8706e1 | ||
|
1b5da13e8a | ||
|
ecfbcd1c30 | ||
|
818a100625 | ||
|
176b5540d8 | ||
|
2e76a8ecb5 | ||
|
11aa7bbb35 | ||
|
3a26c29935 | ||
|
94e92cf24e | ||
|
aa33cfd1f8 | ||
|
4901c586ce | ||
|
7a6d477550 | ||
|
b89a01c010 | ||
|
8b11fef3ee | ||
|
8a114cd826 | ||
|
62c93b4a05 | ||
|
fab71f2d01 | ||
|
e8c867dcac | ||
|
1247a7f1dd | ||
|
b0aad1a2d6 | ||
|
bddc9d96f2 | ||
|
d684248492 | ||
|
85b63681ae | ||
|
8372363cc2 | ||
|
a6a067ad48 | ||
|
241eba4d0c | ||
|
a6b12826c3 | ||
|
dd868ab44e | ||
|
5f3e0d6a09 | ||
|
661b9d7d9a | ||
|
b7498d6cb1 | ||
|
e7c55532a0 | ||
|
cce6b74fce | ||
|
da651c722b | ||
|
abc9670659 | ||
|
b66fe5dd5f | ||
|
7d79895ae0 | ||
|
3ab4529232 | ||
|
360a2ba1d8 | ||
|
eaa4063fef | ||
|
72d277bd45 | ||
|
28e3ccfde6 | ||
|
3f864bafc8 | ||
|
3af0481f30 | ||
|
1761660c98 | ||
|
8ddb0feb09 | ||
|
fa30f4f250 | ||
|
79a9b23096 | ||
|
33e2bd1a77 | ||
|
a3a39caa44 | ||
|
bbf873442a | ||
|
d35bb873a8 | ||
|
598ff21d7d | ||
|
9342903d68 | ||
|
ea7b270f47 | ||
|
906b0fb633 | ||
|
408a92b4ea | ||
|
0da069ba9f | ||
|
d8fa791d9c | ||
|
fee6ffe396 | ||
|
7a60a529da | ||
|
37fd218723 | ||
|
1ee5cf6ba9 | ||
|
ced1c2d94f | ||
|
f8d856028d | ||
|
748cca6d12 | ||
|
f4f8369dc0 | ||
|
aa0b3288d5 | ||
|
153bb1a53c | ||
|
ee1e04cdc2 | ||
|
77a0b11bc8 | ||
|
7e6458a125 | ||
|
675cdab658 | ||
|
e7fc29a59f | ||
|
08dead81ce | ||
|
47b670aa29 | ||
|
f9a5d485c3 | ||
|
5717a74fcc | ||
|
2e0f026dde | ||
|
bf52743510 | ||
|
da1bf8da21 | ||
|
ccf9442d79 | ||
|
4bb3b2235d | ||
|
03d2d7eabb | ||
|
4d292263b5 | ||
|
6adae00f72 | ||
|
d7f4975330 | ||
|
5fe3cfd837 | ||
|
2d2bf5c504 | ||
|
a4f4ee8e71 | ||
|
4a38047bfb | ||
|
d5e6f6db5f | ||
|
20e7d245da | ||
|
243bc139b0 | ||
|
adf78bbd95 | ||
|
c8d9f1111e | ||
|
e5f05166a0 | ||
|
02556c6ca6 | ||
|
666223fa8c | ||
|
12dfcc5c79 | ||
|
248a71d9b5 | ||
|
a131e87911 | ||
|
be63b28437 | ||
|
132fdea659 | ||
|
fe8480c8f7 | ||
|
1e8a0f930d | ||
|
d7b9a03f31 | ||
|
78189f29d2 | ||
|
07f8b6161a | ||
|
0eff1f6b2d | ||
|
a53a0db2b7 | ||
|
a129999132 | ||
|
8f80cde5b7 | ||
|
4de3cd4d9c | ||
|
3dd2cadb9b | ||
|
605225c851 | ||
|
f33fbdd0b5 | ||
|
5bc47c0278 | ||
|
0e238a9c82 | ||
|
64fa35f2f3 | ||
|
c99d04fce2 | ||
|
67c0d75ebc | ||
|
6f4f964ce8 | ||
|
67dd2c21b6 | ||
|
e5d2b8cad9 | ||
|
f5c346f1c7 | ||
|
5bb0593bad | ||
|
47d2053766 | ||
|
e0b9dcfbcd | ||
|
8a65ad980d | ||
|
9a0668effd | ||
|
224b122303 | ||
|
ed0cee97f5 | ||
|
543c5f2a2e | ||
|
690de9ce0f | ||
|
50253a2eb8 | ||
|
92473c0967 | ||
|
361234205c | ||
|
54798aaa47 | ||
|
fe5d543864 | ||
|
2517bc0f70 | ||
|
b5f324a7b3 | ||
|
8ef0df94b2 | ||
|
c50c924242 | ||
|
18bdd48835 | ||
|
f49cf887dc | ||
|
19793d5617 | ||
|
4a2f48ad04 | ||
|
2b413b06c5 | ||
|
2b89dedc08 | ||
|
00a880c467 | ||
|
92d2adc5fd | ||
|
bc59b8d9ab | ||
|
bb9f01372f | ||
|
069a29d22a | ||
|
105170b5bc | ||
|
b8261ef055 | ||
|
d14770188b | ||
|
e9bb646dbf | ||
|
46adf40675 | ||
|
6938a13223 | ||
|
ab56aefeaa | ||
|
259db92b9a | ||
|
094ec77980 | ||
|
bb712693d4 | ||
|
1e00e3fdbb | ||
|
47d7a6e155 | ||
|
45d91212f6 | ||
|
1a81c98d43 | ||
|
c98e6ba5a7 | ||
|
eeb00cc56b | ||
|
87cdb5b4d8 | ||
|
bc4b0b864c | ||
|
53ab1503e4 | ||
|
62a396e434 | ||
|
2096fa2807 | ||
|
06963df407 | ||
|
8fe09815f5 | ||
|
fccc3e2188 | ||
|
f0a867b20f | ||
|
69311ae689 | ||
|
f005b9e031 | ||
|
31ced98e0d | ||
|
9964ddd731 | ||
|
32ac0a8d8f | ||
|
827e905f8e | ||
|
cdc76567d4 | ||
|
5898a50463 | ||
|
72d9ee2010 | ||
|
4e5e4e5c6e | ||
|
201d7430fe | ||
|
52f6148876 | ||
|
dc215aba59 | ||
|
90a68506b8 | ||
|
bd0577f435 | ||
|
d33f1abffc | ||
|
b0b47a0888 | ||
|
8c0a14aff2 | ||
|
76788efaba | ||
|
973ec32e13 | ||
|
cf818aae9e | ||
|
6da0bc63b7 | ||
|
6e1bc2daed | ||
|
7ce9d63ed6 | ||
|
267f6759f8 | ||
|
b5874a08e4 | ||
|
368e08bb9b | ||
|
5f2d7fb7b6 | ||
|
68d6e30143 | ||
|
c5c312db0d | ||
|
05f80b7b83 | ||
|
31c3cfc4ea | ||
|
fd196454a5 | ||
|
f6761843b2 | ||
|
84c31165e5 | ||
|
fc4d5e3d43 | ||
|
b2fa28e4b5 | ||
|
fc743ba888 | ||
|
a35df8c139 | ||
|
8aec252452 | ||
|
32961d480c | ||
|
27e3d322ec | ||
|
9eab1085da | ||
|
c305f9a105 | ||
|
3b773e2677 | ||
|
6e48a0303e | ||
|
31f1ffd6a5 | ||
|
9897f682a0 | ||
|
f3156c65c9 | ||
|
2719042c71 | ||
|
ffd0b90a83 | ||
|
87aaaf6971 | ||
|
6ffa9e3736 | ||
|
434c459246 | ||
|
7f2f3e34f5 | ||
|
f7dd609b26 | ||
|
ec97ee41f9 | ||
|
335c602cea | ||
|
082117d8bc | ||
|
11a9b73610 | ||
|
974f003fe3 | ||
|
352a50e3ad | ||
|
5637fe8041 | ||
|
3d167749cb | ||
|
1a189f4923 | ||
|
6de8113720 | ||
|
f74f7f58cd | ||
|
34b7686d8a | ||
|
4eb2112282 | ||
|
25122fd355 | ||
|
1d14ea6b45 | ||
|
eab5093012 | ||
|
1948f25151 | ||
|
44825f1b94 | ||
|
d02bf0faa1 | ||
|
b28606b8ef | ||
|
631b4c194c | ||
|
b20961cc9d | ||
|
495462183b | ||
|
40fa7a2c9b | ||
|
f69210b6d1 | ||
|
bb5f7b87bc | ||
|
e2f568252b | ||
|
bca7d48d99 | ||
|
3bdb0af993 | ||
|
d345734a8e | ||
|
4b25c2d425 | ||
|
54e1966ec8 | ||
|
f073c22212 | ||
|
71731819fb | ||
|
b01b75e367 | ||
|
71b444b6f6 | ||
|
bb641144b6 | ||
|
590639f5f3 | ||
|
b06be43988 | ||
|
237076e5b7 | ||
|
737783a8a8 | ||
|
7d3147d4e1 | ||
|
61c4421bd2 | ||
|
85d4fb6ce2 | ||
|
da855c654e | ||
|
7147d39975 | ||
|
f4ace73a3c | ||
|
0b299d0003 | ||
|
70e483d1b1 | ||
|
628c281c39 | ||
|
0901e59a58 | ||
|
5530400b09 | ||
|
e7af009fbc | ||
|
2b31b185e4 | ||
|
f96f914576 | ||
|
f610f8aa67 | ||
|
021793fc52 | ||
|
9ab1680b17 | ||
|
8dde6a27bf | ||
|
44f30ad51e | ||
|
6911e3a71d | ||
|
cad6280a45 | ||
|
7d67cfd1e7 | ||
|
e911b52b4c | ||
|
2defb17cc2 | ||
|
fe20e2c212 | ||
|
795a500adb | ||
|
75aaef7d76 | ||
|
f128190f14 | ||
|
f926c58e01 | ||
|
e5a3598bf6 | ||
|
7cafd9f51a | ||
|
e9fec9b22f | ||
|
31a00eeb95 | ||
|
6b577e6f1f | ||
|
64f0ae7c33 | ||
|
343fe0e317 | ||
|
07b2f86dcc | ||
|
ffaea861e5 | ||
|
46b3b7a952 | ||
|
78544ce68d | ||
|
af3116bce9 | ||
|
6dde236d77 | ||
|
d0998be8fa | ||
|
8dcfa6c474 | ||
|
744927215a | ||
|
54c21459d6 | ||
|
91f8bd34b1 | ||
|
4e52f0e420 | ||
|
ac23d79fe7 | ||
|
29179e27c6 | ||
|
cd610a1cf2 | ||
|
0c017c2aa0 | ||
|
5721a2f487 | ||
|
b673d36f33 | ||
|
bacb095382 | ||
|
7471ef64d5 | ||
|
707ca2d16d | ||
|
3246f5a8f6 | ||
|
bf6f63cfe1 | ||
|
819602520a | ||
|
16f59f514b | ||
|
759f7ef327 | ||
|
9c825aaa2b | ||
|
952a5891bb | ||
|
0daa24cf4b | ||
|
33bf2284c7 | ||
|
d3e456a1bf | ||
|
51472625ba | ||
|
ec22162cf4 | ||
|
1af506d4b8 | ||
|
d86440506d | ||
|
556d461cfb | ||
|
6cfebe381a | ||
|
8ab2827f4c | ||
|
024155a608 | ||
|
4da21463c1 | ||
|
abc12b4ba5 | ||
|
d8d4eae9f5 | ||
|
d82a73feed | ||
|
ab6cee1a25 | ||
|
2e840dc73d | ||
|
ae9139bd73 | ||
|
2e3d6dfa2c | ||
|
7cd28710bc | ||
|
bc1d6f9e91 | ||
|
bf4c543692 | ||
|
709c5566bb | ||
|
9a62c32c28 | ||
|
bbf90e42ff | ||
|
0859bb13a5 | ||
|
62be3e01be | ||
|
613523c9b4 | ||
|
3e56bd3dc6 | ||
|
293e8ab8b6 | ||
|
824fb2feff | ||
|
4923253fbf | ||
|
36c296d787 | ||
|
9fc2e5e2c0 | ||
|
cb47a9c92e | ||
|
5dedec12f9 | ||
|
5e81592e18 | ||
|
74bcab866c | ||
|
1d949a3170 | ||
|
79e0f44324 | ||
|
976a03c9e5 | ||
|
49ab6630d4 | ||
|
27fb011bf5 | ||
|
6466427061 | ||
|
818035f385 | ||
|
4748f31d93 | ||
|
e049e9d7ae | ||
|
776f9bf132 | ||
|
f882ff9bb5 | ||
|
535052e3dc | ||
|
c2ba3bb7d5 | ||
|
b7332895db | ||
|
0a3f449f9e | ||
|
df1bdd2ad8 | ||
|
8e2a99c1eb | ||
|
e45547c649 | ||
|
29362ed924 | ||
|
eb4bac3b8f | ||
|
584884a3c9 | ||
|
96ead2a4df | ||
|
556f10ddd8 | ||
|
a79e2c20fe | ||
|
89b194034b | ||
|
01c54b13c8 | ||
|
24c8c65aa5 | ||
|
17de76f326 | ||
|
d3008d1e62 | ||
|
471947dfa7 | ||
|
2f506f1b24 | ||
|
81cf6047f9 | ||
|
57d3c9a99a | ||
|
999b345db1 | ||
|
5e2f952fe6 | ||
|
899b931b89 | ||
|
0431f15ac0 | ||
|
6c57470b13 | ||
|
6ca2ebc437 | ||
|
dd915c126c | ||
|
62ffe5ffdf | ||
|
592039c483 | ||
|
2f64f023b2 | ||
|
316a2067b6 | ||
|
de8d0d1d37 | ||
|
aea1a4cf63 | ||
|
7f5593021d | ||
|
f9ae7cd67f | ||
|
843a613cda | ||
|
da83e0c1a0 | ||
|
903026a7e4 | ||
|
1954d0383e | ||
|
2e89ba3c94 | ||
|
b14c0780d2 | ||
|
d465fd27bc | ||
|
ffc9f9f5a4 | ||
|
290bc19922 | ||
|
863a8ddfff | ||
|
b8df3863d1 | ||
|
4cb15501a2 | ||
|
42602a099f | ||
|
be2da3e12f | ||
|
09bed537b3 | ||
|
fb717db57c | ||
|
cca97f32c6 | ||
|
c658eb10f4 | ||
|
f667faa1bd | ||
|
542cc42538 | ||
|
518b39610e | ||
|
6de1ea0194 |
@@ -17,3 +17,9 @@ trim_trailing_whitespace = false
|
|||||||
|
|
||||||
[*.{php,xml,json}]
|
[*.{php,xml,json}]
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
|
|
||||||
|
[{tsconfig.json,prettierrc.json}]
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
[*.neon]
|
||||||
|
indent_style = tab
|
1
.github/CODEOWNERS
vendored
Normal file
1
.github/CODEOWNERS
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
* @flarum/core
|
39
.github/ISSUE_TEMPLATE/bug-report.md
vendored
39
.github/ISSUE_TEMPLATE/bug-report.md
vendored
@@ -1,39 +0,0 @@
|
|||||||
---
|
|
||||||
name: "🐛 Bug Report"
|
|
||||||
about: "If something isn't working as expected"
|
|
||||||
|
|
||||||
---
|
|
||||||
## Bug Report
|
|
||||||
|
|
||||||
**Current Behavior**
|
|
||||||
A clear and concise description of the behavior.
|
|
||||||
|
|
||||||
**Steps to Reproduce**
|
|
||||||
1. Go to '...'
|
|
||||||
2. Click on '....'
|
|
||||||
3. Scroll down to '....'
|
|
||||||
4. See error
|
|
||||||
|
|
||||||
**Expected Behavior**
|
|
||||||
A clear and concise description of what you expected to happen.
|
|
||||||
|
|
||||||
**Screenshots**
|
|
||||||
If applicable, add screenshots to help explain your problem.
|
|
||||||
|
|
||||||
**Environment**
|
|
||||||
- Flarum version: x.y.z
|
|
||||||
- Website URL: http://example.com
|
|
||||||
- Webserver: [e.g. apache, nginx]
|
|
||||||
- Hosting environment: [e.g. shared, vps]
|
|
||||||
- PHP version: x.y.z
|
|
||||||
- Browser: [e.g. chrome 67, safari 11]
|
|
||||||
|
|
||||||
```
|
|
||||||
Output of "php flarum info", run this in terminal in your Flarum directory.
|
|
||||||
```
|
|
||||||
|
|
||||||
**Possible Solution**
|
|
||||||
<!--- Only if you have suggestions or a fix for the bug -->
|
|
||||||
|
|
||||||
**Additional Context**
|
|
||||||
Add any other context about the problem here.
|
|
78
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
Normal file
78
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
name: "🐛 Bug Report"
|
||||||
|
description: If something isn't working as expected
|
||||||
|
labels: ["type/bug"]
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
Thanks for taking the time to fill out this bug report!
|
||||||
|
- type: textarea
|
||||||
|
id: current_behavior
|
||||||
|
attributes:
|
||||||
|
label: Current Behavior
|
||||||
|
description: A clear and concise description of the behavior.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: steps_to_reproduce
|
||||||
|
attributes:
|
||||||
|
label: Steps to Reproduce
|
||||||
|
description: The exact steps to reproduce the bug.
|
||||||
|
placeholder: |
|
||||||
|
1. Go to '...'
|
||||||
|
2. Click on '....'
|
||||||
|
3. Scroll down to '....'
|
||||||
|
4. See error message '....'
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: expected_behavior
|
||||||
|
attributes:
|
||||||
|
label: Expected Behavior
|
||||||
|
description: A clear and concise description of what you expected to happen.
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: screenshots
|
||||||
|
attributes:
|
||||||
|
label: Screenshots
|
||||||
|
description: If applicable, add screenshots to help explain your problem.
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
- type: textarea
|
||||||
|
id: enironment
|
||||||
|
attributes:
|
||||||
|
label: Environment
|
||||||
|
value: |
|
||||||
|
- Flarum version: x.y.z
|
||||||
|
- Website URL: http://example.com
|
||||||
|
- Webserver: [e.g. apache, nginx]
|
||||||
|
- Hosting environment: [e.g. shared, vps]
|
||||||
|
- PHP version: x.y.z
|
||||||
|
- Browser: [e.g. chrome 67, safari 11]
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
- type: textarea
|
||||||
|
id: php_flarum_info
|
||||||
|
attributes:
|
||||||
|
label: "Output of `php flarum info`"
|
||||||
|
value: |
|
||||||
|
```
|
||||||
|
Output of "php flarum info", run this in terminal in your Flarum directory.
|
||||||
|
```
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
- type: textarea
|
||||||
|
id: possible_solution
|
||||||
|
attributes:
|
||||||
|
label: Possible Solution
|
||||||
|
description: Only if you have suggestions or a fix for the bug.
|
||||||
|
validations:
|
||||||
|
required: false
|
||||||
|
- type: textarea
|
||||||
|
id: additional_context
|
||||||
|
attributes:
|
||||||
|
label: Additional Context
|
||||||
|
description: Add any other context about the problem here.
|
||||||
|
validations:
|
||||||
|
required: false
|
17
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
17
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
blank_issues_enabled: false
|
||||||
|
contact_links:
|
||||||
|
- name: "🚀 Feature Request"
|
||||||
|
url: https://discuss.flarum.org/t/proposals
|
||||||
|
about: |
|
||||||
|
Thanks for taking the time to fill out this feature request!
|
||||||
|
We primarily use GitHub as a bug tracker and issue tracker for items we are sure to tackle in the near future.
|
||||||
|
For feature requests, ideas and feedback please post in the Flarum Community.
|
||||||
|
Feature requests are added to GitHub only when they have been accepted by the development team and implementation details have been laid out.
|
||||||
|
- name: "🙋 Support Question"
|
||||||
|
url: https://discuss.flarum.org/t/support
|
||||||
|
about: |
|
||||||
|
We primarily use GitHub as a bug tracker and issue tracker for items we are sure to tackle in the near future; for usage and support questions, please check out these resources below. Thanks!
|
||||||
|
|
||||||
|
* Flarum Community: https://discuss.flarum.org/
|
||||||
|
* Discord Chat: https://flarum.org/discord/
|
||||||
|
* Twitter: https://twitter.com/Flarum
|
26
.github/ISSUE_TEMPLATE/feature-request.md
vendored
26
.github/ISSUE_TEMPLATE/feature-request.md
vendored
@@ -1,26 +0,0 @@
|
|||||||
---
|
|
||||||
name: "🚀 Feature Request"
|
|
||||||
about: "I have a suggestion (and may want to implement it!)"
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
<!--
|
|
||||||
IMPORTANT: Feature requests on this GitHub issue tracker are only accepted in case they have been approved by a core developer or contain extensive argumentation and directions for implementation. For all other feature requests, ideas and feedback please post in the Flarum Community: https://discuss.flarum.org/t/feedback.
|
|
||||||
-->
|
|
||||||
|
|
||||||
## Feature Request
|
|
||||||
|
|
||||||
**Is your feature request related to a problem? Please describe.**
|
|
||||||
A clear and concise description of what the problem is. eg. I have an issue when [...]
|
|
||||||
|
|
||||||
**Describe the solution you'd like**
|
|
||||||
A detailed description of your proposed solution. Include:
|
|
||||||
- How the feature would work/behave
|
|
||||||
- Any potential drawbacks
|
|
||||||
- Maybe a screenshot, design, or example code
|
|
||||||
|
|
||||||
**Justify why this feature belongs in Flarum's core, rather than in a third-party extension**
|
|
||||||
Consider who this change will be useful to – most Flarum forums, or just a few?
|
|
||||||
|
|
||||||
**Describe alternatives you've considered**
|
|
||||||
A clear and concise description of any alternative solutions or features you've considered.
|
|
11
.github/ISSUE_TEMPLATE/support-question.md
vendored
11
.github/ISSUE_TEMPLATE/support-question.md
vendored
@@ -1,11 +0,0 @@
|
|||||||
---
|
|
||||||
name: "🙋 Support Question"
|
|
||||||
about: "If you have a question, please check out our forum or Discord!"
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
We primarily use GitHub as an issue tracker; for usage and support questions, please check out these resources below. Thanks!
|
|
||||||
|
|
||||||
* Flarum Community: https://discuss.flarum.org/
|
|
||||||
* Discord Chat: https://flarum.org/discord/
|
|
||||||
* Twitter: https://twitter.com/Flarum
|
|
208
.github/workflows/REUSABLE_backend.yml
vendored
Normal file
208
.github/workflows/REUSABLE_backend.yml
vendored
Normal file
@@ -0,0 +1,208 @@
|
|||||||
|
name: Flarum Backend Jobs
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
enable_backend_testing:
|
||||||
|
description: "Enable Backend Testing?"
|
||||||
|
type: boolean
|
||||||
|
default: true
|
||||||
|
required: false
|
||||||
|
|
||||||
|
enable_phpstan:
|
||||||
|
description: "Enable PHPStan Static Analysis?"
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
required: false
|
||||||
|
|
||||||
|
backend_directory:
|
||||||
|
description: The directory of the project where backend code is located. This should contain a `composer.json` file, and is generally the root directory of the repo.
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
default: '.'
|
||||||
|
|
||||||
|
php_versions:
|
||||||
|
description: Versions of PHP to test with. Should be array of strings encoded as JSON array
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
default: '["7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"]'
|
||||||
|
|
||||||
|
php_extensions:
|
||||||
|
description: PHP extensions to install.
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
default: 'curl, dom, gd, json, mbstring, openssl, pdo_mysql, tokenizer, zip'
|
||||||
|
|
||||||
|
db_versions:
|
||||||
|
description: Versions of databases to test with. Should be array of strings encoded as JSON array
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
default: '["mysql:5.7", "mysql:8.0.30", "mariadb"]'
|
||||||
|
|
||||||
|
php_ini_values:
|
||||||
|
description: PHP ini values
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
default: error_reporting=E_ALL
|
||||||
|
|
||||||
|
runner_type:
|
||||||
|
description: The type of runner to use for the jobs. This should be one of the types supported by the `runs-on` keyword.
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
default: 'ubuntu-latest'
|
||||||
|
|
||||||
|
secrets:
|
||||||
|
composer_auth:
|
||||||
|
description: The Composer auth tokens to use for private packages.
|
||||||
|
required: false
|
||||||
|
|
||||||
|
env:
|
||||||
|
COMPOSER_ROOT_VERSION: dev-main
|
||||||
|
FLARUM_TEST_TMP_DIR_LOCAL: tests/integration/tmp
|
||||||
|
COMPOSER_AUTH: ${{ secrets.composer_auth }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ${{ inputs.runner_type }}
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
php: ${{ fromJSON(inputs.php_versions) }}
|
||||||
|
service: ${{ fromJSON(inputs.db_versions) }}
|
||||||
|
prefix: ['']
|
||||||
|
php_ini_values: [inputs.php_ini_values]
|
||||||
|
|
||||||
|
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategymatrixinclude
|
||||||
|
include:
|
||||||
|
# Expands the matrix by naming DBs.
|
||||||
|
- service: 'mysql:5.7'
|
||||||
|
db: MySQL 5.7
|
||||||
|
- service: 'mysql:8.0.30'
|
||||||
|
db: MySQL 8.0
|
||||||
|
- service: mariadb
|
||||||
|
db: MariaDB
|
||||||
|
|
||||||
|
# Include Database prefix tests with only one PHP version.
|
||||||
|
- php: ${{ fromJSON(inputs.php_versions)[0] }}
|
||||||
|
service: 'mysql:5.7'
|
||||||
|
db: MySQL 5.7
|
||||||
|
prefix: flarum_
|
||||||
|
prefixStr: (prefix)
|
||||||
|
- php: ${{ fromJSON(inputs.php_versions)[0] }}
|
||||||
|
service: 'mysql:8.0.30'
|
||||||
|
db: MySQL 8.0
|
||||||
|
prefix: flarum_
|
||||||
|
prefixStr: (prefix)
|
||||||
|
- php: ${{ fromJSON(inputs.php_versions)[0] }}
|
||||||
|
service: mariadb
|
||||||
|
db: MariaDB
|
||||||
|
prefix: flarum_
|
||||||
|
prefixStr: (prefix)
|
||||||
|
|
||||||
|
# @TODO: remove in 2.0
|
||||||
|
# Include testing PHP 8.2 with deprecation warnings disabled.
|
||||||
|
- php: 8.2
|
||||||
|
php_ini_values: error_reporting=E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED
|
||||||
|
- php: 8.3
|
||||||
|
php_ini_values: error_reporting=E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED
|
||||||
|
- php: 8.4
|
||||||
|
php_ini_values: error_reporting=E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED
|
||||||
|
|
||||||
|
# To reduce number of actions, we exclude some PHP versions from running with some DB versions.
|
||||||
|
exclude:
|
||||||
|
- php: ${{ fromJSON(inputs.php_versions)[1] }}
|
||||||
|
service: 'mysql:8.0.30'
|
||||||
|
- php: ${{ fromJSON(inputs.php_versions)[2] }}
|
||||||
|
service: 'mysql:8.0.30'
|
||||||
|
- php: ${{ fromJSON(inputs.php_versions)[3] }}
|
||||||
|
service: 'mysql:8.0.30'
|
||||||
|
|
||||||
|
# @TODO: remove in 2.0
|
||||||
|
# Exclude testing PHP 8.2 with deprecation warnings enabled.
|
||||||
|
- php: 8.2
|
||||||
|
php_ini_values: error_reporting=E_ALL
|
||||||
|
|
||||||
|
services:
|
||||||
|
mysql:
|
||||||
|
image: ${{ matrix.service }}
|
||||||
|
ports:
|
||||||
|
- 13306:3306
|
||||||
|
|
||||||
|
name: 'PHP ${{ matrix.php }} / ${{ matrix.db }} ${{ matrix.prefixStr }}'
|
||||||
|
|
||||||
|
if: >-
|
||||||
|
inputs.enable_backend_testing &&
|
||||||
|
((github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) || github.event_name != 'pull_request')
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@master
|
||||||
|
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: ${{ matrix.php }}
|
||||||
|
coverage: xdebug
|
||||||
|
extensions: ${{ inputs.php_extensions }}
|
||||||
|
tools: phpunit, composer:v2
|
||||||
|
ini-values: ${{ matrix.php_ini_values }}
|
||||||
|
|
||||||
|
# The authentication alter is necessary because newer mysql versions use the `caching_sha2_password` driver,
|
||||||
|
# which isn't supported prior to PHP7.4
|
||||||
|
# When we drop support for PHP7.3, we should remove this from the setup.
|
||||||
|
- name: Create MySQL Database
|
||||||
|
run: |
|
||||||
|
sudo systemctl start mysql
|
||||||
|
mysql -uroot -proot -e 'CREATE DATABASE flarum_test;' --port 13306
|
||||||
|
mysql -uroot -proot -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';" --port 13306
|
||||||
|
|
||||||
|
- name: Install Composer dependencies
|
||||||
|
run: composer install
|
||||||
|
working-directory: ${{ inputs.backend_directory }}
|
||||||
|
|
||||||
|
- name: Setup Composer tests
|
||||||
|
run: composer test:setup
|
||||||
|
working-directory: ${{ inputs.backend_directory }}
|
||||||
|
env:
|
||||||
|
DB_PORT: 13306
|
||||||
|
DB_PASSWORD: root
|
||||||
|
DB_PREFIX: ${{ matrix.prefix }}
|
||||||
|
|
||||||
|
- name: Run Composer tests
|
||||||
|
run: composer test
|
||||||
|
working-directory: ${{ inputs.backend_directory }}
|
||||||
|
env:
|
||||||
|
COMPOSER_PROCESS_TIMEOUT: 600
|
||||||
|
|
||||||
|
phpstan:
|
||||||
|
runs-on: ${{ inputs.runner_type }}
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
php: ${{ fromJSON(inputs.php_versions) }}
|
||||||
|
exclude:
|
||||||
|
- php: 8.4
|
||||||
|
|
||||||
|
name: 'PHPStan PHP ${{ matrix.php }}'
|
||||||
|
|
||||||
|
if: >-
|
||||||
|
inputs.enable_phpstan &&
|
||||||
|
((github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) || github.event_name != 'pull_request')
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@master
|
||||||
|
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: ${{ matrix.php }}
|
||||||
|
coverage: xdebug
|
||||||
|
extensions: ${{ inputs.php_extensions }}
|
||||||
|
tools: phpunit, composer:v2
|
||||||
|
ini-values: ${{ matrix.php_ini_values }}
|
||||||
|
|
||||||
|
- name: Install Composer dependencies
|
||||||
|
run: composer install
|
||||||
|
working-directory: ${{ inputs.backend_directory }}
|
||||||
|
|
||||||
|
- name: Run PHPStan
|
||||||
|
run: composer analyse:phpstan
|
182
.github/workflows/REUSABLE_frontend.yml
vendored
Normal file
182
.github/workflows/REUSABLE_frontend.yml
vendored
Normal file
@@ -0,0 +1,182 @@
|
|||||||
|
name: Flarum Frontend Jobs
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
build_script:
|
||||||
|
description: "Script to run for production build. Empty value to disable."
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
default: build
|
||||||
|
build_typings_script:
|
||||||
|
description: "Script to run for typings build. Empty value to disable."
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
default: build-typings
|
||||||
|
format_script:
|
||||||
|
description: "Script to run for code formatting. Empty value to disable."
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
default: format-check
|
||||||
|
check_typings_script:
|
||||||
|
description: "Script to run for tyiping check. Empty value to disable."
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
default: check-typings
|
||||||
|
type_coverage_script:
|
||||||
|
description: "Script to run for type coverage. Empty value to disable."
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
default: check-typings-coverage
|
||||||
|
test_script:
|
||||||
|
description: "Script to run for tests. Empty value to disable."
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
default: test
|
||||||
|
|
||||||
|
enable_bundlewatch:
|
||||||
|
description: "Enable Bundlewatch?"
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
required: false
|
||||||
|
enable_prettier:
|
||||||
|
description: "Enable Prettier?"
|
||||||
|
type: boolean
|
||||||
|
default: true
|
||||||
|
required: false
|
||||||
|
enable_typescript:
|
||||||
|
description: "Enable TypeScript?"
|
||||||
|
type: boolean
|
||||||
|
default: true
|
||||||
|
required: false
|
||||||
|
enable_tests:
|
||||||
|
description: "Enable Tests?"
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
required: false
|
||||||
|
|
||||||
|
backend_directory:
|
||||||
|
description: The directory of the project where backend code is located. This should contain a `composer.json` file, and is generally the root directory of the repo.
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
default: '.'
|
||||||
|
frontend_directory:
|
||||||
|
description: The directory of the project where frontend code is located. This should contain a `package.json` file.
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
default: './js'
|
||||||
|
main_git_branch:
|
||||||
|
description: The main git branch to use for the workflow.
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
default: main
|
||||||
|
node_version:
|
||||||
|
description: The node version to use for the workflow.
|
||||||
|
type: number
|
||||||
|
required: false
|
||||||
|
default: 20
|
||||||
|
|
||||||
|
js_package_manager:
|
||||||
|
description: "Enable TypeScript?"
|
||||||
|
type: string
|
||||||
|
default: yarn
|
||||||
|
required: false
|
||||||
|
cache_dependency_path:
|
||||||
|
description: "The path to the cache dependency file."
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
|
||||||
|
runner_type:
|
||||||
|
description: The type of runner to use for the jobs. This should be one of the types supported by the `runs-on` keyword.
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
default: 'ubuntu-latest'
|
||||||
|
|
||||||
|
git_actor_name:
|
||||||
|
description: The name of the git actor to use for the bundled JS output.
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
git_actor_email:
|
||||||
|
description: The email of the git actor to use for the bundled JS output.
|
||||||
|
type: string
|
||||||
|
required: false
|
||||||
|
|
||||||
|
secrets:
|
||||||
|
bundlewatch_github_token:
|
||||||
|
description: The GitHub token to use for Bundlewatch.
|
||||||
|
required: false
|
||||||
|
composer_auth:
|
||||||
|
description: The Composer auth tokens to use for private packages.
|
||||||
|
required: false
|
||||||
|
git_actor_token:
|
||||||
|
description: The personal access token from the custom git actor.
|
||||||
|
required: false
|
||||||
|
|
||||||
|
env:
|
||||||
|
COMPOSER_ROOT_VERSION: dev-main
|
||||||
|
ci_script: ${{ inputs.js_package_manager == 'yarn' && 'yarn install --immutable' || 'npm ci' }}
|
||||||
|
cache_dependency_path: ${{ inputs.cache_dependency_path || format(inputs.js_package_manager == 'yarn' && '{0}/yarn.lock' || '{0}/package-lock.json', inputs.frontend_directory) }}
|
||||||
|
COMPOSER_AUTH: ${{ secrets.composer_auth }}
|
||||||
|
DISABLE_V8_COMPILE_CACHE: 1
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Checks & Build
|
||||||
|
runs-on: ${{ inputs.runner_type }}
|
||||||
|
env:
|
||||||
|
GIT_ACTOR_TOKEN: ${{ secrets.git_actor_token }}
|
||||||
|
|
||||||
|
if: >-
|
||||||
|
((github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) || github.event_name != 'pull_request')
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Check out code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.git_actor_token != '' && secrets.git_actor_token || secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Set up Node
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: ${{ inputs.node_version }}
|
||||||
|
cache: ${{ inputs.js_package_manager }}
|
||||||
|
cache-dependency-path: ${{ env.cache_dependency_path }}
|
||||||
|
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: '8.2'
|
||||||
|
extensions: curl, dom, gd, json, mbstring, openssl, pdo_mysql, tokenizer, zip
|
||||||
|
tools: composer:v2
|
||||||
|
|
||||||
|
# Needed since tsconfig draws typings from vendor folder.
|
||||||
|
- name: Install Composer dependencies
|
||||||
|
run: composer install
|
||||||
|
working-directory: ${{ inputs.backend_directory }}
|
||||||
|
|
||||||
|
- name: Install JS dependencies
|
||||||
|
run: ${{ env.ci_script }}
|
||||||
|
working-directory: ${{ inputs.frontend_directory }}
|
||||||
|
|
||||||
|
- name: JS Checks & Production Build
|
||||||
|
uses: flarum/action-build@v4.1
|
||||||
|
with:
|
||||||
|
build_script: ${{ inputs.build_script }}
|
||||||
|
build_typings_script: ${{ inputs.build_typings_script }}
|
||||||
|
format_script: ${{ inputs.enable_prettier == true && inputs.format_script || '' }}
|
||||||
|
check_typings_script: ${{ inputs.enable_typescript == true && inputs.check_typings_script || '' }}
|
||||||
|
type_coverage_script: ${{ inputs.enable_typescript == true && inputs.type_coverage_script || '' }}
|
||||||
|
test_script: ${{ inputs.enable_tests == true && inputs.test_script || '' }}
|
||||||
|
package_manager: ${{ inputs.js_package_manager }}
|
||||||
|
js_path: ${{ inputs.frontend_directory }}
|
||||||
|
do_not_commit: ${{ github.ref != format('refs/heads/{0}', inputs.main_git_branch) || github.event_name != 'push' }}
|
||||||
|
git_actor_name: ${{ inputs.git_actor_name || '' }}
|
||||||
|
git_actor_email: ${{ inputs.git_actor_email || '' }}
|
||||||
|
|
||||||
|
- name: Check bundle size change
|
||||||
|
if: ${{ inputs.enable_bundlewatch }}
|
||||||
|
run: node_modules/.bin/bundlewatch --config .bundlewatch.config.json
|
||||||
|
working-directory: ${{ inputs.frontend_directory }}
|
||||||
|
env:
|
||||||
|
BUNDLEWATCH_GITHUB_TOKEN: ${{ secrets.bundlewatch_github_token }}
|
||||||
|
CI_COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
|
6
.github/workflows/flarum-akismet-backend.yml
vendored
6
.github/workflows/flarum-akismet-backend.yml
vendored
@@ -2,13 +2,9 @@ name: Akismet PHP
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
|
uses: ./.github/workflows/REUSABLE_backend.yml
|
||||||
with:
|
with:
|
||||||
enable_backend_testing: true
|
enable_backend_testing: true
|
||||||
|
|
||||||
|
23
.github/workflows/flarum-akismet-frontend.yml
vendored
23
.github/workflows/flarum-akismet-frontend.yml
vendored
@@ -1,23 +0,0 @@
|
|||||||
name: Akismet JS
|
|
||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run:
|
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
|
|
||||||
with:
|
|
||||||
enable_bundlewatch: false
|
|
||||||
enable_prettier: true
|
|
||||||
enable_typescript: true
|
|
||||||
|
|
||||||
frontend_directory: ./extensions/akismet/js
|
|
||||||
backend_directory: ./extensions/akismet
|
|
||||||
js_package_manager: yarn
|
|
||||||
main_git_branch: main
|
|
||||||
|
|
||||||
secrets:
|
|
||||||
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
|
|
@@ -2,14 +2,10 @@ name: Approval PHP
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
|
uses: ./.github/workflows/REUSABLE_backend.yml
|
||||||
with:
|
with:
|
||||||
enable_backend_testing: false
|
enable_backend_testing: true
|
||||||
|
|
||||||
backend_directory: ./extensions/approval
|
backend_directory: ./extensions/approval
|
||||||
|
23
.github/workflows/flarum-approval-frontend.yml
vendored
23
.github/workflows/flarum-approval-frontend.yml
vendored
@@ -1,23 +0,0 @@
|
|||||||
name: Approval JS
|
|
||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run:
|
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
|
|
||||||
with:
|
|
||||||
enable_bundlewatch: false
|
|
||||||
enable_prettier: true
|
|
||||||
enable_typescript: false
|
|
||||||
|
|
||||||
frontend_directory: ./extensions/approval/js
|
|
||||||
backend_directory: ./extensions/approval
|
|
||||||
js_package_manager: yarn
|
|
||||||
main_git_branch: main
|
|
||||||
|
|
||||||
secrets:
|
|
||||||
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
|
|
6
.github/workflows/flarum-core-backend.yml
vendored
6
.github/workflows/flarum-core-backend.yml
vendored
@@ -2,13 +2,9 @@ name: Core PHP
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
|
uses: ./.github/workflows/REUSABLE_backend.yml
|
||||||
with:
|
with:
|
||||||
enable_backend_testing: true
|
enable_backend_testing: true
|
||||||
|
|
||||||
|
23
.github/workflows/flarum-core-frontend.yml
vendored
23
.github/workflows/flarum-core-frontend.yml
vendored
@@ -1,23 +0,0 @@
|
|||||||
name: Core JS
|
|
||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run:
|
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
|
|
||||||
with:
|
|
||||||
enable_bundlewatch: true
|
|
||||||
enable_prettier: true
|
|
||||||
enable_typescript: true
|
|
||||||
|
|
||||||
frontend_directory: ./framework/core/js
|
|
||||||
backend_directory: ./framework/core
|
|
||||||
js_package_manager: yarn
|
|
||||||
main_git_branch: main
|
|
||||||
|
|
||||||
secrets:
|
|
||||||
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
|
|
6
.github/workflows/flarum-embed-backend.yml
vendored
6
.github/workflows/flarum-embed-backend.yml
vendored
@@ -2,13 +2,9 @@ name: Embed PHP
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
|
uses: ./.github/workflows/REUSABLE_backend.yml
|
||||||
with:
|
with:
|
||||||
enable_backend_testing: false
|
enable_backend_testing: false
|
||||||
|
|
||||||
|
23
.github/workflows/flarum-embed-frontend.yml
vendored
23
.github/workflows/flarum-embed-frontend.yml
vendored
@@ -1,23 +0,0 @@
|
|||||||
name: Embed JS
|
|
||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run:
|
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
|
|
||||||
with:
|
|
||||||
enable_bundlewatch: false
|
|
||||||
enable_prettier: true
|
|
||||||
enable_typescript: false
|
|
||||||
|
|
||||||
frontend_directory: ./extensions/embed/js
|
|
||||||
backend_directory: ./extensions/embed
|
|
||||||
js_package_manager: yarn
|
|
||||||
main_git_branch: main
|
|
||||||
|
|
||||||
secrets:
|
|
||||||
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
|
|
6
.github/workflows/flarum-emoji-backend.yml
vendored
6
.github/workflows/flarum-emoji-backend.yml
vendored
@@ -2,13 +2,9 @@ name: Emoji PHP
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
|
uses: ./.github/workflows/REUSABLE_backend.yml
|
||||||
with:
|
with:
|
||||||
enable_backend_testing: false
|
enable_backend_testing: false
|
||||||
|
|
||||||
|
23
.github/workflows/flarum-emoji-frontend.yml
vendored
23
.github/workflows/flarum-emoji-frontend.yml
vendored
@@ -1,23 +0,0 @@
|
|||||||
name: Emoji JS
|
|
||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run:
|
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
|
|
||||||
with:
|
|
||||||
enable_bundlewatch: false
|
|
||||||
enable_prettier: true
|
|
||||||
enable_typescript: false
|
|
||||||
|
|
||||||
frontend_directory: ./extensions/emoji/js
|
|
||||||
backend_directory: ./extensions/emoji
|
|
||||||
js_package_manager: yarn
|
|
||||||
main_git_branch: main
|
|
||||||
|
|
||||||
secrets:
|
|
||||||
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
|
|
11
.github/workflows/flarum-extension-manager-backend.yml
vendored
Normal file
11
.github/workflows/flarum-extension-manager-backend.yml
vendored
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
name: Extension Manager PHP
|
||||||
|
|
||||||
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
run:
|
||||||
|
uses: ./.github/workflows/REUSABLE_backend.yml
|
||||||
|
with:
|
||||||
|
enable_backend_testing: false
|
||||||
|
|
||||||
|
backend_directory: ./extensions/package-manager
|
6
.github/workflows/flarum-flags-backend.yml
vendored
6
.github/workflows/flarum-flags-backend.yml
vendored
@@ -2,13 +2,9 @@ name: Flags PHP
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
|
uses: ./.github/workflows/REUSABLE_backend.yml
|
||||||
with:
|
with:
|
||||||
enable_backend_testing: true
|
enable_backend_testing: true
|
||||||
|
|
||||||
|
23
.github/workflows/flarum-flags-frontend.yml
vendored
23
.github/workflows/flarum-flags-frontend.yml
vendored
@@ -1,23 +0,0 @@
|
|||||||
name: Flags JS
|
|
||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run:
|
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
|
|
||||||
with:
|
|
||||||
enable_bundlewatch: false
|
|
||||||
enable_prettier: true
|
|
||||||
enable_typescript: true
|
|
||||||
|
|
||||||
frontend_directory: ./extensions/flags/js
|
|
||||||
backend_directory: ./extensions/flags
|
|
||||||
js_package_manager: yarn
|
|
||||||
main_git_branch: main
|
|
||||||
|
|
||||||
secrets:
|
|
||||||
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
|
|
8
.github/workflows/flarum-likes-backend.yml
vendored
8
.github/workflows/flarum-likes-backend.yml
vendored
@@ -2,14 +2,10 @@ name: Likes PHP
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
|
uses: ./.github/workflows/REUSABLE_backend.yml
|
||||||
with:
|
with:
|
||||||
enable_backend_testing: false
|
enable_backend_testing: true
|
||||||
|
|
||||||
backend_directory: ./extensions/likes
|
backend_directory: ./extensions/likes
|
||||||
|
23
.github/workflows/flarum-likes-frontend.yml
vendored
23
.github/workflows/flarum-likes-frontend.yml
vendored
@@ -1,23 +0,0 @@
|
|||||||
name: Likes JS
|
|
||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run:
|
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
|
|
||||||
with:
|
|
||||||
enable_bundlewatch: false
|
|
||||||
enable_prettier: true
|
|
||||||
enable_typescript: false
|
|
||||||
|
|
||||||
frontend_directory: ./extensions/likes/js
|
|
||||||
backend_directory: ./extensions/likes
|
|
||||||
js_package_manager: yarn
|
|
||||||
main_git_branch: main
|
|
||||||
|
|
||||||
secrets:
|
|
||||||
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
|
|
6
.github/workflows/flarum-lock-backend.yml
vendored
6
.github/workflows/flarum-lock-backend.yml
vendored
@@ -2,13 +2,9 @@ name: Lock PHP
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
|
uses: ./.github/workflows/REUSABLE_backend.yml
|
||||||
with:
|
with:
|
||||||
enable_backend_testing: false
|
enable_backend_testing: false
|
||||||
|
|
||||||
|
23
.github/workflows/flarum-lock-frontend.yml
vendored
23
.github/workflows/flarum-lock-frontend.yml
vendored
@@ -1,23 +0,0 @@
|
|||||||
name: Lock JS
|
|
||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run:
|
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
|
|
||||||
with:
|
|
||||||
enable_bundlewatch: false
|
|
||||||
enable_prettier: true
|
|
||||||
enable_typescript: false
|
|
||||||
|
|
||||||
frontend_directory: ./extensions/lock/js
|
|
||||||
backend_directory: ./extensions/lock
|
|
||||||
js_package_manager: yarn
|
|
||||||
main_git_branch: main
|
|
||||||
|
|
||||||
secrets:
|
|
||||||
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
|
|
@@ -2,13 +2,9 @@ name: Markdown PHP
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
|
uses: ./.github/workflows/REUSABLE_backend.yml
|
||||||
with:
|
with:
|
||||||
enable_backend_testing: false
|
enable_backend_testing: false
|
||||||
|
|
||||||
|
23
.github/workflows/flarum-markdown-frontend.yml
vendored
23
.github/workflows/flarum-markdown-frontend.yml
vendored
@@ -1,23 +0,0 @@
|
|||||||
name: Markdown JS
|
|
||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run:
|
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
|
|
||||||
with:
|
|
||||||
enable_bundlewatch: false
|
|
||||||
enable_prettier: true
|
|
||||||
enable_typescript: false
|
|
||||||
|
|
||||||
frontend_directory: ./extensions/markdown/js
|
|
||||||
backend_directory: ./extensions/markdown
|
|
||||||
js_package_manager: yarn
|
|
||||||
main_git_branch: main
|
|
||||||
|
|
||||||
secrets:
|
|
||||||
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
|
|
@@ -2,13 +2,9 @@ name: Mentions PHP
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
|
uses: ./.github/workflows/REUSABLE_backend.yml
|
||||||
with:
|
with:
|
||||||
enable_backend_testing: true
|
enable_backend_testing: true
|
||||||
|
|
||||||
|
23
.github/workflows/flarum-mentions-frontend.yml
vendored
23
.github/workflows/flarum-mentions-frontend.yml
vendored
@@ -1,23 +0,0 @@
|
|||||||
name: Mentions JS
|
|
||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run:
|
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
|
|
||||||
with:
|
|
||||||
enable_bundlewatch: false
|
|
||||||
enable_prettier: true
|
|
||||||
enable_typescript: false
|
|
||||||
|
|
||||||
frontend_directory: ./extensions/mentions/js
|
|
||||||
backend_directory: ./extensions/mentions
|
|
||||||
js_package_manager: yarn
|
|
||||||
main_git_branch: main
|
|
||||||
|
|
||||||
secrets:
|
|
||||||
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
|
|
@@ -2,13 +2,9 @@ name: Nicknames PHP
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
|
uses: ./.github/workflows/REUSABLE_backend.yml
|
||||||
with:
|
with:
|
||||||
enable_backend_testing: true
|
enable_backend_testing: true
|
||||||
|
|
||||||
|
23
.github/workflows/flarum-nicknames-frontend.yml
vendored
23
.github/workflows/flarum-nicknames-frontend.yml
vendored
@@ -1,23 +0,0 @@
|
|||||||
name: Nicknames JS
|
|
||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run:
|
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
|
|
||||||
with:
|
|
||||||
enable_bundlewatch: false
|
|
||||||
enable_prettier: true
|
|
||||||
enable_typescript: false
|
|
||||||
|
|
||||||
frontend_directory: ./extensions/nicknames/js
|
|
||||||
backend_directory: ./extensions/nicknames
|
|
||||||
js_package_manager: yarn
|
|
||||||
main_git_branch: main
|
|
||||||
|
|
||||||
secrets:
|
|
||||||
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
|
|
@@ -1,23 +0,0 @@
|
|||||||
name: Package Manager JS
|
|
||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run:
|
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
|
|
||||||
with:
|
|
||||||
enable_bundlewatch: false
|
|
||||||
enable_prettier: true
|
|
||||||
enable_typescript: true
|
|
||||||
|
|
||||||
frontend_directory: ./extensions/package-manager/js
|
|
||||||
backend_directory: ./extensions/package-manager
|
|
||||||
js_package_manager: yarn
|
|
||||||
main_git_branch: main
|
|
||||||
|
|
||||||
secrets:
|
|
||||||
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
|
|
6
.github/workflows/flarum-pusher-backend.yml
vendored
6
.github/workflows/flarum-pusher-backend.yml
vendored
@@ -2,13 +2,9 @@ name: Pusher PHP
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
|
uses: ./.github/workflows/REUSABLE_backend.yml
|
||||||
with:
|
with:
|
||||||
enable_backend_testing: false
|
enable_backend_testing: false
|
||||||
|
|
||||||
|
23
.github/workflows/flarum-pusher-frontend.yml
vendored
23
.github/workflows/flarum-pusher-frontend.yml
vendored
@@ -1,23 +0,0 @@
|
|||||||
name: Pusher JS
|
|
||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run:
|
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
|
|
||||||
with:
|
|
||||||
enable_bundlewatch: false
|
|
||||||
enable_prettier: true
|
|
||||||
enable_typescript: true
|
|
||||||
|
|
||||||
frontend_directory: ./extensions/pusher/js
|
|
||||||
backend_directory: ./extensions/pusher
|
|
||||||
js_package_manager: yarn
|
|
||||||
main_git_branch: main
|
|
||||||
|
|
||||||
secrets:
|
|
||||||
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
|
|
@@ -2,13 +2,9 @@ name: Statistics PHP
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
|
uses: ./.github/workflows/REUSABLE_backend.yml
|
||||||
with:
|
with:
|
||||||
enable_backend_testing: true
|
enable_backend_testing: true
|
||||||
|
|
||||||
|
23
.github/workflows/flarum-statistics-frontend.yml
vendored
23
.github/workflows/flarum-statistics-frontend.yml
vendored
@@ -1,23 +0,0 @@
|
|||||||
name: Statistics JS
|
|
||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run:
|
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
|
|
||||||
with:
|
|
||||||
enable_bundlewatch: false
|
|
||||||
enable_prettier: true
|
|
||||||
enable_typescript: true
|
|
||||||
|
|
||||||
frontend_directory: ./extensions/statistics/js
|
|
||||||
backend_directory: ./extensions/statistics
|
|
||||||
js_package_manager: yarn
|
|
||||||
main_git_branch: main
|
|
||||||
|
|
||||||
secrets:
|
|
||||||
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
|
|
8
.github/workflows/flarum-sticky-backend.yml
vendored
8
.github/workflows/flarum-sticky-backend.yml
vendored
@@ -2,14 +2,10 @@ name: Sticky PHP
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
|
uses: ./.github/workflows/REUSABLE_backend.yml
|
||||||
with:
|
with:
|
||||||
enable_backend_testing: false
|
enable_backend_testing: true
|
||||||
|
|
||||||
backend_directory: ./extensions/sticky
|
backend_directory: ./extensions/sticky
|
||||||
|
23
.github/workflows/flarum-sticky-frontend.yml
vendored
23
.github/workflows/flarum-sticky-frontend.yml
vendored
@@ -1,23 +0,0 @@
|
|||||||
name: Sticky JS
|
|
||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run:
|
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
|
|
||||||
with:
|
|
||||||
enable_bundlewatch: false
|
|
||||||
enable_prettier: true
|
|
||||||
enable_typescript: false
|
|
||||||
|
|
||||||
frontend_directory: ./extensions/sticky/js
|
|
||||||
backend_directory: ./extensions/sticky
|
|
||||||
js_package_manager: yarn
|
|
||||||
main_git_branch: main
|
|
||||||
|
|
||||||
secrets:
|
|
||||||
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
|
|
@@ -2,14 +2,10 @@ name: Subscriptions PHP
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
|
uses: ./.github/workflows/REUSABLE_backend.yml
|
||||||
with:
|
with:
|
||||||
enable_backend_testing: false
|
enable_backend_testing: true
|
||||||
|
|
||||||
backend_directory: ./extensions/subscriptions
|
backend_directory: ./extensions/subscriptions
|
||||||
|
@@ -1,23 +0,0 @@
|
|||||||
name: Subscriptions JS
|
|
||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run:
|
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
|
|
||||||
with:
|
|
||||||
enable_bundlewatch: false
|
|
||||||
enable_prettier: true
|
|
||||||
enable_typescript: false
|
|
||||||
|
|
||||||
frontend_directory: ./extensions/subscriptions/js
|
|
||||||
backend_directory: ./extensions/subscriptions
|
|
||||||
js_package_manager: yarn
|
|
||||||
main_git_branch: main
|
|
||||||
|
|
||||||
secrets:
|
|
||||||
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
|
|
8
.github/workflows/flarum-suspend-backend.yml
vendored
8
.github/workflows/flarum-suspend-backend.yml
vendored
@@ -2,14 +2,10 @@ name: Suspend PHP
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
|
uses: ./.github/workflows/REUSABLE_backend.yml
|
||||||
with:
|
with:
|
||||||
enable_backend_testing: false
|
enable_backend_testing: true
|
||||||
|
|
||||||
backend_directory: ./extensions/suspend
|
backend_directory: ./extensions/suspend
|
||||||
|
23
.github/workflows/flarum-suspend-frontend.yml
vendored
23
.github/workflows/flarum-suspend-frontend.yml
vendored
@@ -1,23 +0,0 @@
|
|||||||
name: Suspend JS
|
|
||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run:
|
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
|
|
||||||
with:
|
|
||||||
enable_bundlewatch: false
|
|
||||||
enable_prettier: true
|
|
||||||
enable_typescript: false
|
|
||||||
|
|
||||||
frontend_directory: ./extensions/suspend/js
|
|
||||||
backend_directory: ./extensions/suspend
|
|
||||||
js_package_manager: yarn
|
|
||||||
main_git_branch: main
|
|
||||||
|
|
||||||
secrets:
|
|
||||||
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
|
|
6
.github/workflows/flarum-tags-backend.yml
vendored
6
.github/workflows/flarum-tags-backend.yml
vendored
@@ -2,13 +2,9 @@ name: Tags PHP
|
|||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run:
|
run:
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_backend.yml@main
|
uses: ./.github/workflows/REUSABLE_backend.yml
|
||||||
with:
|
with:
|
||||||
enable_backend_testing: true
|
enable_backend_testing: true
|
||||||
|
|
||||||
|
22
.github/workflows/flarum-tags-frontend.yml
vendored
22
.github/workflows/flarum-tags-frontend.yml
vendored
@@ -1,22 +0,0 @@
|
|||||||
name: Tags JS
|
|
||||||
|
|
||||||
on: [workflow_dispatch, push, pull_request]
|
|
||||||
|
|
||||||
# The reusable workflow definitions will be moved to the `flarum/framework` repo soon.
|
|
||||||
# This will break your current script.
|
|
||||||
# When this happens, run `flarum-cli audit infra --fix` to update your infrastructure.
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
run:
|
|
||||||
uses: flarum/.github/.github/workflows/REUSABLE_frontend.yml@main
|
|
||||||
with:
|
|
||||||
enable_bundlewatch: false
|
|
||||||
enable_prettier: false
|
|
||||||
enable_typescript: true
|
|
||||||
|
|
||||||
frontend_directory: ./extensions/tags/js
|
|
||||||
backend_directory: ./extensions/tags
|
|
||||||
js_package_manager: yarn
|
|
||||||
main_git_branch: main
|
|
||||||
secrets:
|
|
||||||
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
|
|
19
.github/workflows/frontend.yml
vendored
Executable file
19
.github/workflows/frontend.yml
vendored
Executable file
@@ -0,0 +1,19 @@
|
|||||||
|
name: Framework JS
|
||||||
|
|
||||||
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
run:
|
||||||
|
uses: ./.github/workflows/REUSABLE_frontend.yml
|
||||||
|
with:
|
||||||
|
frontend_directory: ./
|
||||||
|
backend_directory: ./
|
||||||
|
js_package_manager: yarn
|
||||||
|
cache_dependency_path: ./yarn.lock
|
||||||
|
main_git_branch: 1.x
|
||||||
|
enable_tests: true
|
||||||
|
# @TODO: fix bundlewatch
|
||||||
|
enable_bundlewatch: false
|
||||||
|
|
||||||
|
secrets:
|
||||||
|
bundlewatch_github_token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
|
12
.github/workflows/phpstan.yml
vendored
Normal file
12
.github/workflows/phpstan.yml
vendored
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
name: Framework PHP
|
||||||
|
|
||||||
|
on: [workflow_dispatch, push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
run:
|
||||||
|
uses: ./.github/workflows/REUSABLE_backend.yml
|
||||||
|
with:
|
||||||
|
enable_backend_testing: false
|
||||||
|
enable_phpstan: true
|
||||||
|
|
||||||
|
backend_directory: .
|
26
.github/workflows/prepare-release.yml
vendored
Normal file
26
.github/workflows/prepare-release.yml
vendored
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
name: Prepare Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
version:
|
||||||
|
description: 'Version to release'
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
run:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
issues: write
|
||||||
|
pull-requests: read
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Prepare release
|
||||||
|
uses: flarum/action-release@master
|
||||||
|
with:
|
||||||
|
next_tag: ${{ inputs.version }}
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
open_collective_token: ${{ secrets.OPEN_COLLECTIVE_TOKEN }}
|
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1 +1,3 @@
|
|||||||
node_modules
|
node_modules
|
||||||
|
vendor
|
||||||
|
composer.lock
|
||||||
|
@@ -1,6 +1,415 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## [1.2.0](https://github.com/flarum/flarum-core/compare/v1.1.1...v1.2.0)
|
## [v1.8.10](https://github.com/flarum/framework/compare/v1.8.9...v1.8.10)
|
||||||
|
### Fixed
|
||||||
|
* Session Hijacking via Authoritative Subdomain Cookie Overwrite (https://github.com/flarum/framework/security/advisories/GHSA-hg9j-64wp-m9px)
|
||||||
|
* change starting position of `aria-posinset` (https://github.com/flarum/framework/pull/4192)
|
||||||
|
* sanitize page param in `Tag` (https://github.com/flarum/framework/pull/4170)
|
||||||
|
### Changed
|
||||||
|
* make search debounce time extensible (https://github.com/flarum/framework/pull/4171)
|
||||||
|
* skip incompatible extension updates (https://github.com/flarum/framework/pull/4176)
|
||||||
|
* increase email field length in `email_tokens` (https://github.com/flarum/framework/pull/4125)
|
||||||
|
* update JS deps (https://github.com/flarum/framework/pull/4204)
|
||||||
|
|
||||||
|
## [v1.8.9](https://github.com/flarum/framework/compare/v1.8.8...v1.8.9)
|
||||||
|
### Fixed
|
||||||
|
* change condition when unread label is shown in Scrubber (https://github.com/flarum/framework/pull/4116)
|
||||||
|
* resolve a11y warnings in Admin Frontend (https://github.com/flarum/framework/pull/4114)
|
||||||
|
* return empty object if selected mail driver is unavailable (https://github.com/flarum/framework/pull/4113)
|
||||||
|
### Changed
|
||||||
|
* change private to protected, allowing extensibility (https://github.com/flarum/framework/pull/4119)
|
||||||
|
* change length of email field (https://github.com/flarum/framework/pull/4117)
|
||||||
|
### Added
|
||||||
|
* Implement Support for Translatable Validation Attribute Errors (https://github.com/flarum/framework/pull/4070)
|
||||||
|
* PHP 8.4 support (https://github.com/flarum/framework/pull/4105)
|
||||||
|
* conditional extend whenExtensionDisabled (https://github.com/flarum/framework/pull/4107)
|
||||||
|
|
||||||
|
## [v1.8.8](https://github.com/flarum/framework/compare/v1.8.7...v1.8.8)
|
||||||
|
### Fixed
|
||||||
|
* previously suspended admin users cannot remove their avatar after suspension (https://github.com/flarum/framework/pull/4071)
|
||||||
|
* new search term not being passed (https://github.com/flarum/framework/pull/4083)
|
||||||
|
* postfooter did not apply the empty subclass (https://github.com/flarum/framework/pull/4085)
|
||||||
|
|
||||||
|
## [v1.8.7](https://github.com/flarum/framework/compare/v1.8.6...v1.8.7)
|
||||||
|
### Fixed
|
||||||
|
* BasicsPage not viewable if only one language pack enabled, and/or `flarum/nicknames` not enabled (https://github.com/flarum/framework/pull/4062)
|
||||||
|
|
||||||
|
## [v1.8.6](https://github.com/flarum/framework/compare/v1.8.5...v1.8.6)
|
||||||
|
### Fixed
|
||||||
|
* reset admin page save button in catch handler (https://github.com/flarum/framework/pull/3963)
|
||||||
|
* suspended users can remove avatar (https://github.com/flarum/framework/pull/3998)
|
||||||
|
* return null if content left empty in formatter (https://github.com/flarum/framework/pull/4059)
|
||||||
|
### Changed
|
||||||
|
* allow DiscussionsSearchSource to be extended (https://github.com/flarum/framework/pull/4025)
|
||||||
|
* allow modifying the discussion title on PostsUserPage (https://github.com/flarum/framework/pull/4031)
|
||||||
|
* make it easier to modify AppearancePage, BasicsPage, MailPage (https://github.com/flarum/framework/pull/4037)
|
||||||
|
* point fontawesome links at v5 free (https://github.com/flarum/framework/pull/4038)
|
||||||
|
* make WelcomeHero extensible (https://github.com/flarum/framework/pull/4039)
|
||||||
|
* make PostMeta extensible (https://github.com/flarum/framework/pull/4040)
|
||||||
|
* extensible TagHero (https://github.com/flarum/framework/pull/4041)
|
||||||
|
* allow extending PostPreview content (https://github.com/flarum/framework/pull/4043)
|
||||||
|
* allow classes that extends AbstractJob to be placed on a specified queue (https://github.com/flarum/framework/pull/4026)
|
||||||
|
* use common component for ip address display (https://github.com/flarum/framework/pull/4042)
|
||||||
|
* make it easier to add content after the first post (https://github.com/flarum/framework/pull/4050)
|
||||||
|
* improve extensibility of IndexPage (https://github.com/flarum/framework/pull/4045)
|
||||||
|
* improve extensibility of DiscussionPage (https://github.com/flarum/framework/pull/4046)
|
||||||
|
* backport & improve extensibility of DiscussionListItem (https://github.com/flarum/framework/pull/4048)
|
||||||
|
* improve & use extensibility of CommentPost & Post (https://github.com/flarum/framework/pull/4047)
|
||||||
|
* allow labels of PostStreamScrubber to be customized (https://github.com/flarum/framework/pull/4049)
|
||||||
|
* allow to customize time formats through translations (https://github.com/flarum/framework/pull/4053)
|
||||||
|
### Added
|
||||||
|
* Export all missing modules in compat (https://github.com/flarum/framework/pull/4044)
|
||||||
|
* Add (some) missing shims (https://github.com/flarum/framework/pull/4027)
|
||||||
|
* provide an 'actions' dropdown for extensions to add their additional buttons to the admin UserListPage (https://github.com/flarum/framework/pull/4054)
|
||||||
|
|
||||||
|
## [v1.8.5](https://github.com/flarum/framework/compare/v1.8.4...v1.8.5)
|
||||||
|
### Fixed
|
||||||
|
* Logout controller allows open redirects [#3948]
|
||||||
|
|
||||||
|
## [v1.8.4](https://github.com/flarum/framework/compare/v1.8.3...v1.8.4)
|
||||||
|
### Fixed
|
||||||
|
* `s9e/textformatter` 2.15 has breaking changes [#3946]
|
||||||
|
|
||||||
|
## [v1.8.3](https://github.com/flarum/framework/compare/v1.8.2...v1.8.3)
|
||||||
|
### Fixed
|
||||||
|
* Console extender does not accept ::class [#3900]
|
||||||
|
* Conditional extender instantiation [#3898]
|
||||||
|
|
||||||
|
## [v1.8.2](https://github.com/flarum/framework/compare/v1.8.1...v1.8.2)
|
||||||
|
### Fixed
|
||||||
|
* suspended users can abuse avatar upload [#3890]
|
||||||
|
* missing compat exports [#3888]
|
||||||
|
|
||||||
|
## [v1.8.1](https://github.com/flarum/framework/compare/v1.8.0...v1.8.1)
|
||||||
|
### Fixed
|
||||||
|
* recover temporary solution for html entities in browser title (e72541e35de4f71f9d870bbd9bb46ddf586bdf1d)
|
||||||
|
* custom contrast color affected by parents (577890d89c593ae5b6cb96083fab69e2f1ae600c)
|
||||||
|
* reply placeholder wrong positioning (253a3d281dbf5ce3fa712b629b80587cf67e7dbe)
|
||||||
|
* (mentions) missed post mentions UI changes with lazy loading [#3832]
|
||||||
|
* (mentions) cannot use newly introduced mentionables extender [#3849]
|
||||||
|
* (mentions) missing slug from post mention links ([5a4bb7c](5a4bb7ccf226f66dd44816cb69b3d7cfe4ad7f7c))
|
||||||
|
|
||||||
|
## [v1.8.0](https://github.com/flarum/framework/compare/v1.7.1...v1.8.0)
|
||||||
|
### Fixed
|
||||||
|
- (a11y) reply placeholder not accessible [#3793]
|
||||||
|
- (bbcode) highlight.js does not work after changing post content [#3817]
|
||||||
|
- (bbcode) localize quote `wrote` string [#3809]
|
||||||
|
- (mentions) mentions XHR fired even after mentioning is done [#3806]
|
||||||
|
- (package-manager) available core updates cause an error in the dashboard ([fab71f2](fab71f2d01fa20ce9b3002833339dc5ea3ea6301))
|
||||||
|
- (tags) not all tags are loaded in the permission grid [#3804]
|
||||||
|
- (tags) tag discussion modal filters with exact matches only after first index [#3786]
|
||||||
|
- (testing) always clear cache in integration test's tearDown [#3818]
|
||||||
|
- `UserSecurityPage` not exported ([232618a](232618aba604ab003425df38b895208c863d3260))
|
||||||
|
- `isDark()` utility can receive null value [#3774]
|
||||||
|
- approving a post does not bump user `comment_count` [#3790]
|
||||||
|
- circular dependencies disable all involved extensions [#3785]
|
||||||
|
- color input overflowing the input box [#3796]
|
||||||
|
- deleting a discussion from the profile does not visually remove it [#3799]
|
||||||
|
- discussion page showing horizontal scroll on iOS [#3821]
|
||||||
|
- empty string displayed as SelectDropdown title [#3773]
|
||||||
|
- filter values are not validated [#3795]
|
||||||
|
- infinite scroll not initialized for notifications on big screens [#3733]
|
||||||
|
- notification subject discussion eager loading fails [#3788]
|
||||||
|
- null as 2nd param in `preg_match` is deprecated [#3801]
|
||||||
|
- unread count in post stream not visible [#3791]
|
||||||
|
- unreadable badge icon on certain colors [#3810]
|
||||||
|
- integrity constraint violation [#3772]
|
||||||
|
### Changed
|
||||||
|
- (core,mentions) limit `mentionedBy` post relation results [#3780]
|
||||||
|
- (likes) limit `likes` relationship results [#3781]
|
||||||
|
- Change some methods from private to protected, to be able to extend the affected classes [#3802]
|
||||||
|
- Do not catch exceptions when testing Console commands [#3813]
|
||||||
|
- drop usage of jquery in `install` and `update` interfaces [#3797]
|
||||||
|
- extensibility improvements [#3729]
|
||||||
|
- major frontend JS cleanup [#3609]
|
||||||
|
- revert ineffective code for encoding of page title [#3768]
|
||||||
|
- speed up post creation time [#3808]
|
||||||
|
### Added
|
||||||
|
- (mentions,tags) tag mentions [#3769]
|
||||||
|
- add delete own posts permission [#3784]
|
||||||
|
- add a trait to flush the formatter cache in tests [#3811]
|
||||||
|
- add user creation to users list page [#3744]
|
||||||
|
- cli command for enabling or disabling an extension [#3816]
|
||||||
|
- conditional extenders [#3759]
|
||||||
|
- provide old content to `Revised` event [#3789]
|
||||||
|
|
||||||
|
## [v1.7.1](https://github.com/flarum/framework/compare/v1.7.0...v1.7.1)
|
||||||
|
### Fixed
|
||||||
|
- (tags) composer tag selection modal using wrong primary max & min numbers (abc9670659426b765274376945b818b70d84848c)
|
||||||
|
- missing parameter names in token title translation. (#3752)
|
||||||
|
- hardcoded language strings in StatusWidget (#3754)
|
||||||
|
- hide developer tokens section in if there is nothing to display or create (#3753)
|
||||||
|
- improve sessions user UI on mobile (dd868ab44e11e892d020e3b9412553c6a789e68d)
|
||||||
|
|
||||||
|
## [v1.7.0](https://github.com/flarum/framework/compare/v1.6.3...v1.7.0)
|
||||||
|
### Added
|
||||||
|
- (actions) allow running JS tests in GH actions [#3730]
|
||||||
|
- (core) PHP 8.2 Support [#3709]
|
||||||
|
- (jest) create jest config package for unit testing [#3678]
|
||||||
|
- (jest) mithril component testing [#3679]
|
||||||
|
- (phpstan) foundation for usage in extensions [#3666]
|
||||||
|
- (seo) Do not use h3 header for poster author in posts stream [#3732]
|
||||||
|
- (seo) Use h2 header for discussions on discussions list [#3731]
|
||||||
|
- (seo) shift h1 tag from logo to discussion title [#3724]
|
||||||
|
- (tags) admin tag selection component (reusable tag selection modal) [#3686]
|
||||||
|
- Admin User Search [#3712]
|
||||||
|
- access tokens user management UI [#3587]
|
||||||
|
- add display name column to admin users list [#3740]
|
||||||
|
- allow push additional items to the end of the poststream [#3691]
|
||||||
|
- allow using utf8 characters in tag slugs [#3588]
|
||||||
|
- expose queue driver, schedule status [#3593]
|
||||||
|
- expose {time} to eventPost data, fix renamed tooltip [#3698]
|
||||||
|
- frontend `Model` extender [#3646]
|
||||||
|
- global logout to clear all sessions, access tokens, email tokens and password tokens [#3605]
|
||||||
|
- improved page navigation for users list [#3741]
|
||||||
|
- introduce frontend extenders [#3645]
|
||||||
|
### Fixed
|
||||||
|
- (mentions) correctly convert a 3 char. hex color to a 6 char. one [#3694]
|
||||||
|
- (mentions) post reply mention missing notification on approval [#3738]
|
||||||
|
- (phpstan) adapt phpstan package for extension use [#3727]
|
||||||
|
- (tags) clickable tag labels have underline [#3737]
|
||||||
|
- (tags) tag text color contrast [#3653]
|
||||||
|
- 3 digit hex color value in color input not supported [#3706]
|
||||||
|
- column `id` can be ambiguous in group filter with extensions [#3696]
|
||||||
|
- disallow certain dangerous LESS features ([1761660](1761660c98ea5a3e9665fb8e6041d1f2ee62a444))
|
||||||
|
- evaluated page title content [#3684]
|
||||||
|
- invalid translation key for scheduler dashboard [#3736]
|
||||||
|
- load actor.groups on showforumcontroller [#3716]
|
||||||
|
- make go-to-page input number-like [#3743]
|
||||||
|
- normal logout affects all sessions [#3571]
|
||||||
|
- permissions table on mobile is unusable [#3722]
|
||||||
|
- post dropdown opens all dropdowns in `.Post-actions` [#3675]
|
||||||
|
- typo in Formatter extender docblock [#3676]
|
||||||
|
- undefined showing in dropdown active title [#3700]
|
||||||
|
### Changed
|
||||||
|
- (phpstan) enable phpstan in bundled extensions [#3667]
|
||||||
|
- Add missing states exports to `compat.ts` [#3683]
|
||||||
|
- Indicate cross-origin request in generic error message [#3669]
|
||||||
|
- Merge branch 'release/v1.6.2' ([e0b9dcf](e0b9dcfbcd7db175368dbc98255f9223da8df17d))
|
||||||
|
- The negate field doesn't get used, which means you cant exclude tags [#3713]
|
||||||
|
- Update forum.less to fix the misalignment of the choose tags button [#3726]
|
||||||
|
- `yarn audit-fix` ([8ddb0fe](8ddb0feb097dad06c5763107d7a7f7b5a55562c4))
|
||||||
|
- `yarn` ([ee1e04c](ee1e04cdc26b3e63057a58899f32f482901a95fd))
|
||||||
|
- convert `Dropdown` components to TS [#3608]
|
||||||
|
- fix php 8.1 on preg_match 2nd argument being null, which also optimizes slightly ([d7b9a03](d7b9a03f31847c39631ba495df8f515509774610))
|
||||||
|
- improve group mentions parsing [#3723]
|
||||||
|
- prepare `@flarum/jest-config` for release ([748cca6](748cca6d12f8b1744a6017c09395725bdbb4a118))
|
||||||
|
- remove use of deprecated phpunit assertion ([3af0481](3af0481f304277f5380fac9c9b169a7fa651f53b))
|
||||||
|
- set flarum version to 1.7.0 for dev ([2517bc0](2517bc0f70b0f0e3d3ea3f6ae06af8604d89b25d))
|
||||||
|
- update JS dependencies [#3695]
|
||||||
|
|
||||||
|
## [v1.6.3](https://github.com/flarum/framework/compare/v1.6.2...v1.6.3)
|
||||||
|
### Fixed
|
||||||
|
* Post mentions can be used to read any post on the forum without access control (ab1c868b978e8b0d09a5d682c54665dae17d0985).
|
||||||
|
* Notifications can leak restricted content (d0a2b95dca57d3dae9a0d77b610b1cb1d0b1766a).
|
||||||
|
* Any user including unactivated can reply in public discussions whose first post was permanently deleted (12f14112a0ecd1484d97330b82beb2a145919015).
|
||||||
|
* (subscriptions) Post notifications not getting access checked (https://github.com/flarum/framework/commit/e5f05166a062a9a6eb7c12e28728bfd5db7270e3).
|
||||||
|
|
||||||
|
## [v1.6.2](https://github.com/flarum/framework/compare/v1.6.1...v1.6.2)
|
||||||
|
### Fixed
|
||||||
|
* XSS Vulnerability in core (https://github.com/flarum/framework/pull/3684).
|
||||||
|
|
||||||
|
## [v1.6.1](https://github.com/flarum/framework/compare/v1.6.0...v1.6.1)
|
||||||
|
### Fixed
|
||||||
|
* JS dependencies update breaks utilities.
|
||||||
|
|
||||||
|
## [v1.6.0](https://github.com/flarum/framework/compare/v1.5.0...v1.6.0)
|
||||||
|
### Fixed
|
||||||
|
- (approval) posts approved for deleted users error ([b5874a0](b5874a08e482196f50af50aa78e43c93c29fb647))
|
||||||
|
- (regression) bad import ([5f2d7fb](5f2d7fb7b6e430d40cf2bb05eca7c73f6ca5a2cc))
|
||||||
|
- akismet fails when the extension is not on a version ([45d9121](45d91212f6bfa777cae9fc06c55c85d01ffd174d))
|
||||||
|
- apply flex for AppearancePage colors input [#3651]
|
||||||
|
- groupmentions have poor contrast on some backgrounds [#3672]
|
||||||
|
- larastan v1 incompatible with phpstan v1.9.0 [#3665]
|
||||||
|
- package manager failures not showing alerts [#3647]
|
||||||
|
- password reset leaks user existence [#3616]
|
||||||
|
- statistics previous period chart is unclear [#3654]
|
||||||
|
### Changed
|
||||||
|
- (package-manager) config composer to use web php version ([fd19645](fd196454a5641776784fa80886cc7577c840f8ed))
|
||||||
|
- (package-manager) set min core version and add warning ([31c3cfc](31c3cfc4eab4c314260b9b0d11e53ac2d4be158d))
|
||||||
|
- (statistics) prepare v1.5.1 ([dc215ab](dc215aba59145dfd7b0d6efad4388444f30e47fb))
|
||||||
|
- Apply fixes from StyleCI ([267f675](267f6759f80bd06f468337245ea6045635e827d9))
|
||||||
|
- Fix tag discussion count decreased by 2 when hiding before deleting [#3660]
|
||||||
|
- Log migration path when up/down keys are missing [#3664]
|
||||||
|
- Make it possible to extend SetupScript [#3643]
|
||||||
|
- Setup PHPStan Level 5 [#3553]
|
||||||
|
- `yarn format` ([c5c312d](c5c312db0d800e3b84b94a4abb9691e348dea742))
|
||||||
|
- add missing last period to custom date ranges [#3661]
|
||||||
|
- add priorities to profile settings page [#3657]
|
||||||
|
- allow specifying php extensions in workflow ([b0b47a0](b0b47a0888f513a459b67e9f89e72a61de38f1ce))
|
||||||
|
- format js ([06963df](06963df4079373fc8fc51b7479e9576f02beb098))
|
||||||
|
- group mentions [#3658]
|
||||||
|
- remove styleci from changelog ([b2fa28e](b2fa28e4b57094e46dbdb3d79fab74f290a17d17))
|
||||||
|
- set flarum version to dev for 1.6.0 ([fc743ba](fc743ba88872031db13597d7365a063b8004c78f))
|
||||||
|
- throw an exception when no serializer is provided to the controller [#3614]
|
||||||
|
### Added
|
||||||
|
- (statistics) support for custom date ranges [#3622]
|
||||||
|
- Allow additional login params, Introduce `LogInValidator` [#3670]
|
||||||
|
- Allow additional reset password params, introduce `ForgotPasswordValidator` [#3671]
|
||||||
|
- add statistics chart export button [#3662]
|
||||||
|
- allow specifying extensions when installing an instance [#3655]
|
||||||
|
- contrast util with yiq calculator [#3652]
|
||||||
|
- customizable session driver [#3610]
|
||||||
|
- replace `ColorPreviewInput` for GroupModal color input [#3650]
|
||||||
|
- send notifications of a new reply when post is approved [#3656]
|
||||||
|
|
||||||
|
## [v1.5.0](https://github.com/flarum/framework/compare/v1.4.0...v1.5.0)
|
||||||
|
### Fixed
|
||||||
|
- (a11y) add accessible labels to notification grid options [#3520]
|
||||||
|
- (a11y) present post streams as feeds [#3522]
|
||||||
|
- (a11y) set `aria-busy` when editing a post stream item [#3521]
|
||||||
|
- (compilation) versioner not inject into compilers [#3589]
|
||||||
|
- (mentions) accessing `id` of null `user` relation [#3618]
|
||||||
|
- (subscriptions) add missing table prefix for filter gambit [#3599]
|
||||||
|
- (tags) use default index sortmap [#3615]
|
||||||
|
- Move guzzle requirement to core [#3544]
|
||||||
|
- MyISAM tables for extensions during installation ([75aaef7](75aaef7d76317bc8578eac1439fed8091c87213b), [f926c58](f926c58e0143fe75a4a4c2e93810970c5910afc8))
|
||||||
|
- Set the translator locale to user preference for email notifications [#3525]
|
||||||
|
- `$events` property declared dynamically [#3598]
|
||||||
|
- core settings header has no priority ([33bf228](33bf2284c77863a1bb18d71d87b8516483056a74))
|
||||||
|
- html entities shown raw in page title [#3542]
|
||||||
|
- incorrect centring of deleted user avatars in notification list [#3569]
|
||||||
|
- intellisense imports defaulting to absolute path from `src` folder [#3549]
|
||||||
|
- minor backward compatible fix for php 8.1 in st_replace ([07b2f86](07b2f86dcc90a3ef17c8ee19a1a07e99a4b17360))
|
||||||
|
- post query wildcard selection causes ambiguity [#3621]
|
||||||
|
- potential static caching memory exhaustion [#3548]
|
||||||
|
- prepare release workflow has invalid layout ([70e483d](70e483d1b185332910be9513fd06cc6342830d49))
|
||||||
|
- remove deprecation warning for decoding null values ([590639f](590639f5f3e1fe883f28c41e1f175c2826b4b5f4))
|
||||||
|
- replace `.fa()` mixin usage with `.fas()` [#3537]
|
||||||
|
- return type hint static is php 8+ ([b01b75e](b01b75e36790d8026dd27ce59051d9581ad47940))
|
||||||
|
- sticky nav content displays below post stream [#3575]
|
||||||
|
- titles positioned wrongly with custom header height [#3550]
|
||||||
|
- typo in error message ([1a189f4](1a189f492320071365286a8835bc49d5a9571753))
|
||||||
|
- unread notifications are globally cached between users. [#3543]
|
||||||
|
- update workflow name ([628c281](628c281c39855f01069ddc40b698d80d29fec870))
|
||||||
|
- user has wrong discussion read status [#3591]
|
||||||
|
### Changed
|
||||||
|
- (approval, likes) use subscribers [#3577]
|
||||||
|
- (package-manager) last tweaks before beta tag ([335c602](335c602cea3fbaee9ad7c32ceecaaf222e5d89a7))
|
||||||
|
- (statistics) add release notes for 1.4.1 ([f4ace73](f4ace73a3c59434b8717efb2d83f50084f470fe4))
|
||||||
|
- (statistics) rewrite for performance on very large communities [#3531]
|
||||||
|
- (statistics) split timed data into per-model XHR requests [#3601]
|
||||||
|
- (tags) Replace event helper with event dispatcher [#3570]
|
||||||
|
- Add `loading="lazy"` attribute for avatars [#3578]
|
||||||
|
- Create CODEOWNERS ([6e48a03](6e48a0303e45bcf210e550ba3e0772bc8443a207))
|
||||||
|
- MyISAM tables for extensions during installation" ([f128190](f128190f143398dd1262fd1379e634794daee4c1))
|
||||||
|
- convert `AlertManager` `IndexPage` and `UserPage` components to TS [#3536]
|
||||||
|
- convert `Badge` `Checkbox` and `Navigation` components to TS [#3532]
|
||||||
|
- convert core modals to TypeScript [#3515]
|
||||||
|
- convert page components to TypeScript [#3538]
|
||||||
|
- debug line slipped in while rebasing a PR [#3580]
|
||||||
|
- don't pass password field between auth modals [#3626]
|
||||||
|
- fix github issue templates ([d3e456a](d3e456a1bf42d13b7cd2542c371f392712247c09))
|
||||||
|
- format code ([4954621](495462183bfb3b33046b293e6b1088ab225968df))
|
||||||
|
- getting the release workflow in ([5530400](5530400b093b5fd07d670e5c92d8a7da96634cfe))
|
||||||
|
- link logo at the top with the official website [#3552]
|
||||||
|
- prevent running both `push` and `pull_request` actions at the same time [#3597]
|
||||||
|
- refactor prefix matrix and add `MySQL 8.0` & `PHP 7.3` to workflows [#3595]
|
||||||
|
- relying on a third-party for avatar URL tests is unreliable [#3586]
|
||||||
|
- require guzzle 6 or 7 ([46b3b7a](46b3b7a9527b935c3c52269aaad2010c75dcb6d8))
|
||||||
|
- split FA imports into separate Less file for easy overriding [#3535]
|
||||||
|
- unify JS actions into one (rewritten `flarum/action-build`) [#3573]
|
||||||
|
- update version constant during cycle 22 ([d864405](d86440506dd37101e60adec591d4b017e7765ec6))
|
||||||
|
- use `isCollapsed` instead of `rangeCount` [#3581]
|
||||||
|
- use github issue template forms [#3526]
|
||||||
|
### Added
|
||||||
|
- (likes) Add likes tab to user profile [#3528]
|
||||||
|
- (likes) Option to prevent users liking their own posts [#3534]
|
||||||
|
- (modals) support stacking modals, remove bootstrap modals dependency [#3456]
|
||||||
|
- (subscriptions) add option to send notifications when not caught up [#3503]
|
||||||
|
- Add custom class for email confirmation alert [#3584]
|
||||||
|
- Admin debug mode warning [#3590]
|
||||||
|
- Delete all notifications [#3529]
|
||||||
|
- Queue package manager commands [#3418]
|
||||||
|
- Restart the queue worker after cache clearing, ext enable/disable, save settings [#3565]
|
||||||
|
- add createTableIfNotExists migration helper [#3576]
|
||||||
|
- add new workflow for generating release meta ([0901e59](0901e59a58a3e1f017762583a2adf419f7f34257))
|
||||||
|
- clear password & email tokens when appropriate [#3567]
|
||||||
|
- discussion UTF-8 slug driver [#3606]
|
||||||
|
- expose assets base url to frontend forum model [#3566]
|
||||||
|
- extender to add custom less variables [#3530]
|
||||||
|
- publish assets on admin dashboard cache clear [#3564]
|
||||||
|
- throttle email change, email confirmation, and password reset endpoints. [#3555]
|
||||||
|
|
||||||
|
## [1.4.0](https://github.com/flarum/framework/compare/v1.3.1...v1.4.0)
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- `created_at` and `updated_at` columns added to several tables (https://github.com/flarum/framework/pull/3435)
|
||||||
|
- Priorities added to AdminNav links (https://github.com/flarum/framework/pull/3453)
|
||||||
|
- `app.translator` allows retrieving and setting locale (https://github.com/flarum/framework/pull/3451)
|
||||||
|
- Extensions can now declare custom settings components for use with `buildSettingComponent` (https://github.com/flarum/framework/pull/3494)
|
||||||
|
- Implement extensibility on `rel` and `target` attributes on links (https://github.com/flarum/framework/pull/3455)
|
||||||
|
- New backend tests were added to some of the bundled extensions (https://github.com/flarum/framework/issues/3508)
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Split boot script for Flarum in HTML footer into two parts for CSP hashing (https://github.com/flarum/framework/pull/3461)
|
||||||
|
- Split asset compilation by giving assembling compilers its own method (https://github.com/flarum/framework/pull/3446)
|
||||||
|
- Increase visibility of Component typescript class for better extensibility (https://github.com/flarum/framework/pull/3437)
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Mentioning an event post breaks the notification dropdown (https://github.com/flarum/framework/pull/3493)
|
||||||
|
- Suspension modal shows after suspension is over (https://github.com/flarum/framework/pull/3449)
|
||||||
|
- CLI based installations don't exit with an error code on failure (https://github.com/flarum/framework/pull/3452)
|
||||||
|
- Tabbing through dropdown controls doesn't make them visible (https://github.com/flarum/framework/pull/3450)
|
||||||
|
- Requiring zero tags on new discussions forces the user to select tags (https://github.com/flarum/framework/pull/3448)
|
||||||
|
- Long topic titles in the notification list don't overflow (https://github.com/flarum/framework/pull/3500)
|
||||||
|
- Subtags of tags the user has access to are visible even if these are not accessible (https://github.com/flarum/framework/pull/3419)
|
||||||
|
- `assertAdmin` tests access based on wrong gate ability (https://github.com/flarum/framework/pull/3501)
|
||||||
|
- Increasing the composer header size causes elements to slip underneath (https://github.com/flarum/framework/pull/3502)
|
||||||
|
- The profile mentions tab errors when sorting by `created_at` (https://github.com/flarum/framework/pull/3506)
|
||||||
|
|
||||||
|
## [1.3.1](https://github.com/flarum/framework/compare/v1.3.0...v1.3.1)
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- UserCard now has ItemList for easier extending (https://github.com/flarum/framework/pull/3436)
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Button to go directly to all results page is hidden while API request for search hasn't completed (https://github.com/flarum/framework/pull/3431)
|
||||||
|
- Setting extender does not register modifications beyond first fluent call (https://github.com/flarum/framework/pull/3439)
|
||||||
|
- Link to font awesome icons list no longer works (https://github.com/flarum/framework/commit/df1bdd2ad84e992414c0e1e7be576558b4b0fe29)
|
||||||
|
- Mentions: mentions with deleted authors not showing (https://github.com/flarum/framework/pull/3432)
|
||||||
|
- Nicknames: regex validation isn't functional (https://github.com/flarum/framework/pull/3430)
|
||||||
|
- Subscriptions: reply notifications not working (https://github.com/flarum/framework/pull/3445)
|
||||||
|
- Suspend: not providing suspension reason breaks mail (https://github.com/flarum/framework/pull/3433)
|
||||||
|
|
||||||
|
<!-- One-time commit-based diff due to monorepo rework. Diffing against the 1.2.1 tag doesn't work due to unrelated histories. -->
|
||||||
|
## [1.3.0](https://github.com/flarum/framework/compare/33d939cb012716ed6309ea02236737ad4f25a75b...v1.3.0)
|
||||||
|
|
||||||
|
From v1.2.1 on all bundled Flarum extensions and `flarum/core` are merged into one monorepo. As a result of this, the full code diff linked above
|
||||||
|
looks rather complex and messy compared to the full list of changes made for this release.
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- [A11Y] Added role feed to DiscussionList (https://github.com/flarum/framework/pull/3359)
|
||||||
|
- Support multiple confirmation dialogs when closing a tab/window (https://github.com/flarum/framework/pull/3372)
|
||||||
|
- Markdown: markdown toolbar support for admin frontend (https://github.com/flarum/framework/commit/16d5cc11e3aee5c94aeed877987cdb199a2a0d2c)
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Post number calculation is now executed inside the database layer, preventing integrity constraints (https://github.com/flarum/framework/pull/3358)
|
||||||
|
- Errors from within extensions no longer make Flarum crash but trigger a visible warning (https://github.com/flarum/framework/pull/3349)
|
||||||
|
- Sorting options for discussion index is now extensible (https://github.com/flarum/framework/pull/3377)
|
||||||
|
- Event listeners from the framework now are added before those of extensions (https://github.com/flarum/framework/pull/3373)
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Typings and missing typescript components (https://github.com/flarum/framework/pull/3348)
|
||||||
|
- `Post--by-start-user` CSS class is not added to post html (https://github.com/flarum/framework/pull/3356)
|
||||||
|
- Timestamps for notifications are incorrect on servers that have a timezone different than UTC (https://github.com/flarum/framework/pull/3379)
|
||||||
|
- Extensions with dependencies that are enabled do not cause dependencies to be enforced (https://github.com/flarum/framework/pull/3352)
|
||||||
|
- Search using non-words doesn't work (https://github.com/flarum/framework/pull/3385)
|
||||||
|
- Slugs are not working for other languages than English (https://github.com/flarum/framework/pull/3387)
|
||||||
|
- Deprecations are triggered on PHP 8.1 (https://github.com/flarum/framework/pull/3384)
|
||||||
|
- Post permalink for subdirectory installs have duplicate paths segments (https://github.com/flarum/framework/pull/3354)
|
||||||
|
- Composer discussion title is not always clearly visible (https://github.com/flarum/framework/pull/3413)
|
||||||
|
- Mentions: extensions re-using mentions can cause errors due to missing context (https://github.com/flarum/framework/pull/3382)
|
||||||
|
- Tags: tag selection modal errors on new discussions when pressing down (https://github.com/flarum/framework/issues/3403)
|
||||||
|
- [A11Y] Tags: focus to input and layout of tag selection modal are off (https://github.com/flarum/framework/pull/3412)
|
||||||
|
- Subscriptions: searching inside the following page will search in all discussions (https://github.com/flarum/framework/pull/3376)
|
||||||
|
|
||||||
|
## [1.2.1](https://github.com/flarum/framework/compare/v1.2.0...v1.2.1)
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Don't escape single quotes in discussion title meta tags (60600f4d2b8f0c5dac94c329041427a0a08fad42)
|
||||||
|
|
||||||
|
## [1.2.0](https://github.com/flarum/framework/compare/v1.1.1...v1.2.0)
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
- View `README` documentation in extension pages (https://github.com/flarum/framework/pull/3094).
|
- View `README` documentation in extension pages (https://github.com/flarum/framework/pull/3094).
|
||||||
@@ -106,12 +515,12 @@
|
|||||||
### Deprecated
|
### Deprecated
|
||||||
- Unused `evented` utility (https://github.com/flarum/framework/pull/3125).
|
- Unused `evented` utility (https://github.com/flarum/framework/pull/3125).
|
||||||
|
|
||||||
## [1.1.1](https://github.com/flarum/flarum-core/compare/v1.1.0...v1.1.1)
|
## [1.1.1](https://github.com/flarum/framework/compare/v1.1.0...v1.1.1)
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Performance issue with very large communities.
|
- Performance issue with very large communities.
|
||||||
|
|
||||||
## [1.1.0](https://github.com/flarum/flarum-core/compare/v1.0.4...v1.1.0)
|
## [1.1.0](https://github.com/flarum/framework/compare/v1.0.4...v1.1.0)
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
- Info command now displays MySQL version, queue driver, mail driver (https://github.com/flarum/framework/pull/2991)
|
- Info command now displays MySQL version, queue driver, mail driver (https://github.com/flarum/framework/pull/2991)
|
||||||
@@ -165,13 +574,13 @@
|
|||||||
###### Issue Reporters
|
###### Issue Reporters
|
||||||
@uamv, @dannyuk1982, @BurnNoticeSpy, @haarp, @peopleinside, @matteocontrini
|
@uamv, @dannyuk1982, @BurnNoticeSpy, @haarp, @peopleinside, @matteocontrini
|
||||||
|
|
||||||
## [1.0.4](https://github.com/flarum/flarum-core/compare/v1.0.3...v1.0.4)
|
## [1.0.4](https://github.com/flarum/framework/compare/v1.0.3...v1.0.4)
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- Upgrade to v1.0 resets the "view" permission on all tags (https://github.com/flarum/framework/pull/2941)
|
- Upgrade to v1.0 resets the "view" permission on all tags (https://github.com/flarum/framework/pull/2941)
|
||||||
|
|
||||||
## [1.0.3](https://github.com/flarum/flarum-core/compare/v1.0.2...v1.0.3)
|
## [1.0.3](https://github.com/flarum/framework/compare/v1.0.2...v1.0.3)
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
@@ -185,17 +594,17 @@
|
|||||||
- Avatar in notifications list are incorrectly aligned (https://github.com/flarum/framework/pull/2906)
|
- Avatar in notifications list are incorrectly aligned (https://github.com/flarum/framework/pull/2906)
|
||||||
- FilesystemManager is not compatible with upstream Laravel implementation (https://github.com/flarum/framework/pull/2936)
|
- FilesystemManager is not compatible with upstream Laravel implementation (https://github.com/flarum/framework/pull/2936)
|
||||||
|
|
||||||
## [1.0.2](https://github.com/flarum/flarum-core/compare/v1.0.1...v1.0.2)
|
## [1.0.2](https://github.com/flarum/framework/compare/v1.0.1...v1.0.2)
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Critical XSS vulnerability
|
- Critical XSS vulnerability
|
||||||
|
|
||||||
## [1.0.1](https://github.com/flarum/flarum-core/compare/v1.0.0...v1.0.1)
|
## [1.0.1](https://github.com/flarum/framework/compare/v1.0.0...v1.0.1)
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Installation fails on environments without proc_* functions enabled or mysql client binary (https://github.com/flarum/framework/issues/2890)
|
- Installation fails on environments without proc_* functions enabled or mysql client binary (https://github.com/flarum/framework/issues/2890)
|
||||||
|
|
||||||
## [1.0.0](https://github.com/flarum/flarum-core/compare/v0.1.0-beta.16...v1.0.0)
|
## [1.0.0](https://github.com/flarum/framework/compare/v0.1.0-beta.16...v1.0.0)
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
- Task scheduling
|
- Task scheduling
|
||||||
@@ -261,7 +670,7 @@
|
|||||||
- The session is no longer available from the User class (https://github.com/flarum/framework/pull/2790)
|
- The session is no longer available from the User class (https://github.com/flarum/framework/pull/2790)
|
||||||
- The `mail` key is removed from the laravel related config (https://github.com/flarum/framework/pull/2796)
|
- The `mail` key is removed from the laravel related config (https://github.com/flarum/framework/pull/2796)
|
||||||
|
|
||||||
## [0.1.0-beta.16](https://github.com/flarum/flarum-core/compare/v0.1.0-beta.15...v0.1.0-beta.16)
|
## [0.1.0-beta.16](https://github.com/flarum/framework/compare/v0.1.0-beta.15...v0.1.0-beta.16)
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
- Allow event subscribers (https://github.com/flarum/framework/pull/2535)
|
- Allow event subscribers (https://github.com/flarum/framework/pull/2535)
|
||||||
@@ -352,7 +761,7 @@
|
|||||||
- `UserFilter` ([91e8b56](https://github.com/flarum/framework/commit/91e8b569618957c86757ef89bac666e9102db5ae))
|
- `UserFilter` ([91e8b56](https://github.com/flarum/framework/commit/91e8b569618957c86757ef89bac666e9102db5ae))
|
||||||
|
|
||||||
|
|
||||||
## [0.1.0-beta.15](https://github.com/flarum/flarum-core/compare/v0.1.0-beta.14.1...v0.1.0-beta.15)
|
## [0.1.0-beta.15](https://github.com/flarum/framework/compare/v0.1.0-beta.14.1...v0.1.0-beta.15)
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
@@ -410,7 +819,7 @@
|
|||||||
|
|
||||||
- `CheckingForFlooding` (https://github.com/flarum/framework/commit/8e25bcb68f86cc992c46dfa70368419fe9f936ac).
|
- `CheckingForFlooding` (https://github.com/flarum/framework/commit/8e25bcb68f86cc992c46dfa70368419fe9f936ac).
|
||||||
|
|
||||||
## [0.1.0-beta.14.1](https://github.com/flarum/flarum-core/compare/v0.1.0-beta.14...v0.1.0-beta.14.1)
|
## [0.1.0-beta.14.1](https://github.com/flarum/framework/compare/v0.1.0-beta.14...v0.1.0-beta.14.1)
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
@@ -420,7 +829,7 @@
|
|||||||
- Sub path installations have no page title.
|
- Sub path installations have no page title.
|
||||||
- Losing focus of Composer area when coming from fullscreen.
|
- Losing focus of Composer area when coming from fullscreen.
|
||||||
|
|
||||||
## [0.1.0-beta.14](https://github.com/flarum/flarum-core/compare/v0.1.0-beta.13...v0.1.0-beta.14)
|
## [0.1.0-beta.14](https://github.com/flarum/framework/compare/v0.1.0-beta.13...v0.1.0-beta.14)
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
@@ -517,7 +926,7 @@
|
|||||||
- Global path helpers, `Flarum\Foundation\Application` path methods (https://github.com/flarum/framework/pull/2155)
|
- Global path helpers, `Flarum\Foundation\Application` path methods (https://github.com/flarum/framework/pull/2155)
|
||||||
- `Flarum\User\AssertPermissionTrait` (https://github.com/flarum/framework/pull/2044)
|
- `Flarum\User\AssertPermissionTrait` (https://github.com/flarum/framework/pull/2044)
|
||||||
|
|
||||||
## [0.1.0-beta.13](https://github.com/flarum/flarum-core/compare/v0.1.0-beta.12...v0.1.0-beta.13)
|
## [0.1.0-beta.13](https://github.com/flarum/framework/compare/v0.1.0-beta.12...v0.1.0-beta.13)
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
- Console extender (#2057)
|
- Console extender (#2057)
|
||||||
@@ -570,7 +979,7 @@
|
|||||||
- `Flarum\Event\ConfigureForumRoutes` event class
|
- `Flarum\Event\ConfigureForumRoutes` event class
|
||||||
- `Flarum\Event\ConfigureLocales` event class
|
- `Flarum\Event\ConfigureLocales` event class
|
||||||
|
|
||||||
## [0.1.0-beta.12](https://github.com/flarum/flarum-core/compare/v0.1.0-beta.11.1...v0.1.0-beta.12)
|
## [0.1.0-beta.12](https://github.com/flarum/framework/compare/v0.1.0-beta.11.1...v0.1.0-beta.12)
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
- Full support for PHP 7.4 (#1980)
|
- Full support for PHP 7.4 (#1980)
|
||||||
@@ -595,12 +1004,12 @@
|
|||||||
- Translation fallback was ignored for client-rendered pages (#1774, #1961)
|
- Translation fallback was ignored for client-rendered pages (#1774, #1961)
|
||||||
- The success alert when posting replies was invisible (#1976)
|
- The success alert when posting replies was invisible (#1976)
|
||||||
|
|
||||||
## [0.1.0-beta.11.1](https://github.com/flarum/flarum-core/compare/v0.1.0-beta.11...v0.1.0-beta.11.1)
|
## [0.1.0-beta.11.1](https://github.com/flarum/framework/compare/v0.1.0-beta.11...v0.1.0-beta.11.1)
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Saving custom css in admin failed (#1946)
|
- Saving custom css in admin failed (#1946)
|
||||||
|
|
||||||
## [0.1.0-beta.11](https://github.com/flarum/flarum-core/compare/v0.1.0-beta.10...v0.1.0-beta.11)
|
## [0.1.0-beta.11](https://github.com/flarum/framework/compare/v0.1.0-beta.10...v0.1.0-beta.11)
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
- Comments have an additional class `Post--by-actor` when posted by the user (#1927)
|
- Comments have an additional class `Post--by-actor` when posted by the user (#1927)
|
||||||
@@ -627,7 +1036,7 @@
|
|||||||
- Debug button no longer visible (#1687)
|
- Debug button no longer visible (#1687)
|
||||||
- Modals on smaller screens use the whole width of the page
|
- Modals on smaller screens use the whole width of the page
|
||||||
|
|
||||||
## [0.1.0-beta.10](https://github.com/flarum/flarum-core/compare/v0.1.0-beta.9...v0.1.0-beta.10)
|
## [0.1.0-beta.10](https://github.com/flarum/framework/compare/v0.1.0-beta.9...v0.1.0-beta.10)
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
- Initial queue support: Infrastructure for offloading long-running tasks (e.g. email sending) to background workers (#1773)
|
- Initial queue support: Infrastructure for offloading long-running tasks (e.g. email sending) to background workers (#1773)
|
||||||
@@ -653,7 +1062,7 @@
|
|||||||
- API requests authenticated using access tokens needed to provide a CSRF token (#1828)
|
- API requests authenticated using access tokens needed to provide a CSRF token (#1828)
|
||||||
- Accessibility: Screenreaders did not read the "Back to discussion list" link (#1835)
|
- Accessibility: Screenreaders did not read the "Back to discussion list" link (#1835)
|
||||||
|
|
||||||
## [0.1.0-beta.9](https://github.com/flarum/flarum-core/compare/v0.1.0-beta.8.2...v0.1.0-beta.9)
|
## [0.1.0-beta.9](https://github.com/flarum/framework/compare/v0.1.0-beta.8.2...v0.1.0-beta.9)
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
- New `hasPermission()` helper method for `Group` objects ([9684fbc](https://github.com/flarum/framework/commit/9684fbc4da07d32aa322d9228302a23418412cb9))
|
- New `hasPermission()` helper method for `Group` objects ([9684fbc](https://github.com/flarum/framework/commit/9684fbc4da07d32aa322d9228302a23418412cb9))
|
||||||
@@ -700,7 +1109,7 @@
|
|||||||
- `php flarum install --defaults` - this was meant to be used in our old development VM ([44c9109](https://github.com/flarum/framework/commit/44c91099cd77138bb5fc29f14fb1e81a9781272d))
|
- `php flarum install --defaults` - this was meant to be used in our old development VM ([44c9109](https://github.com/flarum/framework/commit/44c91099cd77138bb5fc29f14fb1e81a9781272d))
|
||||||
- Obsolete `id` attributes in JSON-API responses ([ecc3b5e](https://github.com/flarum/framework/commit/ecc3b5e2271f8d9b38d52cd54476d86995dbe32e) and [7a44086](https://github.com/flarum/framework/commit/7a44086bf3a0e3ba907dceb13d07ac695eca05ea))
|
- Obsolete `id` attributes in JSON-API responses ([ecc3b5e](https://github.com/flarum/framework/commit/ecc3b5e2271f8d9b38d52cd54476d86995dbe32e) and [7a44086](https://github.com/flarum/framework/commit/7a44086bf3a0e3ba907dceb13d07ac695eca05ea))
|
||||||
|
|
||||||
## [0.1.0-beta.8.1](https://github.com/flarum/flarum-core/compare/v0.1.0-beta.8...v0.1.0-beta.8.1)
|
## [0.1.0-beta.8.1](https://github.com/flarum/framework/compare/v0.1.0-beta.8...v0.1.0-beta.8.1)
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Fix live output in `migrate:reset` command ([f591585](https://github.com/flarum/framework/commit/f591585d02f8c4ff0211c5bf4413dd6baa724c05))
|
- Fix live output in `migrate:reset` command ([f591585](https://github.com/flarum/framework/commit/f591585d02f8c4ff0211c5bf4413dd6baa724c05))
|
12
README.md
12
README.md
@@ -1,11 +1,12 @@
|
|||||||
<p align="center"><img src="https://flarum.org/assets/img/logo.png"></p>
|
<p align="center">
|
||||||
|
<a href="https://flarum.org/"><img src="https://flarum.org/images/flarum.svg"></a>
|
||||||
|
</p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://github.com/flarum/framework/actions?query=workflow%3ATests"><img src="https://github.com/flarum/framework/workflows/Tests/badge.svg" alt="PHP Tests"></a>
|
<a href="https://github.com/flarum/core/actions?query=workflow%3ATests"><img src="https://github.com/flarum/core/workflows/Tests/badge.svg" alt="PHP Tests"></a>
|
||||||
<a href="https://packagist.org/packages/flarum/core"><img src="https://img.shields.io/packagist/dt/flarum/core" alt="Total Downloads"></a>
|
<a href="https://packagist.org/packages/flarum/core"><img src="https://img.shields.io/packagist/dt/flarum/core" alt="Total Downloads"></a>
|
||||||
<a href="https://packagist.org/packages/flarum/core"><img src="https://img.shields.io/github/v/release/flarum/framework?sort=semver" alt="Latest Version"></a>
|
<a href="https://packagist.org/packages/flarum/core"><img src="https://img.shields.io/github/v/release/flarum/core?sort=semver" alt="Latest Version"></a>
|
||||||
<a href="https://packagist.org/packages/flarum/core"><img src="https://img.shields.io/packagist/l/flarum/core" alt="License"></a>
|
<a href="https://packagist.org/packages/flarum/core"><img src="https://img.shields.io/packagist/l/flarum/core" alt="License"></a>
|
||||||
<a href="https://huntr.dev/bounties/disclose/?target=https://github.com/flarum/framework"><img src="https://cdn.huntr.dev/huntr_security_badge_mono.svg" alt="huntr"></a>
|
|
||||||
<a href="https://github.styleci.io/repos/28257573"><img src="https://github.styleci.io/repos/28257573/shield?style=flat" alt="StyleCI"></a>
|
<a href="https://github.styleci.io/repos/28257573"><img src="https://github.styleci.io/repos/28257573/shield?style=flat" alt="StyleCI"></a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -31,8 +32,9 @@ Thank you for considering contributing to Flarum! Please read the **[Contributin
|
|||||||
|
|
||||||
## Security Vulnerabilities
|
## Security Vulnerabilities
|
||||||
|
|
||||||
If you discover a security vulnerability within Flarum, please send an e-mail to [security@flarum.org](mailto:security@flarum.org). All security vulnerabilities will be promptly addressed. More details can be found in our [security policy](https://github.com/flarum/framework/security/policy).
|
If you discover a security vulnerability within Flarum, please send an e-mail to [security@flarum.org](mailto:security@flarum.org). All security vulnerabilities will be promptly addressed. More details can be found in our [security policy](https://github.com/flarum/core/security/policy).
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
Flarum is open-source software licensed under the [MIT License](https://github.com/flarum/flarum/blob/master/LICENSE).
|
Flarum is open-source software licensed under the [MIT License](https://github.com/flarum/flarum/blob/master/LICENSE).
|
||||||
|
|
||||||
|
192
composer.json
Normal file
192
composer.json
Normal file
@@ -0,0 +1,192 @@
|
|||||||
|
{
|
||||||
|
"name": "flarum/framework",
|
||||||
|
"description": "Delightfully simple forum software.",
|
||||||
|
"keywords": [
|
||||||
|
"forum",
|
||||||
|
"discussion"
|
||||||
|
],
|
||||||
|
"homepage": "https://flarum.org/",
|
||||||
|
"license": "MIT",
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Flarum",
|
||||||
|
"email": "info@flarum.org",
|
||||||
|
"homepage": "https://flarum.org/team"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/flarum"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "github",
|
||||||
|
"url": "https://github.com/sponsors/flarum"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "other",
|
||||||
|
"url": "https://flarum.org/donate"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/flarum/framework/issues",
|
||||||
|
"source": "https://github.com/flarum/framework",
|
||||||
|
"docs": "https://docs.flarum.org",
|
||||||
|
"forum": "https://discuss.flarum.org",
|
||||||
|
"chat": "https://flarum.org/chat"
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Flarum\\": "framework/core/src",
|
||||||
|
"Flarum\\Akismet\\": "extensions/akismet/src",
|
||||||
|
"Flarum\\Approval\\": "extensions/approval/src",
|
||||||
|
"Flarum\\BBCode\\": "extensions/bbcode/src",
|
||||||
|
"Flarum\\Flags\\": "extensions/flags/src",
|
||||||
|
"Flarum\\Likes\\": "extensions/likes/src",
|
||||||
|
"Flarum\\Lock\\": "extensions/lock/src",
|
||||||
|
"Flarum\\Mentions\\": "extensions/mentions/src",
|
||||||
|
"Flarum\\Nicknames\\": "extensions/nicknames/src",
|
||||||
|
"Flarum\\ExtensionManager\\": "extensions/package-manager/src",
|
||||||
|
"Flarum\\Pusher\\": "extensions/pusher/src",
|
||||||
|
"Flarum\\Statistics\\": "extensions/statistics/src",
|
||||||
|
"Flarum\\Sticky\\": "extensions/sticky/src",
|
||||||
|
"Flarum\\Subscriptions\\": "extensions/subscriptions/src",
|
||||||
|
"Flarum\\Suspend\\": "extensions/suspend/src",
|
||||||
|
"Flarum\\Tags\\": "extensions/tags/src",
|
||||||
|
"Flarum\\PHPStan\\": "php-packages/phpstan/src",
|
||||||
|
"Flarum\\Testing\\": "php-packages/testing/src"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"framework/core/src/helpers.php"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"replace": {
|
||||||
|
"flarum/core": "self.version",
|
||||||
|
"flarum/akismet": "self.version",
|
||||||
|
"flarum/approval": "self.version",
|
||||||
|
"flarum/bbcode": "self.version",
|
||||||
|
"flarum/embed": "self.version",
|
||||||
|
"flarum/emoji": "self.version",
|
||||||
|
"flarum/flags": "self.version",
|
||||||
|
"flarum/lang-english": "self.version",
|
||||||
|
"flarum/likes": "self.version",
|
||||||
|
"flarum/lock": "self.version",
|
||||||
|
"flarum/markdown": "self.version",
|
||||||
|
"flarum/mentions": "self.version",
|
||||||
|
"flarum/nicknames": "self.version",
|
||||||
|
"flarum/extension-manager": "self.version",
|
||||||
|
"flarum/pusher": "self.version",
|
||||||
|
"flarum/statistics": "self.version",
|
||||||
|
"flarum/sticky": "self.version",
|
||||||
|
"flarum/subscriptions": "self.version",
|
||||||
|
"flarum/suspend": "self.version",
|
||||||
|
"flarum/tags": "self.version",
|
||||||
|
"flarum/phpstan": "self.version",
|
||||||
|
"flarum/testing": "self.version"
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=7.3",
|
||||||
|
"ext-json": "*",
|
||||||
|
"components/font-awesome": "^5.14.0",
|
||||||
|
"composer/composer": "^2.0",
|
||||||
|
"dflydev/fig-cookies": "^3.0.0",
|
||||||
|
"doctrine/dbal": "^2.7",
|
||||||
|
"dragonmantank/cron-expression": "^3.1.0",
|
||||||
|
"franzl/whoops-middleware": "^2.0.0",
|
||||||
|
"guzzlehttp/guzzle": "^6.0|^7.4",
|
||||||
|
"illuminate/bus": "^8.0",
|
||||||
|
"illuminate/cache": "^8.0",
|
||||||
|
"illuminate/config": "^8.0",
|
||||||
|
"illuminate/console": "^8.0",
|
||||||
|
"illuminate/container": "^8.0",
|
||||||
|
"illuminate/contracts": "^8.0",
|
||||||
|
"illuminate/database": "^8.0",
|
||||||
|
"illuminate/events": "^8.0",
|
||||||
|
"illuminate/filesystem": "^8.0",
|
||||||
|
"illuminate/hashing": "^8.0",
|
||||||
|
"illuminate/mail": "^8.0",
|
||||||
|
"illuminate/queue": "^8.0",
|
||||||
|
"illuminate/session": "^8.0",
|
||||||
|
"illuminate/support": "^8.0",
|
||||||
|
"illuminate/validation": "^8.0",
|
||||||
|
"illuminate/view": "^8.0",
|
||||||
|
"intervention/image": "2.5.* || ^2.6.1",
|
||||||
|
"jenssegers/agent": "^2.6",
|
||||||
|
"laminas/laminas-diactoros": "^2.4.1 || ^3.0.0",
|
||||||
|
"laminas/laminas-httphandlerrunner": "^1.2.0 || ^2.3.0 || ^3.0.0",
|
||||||
|
"laminas/laminas-stratigility": "^3.2.2 || ^4.0.0",
|
||||||
|
"league/flysystem": "^1.0.11",
|
||||||
|
"matthiasmullie/minify": "^1.3",
|
||||||
|
"middlewares/base-path": "^2.0.1",
|
||||||
|
"middlewares/base-path-router": "^2.0.1",
|
||||||
|
"middlewares/request-handler": "^2.0.1",
|
||||||
|
"monolog/monolog": "^1.16.0",
|
||||||
|
"nesbot/carbon": "^2.0",
|
||||||
|
"nikic/fast-route": "^0.6",
|
||||||
|
"psr/http-message": "^1.0",
|
||||||
|
"psr/http-server-handler": "^1.0",
|
||||||
|
"psr/http-server-middleware": "^1.0",
|
||||||
|
"pusher/pusher-php-server": "^2.2",
|
||||||
|
"s9e/text-formatter": ">=2.3.6 <2.15",
|
||||||
|
"staudenmeir/eloquent-eager-limit": "^1.0",
|
||||||
|
"sycho/json-api": "^0.5.0",
|
||||||
|
"sycho/sourcemap": "^2.0.0",
|
||||||
|
"symfony/config": "^5.2.2",
|
||||||
|
"symfony/console": "^5.2.2",
|
||||||
|
"symfony/event-dispatcher": "^5.2.2",
|
||||||
|
"symfony/mime": "^5.2.0",
|
||||||
|
"symfony/polyfill-intl-messageformatter": "^1.22.0",
|
||||||
|
"symfony/translation": "^5.1.5",
|
||||||
|
"symfony/yaml": "^5.2.2",
|
||||||
|
"wikimedia/less.php": "^3.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"mockery/mockery": "^1.4",
|
||||||
|
"phpunit/phpunit": "^9.0",
|
||||||
|
"phpstan/phpstan": ">=1.8.11 < 1.9.0",
|
||||||
|
"nunomaduro/larastan": "^1.0"
|
||||||
|
},
|
||||||
|
"config": {
|
||||||
|
"sort-packages": true
|
||||||
|
},
|
||||||
|
"minimum-stability": "dev",
|
||||||
|
"prefer-stable": true,
|
||||||
|
"extra": {
|
||||||
|
"flarum-subextensions": [
|
||||||
|
"extensions/akismet",
|
||||||
|
"extensions/approval",
|
||||||
|
"extensions/bbcode",
|
||||||
|
"extensions/embed",
|
||||||
|
"extensions/emoji",
|
||||||
|
"extensions/flags",
|
||||||
|
"extensions/lang-english",
|
||||||
|
"extensions/likes",
|
||||||
|
"extensions/lock",
|
||||||
|
"extensions/markdown",
|
||||||
|
"extensions/mentions",
|
||||||
|
"extensions/nicknames",
|
||||||
|
"extensions/package-manager",
|
||||||
|
"extensions/pusher",
|
||||||
|
"extensions/statistics",
|
||||||
|
"extensions/sticky",
|
||||||
|
"extensions/subscriptions",
|
||||||
|
"extensions/suspend",
|
||||||
|
"extensions/tags"
|
||||||
|
],
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-main": "1.x-dev"
|
||||||
|
},
|
||||||
|
"phpstan": {
|
||||||
|
"includes": [
|
||||||
|
"extension.neon"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"analyse:phpstan": "phpstan analyse",
|
||||||
|
"clear-cache:phpstan": "phpstan clear-result-cache"
|
||||||
|
},
|
||||||
|
"scripts-descriptions": {
|
||||||
|
"analyse:phpstan": "Run static analysis"
|
||||||
|
}
|
||||||
|
}
|
@@ -1,19 +0,0 @@
|
|||||||
# EditorConfig helps developers define and maintain consistent
|
|
||||||
# coding styles between different editors and IDEs
|
|
||||||
# editorconfig.org
|
|
||||||
|
|
||||||
root = true
|
|
||||||
|
|
||||||
[*]
|
|
||||||
end_of_line = lf
|
|
||||||
charset = utf-8
|
|
||||||
trim_trailing_whitespace = true
|
|
||||||
insert_final_newline = true
|
|
||||||
indent_style = space
|
|
||||||
indent_size = 2
|
|
||||||
|
|
||||||
[*.{diff,md}]
|
|
||||||
trim_trailing_whitespace = false
|
|
||||||
|
|
||||||
[*.{php,xml,json}]
|
|
||||||
indent_size = 4
|
|
20
extensions/akismet/.gitattributes
vendored
Normal file
20
extensions/akismet/.gitattributes
vendored
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
**/.gitattributes export-ignore
|
||||||
|
**/.gitignore export-ignore
|
||||||
|
**/.gitmodules export-ignore
|
||||||
|
**/.github export-ignore
|
||||||
|
**/.travis export-ignore
|
||||||
|
**/.travis.yml export-ignore
|
||||||
|
**/.editorconfig export-ignore
|
||||||
|
**/.styleci.yml export-ignore
|
||||||
|
|
||||||
|
**/phpunit.xml export-ignore
|
||||||
|
**/tests export-ignore
|
||||||
|
|
||||||
|
**/js/dist/**/* -diff
|
||||||
|
**/js/dist/**/* linguist-generated
|
||||||
|
**/js/dist-typings/**/* -diff
|
||||||
|
**/js/dist-typings/**/* linguist-generated
|
||||||
|
**/js/yarn.lock -diff
|
||||||
|
**/js/package-lock.json -diff
|
||||||
|
|
||||||
|
* text=auto eol=lf
|
@@ -19,9 +19,8 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"flarum/core": "^1.2",
|
"flarum/core": "^1.8",
|
||||||
"flarum/approval": "^1.2",
|
"flarum/approval": "^1.7"
|
||||||
"guzzlehttp/guzzle": "^7.4"
|
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
|
@@ -13,6 +13,7 @@ use Flarum\Approval\Event\PostWasApproved;
|
|||||||
use Flarum\Extend;
|
use Flarum\Extend;
|
||||||
use Flarum\Post\Event\Hidden;
|
use Flarum\Post\Event\Hidden;
|
||||||
use Flarum\Post\Event\Saving;
|
use Flarum\Post\Event\Saving;
|
||||||
|
use Flarum\Post\Post;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
(new Extend\Frontend('forum'))
|
(new Extend\Frontend('forum'))
|
||||||
@@ -30,4 +31,7 @@ return [
|
|||||||
|
|
||||||
(new Extend\ServiceProvider())
|
(new Extend\ServiceProvider())
|
||||||
->register(AkismetProvider::class),
|
->register(AkismetProvider::class),
|
||||||
|
|
||||||
|
(new Extend\Model(Post::class))
|
||||||
|
->cast('is_spam', 'bool'),
|
||||||
];
|
];
|
||||||
|
2
extensions/akismet/js/dist/admin.js
generated
vendored
2
extensions/akismet/js/dist/admin.js
generated
vendored
@@ -1,2 +1,2 @@
|
|||||||
(()=>{var e={n:t=>{var a=t&&t.__esModule?()=>t.default:()=>t;return e.d(a,{a}),a},d:(t,a)=>{for(var r in a)e.o(a,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:a[r]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};(()=>{"use strict";e.r(t);const a=flarum.core.compat["admin/app"];var r=e.n(a);r().initializers.add("flarum-akismet",(function(){r().extensionData.for("flarum-akismet").registerSetting({setting:"flarum-akismet.api_key",type:"text",label:r().translator.trans("flarum-akismet.admin.akismet_settings.api_key_label")}).registerSetting({setting:"flarum-akismet.delete_blatant_spam",type:"boolean",label:r().translator.trans("flarum-akismet.admin.akismet_settings.delete_blatant_spam_label"),help:r().translator.trans("flarum-akismet.admin.akismet_settings.delete_blatant_spam_help")}).registerPermission({icon:"fas fa-vote-yea",label:r().translator.trans("flarum-akismet.admin.permissions.bypass_akismet"),permission:"bypassAkismet"},"start")}))})(),module.exports=t})();
|
(()=>{var a={n:t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return a.d(e,{a:e}),e},d:(t,e)=>{for(var s in e)a.o(e,s)&&!a.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},o:(a,t)=>Object.prototype.hasOwnProperty.call(a,t)};(()=>{"use strict";const t=flarum.core.compat["admin/app"];var e=a.n(t);e().initializers.add("flarum-akismet",(function(){e().extensionData.for("flarum-akismet").registerSetting({setting:"flarum-akismet.api_key",type:"text",label:e().translator.trans("flarum-akismet.admin.akismet_settings.api_key_label")}).registerSetting({setting:"flarum-akismet.delete_blatant_spam",type:"boolean",label:e().translator.trans("flarum-akismet.admin.akismet_settings.delete_blatant_spam_label"),help:e().translator.trans("flarum-akismet.admin.akismet_settings.delete_blatant_spam_help")}).registerPermission({icon:"fas fa-vote-yea",label:e().translator.trans("flarum-akismet.admin.permissions.bypass_akismet"),permission:"bypassAkismet"},"start")}))})(),module.exports={}})();
|
||||||
//# sourceMappingURL=admin.js.map
|
//# sourceMappingURL=admin.js.map
|
2
extensions/akismet/js/dist/admin.js.map
generated
vendored
2
extensions/akismet/js/dist/admin.js.map
generated
vendored
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"admin.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,IACzBH,GCLRF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,MCJ3ER,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,M,+BCLvD,MAAM,EAA+BC,OAAOC,KAAKC,OAAO,a,aCExDC,IAAAA,aAAAA,IAAqB,kBAAkB,WACrCA,IAAAA,cAAAA,IACO,kBACJC,gBAAgB,CACfC,QAAS,yBACTC,KAAM,OACNC,MAAOJ,IAAAA,WAAAA,MAAqB,yDAE7BC,gBAAgB,CAEfC,QAAS,qCACTC,KAAM,UACNC,MAAOJ,IAAAA,WAAAA,MAAqB,mEAC5BK,KAAML,IAAAA,WAAAA,MAAqB,oEAE5BM,mBACC,CACEC,KAAM,kBACNH,MAAOJ,IAAAA,WAAAA,MAAqB,mDAC5BQ,WAAY,iBAEd,a","sources":["webpack://@flarum/akismet/webpack/bootstrap","webpack://@flarum/akismet/webpack/runtime/compat get default export","webpack://@flarum/akismet/webpack/runtime/define property getters","webpack://@flarum/akismet/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/akismet/webpack/runtime/make namespace object","webpack://@flarum/akismet/external root \"flarum.core.compat['admin/app']\"","webpack://@flarum/akismet/./src/admin/index.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/app'];","import app from 'flarum/admin/app';\n\napp.initializers.add('flarum-akismet', () => {\n app.extensionData\n .for('flarum-akismet')\n .registerSetting({\n setting: 'flarum-akismet.api_key',\n type: 'text',\n label: app.translator.trans('flarum-akismet.admin.akismet_settings.api_key_label'),\n })\n .registerSetting({\n //https://blog.akismet.com/2014/04/23/theres-a-ninja-in-your-akismet/\n setting: 'flarum-akismet.delete_blatant_spam',\n type: 'boolean',\n label: app.translator.trans('flarum-akismet.admin.akismet_settings.delete_blatant_spam_label'),\n help: app.translator.trans('flarum-akismet.admin.akismet_settings.delete_blatant_spam_help'),\n })\n .registerPermission(\n {\n icon: 'fas fa-vote-yea',\n label: app.translator.trans('flarum-akismet.admin.permissions.bypass_akismet'),\n permission: 'bypassAkismet',\n },\n 'start'\n );\n});\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","core","compat","app","registerSetting","setting","type","label","help","registerPermission","icon","permission"],"sourceRoot":""}
|
{"version":3,"file":"admin.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,I,mBCAlF,MAAM,EAA+BI,OAAOC,KAAKC,OAAO,a,aCExDC,IAAAA,aAAiBC,IAAI,kBAAkB,WACrCD,IAAAA,cAAiB,IACV,kBACJE,gBAAgB,CACfC,QAAS,yBACTC,KAAM,OACNC,MAAOL,IAAAA,WAAeM,MAAM,yDAE7BJ,gBAAgB,CAEfC,QAAS,qCACTC,KAAM,UACNC,MAAOL,IAAAA,WAAeM,MAAM,mEAC5BC,KAAMP,IAAAA,WAAeM,MAAM,oEAE5BE,mBACC,CACEC,KAAM,kBACNJ,MAAOL,IAAAA,WAAeM,MAAM,mDAC5BI,WAAY,iBAEd,QAEN,G","sources":["webpack://@flarum/akismet/webpack/bootstrap","webpack://@flarum/akismet/webpack/runtime/compat get default export","webpack://@flarum/akismet/webpack/runtime/define property getters","webpack://@flarum/akismet/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/akismet/external root \"flarum.core.compat['admin/app']\"","webpack://@flarum/akismet/./src/admin/index.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/app'];","import app from 'flarum/admin/app';\n\napp.initializers.add('flarum-akismet', () => {\n app.extensionData\n .for('flarum-akismet')\n .registerSetting({\n setting: 'flarum-akismet.api_key',\n type: 'text',\n label: app.translator.trans('flarum-akismet.admin.akismet_settings.api_key_label'),\n })\n .registerSetting({\n //https://blog.akismet.com/2014/04/23/theres-a-ninja-in-your-akismet/\n setting: 'flarum-akismet.delete_blatant_spam',\n type: 'boolean',\n label: app.translator.trans('flarum-akismet.admin.akismet_settings.delete_blatant_spam_label'),\n help: app.translator.trans('flarum-akismet.admin.akismet_settings.delete_blatant_spam_help'),\n })\n .registerPermission(\n {\n icon: 'fas fa-vote-yea',\n label: app.translator.trans('flarum-akismet.admin.permissions.bypass_akismet'),\n permission: 'bypassAkismet',\n },\n 'start'\n );\n});\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","flarum","core","compat","app","add","registerSetting","setting","type","label","trans","help","registerPermission","icon","permission"],"sourceRoot":""}
|
2
extensions/akismet/js/dist/forum.js
generated
vendored
2
extensions/akismet/js/dist/forum.js
generated
vendored
@@ -1,2 +1,2 @@
|
|||||||
(()=>{var t={n:e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return t.d(o,{a:o}),o},d:(e,o)=>{for(var r in o)t.o(o,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:o[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};(()=>{"use strict";t.r(e);const o=flarum.core.compat["common/extend"],r=flarum.core.compat["forum/app"];var a=t.n(r);const n=flarum.core.compat["forum/utils/PostControls"];var m=t.n(n);const s=flarum.core.compat["forum/components/CommentPost"];var l=t.n(s);a().initializers.add("flarum-akismet",(function(){(0,o.extend)(m(),"destructiveControls",(function(t,e){if(t.has("approve")){var o=e.flags();if(o&&o.some((function(t){return"akismet"===(null==t?void 0:t.type())}))){var r=t.get("approve");r&&"object"==typeof r&&"children"in r&&(r.children=a().translator.trans("flarum-akismet.forum.post.not_spam_button"))}}})),(0,o.override)(l().prototype,"flagReason",(function(t,e){return"akismet"===e.type()?a().translator.trans("flarum-akismet.forum.post.akismet_flagged_text"):t(e)}))}))})(),module.exports=e})();
|
(()=>{var t={n:o=>{var r=o&&o.__esModule?()=>o.default:()=>o;return t.d(r,{a:r}),r},d:(o,r)=>{for(var e in r)t.o(r,e)&&!t.o(o,e)&&Object.defineProperty(o,e,{enumerable:!0,get:r[e]})},o:(t,o)=>Object.prototype.hasOwnProperty.call(t,o)};(()=>{"use strict";const o=flarum.core.compat["common/extend"],r=flarum.core.compat["forum/app"];var e=t.n(r);const a=flarum.core.compat["forum/utils/PostControls"];var n=t.n(a);const s=flarum.core.compat["forum/components/Post"];var m=t.n(s);e().initializers.add("flarum-akismet",(function(){(0,o.extend)(n(),"destructiveControls",(function(t,o){if(t.has("approve")){var r=o.flags();if(r&&r.some((function(t){return"akismet"===(null==t?void 0:t.type())}))){var a=t.get("approve");a&&"object"==typeof a&&"children"in a&&(a.children=e().translator.trans("flarum-akismet.forum.post.not_spam_button"))}}})),(0,o.override)(m().prototype,"flagReason",(function(t,o){return"akismet"===o.type()?e().translator.trans("flarum-akismet.forum.post.akismet_flagged_text"):t(o)}))}))})(),module.exports={}})();
|
||||||
//# sourceMappingURL=forum.js.map
|
//# sourceMappingURL=forum.js.map
|
2
extensions/akismet/js/dist/forum.js.map
generated
vendored
2
extensions/akismet/js/dist/forum.js.map
generated
vendored
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"forum.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,GCLRF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,MCJ3ER,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,M,+BCLvD,MAAM,EAA+BC,OAAOC,KAAKC,OAAO,iBCAlD,EAA+BF,OAAOC,KAAKC,OAAO,a,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,4B,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,gC,aCSxDC,IAAAA,aAAAA,IAAqB,kBAAkB,YACrCC,EAAAA,EAAAA,QAAOC,IAAc,uBAAuB,SAAUC,EAAmCC,GACvF,GAAID,EAAME,IAAI,WAAY,CACxB,IAAMC,EAAQF,EAAKE,QAEnB,GAAIA,GAASA,EAAMC,MAAK,SAACC,GAAD,MAA2B,aAAb,MAAJA,OAAA,EAAAA,EAAMC,WAAuB,CAC7D,IAAMC,EAAcP,EAAMf,IAAI,WAC1BsB,GAAsC,iBAAhBA,GAA4B,aAAcA,IAClEA,EAAYC,SAAWX,IAAAA,WAAAA,MAAqB,oDAMpDY,EAAAA,EAAAA,UAASC,IAAAA,UAAuB,cAAc,SAAUC,EAAUN,GAChE,MAAoB,YAAhBA,EAAKC,OACAT,IAAAA,WAAAA,MAAqB,kDAGvBc,EAASN,U","sources":["webpack://@flarum/akismet/webpack/bootstrap","webpack://@flarum/akismet/webpack/runtime/compat get default export","webpack://@flarum/akismet/webpack/runtime/define property getters","webpack://@flarum/akismet/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/akismet/webpack/runtime/make namespace object","webpack://@flarum/akismet/external root \"flarum.core.compat['common/extend']\"","webpack://@flarum/akismet/external root \"flarum.core.compat['forum/app']\"","webpack://@flarum/akismet/external root \"flarum.core.compat['forum/utils/PostControls']\"","webpack://@flarum/akismet/external root \"flarum.core.compat['forum/components/CommentPost']\"","webpack://@flarum/akismet/./src/forum/index.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/utils/PostControls'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/CommentPost'];","import { extend, override } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport type Post from 'flarum/common/models/Post';\nimport type ItemList from 'flarum/common/utils/ItemList';\n\nimport PostControls from 'flarum/forum/utils/PostControls';\nimport CommentPost from 'flarum/forum/components/CommentPost';\nimport type Mithril from 'mithril';\n\napp.initializers.add('flarum-akismet', () => {\n extend(PostControls, 'destructiveControls', function (items: ItemList<Mithril.Children>, post: Post) {\n if (items.has('approve')) {\n const flags = post.flags();\n\n if (flags && flags.some((flag) => flag?.type() === 'akismet')) {\n const approveItem = items.get('approve');\n if (approveItem && typeof approveItem === 'object' && 'children' in approveItem) {\n approveItem.children = app.translator.trans('flarum-akismet.forum.post.not_spam_button');\n }\n }\n }\n });\n\n override(CommentPost.prototype, 'flagReason', function (original, flag) {\n if (flag.type() === 'akismet') {\n return app.translator.trans('flarum-akismet.forum.post.akismet_flagged_text');\n }\n\n return original(flag);\n });\n});\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","core","compat","app","extend","PostControls","items","post","has","flags","some","flag","type","approveItem","children","override","CommentPost","original"],"sourceRoot":""}
|
{"version":3,"file":"forum.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,I,mBCAlF,MAAM,EAA+BI,OAAOC,KAAKC,OAAO,iBCAlD,EAA+BF,OAAOC,KAAKC,OAAO,a,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,4B,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,yB,aCSxDC,IAAAA,aAAiBC,IAAI,kBAAkB,YACrCC,EAAAA,EAAAA,QAAOC,IAAc,uBAAuB,SAAUC,EAAmCC,GACvF,GAAID,EAAME,IAAI,WAAY,CACxB,IAAMC,EAAQF,EAAKE,QAEnB,GAAIA,GAASA,EAAMC,MAAK,SAACC,GAAI,MAAsB,aAAb,MAAJA,OAAI,EAAJA,EAAMC,OAAoB,IAAG,CAC7D,IAAMC,EAAcP,EAAMb,IAAI,WAC1BoB,GAAsC,iBAAhBA,GAA4B,aAAcA,IAClEA,EAAYC,SAAWZ,IAAAA,WAAea,MAAM,6CAEhD,CACF,CACF,KAEAC,EAAAA,EAAAA,UAASC,IAAAA,UAAyB,cAAc,SAAUC,EAAUP,GAClE,MAAoB,YAAhBA,EAAKC,OACAV,IAAAA,WAAea,MAAM,kDAGvBG,EAASP,EAClB,GACF,G","sources":["webpack://@flarum/akismet/webpack/bootstrap","webpack://@flarum/akismet/webpack/runtime/compat get default export","webpack://@flarum/akismet/webpack/runtime/define property getters","webpack://@flarum/akismet/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/akismet/external root \"flarum.core.compat['common/extend']\"","webpack://@flarum/akismet/external root \"flarum.core.compat['forum/app']\"","webpack://@flarum/akismet/external root \"flarum.core.compat['forum/utils/PostControls']\"","webpack://@flarum/akismet/external root \"flarum.core.compat['forum/components/Post']\"","webpack://@flarum/akismet/./src/forum/index.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/utils/PostControls'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/Post'];","import { extend, override } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport type Post from 'flarum/common/models/Post';\nimport type ItemList from 'flarum/common/utils/ItemList';\n\nimport PostControls from 'flarum/forum/utils/PostControls';\nimport PostComponent from 'flarum/forum/components/Post';\nimport type Mithril from 'mithril';\n\napp.initializers.add('flarum-akismet', () => {\n extend(PostControls, 'destructiveControls', function (items: ItemList<Mithril.Children>, post: Post) {\n if (items.has('approve')) {\n const flags = post.flags();\n\n if (flags && flags.some((flag) => flag?.type() === 'akismet')) {\n const approveItem = items.get('approve');\n if (approveItem && typeof approveItem === 'object' && 'children' in approveItem) {\n approveItem.children = app.translator.trans('flarum-akismet.forum.post.not_spam_button');\n }\n }\n }\n });\n\n override(PostComponent.prototype, 'flagReason', function (original, flag) {\n if (flag.type() === 'akismet') {\n return app.translator.trans('flarum-akismet.forum.post.akismet_flagged_text');\n }\n\n return original(flag);\n });\n});\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","flarum","core","compat","app","add","extend","PostControls","items","post","has","flags","some","flag","type","approveItem","children","trans","override","PostComponent","original"],"sourceRoot":""}
|
@@ -9,18 +9,18 @@
|
|||||||
"analyze": "cross-env ANALYZER=true yarn run build",
|
"analyze": "cross-env ANALYZER=true yarn run build",
|
||||||
"format": "prettier --write src",
|
"format": "prettier --write src",
|
||||||
"format-check": "prettier --check src",
|
"format-check": "prettier --check src",
|
||||||
"check-typings": "tsc --noEmit --emitDeclarationOnly false",
|
|
||||||
"check-typings-coverage": "typescript-coverage-report",
|
|
||||||
"clean-typings": "npx rimraf dist-typings && mkdir dist-typings",
|
"clean-typings": "npx rimraf dist-typings && mkdir dist-typings",
|
||||||
"build-typings": "yarn run clean-typings && ([ -e src/@types ] && cp -r src/@types dist-typings/@types || true) && tsc && yarn run post-build-typings",
|
"build-typings": "yarn run clean-typings && ([ -e src/@types ] && cp -r src/@types dist-typings/@types || true) && tsc && yarn run post-build-typings",
|
||||||
"post-build-typings": "find dist-typings -type f -name '*.d.ts' -print0 | xargs -0 sed -i 's,../src/@types,@types,g'"
|
"post-build-typings": "find dist-typings -type f -name '*.d.ts' -print0 | xargs -0 sed -i 's,../src/@types,@types,g'",
|
||||||
|
"check-typings": "tsc --noEmit --emitDeclarationOnly false",
|
||||||
|
"check-typings-coverage": "typescript-coverage-report"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@flarum/prettier-config": "^1.0.0",
|
"@flarum/prettier-config": "^1.0.0",
|
||||||
"flarum-tsconfig": "^1.0.2",
|
"flarum-tsconfig": "^1.0.2",
|
||||||
"prettier": "^2.5.1",
|
"prettier": "^2.5.1",
|
||||||
"flarum-webpack-config": "^2.0.0",
|
"flarum-webpack-config": "^2.0.0",
|
||||||
"webpack": "^5.65.0",
|
"webpack": "^5.76.0",
|
||||||
"webpack-cli": "^4.9.1",
|
"webpack-cli": "^4.9.1",
|
||||||
"typescript": "^4.5.4",
|
"typescript": "^4.5.4",
|
||||||
"typescript-coverage-report": "^0.6.1"
|
"typescript-coverage-report": "^0.6.1"
|
||||||
|
@@ -4,7 +4,7 @@ import type Post from 'flarum/common/models/Post';
|
|||||||
import type ItemList from 'flarum/common/utils/ItemList';
|
import type ItemList from 'flarum/common/utils/ItemList';
|
||||||
|
|
||||||
import PostControls from 'flarum/forum/utils/PostControls';
|
import PostControls from 'flarum/forum/utils/PostControls';
|
||||||
import CommentPost from 'flarum/forum/components/CommentPost';
|
import PostComponent from 'flarum/forum/components/Post';
|
||||||
import type Mithril from 'mithril';
|
import type Mithril from 'mithril';
|
||||||
|
|
||||||
app.initializers.add('flarum-akismet', () => {
|
app.initializers.add('flarum-akismet', () => {
|
||||||
@@ -21,7 +21,7 @@ app.initializers.add('flarum-akismet', () => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
override(CommentPost.prototype, 'flagReason', function (original, flag) {
|
override(PostComponent.prototype, 'flagReason', function (original, flag) {
|
||||||
if (flag.type() === 'akismet') {
|
if (flag.type() === 'akismet') {
|
||||||
return app.translator.trans('flarum-akismet.forum.post.akismet_flagged_text');
|
return app.translator.trans('flarum-akismet.forum.post.akismet_flagged_text');
|
||||||
}
|
}
|
||||||
|
@@ -4,14 +4,19 @@
|
|||||||
// This will match all .ts, .tsx, .d.ts, .js, .jsx files in your `src` folder
|
// This will match all .ts, .tsx, .d.ts, .js, .jsx files in your `src` folder
|
||||||
// and also tells your Typescript server to read core's global typings for
|
// and also tells your Typescript server to read core's global typings for
|
||||||
// access to `dayjs` and `$` in the global namespace.
|
// access to `dayjs` and `$` in the global namespace.
|
||||||
"include": ["src/**/*", "../vendor/*/*/js/dist-typings/@types/**/*", "@types/**/*"],
|
"include": [
|
||||||
|
"src/**/*",
|
||||||
|
"../../../framework/core/js/dist-typings/@types/**/*",
|
||||||
|
"../../flags/js/dist-typings/@types/**/*",
|
||||||
|
"@types/**/*"
|
||||||
|
],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
// This will output typings to `dist-typings`
|
// This will output typings to `dist-typings`
|
||||||
"declarationDir": "./dist-typings",
|
"declarationDir": "./dist-typings",
|
||||||
"baseUrl": ".",
|
|
||||||
"paths": {
|
"paths": {
|
||||||
"flarum/*": ["../vendor/flarum/core/js/dist-typings/*"],
|
"flarum/*": ["../../../framework/core/js/dist-typings/*"],
|
||||||
"flarum/flags/*": ["../vendor/flarum/flags/js/dist-typings/*"]
|
"@flarum/core/*": ["../../../framework/core/js/dist-typings/*"],
|
||||||
|
"flarum/flags/*": ["../../flags/js/dist-typings/*"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -50,7 +50,7 @@ class ValidatePost
|
|||||||
->withContent($post->content)
|
->withContent($post->content)
|
||||||
->withAuthorName($post->user->username)
|
->withAuthorName($post->user->username)
|
||||||
->withAuthorEmail($post->user->email)
|
->withAuthorEmail($post->user->email)
|
||||||
->withType($post->number == 1 ? 'forum-post' : 'reply')
|
->withType($post->number === 1 ? 'forum-post' : 'reply')
|
||||||
->withIp($post->ip_address)
|
->withIp($post->ip_address)
|
||||||
->withUserAgent($_SERVER['HTTP_USER_AGENT'])
|
->withUserAgent($_SERVER['HTTP_USER_AGENT'])
|
||||||
->checkSpam();
|
->checkSpam();
|
||||||
|
@@ -38,7 +38,7 @@ class AkismetProvider extends AbstractServiceProvider
|
|||||||
$settings->get('flarum-akismet.api_key'),
|
$settings->get('flarum-akismet.api_key'),
|
||||||
$url->to('forum')->base(),
|
$url->to('forum')->base(),
|
||||||
$app::VERSION,
|
$app::VERSION,
|
||||||
$extensions->getExtension('flarum-akismet')->getVersion(),
|
$extensions->getExtension('flarum-akismet')->getVersion() ?? 'unknown',
|
||||||
$config->inDebugMode()
|
$config->inDebugMode()
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@@ -1,19 +0,0 @@
|
|||||||
# EditorConfig helps developers define and maintain consistent
|
|
||||||
# coding styles between different editors and IDEs
|
|
||||||
# editorconfig.org
|
|
||||||
|
|
||||||
root = true
|
|
||||||
|
|
||||||
[*]
|
|
||||||
end_of_line = lf
|
|
||||||
charset = utf-8
|
|
||||||
trim_trailing_whitespace = true
|
|
||||||
insert_final_newline = true
|
|
||||||
indent_style = space
|
|
||||||
indent_size = 2
|
|
||||||
|
|
||||||
[*.{diff,md}]
|
|
||||||
trim_trailing_whitespace = false
|
|
||||||
|
|
||||||
[*.{php,xml,json}]
|
|
||||||
indent_size = 4
|
|
20
extensions/approval/.gitattributes
vendored
Normal file
20
extensions/approval/.gitattributes
vendored
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
**/.gitattributes export-ignore
|
||||||
|
**/.gitignore export-ignore
|
||||||
|
**/.gitmodules export-ignore
|
||||||
|
**/.github export-ignore
|
||||||
|
**/.travis export-ignore
|
||||||
|
**/.travis.yml export-ignore
|
||||||
|
**/.editorconfig export-ignore
|
||||||
|
**/.styleci.yml export-ignore
|
||||||
|
|
||||||
|
**/phpunit.xml export-ignore
|
||||||
|
**/tests export-ignore
|
||||||
|
|
||||||
|
**/js/dist/**/* -diff
|
||||||
|
**/js/dist/**/* linguist-generated
|
||||||
|
**/js/dist-typings/**/* -diff
|
||||||
|
**/js/dist-typings/**/* linguist-generated
|
||||||
|
**/js/yarn.lock -diff
|
||||||
|
**/js/package-lock.json -diff
|
||||||
|
|
||||||
|
* text=auto eol=lf
|
@@ -19,8 +19,8 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"flarum/core": "^1.2",
|
"flarum/core": "^1.8",
|
||||||
"flarum/flags": "^1.2"
|
"flarum/flags": "^1.7"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
"prettier": true,
|
"prettier": true,
|
||||||
"typescript": false,
|
"typescript": false,
|
||||||
"bundlewatch": false,
|
"bundlewatch": false,
|
||||||
"backendTesting": false,
|
"backendTesting": true,
|
||||||
"editorConfig": true,
|
"editorConfig": true,
|
||||||
"styleci": true
|
"styleci": true
|
||||||
}
|
}
|
||||||
@@ -65,5 +65,28 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"minimum-stability": "dev",
|
"minimum-stability": "dev",
|
||||||
"prefer-stable": true
|
"prefer-stable": true,
|
||||||
|
"autoload-dev": {
|
||||||
|
"psr-4": {
|
||||||
|
"Flarum\\Approval\\Tests\\": "tests/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"test": [
|
||||||
|
"@test:unit",
|
||||||
|
"@test:integration"
|
||||||
|
],
|
||||||
|
"test:unit": "phpunit -c tests/phpunit.unit.xml",
|
||||||
|
"test:integration": "phpunit -c tests/phpunit.integration.xml",
|
||||||
|
"test:setup": "@php tests/integration/setup.php"
|
||||||
|
},
|
||||||
|
"scripts-descriptions": {
|
||||||
|
"test": "Runs all tests.",
|
||||||
|
"test:unit": "Runs all unit tests.",
|
||||||
|
"test:integration": "Runs all integration tests.",
|
||||||
|
"test:setup": "Sets up a database for use with integration tests. Execute this only once."
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"flarum/testing": "^1.0.0"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -15,7 +15,6 @@ use Flarum\Approval\Listener;
|
|||||||
use Flarum\Discussion\Discussion;
|
use Flarum\Discussion\Discussion;
|
||||||
use Flarum\Extend;
|
use Flarum\Extend;
|
||||||
use Flarum\Post\CommentPost;
|
use Flarum\Post\CommentPost;
|
||||||
use Flarum\Post\Event\Saving;
|
|
||||||
use Flarum\Post\Post;
|
use Flarum\Post\Post;
|
||||||
use Flarum\Tags\Tag;
|
use Flarum\Tags\Tag;
|
||||||
|
|
||||||
@@ -29,15 +28,17 @@ return [
|
|||||||
|
|
||||||
// Discussions should be approved by default
|
// Discussions should be approved by default
|
||||||
(new Extend\Model(Discussion::class))
|
(new Extend\Model(Discussion::class))
|
||||||
->default('is_approved', true),
|
->default('is_approved', true)
|
||||||
|
->cast('is_approved', 'bool'),
|
||||||
|
|
||||||
// Posts should be approved by default
|
// Posts should be approved by default
|
||||||
(new Extend\Model(Post::class))
|
(new Extend\Model(Post::class))
|
||||||
->default('is_approved', true),
|
->default('is_approved', true)
|
||||||
|
->cast('is_approved', 'bool'),
|
||||||
|
|
||||||
(new Extend\ApiSerializer(BasicDiscussionSerializer::class))
|
(new Extend\ApiSerializer(BasicDiscussionSerializer::class))
|
||||||
->attribute('isApproved', function ($serializer, Discussion $discussion) {
|
->attribute('isApproved', function ($serializer, Discussion $discussion) {
|
||||||
return (bool) $discussion->is_approved;
|
return $discussion->is_approved;
|
||||||
}),
|
}),
|
||||||
|
|
||||||
(new Extend\ApiSerializer(PostSerializer::class))
|
(new Extend\ApiSerializer(PostSerializer::class))
|
||||||
@@ -50,9 +51,9 @@ return [
|
|||||||
new Extend\Locales(__DIR__.'/locale'),
|
new Extend\Locales(__DIR__.'/locale'),
|
||||||
|
|
||||||
(new Extend\Event())
|
(new Extend\Event())
|
||||||
->listen(Saving::class, [Listener\ApproveContent::class, 'approvePost'])
|
->listen(PostWasApproved::class, Listener\UpdateDiscussionAfterPostApproval::class)
|
||||||
->listen(Saving::class, [Listener\UnapproveNewContent::class, 'unapproveNewPosts'])
|
->subscribe(Listener\ApproveContent::class)
|
||||||
->listen(PostWasApproved::class, [Listener\ApproveContent::class, 'approveDiscussion']),
|
->subscribe(Listener\UnapproveNewContent::class),
|
||||||
|
|
||||||
(new Extend\Policy())
|
(new Extend\Policy())
|
||||||
->modelPolicy(Tag::class, Access\TagPolicy::class),
|
->modelPolicy(Tag::class, Access\TagPolicy::class),
|
||||||
|
2
extensions/approval/js/dist/admin.js
generated
vendored
2
extensions/approval/js/dist/admin.js
generated
vendored
@@ -1,2 +1,2 @@
|
|||||||
(()=>{var r={n:s=>{var e=s&&s.__esModule?()=>s.default:()=>s;return r.d(e,{a:e}),e},d:(s,e)=>{for(var a in e)r.o(e,a)&&!r.o(s,a)&&Object.defineProperty(s,a,{enumerable:!0,get:e[a]})},o:(r,s)=>Object.prototype.hasOwnProperty.call(r,s),r:r=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})}},s={};(()=>{"use strict";r.r(s);const e=flarum.core.compat["common/extend"],a=flarum.core.compat["admin/app"];var o=r.n(a);o().initializers.add("flarum-approval",(function(){(0,e.extend)(o(),"getRequiredPermissions",(function(r,s){"discussion.startWithoutApproval"===s&&r.push("startDiscussion"),"discussion.replyWithoutApproval"===s&&r.push("discussion.reply")})),o().extensionData.for("flarum-approval").registerPermission({icon:"fas fa-check",label:o().translator.trans("flarum-approval.admin.permissions.start_discussions_without_approval_label"),permission:"discussion.startWithoutApproval"},"start",95).registerPermission({icon:"fas fa-check",label:o().translator.trans("flarum-approval.admin.permissions.reply_without_approval_label"),permission:"discussion.replyWithoutApproval"},"reply",95).registerPermission({icon:"fas fa-check",label:o().translator.trans("flarum-approval.admin.permissions.approve_posts_label"),permission:"discussion.approvePosts"},"moderate",65)}))})(),module.exports=s})();
|
(()=>{var s={n:r=>{var a=r&&r.__esModule?()=>r.default:()=>r;return s.d(a,{a}),a},d:(r,a)=>{for(var o in a)s.o(a,o)&&!s.o(r,o)&&Object.defineProperty(r,o,{enumerable:!0,get:a[o]})},o:(s,r)=>Object.prototype.hasOwnProperty.call(s,r)};(()=>{"use strict";const r=flarum.core.compat["common/extend"],a=flarum.core.compat["admin/app"];var o=s.n(a);o().initializers.add("flarum-approval",(function(){(0,r.extend)(o(),"getRequiredPermissions",(function(s,r){"discussion.startWithoutApproval"===r&&s.push("startDiscussion"),"discussion.replyWithoutApproval"===r&&s.push("discussion.reply")})),o().extensionData.for("flarum-approval").registerPermission({icon:"fas fa-check",label:o().translator.trans("flarum-approval.admin.permissions.start_discussions_without_approval_label"),permission:"discussion.startWithoutApproval"},"start",95).registerPermission({icon:"fas fa-check",label:o().translator.trans("flarum-approval.admin.permissions.reply_without_approval_label"),permission:"discussion.replyWithoutApproval"},"reply",95).registerPermission({icon:"fas fa-check",label:o().translator.trans("flarum-approval.admin.permissions.approve_posts_label"),permission:"discussion.approvePosts"},"moderate",65)}))})(),module.exports={}})();
|
||||||
//# sourceMappingURL=admin.js.map
|
//# sourceMappingURL=admin.js.map
|
2
extensions/approval/js/dist/admin.js.map
generated
vendored
2
extensions/approval/js/dist/admin.js.map
generated
vendored
@@ -1 +1 @@
|
|||||||
{"version":3,"file":"admin.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,GCLRF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,MCJ3ER,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,M,+BCLvD,MAAM,EAA+BC,OAAOC,KAAKC,OAAO,iBCAlD,EAA+BF,OAAOC,KAAKC,OAAO,a,aCGxDC,IAAAA,aAAAA,IAAqB,mBAAmB,YACtCC,EAAAA,EAAAA,QAAOD,IAAK,0BAA0B,SAAUE,EAAUC,GACrC,oCAAfA,GACFD,EAASE,KAAK,mBAEG,oCAAfD,GACFD,EAASE,KAAK,uBAIlBJ,IAAAA,cAAAA,IACO,mBACJK,mBACC,CACEC,KAAM,eACNC,MAAOP,IAAAA,WAAAA,MAAqB,8EAC5BG,WAAY,mCAEd,QACA,IAEDE,mBACC,CACEC,KAAM,eACNC,MAAOP,IAAAA,WAAAA,MAAqB,kEAC5BG,WAAY,mCAEd,QACA,IAEDE,mBACC,CACEC,KAAM,eACNC,MAAOP,IAAAA,WAAAA,MAAqB,yDAC5BG,WAAY,2BAEd,WACA,Q","sources":["webpack://@flarum/approval/webpack/bootstrap","webpack://@flarum/approval/webpack/runtime/compat get default export","webpack://@flarum/approval/webpack/runtime/define property getters","webpack://@flarum/approval/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/approval/webpack/runtime/make namespace object","webpack://@flarum/approval/external root \"flarum.core.compat['common/extend']\"","webpack://@flarum/approval/external root \"flarum.core.compat['admin/app']\"","webpack://@flarum/approval/./src/admin/index.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/app'];","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/admin/app';\n\napp.initializers.add('flarum-approval', () => {\n extend(app, 'getRequiredPermissions', function (required, permission) {\n if (permission === 'discussion.startWithoutApproval') {\n required.push('startDiscussion');\n }\n if (permission === 'discussion.replyWithoutApproval') {\n required.push('discussion.reply');\n }\n });\n\n app.extensionData\n .for('flarum-approval')\n .registerPermission(\n {\n icon: 'fas fa-check',\n label: app.translator.trans('flarum-approval.admin.permissions.start_discussions_without_approval_label'),\n permission: 'discussion.startWithoutApproval',\n },\n 'start',\n 95\n )\n .registerPermission(\n {\n icon: 'fas fa-check',\n label: app.translator.trans('flarum-approval.admin.permissions.reply_without_approval_label'),\n permission: 'discussion.replyWithoutApproval',\n },\n 'reply',\n 95\n )\n .registerPermission(\n {\n icon: 'fas fa-check',\n label: app.translator.trans('flarum-approval.admin.permissions.approve_posts_label'),\n permission: 'discussion.approvePosts',\n },\n 'moderate',\n 65\n );\n});\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","core","compat","app","extend","required","permission","push","registerPermission","icon","label"],"sourceRoot":""}
|
{"version":3,"file":"admin.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,IACzBH,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,I,mBCAlF,MAAM,EAA+BI,OAAOC,KAAKC,OAAO,iBCAlD,EAA+BF,OAAOC,KAAKC,OAAO,a,aCGxDC,IAAAA,aAAiBC,IAAI,mBAAmB,YACtCC,EAAAA,EAAAA,QAAOF,IAAK,0BAA0B,SAAUG,EAAUC,GACrC,oCAAfA,GACFD,EAASE,KAAK,mBAEG,oCAAfD,GACFD,EAASE,KAAK,mBAElB,IAEAL,IAAAA,cAAiB,IACV,mBACJM,mBACC,CACEC,KAAM,eACNC,MAAOR,IAAAA,WAAeS,MAAM,8EAC5BL,WAAY,mCAEd,QACA,IAEDE,mBACC,CACEC,KAAM,eACNC,MAAOR,IAAAA,WAAeS,MAAM,kEAC5BL,WAAY,mCAEd,QACA,IAEDE,mBACC,CACEC,KAAM,eACNC,MAAOR,IAAAA,WAAeS,MAAM,yDAC5BL,WAAY,2BAEd,WACA,GAEN,G","sources":["webpack://@flarum/approval/webpack/bootstrap","webpack://@flarum/approval/webpack/runtime/compat get default export","webpack://@flarum/approval/webpack/runtime/define property getters","webpack://@flarum/approval/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/approval/external root \"flarum.core.compat['common/extend']\"","webpack://@flarum/approval/external root \"flarum.core.compat['admin/app']\"","webpack://@flarum/approval/./src/admin/index.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/app'];","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/admin/app';\n\napp.initializers.add('flarum-approval', () => {\n extend(app, 'getRequiredPermissions', function (required, permission) {\n if (permission === 'discussion.startWithoutApproval') {\n required.push('startDiscussion');\n }\n if (permission === 'discussion.replyWithoutApproval') {\n required.push('discussion.reply');\n }\n });\n\n app.extensionData\n .for('flarum-approval')\n .registerPermission(\n {\n icon: 'fas fa-check',\n label: app.translator.trans('flarum-approval.admin.permissions.start_discussions_without_approval_label'),\n permission: 'discussion.startWithoutApproval',\n },\n 'start',\n 95\n )\n .registerPermission(\n {\n icon: 'fas fa-check',\n label: app.translator.trans('flarum-approval.admin.permissions.reply_without_approval_label'),\n permission: 'discussion.replyWithoutApproval',\n },\n 'reply',\n 95\n )\n .registerPermission(\n {\n icon: 'fas fa-check',\n label: app.translator.trans('flarum-approval.admin.permissions.approve_posts_label'),\n permission: 'discussion.approvePosts',\n },\n 'moderate',\n 65\n );\n});\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","flarum","core","compat","app","add","extend","required","permission","push","registerPermission","icon","label","trans"],"sourceRoot":""}
|
2
extensions/approval/js/dist/forum.js
generated
vendored
2
extensions/approval/js/dist/forum.js
generated
vendored
@@ -1,2 +1,2 @@
|
|||||||
(()=>{var o={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return o.d(r,{a:r}),r},d:(t,r)=>{for(var e in r)o.o(r,e)&&!o.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:r[e]})},o:(o,t)=>Object.prototype.hasOwnProperty.call(o,t),r:o=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})}},t={};(()=>{"use strict";o.r(t);const r=flarum.core.compat["common/extend"],e=flarum.core.compat["forum/app"];var a=o.n(e);const p=flarum.core.compat["common/models/Discussion"];var n=o.n(p);const s=flarum.core.compat["common/models/Post"];var i=o.n(s);const c=flarum.core.compat["common/components/Badge"];var u=o.n(c);const l=flarum.core.compat["forum/components/DiscussionListItem"];var d=o.n(l);const v=flarum.core.compat["forum/components/Post"];var f=o.n(v);const A=flarum.core.compat["forum/components/CommentPost"];var y=o.n(A);const b=flarum.core.compat["common/components/Button"];var g=o.n(b);const h=flarum.core.compat["forum/utils/PostControls"];var _=o.n(h);a().initializers.add("flarum-approval",(function(){n().prototype.isApproved=n().attribute("isApproved"),(0,r.extend)(n().prototype,"badges",(function(o){this.isApproved()||o.has("hidden")||o.add("awaitingApproval",m(u(),{type:"awaitingApproval",icon:"fas fa-gavel",label:a().translator.trans("flarum-approval.forum.badge.awaiting_approval_tooltip")}))})),i().prototype.isApproved=i().attribute("isApproved"),i().prototype.canApprove=i().attribute("canApprove"),(0,r.extend)(d().prototype,"elementAttrs",(function(o){this.attrs.discussion.isApproved()||(o.className+=" DiscussionListItem--unapproved")})),(0,r.extend)(f().prototype,"elementAttrs",(function(o){this.attrs.post.isApproved()||(o.className+=" Post--unapproved")})),(0,r.extend)(y().prototype,"headerItems",(function(o){this.attrs.post.isApproved()||this.attrs.post.isHidden()||o.add("unapproved",a().translator.trans("flarum-approval.forum.post.awaiting_approval_text"))})),(0,r.override)(f().prototype,"flagReason",(function(o,t){return"approval"===t.type()?a().translator.trans("flarum-approval.forum.post.awaiting_approval_text"):o(t)})),(0,r.extend)(_(),"destructiveControls",(function(o,t){!t.isApproved()&&t.canApprove()&&o.add("approve",m(g(),{icon:"fas fa-check",onclick:_().approveAction.bind(t)},a().translator.trans("flarum-approval.forum.post_controls.approve_button")),10)})),_().approveAction=function(){this.save({isApproved:!0}),1===this.number()&&this.discussion().pushAttributes({isApproved:!0})}}),-10)})(),module.exports=t})();
|
(()=>{var o={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return o.d(r,{a:r}),r},d:(t,r)=>{for(var a in r)o.o(r,a)&&!o.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:r[a]})},o:(o,t)=>Object.prototype.hasOwnProperty.call(o,t)};(()=>{"use strict";const t=flarum.core.compat["common/extend"],r=flarum.core.compat["forum/app"];var a=o.n(r);const e=flarum.core.compat["common/models/Discussion"];var p=o.n(e);const n=flarum.core.compat["common/models/Post"];var s=o.n(n);const i=flarum.core.compat["common/components/Badge"];var c=o.n(i);const u=flarum.core.compat["forum/components/DiscussionListItem"];var l=o.n(u);const d=flarum.core.compat["forum/components/Post"];var v=o.n(d);const f=flarum.core.compat["forum/components/CommentPost"];var A=o.n(f);const h=flarum.core.compat["common/components/Button"];var b=o.n(h);const y=flarum.core.compat["forum/utils/PostControls"];var g=o.n(y);a().initializers.add("flarum-approval",(function(){p().prototype.isApproved=p().attribute("isApproved"),(0,t.extend)(p().prototype,"badges",(function(o){this.isApproved()||o.has("hidden")||o.add("awaitingApproval",m(c(),{type:"awaitingApproval",icon:"fas fa-gavel",label:a().translator.trans("flarum-approval.forum.badge.awaiting_approval_tooltip")}))})),s().prototype.isApproved=s().attribute("isApproved"),s().prototype.canApprove=s().attribute("canApprove"),(0,t.extend)(l().prototype,"elementAttrs",(function(o){this.attrs.discussion.isApproved()||(o.className+=" DiscussionListItem--unapproved")})),(0,t.extend)(v().prototype,"elementAttrs",(function(o){this.attrs.post.isApproved()||(o.className+=" Post--unapproved")})),(0,t.extend)(A().prototype,"headerItems",(function(o){this.attrs.post.isApproved()||this.attrs.post.isHidden()||o.add("unapproved",a().translator.trans("flarum-approval.forum.post.awaiting_approval_text"))})),(0,t.override)(v().prototype,"flagReason",(function(o,t){return"approval"===t.type()?a().translator.trans("flarum-approval.forum.post.awaiting_approval_text"):o(t)})),(0,t.extend)(g(),"destructiveControls",(function(o,t){!t.isApproved()&&t.canApprove()&&o.add("approve",m(b(),{icon:"fas fa-check",onclick:g().approveAction.bind(t)},a().translator.trans("flarum-approval.forum.post_controls.approve_button")),10)})),g().approveAction=function(){this.save({isApproved:!0}),1===this.number()&&this.discussion().pushAttributes({isApproved:!0})}}),-10)})(),module.exports={}})();
|
||||||
//# sourceMappingURL=forum.js.map
|
//# sourceMappingURL=forum.js.map
|
2
extensions/approval/js/dist/forum.js.map
generated
vendored
2
extensions/approval/js/dist/forum.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@@ -6,7 +6,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"prettier": "^2.5.1",
|
"prettier": "^2.5.1",
|
||||||
"flarum-webpack-config": "^2.0.0",
|
"flarum-webpack-config": "^2.0.0",
|
||||||
"webpack": "^5.65.0",
|
"webpack": "^5.76.0",
|
||||||
"webpack-cli": "^4.9.1",
|
"webpack-cli": "^4.9.1",
|
||||||
"@flarum/prettier-config": "^1.0.0"
|
"@flarum/prettier-config": "^1.0.0"
|
||||||
},
|
},
|
||||||
|
15
extensions/approval/js/src/@types/shims.d.ts
vendored
Normal file
15
extensions/approval/js/src/@types/shims.d.ts
vendored
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
import 'flarum/common/models/Discussion';
|
||||||
|
import 'flarum/common/models/Post';
|
||||||
|
|
||||||
|
declare module 'flarum/common/models/Discussion' {
|
||||||
|
export default interface Discussion {
|
||||||
|
isApproved(): boolean;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
declare module 'flarum/common/models/Post' {
|
||||||
|
export default interface Post {
|
||||||
|
isApproved(): boolean;
|
||||||
|
canApprove(): boolean;
|
||||||
|
}
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
@@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
namespace Flarum\Approval\Access;
|
namespace Flarum\Approval\Access;
|
||||||
|
|
||||||
|
use Closure;
|
||||||
use Flarum\Discussion\Discussion;
|
use Flarum\Discussion\Discussion;
|
||||||
use Flarum\User\User;
|
use Flarum\User\User;
|
||||||
use Illuminate\Database\Eloquent\Builder;
|
use Illuminate\Database\Eloquent\Builder;
|
||||||
@@ -39,15 +40,24 @@ class ScopePrivatePostVisibility
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private function discussionWhereCanApprovePosts(User $actor)
|
/**
|
||||||
|
* Looks if the actor has permission to approve posts,
|
||||||
|
* within the discussion which the post is a part of.
|
||||||
|
*
|
||||||
|
* For example, the tags extension,
|
||||||
|
* turns the `approvePosts` ability into per tag basis.
|
||||||
|
*/
|
||||||
|
private function discussionWhereCanApprovePosts(User $actor): Closure
|
||||||
{
|
{
|
||||||
return function ($query) use ($actor) {
|
return function ($query) use ($actor) {
|
||||||
$query->selectRaw('1')
|
$query->selectRaw('1')
|
||||||
->from('discussions')
|
->from('discussions')
|
||||||
->whereColumn('discussions.id', 'posts.discussion_id')
|
->whereColumn('discussions.id', 'posts.discussion_id')
|
||||||
->where(function ($query) use ($actor) {
|
->where(function ($query) use ($actor) {
|
||||||
|
$query->whereRaw('1 != 1')->orWhere(function ($query) use ($actor) {
|
||||||
Discussion::query()->setQuery($query)->whereVisibleTo($actor, 'approvePosts');
|
Discussion::query()->setQuery($query)->whereVisibleTo($actor, 'approvePosts');
|
||||||
});
|
});
|
||||||
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -11,55 +11,55 @@ namespace Flarum\Approval\Listener;
|
|||||||
|
|
||||||
use Flarum\Approval\Event\PostWasApproved;
|
use Flarum\Approval\Event\PostWasApproved;
|
||||||
use Flarum\Post\Event\Saving;
|
use Flarum\Post\Event\Saving;
|
||||||
|
use Flarum\User\Exception\PermissionDeniedException;
|
||||||
|
use Illuminate\Contracts\Events\Dispatcher;
|
||||||
|
|
||||||
class ApproveContent
|
class ApproveContent
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @param Saving $event
|
* @param Dispatcher $events
|
||||||
*/
|
*/
|
||||||
public static function approvePost(Saving $event)
|
public function subscribe(Dispatcher $events)
|
||||||
|
{
|
||||||
|
$events->listen(Saving::class, [$this, 'approvePost']);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @throws PermissionDeniedException
|
||||||
|
*/
|
||||||
|
public function approvePost(Saving $event)
|
||||||
{
|
{
|
||||||
$attributes = $event->data['attributes'];
|
$attributes = $event->data['attributes'];
|
||||||
$post = $event->post;
|
$post = $event->post;
|
||||||
|
|
||||||
|
// Nothing to do if it is already approved.
|
||||||
|
if ($post->is_approved) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* We approve a post in one of two cases:
|
||||||
|
* - The post was unapproved and the allowed action is approving it. We trigger an event.
|
||||||
|
* - The post was unapproved and the allowed actor is hiding or un-hiding it.
|
||||||
|
* We approve it silently if the action is unhiding.
|
||||||
|
*/
|
||||||
|
$approvingSilently = false;
|
||||||
|
|
||||||
if (isset($attributes['isApproved'])) {
|
if (isset($attributes['isApproved'])) {
|
||||||
$event->actor->assertCan('approve', $post);
|
$event->actor->assertCan('approve', $post);
|
||||||
|
|
||||||
$isApproved = (bool) $attributes['isApproved'];
|
$isApproved = (bool) $attributes['isApproved'];
|
||||||
} elseif (! empty($attributes['isHidden']) && $event->actor->can('approve', $post)) {
|
} elseif (isset($attributes['isHidden']) && $event->actor->can('approve', $post)) {
|
||||||
$isApproved = true;
|
$isApproved = true;
|
||||||
|
$approvingSilently = $attributes['isHidden'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($isApproved)) {
|
if (! empty($isApproved)) {
|
||||||
$post->is_approved = true;
|
$post->is_approved = true;
|
||||||
|
|
||||||
|
if (! $approvingSilently) {
|
||||||
$post->raise(new PostWasApproved($post, $event->actor));
|
$post->raise(new PostWasApproved($post, $event->actor));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param PostWasApproved $event
|
|
||||||
*/
|
|
||||||
public static function approveDiscussion(PostWasApproved $event)
|
|
||||||
{
|
|
||||||
$post = $event->post;
|
|
||||||
$discussion = $post->discussion;
|
|
||||||
$user = $discussion->user;
|
|
||||||
|
|
||||||
$discussion->refreshCommentCount();
|
|
||||||
$discussion->refreshLastPost();
|
|
||||||
|
|
||||||
if ($post->number == 1) {
|
|
||||||
$discussion->is_approved = true;
|
|
||||||
|
|
||||||
$discussion->afterSave(function () use ($user) {
|
|
||||||
$user->refreshDiscussionCount();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
$discussion->save();
|
|
||||||
|
|
||||||
$user->refreshCommentCount();
|
|
||||||
$user->save();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -9,17 +9,27 @@
|
|||||||
|
|
||||||
namespace Flarum\Approval\Listener;
|
namespace Flarum\Approval\Listener;
|
||||||
|
|
||||||
|
use Carbon\Carbon;
|
||||||
use Flarum\Discussion\Discussion;
|
use Flarum\Discussion\Discussion;
|
||||||
use Flarum\Flags\Flag;
|
use Flarum\Flags\Flag;
|
||||||
use Flarum\Post\CommentPost;
|
use Flarum\Post\CommentPost;
|
||||||
use Flarum\Post\Event\Saving;
|
use Flarum\Post\Event\Saving;
|
||||||
|
use Illuminate\Contracts\Events\Dispatcher;
|
||||||
|
|
||||||
class UnapproveNewContent
|
class UnapproveNewContent
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @param Dispatcher $events
|
||||||
|
*/
|
||||||
|
public function subscribe(Dispatcher $events)
|
||||||
|
{
|
||||||
|
$events->listen(Saving::class, [$this, 'unapproveNewPosts']);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param Saving $event
|
* @param Saving $event
|
||||||
*/
|
*/
|
||||||
public static function unapproveNewPosts(Saving $event)
|
public function unapproveNewPosts(Saving $event)
|
||||||
{
|
{
|
||||||
$post = $event->post;
|
$post = $event->post;
|
||||||
|
|
||||||
@@ -46,7 +56,7 @@ class UnapproveNewContent
|
|||||||
|
|
||||||
$flag->post_id = $post->id;
|
$flag->post_id = $post->id;
|
||||||
$flag->type = 'approval';
|
$flag->type = 'approval';
|
||||||
$flag->created_at = time();
|
$flag->created_at = Carbon::now();
|
||||||
|
|
||||||
$flag->save();
|
$flag->save();
|
||||||
});
|
});
|
||||||
|
@@ -0,0 +1,45 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Flarum.
|
||||||
|
*
|
||||||
|
* For detailed copyright and license information, please view the
|
||||||
|
* LICENSE file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Flarum\Approval\Listener;
|
||||||
|
|
||||||
|
use Flarum\Approval\Event\PostWasApproved;
|
||||||
|
|
||||||
|
class UpdateDiscussionAfterPostApproval
|
||||||
|
{
|
||||||
|
public function handle(PostWasApproved $event)
|
||||||
|
{
|
||||||
|
$post = $event->post;
|
||||||
|
$discussion = $post->discussion;
|
||||||
|
$user = $discussion->user;
|
||||||
|
|
||||||
|
$discussion->refreshCommentCount();
|
||||||
|
$discussion->refreshLastPost();
|
||||||
|
|
||||||
|
if ($post->number === 1) {
|
||||||
|
$discussion->is_approved = true;
|
||||||
|
|
||||||
|
$discussion->afterSave(function () use ($user) {
|
||||||
|
$user->refreshDiscussionCount();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
$discussion->save();
|
||||||
|
|
||||||
|
if ($discussion->user) {
|
||||||
|
$user->refreshCommentCount();
|
||||||
|
$user->save();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($post->user) {
|
||||||
|
$post->user->refreshCommentCount();
|
||||||
|
$post->user->save();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
0
extensions/approval/tests/fixtures/.gitkeep
vendored
Normal file
0
extensions/approval/tests/fixtures/.gitkeep
vendored
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Flarum.
|
||||||
|
*
|
||||||
|
* For detailed copyright and license information, please view the
|
||||||
|
* LICENSE file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Flarum\Approval\Tests\integration;
|
||||||
|
|
||||||
|
use Carbon\Carbon;
|
||||||
|
|
||||||
|
trait InteractsWithUnapprovedContent
|
||||||
|
{
|
||||||
|
protected function prepareUnapprovedDatabaseContent()
|
||||||
|
{
|
||||||
|
$this->prepareDatabase([
|
||||||
|
'users' => [
|
||||||
|
['id' => 1, 'username' => 'Muralf', 'email' => 'muralf@machine.local', 'is_email_confirmed' => 1],
|
||||||
|
$this->normalUser(),
|
||||||
|
['id' => 3, 'username' => 'acme', 'email' => 'acme@machine.local', 'is_email_confirmed' => 1],
|
||||||
|
['id' => 4, 'username' => 'luceos', 'email' => 'luceos@machine.local', 'is_email_confirmed' => 1],
|
||||||
|
],
|
||||||
|
'discussions' => [
|
||||||
|
['id' => 1, 'title' => __CLASS__, 'created_at' => Carbon::now(), 'last_posted_at' => Carbon::now(), 'user_id' => 4, 'first_post_id' => 1, 'comment_count' => 1, 'is_approved' => 1, 'is_private' => 0],
|
||||||
|
['id' => 2, 'title' => __CLASS__, 'created_at' => Carbon::now(), 'last_posted_at' => Carbon::now(), 'user_id' => 4, 'first_post_id' => 2, 'comment_count' => 1, 'is_approved' => 0, 'is_private' => 1],
|
||||||
|
['id' => 3, 'title' => __CLASS__, 'created_at' => Carbon::now(), 'last_posted_at' => Carbon::now(), 'user_id' => 4, 'first_post_id' => 3, 'comment_count' => 1, 'is_approved' => 0, 'is_private' => 1],
|
||||||
|
['id' => 4, 'title' => __CLASS__, 'created_at' => Carbon::now(), 'last_posted_at' => Carbon::now(), 'user_id' => 4, 'first_post_id' => 4, 'comment_count' => 1, 'is_approved' => 1, 'is_private' => 0],
|
||||||
|
['id' => 5, 'title' => __CLASS__, 'created_at' => Carbon::now(), 'last_posted_at' => Carbon::now(), 'user_id' => 4, 'first_post_id' => 5, 'comment_count' => 1, 'is_approved' => 1, 'is_private' => 0],
|
||||||
|
['id' => 6, 'title' => __CLASS__, 'created_at' => Carbon::now(), 'last_posted_at' => Carbon::now(), 'user_id' => 4, 'first_post_id' => 6, 'comment_count' => 1, 'is_approved' => 0, 'is_private' => 1],
|
||||||
|
['id' => 7, 'title' => __CLASS__, 'created_at' => Carbon::now(), 'last_posted_at' => Carbon::now(), 'user_id' => 4, 'first_post_id' => 7, 'comment_count' => 1, 'is_approved' => 1, 'is_private' => 0],
|
||||||
|
],
|
||||||
|
'posts' => [
|
||||||
|
['id' => 1, 'discussion_id' => 1, 'user_id' => 4, 'type' => 'comment', 'content' => '<t><p>Text</p></t>', 'is_private' => 0, 'is_approved' => 1, 'number' => 1],
|
||||||
|
['id' => 2, 'discussion_id' => 2, 'user_id' => 4, 'type' => 'comment', 'content' => '<t><p>Text</p></t>', 'is_private' => 0, 'is_approved' => 1, 'number' => 1],
|
||||||
|
['id' => 3, 'discussion_id' => 3, 'user_id' => 4, 'type' => 'comment', 'content' => '<t><p>Text</p></t>', 'is_private' => 0, 'is_approved' => 1, 'number' => 1],
|
||||||
|
['id' => 4, 'discussion_id' => 4, 'user_id' => 4, 'type' => 'comment', 'content' => '<t><p>Text</p></t>', 'is_private' => 0, 'is_approved' => 1, 'number' => 1],
|
||||||
|
['id' => 5, 'discussion_id' => 5, 'user_id' => 4, 'type' => 'comment', 'content' => '<t><p>Text</p></t>', 'is_private' => 0, 'is_approved' => 1, 'number' => 1],
|
||||||
|
['id' => 6, 'discussion_id' => 6, 'user_id' => 4, 'type' => 'comment', 'content' => '<t><p>Text</p></t>', 'is_private' => 0, 'is_approved' => 1, 'number' => 1],
|
||||||
|
['id' => 7, 'discussion_id' => 7, 'user_id' => 4, 'type' => 'comment', 'content' => '<t><p>Text</p></t>', 'is_private' => 0, 'is_approved' => 1, 'number' => 1],
|
||||||
|
|
||||||
|
['id' => 8, 'discussion_id' => 7, 'user_id' => 4, 'type' => 'comment', 'content' => '<t><p>Text</p></t>', 'is_private' => 0, 'is_approved' => 1, 'number' => 2],
|
||||||
|
['id' => 9, 'discussion_id' => 7, 'user_id' => 4, 'type' => 'comment', 'content' => '<t><p>Text</p></t>', 'is_private' => 1, 'is_approved' => 0, 'number' => 3],
|
||||||
|
['id' => 10, 'discussion_id' => 7, 'user_id' => 4, 'type' => 'comment', 'content' => '<t><p>Text</p></t>', 'is_private' => 0, 'is_approved' => 1, 'number' => 4],
|
||||||
|
['id' => 11, 'discussion_id' => 7, 'user_id' => 4, 'type' => 'comment', 'content' => '<t><p>Text</p></t>', 'is_private' => 1, 'is_approved' => 0, 'number' => 5],
|
||||||
|
],
|
||||||
|
'groups' => [
|
||||||
|
['id' => 4, 'name_singular' => 'Acme', 'name_plural' => 'Acme', 'is_hidden' => 0]
|
||||||
|
],
|
||||||
|
'group_user' => [
|
||||||
|
['user_id' => 3, 'group_id' => 4]
|
||||||
|
],
|
||||||
|
'group_permission' => [
|
||||||
|
['permission' => 'discussion.approvePosts', 'group_id' => 4]
|
||||||
|
]
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* null: Guest, 2: Normal User.
|
||||||
|
*/
|
||||||
|
public function unallowedUsers(): array
|
||||||
|
{
|
||||||
|
return [[null], [2]];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1: Admin, 3: Permission Given, 4: Discussions Author.
|
||||||
|
*/
|
||||||
|
public function allowedUsers(): array
|
||||||
|
{
|
||||||
|
return [[1], [3], [4]];
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,62 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Flarum.
|
||||||
|
*
|
||||||
|
* For detailed copyright and license information, please view the
|
||||||
|
* LICENSE file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Flarum\Approval\Tests\integration\api;
|
||||||
|
|
||||||
|
use Flarum\Approval\Tests\integration\InteractsWithUnapprovedContent;
|
||||||
|
use Flarum\Testing\integration\RetrievesAuthorizedUsers;
|
||||||
|
use Flarum\Testing\integration\TestCase;
|
||||||
|
use Illuminate\Support\Arr;
|
||||||
|
|
||||||
|
class ListDiscussionsTest extends TestCase
|
||||||
|
{
|
||||||
|
use RetrievesAuthorizedUsers;
|
||||||
|
use InteractsWithUnapprovedContent;
|
||||||
|
|
||||||
|
protected function setUp(): void
|
||||||
|
{
|
||||||
|
parent::setUp();
|
||||||
|
|
||||||
|
$this->extension('flarum-approval');
|
||||||
|
|
||||||
|
$this->prepareUnapprovedDatabaseContent();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @dataProvider unallowedUsers
|
||||||
|
* @test
|
||||||
|
*/
|
||||||
|
public function can_only_see_approved_if_not_allowed_to_approve(?int $authenticatedAs)
|
||||||
|
{
|
||||||
|
$response = $this->send(
|
||||||
|
$this->request('GET', '/api/discussions', compact('authenticatedAs'))
|
||||||
|
);
|
||||||
|
|
||||||
|
$body = json_decode($response->getBody()->getContents(), true);
|
||||||
|
|
||||||
|
$this->assertEquals(200, $response->getStatusCode());
|
||||||
|
$this->assertEqualsCanonicalizing([1, 4, 5, 7], Arr::pluck($body['data'], 'id'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @dataProvider allowedUsers
|
||||||
|
* @test
|
||||||
|
*/
|
||||||
|
public function can_see_unapproved_if_allowed_to_approve(int $authenticatedAs)
|
||||||
|
{
|
||||||
|
$response = $this->send(
|
||||||
|
$this->request('GET', '/api/discussions', compact('authenticatedAs'))
|
||||||
|
);
|
||||||
|
|
||||||
|
$body = json_decode($response->getBody()->getContents(), true);
|
||||||
|
|
||||||
|
$this->assertEquals(200, $response->getStatusCode());
|
||||||
|
$this->assertEqualsCanonicalizing([1, 2, 3, 4, 5, 6, 7], Arr::pluck($body['data'], 'id'));
|
||||||
|
}
|
||||||
|
}
|
74
extensions/approval/tests/integration/api/ListPostsTest.php
Normal file
74
extensions/approval/tests/integration/api/ListPostsTest.php
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Flarum.
|
||||||
|
*
|
||||||
|
* For detailed copyright and license information, please view the
|
||||||
|
* LICENSE file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Flarum\Approval\Tests\integration\api;
|
||||||
|
|
||||||
|
use Flarum\Approval\Tests\integration\InteractsWithUnapprovedContent;
|
||||||
|
use Flarum\Testing\integration\RetrievesAuthorizedUsers;
|
||||||
|
use Flarum\Testing\integration\TestCase;
|
||||||
|
use Illuminate\Support\Arr;
|
||||||
|
|
||||||
|
class ListPostsTest extends TestCase
|
||||||
|
{
|
||||||
|
use RetrievesAuthorizedUsers;
|
||||||
|
use InteractsWithUnapprovedContent;
|
||||||
|
|
||||||
|
protected function setUp(): void
|
||||||
|
{
|
||||||
|
parent::setUp();
|
||||||
|
|
||||||
|
$this->extension('flarum-approval');
|
||||||
|
|
||||||
|
$this->prepareUnapprovedDatabaseContent();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @dataProvider unallowedUsers
|
||||||
|
* @test
|
||||||
|
*/
|
||||||
|
public function can_only_see_approved_if_not_allowed_to_approve(?int $authenticatedAs)
|
||||||
|
{
|
||||||
|
$response = $this->send(
|
||||||
|
$this
|
||||||
|
->request('GET', '/api/posts', compact('authenticatedAs'))
|
||||||
|
->withQueryParams([
|
||||||
|
'filter' => [
|
||||||
|
'discussion' => 7
|
||||||
|
]
|
||||||
|
])
|
||||||
|
);
|
||||||
|
|
||||||
|
$body = json_decode($response->getBody()->getContents(), true);
|
||||||
|
|
||||||
|
$this->assertEquals(200, $response->getStatusCode());
|
||||||
|
$this->assertEqualsCanonicalizing([7, 8, 10], Arr::pluck($body['data'], 'id'));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @dataProvider allowedUsers
|
||||||
|
* @test
|
||||||
|
*/
|
||||||
|
public function can_see_unapproved_if_allowed_to_approve(int $authenticatedAs)
|
||||||
|
{
|
||||||
|
$response = $this->send(
|
||||||
|
$this
|
||||||
|
->request('GET', '/api/posts', compact('authenticatedAs'))
|
||||||
|
->withQueryParams([
|
||||||
|
'filter' => [
|
||||||
|
'discussion' => 7
|
||||||
|
]
|
||||||
|
])
|
||||||
|
);
|
||||||
|
|
||||||
|
$body = json_decode($response->getBody()->getContents(), true);
|
||||||
|
|
||||||
|
$this->assertEquals(200, $response->getStatusCode());
|
||||||
|
$this->assertEqualsCanonicalizing([7, 8, 9, 10, 11], Arr::pluck($body['data'], 'id'));
|
||||||
|
}
|
||||||
|
}
|
16
extensions/approval/tests/integration/setup.php
Normal file
16
extensions/approval/tests/integration/setup.php
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Flarum.
|
||||||
|
*
|
||||||
|
* For detailed copyright and license information, please view the
|
||||||
|
* LICENSE file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
use Flarum\Testing\integration\Setup\SetupScript;
|
||||||
|
|
||||||
|
require __DIR__.'/../../vendor/autoload.php';
|
||||||
|
|
||||||
|
$setup = new SetupScript();
|
||||||
|
|
||||||
|
$setup->run();
|
25
extensions/approval/tests/phpunit.integration.xml
Normal file
25
extensions/approval/tests/phpunit.integration.xml
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<phpunit
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
|
||||||
|
backupGlobals="false"
|
||||||
|
backupStaticAttributes="false"
|
||||||
|
colors="true"
|
||||||
|
convertErrorsToExceptions="true"
|
||||||
|
convertNoticesToExceptions="true"
|
||||||
|
convertWarningsToExceptions="true"
|
||||||
|
processIsolation="true"
|
||||||
|
stopOnFailure="false"
|
||||||
|
>
|
||||||
|
<coverage processUncoveredFiles="true">
|
||||||
|
<include>
|
||||||
|
<directory suffix=".php">../src/</directory>
|
||||||
|
</include>
|
||||||
|
</coverage>
|
||||||
|
<testsuites>
|
||||||
|
<testsuite name="Flarum Integration Tests">
|
||||||
|
<directory suffix="Test.php">./integration</directory>
|
||||||
|
<exclude>./integration/tmp</exclude>
|
||||||
|
</testsuite>
|
||||||
|
</testsuites>
|
||||||
|
</phpunit>
|
27
extensions/approval/tests/phpunit.unit.xml
Normal file
27
extensions/approval/tests/phpunit.unit.xml
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<phpunit
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
|
||||||
|
backupGlobals="false"
|
||||||
|
backupStaticAttributes="false"
|
||||||
|
colors="true"
|
||||||
|
convertErrorsToExceptions="true"
|
||||||
|
convertNoticesToExceptions="true"
|
||||||
|
convertWarningsToExceptions="true"
|
||||||
|
processIsolation="false"
|
||||||
|
stopOnFailure="false"
|
||||||
|
>
|
||||||
|
<coverage processUncoveredFiles="true">
|
||||||
|
<include>
|
||||||
|
<directory suffix=".php">../src/</directory>
|
||||||
|
</include>
|
||||||
|
</coverage>
|
||||||
|
<testsuites>
|
||||||
|
<testsuite name="Flarum Unit Tests">
|
||||||
|
<directory suffix="Test.php">./unit</directory>
|
||||||
|
</testsuite>
|
||||||
|
</testsuites>
|
||||||
|
<listeners>
|
||||||
|
<listener class="\Mockery\Adapter\Phpunit\TestListener" />
|
||||||
|
</listeners>
|
||||||
|
</phpunit>
|
0
extensions/approval/tests/unit/.gitkeep
Normal file
0
extensions/approval/tests/unit/.gitkeep
Normal file
20
extensions/bbcode/.gitattributes
vendored
Normal file
20
extensions/bbcode/.gitattributes
vendored
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
**/.gitattributes export-ignore
|
||||||
|
**/.gitignore export-ignore
|
||||||
|
**/.gitmodules export-ignore
|
||||||
|
**/.github export-ignore
|
||||||
|
**/.travis export-ignore
|
||||||
|
**/.travis.yml export-ignore
|
||||||
|
**/.editorconfig export-ignore
|
||||||
|
**/.styleci.yml export-ignore
|
||||||
|
|
||||||
|
**/phpunit.xml export-ignore
|
||||||
|
**/tests export-ignore
|
||||||
|
|
||||||
|
**/js/dist/**/* -diff
|
||||||
|
**/js/dist/**/* linguist-generated
|
||||||
|
**/js/dist-typings/**/* -diff
|
||||||
|
**/js/dist-typings/**/* linguist-generated
|
||||||
|
**/js/yarn.lock -diff
|
||||||
|
**/js/package-lock.json -diff
|
||||||
|
|
||||||
|
* text=auto eol=lf
|
@@ -19,7 +19,12 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"flarum/core": "^1.2"
|
"flarum/core": "^1.8"
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Flarum\\BBCode\\": "src"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
|
@@ -7,24 +7,14 @@
|
|||||||
* LICENSE file that was distributed with this source code.
|
* LICENSE file that was distributed with this source code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Flarum\Extend;
|
namespace Flarum\BBCode;
|
||||||
use s9e\TextFormatter\Configurator;
|
|
||||||
|
|
||||||
return (new Extend\Formatter)
|
use Flarum\Extend;
|
||||||
->configure(function (Configurator $config) {
|
|
||||||
$config->BBCodes->addFromRepository('B');
|
return [
|
||||||
$config->BBCodes->addFromRepository('I');
|
new Extend\Locales(__DIR__.'/locale'),
|
||||||
$config->BBCodes->addFromRepository('U');
|
|
||||||
$config->BBCodes->addFromRepository('S');
|
(new Extend\Formatter)
|
||||||
$config->BBCodes->addFromRepository('URL');
|
->render(Render::class)
|
||||||
$config->BBCodes->addFromRepository('IMG');
|
->configure(Configure::class),
|
||||||
$config->BBCodes->addFromRepository('EMAIL');
|
];
|
||||||
$config->BBCodes->addFromRepository('CODE');
|
|
||||||
$config->BBCodes->addFromRepository('QUOTE');
|
|
||||||
$config->BBCodes->addFromRepository('LIST');
|
|
||||||
$config->BBCodes->addFromRepository('DEL');
|
|
||||||
$config->BBCodes->addFromRepository('COLOR');
|
|
||||||
$config->BBCodes->addFromRepository('CENTER');
|
|
||||||
$config->BBCodes->addFromRepository('SIZE');
|
|
||||||
$config->BBCodes->addFromRepository('*');
|
|
||||||
});
|
|
||||||
|
10
extensions/bbcode/locale/en.yml
Normal file
10
extensions/bbcode/locale/en.yml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
flarum-bbcode:
|
||||||
|
|
||||||
|
##
|
||||||
|
# UNIQUE KEYS - The following keys are used in only one location each.
|
||||||
|
##
|
||||||
|
|
||||||
|
# Translations in this namespace are used by the forum user interface.
|
||||||
|
forum:
|
||||||
|
quote:
|
||||||
|
wrote: wrote
|
59
extensions/bbcode/src/Configure.php
Normal file
59
extensions/bbcode/src/Configure.php
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Flarum.
|
||||||
|
*
|
||||||
|
* For detailed copyright and license information, please view the
|
||||||
|
* LICENSE file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Flarum\BBCode;
|
||||||
|
|
||||||
|
use s9e\TextFormatter\Configurator;
|
||||||
|
|
||||||
|
class Configure
|
||||||
|
{
|
||||||
|
public function __invoke(Configurator $config)
|
||||||
|
{
|
||||||
|
$this->addTagsFromRepositories($config);
|
||||||
|
$this->adaptHighlightJs($config);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function addTagsFromRepositories(Configurator $config): void
|
||||||
|
{
|
||||||
|
$config->BBCodes->addFromRepository('B');
|
||||||
|
$config->BBCodes->addFromRepository('I');
|
||||||
|
$config->BBCodes->addFromRepository('U');
|
||||||
|
$config->BBCodes->addFromRepository('S');
|
||||||
|
$config->BBCodes->addFromRepository('URL');
|
||||||
|
$config->BBCodes->addFromRepository('IMG');
|
||||||
|
$config->BBCodes->addFromRepository('EMAIL');
|
||||||
|
$config->BBCodes->addFromRepository('CODE');
|
||||||
|
$config->BBCodes->addFromRepository('QUOTE', 'default', [
|
||||||
|
'authorStr' => '<xsl:value-of select="@author"/> <xsl:value-of select="$L_WROTE"/>'
|
||||||
|
]);
|
||||||
|
$config->BBCodes->addFromRepository('LIST');
|
||||||
|
$config->BBCodes->addFromRepository('DEL');
|
||||||
|
$config->BBCodes->addFromRepository('COLOR');
|
||||||
|
$config->BBCodes->addFromRepository('CENTER');
|
||||||
|
$config->BBCodes->addFromRepository('SIZE');
|
||||||
|
$config->BBCodes->addFromRepository('*');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fix for highlight JS not working after changing post content.
|
||||||
|
*
|
||||||
|
* @link https://github.com/flarum/framework/issues/3794
|
||||||
|
*/
|
||||||
|
protected function adaptHighlightJs(Configurator $config): void
|
||||||
|
{
|
||||||
|
$codeTag = $config->tags->get('CODE');
|
||||||
|
$script = '
|
||||||
|
<script>
|
||||||
|
if(window.hljsLoader && !document.currentScript.parentNode.hasAttribute(\'data-s9e-livepreview-onupdate\')) {
|
||||||
|
window.hljsLoader.highlightBlocks(document.currentScript.parentNode);
|
||||||
|
}
|
||||||
|
</script>';
|
||||||
|
$codeTag->template = str_replace('</pre>', $script.'</pre>', $codeTag->template);
|
||||||
|
}
|
||||||
|
}
|
33
extensions/bbcode/src/Render.php
Normal file
33
extensions/bbcode/src/Render.php
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This file is part of Flarum.
|
||||||
|
*
|
||||||
|
* For detailed copyright and license information, please view the
|
||||||
|
* LICENSE file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Flarum\BBCode;
|
||||||
|
|
||||||
|
use s9e\TextFormatter\Renderer;
|
||||||
|
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||||
|
|
||||||
|
class Render
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @var TranslatorInterface
|
||||||
|
*/
|
||||||
|
protected $translator;
|
||||||
|
|
||||||
|
public function __construct(TranslatorInterface $translator)
|
||||||
|
{
|
||||||
|
$this->translator = $translator;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function __invoke(Renderer $renderer, $context, string $xml): string
|
||||||
|
{
|
||||||
|
$renderer->setParameter('L_WROTE', $this->translator->trans('flarum-bbcode.forum.quote.wrote'));
|
||||||
|
|
||||||
|
return $xml;
|
||||||
|
}
|
||||||
|
}
|
@@ -1,19 +0,0 @@
|
|||||||
# EditorConfig helps developers define and maintain consistent
|
|
||||||
# coding styles between different editors and IDEs
|
|
||||||
# editorconfig.org
|
|
||||||
|
|
||||||
root = true
|
|
||||||
|
|
||||||
[*]
|
|
||||||
end_of_line = lf
|
|
||||||
charset = utf-8
|
|
||||||
trim_trailing_whitespace = true
|
|
||||||
insert_final_newline = true
|
|
||||||
indent_style = space
|
|
||||||
indent_size = 2
|
|
||||||
|
|
||||||
[*.{diff,md}]
|
|
||||||
trim_trailing_whitespace = false
|
|
||||||
|
|
||||||
[*.{php,xml,json}]
|
|
||||||
indent_size = 4
|
|
20
extensions/embed/.gitattributes
vendored
Normal file
20
extensions/embed/.gitattributes
vendored
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
**/.gitattributes export-ignore
|
||||||
|
**/.gitignore export-ignore
|
||||||
|
**/.gitmodules export-ignore
|
||||||
|
**/.github export-ignore
|
||||||
|
**/.travis export-ignore
|
||||||
|
**/.travis.yml export-ignore
|
||||||
|
**/.editorconfig export-ignore
|
||||||
|
**/.styleci.yml export-ignore
|
||||||
|
|
||||||
|
**/phpunit.xml export-ignore
|
||||||
|
**/tests export-ignore
|
||||||
|
|
||||||
|
**/js/dist/**/* -diff
|
||||||
|
**/js/dist/**/* linguist-generated
|
||||||
|
**/js/dist-typings/**/* -diff
|
||||||
|
**/js/dist-typings/**/* linguist-generated
|
||||||
|
**/js/yarn.lock -diff
|
||||||
|
**/js/package-lock.json -diff
|
||||||
|
|
||||||
|
* text=auto eol=lf
|
@@ -19,7 +19,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"flarum/core": "^1.2"
|
"flarum/core": "^1.8"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
|
2
extensions/embed/js/dist/forum.js
generated
vendored
2
extensions/embed/js/dist/forum.js
generated
vendored
File diff suppressed because one or more lines are too long
2
extensions/embed/js/dist/forum.js.map
generated
vendored
2
extensions/embed/js/dist/forum.js.map
generated
vendored
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user