Compare commits
977 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c2ff9a8a7d | ||
|
|
c1467a72b1 | ||
|
|
6b82fc2082 | ||
|
|
768cb550d6 | ||
|
|
1c86b1f606 | ||
|
|
6f5f329c12 | ||
|
|
0d1da0db87 | ||
|
|
e00ae3d1dd | ||
|
|
d0b19e59a6 | ||
|
|
f40b40f030 | ||
|
|
9403d1214a | ||
|
|
1c27df9b32 | ||
|
|
3ce7d21df9 | ||
|
|
25f4818d2e | ||
|
|
9c020ded6d | ||
|
|
71b325f389 | ||
|
|
ce5491ea1c | ||
|
|
9e5ee4f65b | ||
|
|
3286f4e78a | ||
|
|
3acf78b77e | ||
|
|
ff53d7e443 | ||
|
|
b589fcbdb5 | ||
|
|
30e6d8c5ae | ||
|
|
0c451ee8ee | ||
|
|
d34378032f | ||
|
|
302a827eca | ||
|
|
5346491f37 | ||
|
|
42baf175aa | ||
|
|
1c30cf12d1 | ||
|
|
7f84eaa713 | ||
|
|
591f1ca11c | ||
|
|
a4635a1933 | ||
|
|
70d3e08c11 | ||
|
|
0679aa53eb | ||
|
|
58642b9535 | ||
|
|
4c2033aa8c | ||
|
|
4356dd2c62 | ||
|
|
dd4c38438b | ||
|
|
ac1df904ca | ||
|
|
8e926b1208 | ||
|
|
7754719702 | ||
|
|
722a0a401c | ||
|
|
99afe12cba | ||
|
|
846b4222fe | ||
|
|
2841e12a30 | ||
|
|
f7a7294466 | ||
|
|
0a093d4029 | ||
|
|
81a2dc6981 | ||
|
|
c7f935f1c8 | ||
|
|
b6a6bc0ca4 | ||
|
|
8082278af5 | ||
|
|
4548aa17de | ||
|
|
5cbe0d93a7 | ||
|
|
510d04c48f | ||
|
|
360661f002 | ||
|
|
0a56396091 | ||
|
|
a2b472f2d8 | ||
|
|
c11b7f5b34 | ||
|
|
b05f40f77c | ||
|
|
30b08bd87c | ||
|
|
2cbc827bca | ||
|
|
6b5c8221de | ||
|
|
430de1793c | ||
|
|
9bcb0cb7b1 | ||
|
|
96aaba10aa | ||
|
|
49b02cd4f8 | ||
|
|
c611762c9e | ||
|
|
2b5f31dab0 | ||
|
|
57681c8390 | ||
|
|
7136e9f26c | ||
|
|
f952ddc130 | ||
|
|
3ddd6d6ee4 | ||
|
|
b0a104ea01 | ||
|
|
6b97296251 | ||
|
|
b7d9cf08a0 | ||
|
|
f461a16d65 | ||
|
|
a4cc7f4e40 | ||
|
|
7ec5108e22 | ||
|
|
cd38503951 | ||
|
|
22f3dab70d | ||
|
|
d35684f861 | ||
|
|
dde725d06d | ||
|
|
80de4b7a9b | ||
|
|
34e8421435 | ||
|
|
700e58e3dc | ||
|
|
454eef2e07 | ||
|
|
87620921a2 | ||
|
|
3f721aa1cf | ||
|
|
634cdcceee | ||
|
|
29d9da73bb | ||
|
|
33bb209b97 | ||
|
|
081c1a94fe | ||
|
|
9191031140 | ||
|
|
39ba94e303 | ||
|
|
273ceca063 | ||
|
|
39790f01dd | ||
|
|
8e45ceaa3a | ||
|
|
f31b97c4c7 | ||
|
|
7058769c96 | ||
|
|
d3e4286380 | ||
|
|
b721ca9b33 | ||
|
|
b4703b29f8 | ||
|
|
dd27362e96 | ||
|
|
7b84cdabf6 | ||
|
|
9c4087fe38 | ||
|
|
691a99cb28 | ||
|
|
dfe908776e | ||
|
|
17c8cf87d6 | ||
|
|
edfe391e41 | ||
|
|
b7e060e6db | ||
|
|
146d9a19bb | ||
|
|
ae6a4ef2a4 | ||
|
|
9a1970d3b1 | ||
|
|
9489e51574 | ||
|
|
0b743618ea | ||
|
|
6eac80ee1d | ||
|
|
e446880836 | ||
|
|
5b9e142f89 | ||
|
|
1efbe606fd | ||
|
|
ab9f398d7b | ||
|
|
d5dc74bea4 | ||
|
|
6fec3aca77 | ||
|
|
6a816619a4 | ||
|
|
cf40bc72b2 | ||
|
|
30ec81e95d | ||
|
|
0d07356817 | ||
|
|
7ef36ee565 | ||
|
|
abcae0ee97 | ||
|
|
988a3e8a03 | ||
|
|
6958596fb8 | ||
|
|
2e29733c8c | ||
|
|
288db261a9 | ||
|
|
1a75eec5dc | ||
|
|
149b554676 | ||
|
|
4a3ebe285c | ||
|
|
d66a656733 | ||
|
|
0a52e3a5f7 | ||
|
|
628f5ed673 | ||
|
|
28bd570436 | ||
|
|
6b882d13b2 | ||
|
|
68bd687069 | ||
|
|
a3113ed195 | ||
|
|
b395eaa76c | ||
|
|
bd6b3c650e | ||
|
|
6978d6b14b | ||
|
|
c94aa7bcba | ||
|
|
84104a4238 | ||
|
|
d5877f8a66 | ||
|
|
3ce91c9f44 | ||
|
|
7f39f91ecd | ||
|
|
882cc4c43a | ||
|
|
2bf49d69ec | ||
|
|
ad73454f16 | ||
|
|
42e265d802 | ||
|
|
f870bc3cf0 | ||
|
|
476ccc99ff | ||
|
|
b3e640a1f7 | ||
|
|
9fb376d8b2 | ||
|
|
bb0a102ceb | ||
|
|
2cf207fba2 | ||
|
|
f9f97f3b7f | ||
|
|
580853a2b4 | ||
|
|
57ba859c57 | ||
|
|
05e4ed3bfb | ||
|
|
d4cabb61b6 | ||
|
|
696c795a4a | ||
|
|
675d523d0d | ||
|
|
8bcb8eeb9e | ||
|
|
42a6c35d9c | ||
|
|
a0de111dea | ||
|
|
0c2694c746 | ||
|
|
c6ceb562d0 | ||
|
|
bad99a11ab | ||
|
|
e43519e27e | ||
|
|
c8963ed6e3 | ||
|
|
2f14fa0b1c | ||
|
|
6fe3b8a955 | ||
|
|
5b1d00fbe2 | ||
|
|
f48b20c389 | ||
|
|
d2c54f671f | ||
|
|
69e61efd86 | ||
|
|
ce7f88f75d | ||
|
|
8c74e3cbd7 | ||
|
|
5325274a91 | ||
|
|
aeb732b446 | ||
|
|
a6bde46cc3 | ||
|
|
c42143a17d | ||
|
|
8d6935e7a3 | ||
|
|
bcafe5c031 | ||
|
|
7dc1ea5013 | ||
|
|
abedfee4a2 | ||
|
|
ec5e380c51 | ||
|
|
3b76ff34a5 | ||
|
|
ab90cadd3e | ||
|
|
c21c6d6910 | ||
|
|
4b4e47df6a | ||
|
|
3e5252e931 | ||
|
|
f19573221a | ||
|
|
4411e2a8d3 | ||
|
|
b4f360de78 | ||
|
|
778a4e5fa8 | ||
|
|
b38bf18f9d | ||
|
|
956c3cf53b | ||
|
|
85ef3c04af | ||
|
|
173a1b387d | ||
|
|
772305dbed | ||
|
|
cf39163d7b | ||
|
|
01a0cdb50b | ||
|
|
e871e2e02b | ||
|
|
8254493d97 | ||
|
|
a81e069f77 | ||
|
|
6e41e5865e | ||
|
|
28c59c3c5b | ||
|
|
4c01eca4ad | ||
|
|
c8075e0d6b | ||
|
|
7e72dbe14d | ||
|
|
1f0b707193 | ||
|
|
df031728da | ||
|
|
3f6c275298 | ||
|
|
ca3e332a2f | ||
|
|
80f19f936c | ||
|
|
755d766262 | ||
|
|
74e59f1ccf | ||
|
|
176b1e9c99 | ||
|
|
47972dce05 | ||
|
|
ced75b805a | ||
|
|
a41eae1ea7 | ||
|
|
8815569861 | ||
|
|
3a68339cb9 | ||
|
|
8833e7c417 | ||
|
|
8da989ed51 | ||
|
|
46a98f459f | ||
|
|
ff7d399eaa | ||
|
|
afbf174000 | ||
|
|
31d446e8c4 | ||
|
|
d5a57c869b | ||
|
|
d61d556574 | ||
|
|
84024e177c | ||
|
|
3e31e87daf | ||
|
|
0990900da2 | ||
|
|
f0d0adf493 | ||
|
|
cbcba71e32 | ||
|
|
7ef88217cb | ||
|
|
2566881fbf | ||
|
|
47d37a46b5 | ||
|
|
5c174fade3 | ||
|
|
79c06713cb | ||
|
|
24ca9b1a33 | ||
|
|
56fa0fa039 | ||
|
|
d36bab9e16 | ||
|
|
6923bdcda6 | ||
|
|
0029be3291 | ||
|
|
01e688b49e | ||
|
|
27bdebfde4 | ||
|
|
11d2ad4139 | ||
|
|
3daa661adb | ||
|
|
e3f32c5209 | ||
|
|
3af04cbd7e | ||
|
|
7a5a82b617 | ||
|
|
f109b7a762 | ||
|
|
be6738c8ba | ||
|
|
26d42c8e6d | ||
|
|
59d69c2708 | ||
|
|
c833fe4828 | ||
|
|
9dd95d3e5b | ||
|
|
2123d6630d | ||
|
|
4452e8eb1b | ||
|
|
068335c2ad | ||
|
|
f10ee503f8 | ||
|
|
8d8f542908 | ||
|
|
02ac0655b0 | ||
|
|
d71400ea63 | ||
|
|
9e4b8776d7 | ||
|
|
86c02990c1 | ||
|
|
e41429c174 | ||
|
|
c7b2d26a95 | ||
|
|
7625cd975c | ||
|
|
40f9d33a93 | ||
|
|
37e6f30a57 | ||
|
|
a91aaa09af | ||
|
|
30b64c355b | ||
|
|
fdf0836ddc | ||
|
|
c1ab2a42bd | ||
|
|
25c0838c2e | ||
|
|
b37011b416 | ||
|
|
03a7765f9f | ||
|
|
791e6ef96c | ||
|
|
24223bf7a3 | ||
|
|
9bb507a1f5 | ||
|
|
3b91ee46c5 | ||
|
|
5373e9f279 | ||
|
|
305a069be5 | ||
|
|
ca35e9ade0 | ||
|
|
92a4ff1a48 | ||
|
|
0ce562adf8 | ||
|
|
489a8b1d65 | ||
|
|
6e6f4583a3 | ||
|
|
bfa83ea244 | ||
|
|
489a027fa3 | ||
|
|
681d06a31d | ||
|
|
765991eb68 | ||
|
|
157c8ebd33 | ||
|
|
82fcbcb6ba | ||
|
|
a7122e79f1 | ||
|
|
60797ffdb8 | ||
|
|
6888b0ade0 | ||
|
|
5370d36b30 | ||
|
|
0512a5d1a6 | ||
|
|
767c669435 | ||
|
|
81d32e0a1b | ||
|
|
09225acfde | ||
|
|
8fcab7b89b | ||
|
|
8e61b1c681 | ||
|
|
657f496c70 | ||
|
|
87beb74321 | ||
|
|
e8a07a034c | ||
|
|
439316a8e6 | ||
|
|
b2b1f596ee | ||
|
|
98611e7460 | ||
|
|
7a442c5359 | ||
|
|
84d579dda1 | ||
|
|
b6990f2917 | ||
|
|
85dd42c378 | ||
|
|
9752d2aa38 | ||
|
|
167fc489d1 | ||
|
|
fb33a74f69 | ||
|
|
8590f29e14 | ||
|
|
456d34d30d | ||
|
|
85140018dd | ||
|
|
d9ba34d5b4 | ||
|
|
ff90ca3fe0 | ||
|
|
c54c9ab774 | ||
|
|
46c6e8f525 | ||
|
|
07db7540ff | ||
|
|
65d28c72a4 | ||
|
|
21037bb4d0 | ||
|
|
18f9c0309f | ||
|
|
b226c00e42 | ||
|
|
bb23883e5b | ||
|
|
f31c173db4 | ||
|
|
2980fcb949 | ||
|
|
550055a58c | ||
|
|
487a450da9 | ||
|
|
2b52366684 | ||
|
|
8264be470b | ||
|
|
67e2a85007 | ||
|
|
73f678eaa4 | ||
|
|
faf2003c14 | ||
|
|
f89b1a3d60 | ||
|
|
883289b118 | ||
|
|
b3e5f50d13 | ||
|
|
266a01a86b | ||
|
|
c5b73b17d6 | ||
|
|
b9f720c9b3 | ||
|
|
d721feb1e4 | ||
|
|
5453f36c01 | ||
|
|
832f24c603 | ||
|
|
b65eb49c20 | ||
|
|
0537ecfae4 | ||
|
|
6824a784d0 | ||
|
|
46de0c09de | ||
|
|
4d481d6013 | ||
|
|
0e30339615 | ||
|
|
6d01a37418 | ||
|
|
4b63364a9b | ||
|
|
f7d590383f | ||
|
|
c51a46567d | ||
|
|
9f918c0663 | ||
|
|
8e90422ac8 | ||
|
|
8fd6950d18 | ||
|
|
fb6a51cc92 | ||
|
|
485bef2c94 | ||
|
|
67ccee18c5 | ||
|
|
5adf485f68 | ||
|
|
2f2c6f2b79 | ||
|
|
7bb60e2dc9 | ||
|
|
3658a62db7 | ||
|
|
139992ebd5 | ||
|
|
7d12b4a21f | ||
|
|
e264ff9d3f | ||
|
|
2693f4205d | ||
|
|
14e4fe66c9 | ||
|
|
9f6d7db55d | ||
|
|
9b56deb459 | ||
|
|
b3c101cd10 | ||
|
|
aab520b0d4 | ||
|
|
d66d4e0095 | ||
|
|
e19b190cb4 | ||
|
|
2732fc1423 | ||
|
|
6aa68d63b0 | ||
|
|
0db32542b7 | ||
|
|
ddca233771 | ||
|
|
929b506789 | ||
|
|
522010e34e | ||
|
|
d6eabc8e94 | ||
|
|
307386554f | ||
|
|
dc155f000e | ||
|
|
07e41b7da3 | ||
|
|
42f9bf622e | ||
|
|
520b0b7326 | ||
|
|
a96fa6405e | ||
|
|
153536d6d4 | ||
|
|
ed31e2eaff | ||
|
|
ffa6bc0740 | ||
|
|
000b9f6eac | ||
|
|
6f60e75c45 | ||
|
|
490b64c2b3 | ||
|
|
90278d0f63 | ||
|
|
c46f01bcdc | ||
|
|
c298ab101f | ||
|
|
95ce873f73 | ||
|
|
a269392d48 | ||
|
|
82318c6df0 | ||
|
|
2dc8a2213f | ||
|
|
c45e6c6bef | ||
|
|
a51d0af843 | ||
|
|
811b2a0062 | ||
|
|
422d3b82e6 | ||
|
|
ff10c473e0 | ||
|
|
fcf28501e7 | ||
|
|
8552f1740b | ||
|
|
389c3fcc47 | ||
|
|
5b4253d6f0 | ||
|
|
291708692b | ||
|
|
4a41ad0467 | ||
|
|
1c2cac9676 | ||
|
|
3ba1f583e1 | ||
|
|
57bd7116c1 | ||
|
|
ce01ca5bea | ||
|
|
28439ec79c | ||
|
|
b9dcd9071c | ||
|
|
5f8564cbe7 | ||
|
|
454ed8940f | ||
|
|
b7e220415d | ||
|
|
2eb929840b | ||
|
|
8a442d1187 | ||
|
|
263e65ae53 | ||
|
|
a5bf61e176 | ||
|
|
876b8297e7 | ||
|
|
8eba530687 | ||
|
|
17921defa9 | ||
|
|
c937596d43 | ||
|
|
05b49d30d8 | ||
|
|
c325eea23a | ||
|
|
7a5fab82ca | ||
|
|
734881d098 | ||
|
|
acfb316e9a | ||
|
|
69f3702a2e | ||
|
|
c209486c5a | ||
|
|
fe6164bf7d | ||
|
|
c4cab440ac | ||
|
|
0b9f90630b | ||
|
|
553a66651c | ||
|
|
4988741e62 | ||
|
|
1c0e07a156 | ||
|
|
d913efb309 | ||
|
|
7f4d48b8a1 | ||
|
|
029e2621df | ||
|
|
23ddd8cbe2 | ||
|
|
a2f8c843cd | ||
|
|
efedefdae5 | ||
|
|
d6ca663d4e | ||
|
|
26567ee59b | ||
|
|
c50b039cb2 | ||
|
|
f5fd1f74bb | ||
|
|
341eeac12a | ||
|
|
e69efe6f62 | ||
|
|
33810e79f7 | ||
|
|
70918b453d | ||
|
|
dbb697b82a | ||
|
|
63645a279a | ||
|
|
a5b839d142 | ||
|
|
35e249c7aa | ||
|
|
1a82d708bb | ||
|
|
0bd56d7fd8 | ||
|
|
1b3d232dbe | ||
|
|
deb25cbaa1 | ||
|
|
2052ad337f | ||
|
|
37f83a9ce7 | ||
|
|
d67571fcb3 | ||
|
|
f23ca43eea | ||
|
|
9f78149fe1 | ||
|
|
9c891da92c | ||
|
|
4e79da6caf | ||
|
|
5248a9bc33 | ||
|
|
21f5ba615d | ||
|
|
741e60d1f9 | ||
|
|
01c02ba4f6 | ||
|
|
3b33781e16 | ||
|
|
010a863713 | ||
|
|
fe9db0b68e | ||
|
|
63fca720d2 | ||
|
|
7b98834f14 | ||
|
|
104174a9b3 | ||
|
|
c12b9c386b | ||
|
|
d847a2eb07 | ||
|
|
14c83fda94 | ||
|
|
e897ce13b2 | ||
|
|
96d63686ab | ||
|
|
f5dcbaf6d7 | ||
|
|
73ab4ac10f | ||
|
|
b657cc490f | ||
|
|
c9282c71df | ||
|
|
bf7402794c | ||
|
|
160886a0ec | ||
|
|
39c9d1608d | ||
|
|
9dd8071bc6 | ||
|
|
8e33015f68 | ||
|
|
34f837d8d2 | ||
|
|
f0c8fa4d22 | ||
|
|
0a5fdbbffa | ||
|
|
145b58f7cf | ||
|
|
b9fd47b182 | ||
|
|
e1c5540c13 | ||
|
|
651f9687f9 | ||
|
|
938a72e7ed | ||
|
|
809e811447 | ||
|
|
c597b07559 | ||
|
|
476abbd08b | ||
|
|
2c2255d73b | ||
|
|
648364aa23 | ||
|
|
3c769c6d31 | ||
|
|
ae88f3b75b | ||
|
|
a437ecd48b | ||
|
|
dafd4d81a6 | ||
|
|
104f66b099 | ||
|
|
2c422af380 | ||
|
|
edec4e38d6 | ||
|
|
62e1dc0c96 | ||
|
|
8fe4cbf882 | ||
|
|
e4d147eeba | ||
|
|
1826a04e91 | ||
|
|
9fcafb7f8a | ||
|
|
c4873ff3d3 | ||
|
|
b1f45773f3 | ||
|
|
f4eb291491 | ||
|
|
665f497b64 | ||
|
|
e74c1b4678 | ||
|
|
2be3af374d | ||
|
|
7df139f4a1 | ||
|
|
42d8b72b1b | ||
|
|
59fe50b31d | ||
|
|
63acc1a2e8 | ||
|
|
b158e769cc | ||
|
|
f2d45b570d | ||
|
|
e022bf5d85 | ||
|
|
858aea023d | ||
|
|
a2af3e7f77 | ||
|
|
6983fa1b72 | ||
|
|
ae22d091bf | ||
|
|
85e03c42f1 | ||
|
|
5a89c7ee9f | ||
|
|
8ad3362693 | ||
|
|
a6afdc4279 | ||
|
|
ae8cc12e2f | ||
|
|
9ba479fe29 | ||
|
|
924a2147ff | ||
|
|
afc95dba32 | ||
|
|
f035fa3464 | ||
|
|
8760404245 | ||
|
|
f427323e61 | ||
|
|
f99610b9f2 | ||
|
|
42c8f250cc | ||
|
|
e30a2efddb | ||
|
|
62fa23fda4 | ||
|
|
57b8666bd2 | ||
|
|
003e1eadb9 | ||
|
|
20bd4cd822 | ||
|
|
b76b370d1c | ||
|
|
4569a05a50 | ||
|
|
fe2685635f | ||
|
|
400fa62991 | ||
|
|
471825c6af | ||
|
|
f6be2714d9 | ||
|
|
d100b60e9d | ||
|
|
da6311bea6 | ||
|
|
78b02537f8 | ||
|
|
fddfb9e1cf | ||
|
|
1e4aedb5c7 | ||
|
|
41df373898 | ||
|
|
9133e87d91 | ||
|
|
5608bb9ce8 | ||
|
|
1a7aaae416 | ||
|
|
f88bb7ff9d | ||
|
|
b39782a246 | ||
|
|
045f63dddf | ||
|
|
1bbde052ae | ||
|
|
0a1f494517 | ||
|
|
a61679200d | ||
|
|
d778971aa7 | ||
|
|
627ffd4fb9 | ||
|
|
6450438868 | ||
|
|
bb91c34f15 | ||
|
|
94921e33fc | ||
|
|
827b921f0b | ||
|
|
938ec7bc36 | ||
|
|
a94f3034d1 | ||
|
|
85fb8dea69 | ||
|
|
b8d1a23205 | ||
|
|
81aeb6b3cf | ||
|
|
001948d530 | ||
|
|
5f022b2674 | ||
|
|
15fb7f86b0 | ||
|
|
ac0d635ec1 | ||
|
|
d8a341cd52 | ||
|
|
d3acbb4b7e | ||
|
|
f8c48dc0ba | ||
|
|
791b7570a1 | ||
|
|
6389f3a863 | ||
|
|
fe2485525d | ||
|
|
4758d0c1a1 | ||
|
|
2ea33b5854 | ||
|
|
951ebf4d07 | ||
|
|
5143692b43 | ||
|
|
230bf87bab | ||
|
|
5180400640 | ||
|
|
c44d7bcd44 | ||
|
|
17b271b88e | ||
|
|
580640e412 | ||
|
|
83ac15e582 | ||
|
|
658ec2fbc6 | ||
|
|
4566110e95 | ||
|
|
d73c39fb95 | ||
|
|
723788d19e | ||
|
|
d388c48cb3 | ||
|
|
c63434f468 | ||
|
|
79f412a983 | ||
|
|
a92ae4d74b | ||
|
|
9ff6e86e3d | ||
|
|
7022121c43 | ||
|
|
e199c7b6f9 | ||
|
|
a36834d62f | ||
|
|
8b45cae0ad | ||
|
|
2519d6e54d | ||
|
|
3529269f36 | ||
|
|
27220c974d | ||
|
|
56e78b451c | ||
|
|
734c407917 | ||
|
|
dbfa448576 | ||
|
|
3caf17be9d | ||
|
|
a35c71ed04 | ||
|
|
82689265f6 | ||
|
|
d637240272 | ||
|
|
c7c8572148 | ||
|
|
5608d46e6c | ||
|
|
1a6a480f15 | ||
|
|
4929663437 | ||
|
|
bd698949a5 | ||
|
|
d99c85c4eb | ||
|
|
5d579d3ada | ||
|
|
17abe4af93 | ||
|
|
4757842448 | ||
|
|
c27c487017 | ||
|
|
fcccd1428a | ||
|
|
207ccd824d | ||
|
|
7123cab29f | ||
|
|
7c72aa8b5d | ||
|
|
257486bfcd | ||
|
|
59168da504 | ||
|
|
abab919953 | ||
|
|
1e70710be7 | ||
|
|
750d74f797 | ||
|
|
24385cd3b2 | ||
|
|
756e4839db | ||
|
|
47758f08c2 | ||
|
|
3719405bd7 | ||
|
|
b27a957c00 | ||
|
|
827fc92609 | ||
|
|
a5cc36ea64 | ||
|
|
dc856902fe | ||
|
|
e34b90fe33 | ||
|
|
48778729d3 | ||
|
|
08306acd8d | ||
|
|
73668d7a7e | ||
|
|
88d040eab4 | ||
|
|
36fee462df | ||
|
|
fa4875d2d7 | ||
|
|
ab2d10da45 | ||
|
|
973bfa9eed | ||
|
|
92bbc9bb58 | ||
|
|
6c4898b923 | ||
|
|
9b6437924d | ||
|
|
d8cfe5e319 | ||
|
|
bc248bd6af | ||
|
|
d1f34cc6eb | ||
|
|
babe849346 | ||
|
|
07271cf645 | ||
|
|
82d6d660bb | ||
|
|
1d71b923f4 | ||
|
|
30c9cca2d4 | ||
|
|
e446d16f26 | ||
|
|
700b87aa99 | ||
|
|
27307633c0 | ||
|
|
1808267267 | ||
|
|
ec6e58180e | ||
|
|
e83feb585d | ||
|
|
f850bd6ca2 | ||
|
|
2b3c150138 | ||
|
|
ba8983df8e | ||
|
|
293f120426 | ||
|
|
3d4a21f83f | ||
|
|
69e0f42223 | ||
|
|
e77cf69185 | ||
|
|
08d673f8ae | ||
|
|
4897b6c47b | ||
|
|
6a92bc43cc | ||
|
|
a2ad0822ec | ||
|
|
c859e1db31 | ||
|
|
8085658e53 | ||
|
|
e1b21839b2 | ||
|
|
d29e82a543 | ||
|
|
f836683a9c | ||
|
|
dca80918e2 | ||
|
|
242d95d384 | ||
|
|
8c67075b8c | ||
|
|
71d989ab47 | ||
|
|
3b7e951050 | ||
|
|
78b2e6b91e | ||
|
|
d4bc53a52d | ||
|
|
181a52e843 | ||
|
|
d93e216088 | ||
|
|
b77ff34a1b | ||
|
|
44f25d6c3e | ||
|
|
83eb886673 | ||
|
|
9c613012b9 | ||
|
|
538ad0f135 | ||
|
|
0a9955d2a4 | ||
|
|
a3dd5e36ec | ||
|
|
fea919b7cd | ||
|
|
f2e13d99d0 | ||
|
|
55635462d0 | ||
|
|
31ab4d54da | ||
|
|
ee7a80de54 | ||
|
|
5d04caa646 | ||
|
|
1a37cb840b | ||
|
|
44dd8649ed | ||
|
|
f1f3a8f3dc | ||
|
|
a89ce1273d | ||
|
|
dff5998f8c | ||
|
|
9adcadab67 | ||
|
|
627c6661da | ||
|
|
f2aa838179 | ||
|
|
4960c0467d | ||
|
|
9a6fa69020 | ||
|
|
fce44e85f9 | ||
|
|
c3fba7503f | ||
|
|
622a7ff37e | ||
|
|
decbffe22a | ||
|
|
be19bad8bd | ||
|
|
8f6f265509 | ||
|
|
708cda0bf5 | ||
|
|
e28719bd95 | ||
|
|
2df567b0c8 | ||
|
|
5074e77861 | ||
|
|
9a6d274e6c | ||
|
|
7017ac8b9d | ||
|
|
4287972852 | ||
|
|
d85d546ed1 | ||
|
|
7f27d206ba | ||
|
|
7fe332b2b2 | ||
|
|
af49db8903 | ||
|
|
51db5f3052 | ||
|
|
42ac819778 | ||
|
|
9804ce4f2d | ||
|
|
e4fe2074e1 | ||
|
|
c556ae7ffe | ||
|
|
28a9a424f2 | ||
|
|
5d8a8e90b3 | ||
|
|
b8e27503a9 | ||
|
|
cf22e6d092 | ||
|
|
bcdf5e9eab | ||
|
|
a03359a54f | ||
|
|
a80d4b51b0 | ||
|
|
dfa09ba1cd | ||
|
|
3e0e78efc0 | ||
|
|
9c4aa1403c | ||
|
|
7bdcf7b001 | ||
|
|
65e5ffbdf5 | ||
|
|
0797ac9063 | ||
|
|
837f838059 | ||
|
|
87437a6f0d | ||
|
|
caf05208c5 | ||
|
|
e10955fca7 | ||
|
|
3e4ae12451 | ||
|
|
5e0c57401d | ||
|
|
30c04f33e7 | ||
|
|
9eb9fb19ad | ||
|
|
6cc0dee633 | ||
|
|
12134cb419 | ||
|
|
8a5e467782 | ||
|
|
60685ee1d4 | ||
|
|
456c729260 | ||
|
|
5570fb9725 | ||
|
|
ec725c7c07 | ||
|
|
e7a0e5882e | ||
|
|
0d907a28f5 | ||
|
|
38591349dc | ||
|
|
5b7440680a | ||
|
|
c7039ee175 | ||
|
|
9e88f5b8c7 | ||
|
|
8470d68ddc | ||
|
|
e74967d73e | ||
|
|
5e543dab19 | ||
|
|
b5db70a418 | ||
|
|
386240af6a | ||
|
|
1ac865d5dd | ||
|
|
be2112f216 | ||
|
|
297d712b77 | ||
|
|
667384fab3 | ||
|
|
c875160890 | ||
|
|
c405f03ce7 | ||
|
|
3c3cfad44b | ||
|
|
a113ce41c3 | ||
|
|
614c93cb19 | ||
|
|
9a947d9f08 | ||
|
|
66e4d8f832 | ||
|
|
e9f14e2fc2 | ||
|
|
bf172d114b | ||
|
|
3dea0b7134 | ||
|
|
35bb0dba07 | ||
|
|
135a2e4c46 | ||
|
|
8c83c94814 | ||
|
|
a7ef7fa9d9 | ||
|
|
d1b0f51537 | ||
|
|
b50dfa5240 | ||
|
|
ed86787d2d | ||
|
|
95d719e939 | ||
|
|
6a63c317ce | ||
|
|
0da0e1e8f3 | ||
|
|
ce779acf77 | ||
|
|
9592c43ef6 | ||
|
|
dbc100fdbf | ||
|
|
86366bc549 | ||
|
|
b38d354b79 | ||
|
|
3d5687b433 | ||
|
|
c3ff2b0ba8 | ||
|
|
10e26cd6b9 | ||
|
|
de9390f2a6 | ||
|
|
f3f2b606ae | ||
|
|
b722f25a7a | ||
|
|
5b4e9d03b3 | ||
|
|
848251e542 | ||
|
|
d84f30fc4b | ||
|
|
5d109e1e62 | ||
|
|
13f7f1a017 | ||
|
|
5306949794 | ||
|
|
683754a041 | ||
|
|
1d575dca5e | ||
|
|
da768d6cf4 | ||
|
|
4073c51250 | ||
|
|
2327ff72e0 | ||
|
|
80cca1e218 | ||
|
|
6675e2d6cb | ||
|
|
2d1704cb55 | ||
|
|
34f0a4089b | ||
|
|
04b716678f | ||
|
|
0841302b2a | ||
|
|
4b4266f1a0 | ||
|
|
2c14b89bc8 | ||
|
|
6a1a9b9d17 | ||
|
|
c06e2f866a | ||
|
|
111ae79d64 | ||
|
|
737343580e | ||
|
|
8b8d18d269 | ||
|
|
45017ab230 | ||
|
|
f7789f467b | ||
|
|
3248e8c312 | ||
|
|
277f28276d | ||
|
|
48efcc997a | ||
|
|
fe75fb67c2 | ||
|
|
b40a0b70ec | ||
|
|
0885e74720 | ||
|
|
6065eac14f | ||
|
|
f17bbf1469 | ||
|
|
8e2006d99c | ||
|
|
c16cd8b26a | ||
|
|
bb8069de42 | ||
|
|
3bf1f22073 | ||
|
|
159925a30f | ||
|
|
cde17eb3b2 | ||
|
|
336b0d9288 | ||
|
|
20d7965e13 | ||
|
|
34e0d9c669 | ||
|
|
76d67d4f28 | ||
|
|
5cba0b690b | ||
|
|
8c6c971867 | ||
|
|
a84681ba23 | ||
|
|
4f5ff75790 | ||
|
|
1e36a1604c | ||
|
|
ed2544ba8c | ||
|
|
53adca8db8 | ||
|
|
ae2788749f | ||
|
|
f9ea092b01 | ||
|
|
1a30f6476b | ||
|
|
0322d55c9d | ||
|
|
64a5e4c812 | ||
|
|
792f4f943c | ||
|
|
fae46ac375 | ||
|
|
e2682b8e52 | ||
|
|
1769773b50 | ||
|
|
47ff8cf7aa | ||
|
|
f0fbf59af5 | ||
|
|
60f48002ea | ||
|
|
278bb61f68 | ||
|
|
a90067598c | ||
|
|
82cefc0106 | ||
|
|
8d7511a9c7 | ||
|
|
e46e7048fe | ||
|
|
45c1d75134 | ||
|
|
f005feea4d | ||
|
|
cd21d67da1 | ||
|
|
79da444a49 | ||
|
|
bcc9ac1b46 | ||
|
|
880afaabf1 | ||
|
|
c2e87bc6b4 | ||
|
|
f3d85df3e3 | ||
|
|
94c6bf10ac | ||
|
|
7bc64d66e6 | ||
|
|
0ef925c80a | ||
|
|
d2606b3166 | ||
|
|
3614a49490 | ||
|
|
55b4f3947e | ||
|
|
f61890f061 | ||
|
|
3fce9df852 | ||
|
|
32bbe8bf10 | ||
|
|
3b2cc1261b | ||
|
|
573a5a285e | ||
|
|
8134fd3e71 | ||
|
|
8be18ac673 | ||
|
|
72cd34a7b0 | ||
|
|
19ed24a621 | ||
|
|
301a75f779 | ||
|
|
77f8034d61 | ||
|
|
1a6f54b87b | ||
|
|
5ad4b37c19 | ||
|
|
06eb452104 | ||
|
|
13058aa7ea | ||
|
|
7432e19414 | ||
|
|
453dc3c01a | ||
|
|
f7b41b560e | ||
|
|
08a28fcb46 | ||
|
|
b548e0e17a | ||
|
|
b93349c946 | ||
|
|
b69dd444a8 | ||
|
|
f5e4406a7c | ||
|
|
cce4f0510b | ||
|
|
50fd3d7628 | ||
|
|
9fe3693a9d | ||
|
|
333ab5e001 | ||
|
|
14bf436f79 | ||
|
|
7a39bc4bea | ||
|
|
a3f673360e | ||
|
|
ae33f625a3 | ||
|
|
f82c99d854 | ||
|
|
ec1a86a587 | ||
|
|
27322976db | ||
|
|
0242ba2233 | ||
|
|
e43a77b4ae | ||
|
|
2fa4b6752b | ||
|
|
ca5d0a80f9 | ||
|
|
5f2cb241db | ||
|
|
f3d52cbe4c | ||
|
|
e7fe1e9fda | ||
|
|
ed5d46592d | ||
|
|
04ae421d9c | ||
|
|
91b0ff6779 | ||
|
|
00b1b611eb | ||
|
|
9bc180f0c0 | ||
|
|
37e30a90f9 | ||
|
|
f887a4dee3 | ||
|
|
08f02ba2d3 | ||
|
|
fdeeb2bc55 | ||
|
|
f7663327b0 | ||
|
|
a153eb2c6e | ||
|
|
291f11d928 | ||
|
|
c64c016d37 | ||
|
|
cfbceef5e5 |
32
.editorconfig
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
# top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
# 'insert_final_newline = false' should not remove last empty line
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
# tab_width here is only used to represent tabs if indent_size is not set
|
||||
tab_width = 4
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.php]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
[*.js]
|
||||
indent_style = space
|
||||
tab_width = 4
|
||||
|
||||
[*.{css,yml,html,svg,xml}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
insert_final_newline = false
|
||||
|
||||
[/src/includes/theme.php]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
10
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
.DS_Store
|
||||
src/db/todolist.db*
|
||||
src/db/config.php
|
||||
src/db/config-*
|
||||
src/db/backup.xml*
|
||||
src/config.php
|
||||
src/includes/vendor/
|
||||
src/content/theme/custom.css
|
||||
|
||||
tests/
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
syntax: glob
|
||||
|
||||
src/db/todolist.db
|
||||
src/tmp/sessions/sess*
|
||||
src/db/config.php
|
||||
22
README.md
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# myTinyTodo
|
||||
|
||||
Your tiny todo list
|
||||
|
||||
Original website - http://www.mytinytodo.net/
|
||||
|
||||
### System requirements
|
||||
- PHP 7.2 or greater
|
||||
- PHP extensions:
|
||||
- mbstring
|
||||
- pdo_sqlite, intl (SQLite version)
|
||||
- pdo_mysql or mysqli (MySQL version)
|
||||
- pdo_pgsql (PostgreSQL version)
|
||||
- One of databases:
|
||||
- MySQL 5.7 or greater / MariaDB 10.2 or greater
|
||||
- PostgreSQL 10 or greater
|
||||
- SQLite (system library)
|
||||
|
||||
Supported browsers: Chrome 49, Safari 10, Firefox 53.
|
||||
|
||||
Internet Explorer and Opera with Presto engine are not supported.
|
||||
|
||||
124
buildtar.php
Executable file
|
|
@ -0,0 +1,124 @@
|
|||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
// PHP 5.4 is required
|
||||
|
||||
if ( !isset($argv) || !isset($argv[1]) ) {
|
||||
die("Usage: buildtar.php <path_to_repo> [-o source.tar.gz] [-v VERSION]\n");
|
||||
}
|
||||
|
||||
$repo = $argv[1];
|
||||
$dir = sys_get_temp_dir(). DIRECTORY_SEPARATOR. "mytinytodo.build";
|
||||
$curdir = getcwd();
|
||||
$archive = $curdir. DIRECTORY_SEPARATOR. 'mytinytodo-v@VERSION-@REV.tar.gz';
|
||||
$ver = 0;
|
||||
|
||||
while ($arg = next($argv))
|
||||
{
|
||||
if ($arg == '-o') {
|
||||
$archive = next($argv);
|
||||
}
|
||||
elseif ($arg == '-v') {
|
||||
$ver = next($argv);
|
||||
}
|
||||
}
|
||||
|
||||
deleteTreeIfDir($dir);
|
||||
$out = `git clone $repo $dir 2>&1`;
|
||||
if (!is_dir($dir)) {
|
||||
die("Error while clone: $out\n");
|
||||
}
|
||||
print "> Repository was cloned to temp dir: $dir\n";
|
||||
|
||||
#get current version number if not specified
|
||||
if (!$ver) {
|
||||
require_once(__DIR__ . '/src/includes/version.php');
|
||||
$ver = mytinytodo\Version::VERSION;
|
||||
}
|
||||
chdir($dir. DIRECTORY_SEPARATOR. 'src');
|
||||
$rev = trim(`git show --format=format:%H --summary`);
|
||||
$rev = substr($rev, 0, 8);
|
||||
##$ver = str_replace('@REV', $rev, $ver);
|
||||
print "> Version is $ver\n";
|
||||
|
||||
unlink('./docker-config.php');
|
||||
unlink('./includes/lang/en-rtl.json');
|
||||
unlink('./includes/lang/_percent.php');
|
||||
unlink('./mtt-edit-settings.php');
|
||||
unlink('./mtt-emergency.php');
|
||||
unlink('./content/theme/images/svg2base64.php');
|
||||
|
||||
chdir('..'); # to the root of repo
|
||||
|
||||
assert( strpos(getcwd(), ':') === false ); # FIXME: if path contains a colon ':'
|
||||
echo("> Run Composer\n");
|
||||
$retval = 0;
|
||||
if (false === system( "./composer.sh install --no-dev --no-interaction --optimize-autoloader", $retval) || $retval != 0) {
|
||||
die("Failed to install composer libs via docker\n");
|
||||
}
|
||||
|
||||
# ext
|
||||
if (is_dir('src/ext')) {
|
||||
mkdir('src/ext2');
|
||||
chdir('src/ext');
|
||||
deleteTreeIfDir('_examples');
|
||||
$extCount = 0;
|
||||
$exts = array_diff(scandir('.') ?? [], ['.', '..']);
|
||||
foreach ($exts as $ext) {
|
||||
if (is_dir($ext)) {
|
||||
rename($ext, "../ext2/$ext");
|
||||
$extCount++;
|
||||
}
|
||||
}
|
||||
chdir('../ext2');
|
||||
if ($extCount > 0) {
|
||||
`tar --no-xattrs -czf ../ext/extensions.tar.gz *`; #OS dep.!!!
|
||||
}
|
||||
chdir('../..');
|
||||
deleteTreeIfDir('src/ext2');
|
||||
echo("> Extensions were packed\n");
|
||||
}
|
||||
|
||||
|
||||
rename('src', 'mytinytodo') or die("Cant rename 'src'\n");
|
||||
|
||||
`tar --no-xattrs -czf mytinytodo.tar.gz mytinytodo`; #OS dep.!!!
|
||||
if (!file_exists('mytinytodo.tar.gz')) {
|
||||
die("Failed to pack files (no output tar.gz file)\n");
|
||||
}
|
||||
|
||||
$archive = str_replace('@VERSION', $ver, $archive);
|
||||
$archive = str_replace('@REV', $rev, $archive);
|
||||
|
||||
chdir($curdir);
|
||||
if ( ! rename("$dir/mytinytodo.tar.gz", $archive) ) {
|
||||
die("Failed to move mytinytodo.tar.gz to $archive");
|
||||
}
|
||||
|
||||
deleteTreeIfDir($dir);
|
||||
echo("> Temp dir was cleaned\n");
|
||||
|
||||
echo("> Build is stored in $archive\n");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function deleteTreeIfDir($dir)
|
||||
{
|
||||
if ( !is_dir($dir) ) {
|
||||
return;
|
||||
}
|
||||
switch (PHP_OS) {
|
||||
case 'Darwin':
|
||||
case 'Linux':
|
||||
system("rm -rf ". escapeshellarg($dir));
|
||||
break;
|
||||
case 'Windows':
|
||||
system("rmdir /s /q ". escapeshellarg($dir));
|
||||
break;
|
||||
default:
|
||||
die("Unknown system ". PHP_OS. "\n");
|
||||
}
|
||||
}
|
||||
24
composer.json
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"name": "maxpozdeev/mytinytodo",
|
||||
"type": "project",
|
||||
"license": "GPL-2.0-or-later",
|
||||
"homepage": "https://mytinytodo.net",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Max Pozdeev",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"config": {
|
||||
"vendor-dir": "src/includes/vendor"
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2",
|
||||
"ext-mbstring": "*",
|
||||
"erusev/parsedown": "1.7.x-dev#f7285e7",
|
||||
"symfony/polyfill-intl-normalizer": "^1.31"
|
||||
},
|
||||
"require-dev": {
|
||||
"league/commonmark": "^2.6"
|
||||
}
|
||||
}
|
||||
765
composer.lock
generated
Normal file
|
|
@ -0,0 +1,765 @@
|
|||
{
|
||||
"_readme": [
|
||||
"This file locks the dependencies of your project to a known state",
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "c27d4b183be86ec7d95203f1a84b86e2",
|
||||
"packages": [
|
||||
{
|
||||
"name": "erusev/parsedown",
|
||||
"version": "1.7.x-dev",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/erusev/parsedown.git",
|
||||
"reference": "f7285e7"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/erusev/parsedown/zipball/f7285e7",
|
||||
"reference": "f7285e7",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-mbstring": "*",
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.8|^5.7|^6.5|^7.5|^8.5|^9.6"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-0": {
|
||||
"Parsedown": ""
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Emanuil Rusev",
|
||||
"email": "hello@erusev.com",
|
||||
"homepage": "http://erusev.com"
|
||||
}
|
||||
],
|
||||
"description": "Parser for Markdown.",
|
||||
"homepage": "http://parsedown.org",
|
||||
"keywords": [
|
||||
"markdown",
|
||||
"parser"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/erusev/parsedown/issues",
|
||||
"source": "https://github.com/erusev/parsedown/tree/1.7.x"
|
||||
},
|
||||
"time": "2024-07-12T14:59:16+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-intl-normalizer",
|
||||
"version": "v1.32.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-intl-normalizer.git",
|
||||
"reference": "3833d7255cc303546435cb650316bff708a1c75c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c",
|
||||
"reference": "3833d7255cc303546435cb650316bff708a1c75c",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-intl": "For best performance"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"thanks": {
|
||||
"url": "https://github.com/symfony/polyfill",
|
||||
"name": "symfony/polyfill"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Intl\\Normalizer\\": ""
|
||||
},
|
||||
"classmap": [
|
||||
"Resources/stubs"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nicolas Grekas",
|
||||
"email": "p@tchwork.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony polyfill for intl's Normalizer class and related functions",
|
||||
"homepage": "https://symfony.com",
|
||||
"keywords": [
|
||||
"compatibility",
|
||||
"intl",
|
||||
"normalizer",
|
||||
"polyfill",
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.32.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://symfony.com/sponsor",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/fabpot",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2024-09-09T11:45:10+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [
|
||||
{
|
||||
"name": "dflydev/dot-access-data",
|
||||
"version": "v3.0.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/dflydev/dflydev-dot-access-data.git",
|
||||
"reference": "a23a2bf4f31d3518f3ecb38660c95715dfead60f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/dflydev/dflydev-dot-access-data/zipball/a23a2bf4f31d3518f3ecb38660c95715dfead60f",
|
||||
"reference": "a23a2bf4f31d3518f3ecb38660c95715dfead60f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.1 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpstan/phpstan": "^0.12.42",
|
||||
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.3",
|
||||
"scrutinizer/ocular": "1.6.0",
|
||||
"squizlabs/php_codesniffer": "^3.5",
|
||||
"vimeo/psalm": "^4.0.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "3.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Dflydev\\DotAccessData\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Dragonfly Development Inc.",
|
||||
"email": "info@dflydev.com",
|
||||
"homepage": "http://dflydev.com"
|
||||
},
|
||||
{
|
||||
"name": "Beau Simensen",
|
||||
"email": "beau@dflydev.com",
|
||||
"homepage": "http://beausimensen.com"
|
||||
},
|
||||
{
|
||||
"name": "Carlos Frutos",
|
||||
"email": "carlos@kiwing.it",
|
||||
"homepage": "https://github.com/cfrutos"
|
||||
},
|
||||
{
|
||||
"name": "Colin O'Dell",
|
||||
"email": "colinodell@gmail.com",
|
||||
"homepage": "https://www.colinodell.com"
|
||||
}
|
||||
],
|
||||
"description": "Given a deep data structure, access data by dot notation.",
|
||||
"homepage": "https://github.com/dflydev/dflydev-dot-access-data",
|
||||
"keywords": [
|
||||
"access",
|
||||
"data",
|
||||
"dot",
|
||||
"notation"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/dflydev/dflydev-dot-access-data/issues",
|
||||
"source": "https://github.com/dflydev/dflydev-dot-access-data/tree/v3.0.3"
|
||||
},
|
||||
"time": "2024-07-08T12:26:09+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/commonmark",
|
||||
"version": "2.7.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/commonmark.git",
|
||||
"reference": "6fbb36d44824ed4091adbcf4c7d4a3923cdb3405"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/commonmark/zipball/6fbb36d44824ed4091adbcf4c7d4a3923cdb3405",
|
||||
"reference": "6fbb36d44824ed4091adbcf4c7d4a3923cdb3405",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-mbstring": "*",
|
||||
"league/config": "^1.1.1",
|
||||
"php": "^7.4 || ^8.0",
|
||||
"psr/event-dispatcher": "^1.0",
|
||||
"symfony/deprecation-contracts": "^2.1 || ^3.0",
|
||||
"symfony/polyfill-php80": "^1.16"
|
||||
},
|
||||
"require-dev": {
|
||||
"cebe/markdown": "^1.0",
|
||||
"commonmark/cmark": "0.31.1",
|
||||
"commonmark/commonmark.js": "0.31.1",
|
||||
"composer/package-versions-deprecated": "^1.8",
|
||||
"embed/embed": "^4.4",
|
||||
"erusev/parsedown": "^1.0",
|
||||
"ext-json": "*",
|
||||
"github/gfm": "0.29.0",
|
||||
"michelf/php-markdown": "^1.4 || ^2.0",
|
||||
"nyholm/psr7": "^1.5",
|
||||
"phpstan/phpstan": "^1.8.2",
|
||||
"phpunit/phpunit": "^9.5.21 || ^10.5.9 || ^11.0.0",
|
||||
"scrutinizer/ocular": "^1.8.1",
|
||||
"symfony/finder": "^5.3 | ^6.0 | ^7.0",
|
||||
"symfony/process": "^5.4 | ^6.0 | ^7.0",
|
||||
"symfony/yaml": "^2.3 | ^3.0 | ^4.0 | ^5.0 | ^6.0 | ^7.0",
|
||||
"unleashedtech/php-coding-standard": "^3.1.1",
|
||||
"vimeo/psalm": "^4.24.0 || ^5.0.0"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/yaml": "v2.3+ required if using the Front Matter extension"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "2.8-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"League\\CommonMark\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Colin O'Dell",
|
||||
"email": "colinodell@gmail.com",
|
||||
"homepage": "https://www.colinodell.com",
|
||||
"role": "Lead Developer"
|
||||
}
|
||||
],
|
||||
"description": "Highly-extensible PHP Markdown parser which fully supports the CommonMark spec and GitHub-Flavored Markdown (GFM)",
|
||||
"homepage": "https://commonmark.thephpleague.com",
|
||||
"keywords": [
|
||||
"commonmark",
|
||||
"flavored",
|
||||
"gfm",
|
||||
"github",
|
||||
"github-flavored",
|
||||
"markdown",
|
||||
"md",
|
||||
"parser"
|
||||
],
|
||||
"support": {
|
||||
"docs": "https://commonmark.thephpleague.com/",
|
||||
"forum": "https://github.com/thephpleague/commonmark/discussions",
|
||||
"issues": "https://github.com/thephpleague/commonmark/issues",
|
||||
"rss": "https://github.com/thephpleague/commonmark/releases.atom",
|
||||
"source": "https://github.com/thephpleague/commonmark"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://www.colinodell.com/sponsor",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://www.paypal.me/colinpodell/10.00",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/colinodell",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/league/commonmark",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-05-05T12:20:28+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/config",
|
||||
"version": "v1.2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/config.git",
|
||||
"reference": "754b3604fb2984c71f4af4a9cbe7b57f346ec1f3"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/config/zipball/754b3604fb2984c71f4af4a9cbe7b57f346ec1f3",
|
||||
"reference": "754b3604fb2984c71f4af4a9cbe7b57f346ec1f3",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"dflydev/dot-access-data": "^3.0.1",
|
||||
"nette/schema": "^1.2",
|
||||
"php": "^7.4 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpstan/phpstan": "^1.8.2",
|
||||
"phpunit/phpunit": "^9.5.5",
|
||||
"scrutinizer/ocular": "^1.8.1",
|
||||
"unleashedtech/php-coding-standard": "^3.1",
|
||||
"vimeo/psalm": "^4.7.3"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.2-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"League\\Config\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Colin O'Dell",
|
||||
"email": "colinodell@gmail.com",
|
||||
"homepage": "https://www.colinodell.com",
|
||||
"role": "Lead Developer"
|
||||
}
|
||||
],
|
||||
"description": "Define configuration arrays with strict schemas and access values with dot notation",
|
||||
"homepage": "https://config.thephpleague.com",
|
||||
"keywords": [
|
||||
"array",
|
||||
"config",
|
||||
"configuration",
|
||||
"dot",
|
||||
"dot-access",
|
||||
"nested",
|
||||
"schema"
|
||||
],
|
||||
"support": {
|
||||
"docs": "https://config.thephpleague.com/",
|
||||
"issues": "https://github.com/thephpleague/config/issues",
|
||||
"rss": "https://github.com/thephpleague/config/releases.atom",
|
||||
"source": "https://github.com/thephpleague/config"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://www.colinodell.com/sponsor",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://www.paypal.me/colinpodell/10.00",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/colinodell",
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2022-12-11T20:36:23+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nette/schema",
|
||||
"version": "v1.3.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/nette/schema.git",
|
||||
"reference": "da801d52f0354f70a638673c4a0f04e16529431d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/nette/schema/zipball/da801d52f0354f70a638673c4a0f04e16529431d",
|
||||
"reference": "da801d52f0354f70a638673c4a0f04e16529431d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"nette/utils": "^4.0",
|
||||
"php": "8.1 - 8.4"
|
||||
},
|
||||
"require-dev": {
|
||||
"nette/tester": "^2.5.2",
|
||||
"phpstan/phpstan-nette": "^1.0",
|
||||
"tracy/tracy": "^2.8"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.3-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause",
|
||||
"GPL-2.0-only",
|
||||
"GPL-3.0-only"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "David Grudl",
|
||||
"homepage": "https://davidgrudl.com"
|
||||
},
|
||||
{
|
||||
"name": "Nette Community",
|
||||
"homepage": "https://nette.org/contributors"
|
||||
}
|
||||
],
|
||||
"description": "📐 Nette Schema: validating data structures against a given Schema.",
|
||||
"homepage": "https://nette.org",
|
||||
"keywords": [
|
||||
"config",
|
||||
"nette"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/nette/schema/issues",
|
||||
"source": "https://github.com/nette/schema/tree/v1.3.2"
|
||||
},
|
||||
"time": "2024-10-06T23:10:23+00:00"
|
||||
},
|
||||
{
|
||||
"name": "nette/utils",
|
||||
"version": "v4.0.6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/nette/utils.git",
|
||||
"reference": "ce708655043c7050eb050df361c5e313cf708309"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/nette/utils/zipball/ce708655043c7050eb050df361c5e313cf708309",
|
||||
"reference": "ce708655043c7050eb050df361c5e313cf708309",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "8.0 - 8.4"
|
||||
},
|
||||
"conflict": {
|
||||
"nette/finder": "<3",
|
||||
"nette/schema": "<1.2.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"jetbrains/phpstorm-attributes": "dev-master",
|
||||
"nette/tester": "^2.5",
|
||||
"phpstan/phpstan": "^1.0",
|
||||
"tracy/tracy": "^2.9"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-gd": "to use Image",
|
||||
"ext-iconv": "to use Strings::webalize(), toAscii(), chr() and reverse()",
|
||||
"ext-intl": "to use Strings::webalize(), toAscii(), normalize() and compare()",
|
||||
"ext-json": "to use Nette\\Utils\\Json",
|
||||
"ext-mbstring": "to use Strings::lower() etc...",
|
||||
"ext-tokenizer": "to use Nette\\Utils\\Reflection::getUseStatements()"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "4.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause",
|
||||
"GPL-2.0-only",
|
||||
"GPL-3.0-only"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "David Grudl",
|
||||
"homepage": "https://davidgrudl.com"
|
||||
},
|
||||
{
|
||||
"name": "Nette Community",
|
||||
"homepage": "https://nette.org/contributors"
|
||||
}
|
||||
],
|
||||
"description": "🛠 Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.",
|
||||
"homepage": "https://nette.org",
|
||||
"keywords": [
|
||||
"array",
|
||||
"core",
|
||||
"datetime",
|
||||
"images",
|
||||
"json",
|
||||
"nette",
|
||||
"paginator",
|
||||
"password",
|
||||
"slugify",
|
||||
"string",
|
||||
"unicode",
|
||||
"utf-8",
|
||||
"utility",
|
||||
"validation"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/nette/utils/issues",
|
||||
"source": "https://github.com/nette/utils/tree/v4.0.6"
|
||||
},
|
||||
"time": "2025-03-30T21:06:30+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/event-dispatcher",
|
||||
"version": "1.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-fig/event-dispatcher.git",
|
||||
"reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0",
|
||||
"reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Psr\\EventDispatcher\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "PHP-FIG",
|
||||
"homepage": "http://www.php-fig.org/"
|
||||
}
|
||||
],
|
||||
"description": "Standard interfaces for event handling.",
|
||||
"keywords": [
|
||||
"events",
|
||||
"psr",
|
||||
"psr-14"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/php-fig/event-dispatcher/issues",
|
||||
"source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0"
|
||||
},
|
||||
"time": "2019-01-08T18:20:26+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/deprecation-contracts",
|
||||
"version": "v3.5.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/deprecation-contracts.git",
|
||||
"reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6",
|
||||
"reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=8.1"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"thanks": {
|
||||
"url": "https://github.com/symfony/contracts",
|
||||
"name": "symfony/contracts"
|
||||
},
|
||||
"branch-alias": {
|
||||
"dev-main": "3.5-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"files": [
|
||||
"function.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nicolas Grekas",
|
||||
"email": "p@tchwork.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "A generic function and convention to trigger deprecation notices",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://symfony.com/sponsor",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/fabpot",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2024-09-25T14:20:29+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-php80",
|
||||
"version": "v1.32.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-php80.git",
|
||||
"reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/0cc9dd0f17f61d8131e7df6b84bd344899fe2608",
|
||||
"reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"thanks": {
|
||||
"url": "https://github.com/symfony/polyfill",
|
||||
"name": "symfony/polyfill"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Php80\\": ""
|
||||
},
|
||||
"classmap": [
|
||||
"Resources/stubs"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Ion Bazan",
|
||||
"email": "ion.bazan@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Nicolas Grekas",
|
||||
"email": "p@tchwork.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
|
||||
"homepage": "https://symfony.com",
|
||||
"keywords": [
|
||||
"compatibility",
|
||||
"polyfill",
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-php80/tree/v1.32.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://symfony.com/sponsor",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/fabpot",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2025-01-02T08:10:11+00:00"
|
||||
}
|
||||
],
|
||||
"aliases": [],
|
||||
"minimum-stability": "stable",
|
||||
"stability-flags": {
|
||||
"erusev/parsedown": 20
|
||||
},
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": {
|
||||
"php": ">=7.2",
|
||||
"ext-mbstring": "*"
|
||||
},
|
||||
"platform-dev": {},
|
||||
"plugin-api-version": "2.6.0"
|
||||
}
|
||||
11
composer.sh
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
#dir="$( dirname -- "$( readlink -f -- "$0"; )"; )"
|
||||
dir="$PWD"
|
||||
|
||||
app=$(which podman)
|
||||
if [ -z $app ]; then
|
||||
app="docker"
|
||||
fi
|
||||
|
||||
$app run -it --rm -v "$dir:/app" composer $@
|
||||
67
langs/be.php
|
|
@ -1,67 +0,0 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
myTinyTodo Belarusian language pack
|
||||
v1.2 beta2 compatible
|
||||
*/
|
||||
|
||||
class Lang extends DefaultLang
|
||||
{
|
||||
var $js = array
|
||||
(
|
||||
'actionNote' => "нататка",
|
||||
'actionEdit' => "зьмяніць",
|
||||
'actionDelete' => "выдаліць",
|
||||
'taskDate' => array("function(date) { return 'дадана '+date; }"),
|
||||
'confirmDelete' => "Вы ўпэўнены?",
|
||||
'actionNoteSave' => "захаваць",
|
||||
'actionNoteCancel' => "скасаваць",
|
||||
'error' => "Памылка",
|
||||
'denied' => "Доступ забаронены",
|
||||
'invalidpass' => "Няверны пароль",
|
||||
'readonly' => "толькі чытаньне",
|
||||
'tagfilter' => "Бірка:",
|
||||
);
|
||||
|
||||
var $inc = array
|
||||
(
|
||||
'My Tiny Todolist' => "Мой сьпіс задач",
|
||||
'tab_newtask' => "новая задача",
|
||||
'tab_search' => "пошук",
|
||||
'btn_add' => "Дадаць",
|
||||
'btn_search' => "Шукаць",
|
||||
'searching' => "Пошук",
|
||||
'tasks' => "Задачы",
|
||||
'show_completed' => "Адлюстраваць завершаныя задачы",
|
||||
'hide_completed' => "Схаваць завершаныя задачы",
|
||||
'edit_task' => "Рэдагаваць задачу",
|
||||
'priority' => "Прыярытэт",
|
||||
'task' => "Задача",
|
||||
'note' => "Нататка",
|
||||
'save' => "Захаваць",
|
||||
'cancel' => "Скасаваць",
|
||||
'password' => "Пароль",
|
||||
'btn_login' => "Увайсьці",
|
||||
'a_login' => "Уваход",
|
||||
'a_logout' => "Выйсьці",
|
||||
'tags' => "Біркі",
|
||||
'tagfilter_cancel' => "скасаваць",
|
||||
'sortByHand' => "Сартаваць уручную",
|
||||
'sortByPriority' => "Сартаваць па прыярытэту",
|
||||
'sortByDueDate' => "Сартаваць па тэрміну",
|
||||
'due' => "Тэрмін",
|
||||
'daysago' => "%d дзён таму",
|
||||
'indays' => "праз %d дзён",
|
||||
'months_short' => array("Сту","Лют","Сак","Кра","Тра","Чэр","Ліп","Жні","Вер","Кас","Ліс","Сне"),
|
||||
'date_md' => "%2\$d %1\$s",
|
||||
'date_ymd' => "%3\$d %2\$s %1\$d",
|
||||
'today' => "сёньня",
|
||||
'yesterday' => "учора",
|
||||
'tomorrow' => "заўтра",
|
||||
'f_past' => "Пратэрмінаваныя",
|
||||
'f_today' => "Сёньня й заўтра",
|
||||
'f_soon' => "Хутка",
|
||||
);
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -1,91 +0,0 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
myTinyTodo language pack
|
||||
Language: Simple Chinese
|
||||
Author: heraldboy@gmail.com
|
||||
Url:
|
||||
AppVersion: v1.3.1
|
||||
Date: 2009-11-29
|
||||
*/
|
||||
|
||||
class Lang extends DefaultLang
|
||||
{
|
||||
var $js = array
|
||||
(
|
||||
'actionNote' => "内容",
|
||||
'actionEdit' => "编辑",
|
||||
'actionDelete' => "删除",
|
||||
'confirmDelete' => "你确定吗?",
|
||||
'actionNoteSave' => "保存",
|
||||
'actionNoteCancel' => "退出",
|
||||
'error' => "发生了错误 (点击查看详细情况)",
|
||||
'denied' => "数据被拒绝了",
|
||||
'invalidpass' => "密码错误",
|
||||
'readonly' => "只读",
|
||||
'tagfilter' => "标签:",
|
||||
'addList' => "请输入一个新的列表名称",
|
||||
'renameList' => "重命名列表",
|
||||
'deleteList' => "当前列表及其包括的所有任务将被删除。\\n你确定吗?",
|
||||
'settingsSaved' => "设置已经被保存了,正在重新引导...",
|
||||
);
|
||||
|
||||
var $inc = array
|
||||
(
|
||||
'My Tiny Todolist' => "我的迷你任务列表",
|
||||
'htab_newtask' => "新任务",
|
||||
'htab_search' => "查询",
|
||||
'btn_add' => "增加",
|
||||
'btn_search' => "查询",
|
||||
'advanced_add' => "高级新增",
|
||||
'searching' => "查找",
|
||||
'tasks' => "所有任务",
|
||||
'taskdate_inline' => "%s 新增的",
|
||||
'edit_task' => "编辑任务",
|
||||
'add_task' => "新增任务",
|
||||
'priority' => "优先级",
|
||||
'task' => "任务",
|
||||
'note' => "内容",
|
||||
'save' => "保存",
|
||||
'cancel' => "退出",
|
||||
'password' => "密码",
|
||||
'btn_login' => "登录",
|
||||
'a_login' => "登录",
|
||||
'a_logout' => "退出",
|
||||
'tags' => "标签",
|
||||
'tagfilter_cancel' => "取消标签过滤",
|
||||
'sortByHand' => "手动排序",
|
||||
'sortByPriority' => "按优先级排序",
|
||||
'sortByDueDate' => "按到期时间排序",
|
||||
'due' => "到期",
|
||||
'daysago' => "%d 天前",
|
||||
'indays' => "%d 天后",
|
||||
'months_short' => array("1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"),
|
||||
'months_long' => array("1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"),
|
||||
'days_min' => array("日","一","二","三","四","五","六"),
|
||||
'days_long' => array("星期日","星期一","星期二","星期三","星期四","星期五","星期六"),
|
||||
'today' => "今天",
|
||||
'yesterday' => "昨天",
|
||||
'tomorrow' => "明天",
|
||||
'f_past' => "过期",
|
||||
'f_today' => "今天和明天",
|
||||
'f_soon' => "最近的",
|
||||
'tasks_and_compl' => "所有任务(包括完成的)",
|
||||
'notes' => "内容:",
|
||||
'notes_show' => "显示",
|
||||
'notes_hide' => "隐藏",
|
||||
'list_new' => "新增列表",
|
||||
'list_rename' => "重命名",
|
||||
'list_delete' => "删除",
|
||||
'list_publish' => "公开列表",
|
||||
'alltags' => "所有标签:",
|
||||
'alltags_show' => "显示所有",
|
||||
'alltags_hide' => "隐藏所有",
|
||||
'a_settings' => "系统设置",
|
||||
'rss_feed' => "RSS Feed",
|
||||
'feed_title' => "%s",
|
||||
'feed_description' => "新任务 %s",
|
||||
);
|
||||
}
|
||||
|
||||
?>
|
||||
69
langs/cz.php
|
|
@ -1,69 +0,0 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
myTinyTodo language pack (Czech)
|
||||
by Michal Brůha www.prdka.cz
|
||||
v1.2.7
|
||||
*/
|
||||
|
||||
class Lang extends DefaultLang
|
||||
{
|
||||
var $js = array
|
||||
(
|
||||
'actionNote' => "poznámka",
|
||||
'actionEdit' => "upravit",
|
||||
'actionDelete' => "smazat",
|
||||
'taskDate' => array("function(date) { return 'added at '+date; }"),
|
||||
'confirmDelete' => "Jste si jist?",
|
||||
'actionNoteSave' => "uložit",
|
||||
'actionNoteCancel' => "zrušit",
|
||||
'error' => "Vyskytla se chyba (klikněte pro detaily)",
|
||||
'denied' => "Přístup zamítnut",
|
||||
'invalidpass' => "Chybné heslo",
|
||||
'readonly' => "pouze pro čtení",
|
||||
'tagfilter' => "Klíčové slovo:",
|
||||
);
|
||||
|
||||
var $inc = array
|
||||
(
|
||||
'My Tiny Todolist' => "My Tiny Todolist",
|
||||
'tab_newtask' => "nový úkol",
|
||||
'tab_search' => "hledat",
|
||||
'btn_add' => "Přidat",
|
||||
'btn_search' => "Hledat",
|
||||
'searching' => "Hledání",
|
||||
'tasks' => "Aktuální úkoly",
|
||||
'edit_task' => "Upravit Úkol",
|
||||
'priority' => "Důležitost",
|
||||
'task' => "Úkol",
|
||||
'note' => "Poznámka",
|
||||
'save' => "Uložit",
|
||||
'cancel' => "Zrušit",
|
||||
'password' => "Heslo",
|
||||
'btn_login' => "Přihlásit",
|
||||
'a_login' => "Přihlásit",
|
||||
'a_logout' => "Odhlásit",
|
||||
'tags' => "Klíčová slova",
|
||||
'tagfilter_cancel' => "zrušit filtr",
|
||||
'sortByHand' => "Seřadit manuálně",
|
||||
'sortByPriority' => "Seřadit podle důležitosti",
|
||||
'sortByDueDate' => "Seřadit podle datumu dokončení",
|
||||
'due' => "Dokončení",
|
||||
'daysago' => " před %d dny",
|
||||
'indays' => "během %d dnů",
|
||||
'months_short' => array("Led","Úno","Bře","Dub","Kvě","Črn","Črc","Srp","Zář","Říj","Lis","Pro"),
|
||||
'months_long' => array("Leden","Únor","Březen","Duben","Květen","Červen","Červenec","Srpen","Září","Říjen","Listopad","Prosinec"),
|
||||
'days_min' => array("Ne","Po","Út","St","Čt","Pá","So"),
|
||||
'date_md' => "%2\$d %1\$s",
|
||||
'date_ymd' => "%3\$d %2\$s %1\$d",
|
||||
'today' => "dnes",
|
||||
'yesterday' => "včera",
|
||||
'tomorrow' => "zítra",
|
||||
'f_past' => "Zpožděné",
|
||||
'f_today' => "Dnes a zítra",
|
||||
'f_soon' => "Brzy",
|
||||
'tasks_and_compl' => "Aktuální úkoly + dokončené",
|
||||
);
|
||||
}
|
||||
|
||||
?>
|
||||
88
langs/de.php
|
|
@ -1,88 +0,0 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
myTinyTodo language pack
|
||||
Language: German
|
||||
Author: Isabelle
|
||||
E-Mail:
|
||||
Url: http://aileesh.blogspot.com/
|
||||
Version: v1.3b3
|
||||
Date: 2009-11-04
|
||||
*/
|
||||
|
||||
class Lang extends DefaultLang
|
||||
{
|
||||
var $js = array
|
||||
(
|
||||
'actionNote' => "Notiz",
|
||||
'actionEdit' => "ändern",
|
||||
'actionDelete' => "löschen",
|
||||
'taskDate' => array("function(date) { return 'added at '+date; }"),
|
||||
'confirmDelete' => "Bist du sicher?",
|
||||
'actionNoteSave' => "speichern",
|
||||
'actionNoteCancel' => "abbrechen",
|
||||
'error' => "Fehler aufgetreten (click für Details)",
|
||||
'denied' => "Zugriff verweigert",
|
||||
'invalidpass' => "Falsches Passwort",
|
||||
'readonly' => "read-only",
|
||||
'tagfilter' => "Tag:",
|
||||
'addList' => "neue Liste anlegen",
|
||||
'renameList' => "Liste umbenennen",
|
||||
'deleteList' => "Löscht die aktuelle Liste mit allen darin enthaltenen Aufgaben.\\nBist du sicher?",
|
||||
'settingsSaved' => "Einstellugnen gespeichert. Aktualisierung...",
|
||||
);
|
||||
|
||||
var $inc = array
|
||||
(
|
||||
'My Tiny Todolist' => "My Tiny Todolist",
|
||||
'htab_newtask' => "Neue Aufgabe",
|
||||
'htab_search' => "suchen",
|
||||
'btn_add' => "hinzufügen",
|
||||
'btn_search' => "suchen",
|
||||
'advanced_add' => "erweitert",
|
||||
'searching' => "suchen nach",
|
||||
'tasks' => "Aufgaben",
|
||||
'edit_task' => "Aufgabe bearbeiten",
|
||||
'add_task' => "Neue Aufgabe",
|
||||
'priority' => "Priorität",
|
||||
'task' => "Aufgabe",
|
||||
'note' => "Notiz",
|
||||
'save' => "speichern",
|
||||
'cancel' => "abbrechen",
|
||||
'password' => "Passwort",
|
||||
'btn_login' => "Login",
|
||||
'a_login' => "Login",
|
||||
'a_logout' => "Logout",
|
||||
'tags' => "Tags",
|
||||
'tagfilter_cancel' => "Filter aufheben",
|
||||
'sortByHand' => "sortieren nach",
|
||||
'sortByPriority' => "sortieren nach Priorität",
|
||||
'sortByDueDate' => "sortieren nach Fällig-Datum",
|
||||
'due' => "Fällig",
|
||||
'daysago' => "vor %d Tagen",
|
||||
'indays' => "in %d Tagen",
|
||||
'months_short' => array("Jan","Feb","Mar","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"),
|
||||
'months_long' => array("Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"),
|
||||
'days_min' => array("So","Mo","Di","Mi","Do","Fr","Sa"),
|
||||
'today' => "heute",
|
||||
'yesterday' => "gestern",
|
||||
'tomorrow' => "morgen",
|
||||
'f_past' => "überfällig",
|
||||
'f_today' => "heute und morgen",
|
||||
'f_soon' => "bald",
|
||||
'tasks_and_compl' => "Aufgaben + erledigt",
|
||||
'notes' => "Notizen:",
|
||||
'notes_show' => "Anzeigen",
|
||||
'notes_hide' => "Verbergen",
|
||||
'list_new' => "neue Liste",
|
||||
'list_rename' => "umbenennen",
|
||||
'list_delete' => "löschen",
|
||||
'alltags' => "Alle Tags:",
|
||||
'alltags_show' => "alle anzeigen",
|
||||
'alltags_hide' => "alle verbergen",
|
||||
'a_settings' => "Einstellungen",
|
||||
'rss_feed' => "RSS Feed",
|
||||
);
|
||||
}
|
||||
|
||||
?>
|
||||
91
langs/es.php
|
|
@ -1,91 +0,0 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
myTinyTodo language pack
|
||||
Language: Español
|
||||
Translated: Spanish
|
||||
Author: Thanatermesis
|
||||
AppVersion: v1.3.1
|
||||
Date: 2009-12-24
|
||||
*/
|
||||
|
||||
class Lang extends DefaultLang
|
||||
{
|
||||
var $js = array
|
||||
(
|
||||
'actionNote' => "nota",
|
||||
'actionEdit' => "modificar",
|
||||
'actionDelete' => "borrar",
|
||||
'confirmDelete' => "Está seguro ?",
|
||||
'actionNoteSave' => "guardar",
|
||||
'actionNoteCancel' => "cancelar",
|
||||
'error' => "Se ha producido un error (clicar para detalles)",
|
||||
'denied' => "Access denied",
|
||||
'invalidpass' => "Wrong password",
|
||||
'readonly' => "read-only",
|
||||
'tagfilter' => "Tag:",
|
||||
'addList' => "Crear nueva lista",
|
||||
'renameList' => "Renombrar lista",
|
||||
'deleteList' => "Esto borrará su lista actual con todas sus tareas incluídas.\\nEstá seguro ?",
|
||||
'settingsSaved' => "Settings saved. Reloading...",
|
||||
);
|
||||
|
||||
var $inc = array
|
||||
(
|
||||
'My Tiny Todolist' => "Mi lista de tareas",
|
||||
'htab_newtask' => "Nueva tarea",
|
||||
'htab_search' => "Buscar",
|
||||
'btn_add' => "Añadir",
|
||||
'btn_search' => "Buscar",
|
||||
'advanced_add' => "Avanzado",
|
||||
'searching' => "Buscar por",
|
||||
'tasks' => "Tareas",
|
||||
'taskdate_inline' => "añadido en %s",
|
||||
'edit_task' => "Editar Tarea",
|
||||
'add_task' => "Nueva Tarea",
|
||||
'priority' => "Prioridad",
|
||||
'task' => "Tarea",
|
||||
'note' => "Nota",
|
||||
'save' => "Guardar",
|
||||
'cancel' => "Cancelar",
|
||||
'password' => "Password",
|
||||
'btn_login' => "Login",
|
||||
'a_login' => "Login",
|
||||
'a_logout' => "Logout",
|
||||
'tags' => "Tags",
|
||||
'tagfilter_cancel' => "cancelar filtro",
|
||||
'sortByHand' => "Ordenar por Mano",
|
||||
'sortByPriority' => "Ordenar por Prioridad",
|
||||
'sortByDueDate' => "Ordenar por fecha de vencimiento",
|
||||
'due' => "Vencimiento",
|
||||
'daysago' => "hace %d días",
|
||||
'indays' => "in %d days",
|
||||
'months_short' => array("Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"),
|
||||
'months_long' => array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"),
|
||||
'days_min' => array("Do","Lu","Ma","Mi","Ju","Vi","Sa"),
|
||||
'days_long' => array("Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sabado"),
|
||||
'today' => "hoy",
|
||||
'yesterday' => "ayer",
|
||||
'tomorrow' => "mañana",
|
||||
'f_past' => "Atrasados",
|
||||
'f_today' => "Hoy y Mañana",
|
||||
'f_soon' => "Pronto",
|
||||
'tasks_and_compl' => "Tareas + completados",
|
||||
'notes' => "Notea:",
|
||||
'notes_show' => "Mostrar",
|
||||
'notes_hide' => "Esconder",
|
||||
'list_new' => "Nueva Lista",
|
||||
'list_rename' => "Renombrar",
|
||||
'list_delete' => "Borrar",
|
||||
'list_publish' => "Publicar la Lista",
|
||||
'alltags' => "Todos los Tags:",
|
||||
'alltags_show' => "Mostrar todo",
|
||||
'alltags_hide' => "Esconder todo",
|
||||
'a_settings' => "Configuración",
|
||||
'rss_feed' => "RSS Feed",
|
||||
'feed_title' => "%s",
|
||||
'feed_description' => "New tasks in %s",
|
||||
);
|
||||
}
|
||||
|
||||
?>
|
||||
87
langs/fr.php
|
|
@ -1,87 +0,0 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
myTinyTodo language pack
|
||||
Language: French
|
||||
Author: v1.2 - Mickael Fradin (http://blog.kewix.fr)
|
||||
Author: v1.2.7 - Didier Corbière
|
||||
Author: v1.3b3 - Philippe ALEXANDRE
|
||||
Version: v1.3b3
|
||||
*/
|
||||
|
||||
class Lang extends DefaultLang
|
||||
{
|
||||
var $js = array
|
||||
(
|
||||
'actionNote' => "note",
|
||||
'actionEdit' => "modifier",
|
||||
'actionDelete' => "supprimer",
|
||||
'taskDate' => array("function(date) { return 'ajouté le '+date; }"),
|
||||
'confirmDelete' => "Êtes-vous sûr?",
|
||||
'actionNoteSave' => "enregistrer",
|
||||
'actionNoteCancel' => "annuler",
|
||||
'error' => "Une erreur s'est produite",
|
||||
'denied' => "Accès interdit",
|
||||
'invalidpass' => "Mot de passe incorrect",
|
||||
'readonly' => "lecture-seule",
|
||||
'tagfilter' => "Tag:",
|
||||
'addList' => "Créer une nouvelle liste",
|
||||
'renameList' => "Renommer la liste",
|
||||
'deleteList' => "Cela effacera la liste avec toutes les taches la composant.\\nEtes vous sûr?",
|
||||
'settingsSaved' => "Options sauvegardées. Chargement...",
|
||||
);
|
||||
|
||||
var $inc = array
|
||||
(
|
||||
'My Tiny Todolist' => "Liste des tâches",
|
||||
'htab_newtask' => "Nouvelle tâche",
|
||||
'htab_search' => "Rechercher",
|
||||
'btn_add' => "Ajouter",
|
||||
'btn_search' => "Rechercher",
|
||||
'advanced_add' => "Avancée",
|
||||
'searching' => "Recherche de",
|
||||
'tasks' => "Tâches",
|
||||
'edit_task' => "Modifier la tâche",
|
||||
'add_task' => "Nouvelle tâche",
|
||||
'priority' => "Priorité",
|
||||
'task' => "Tâche",
|
||||
'note' => "Note",
|
||||
'save' => "Enregistrer",
|
||||
'cancel' => "Annuler",
|
||||
'password' => "Mot de passe",
|
||||
'btn_login' => "Connexion",
|
||||
'a_login' => "Connexion",
|
||||
'a_logout' => "Déconnexion",
|
||||
'tags' => "Tags",
|
||||
'tagfilter_cancel' => "annuler le filtre",
|
||||
'sortByHand' => "Trier à la main",
|
||||
'sortByPriority' => "Trier par priorité",
|
||||
'sortByDueDate' => "Trier par date d'échéance",
|
||||
'due' => "Échéance",
|
||||
'daysago' => "il y a %d jours",
|
||||
'indays' => "dans %d jours",
|
||||
'months_short' => array("Jan","Fev","Mar","Avr","Mai","Juin","Juil","Août","Sept","Oct","Nov","Dec"),
|
||||
'months_long' => array("Janvier","Fevrier","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Decembre"),
|
||||
'days_min' => array("Di","Lu","Ma","Me","Je","Ve","Sa"),
|
||||
'today' => "aujourd'hui",
|
||||
'yesterday' => "hier",
|
||||
'tomorrow' => "demain",
|
||||
'f_past' => "En retard",
|
||||
'f_today' => "Aujourd'hui et demain",
|
||||
'f_soon' => "Bientôt",
|
||||
'tasks_and_compl' => "Tâches + Terminées",
|
||||
'notes' => "Notes:",
|
||||
'notes_show' => "Afficher",
|
||||
'notes_hide' => "Cacher",
|
||||
'list_new' => "Nouvelle liste",
|
||||
'list_rename' => "Renommer",
|
||||
'list_delete' => "Effacer",
|
||||
'alltags' => "Tous les tags:",
|
||||
'alltags_show' => "Tous les afficher",
|
||||
'alltags_hide' => "Tous les cacher",
|
||||
'a_settings' => "Options",
|
||||
'rss_feed' => "Flux RSS",
|
||||
);
|
||||
}
|
||||
|
||||
?>
|
||||
67
langs/it.php
|
|
@ -1,67 +0,0 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Italian translation for My Tiny Todolist v1.2.5
|
||||
* Author: Devis Lucato http://www.lucato.it
|
||||
*/
|
||||
|
||||
class Lang extends DefaultLang
|
||||
{
|
||||
var $js = array
|
||||
(
|
||||
'actionNote' => "nota",
|
||||
'actionEdit' => "modifica",
|
||||
'actionDelete' => "elimina",
|
||||
'taskDate' => array("function(date) { return 'aggiunto il '+date; }"),
|
||||
'confirmDelete' => "Sicuro?",
|
||||
'actionNoteSave' => "salva",
|
||||
'actionNoteCancel' => "annulla",
|
||||
'error' => "Si è verificato un errore (clicca per maggiori dettagli)",
|
||||
'denied' => "Accesso negato",
|
||||
'invalidpass' => "Password errata",
|
||||
'readonly' => "sola lettura",
|
||||
'tagfilter' => "Tag:",
|
||||
);
|
||||
|
||||
var $inc = array
|
||||
(
|
||||
'My Tiny Todolist' => "I miei compiti",
|
||||
'tab_newtask' => "nuovo compito",
|
||||
'tab_search' => "cerca",
|
||||
'btn_add' => "Aggiungi",
|
||||
'btn_search' => "Cerca",
|
||||
'searching' => "Cercando",
|
||||
'tasks' => "Compiti",
|
||||
'edit_task' => "Modifica Compito",
|
||||
'priority' => "Priorità",
|
||||
'task' => "Compito",
|
||||
'note' => "Nota",
|
||||
'save' => "Salva",
|
||||
'cancel' => "Annula",
|
||||
'password' => "Password",
|
||||
'btn_login' => "Login",
|
||||
'a_login' => "Login",
|
||||
'a_logout' => "Esci",
|
||||
'tags' => "Tags",
|
||||
'tagfilter_cancel' => "annulla filtro",
|
||||
'sortByHand' => "Ordine manuale",
|
||||
'sortByPriority' => "Ordina per priorità",
|
||||
'sortByDueDate' => "Ordina per scadenza",
|
||||
'due' => "Scadenza",
|
||||
'daysago' => "%d giorni fa",
|
||||
'indays' => "in %d giorni",
|
||||
'months_short' => array("Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"),
|
||||
'days_min' => array("Do","Lu","Ma","Me","Gi","Ve","Sa"),
|
||||
'date_md' => "%1\$s %2\$d",
|
||||
'date_ymd' => "%2\$s %3\$d, %1\$d",
|
||||
'today' => "oggi",
|
||||
'yesterday' => "ieri",
|
||||
'tomorrow' => "domani",
|
||||
'f_past' => "In ritardo",
|
||||
'f_today' => "Oggi e domani",
|
||||
'f_soon' => "Presto",
|
||||
'tasks_and_compl' => "Compiti + completati",
|
||||
);
|
||||
}
|
||||
|
||||
?>
|
||||
69
langs/mk.php
|
|
@ -1,69 +0,0 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
myTinyTodo language pack: Macedonian
|
||||
by nGen Solutions (http://www.ngen.mk)
|
||||
v1.2 compatible
|
||||
*/
|
||||
|
||||
class Lang extends DefaultLang
|
||||
{
|
||||
var $js = array
|
||||
(
|
||||
'actionNote' => "забелешка",
|
||||
'actionEdit' => "измени",
|
||||
'actionDelete' => "избриши",
|
||||
'taskDate' => array("function(date) { return 'added at '+date; }"),
|
||||
'confirmDelete' => "Дали си сигурен?",
|
||||
'actionNoteSave' => "зачувај",
|
||||
'actionNoteCancel' => "откажи",
|
||||
'error' => "Се појави грешка... (подетално)",
|
||||
'denied' => "Забранет пристап",
|
||||
'invalidpass' => "Неточна лозинка",
|
||||
'readonly' => "read-only",
|
||||
'tagfilter' => "Ознака:",
|
||||
);
|
||||
|
||||
var $inc = array
|
||||
(
|
||||
'My Tiny Todolist' => "Моја Листа на Задачи",
|
||||
'tab_newtask' => "нова задача",
|
||||
'tab_search' => "пребарај",
|
||||
'btn_add' => "Додади",
|
||||
'btn_search' => "Барај",
|
||||
'searching' => "Пребарувам",
|
||||
'tasks' => "Задачи",
|
||||
'edit_task' => "Измени задача",
|
||||
'priority' => "Приоритет",
|
||||
'task' => "Задача",
|
||||
'note' => "Забелешка",
|
||||
'save' => "Сочувај",
|
||||
'cancel' => "Откажи",
|
||||
'password' => "Лозинка",
|
||||
'btn_login' => "Најави се",
|
||||
'a_login' => "Најава",
|
||||
'a_logout' => "Одјави се",
|
||||
'tags' => "Ознаки",
|
||||
'tagfilter_cancel' => "откажи филтер",
|
||||
'sortByHand' => "Подреди рачно",
|
||||
'sortByPriority' => "Подреди по приоритет",
|
||||
'sortByDueDate' => "Подреди по рок",
|
||||
'due' => "Рок",
|
||||
'daysago' => "пред %d денови",
|
||||
'indays' => "за %d денови",
|
||||
'months_short' => array("Јан","Фев","Мар","Апр","Мај","Јун","Јул","Авг","Сеп","Окт","Нов","Дек"),
|
||||
'months_long' => array("Јануари","Февруари","Март","Април","Мај","Јуни","Јули","Август","Септември","Октомври","Ноември","Декември"),
|
||||
'days_min' => array("Не","По","Вт","Ср","Че","Пе","Са"),
|
||||
'date_md' => "%1\$s %2\$d",
|
||||
'date_ymd' => "%2\$s %3\$d, %1\$d",
|
||||
'today' => "денес",
|
||||
'yesterday' => "вчера",
|
||||
'tomorrow' => "Утре",
|
||||
'f_past' => "Задоцнети",
|
||||
'f_today' => "Денес и Утре",
|
||||
'f_soon' => "Наскоро",
|
||||
'tasks_and_compl' => "Задачи + завршени",
|
||||
);
|
||||
}
|
||||
|
||||
?>
|
||||
68
langs/nl.php
|
|
@ -1,68 +0,0 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
myTinyTodo language pack: Dutch
|
||||
by André Groendijk
|
||||
v1.2 compatible
|
||||
*/
|
||||
|
||||
class Lang extends DefaultLang
|
||||
{
|
||||
var $js = array
|
||||
(
|
||||
'actionNote' => "notitie",
|
||||
'actionEdit' => "wijzigen",
|
||||
'actionDelete' => "verwijderen",
|
||||
'taskDate' => array("function(date) { return 'toegevoegd op '+date; }"),
|
||||
'confirmDelete' => "Zeker weten?",
|
||||
'actionNoteSave' => "opslaan",
|
||||
'actionNoteCancel' => "annuleren",
|
||||
'error' => "Foutmelding... (klik voor details)",
|
||||
'denied' => "Verboden toegang",
|
||||
'invalidpass' => "Verkeerd wachtwoord",
|
||||
'readonly' => "alleen-lezen",
|
||||
'tagfilter' => "Tag:",
|
||||
);
|
||||
|
||||
var $inc = array
|
||||
(
|
||||
'My Tiny Todolist' => "My Tiny Todolist",
|
||||
'tab_newtask' => "nieuwe taak",
|
||||
'tab_search' => "zoeken",
|
||||
'btn_add' => "Toevoegen",
|
||||
'btn_search' => "Zoeken",
|
||||
'searching' => "Zoekt naar",
|
||||
'tasks' => "Taak",
|
||||
'edit_task' => "Wijzig taak",
|
||||
'priority' => "Prioriteit",
|
||||
'task' => "Taak",
|
||||
'note' => "Notitie",
|
||||
'save' => "Opslaan",
|
||||
'cancel' => "Annuleren",
|
||||
'password' => "Wachtwoord",
|
||||
'btn_login' => "Login",
|
||||
'a_login' => "Login",
|
||||
'a_logout' => "Logout",
|
||||
'tags' => "Tags",
|
||||
'tagfilter_cancel' => "annuleer filter",
|
||||
'sortByHand' => "Handmatig sorteren",
|
||||
'sortByPriority' => "Sorteren op prioriteit",
|
||||
'sortByDueDate' => "Sorteren op datum",
|
||||
'due' => "Tot",
|
||||
'daysago' => "%d dagen geleden",
|
||||
'indays' => "in %d dagen",
|
||||
'months_short' => array("Jan","Feb","Mar","Apr","Mei","Jun","Jul","Aug","Sep","Okt","Nov","Dec"),
|
||||
'days_min' => array("Su","Mo","Tu","We","Th","Fr","Sa"),
|
||||
'date_md' => "%1\$s %2\$d",
|
||||
'date_ymd' => "%2\$s %3\$d, %1\$d",
|
||||
'today' => "vandaag",
|
||||
'yesterday' => "gister",
|
||||
'tomorrow' => "morgen",
|
||||
'f_past' => "Overdue",
|
||||
'f_today' => "Vandaag en morgen",
|
||||
'f_soon' => "Binnenkort",
|
||||
'tasks_and_compl' => "Taken + voltooid",
|
||||
);
|
||||
}
|
||||
|
||||
?>
|
||||
69
langs/pl.php
|
|
@ -1,69 +0,0 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
myTinyTodo language pack (Polish)
|
||||
by Pawel Frankowski, blog.elimu.pl
|
||||
v1.2.7
|
||||
*/
|
||||
|
||||
class Lang extends DefaultLang
|
||||
{
|
||||
var $js = array
|
||||
(
|
||||
'actionNote' => "dodaj opis",
|
||||
'actionEdit' => "zmień",
|
||||
'actionDelete' => "usuń",
|
||||
'taskDate' => array("function(date) { return 'added at '+date; }"),
|
||||
'confirmDelete' => "Jesteś pewien?",
|
||||
'actionNoteSave' => "zapisz",
|
||||
'actionNoteCancel' => "anuluj",
|
||||
'error' => "Some error occurred (kliknij aby zobaczyć szczegóły)",
|
||||
'denied' => "Dostęp zabroniony",
|
||||
'invalidpass' => "Złe hasło",
|
||||
'readonly' => "tylko do odczytu",
|
||||
'tagfilter' => "Tag:",
|
||||
);
|
||||
|
||||
var $inc = array
|
||||
(
|
||||
'My Tiny Todolist' => "Moja mała lista Todo (do zrobienia)",
|
||||
'tab_newtask' => "nowe zadanie",
|
||||
'tab_search' => "szukaj",
|
||||
'btn_add' => "Dodaj",
|
||||
'btn_search' => "Szukaj",
|
||||
'searching' => "Szukając",
|
||||
'tasks' => "Zadania",
|
||||
'edit_task' => "Edytuj Zadanie",
|
||||
'priority' => "Piorytet",
|
||||
'task' => "Zadanie",
|
||||
'note' => "Szczegółowy opis",
|
||||
'save' => "Zapisz",
|
||||
'cancel' => "Anuluj",
|
||||
'password' => "Hasło",
|
||||
'btn_login' => "Login",
|
||||
'a_login' => "Login",
|
||||
'a_logout' => "Wyloguj",
|
||||
'tags' => "Tagi",
|
||||
'tagfilter_cancel' => "Anuluj filtr",
|
||||
'sortByHand' => "Sortuj ręcznie",
|
||||
'sortByPriority' => "Sortuj piorytetem",
|
||||
'sortByDueDate' => "Sortuj Terminem",
|
||||
'due' => "Termin",
|
||||
'daysago' => "%d dni temu",
|
||||
'indays' => "w ciągu %d dni",
|
||||
'months_short' => array("Sty","Lut","Mar","Kwi","Maj","Cze","Lip","Sie","Wrz","Paź","Lis","Gru"),
|
||||
'months_long' => array("Styczeń","Luty","Marzec","Kwiecień","Maj","Czerwiec","Lipiec","Sierpień","Wrzesień","Październik","Listopad","Grudzień"),
|
||||
'days_min' => array("Ni","Pon","Wt","Śr","Cz","Pi","So"),
|
||||
'date_md' => "%2\$d %1\$s",
|
||||
'date_ymd' => "%3\$d %2\$s %1\$d",
|
||||
'today' => "dziś",
|
||||
'yesterday' => "wczoraj",
|
||||
'tomorrow' => "do jutra",
|
||||
'f_past' => "Opóźnione",
|
||||
'f_today' => "Dziś i jutro",
|
||||
'f_soon' => "Wkrótce",
|
||||
'tasks_and_compl' => "Zadania + zakończone",
|
||||
);
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -1,90 +0,0 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
myTinyTodo language pack
|
||||
Language: Brazilian Portuguese
|
||||
Author: Raphael Guimarães
|
||||
E-Mail:
|
||||
Url:
|
||||
AppVersion: v1.3.0
|
||||
Date: 2009-11-09
|
||||
*/
|
||||
|
||||
class Lang extends DefaultLang
|
||||
{
|
||||
var $js = array
|
||||
(
|
||||
'actionNote' => "nota",
|
||||
'actionEdit' => "modificar",
|
||||
'actionDelete' => "deletar",
|
||||
'taskDate' => array("function(date) { return 'added at '+date; }"),
|
||||
'confirmDelete' => "você tem certeza?",
|
||||
'actionNoteSave' => "salvar",
|
||||
'actionNoteCancel' => "cancelar",
|
||||
'error' => "Ocorreu algum erro (clique para detalhes)",
|
||||
'denied' => "Acesso negado",
|
||||
'invalidpass' => "Password errado",
|
||||
'readonly' => "Somente leitura",
|
||||
'tagfilter' => "Título:",
|
||||
'addList' => "Criar nova list",
|
||||
'renameList' => "Renomear lista",
|
||||
'deleteList' => "Isso deletará essa lista com todas as tarefas nela.\\nVocê tem certeza?",
|
||||
'settingsSaved' => "Preferencias salvas. Recarregando...",
|
||||
);
|
||||
|
||||
var $inc = array
|
||||
(
|
||||
'My Tiny Todolist' => "Minha lista de tarefas",
|
||||
'htab_newtask' => "Nova tarefa",
|
||||
'htab_search' => "Procurar",
|
||||
'btn_add' => "Adicionar",
|
||||
'btn_search' => "Procurar",
|
||||
'advanced_add' => "Avaçado",
|
||||
'searching' => "Procurar por",
|
||||
'tasks' => "Tarefas",
|
||||
'edit_task' => "Editar Tarefa",
|
||||
'add_task' => "Nova Tarefa",
|
||||
'priority' => "Prioridade",
|
||||
'task' => "Tarefa",
|
||||
'note' => "Nota",
|
||||
'save' => "Salvar",
|
||||
'cancel' => "Cancelar",
|
||||
'password' => "Senha",
|
||||
'btn_login' => "Login",
|
||||
'a_login' => "Login",
|
||||
'a_logout' => "Sair",
|
||||
'tags' => "Títulos",
|
||||
'tagfilter_cancel' => "cancelar filtro",
|
||||
'sortByHand' => "Ordenar manualmente",
|
||||
'sortByPriority' => "Ordenar por prioridade",
|
||||
'sortByDueDate' => "Ordenar por data de vencimento",
|
||||
'due' => "Prazo",
|
||||
'daysago' => "%d dias atrás",
|
||||
'indays' => "em %d dias",
|
||||
'months_short' => array("Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez"),
|
||||
'months_long' => array("Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"),
|
||||
'days_min' => array("Dom","Seg","Ter","Qua","Qui","Sex","Sab"),
|
||||
'today' => "hoje",
|
||||
'yesterday' => "ontem",
|
||||
'tomorrow' => "amanhã",
|
||||
'f_past' => "Vencido",
|
||||
'f_today' => "Hoje e amanhã",
|
||||
'f_soon' => "Breve",
|
||||
'tasks_and_compl' => "Tarefas + completas",
|
||||
'notes' => "Notas:",
|
||||
'notes_show' => "Mostrar",
|
||||
'notes_hide' => "Esconder",
|
||||
'list_new' => "Nova lista",
|
||||
'list_rename' => "Renomear",
|
||||
'list_delete' => "Deletar",
|
||||
'alltags' => "Todos os títulos:",
|
||||
'alltags_show' => "Mostrar todos",
|
||||
'alltags_hide' => "Esconder todos",
|
||||
'a_settings' => "Preferências",
|
||||
'rss_feed' => "RSS Feed",
|
||||
'feed_title' => "%s",
|
||||
'feed_description' => "Nova tarefa em %s",
|
||||
);
|
||||
}
|
||||
|
||||
?>
|
||||
125
langs/ru.php
|
|
@ -1,125 +0,0 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
myTinyTodo language pack
|
||||
Language: Русский
|
||||
Translated: Russian
|
||||
Author: Max Pozdeev
|
||||
Author Url: http://www.mytinytodo.net
|
||||
AppVersion: v1.3.2
|
||||
Date: 2009-12-26
|
||||
*/
|
||||
|
||||
class Lang extends DefaultLang
|
||||
{
|
||||
var $js = array
|
||||
(
|
||||
'confirmDelete' => "Вы действительно хотите удалить задачу?",
|
||||
'actionNoteSave' => "сохранить",
|
||||
'actionNoteCancel' => "отмена",
|
||||
'error' => "Ошибка",
|
||||
'denied' => "Доступ запрещен",
|
||||
'invalidpass' => "Неверный пароль",
|
||||
'tagfilter' => "Тег:",
|
||||
'addList' => "Новый список",
|
||||
'renameList' => "Переименовать список",
|
||||
'deleteList' => "Вы действительно хотите удалить этот список со всеми задачами?",
|
||||
'settingsSaved' => "Настройки сохранены. Перезагрузка...",
|
||||
);
|
||||
|
||||
var $inc = array
|
||||
(
|
||||
'My Tiny Todolist' => "Мои задачи",
|
||||
'htab_newtask' => "Новая задача",
|
||||
'htab_search' => "Поиск",
|
||||
'btn_add' => "Добавить",
|
||||
'btn_search' => "Искать",
|
||||
'advanced_add' => "Расширенная форма",
|
||||
'searching' => "Поиск",
|
||||
'tasks' => "Задачи",
|
||||
'taskdate_inline' => "добавленa %s",
|
||||
'taskdate_created' => "Дата создания",
|
||||
'taskdate_completed' => "Дата завершения",
|
||||
'edit_task' => "Редактирование задачи",
|
||||
'add_task' => "Новая задача",
|
||||
'priority' => "Приоритет",
|
||||
'task' => "Задача",
|
||||
'note' => "Заметка",
|
||||
'save' => "Сохранить",
|
||||
'cancel' => "Отмена",
|
||||
'password' => "Пароль",
|
||||
'btn_login' => "Войти",
|
||||
'a_login' => "Вход",
|
||||
'a_logout' => "Выйти",
|
||||
'public_tasks' => "Опубликованные задачи",
|
||||
'tags' => "Теги",
|
||||
'tagfilter_cancel' => "отменить фильтр по тегу",
|
||||
'sortByHand' => "Сортировка вручную",
|
||||
'sortByPriority' => "Сортировка по приоритету",
|
||||
'sortByDueDate' => "Сортировка по сроку",
|
||||
'due' => "Срок",
|
||||
'daysago' => "%d дн. назад",
|
||||
'indays' => "через %d дн.",
|
||||
'months_short' => array("Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"),
|
||||
'months_long' => array("Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"),
|
||||
'days_min' => array("Вс","Пн","Вт","Ср","Чт","Пт","Сб"),
|
||||
'days_long' => array("Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота"),
|
||||
'today' => "сегодня",
|
||||
'yesterday' => "вчера",
|
||||
'tomorrow' => "завтра",
|
||||
'f_past' => "Просроченные",
|
||||
'f_today' => "Сегодня и завтра",
|
||||
'f_soon' => "Скоро",
|
||||
'tasks_and_compl' => "Задачи + завершенные",
|
||||
'action_edit' => "Редактировать",
|
||||
'action_note' => "Заметка",
|
||||
'action_delete' => "Удалить",
|
||||
'action_priority' => "Приоритет",
|
||||
'action_move' => "Переместить в",
|
||||
'notes' => "Заметки:",
|
||||
'notes_show' => "Показать",
|
||||
'notes_hide' => "Скрыть",
|
||||
'list_new' => "Новый список",
|
||||
'list_rename' => "Переименовать",
|
||||
'list_delete' => "Удалить",
|
||||
'list_publish' => "Опубликовать",
|
||||
'alltags' => "Все теги:",
|
||||
'alltags_show' => "Показать все",
|
||||
'alltags_hide' => "Скрыть все",
|
||||
'a_settings' => "Настройки",
|
||||
'rss_feed' => "RSS-лента",
|
||||
'feed_title' => "%s",
|
||||
'feed_description' => "%s - новые задачи",
|
||||
|
||||
/* Settings */
|
||||
'set_header' => "Настройки",
|
||||
'set_title' => "Заголовок страницы",
|
||||
'set_title_descr' => "(если поле не заполнено, будет использован заголовок по-умолчанию)",
|
||||
'set_language' => "Язык (Language)",
|
||||
'set_protection' => "Парольная защита",
|
||||
'set_enabled' => "Включено",
|
||||
'set_disabled' => "Выключено",
|
||||
'set_newpass' => "Новый пароль",
|
||||
'set_newpass_descr' => "(не заполняйте поле если не хотите менять текущий пароль)",
|
||||
'set_smartsyntax' => "Smart syntax",
|
||||
'set_smartsyntax_descr' => "(возможность использовать синтаксис: /приоритет/ задача /теги/)",
|
||||
'set_autotz' => "Автоопределение часового пояса",
|
||||
'set_autotz_descr' => "(определение часового пояса пользователя с помощью javascript)",
|
||||
'set_autotag' => "Autotagging",
|
||||
'set_autotag_descr' => "(автодобавление текущего тега из фильтра в новую задачу)",
|
||||
'set_sessions' => "Хранилище сессий",
|
||||
'set_sessions_php' => "PHP",
|
||||
'set_sessions_files' => "Файлы",
|
||||
'set_firstdayofweek' => "Первый день недели",
|
||||
'set_duedate' => "Формат даты для календаря",
|
||||
'set_date' => "Формат даты",
|
||||
'set_shortdate' => "Формат короткой даты",
|
||||
'set_clock' => "Формат часов",
|
||||
'set_12hour' => "12-часовой",
|
||||
'set_24hour' => "24-часовой",
|
||||
'set_submit' => "Сохранить изменения",
|
||||
'set_cancel' => "Отмена",
|
||||
);
|
||||
}
|
||||
|
||||
?>
|
||||
88
langs/sr.php
|
|
@ -1,88 +0,0 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
myTinyTodo language pack
|
||||
Language: Serbian
|
||||
Author: Goran Trajkovic
|
||||
AppVersion: v1.3.0
|
||||
Date: 2009-11-17
|
||||
*/
|
||||
|
||||
class Lang extends DefaultLang
|
||||
{
|
||||
var $js = array
|
||||
(
|
||||
'actionNote' => "промени текст задатка",
|
||||
'actionEdit' => "промени цео задатак",
|
||||
'actionDelete' => "обриши задатак",
|
||||
'taskDate' => array("function(date) { return 'уписан '+date; }"),
|
||||
'confirmDelete' => "Да ли сте сигурни?",
|
||||
'actionNoteSave' => "сними",
|
||||
'actionNoteCancel' => "одустани",
|
||||
'error' => "Грешке у раду програма (кликните да бисте видели детаље)",
|
||||
'denied' => "Немогућ приступ апликацији",
|
||||
'invalidpass' => "Неисправна лозинка?",
|
||||
'readonly' => "само-за-читање",
|
||||
'tagfilter' => "Категорија: ",
|
||||
'addList' => "Направи нову листу",
|
||||
'renameList' => "Преименуј листу",
|
||||
'deleteList' => "Ова акција ће обрисати текућу листу са свим припадајућим пословима.\\nДа ли сте сигурни?",
|
||||
'settingsSaved' => "Промене у подешавањима су сачуване. Поновно учитавање у току...",
|
||||
);
|
||||
|
||||
var $inc = array
|
||||
(
|
||||
'My Tiny Todolist' => "РОКОВНИК",
|
||||
'htab_newtask' => "Нови задатак",
|
||||
'htab_search' => "Претрага",
|
||||
'btn_add' => "Упиши",
|
||||
'btn_search' => "Тражи",
|
||||
'advanced_add' => "Напредно додавање (*)",
|
||||
'searching' => "Претраживање у току...",
|
||||
'tasks' => "Текући",
|
||||
'edit_task' => "Измена задатка",
|
||||
'add_task' => "Нови задатак",
|
||||
'priority' => "Приоритет",
|
||||
'task' => "Наслов",
|
||||
'note' => "Опис",
|
||||
'save' => "Сними",
|
||||
'cancel' => "Одустани",
|
||||
'password' => "Лозинка",
|
||||
'btn_login' => "Пријави се",
|
||||
'a_login' => "Пријављивање",
|
||||
'a_logout' => "Одјави се",
|
||||
'tags' => "Категорија",
|
||||
'tagfilter_cancel' => "искључивање филтра",
|
||||
'sortByHand' => "Ручно уређивање задатака",
|
||||
'sortByPriority' => "Уређивање по приоритету",
|
||||
'sortByDueDate' => "Уређивање по датуму обављања",
|
||||
'due' => "Датум обављања",
|
||||
'daysago' => "пре %d дана",
|
||||
'indays' => "за %d дана",
|
||||
'months_short' => array("Jан","Феб","Maр","Aпр","Maј","Jун","Jул","Aвг","Сеп","Oкт","Нов","Дец"),
|
||||
'months_long' => array("Јануар","Фебруар","Март","Април","Maј","Jун","Jул","Aвгуст","Септембар","Oктобар","Новембар","Децембар"),
|
||||
'days_min' => array("Не","По","Ут","Ср","Че","Пе","Су"),
|
||||
'today' => "данас",
|
||||
'yesterday' => "јуче",
|
||||
'tomorrow' => "сутра",
|
||||
'f_past' => "Пробивени",
|
||||
'f_today' => "Данас и сутра",
|
||||
'f_soon' => "Ускоро",
|
||||
'tasks_and_compl' => "Сви",
|
||||
'notes' => "Напомене:",
|
||||
'notes_show' => "прикажи",
|
||||
'notes_hide' => "сакриј",
|
||||
'list_new' => "Нова листа",
|
||||
'list_rename' => "Преименуј",
|
||||
'list_delete' => "Обриши",
|
||||
'alltags' => "Све категорије (тагови):",
|
||||
'alltags_show' => "Прикажи све",
|
||||
'alltags_hide' => "Сакриј све",
|
||||
'a_settings' => "Подешавања",
|
||||
'rss_feed' => "RSS Feed",
|
||||
'feed_title' => "%s",
|
||||
'feed_description' => "Нови задаци у групи %s",
|
||||
);
|
||||
}
|
||||
|
||||
?>
|
||||
70
langs/sv.php
|
|
@ -1,70 +0,0 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
myTinyTodo language pack: Swedish
|
||||
by Anders Ytterström
|
||||
v1.2 compatible
|
||||
*/
|
||||
|
||||
|
||||
class Lang extends DefaultLang
|
||||
{
|
||||
var $js = array
|
||||
(
|
||||
'actionNote' => "anteckning",
|
||||
'actionEdit' => "ändra",
|
||||
'actionDelete' => "ta bort",
|
||||
'taskDate' => array("function(date) { return 'inlagd '+date; }"),
|
||||
'confirmDelete' => "Är du säker?",
|
||||
'actionNoteSave' => "spara",
|
||||
'actionNoteCancel' => "ångra",
|
||||
'error' => "Ett fel inträffade (klicka för detaljer)",
|
||||
'denied' => "Åtkomst nekad",
|
||||
'invalidpass' => "Fel lösenord",
|
||||
'readonly' => "skrivskyddad",
|
||||
'tagfilter' => "Etikett:",
|
||||
);
|
||||
|
||||
var $inc = array
|
||||
(
|
||||
'My Tiny Todolist' => "Min enkla Att-Göra",
|
||||
'tab_newtask' => "Ny uppgift",
|
||||
'tab_search' => "Sök",
|
||||
'btn_add' => "Lägg till",
|
||||
'btn_search' => "Sök",
|
||||
'searching' => "Söker efter",
|
||||
'tasks' => "Uppgifter",
|
||||
'edit_task' => "redigera Uppgift",
|
||||
'priority' => "Prio",
|
||||
'task' => "Uppgift",
|
||||
'note' => "anteckning",
|
||||
'save' => "Spara",
|
||||
'cancel' => "Ångra",
|
||||
'password' => "Lösenord",
|
||||
'btn_login' => "Logga in",
|
||||
'a_login' => "Logga in",
|
||||
'a_logout' => "Logga ut",
|
||||
'tags' => "Etiketter",
|
||||
'tagfilter_cancel' => "ångra filter",
|
||||
'sortByHand' => "Sortera för hand",
|
||||
'sortByPriority' => "Sortera efter prio",
|
||||
'sortByDueDate' => "Sortera efter förfallodag",
|
||||
'due' => "tills",
|
||||
'daysago' => "för %d dagar sedan",
|
||||
'indays' => "om %d dagar",
|
||||
'months_short' => array("jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec"),
|
||||
'months_long' => array("januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december"),
|
||||
'days_min' => array("Sö","Må","Ti","On","To","Fr","Lö"),
|
||||
'date_md' => "%1\$s %2\$d",
|
||||
'date_ymd' => "%2\$s %3\$d, %1\$d",
|
||||
'today' => "idag",
|
||||
'yesterday' => "igår",
|
||||
'tomorrow' => "imorgon",
|
||||
'f_past' => "Försenad",
|
||||
'f_today' => "Idag och imorgon",
|
||||
'f_soon' => "Snart",
|
||||
'tasks_and_compl' => "Uppgifter + slutförda",
|
||||
);
|
||||
}
|
||||
|
||||
?>
|
||||
91
langs/tr.php
|
|
@ -1,91 +0,0 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
myTinyTodo language pack
|
||||
Language: Turkish
|
||||
Author: FeyyazEsat
|
||||
Url: http://www.esttechnology.com
|
||||
AppVersion: v1.3.1
|
||||
Date: 2009-11-29
|
||||
*/
|
||||
|
||||
class Lang extends DefaultLang
|
||||
{
|
||||
var $js = array
|
||||
(
|
||||
'actionNote' => "not",
|
||||
'actionEdit' => "modifiye et",
|
||||
'actionDelete' => "sil",
|
||||
'confirmDelete' => "Eminmisiniz?",
|
||||
'actionNoteSave' => "kaydet",
|
||||
'actionNoteCancel' => "iptal",
|
||||
'error' => "Bazı hatalar oluştu (detaylar için tıklayın)",
|
||||
'denied' => "İzin verilmedi",
|
||||
'invalidpass' => "Yanlış Şifre",
|
||||
'readonly' => "sadece okunabilir",
|
||||
'tagfilter' => "Etiket:",
|
||||
'addList' => "Yeni Liste Oluştur",
|
||||
'renameList' => "Listeyi Çıkar",
|
||||
'deleteList' => "Mevcut liste ve içindeki tüm görevler silinecek.\\nEminmisiniz?",
|
||||
'settingsSaved' => "Ayarlar kaydedildi. Tekrar Yükleniyor...",
|
||||
);
|
||||
|
||||
var $inc = array
|
||||
(
|
||||
'My Tiny Todolist' => "My Tiny Todolist",
|
||||
'htab_newtask' => "Yeni görev",
|
||||
'htab_search' => "Ara",
|
||||
'btn_add' => "Ekle",
|
||||
'btn_search' => "Ara",
|
||||
'advanced_add' => "İleri düzey",
|
||||
'searching' => "Aranıyor ->",
|
||||
'tasks' => "Görevler",
|
||||
'taskdate_inline' => "%s a Eklendi",
|
||||
'edit_task' => "Görev düzenle",
|
||||
'add_task' => "Yeni görev",
|
||||
'priority' => "Öncelik",
|
||||
'task' => "Görev",
|
||||
'note' => "Not",
|
||||
'save' => "Kaydet",
|
||||
'cancel' => "İptal",
|
||||
'password' => "Şifre",
|
||||
'btn_login' => "Giriş",
|
||||
'a_login' => "Giriş",
|
||||
'a_logout' => "Çıkış",
|
||||
'tags' => "Etiketler",
|
||||
'tagfilter_cancel' => "Filtre iptal",
|
||||
'sortByHand' => "Elle sırala",
|
||||
'sortByPriority' => "Önceliğe göre sırala",
|
||||
'sortByDueDate' => "Vade tarihine göre düzenle",
|
||||
'due' => "Vade",
|
||||
'daysago' => "%d Gün önce",
|
||||
'indays' => "%d Gün içinde",
|
||||
'months_short' => array("Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara"),
|
||||
'months_long' => array("Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"),
|
||||
'days_min' => array("Pa","Pz","Sa","Ça","Pe","Cu","Ct"),
|
||||
'days_long' => array("Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"),
|
||||
'today' => "bugün",
|
||||
'yesterday' => "dün",
|
||||
'tomorrow' => "yarın",
|
||||
'f_past' => "Vade bitimi",
|
||||
'f_today' => "Bugün ve Yarın",
|
||||
'f_soon' => "Yakında",
|
||||
'tasks_and_compl' => "Görevler + Tamamlanan",
|
||||
'notes' => "Notlar:",
|
||||
'notes_show' => "Göster",
|
||||
'notes_hide' => "Gizle",
|
||||
'list_new' => "Yeni Liste",
|
||||
'list_rename' => "Yeniden adlandır",
|
||||
'list_delete' => "Sil",
|
||||
'list_publish' => "Listeyi yayımla",
|
||||
'alltags' => "Tüm Etiketler:",
|
||||
'alltags_show' => "Tümünü göster",
|
||||
'alltags_hide' => "Tümünü gizle",
|
||||
'a_settings' => "Ayarlar",
|
||||
'rss_feed' => "RSS Beslemesi",
|
||||
'feed_title' => "%s",
|
||||
'feed_description' => "Yeni görevler %s nin içinde",
|
||||
);
|
||||
}
|
||||
|
||||
?>
|
||||
68
langs/uk.php
|
|
@ -1,68 +0,0 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
myTinyTodo Ukrainian language pack
|
||||
v1.2 compatible
|
||||
Author: budulay (http://budulay.org.ua)
|
||||
*/
|
||||
|
||||
class Lang extends DefaultLang
|
||||
{
|
||||
var $js = array
|
||||
(
|
||||
'actionNote' => "замітка",
|
||||
'actionEdit' => "редагувати",
|
||||
'actionDelete' => "видалити",
|
||||
'taskDate' => array("function(date) { return 'додана '+date; }"),
|
||||
'confirmDelete' => "Ви впевнені?",
|
||||
'actionNoteSave' => "зберегти",
|
||||
'actionNoteCancel' => "скасувати",
|
||||
'error' => "Помилка",
|
||||
'denied' => "Доступ заборонено",
|
||||
'invalidpass' => "Невірний пароль",
|
||||
'readonly' => "тільки для перегляду",
|
||||
'tagfilter' => "Мітка:",
|
||||
);
|
||||
|
||||
var $inc = array
|
||||
(
|
||||
'My Tiny Todolist' => "Мій список завдань",
|
||||
'tab_newtask' => "нове завдання",
|
||||
'tab_search' => "пошук",
|
||||
'btn_add' => "Додати",
|
||||
'btn_search' => "Шукати",
|
||||
'searching' => "Пошук",
|
||||
'tasks' => "Завдання",
|
||||
'edit_task' => "Редагувати завдання",
|
||||
'priority' => "Пріорітет",
|
||||
'task' => "Завдання",
|
||||
'note' => "Замітка",
|
||||
'save' => "Зберегти",
|
||||
'cancel' => "Скасувати",
|
||||
'password' => "Пароль",
|
||||
'btn_login' => "Увійти",
|
||||
'a_login' => "Вхід",
|
||||
'a_logout' => "Вихід",
|
||||
'tags' => "Мітки",
|
||||
'tagfilter_cancel' => "скасувати фільтр по мітці",
|
||||
'sortByHand' => "Сортувати вручну",
|
||||
'sortByPriority' => "Сортувати за пріорітетом",
|
||||
'sortByDueDate' => "Сортувати за терміном",
|
||||
'due' => "Термін",
|
||||
'daysago' => "%d днів тому",
|
||||
'indays' => "через %d днів",
|
||||
'months_short' => array("Січ","Лют","Бер","Кві","Тра","Чер","Лип","Сер","Вер","Жов","Лис","Гру"),
|
||||
'days_min' => array("Нд","Пн","Вт","Ср","Чт","Пт","Сб"),
|
||||
'date_md' => "%2\$d %1\$s",
|
||||
'date_ymd' => "%3\$d %2\$s %1\$d",
|
||||
'today' => "сьогодні",
|
||||
'yesterday' => "вчора",
|
||||
'tomorrow' => "завтра",
|
||||
'f_past' => "Прострочені",
|
||||
'f_today' => "Сьогодні і завтра",
|
||||
'f_soon' => "Незабаром",
|
||||
'tasks_and_compl' => "Завдання + завершені",
|
||||
);
|
||||
}
|
||||
|
||||
?>
|
||||
29
src/.htaccess
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
# For REST API in Apache
|
||||
#<IfModule mod_rewrite.c>
|
||||
# RewriteEngine On
|
||||
# RewriteCond %{REQUEST_FILENAME} !-f
|
||||
# RewriteCond %{REQUEST_FILENAME} !-d
|
||||
# RewriteRule ^api/(.*)$ api.php/$1 [L,QSA]
|
||||
#</IfModule>
|
||||
#<Limit GET POST PUT DELETE>
|
||||
# Allow from all
|
||||
#</Limit>
|
||||
|
||||
|
||||
# In Nginx set something like this:
|
||||
|
||||
# Deny access to some files and folders
|
||||
#location ~ ^/(db|includes)/ {
|
||||
# deny all;
|
||||
#}
|
||||
#location ~ /\.ht {
|
||||
# deny all;
|
||||
#}
|
||||
#location ~* ^/ext/.*\.(json|md)$ {
|
||||
# deny all;
|
||||
#}
|
||||
|
||||
# Optional
|
||||
# location /api/ {
|
||||
# rewrite ^/api/(.*) /api.php/$1 last;
|
||||
# }
|
||||
|
|
@ -1,48 +1,59 @@
|
|||
|
||||
myTinyTodo is free software: you can redistribute it and/or modify
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
the Free Software Foundation; either version 2 of the License, or (at
|
||||
your option) any later version.
|
||||
|
||||
myTinyTodo is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This program is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
See file LICENSE or <http://www.gnu.org/licenses/gpl-3.0.txt>.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program as the file LICENSE; if not, please see
|
||||
https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
|
||||
|
||||
|
||||
myTinyTodo
|
||||
--------------
|
||||
Url: http://www.pozdeev.com/mytinytodo/
|
||||
Copyright: 2009 Max Pozdeev <maxpozdeev@gmail.com>
|
||||
License: GPL version 3 (see LICENSE file)
|
||||
Url: https://www.mytinytodo.net/
|
||||
Copyright: 2009-2011,2019-2025 Max Pozdeev <maxpozdeev@gmail.com>
|
||||
License: GPL version 2 or any later (see LICENSE file)
|
||||
|
||||
|
||||
myTinyTodo uses other works:
|
||||
|
||||
jQuery
|
||||
--------------
|
||||
Url: http://jquery.com/
|
||||
Copyright: 2009 John Resig <jeresig@gmail.com>
|
||||
License: Dual licensed under the MIT and GPL version 2 licenses (see http://docs.jquery.com/License)
|
||||
Url: http://jquery.com/
|
||||
Copyright: (c) JS Foundation and other contributors | https://jquery.org/license/
|
||||
License: MIT license. Compatible with GNU GPL (see https://blog.jquery.com/2012/09/10/jquery-licensing-changes/)
|
||||
|
||||
jQuery UI
|
||||
--------------
|
||||
Url: http://jqueryui.com/
|
||||
Copyright: 2009 jQuery UI Authors (see http://jqueryui.com/about)
|
||||
License: Dual licensed under the MIT and GPL version 2 licenses (see http://jqueryui.com/about)
|
||||
Url: http://jqueryui.com/
|
||||
Copyright: Copyright jQuery Foundation and other contributors
|
||||
License: MIT license. Compatible with GNU GPL.
|
||||
|
||||
Autocomplete - jQuery plugin
|
||||
------------------------------
|
||||
Url: http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/
|
||||
Copyright: 2007 Dylan Verheul, Dan G. Switzer, Anjesh Tuladhar, Jörn Zaefferer
|
||||
License: Dual licensed under the MIT and GPL licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl.html
|
||||
jQuery UI Touch Punch (fork by RWAP Software)
|
||||
---------------------------------------------
|
||||
Url: https://github.com/RWAP/jquery-ui-touch-punch
|
||||
based on original touchpunch
|
||||
Original: https://github.com/furf/jquery-ui-touch-punch
|
||||
Copyright: Copyright 2011–2014, Dave Furfero
|
||||
License: Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
||||
Images based on Silk Icons set (see also images/COPYRIGHT file)
|
||||
-----------------------------------
|
||||
Url: http://www.famfamfam.com/lab/icons/silk/
|
||||
Copyright: Mark James
|
||||
License: Creative Commons Attribution 2.5 License (http://creativecommons.org/licenses/by/2.5/)
|
||||
Parsedown
|
||||
--------------
|
||||
Url: https://parsedown.org/
|
||||
Copyright: (c) 2013-2018 Emanuil Rusev, erusev.com
|
||||
License: MIT license. Compatible with GNU GPL.
|
||||
|
||||
Other libraries (in includes/vendor)
|
||||
----------------------------------------------
|
||||
symfony/polyfill-intl-normalizer
|
||||
league/commonmark
|
||||
|
||||
Images
|
||||
--------------
|
||||
This software contains images by 3d-parties.
|
||||
See file content/theme/images/COPYRIGHT for details.
|
||||
|
|
|
|||
873
src/LICENSE
Normal file → Executable file
|
|
@ -1,622 +1,281 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
NO WARRANTY
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
|
|
@ -628,15 +287,15 @@ free software which everyone can redistribute and change under these terms.
|
|||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
|
|
@ -644,31 +303,37 @@ the "copyright" line and a pointer to where the full notice is found.
|
|||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
|
|
|
|||
1324
src/ajax.js
|
|
@ -1,12 +0,0 @@
|
|||
<?php
|
||||
|
||||
require_once('./db/config.php');
|
||||
require_once('./lang/class.default.php');
|
||||
require_once('./lang/'. $config['lang']. '.php');
|
||||
|
||||
$l = new Lang();
|
||||
|
||||
header('Content-type: text/javascript');
|
||||
echo $l->makeJS();
|
||||
|
||||
?>
|
||||
726
src/ajax.php
|
|
@ -1,726 +0,0 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
This file is part of myTinyTodo.
|
||||
(C) Copyright 2009 Max Pozdeev <maxpozdeev@gmail.com>
|
||||
Licensed under the GNU GPL v3 license. See file COPYRIGHT for details.
|
||||
*/
|
||||
|
||||
set_error_handler('myErrorHandler');
|
||||
set_exception_handler('myExceptionHandler');
|
||||
|
||||
require_once('./init.php');
|
||||
require_once('./lang/class.default.php');
|
||||
require_once('./lang/'.Config::get('lang').'.php');
|
||||
$lang = new Lang();
|
||||
|
||||
if(isset($_GET['loadLists']))
|
||||
{
|
||||
if($needAuth && !is_logged()) $sqlWhere = 'WHERE published=1';
|
||||
else $sqlWhere = '';
|
||||
$t = array();
|
||||
$t['total'] = 0;
|
||||
$q = $db->dq("SELECT * FROM {$db->prefix}lists $sqlWhere ORDER BY id ASC");
|
||||
while($r = $q->fetch_assoc($q))
|
||||
{
|
||||
$t['total']++;
|
||||
$t['list'][] = array(
|
||||
'id' => $r['id'],
|
||||
'name' => htmlarray($r['name']),
|
||||
'sort' => (int)$r['sorting'],
|
||||
'published' => $r['published'] ? 1 :0,
|
||||
);
|
||||
}
|
||||
echo json_encode($t);
|
||||
exit;
|
||||
}
|
||||
elseif(isset($_GET['loadTasks']))
|
||||
{
|
||||
stop_gpc($_GET);
|
||||
$listId = (int)_get('list');
|
||||
check_read_access($listId);
|
||||
$sqlWhere = ' AND list_id='. $listId;
|
||||
if(_get('compl') == 0) $sqlWhere .= ' AND compl=0';
|
||||
$inner = '';
|
||||
$tag = trim(_get('t'));
|
||||
if($tag != '') {
|
||||
$tag_id = get_tag_id($tag, $listId);
|
||||
$inner = "INNER JOIN {$db->prefix}tag2task ON id=task_id";
|
||||
$sqlWhere .= " AND tag_id=$tag_id ";
|
||||
}
|
||||
$s = trim(_get('s'));
|
||||
if($s != '') $sqlWhere .= " AND (title LIKE ". $db->quoteForLike("%%%s%%",$s). " OR note LIKE ". $db->quoteForLike("%%%s%%",$s). ")";
|
||||
$sort = (int)_get('sort');
|
||||
$sqlSort = "ORDER BY compl ASC, ";
|
||||
if($sort == 1) $sqlSort .= "prio DESC, ddn ASC, duedate ASC, ow ASC";
|
||||
elseif($sort == 2) $sqlSort .= "ddn ASC, duedate ASC, prio DESC, ow ASC";
|
||||
else $sqlSort .= "ow ASC";
|
||||
$tz = (int)_get('tz');
|
||||
if(Config::get('autotz')==0 || $tz<-720 || $tz>720 || $tz%30!=0) $tz = round(date('Z')/60);
|
||||
$t = array();
|
||||
$t['total'] = 0;
|
||||
$t['list'] = array();
|
||||
$q = $db->dq("SELECT *, duedate IS NULL AS ddn FROM {$db->prefix}todolist $inner WHERE 1=1 $sqlWhere $sqlSort");
|
||||
while($r = $q->fetch_assoc($q))
|
||||
{
|
||||
$t['total']++;
|
||||
$t['list'][] = prepareTaskRow($r, $tz);
|
||||
}
|
||||
echo json_encode($t);
|
||||
exit;
|
||||
}
|
||||
elseif(isset($_GET['newTask']))
|
||||
{
|
||||
check_write_access();
|
||||
stop_gpc($_POST);
|
||||
$t = array();
|
||||
$t['total'] = 0;
|
||||
$listId = (int)_post('list');
|
||||
$title = trim(_post('title'));
|
||||
$prio = 0;
|
||||
$tags = '';
|
||||
if(Config::get('smartsyntax') != 0)
|
||||
{
|
||||
$a = parse_smartsyntax($title);
|
||||
if($a === false) {
|
||||
echo json_encode($t);
|
||||
exit;
|
||||
}
|
||||
$title = $a['title'];
|
||||
$prio = $a['prio'];
|
||||
$tags = $a['tags'];
|
||||
}
|
||||
if($title == '') {
|
||||
echo json_encode($t);
|
||||
exit;
|
||||
}
|
||||
if(Config::get('autotag')) $tags .= ','._post('tag');
|
||||
$tz = (int)_post('tz');
|
||||
if(Config::get('autotz')==0 || $tz<-720 || $tz>720 || $tz%30!=0 ) $tz = round(date('Z')/60);
|
||||
$ow = 1 + (int)$db->sq("SELECT MAX(ow) FROM {$db->prefix}todolist WHERE list_id=$listId AND compl=0");
|
||||
$db->ex("BEGIN");
|
||||
$db->dq("INSERT INTO {$db->prefix}todolist (list_id,title,d_created,ow,prio) VALUES ($listId,?,?,$ow,$prio)", array($title, time()));
|
||||
$id = $db->last_insert_id();
|
||||
if($tags)
|
||||
{
|
||||
$tag_ids = prepare_tags($tags, $listId);
|
||||
if($tag_ids) {
|
||||
update_task_tags($id, $tag_ids);
|
||||
$db->ex("UPDATE {$db->prefix}todolist SET tags=? WHERE id=$id", $tags);
|
||||
}
|
||||
}
|
||||
$db->ex("COMMIT");
|
||||
$r = $db->sqa("SELECT * FROM {$db->prefix}todolist WHERE id=$id");
|
||||
$t['list'][] = prepareTaskRow($r, $tz);
|
||||
$t['total'] = 1;
|
||||
echo json_encode($t);
|
||||
exit;
|
||||
}
|
||||
elseif(isset($_GET['fullNewTask']))
|
||||
{
|
||||
check_write_access();
|
||||
stop_gpc($_POST);
|
||||
$listId = (int)_post('list');
|
||||
$title = trim(_post('title'));
|
||||
$note = str_replace("\r\n", "\n", trim(_post('note')));
|
||||
$prio = (int)_post('prio');
|
||||
if($prio < -1) $prio = -1;
|
||||
elseif($prio > 2) $prio = 2;
|
||||
$duedate = parse_duedate(trim(_post('duedate')));
|
||||
$t = array();
|
||||
$t['total'] = 0;
|
||||
if($title == '') {
|
||||
echo json_encode($t);
|
||||
exit;
|
||||
}
|
||||
$tags = trim(_post('tags'));
|
||||
if(Config::get('autotag')) $tags .= ','._post('tag');
|
||||
$tz = (int)_post('tz');
|
||||
if( Config::get('autotz')==0 || $tz<-720 || $tz>720 || $tz%30!=0 ) $tz = round(date('Z')/60);
|
||||
$ow = 1 + (int)$db->sq("SELECT MAX(ow) FROM {$db->prefix}todolist WHERE list_id=$listId AND compl=0");
|
||||
if(is_null($duedate)) $duedate = 'NULL'; else $duedate = $db->quote($duedate);
|
||||
$db->ex("BEGIN");
|
||||
$db->dq("INSERT INTO {$db->prefix}todolist (list_id,title,d_created,ow,prio,note,duedate) VALUES($listId,?,?,$ow,$prio,?,$duedate)", array($title,time(),$note));
|
||||
$id = $db->last_insert_id();
|
||||
if($tags)
|
||||
{
|
||||
$tag_ids = prepare_tags($tags, $listId);
|
||||
if($tag_ids) {
|
||||
update_task_tags($id, $tag_ids);
|
||||
$db->ex("UPDATE {$db->prefix}todolist SET tags=? WHERE id=$id", $tags);
|
||||
}
|
||||
}
|
||||
$db->ex("COMMIT");
|
||||
$r = $db->sqa("SELECT * FROM {$db->prefix}todolist WHERE id=$id");
|
||||
$t['list'][] = prepareTaskRow($r, $tz);
|
||||
$t['total'] = 1;
|
||||
echo json_encode($t);
|
||||
exit;
|
||||
}
|
||||
elseif(isset($_GET['deleteTask']))
|
||||
{
|
||||
$id = (int)$_GET['deleteTask'];
|
||||
$deleted = deleteTask($id);
|
||||
$t = array();
|
||||
$t['total'] = $deleted;
|
||||
$t['list'][] = array('id'=>$id);
|
||||
echo json_encode($t);
|
||||
exit;
|
||||
}
|
||||
elseif(isset($_GET['completeTask']))
|
||||
{
|
||||
check_write_access();
|
||||
$id = (int)$_GET['completeTask'];
|
||||
$compl = _get('compl') ? 1 : 0;
|
||||
if($compl) $ow = 1 + (int)$db->sq("SELECT MAX(ow) FROM {$db->prefix}todolist WHERE compl=1");
|
||||
else $ow = 1 + (int)$db->sq("SELECT MAX(ow) FROM {$db->prefix}todolist WHERE compl=0");
|
||||
$db->dq("UPDATE {$db->prefix}todolist SET compl=$compl,ow=$ow,d_completed=? WHERE id=$id", array($compl?time():0 ));
|
||||
$t = array();
|
||||
$t['total'] = 1;
|
||||
$t['list'][] = array('id'=>$id, 'compl'=>$compl, 'ow'=>$ow);
|
||||
echo json_encode($t);
|
||||
exit;
|
||||
}
|
||||
elseif(isset($_GET['editNote']))
|
||||
{
|
||||
check_write_access();
|
||||
$id = (int)$_GET['editNote'];
|
||||
stop_gpc($_POST);
|
||||
$note = str_replace("\r\n", "\n", trim(_post('note')));
|
||||
$db->dq("UPDATE {$db->prefix}todolist SET note=? WHERE id=$id", $note);
|
||||
$t = array();
|
||||
$t['total'] = 1;
|
||||
$t['list'][] = array('id'=>$id, 'note'=>nl2br(htmlarray($note)), 'noteText'=>(string)$note);
|
||||
echo json_encode($t);
|
||||
exit;
|
||||
}
|
||||
elseif(isset($_GET['editTask']))
|
||||
{
|
||||
check_write_access();
|
||||
$id = (int)$_GET['editTask'];
|
||||
stop_gpc($_POST);
|
||||
$listId = (int)_post('list');
|
||||
$title = trim(_post('title'));
|
||||
$note = str_replace("\r\n", "\n", trim(_post('note')));
|
||||
$prio = (int)_post('prio');
|
||||
if($prio < -1) $prio = -1;
|
||||
elseif($prio > 2) $prio = 2;
|
||||
$duedate = parse_duedate(trim(_post('duedate')));
|
||||
$t = array();
|
||||
$t['total'] = 0;
|
||||
if($title == '') {
|
||||
echo json_encode($t);
|
||||
exit;
|
||||
}
|
||||
$tags = trim(_post('tags'));
|
||||
$tz = (int)_post('tz');
|
||||
if( Config::get('autotz')==0 || $tz<-720 || $tz>720 || $tz%30!=0 ) $tz = round(date('Z')/60);
|
||||
$db->ex("BEGIN");
|
||||
$tag_ids = prepare_tags($tags, $listId);
|
||||
$cur_ids = get_task_tags($id);
|
||||
if($cur_ids) {
|
||||
$ids = implode(',', $cur_ids);
|
||||
$db->ex("DELETE FROM {$db->prefix}tag2task WHERE task_id=$id");
|
||||
$db->dq("UPDATE {$db->prefix}tags SET tags_count=tags_count-1 WHERE id IN ($ids)");
|
||||
}
|
||||
if($tag_ids) {
|
||||
update_task_tags($id, $tag_ids);
|
||||
}
|
||||
if(is_null($duedate)) $duedate = 'NULL'; else $duedate = $db->quote($duedate);
|
||||
$db->dq("UPDATE {$db->prefix}todolist SET title=?,note=?,prio=?,tags=?,duedate=$duedate WHERE id=$id", array($title,$note,$prio,$tags));
|
||||
$db->ex("COMMIT");
|
||||
$r = $db->sqa("SELECT * FROM {$db->prefix}todolist WHERE id=$id");
|
||||
if($r) {
|
||||
$t['list'][] = prepareTaskRow($r, $tz);
|
||||
$t['total'] = 1;
|
||||
}
|
||||
echo json_encode($t);
|
||||
exit;
|
||||
}
|
||||
elseif(isset($_GET['changeOrder']))
|
||||
{
|
||||
check_write_access();
|
||||
stop_gpc($_POST);
|
||||
$s = _post('order');
|
||||
parse_str($s, $order);
|
||||
$t = array();
|
||||
$t['total'] = 0;
|
||||
if($order)
|
||||
{
|
||||
$ad = array();
|
||||
foreach($order as $id=>$diff) {
|
||||
$ad[(int)$diff][] = (int)$id;
|
||||
}
|
||||
$db->ex("BEGIN");
|
||||
foreach($ad as $diff=>$ids) {
|
||||
if($diff >=0) $set = "ow=ow+".$diff;
|
||||
else $set = "ow=ow-".abs($diff);
|
||||
$db->dq("UPDATE {$db->prefix}todolist SET $set WHERE id IN (".implode(',',$ids).")");
|
||||
}
|
||||
$db->ex("COMMIT");
|
||||
$t['total'] = 1;
|
||||
}
|
||||
echo json_encode($t);
|
||||
exit;
|
||||
}
|
||||
elseif(isset($_POST['login']))
|
||||
{
|
||||
$t = array('logged' => 0);
|
||||
if(!$needAuth) {
|
||||
$t['disabled'] = 1;
|
||||
echo json_encode($t);
|
||||
exit;
|
||||
}
|
||||
stop_gpc($_POST);
|
||||
$password = _post('password');
|
||||
if($password == Config::get('password')) {
|
||||
$t['logged'] = 1;
|
||||
session_regenerate_id(1);
|
||||
$_SESSION['logged'] = 1;
|
||||
}
|
||||
echo json_encode($t);
|
||||
exit;
|
||||
}
|
||||
elseif(isset($_POST['logout']))
|
||||
{
|
||||
$_SESSION = array();
|
||||
$t = array('logged' => 0);
|
||||
echo json_encode($t);
|
||||
exit;
|
||||
}
|
||||
elseif(isset($_GET['suggestTags']))
|
||||
{
|
||||
$listId = (int)_get('list');
|
||||
check_read_access($listId);
|
||||
$begin = trim(_get('q'));
|
||||
$limit = (int)_get('limit');
|
||||
if($limit<1) $limit = 8;
|
||||
$q = $db->dq("SELECT name,id FROM {$db->prefix}tags WHERE list_id=$listId AND name LIKE ". $db->quoteForLike('%s%%',$begin). " AND tags_count>0 ORDER BY name LIMIT $limit");
|
||||
$s = '';
|
||||
while($r = $q->fetch_row()) {
|
||||
$s .= "$r[0]|$r[1]\n";
|
||||
}
|
||||
echo htmlarray($s);
|
||||
exit;
|
||||
}
|
||||
elseif(isset($_GET['setPrio']))
|
||||
{
|
||||
check_write_access();
|
||||
$id = (int)$_GET['setPrio'];
|
||||
$prio = (int)_get('prio');
|
||||
if($prio < -1) $prio = -1;
|
||||
elseif($prio > 2) $prio = 2;
|
||||
$db->ex("UPDATE {$db->prefix}todolist SET prio=$prio WHERE id=$id");
|
||||
$t = array();
|
||||
$t['total'] = 1;
|
||||
$t['list'][] = array('id'=>$id, 'prio'=>$prio);
|
||||
echo json_encode($t);
|
||||
exit;
|
||||
}
|
||||
elseif(isset($_GET['tagCloud']))
|
||||
{
|
||||
$listId = (int)_get('list');
|
||||
check_read_access($listId);
|
||||
$a = array();
|
||||
$q = $db->dq("SELECT name,tags_count FROM {$db->prefix}tags WHERE list_id=$listId AND tags_count>0 ORDER BY tags_count ASC");
|
||||
while($r = $q->fetch_row()) {
|
||||
$a[$r[0]] = $r[1];
|
||||
}
|
||||
$t = array();
|
||||
$t['total'] = 0;
|
||||
$count = sizeof($a);
|
||||
if(!$count) {
|
||||
echo json_encode($t);
|
||||
exit;
|
||||
}
|
||||
$qmax = max(array_values($a));
|
||||
$qmin = min(array_values($a));
|
||||
if($count >= 10) $grades = 10;
|
||||
else $grades = $count;
|
||||
$step = ($qmax - $qmin)/$grades;
|
||||
foreach($a as $tag=>$q) {
|
||||
$t['cloud'][] = array('tag'=>htmlarray($tag), 'w'=> tag_size($qmin,$q,$step) );
|
||||
}
|
||||
$t['total'] = $count;
|
||||
echo json_encode($t);
|
||||
exit;
|
||||
}
|
||||
elseif(isset($_POST['addList']))
|
||||
{
|
||||
check_write_access();
|
||||
stop_gpc($_POST);
|
||||
$t = array();
|
||||
$t['total'] = 0;
|
||||
$name = str_replace(array('"',"'",'<','>','&'),array('','','','',''),trim(_post('name')));
|
||||
$db->dq("INSERT INTO {$db->prefix}lists (name) VALUES (?)", array($name));
|
||||
$id = $db->last_insert_id();
|
||||
$t['total'] = 1;
|
||||
$r = $db->sqa("SELECT * FROM {$db->prefix}lists WHERE id=$id");
|
||||
$t['list'][] = array(
|
||||
'id' => $r['id'],
|
||||
'name' => htmlarray($r['name']),
|
||||
'sort' => (int)$r['sorting'],
|
||||
'published' => $r['published'] ? 1 :0,
|
||||
);
|
||||
echo json_encode($t);
|
||||
exit;
|
||||
}
|
||||
elseif(isset($_POST['renameList']))
|
||||
{
|
||||
check_write_access();
|
||||
stop_gpc($_POST);
|
||||
$t = array();
|
||||
$t['total'] = 0;
|
||||
$id = (int)_post('id');
|
||||
$name = str_replace(array('"',"'",'<','>','&'),array('','','','',''),trim(_post('name')));
|
||||
$db->dq("UPDATE {$db->prefix}lists SET name=? WHERE id=$id", array($name));
|
||||
$t['total'] = $db->affected();
|
||||
$r = $db->sqa("SELECT * FROM {$db->prefix}lists WHERE id=$id");
|
||||
$t['list'][] = array(
|
||||
'id' => $r['id'],
|
||||
'name' => htmlarray($r['name']),
|
||||
'sort' => (int)$r['sorting'],
|
||||
'published' => $r['published'] ? 1 :0,
|
||||
);
|
||||
echo json_encode($t);
|
||||
exit;
|
||||
}
|
||||
elseif(isset($_POST['deleteList']))
|
||||
{
|
||||
check_write_access();
|
||||
stop_gpc($_POST);
|
||||
$t = array();
|
||||
$t['total'] = 0;
|
||||
$id = (int)_post('id');
|
||||
$db->ex("BEGIN");
|
||||
$db->ex("DELETE FROM {$db->prefix}lists WHERE id=$id");
|
||||
$t['total'] = $db->affected();
|
||||
if($t['total']) {
|
||||
$db->ex("DELETE FROM {$db->prefix}tags WHERE list_id=$id");
|
||||
# sqlite doesnt support DELETE FROM INNNER JOIN
|
||||
$db->ex("DELETE FROM {$db->prefix}tag2task WHERE task_id IN (SELECT id FROM {$db->prefix}todolist WHERE list_id=$id)");
|
||||
$db->ex("DELETE FROM {$db->prefix}todolist WHERE list_id=$id");
|
||||
}
|
||||
$db->ex("COMMIT");
|
||||
echo json_encode($t);
|
||||
exit;
|
||||
}
|
||||
elseif(isset($_GET['setSort']))
|
||||
{
|
||||
check_write_access();
|
||||
$listId = (int)_post('list');
|
||||
$sort = (int)_post('sort');
|
||||
if($sort < 0 || $sort > 2) $sort = 0;
|
||||
$db->ex("UPDATE {$db->prefix}lists SET sorting=$sort WHERE id=$listId");
|
||||
echo json_encode(array('total'=>1));
|
||||
exit;
|
||||
}
|
||||
elseif(isset($_GET['publishList']))
|
||||
{
|
||||
check_write_access();
|
||||
$listId = (int)_post('list');
|
||||
$publish = (int)_post('publish');
|
||||
$db->ex("UPDATE {$db->prefix}lists SET published=? WHERE id=$listId", array($publish ? 1 : 0));
|
||||
echo json_encode(array('total'=>1));
|
||||
exit;
|
||||
}
|
||||
elseif(isset($_GET['moveTask']))
|
||||
{
|
||||
check_write_access();
|
||||
$id = (int)_post('id');
|
||||
// $fromId = (int)_post('from');
|
||||
$toId = (int)_post('to');
|
||||
$r = moveTask($id, $toId);
|
||||
echo json_encode(array('total'=>$r?1:0));
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
###################################################################################################
|
||||
|
||||
function prepareTaskRow($r, $tz)
|
||||
{
|
||||
global $lang;
|
||||
$dueA = prepare_duedate($r['duedate'], $tz);
|
||||
$dCreated = timestampToDatetime($r['d_created'], $tz);
|
||||
return array(
|
||||
'id' => $r['id'],
|
||||
'title' => htmlarray($r['title']),
|
||||
'date' => htmlarray($dCreated),
|
||||
'dateInline' => htmlarray(sprintf($lang->get('taskdate_inline'), $dCreated)),
|
||||
'dateCompleted' => htmlarray(timestampToDatetime($r['d_completed'], $tz)),
|
||||
'compl' => (int)$r['compl'],
|
||||
'prio' => $r['prio'],
|
||||
'note' => nl2br(htmlarray($r['note'])),
|
||||
'noteText' => (string)$r['note'],
|
||||
'ow' => (int)$r['ow'],
|
||||
'tags' => htmlarray($r['tags']),
|
||||
'duedate' => $dueA['formatted'],
|
||||
'dueClass' => $dueA['class'],
|
||||
'dueStr' => htmlarray($dueA['str']),
|
||||
'dueInt' => date2int($r['duedate']),
|
||||
);
|
||||
}
|
||||
|
||||
function check_read_access($listId = null)
|
||||
{
|
||||
global $db;
|
||||
if(Config::get('password') == '') return true;
|
||||
if(is_logged()) return true;
|
||||
if($listId)
|
||||
{
|
||||
$id = $db->sq("SELECT id FROM {$db->prefix}lists WHERE id=? AND published=1", array($listId));
|
||||
if($id) return;
|
||||
}
|
||||
echo json_encode( array('total'=>0, 'list'=>array(), 'denied'=>1) );
|
||||
exit;
|
||||
}
|
||||
|
||||
function check_write_access()
|
||||
{
|
||||
if(Config::get('password') == '') return;
|
||||
if(is_logged()) return;
|
||||
echo json_encode( array('total'=>0, 'list'=>array(), 'denied'=>1) );
|
||||
exit;
|
||||
}
|
||||
|
||||
function prepare_tags(&$tags_str, $listId)
|
||||
{
|
||||
$tag_ids = array();
|
||||
$tag_names = array();
|
||||
$tags = explode(',', $tags_str);
|
||||
foreach($tags as $v)
|
||||
{
|
||||
# remove duplicate tags?
|
||||
$tag = str_replace(array('"',"'",'<','>','&'),array('','','','',''),trim($v));
|
||||
if($tag == '') continue;
|
||||
list($tag_id,$tag_name) = get_or_create_tag($tag, $listId);
|
||||
if($tag_id && !in_array($tag_id, $tag_ids)) {
|
||||
$tag_ids[] = $tag_id;
|
||||
$tag_names[] = $tag_name;
|
||||
}
|
||||
}
|
||||
$tags_str = implode(',', $tag_names);
|
||||
return $tag_ids;
|
||||
}
|
||||
|
||||
function get_or_create_tag($name, $listId)
|
||||
{
|
||||
global $db;
|
||||
$tag = $db->sq("SELECT id,name FROM {$db->prefix}tags WHERE list_id=? AND name=?", array($listId, $name));
|
||||
if($tag) return $tag;
|
||||
|
||||
# need to create tag
|
||||
$db->ex("INSERT INTO {$db->prefix}tags (name,list_id) VALUES (?,?)", array($name,$listId));
|
||||
return array($db->last_insert_id(), $name);
|
||||
}
|
||||
|
||||
function get_tag_id($tag, $listId)
|
||||
{
|
||||
global $db;
|
||||
$id = $db->sq("SELECT id FROM {$db->prefix}tags WHERE list_id=? AND name=?", array($listId, $tag));
|
||||
return $id ? $id : 0;
|
||||
}
|
||||
|
||||
function get_task_tags($id)
|
||||
{
|
||||
global $db;
|
||||
$q = $db->dq("SELECT tag_id FROM {$db->prefix}tag2task WHERE task_id=?", $id);
|
||||
$a = array();
|
||||
while($r = $q->fetch_row()) {
|
||||
$a[] = $r[0];
|
||||
}
|
||||
return $a;
|
||||
}
|
||||
|
||||
function update_task_tags($id, $tag_ids)
|
||||
{
|
||||
global $db;
|
||||
foreach($tag_ids as $v) {
|
||||
$db->ex("INSERT INTO {$db->prefix}tag2task (task_id,tag_id) VALUES ($id,$v)");
|
||||
}
|
||||
$db->ex("UPDATE {$db->prefix}tags SET tags_count=tags_count+1 WHERE id IN (". implode(',', $tag_ids). ")");
|
||||
}
|
||||
|
||||
function parse_smartsyntax($title)
|
||||
{
|
||||
$a = array();
|
||||
if(!preg_match("|^(/([+-]{0,1}\d+)?/)?(.*?)(\s+/([^/]*)/$)?$|", $title, $m)) return false;
|
||||
$a['prio'] = isset($m[2]) ? (int)$m[2] : 0;
|
||||
$a['title'] = isset($m[3]) ? trim($m[3]) : '';
|
||||
$a['tags'] = isset($m[5]) ? trim($m[5]) : '';
|
||||
if($a['prio'] < -1) $a['prio'] = -1;
|
||||
elseif($a['prio'] > 2) $a['prio'] = 2;
|
||||
return $a;
|
||||
}
|
||||
|
||||
function tag_size($qmin, $q, $step)
|
||||
{
|
||||
if($step == 0) return 1;
|
||||
$v = ceil(($q - $qmin)/$step);
|
||||
if($v == 0) return 0;
|
||||
else return $v-1;
|
||||
|
||||
}
|
||||
|
||||
function parse_duedate($s)
|
||||
{
|
||||
$y = $m = $d = 0;
|
||||
if(preg_match("|^(\d+)-(\d+)-(\d+)\b|", $s, $ma)) {
|
||||
$y = (int)$ma[1]; $m = (int)$ma[2]; $d = (int)$ma[3];
|
||||
}
|
||||
elseif(preg_match("|^(\d+)\/(\d+)\/(\d+)\b|", $s, $ma))
|
||||
{
|
||||
if(Config::get('duedateformat') == 4) {
|
||||
$d = (int)$ma[1]; $m = (int)$ma[2]; $y = (int)$ma[3];
|
||||
} else {
|
||||
$m = (int)$ma[1]; $d = (int)$ma[2]; $y = (int)$ma[3];
|
||||
}
|
||||
}
|
||||
elseif(preg_match("|^(\d+)\.(\d+)\.(\d+)\b|", $s, $ma)) {
|
||||
$d = (int)$ma[1]; $m = (int)$ma[2]; $y = (int)$ma[3];
|
||||
}
|
||||
elseif(preg_match("|^(\d+)\.(\d+)\b|", $s, $ma)) {
|
||||
$d = (int)$ma[1]; $m = (int)$ma[2];
|
||||
$a = explode(',', date('Y,m,d'));
|
||||
if( $m<(int)$a[1] || ($m==(int)$a[1] && $d<(int)$a[2]) ) $y = (int)$a[0]+1;
|
||||
else $y = (int)$a[0];
|
||||
}
|
||||
elseif(preg_match("|^(\d+)\/(\d+)\b|", $s, $ma))
|
||||
{
|
||||
if(Config::get('duedateformat') == 4) {
|
||||
$d = (int)$ma[1]; $m = (int)$ma[2];
|
||||
} else {
|
||||
$m = (int)$ma[1]; $d = (int)$ma[2];
|
||||
}
|
||||
$a = explode(',', date('Y,m,d'));
|
||||
if( $m<(int)$a[1] || ($m==(int)$a[1] && $d<(int)$a[2]) ) $y = (int)$a[0]+1;
|
||||
else $y = (int)$a[0];
|
||||
}
|
||||
else return null;
|
||||
if($y < 100) $y = 2000 + $y;
|
||||
elseif($y < 1000 || $y > 2099) $y = 2000 + (int)substr((string)$y, -2);
|
||||
if($m > 12) $m = 12;
|
||||
$maxdays = daysInMonth($m,$y);
|
||||
if($m < 10) $m = '0'.$m;
|
||||
if($d > $maxdays) $d = $maxdays;
|
||||
elseif($d < 10) $d = '0'.$d;
|
||||
return "$y-$m-$d";
|
||||
}
|
||||
|
||||
function prepare_duedate($duedate, $tz)
|
||||
{
|
||||
global $lang;
|
||||
|
||||
$a = array( 'class'=>'', 'str'=>'', 'formatted'=>'' );
|
||||
if($duedate == '') {
|
||||
return $a;
|
||||
}
|
||||
$ad = explode('-', $duedate);
|
||||
$at = explode('-', gmdate('Y-m-d', time() + $tz*60));
|
||||
$diff = mktime(0,0,0,$ad[1],$ad[2],$ad[0]) - mktime(0,0,0,$at[1],$at[2],$at[0]);
|
||||
|
||||
if($diff < -604800 && $ad[0] == $at[0]) { $a['class'] = 'past'; $a['str'] = formatDate3(Config::get('dateformatshort'), (int)$ad[0], (int)$ad[1], (int)$ad[2], $lang); }
|
||||
elseif($diff < -604800) { $a['class'] = 'past'; $a['str'] = formatDate3(Config::get('dateformat'), (int)$ad[0], (int)$ad[1], (int)$ad[2], $lang); }
|
||||
elseif($diff < -86400) { $a['class'] = 'past'; $a['str'] = sprintf($lang->get('daysago'),ceil(abs($diff)/86400)); }
|
||||
elseif($diff < 0) { $a['class'] = 'past'; $a['str'] = $lang->get('yesterday'); }
|
||||
elseif($diff < 86400) { $a['class'] = 'today'; $a['str'] = $lang->get('today'); }
|
||||
elseif($diff < 172800) { $a['class'] = 'today'; $a['str'] = $lang->get('tomorrow'); }
|
||||
elseif($diff < 691200) { $a['class'] = 'soon'; $a['str'] = sprintf($lang->get('indays'),ceil($diff/86400)); }
|
||||
elseif($ad[0] == $at[0]) { $a['class'] = 'future'; $a['str'] = formatDate3(Config::get('dateformatshort'), (int)$ad[0], (int)$ad[1], (int)$ad[2], $lang); }
|
||||
else { $a['class'] = 'future'; $a['str'] = formatDate3(Config::get('dateformat'), (int)$ad[0], (int)$ad[1], (int)$ad[2], $lang); }
|
||||
|
||||
if(Config::get('duedateformat') == 2) $a['formatted'] = (int)$ad[1].'/'.(int)$ad[2].'/'.$ad[0];
|
||||
elseif(Config::get('duedateformat') == 3) $a['formatted'] = $ad[2].'.'.$ad[1].'.'.$ad[0];
|
||||
elseif(Config::get('duedateformat') == 4) $a['formatted'] = $ad[2].'/'.$ad[1].'/'.$ad[0];
|
||||
else $a['formatted'] = $duedate;
|
||||
|
||||
return $a;
|
||||
}
|
||||
|
||||
function date2int($d)
|
||||
{
|
||||
if(!$d) return 33330000;
|
||||
$ad = explode('-', $d);
|
||||
$s = $ad[0];
|
||||
if(strlen($ad[1]) < 2) $s .= "0$ad[1]"; else $s .= $ad[1];
|
||||
if(strlen($ad[2]) < 2) $s .= "0$ad[2]"; else $s .= $ad[2];
|
||||
return (int)$s;
|
||||
}
|
||||
|
||||
function daysInMonth($m, $y=0)
|
||||
{
|
||||
if($y == 0) $y = (int)date('Y');
|
||||
$a = array(1=>31,(($y-2000)%4?28:29),31,30,31,30,31,31,30,31,30,31);
|
||||
if(isset($a[$m])) return $a[$m]; else return 0;
|
||||
}
|
||||
|
||||
function myErrorHandler($errno, $errstr, $errfile, $errline)
|
||||
{
|
||||
if($errno==E_ERROR || $errno==E_CORE_ERROR || $errno==E_COMPILE_ERROR || $errno==E_USER_ERROR || $errno==E_PARSE) $error = 'Error';
|
||||
elseif($errno==E_WARNING || $errno==E_CORE_WARNING || $errno==E_COMPILE_WARNING || $errno==E_USER_WARNING || $errno==E_STRICT) {
|
||||
if(error_reporting() & $errno) $error = 'Warning'; else return;
|
||||
}
|
||||
elseif($errno==E_NOTICE || $errno==E_USER_NOTICE) {
|
||||
if(error_reporting() & $errno) $error = 'Notice'; else return;
|
||||
}
|
||||
elseif(defined('E_DEPRECATED') && ($errno==E_DEPRECATED || $errno==E_USER_DEPRECATED)) { # since 5.3.0
|
||||
if(error_reporting() & $errno) $error = 'Notice'; else return;
|
||||
}
|
||||
else $error = "Error ($errno)"; # here may be E_RECOVERABLE_ERROR
|
||||
throw new Exception("$error: '$errstr' in $errfile:$errline", -1);
|
||||
}
|
||||
|
||||
function myExceptionHandler($e)
|
||||
{
|
||||
if(-1 == $e->getCode()) {
|
||||
echo $e->getMessage(); exit;
|
||||
}
|
||||
echo 'Exception: \''. $e->getMessage() .'\' in '. $e->getFile() .':'. $e->getLine();
|
||||
exit;
|
||||
}
|
||||
|
||||
function deleteTask($id)
|
||||
{
|
||||
check_write_access();
|
||||
global $db;
|
||||
$tags = get_task_tags($id);
|
||||
$db->ex("BEGIN");
|
||||
if($tags) {
|
||||
$s = implode(',', $tags);
|
||||
$db->ex("DELETE FROM {$db->prefix}tag2task WHERE task_id=$id");
|
||||
$db->ex("UPDATE {$db->prefix}tags SET tags_count=tags_count-1 WHERE id IN ($s)");
|
||||
$db->ex("DELETE FROM {$db->prefix}tags WHERE tags_count < 1"); # slow on large amount of tags
|
||||
}
|
||||
$db->dq("DELETE FROM {$db->prefix}todolist WHERE id=$id");
|
||||
$affected = $db->affected();
|
||||
$db->ex("COMMIT");
|
||||
return $affected;
|
||||
}
|
||||
|
||||
function moveTask($id, $listId)
|
||||
{
|
||||
check_write_access();
|
||||
global $db;
|
||||
$r = $db->sqa("SELECT * FROM {$db->prefix}todolist WHERE id=?", array($id));
|
||||
if(!$r || $listId == $r['list_id']) return false;
|
||||
if(!$db->sq("SELECT COUNT(*) FROM {$db->prefix}lists WHERE id=?", $listId))
|
||||
return false;
|
||||
|
||||
$ow = 1 + (int)$db->sq("SELECT MAX(ow) FROM {$db->prefix}todolist WHERE list_id=? AND compl=?", array($listId, $r['compl']?1:0));
|
||||
$tags = get_task_tags($id);
|
||||
$db->ex("BEGIN");
|
||||
if($tags)
|
||||
{
|
||||
$s = implode(',', $tags);
|
||||
$db->ex("DELETE FROM {$db->prefix}tag2task WHERE task_id=?", $id);
|
||||
$db->ex("UPDATE {$db->prefix}tags SET tags_count=tags_count-1 WHERE id IN ($s)");
|
||||
$db->ex("DELETE FROM {$db->prefix}tags WHERE tags_count < 1"); #slow
|
||||
update_task_tags($id, prepare_tags($r['tags'], $listId));
|
||||
}
|
||||
$db->dq("UPDATE {$db->prefix}todolist SET list_id=?, ow=? WHERE id=?", array($listId, $ow, $id));
|
||||
$db->ex("COMMIT");
|
||||
return true;
|
||||
}
|
||||
|
||||
?>
|
||||
228
src/api.php
Normal file
|
|
@ -0,0 +1,228 @@
|
|||
<?php declare(strict_types=1);
|
||||
|
||||
/*
|
||||
This file is a part of myTinyTodo.
|
||||
(C) Copyright 2022-2023 Max Pozdeev <maxpozdeev@gmail.com>
|
||||
Licensed under the GNU GPL version 2 or any later. See file COPYRIGHT for details.
|
||||
*/
|
||||
|
||||
require_once('./init.php');
|
||||
|
||||
if (MTT_DEBUG) {
|
||||
set_error_handler('myErrorHandler'); //catch Notices, Warnings
|
||||
set_exception_handler('myExceptionHandler');
|
||||
}
|
||||
else {
|
||||
ini_set('display_errors', '0');
|
||||
}
|
||||
|
||||
require_once(MTTINC. 'api/ListsController.php');
|
||||
require_once(MTTINC. 'api/TasksController.php');
|
||||
require_once(MTTINC. 'api/TagsController.php');
|
||||
require_once(MTTINC. 'api/AuthController.php');
|
||||
require_once(MTTINC. 'api/ExtSettingsController.php');
|
||||
|
||||
$endpoints = array(
|
||||
'/lists' => [
|
||||
'GET' => [ ListsController::class , 'get' ],
|
||||
'POST' => [ ListsController::class , 'post' ],
|
||||
'PUT' => [ ListsController::class , 'put' ],
|
||||
],
|
||||
'/lists/(-?\d+)' => [
|
||||
'GET' => [ ListsController::class , 'getId' ],
|
||||
'PUT' => [ ListsController::class , 'putId' ],
|
||||
'DELETE' => [ ListsController::class , 'deleteId' ],
|
||||
'POST' => [ ListsController::class , 'putId' ], //compatibility
|
||||
],
|
||||
'/tasks' => [
|
||||
'GET' => [ TasksController::class , 'get' ],
|
||||
'POST' => [ TasksController::class , 'post' ],
|
||||
'PUT' => [ TasksController::class , 'put' ],
|
||||
],
|
||||
'/tasks/(-?\d+)' => [
|
||||
'PUT' => [ TasksController::class , 'putId' ],
|
||||
'DELETE' => [ TasksController::class , 'deleteId' ],
|
||||
'POST' => [ TasksController::class , 'putId' ], //compatibility
|
||||
],
|
||||
'/tasks/parseTitle' => [
|
||||
'POST' => [ TasksController::class , 'postTitleParse' ],
|
||||
],
|
||||
'/tasks/newCounter' => [
|
||||
'POST' => [ TasksController::class , 'postNewCounter' ],
|
||||
],
|
||||
'/tagCloud/(-?\d+)' => [
|
||||
'GET' => [ TagsController::class , 'getCloud' ],
|
||||
],
|
||||
'/suggestTags' => [
|
||||
'GET' => [ TagsController::class , 'getSuggestions' ],
|
||||
],
|
||||
'/(login|logout|session)' => [
|
||||
'POST' => [ AuthController::class , 'postAction' ],
|
||||
],
|
||||
'/ext-settings/(.+)' => [
|
||||
'GET' => [ ExtSettingsController::class , 'get' ],
|
||||
'PUT' => [ ExtSettingsController::class , 'put' ],
|
||||
'POST' => [ ExtSettingsController::class , 'put' ], //compatibility
|
||||
]
|
||||
);
|
||||
|
||||
// look for extensions
|
||||
foreach (MTTExtensionLoader::loadedExtensions() as $instance) {
|
||||
if ($instance instanceof MTTHttpApiExtender) {
|
||||
$newRoutes = $instance->extendHttpApi();
|
||||
foreach ($newRoutes as $endpoint => $methods) {
|
||||
$endpoint = '/ext/'. $instance::bundleId. $endpoint;
|
||||
foreach ($methods as $k => &$v) {
|
||||
$v[3] = true; // Mark extension method
|
||||
}
|
||||
$endpoints[$endpoint] = $methods;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$req = new ApiRequest();
|
||||
$response = new ApiResponse();
|
||||
$executed = false;
|
||||
$data = null;
|
||||
|
||||
foreach ($endpoints as $search => $methods) {
|
||||
$m = array();
|
||||
if (preg_match("#^$search$#", $req->path, $m)) {
|
||||
$classDescr = $methods[$req->method] ?? null;
|
||||
// check if http method is supported for path
|
||||
if ( is_null($classDescr) ) {
|
||||
$response->htmlContent("Unknown method for resource", 500)
|
||||
->exit();
|
||||
}
|
||||
if ( !is_array($classDescr) || count($classDescr) < 2) {
|
||||
$response->htmlContent("Incorrect method definition", 500)
|
||||
->exit();
|
||||
}
|
||||
// check if class method exists
|
||||
$class = $classDescr[0];
|
||||
$classMethod = $classDescr[1];
|
||||
$isExtMethod = $classDescr[3] ?? false;
|
||||
if ($isExtMethod) {
|
||||
if (false == ($classDescr[2] ?? false)) { //TODO: describe $classDescr[2]
|
||||
// By default all extension methods require write access rights
|
||||
checkWriteAccess();
|
||||
}
|
||||
}
|
||||
$param = null;
|
||||
if (count($m) >= 2) {
|
||||
$param = $m[1];
|
||||
}
|
||||
if (method_exists($class, $classMethod)) { // test for static with ReflectionMethod?
|
||||
if ($req->method != 'GET' && $req->contentType == 'application/json') {
|
||||
if ($req->decodeJsonBody() === false) {
|
||||
$response->htmlContent("Failed to parse JSON body", 500)
|
||||
->exit();
|
||||
}
|
||||
}
|
||||
$instance = new $class($req, $response);
|
||||
$instance->$classMethod($param);
|
||||
$executed = true;
|
||||
break;
|
||||
}
|
||||
else {
|
||||
if (MTT_DEBUG) {
|
||||
$response->htmlContent("Class method $class:$classMethod() not found", 405)
|
||||
->exit();
|
||||
}
|
||||
$response->htmlContent("Class method not found", 405)
|
||||
->exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$executed) {
|
||||
if (MTT_DEBUG) {
|
||||
$response->htmlContent("Unknown endpoint: {$req->method} {$req->path}", 404)
|
||||
->exit();
|
||||
}
|
||||
$response->htmlContent("Unknown endpoint", 404);
|
||||
}
|
||||
$response->exit();
|
||||
|
||||
|
||||
|
||||
function myErrorHandler($errno, $errstr, $errfile, $errline)
|
||||
{
|
||||
if ($errno==E_ERROR || $errno==E_CORE_ERROR || $errno==E_COMPILE_ERROR || $errno==E_USER_ERROR || $errno==E_PARSE) {
|
||||
$error = 'Error';
|
||||
}
|
||||
elseif ($errno==E_WARNING || $errno==E_CORE_WARNING || $errno==E_COMPILE_WARNING || $errno==E_USER_WARNING) {
|
||||
if (error_reporting() & $errno) $error = 'Warning'; else return;
|
||||
}
|
||||
elseif ($errno==E_NOTICE || $errno==E_USER_NOTICE || $errno==E_DEPRECATED || $errno==E_USER_DEPRECATED) {
|
||||
if (error_reporting() & $errno) $error = 'Notice'; else return;
|
||||
}
|
||||
else $error = "Error ($errno)"; // here may be E_RECOVERABLE_ERROR
|
||||
throw new Exception("$error: '$errstr' in $errfile:$errline", -1);
|
||||
}
|
||||
|
||||
function myExceptionHandler(Throwable $e)
|
||||
{
|
||||
// to avoid Exception thrown without a stack frame
|
||||
try
|
||||
{
|
||||
if (-1 == $e->getCode()) {
|
||||
//thrown in myErrorHandler
|
||||
http_response_code(500);
|
||||
logAndDie( $e->getMessage() );
|
||||
}
|
||||
|
||||
$c = get_class($e);
|
||||
$errText = "Exception ($c): '". $e->getMessage(). "' in ". $e->getFile(). ":". $e->getLine() ;
|
||||
|
||||
if (MTT_DEBUG) {
|
||||
if ( count($e->getTrace()) > 0 ) {
|
||||
$errText .= "\n". $e->getTraceAsString() ;
|
||||
}
|
||||
}
|
||||
http_response_code(500);
|
||||
logAndDie($errText);
|
||||
}
|
||||
catch (Exception $e) {
|
||||
http_response_code(500);
|
||||
logAndDie('Exception in ExceptionHandler: \''. $e->getMessage() .'\' in '. $e->getFile() .':'. $e->getLine());
|
||||
}
|
||||
exit;
|
||||
}
|
||||
|
||||
function checkReadAccess(?int $listId = null)
|
||||
{
|
||||
check_token();
|
||||
$db = DBConnection::instance();
|
||||
if (is_logged()) return true;
|
||||
if ($listId !== null)
|
||||
{
|
||||
$id = $db->sq("SELECT id FROM {$db->prefix}lists WHERE id=? AND published=1", array($listId));
|
||||
if ($id) return;
|
||||
}
|
||||
http_response_code(403);
|
||||
jsonExit( array('total'=>0, 'list'=>array(), 'denied'=>1) );
|
||||
}
|
||||
|
||||
function checkWriteAccess(?int $listId = null)
|
||||
{
|
||||
check_token();
|
||||
if (haveWriteAccess($listId)) return;
|
||||
http_response_code(403);
|
||||
jsonExit( array('total'=>0, 'list'=>array(), 'denied'=>1) );
|
||||
}
|
||||
|
||||
function haveWriteAccess(?int $listId = null) : bool
|
||||
{
|
||||
if (is_readonly()) {
|
||||
return false;
|
||||
}
|
||||
// check list exist
|
||||
if ($listId !== null && $listId != -1)
|
||||
{
|
||||
$db = DBConnection::instance();
|
||||
$count = $db->sq("SELECT COUNT(*) FROM {$db->prefix}lists WHERE id=?", array($listId));
|
||||
if (!$count) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
@ -1,168 +0,0 @@
|
|||
<?php
|
||||
|
||||
# Copyright 2009 Max Pozdeev
|
||||
|
||||
class DatabaseResult_Mysql
|
||||
{
|
||||
|
||||
var $parent;
|
||||
var $q;
|
||||
var $query;
|
||||
var $rows = NULL;
|
||||
var $affected = NULL;
|
||||
var $prefix = '';
|
||||
|
||||
function __construct($query, &$h, $resultless = 0)
|
||||
{
|
||||
$this->parent = $h;
|
||||
$this->query = $query;
|
||||
|
||||
$this->q = mysql_query($query, $this->parent->dbh);
|
||||
|
||||
if(!$this->q)
|
||||
{
|
||||
throw new Exception($this->parent->error());
|
||||
}
|
||||
}
|
||||
|
||||
function affected()
|
||||
{
|
||||
if(is_null($this->affected))
|
||||
{
|
||||
$this->affected = mysql_affected_rows($this->parent->dbh);
|
||||
}
|
||||
return $this->affected;
|
||||
}
|
||||
|
||||
function fetch_row()
|
||||
{
|
||||
return mysql_fetch_row($this->q);
|
||||
}
|
||||
|
||||
function fetch_assoc()
|
||||
{
|
||||
return mysql_fetch_assoc($this->q);
|
||||
}
|
||||
|
||||
function rows()
|
||||
{
|
||||
if (!is_null($this -> rows)) return $this->rows;
|
||||
$this->rows = mysql_num_rows($this->q);
|
||||
return $this->rows;
|
||||
}
|
||||
}
|
||||
|
||||
class Database_Mysql
|
||||
{
|
||||
var $dbh;
|
||||
var $error_str;
|
||||
|
||||
function __construct()
|
||||
{
|
||||
}
|
||||
|
||||
function connect($host, $user, $pass, $db)
|
||||
{
|
||||
if(!$this->dbh = @mysql_connect($host,$user,$pass))
|
||||
{
|
||||
throw new Exception(mysql_error());
|
||||
}
|
||||
if( @!mysql_select_db($db, $this->dbh) )
|
||||
{
|
||||
throw new Exception($this->error());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function last_insert_id()
|
||||
{
|
||||
return mysql_insert_id($this->dbh);
|
||||
}
|
||||
|
||||
function error()
|
||||
{
|
||||
return mysql_error($this->dbh);
|
||||
}
|
||||
|
||||
function sq($query, $p = NULL)
|
||||
{
|
||||
$q = $this->_dq($query, $p);
|
||||
|
||||
if($q->rows()) $res = $q->fetch_row();
|
||||
else return NULL;
|
||||
|
||||
if(sizeof($res) > 1) return $res;
|
||||
else return $res[0];
|
||||
}
|
||||
|
||||
function sqa($query, $p = NULL)
|
||||
{
|
||||
$q = $this->_dq($query, $p);
|
||||
|
||||
if($q->rows()) $res = $q->fetch_assoc();
|
||||
else return NULL;
|
||||
|
||||
if(sizeof($res) > 1) return $res;
|
||||
else return $res[0];
|
||||
}
|
||||
|
||||
function dq($query, $p = NULL)
|
||||
{
|
||||
return $this->_dq($query, $p);
|
||||
}
|
||||
|
||||
function ex($query, $p = NULL)
|
||||
{
|
||||
return $this->_dq($query, $p, 1);
|
||||
}
|
||||
|
||||
private function _dq($query, $p = NULL, $resultless = 0)
|
||||
{
|
||||
if(!isset($p)) $p = array();
|
||||
elseif(!is_array($p)) $p = array($p);
|
||||
|
||||
$m = explode('?', $query);
|
||||
|
||||
if(sizeof($p)>0)
|
||||
{
|
||||
if(sizeof($m)< sizeof($p)+1) {
|
||||
throw new Exception("params to set MORE than query params");
|
||||
}
|
||||
if(sizeof($m)> sizeof($p)+1) {
|
||||
throw new Exception("params to set LESS than query params");
|
||||
}
|
||||
$query = "";
|
||||
for($i=0; $i<sizeof($m)-1; $i++) {
|
||||
$query .= $m[$i]. $this->quote($p[$i]);
|
||||
}
|
||||
$query .= $m[$i];
|
||||
}
|
||||
return new DatabaseResult_Mysql($query, $this, $resultless);
|
||||
}
|
||||
|
||||
function affected()
|
||||
{
|
||||
return mysql_affected_rows($this->dbh);
|
||||
}
|
||||
|
||||
function quote($s)
|
||||
{
|
||||
return '\''. addslashes($s). '\'';
|
||||
}
|
||||
|
||||
function quoteForLike($format, $s)
|
||||
{
|
||||
$s = str_replace(array('%','_'), array('\%','\_'), addslashes($s));
|
||||
return '\''. sprintf($format, $s). '\'';
|
||||
}
|
||||
|
||||
function table_exists($table)
|
||||
{
|
||||
$table = addslashes($table);
|
||||
$q = mysql_query("SELECT 1 FROM `$table` WHERE 1=0", $this->dbh);
|
||||
if($q === false) return false;
|
||||
else return true;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -1,159 +0,0 @@
|
|||
<?php
|
||||
|
||||
# Copyright 2009 Max Pozdeev
|
||||
|
||||
class DatabaseResult_Sqlite3
|
||||
{
|
||||
private $parent;
|
||||
private $q;
|
||||
var $query;
|
||||
var $prefix;
|
||||
|
||||
function __construct($query, &$h, $resultless = 0)
|
||||
{
|
||||
$this->parent = $h;
|
||||
$this->parent->lastQuery = $this->query = $query;
|
||||
|
||||
if($resultless)
|
||||
{
|
||||
$r = $this->parent->dbh->exec($query);
|
||||
if($r === false) {
|
||||
$ei = $this->parent->dbh->errorInfo();
|
||||
throw new Exception($ei[2]);
|
||||
}
|
||||
$this->parent->affected = $r;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->q = $this->parent->dbh->query($query);
|
||||
if(!$this->q) {
|
||||
$ei = $this->parent->dbh->errorInfo();
|
||||
throw new Exception($ei[2]);
|
||||
}
|
||||
$this->parent->affected = $this->q->rowCount();
|
||||
}
|
||||
}
|
||||
|
||||
function fetch_row()
|
||||
{
|
||||
return $this->q->fetch(PDO::FETCH_NUM);
|
||||
}
|
||||
|
||||
function fetch_assoc()
|
||||
{
|
||||
return $this->q->fetch(PDO::FETCH_ASSOC);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class Database_Sqlite3
|
||||
{
|
||||
var $dbh;
|
||||
var $affected = null;
|
||||
var $lastQuery;
|
||||
|
||||
function __construct()
|
||||
{
|
||||
}
|
||||
|
||||
function connect($filename)
|
||||
{
|
||||
try {
|
||||
$this->dbh = new PDO("sqlite:$filename");
|
||||
}
|
||||
catch(PDOException $e) {
|
||||
throw new Exception($e->getMessage());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function sq($query, $p = NULL)
|
||||
{
|
||||
$q = $this->_dq($query, $p);
|
||||
|
||||
$res = $q->fetch_row();
|
||||
if($res === false) return NULL;
|
||||
|
||||
if(sizeof($res) > 1) return $res;
|
||||
else return $res[0];
|
||||
}
|
||||
|
||||
function sqa($query, $p = NULL)
|
||||
{
|
||||
$q = $this->_dq($query, $p);
|
||||
|
||||
$res = $q->fetch_assoc();
|
||||
if($res === false) return NULL;
|
||||
|
||||
if(sizeof($res) > 1) return $res;
|
||||
else return $res[0];
|
||||
}
|
||||
|
||||
function dq($query, $p = NULL)
|
||||
{
|
||||
return $this->_dq($query, $p);
|
||||
}
|
||||
|
||||
/*
|
||||
for resultless queries like INSERT,UPDATE
|
||||
*/
|
||||
function ex($query, $p = NULL)
|
||||
{
|
||||
return $this->_dq($query, $p, 1);
|
||||
}
|
||||
|
||||
private function _dq($query, $p = NULL, $resultless = 0)
|
||||
{
|
||||
if(!isset($p)) $p = array();
|
||||
elseif(!is_array($p)) $p = array($p);
|
||||
|
||||
$m = explode('?', $query);
|
||||
|
||||
if(sizeof($p)>0)
|
||||
{
|
||||
if(sizeof($m)< sizeof($p)+1) {
|
||||
throw new Exception("params to set MORE than query params");
|
||||
}
|
||||
if(sizeof($m)> sizeof($p)+1) {
|
||||
throw new Exception("params to set LESS than query params");
|
||||
}
|
||||
$query = "";
|
||||
for($i=0; $i<sizeof($m)-1; $i++) {
|
||||
$query .= $m[$i]. $this->quote($p[$i]);
|
||||
}
|
||||
$query .= $m[$i];
|
||||
}
|
||||
return new DatabaseResult_Sqlite3($query, $this, $resultless);
|
||||
}
|
||||
|
||||
function affected()
|
||||
{
|
||||
return $this->affected;
|
||||
}
|
||||
|
||||
function quote($s)
|
||||
{
|
||||
return $this->dbh->quote($s);
|
||||
}
|
||||
|
||||
function quoteForLike($format, $s)
|
||||
{
|
||||
$s = str_replace(array('\\','%','_'), array('\\\\','\%','\_'), $s);
|
||||
return $this->dbh->quote(sprintf($format, $s)). " ESCAPE '\'";
|
||||
}
|
||||
|
||||
function last_insert_id()
|
||||
{
|
||||
return $this->dbh->lastInsertId();
|
||||
}
|
||||
|
||||
function table_exists($table)
|
||||
{
|
||||
$table = $this->dbh->quote($table);
|
||||
$q = $this->dbh->query("SELECT 1 FROM $table WHERE 1=0");
|
||||
if($q === false) return false;
|
||||
else return true;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
142
src/common.php
|
|
@ -1,142 +0,0 @@
|
|||
<?php
|
||||
|
||||
function htmlarray($a, $exclude=null)
|
||||
{
|
||||
htmlarray_ref($a, $exclude);
|
||||
return $a;
|
||||
}
|
||||
|
||||
function htmlarray_ref(&$a, $exclude=null)
|
||||
{
|
||||
if(!$a) return;
|
||||
if(!is_array($a)) {
|
||||
$a = htmlspecialchars($a);
|
||||
return;
|
||||
}
|
||||
reset($a);
|
||||
if($exclude && !is_array($exclude)) $exclude = array($exclude);
|
||||
foreach($a as $k=>$v)
|
||||
{
|
||||
if(is_array($v)) $a[$k] = htmlarray($v, $exclude);
|
||||
elseif(!$exclude) $a[$k] = htmlspecialchars($v);
|
||||
elseif(!in_array($k, $exclude)) $a[$k] = htmlspecialchars($v);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
function stop_gpc(&$arr)
|
||||
{
|
||||
if (!is_array($arr)) return 1;
|
||||
|
||||
if (!get_magic_quotes_gpc()) return 1;
|
||||
reset($arr);
|
||||
foreach($arr as $k=>$v)
|
||||
{
|
||||
if(is_array($arr[$k])) stop_gpc($arr[$k]);
|
||||
elseif(is_string($arr[$k])) $arr[$k] = stripslashes($v);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
function _post($param,$defvalue = '')
|
||||
{
|
||||
if(!isset($_POST[$param])) {
|
||||
return $defvalue;
|
||||
}
|
||||
else {
|
||||
return $_POST[$param];
|
||||
}
|
||||
}
|
||||
|
||||
function _get($param,$defvalue = '')
|
||||
{
|
||||
if(!isset($_GET[$param])) {
|
||||
return $defvalue;
|
||||
}
|
||||
else {
|
||||
return $_GET[$param];
|
||||
}
|
||||
}
|
||||
|
||||
class Config
|
||||
{
|
||||
public static $params = array(
|
||||
'db' => array('default'=>'sqlite', 'type'=>'s'),
|
||||
'mysql.host' => array('default'=>'localhost', 'type'=>'s'),
|
||||
'mysql.db' => array('default'=>'mytinytodo', 'type'=>'s'),
|
||||
'mysql.user' => array('default'=>'user', 'type'=>'s'),
|
||||
'mysql.password' => array('default'=>'', 'type'=>'s'),
|
||||
'prefix' => array('default'=>'', 'type'=>'s'),
|
||||
'title' => array('default'=>'', 'type'=>'s'),
|
||||
'lang' => array('default'=>'en', 'type'=>'s'),
|
||||
'password' => array('default'=>'', 'type'=>'s'),
|
||||
'smartsyntax' => array('default'=>1, 'type'=>'i'),
|
||||
'autotz' => array('default'=>1, 'type'=>'i'),
|
||||
'autotag' => array('default'=>1, 'type'=>'i'),
|
||||
'duedateformat' => array('default'=>1, 'type'=>'i'),
|
||||
'firstdayofweek' => array('default'=>1, 'type'=>'i'),
|
||||
'session' => array('default'=>'files', 'type'=>'s', 'options'=>array('files','default')),
|
||||
'clock' => array('default'=>24, 'type'=>'i', 'options'=>array(12,24)),
|
||||
'dateformat' => array('default'=>'j M Y', 'type'=>'s'),
|
||||
'dateformatshort' => array('default'=>'j M', 'type'=>'s'),
|
||||
);
|
||||
|
||||
public static $config;
|
||||
|
||||
public function loadConfig($config)
|
||||
{
|
||||
self::$config = $config;
|
||||
}
|
||||
|
||||
public static function get($key)
|
||||
{
|
||||
if(isset(self::$config[$key])) return self::$config[$key];
|
||||
elseif(isset(self::$params[$key])) return self::$params[$key]['default'];
|
||||
else return null;
|
||||
}
|
||||
|
||||
public static function set($key, $value)
|
||||
{
|
||||
self::$config[$key] = $value;
|
||||
}
|
||||
|
||||
public static function save()
|
||||
{
|
||||
$s = '';
|
||||
foreach(self::$params as $param=>$v)
|
||||
{
|
||||
if(!isset(self::$config[$param])) $val = $v['default'];
|
||||
elseif(isset($v['options']) && !in_array(self::$config[$param], $v['options'])) $val = $v['default'];
|
||||
else $val = self::$config[$param];
|
||||
if($v['type']=='i') {
|
||||
$s .= "\$config['$param'] = ".(int)$val.";\n";
|
||||
}
|
||||
else {
|
||||
$s .= "\$config['$param'] = '".str_replace(array("\\","'"),array("\\\\","\\'"),$val)."';\n";
|
||||
}
|
||||
}
|
||||
$f = fopen('./db/config.php', 'w');
|
||||
if($f === false) throw new Exception("Error while saving config file");
|
||||
fwrite($f, "<?php\n\$config = array();\n$s?>");
|
||||
fclose($f);
|
||||
}
|
||||
}
|
||||
|
||||
function formatDate3($format, $ay, $am, $ad, $lang)
|
||||
{
|
||||
# F - month long, M - month short
|
||||
# m - month 2-digit, n - month 1-digit
|
||||
# d - day 2-digit, j - day 1-digit
|
||||
$ml = $lang->get('months_long');
|
||||
$ms = $lang->get('months_short');
|
||||
$Y = $ay;
|
||||
$n = $am;
|
||||
$m = $n < 10 ? '0'.$n : $n;
|
||||
$F = $ml[$am-1];
|
||||
$M = $ms[$am-1];
|
||||
$j = $ad;
|
||||
$d = $j < 10 ? '0'.$j : $j;
|
||||
return strtr($format, array('Y'=>$Y, 'F'=>$F, 'M'=>$M, 'n'=>$n, 'm'=>$m, 'd'=>$d, 'j'=>$j));
|
||||
}
|
||||
|
||||
?>
|
||||
24
src/config-sample.php
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
Uncomment the line with MTT_DB_TYPE if you make clean install only.
|
||||
Leave it commented (with # at start) if you are upgrading from version before 1.7.
|
||||
Select the database type: sqlite or mysql or postgres.
|
||||
*/
|
||||
|
||||
#define("MTT_DB_TYPE", "sqlite");
|
||||
|
||||
define("MTT_DB_HOST", "localhost");
|
||||
|
||||
define("MTT_DB_NAME", "mytinytodo");
|
||||
|
||||
define("MTT_DB_USER", "mtt");
|
||||
|
||||
define("MTT_DB_PASSWORD", "mtt");
|
||||
|
||||
define("MTT_DB_PREFIX", "");
|
||||
|
||||
// set mysqli if needed
|
||||
define("MTT_DB_DRIVER", "");
|
||||
|
||||
define("MTT_SALT", "Put random text here");
|
||||
6
src/content/js/jquery-ui.min.js
vendored
Normal file
2
src/content/js/jquery.min.js
vendored
Normal file
310
src/content/js/jquery.ui.touch-punch.js
vendored
Normal file
|
|
@ -0,0 +1,310 @@
|
|||
/*!
|
||||
* jQuery UI Touch Punch 1.1.5 as modified by RWAP Software
|
||||
* based on original touchpunch v0.2.3 which has not been updated since 2014
|
||||
*
|
||||
* Updates by RWAP Software to take account of various suggested changes on the original code issues
|
||||
*
|
||||
* Original: https://github.com/furf/jquery-ui-touch-punch
|
||||
* Copyright 2011–2014, Dave Furfero
|
||||
* Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
*
|
||||
* Fork: https://github.com/RWAP/jquery-ui-touch-punch
|
||||
*
|
||||
* Modified by Max Pozdeev in 2022
|
||||
* - Added delay before mousedown dispatch
|
||||
*
|
||||
* Depends:
|
||||
* jquery.ui.widget.js
|
||||
* jquery.ui.mouse.js
|
||||
*/
|
||||
|
||||
(function( factory ) {
|
||||
if ( typeof define === "function" && define.amd ) {
|
||||
|
||||
// AMD. Register as an anonymous module.
|
||||
define([ "jquery", "jquery-ui" ], factory );
|
||||
} else {
|
||||
|
||||
// Browser globals
|
||||
factory( jQuery );
|
||||
}
|
||||
}(function ($) {
|
||||
|
||||
// Detect touch support - Windows Surface devices and other touch devices
|
||||
$.mspointer = window.navigator.msPointerEnabled;
|
||||
$.touch = ( 'ontouchstart' in document
|
||||
|| 'ontouchstart' in window
|
||||
|| window.TouchEvent
|
||||
|| (window.DocumentTouch && document instanceof DocumentTouch)
|
||||
|| navigator.maxTouchPoints > 0
|
||||
|| navigator.msMaxTouchPoints > 0
|
||||
);
|
||||
|
||||
// Ignore browsers without touch or mouse support
|
||||
if ((!$.touch && !$.mspointer) || !$.ui.mouse) {
|
||||
return;
|
||||
}
|
||||
|
||||
let mouseProto = $.ui.mouse.prototype,
|
||||
_mouseInit = mouseProto._mouseInit,
|
||||
_mouseDestroy = mouseProto._mouseDestroy,
|
||||
touchHandled, lastClickTime = 0;
|
||||
|
||||
let delay = 300,
|
||||
delayTimer,
|
||||
delayEvent,
|
||||
delayStarted = false,
|
||||
delayFinished = false,
|
||||
lastClickCoord;
|
||||
|
||||
|
||||
/**
|
||||
* Get the x,y position of a touch event
|
||||
* @param {Object} event A touch event
|
||||
*/
|
||||
function getTouchCoords (event) {
|
||||
return {
|
||||
x: event.originalEvent.changedTouches[0].pageX,
|
||||
y: event.originalEvent.changedTouches[0].pageY
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Simulate a mouse event based on a corresponding touch event
|
||||
* @param {Object} event A touch event
|
||||
* @param {String} simulatedType The corresponding mouse event
|
||||
*/
|
||||
function simulateMouseEvent (event, simulatedType) {
|
||||
|
||||
// Ignore multi-touch events
|
||||
if (event.originalEvent.touches.length > 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
//Ignore input or textarea elements so user can still enter text
|
||||
if ($(event.target).is("input") || $(event.target).is("textarea")) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Prevent "Ignored attempt to cancel a touchmove event with cancelable=false" errors
|
||||
if (event.cancelable) {
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
let touch = event.originalEvent.changedTouches[0],
|
||||
simulatedEvent = new MouseEvent(simulatedType, {
|
||||
bubbles: true,
|
||||
cancelable: true,
|
||||
view:window,
|
||||
screenX:touch.screenX,
|
||||
screenY:touch.screenY,
|
||||
clientX:touch.clientX,
|
||||
clientY:touch.clientY
|
||||
});
|
||||
|
||||
// Dispatch the simulated event to the target element
|
||||
event.target.dispatchEvent(simulatedEvent);
|
||||
}
|
||||
|
||||
function startDelayTimer (event) {
|
||||
clearTimeout(delayTimer);
|
||||
delayEvent = event;
|
||||
delayTimer = setTimeout(function() {
|
||||
fireMouseDown.call(this);
|
||||
}, delay);
|
||||
delayStarted = true;
|
||||
delayFinished = false;
|
||||
}
|
||||
|
||||
function fireMouseDown () {
|
||||
|
||||
const self = this;
|
||||
|
||||
delayFinished = true;
|
||||
|
||||
// Set the flag to prevent other widgets from inheriting the touch event
|
||||
touchHandled = true;
|
||||
|
||||
// Track movement to determine if interaction was a click
|
||||
self._touchMoved = false;
|
||||
|
||||
// Simulate the mouseover event
|
||||
simulateMouseEvent(delayEvent, 'mouseover');
|
||||
|
||||
// Simulate the mousemove event
|
||||
simulateMouseEvent(delayEvent, 'mousemove');
|
||||
|
||||
// Simulate the mousedown event
|
||||
simulateMouseEvent(delayEvent, 'mousedown');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Handle the jQuery UI widget's touchstart events
|
||||
* @param {Object} event The widget element's touchstart event
|
||||
*/
|
||||
mouseProto._touchStart = function (event) {
|
||||
|
||||
let self = this;
|
||||
|
||||
// Interaction time
|
||||
this._startedMove = event.timeStamp;
|
||||
|
||||
// Track movement to determine if interaction was a click
|
||||
self._startPos = getTouchCoords(event);
|
||||
|
||||
// Ignore the event if another widget is already being handled
|
||||
if (touchHandled || !self._mouseCapture(event.originalEvent.changedTouches[0])) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!delayStarted) {
|
||||
startDelayTimer.call(self, event);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Handle the jQuery UI widget's touchmove events
|
||||
* @param {Object} event The document's touchmove event
|
||||
*/
|
||||
mouseProto._touchMove = function (event) {
|
||||
|
||||
//
|
||||
if (!delayFinished) {
|
||||
delayStarted = false;
|
||||
clearTimeout(delayTimer);
|
||||
return;
|
||||
}
|
||||
|
||||
// Ignore event if not handled
|
||||
if (!touchHandled) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Interaction was moved
|
||||
this._touchMoved = true;
|
||||
|
||||
// Simulate the mousemove event
|
||||
simulateMouseEvent(event, 'mousemove');
|
||||
};
|
||||
|
||||
/**
|
||||
* Handle the jQuery UI widget's touchend events
|
||||
* @param {Object} event The document's touchend event
|
||||
*/
|
||||
mouseProto._touchEnd = function (event) {
|
||||
|
||||
//
|
||||
if (delayStarted) {
|
||||
clearTimeout(delayTimer);
|
||||
delayStarted = false;
|
||||
if (!delayFinished) {
|
||||
fireMouseDown();
|
||||
}
|
||||
}
|
||||
|
||||
// Ignore event if not handled
|
||||
if (!touchHandled) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Simulate the mouseup event
|
||||
simulateMouseEvent(event, 'mouseup');
|
||||
|
||||
// Simulate the mouseout event
|
||||
simulateMouseEvent(event, 'mouseout');
|
||||
|
||||
// If the touch interaction did not move, it should trigger a click
|
||||
// Check for this in two ways - length of time of simulation and distance moved
|
||||
// Allow for Apple Stylus to be used also
|
||||
let timeMoving = event.timeStamp - this._startedMove;
|
||||
if (!this._touchMoved || timeMoving < 500) {
|
||||
|
||||
// Simulate the dblclick event if last click was not far away from the previous one
|
||||
if ( event.timeStamp - lastClickTime < 400 &&
|
||||
Math.abs(lastClickCoord.x - this._startPos.x) < 10 && Math.abs(lastClickCoord.y - this._startPos.y) < 10) {
|
||||
simulateMouseEvent(event, 'dblclick');
|
||||
}
|
||||
// Simulate the click event
|
||||
else
|
||||
simulateMouseEvent(event, 'click');
|
||||
|
||||
lastClickTime = event.timeStamp
|
||||
lastClickCoord = this._startPos;
|
||||
}
|
||||
else {
|
||||
let endPos = getTouchCoords(event);
|
||||
if ((Math.abs(endPos.x - this._startPos.x) < 10) && (Math.abs(endPos.y - this._startPos.y) < 10)) {
|
||||
// If the touch interaction did not move, it should trigger a click
|
||||
if (!this._touchMoved || event.originalEvent.changedTouches[0].touchType === 'stylus') {
|
||||
// Simulate the click event
|
||||
simulateMouseEvent(event, 'click');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Unset the flag to determine the touch movement stopped
|
||||
this._touchMoved = false;
|
||||
|
||||
// Unset the flag to allow other widgets to inherit the touch event
|
||||
touchHandled = false;
|
||||
};
|
||||
|
||||
let _touchStartBound;
|
||||
let _touchMoveBound;
|
||||
let _touchEndBound
|
||||
|
||||
/**
|
||||
* A duck punch of the $.ui.mouse _mouseInit method to support touch events.
|
||||
* This method extends the widget with bound touch event handlers that
|
||||
* translate touch events to mouse events and pass them to the widget's
|
||||
* original mouse event handling methods.
|
||||
*/
|
||||
mouseProto._mouseInit = function () {
|
||||
|
||||
let self = this;
|
||||
|
||||
// Microsoft Surface Support = remove original touch Action
|
||||
if ($.mspointer) {
|
||||
self.element[0].style.msTouchAction = 'none';
|
||||
}
|
||||
|
||||
_touchStartBound = mouseProto._touchStart.bind(self);
|
||||
_touchMoveBound = mouseProto._touchMove.bind(self);
|
||||
_touchEndBound = mouseProto._touchEnd.bind(self);
|
||||
|
||||
// Delegate the touch handlers to the widget's element
|
||||
self.element.on({
|
||||
touchstart: _touchStartBound,
|
||||
touchmove: _touchMoveBound,
|
||||
touchend: _touchEndBound
|
||||
});
|
||||
|
||||
// Call the original $.ui.mouse init method
|
||||
_mouseInit.call(self);
|
||||
};
|
||||
|
||||
/**
|
||||
* Remove the touch event handlers
|
||||
*/
|
||||
mouseProto._mouseDestroy = function () {
|
||||
|
||||
let self = this;
|
||||
|
||||
// Delegate the touch handlers to the widget's element
|
||||
self.element.off({
|
||||
touchstart: _touchStartBound,
|
||||
touchmove: _touchMoveBound,
|
||||
touchend: _touchEndBound
|
||||
});
|
||||
|
||||
// Call the original $.ui.mouse destroy method
|
||||
_mouseDestroy.call(self);
|
||||
|
||||
//
|
||||
clearTimeout(delayTimer);
|
||||
delayEvent = null
|
||||
|
||||
};
|
||||
|
||||
}));
|
||||
3431
src/content/mytinytodo.js
Normal file
423
src/content/mytinytodo_api.js
Normal file
|
|
@ -0,0 +1,423 @@
|
|||
/*
|
||||
This file is a part of myTinyTodo.
|
||||
(C) Copyright 2010,2020-2025 Max Pozdeev <maxpozdeev@gmail.com>
|
||||
Licensed under the GNU GPL version 2 or any later. See file COPYRIGHT for details.
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* @class
|
||||
*/
|
||||
function MytinytodoAjaxApi(props)
|
||||
{
|
||||
if (typeof mytinytodo !== 'object') {
|
||||
throw "mytinytodo global object is not found!";
|
||||
}
|
||||
this.useREST = true;
|
||||
|
||||
if (props.hasOwnProperty('useREST')) {
|
||||
this.useREST = !!props.useREST;
|
||||
}
|
||||
}
|
||||
|
||||
MytinytodoAjaxApi.prototype = {
|
||||
|
||||
/**
|
||||
* required method
|
||||
* @param {string} action
|
||||
* @param {Object.<string, any>} [params]
|
||||
* @param {ApiDriverCallback} [callback]
|
||||
*
|
||||
* @callback ApiDriverCallback
|
||||
* @param {object} json
|
||||
*/
|
||||
request(action, params, callback) {
|
||||
if (typeof this[action] !== 'function') {
|
||||
throw "Unknown ApiDriver action: " + action;
|
||||
}
|
||||
this[action](params, function(json){
|
||||
if (json.denied) {
|
||||
mytinytodo.errorDenied();
|
||||
}
|
||||
if (callback) {
|
||||
callback.call(mytinytodo, json)
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
loadTasks(params, callback) {
|
||||
let q = '';
|
||||
if (params.search && params.search != '') q += '&s=' + encodeURIComponent(params.search);
|
||||
if (params.tag && params.tag != '') q += '&t=' + encodeURIComponent(params.tag);
|
||||
if (params.setCompl && params.setCompl != 0) q += '&setCompl=1';
|
||||
if (params.saveSort && params.saveSort != 0) q += '&saveSort=1';
|
||||
|
||||
$.getJSON(mytinytodo.apiUrl + 'tasks' + (mytinytodo.apiUrl.indexOf('?') > -1 ? '&' : '?') +
|
||||
'list='+params.list+'&compl='+params.compl+'&sort='+params.sort+q,
|
||||
callback);
|
||||
},
|
||||
|
||||
|
||||
newTask(params, callback) {
|
||||
$.ajax({
|
||||
url: mytinytodo.apiUrl + 'tasks',
|
||||
method: 'POST',
|
||||
contentType : 'application/json',
|
||||
data: JSON.stringify({
|
||||
action: 'newSimple',
|
||||
list: params.list,
|
||||
title: params.title,
|
||||
tag: params.tag,
|
||||
}),
|
||||
success: callback,
|
||||
dataType: 'json'
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
fullNewTask(params, callback) {
|
||||
$.ajax({
|
||||
url: mytinytodo.apiUrl + 'tasks',
|
||||
method: 'POST',
|
||||
contentType : 'application/json',
|
||||
data: JSON.stringify({
|
||||
action: 'newFull',
|
||||
list: params.list,
|
||||
title: params.title,
|
||||
note: params.note,
|
||||
prio: params.prio,
|
||||
tags: params.tags,
|
||||
duedate: params.duedate,
|
||||
/* tag: params.tag, // We do not send current tag filter, autotag should set it in the form and include in tags */
|
||||
}),
|
||||
success: callback,
|
||||
dataType: 'json'
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
editTask(params, callback) {
|
||||
$.ajax({
|
||||
url: mytinytodo.apiUrl + 'tasks/' + encodeURIComponent(params.id),
|
||||
method: this.useREST ? 'PUT' : 'POST',
|
||||
contentType : 'application/json',
|
||||
data: JSON.stringify({
|
||||
action: 'edit',
|
||||
title: params.title,
|
||||
note: params.note,
|
||||
prio: params.prio,
|
||||
tags: params.tags,
|
||||
duedate: params.duedate,
|
||||
}),
|
||||
success: callback,
|
||||
dataType: 'json'
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
editNote(params, callback) {
|
||||
$.ajax({
|
||||
url: mytinytodo.apiUrl + 'tasks/' + encodeURIComponent(params.id),
|
||||
method: this.useREST ? 'PUT' : 'POST',
|
||||
contentType : 'application/json',
|
||||
data: JSON.stringify({
|
||||
action: 'note',
|
||||
note: params.note
|
||||
}),
|
||||
success: callback,
|
||||
dataType: 'json'
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
completeTask(params, callback) {
|
||||
$.ajax({
|
||||
url: mytinytodo.apiUrl + 'tasks/' + encodeURIComponent(params.id),
|
||||
method: this.useREST ? 'PUT' : 'POST',
|
||||
contentType : 'application/json',
|
||||
data: JSON.stringify({
|
||||
action: 'complete',
|
||||
compl: params.compl
|
||||
}),
|
||||
success: callback,
|
||||
dataType: 'json'
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
deleteTask(params, callback) {
|
||||
$.ajax({
|
||||
url: mytinytodo.apiUrl + 'tasks/' + encodeURIComponent(params.id),
|
||||
method: this.useREST ? 'DELETE' : 'POST',
|
||||
contentType : 'application/json', // contentType and data are required if method is POST
|
||||
data: JSON.stringify({
|
||||
action: 'delete',
|
||||
}),
|
||||
success: callback,
|
||||
dataType: 'json'
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
setTaskPriority(params, callback) {
|
||||
$.ajax({
|
||||
url: mytinytodo.apiUrl + 'tasks/' + encodeURIComponent(params.id),
|
||||
method: this.useREST ? 'PUT' : 'POST',
|
||||
contentType : 'application/json',
|
||||
data: JSON.stringify({
|
||||
action: 'priority',
|
||||
prio: params.priority,
|
||||
}),
|
||||
success: callback,
|
||||
dataType: 'json'
|
||||
});
|
||||
},
|
||||
|
||||
changeOrder(params, callback) {
|
||||
$.ajax({
|
||||
url: mytinytodo.apiUrl + 'tasks',
|
||||
method: this.useREST ? 'PUT' : 'POST',
|
||||
contentType : 'application/json',
|
||||
data: JSON.stringify({
|
||||
action: 'order',
|
||||
order: params.order,
|
||||
}),
|
||||
success: callback,
|
||||
dataType: 'json'
|
||||
});
|
||||
},
|
||||
|
||||
suggestTags(params, callback) {
|
||||
$.getJSON(mytinytodo.apiUrl + 'suggestTags', {list:params.list, q:params.q}, callback);
|
||||
},
|
||||
|
||||
tagCloud(params, callback) {
|
||||
$.getJSON(mytinytodo.apiUrl + 'tagCloud/' + encodeURIComponent(params.list), callback);
|
||||
},
|
||||
|
||||
moveTask(params, callback) {
|
||||
$.ajax({
|
||||
url: mytinytodo.apiUrl + 'tasks/' + encodeURIComponent(params.id),
|
||||
method: this.useREST ? 'PUT' : 'POST',
|
||||
contentType : 'application/json',
|
||||
data: JSON.stringify({
|
||||
action: 'move',
|
||||
from: params.from,
|
||||
to: params.to
|
||||
}),
|
||||
success: callback,
|
||||
dataType: 'json'
|
||||
});
|
||||
},
|
||||
|
||||
parseTaskStr(params, callback) {
|
||||
$.ajax({
|
||||
url: mytinytodo.apiUrl + 'tasks/parseTitle',
|
||||
method: 'POST',
|
||||
contentType : 'application/json',
|
||||
data: JSON.stringify({
|
||||
list: params.list,
|
||||
title: params.title,
|
||||
tag: params.tag ,
|
||||
}),
|
||||
success: callback,
|
||||
dataType: 'json'
|
||||
});
|
||||
},
|
||||
|
||||
newTaskCounter(params, callback) {
|
||||
fetch(mytinytodo.apiUrl + 'tasks/newCounter', {
|
||||
method: 'POST',
|
||||
credentials: 'same-origin', // old browsers
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'MTT-Token': mytinytodo.options.token,
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
})
|
||||
.then((response) => {
|
||||
if (!response.ok) throw response;
|
||||
return response.json();
|
||||
})
|
||||
.catch((e) => {
|
||||
if (e instanceof Error) console.log("newTaskCounter fetch error: ", e);
|
||||
else console.log("newTaskCounter fetch error, HTTP status code: " + e.status);
|
||||
})
|
||||
.then(json => {
|
||||
callback(json)
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
// Lists
|
||||
loadLists(params, callback) {
|
||||
$.getJSON(mytinytodo.apiUrl + 'lists', callback);
|
||||
},
|
||||
|
||||
addList(params, callback) {
|
||||
$.ajax({
|
||||
url: mytinytodo.apiUrl + 'lists',
|
||||
method: 'POST',
|
||||
contentType : 'application/json',
|
||||
data: JSON.stringify({
|
||||
action: 'new',
|
||||
name: params.name,
|
||||
}),
|
||||
success: callback,
|
||||
dataType: 'json'
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
deleteList(params, callback) {
|
||||
$.ajax({
|
||||
url: mytinytodo.apiUrl + 'lists/' + encodeURIComponent(params.list),
|
||||
method: this.useREST ? 'DELETE' : 'POST',
|
||||
contentType : 'application/json', // contentType and data are required if method is POST
|
||||
data: JSON.stringify({
|
||||
action: 'delete',
|
||||
}),
|
||||
success: callback,
|
||||
dataType: 'json'
|
||||
});
|
||||
},
|
||||
|
||||
renameList(params, callback) {
|
||||
$.ajax({
|
||||
url: mytinytodo.apiUrl + 'lists/' + encodeURIComponent(params.list),
|
||||
method: this.useREST ? 'PUT' : 'POST',
|
||||
contentType : 'application/json',
|
||||
data: JSON.stringify({
|
||||
action: 'rename',
|
||||
name: params.name,
|
||||
}),
|
||||
success: callback,
|
||||
dataType: 'json'
|
||||
});
|
||||
},
|
||||
|
||||
setSort(params, callback) {
|
||||
$.ajax({
|
||||
url: mytinytodo.apiUrl + 'lists/' + encodeURIComponent(params.list),
|
||||
method: this.useREST ? 'PUT' : 'POST',
|
||||
contentType : 'application/json',
|
||||
data: JSON.stringify({
|
||||
action: 'sort',
|
||||
name: params.name,
|
||||
sort: params.sort
|
||||
}),
|
||||
success: callback,
|
||||
dataType: 'json'
|
||||
});
|
||||
},
|
||||
|
||||
publishList(params, callback) {
|
||||
$.ajax({
|
||||
url: mytinytodo.apiUrl + 'lists/' + encodeURIComponent(params.list),
|
||||
method: this.useREST ? 'PUT' : 'POST',
|
||||
contentType : 'application/json',
|
||||
data: JSON.stringify({
|
||||
action: 'publish',
|
||||
publish: params.publish,
|
||||
}),
|
||||
success: callback,
|
||||
dataType: 'json'
|
||||
});
|
||||
},
|
||||
|
||||
enableFeedKey(params, callback) {
|
||||
$.ajax({
|
||||
url: mytinytodo.apiUrl + 'lists/' + encodeURIComponent(params.list),
|
||||
method: this.useREST ? 'PUT' : 'POST',
|
||||
contentType : 'application/json',
|
||||
data: JSON.stringify({
|
||||
action: 'enableFeedKey',
|
||||
enable: params.enable,
|
||||
}),
|
||||
success: callback,
|
||||
dataType: 'json'
|
||||
});
|
||||
},
|
||||
|
||||
setShowNotesInList(params, callback) {
|
||||
$.ajax({
|
||||
url: mytinytodo.apiUrl + 'lists/' + encodeURIComponent(params.list),
|
||||
method: this.useREST ? 'PUT' : 'POST',
|
||||
contentType : 'application/json',
|
||||
data: JSON.stringify({
|
||||
action: 'showNotes',
|
||||
shownotes: params.shownotes,
|
||||
}),
|
||||
success: callback,
|
||||
dataType: 'json'
|
||||
});
|
||||
},
|
||||
|
||||
setHideList(params, callback) {
|
||||
$.ajax({
|
||||
url: mytinytodo.apiUrl + 'lists/' + encodeURIComponent(params.list),
|
||||
method: this.useREST ? 'PUT' : 'POST',
|
||||
contentType : 'application/json',
|
||||
data: JSON.stringify({
|
||||
action: 'hide',
|
||||
hide: params.hide,
|
||||
}),
|
||||
success: callback,
|
||||
dataType: 'json'
|
||||
});
|
||||
},
|
||||
|
||||
changeListOrder(params, callback) {
|
||||
$.ajax({
|
||||
url: mytinytodo.apiUrl + 'lists',
|
||||
method: this.useREST ? 'PUT' : 'POST',
|
||||
contentType : 'application/json',
|
||||
data: JSON.stringify({
|
||||
action: 'order',
|
||||
order: params.order
|
||||
}),
|
||||
success: callback,
|
||||
dataType: 'json'
|
||||
});
|
||||
},
|
||||
|
||||
clearCompletedInList(params, callback) {
|
||||
$.ajax({
|
||||
url: mytinytodo.apiUrl + 'lists/' + encodeURIComponent(params.list),
|
||||
method: this.useREST ? 'PUT' : 'POST',
|
||||
contentType : 'application/json',
|
||||
data: JSON.stringify({
|
||||
action: 'clearCompleted',
|
||||
}),
|
||||
success: callback,
|
||||
dataType: 'json'
|
||||
});
|
||||
},
|
||||
|
||||
/* Auth */
|
||||
|
||||
login(params, callback) {
|
||||
$.ajax({
|
||||
url: mytinytodo.apiUrl + 'login',
|
||||
method: 'POST',
|
||||
contentType : 'application/json',
|
||||
data: JSON.stringify({
|
||||
password: params.password,
|
||||
}),
|
||||
success: callback,
|
||||
dataType: 'json'
|
||||
});
|
||||
},
|
||||
|
||||
logout(params, callback) {
|
||||
$.ajax({
|
||||
url: mytinytodo.apiUrl + 'logout',
|
||||
method: 'POST',
|
||||
success: callback,
|
||||
dataType: 'json'
|
||||
});
|
||||
}
|
||||
|
||||
};
|
||||
99
src/content/theme/dark.css
Normal file
|
|
@ -0,0 +1,99 @@
|
|||
/*
|
||||
This file is a part of myTinyTodo.
|
||||
*/
|
||||
|
||||
|
||||
/* Dark mode */
|
||||
|
||||
/* prefers-color-scheme media query is used in html link tag */
|
||||
:root {
|
||||
|
||||
color-scheme: dark;
|
||||
|
||||
--color-bg: #151515;
|
||||
--color-text-default: #eee;
|
||||
--color-text-reduced: #e0e0e0;
|
||||
--color-text-reduced2: #999;
|
||||
--color-text-reduced3: #666;
|
||||
--color-link: #6495ED; /* CornflowerBlue */
|
||||
--color-btn-reduced: #999;
|
||||
--color-btn-reduced-hover: #ddd;
|
||||
--color-btn-default: #fff;
|
||||
--color-btn-hover: #444;
|
||||
--color-submit: #444;
|
||||
--color-submit-hover: #555;
|
||||
--color-row-underlinig: #303030;
|
||||
--color-border-default: #555;
|
||||
--color-border-focus: #5a8df0;
|
||||
--color-error: #ff3333;
|
||||
--color-error-bg: var(--color-bg);
|
||||
--color-info: #EFC300;
|
||||
--color-info-bg: var(--color-bg);
|
||||
--color-input-bg: #1e1e1e;
|
||||
|
||||
--color-toolbar: #3b3b3b;
|
||||
--color-btn-toolbar-hover: #555;
|
||||
--color-content-delimiter: #676767;
|
||||
--color-footer: var(--color-bg);
|
||||
|
||||
/* Tabs */
|
||||
--color-tab: #1b1b1b;
|
||||
--color-tab-selected: var(--color-toolbar);
|
||||
--color-tab-hover: #262626;
|
||||
--color-tab-border: #676767;
|
||||
--color-tab-text: #ddd;
|
||||
--color-btn-tab: #ccc;
|
||||
--color-btn-tab-hover: #fff;
|
||||
--color-btn-tab-hover-bg: #5a5a5a;
|
||||
|
||||
/* Menu */
|
||||
--color-menu: #252525;
|
||||
--color-menu-border: #555;
|
||||
--color-menu-hover: #5a8df0;
|
||||
--color-menu-text: #eaeaea;
|
||||
--color-menu-text-hover: #ebf0f8;
|
||||
--color-menu-text-disabled: #696969;
|
||||
--color-popup-shadow: 1px 2px 6px 1px rgba(85,85,85,0.1);
|
||||
|
||||
/* Tasklist */
|
||||
--color-tasklist-row: var(--color-bg);
|
||||
--color-tasklist-row-border: var(--color-row-underlinig);
|
||||
--color-tasklist-row-inter-border: var(--color-tasklist-row-border);
|
||||
--color-tasklist-row-expanded-border: #555;
|
||||
--color-tasklist-tag: var(--color-tab-text);
|
||||
--color-tasklist-note-link: #999;
|
||||
--color-tasklist-link-hover: var(--color-link);
|
||||
--color-tasklisk-hover-shadow: rgba(255,255,255,0.4);
|
||||
--color-taglist-tag: var(--color-text-reduced);
|
||||
--color-taglist-tag-bg: #444;
|
||||
--color-taglist-tag-hover: var(--color-taglist-tag);
|
||||
--color-taglist-tag-hover-bg: var(--color-taglist-tag-bg);
|
||||
--color-tasklist-listname: #bbb;
|
||||
--color-tasklist-listname-bg: #333;
|
||||
|
||||
|
||||
/* Priority */
|
||||
--color-priority-none: #676767;
|
||||
--color-priority-text: var(--color-text-default);
|
||||
|
||||
/* DueDates */
|
||||
--color-duedate-default: var(--color-tab-text);
|
||||
--color-duedate-soon: #008000;
|
||||
--color-duedate-today: #FF0000;
|
||||
--color-duedate-past: #B52D2D;
|
||||
|
||||
/* Markdown */
|
||||
--color-md-border: #333;
|
||||
--color-md-bg-highlighted: #222;
|
||||
--color-md-text-blockquote: #777;
|
||||
|
||||
/* Settings */
|
||||
--color-settings-row: #222;
|
||||
|
||||
/* */
|
||||
--color-placeholder: #444;
|
||||
--color-placeholder-border: #555;
|
||||
|
||||
--svg-select: var(--svg-select-dark);
|
||||
|
||||
}
|
||||
6
src/content/theme/images/COPYRIGHT
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
rss.svg, rss-disabled.svg - are (or based on) icons by Icons8 from https://icons8.com/icon/13841/rss
|
||||
calendar.svg - icon by Icons8 from https://icons8.com/icon/__LA9wZgJaqd/calendar
|
||||
loading48.gif - generated at Preloaders.net
|
||||
|
||||
Other images in this directory were made by Max Pozdeev the author of myTinyTodo
|
||||
and licensed under the terms of GNU GPL version 2 or any later.
|
||||
4
src/content/theme/images/add.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
||||
<polyline points="15 4, 15 9, 2 9" stroke-width="1.5" stroke="#000" fill="none" />
|
||||
<polyline points="6 5, 1 9, 6 13" stroke-width="1.5" stroke="#000" fill="none" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 237 B |
3
src/content/theme/images/arr-left.svg
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
||||
<polygon points="10 3, 4 8, 10 13" fill="#000"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 118 B |
3
src/content/theme/images/arr-right.svg
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
||||
<polygon points="6 3, 12 8, 6 13" fill="#000"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 117 B |
3
src/content/theme/images/arrdown2.svg
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 8 8">
|
||||
<polygon points="0 2, 8 2, 4 6" fill="black"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 115 B |
4
src/content/theme/images/back.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14">
|
||||
<!--<rect x="0" y="0" width="14" height="14" fill="lightpink"/>-->
|
||||
<polyline points="9 2, 4 7, 9 12" stroke-width="1.5" stroke="#000" fill="none" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 217 B |
7
src/content/theme/images/calendar.svg
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
||||
<path fill="#fff" d="M0.5 1.5H15.5V14.5H0.5z"/>
|
||||
<path fill="#788b9c" d="M15,2v12H1V2H15 M16,1H0v14h16V1L16,1z"/>
|
||||
<path fill="#f78f8f" d="M0.5 1.5H15.5V4.5H0.5z"/>
|
||||
<path fill="#c74343" d="M15,2v2H1V2H15 M16,1H0v4h16V1L16,1z"/>
|
||||
<path fill="#c5d4de" d="M5 7H6V8H5zM7 7H8V8H7zM9 7H10V8H9zM11 7H12V8H11zM3 9H4V10H3zM5 9H6V10H5zM7 9H8V10H7zM9 9H10V10H9zM11 9H12V10H11zM3 11H4V12H3zM5 11H6V12H5zM7 11H8V12H7zM9 11H10V12H9z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 491 B |
3
src/content/theme/images/checkmark.svg
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
||||
<polyline points="4 8, 7 12, 13 5" fill="none" stroke-width="2" stroke="#000" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 149 B |
6
src/content/theme/images/closetag.svg
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
||||
<g stroke-width="1.5" fill="none">
|
||||
<path d="M12.0 12.0l-8-8" stroke="#000"/>
|
||||
<path d="M4.0 12.0l+8-8" stroke="#000"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 190 B |
BIN
src/content/theme/images/loading48.gif
Normal file
|
After Width: | Height: | Size: 6.8 KiB |
BIN
src/content/theme/images/logo-loading.gif
Executable file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
src/content/theme/images/logo.gif
Normal file
|
After Width: | Height: | Size: 394 B |
7
src/content/theme/images/newtask-ext.svg
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" >
|
||||
<g stroke="#000" fill="none" stroke-width="1.0">
|
||||
<polyline points="10 0.5, 0.5 0.5, 0.5 15.5, 13.5 15.5, 13.5 7.5" stroke-linejoin="round"/>
|
||||
<polyline points="7 7, 6 10, 9 9, 15 3, 13 1, 7 7, 6 10" />
|
||||
<line x1="7" y1="7" x2="9" y2="9" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 318 B |
4
src/content/theme/images/note-toggle.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14">
|
||||
<!--<rect x="0" y="0" width="14" height="14" fill="lightpink"/>-->
|
||||
<polyline points="5 2, 10 7, 5 12" stroke-width="1.5" stroke="#000" fill="none" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 217 B |
4
src/content/theme/images/plus.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
||||
<line x1="2" y1="8" x2="14" y2="8" stroke-width="1.5" stroke="#000" />
|
||||
<line x1="8" y1="2" x2="8" y2="14" stroke-width="1.5" stroke="#000" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 211 B |
14
src/content/theme/images/rss-disabled.svg
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 8 8">
|
||||
<title>RSS feed icon</title>
|
||||
<style type="text/css">
|
||||
.button {stroke: none; fill: #bbb;}
|
||||
.symbol {stroke: none; fill: white;}
|
||||
</style>
|
||||
|
||||
<rect class="button" width="8" height="8" rx="1.5" />
|
||||
<circle class="symbol" cx="2" cy="6" r="1" />
|
||||
<path class="symbol" d="m 1,4 a 3,3 0 0 1 3,3 h 1 a 4,4 0 0 0 -4,-4 z" />
|
||||
<path class="symbol" d="m 1,2 a 5,5 0 0 1 5,5 h 1 a 6,6 0 0 0 -6,-6 z" />
|
||||
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 517 B |
14
src/content/theme/images/rss.svg
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 8 8">
|
||||
<title>RSS feed icon</title>
|
||||
<style type="text/css">
|
||||
.button {stroke: none; fill: orange;}
|
||||
.symbol {stroke: none; fill: white;}
|
||||
</style>
|
||||
|
||||
<rect class="button" width="8" height="8" rx="1.5" />
|
||||
<circle class="symbol" cx="2" cy="6" r="1" />
|
||||
<path class="symbol" d="m 1,4 a 3,3 0 0 1 3,3 h 1 a 4,4 0 0 0 -4,-4 z" />
|
||||
<path class="symbol" d="m 1,2 a 5,5 0 0 1 5,5 h 1 a 6,6 0 0 0 -6,-6 z" />
|
||||
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 519 B |
10
src/content/theme/images/search-cancel.svg
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
||||
<path d="m8 1a7 7 0 0 0-7 7 7 7 0 0 0 7 7 7 7 0 0 0 7-7 7 7 0 0 0-7-7zm-2.4688 3.4688 2.4688 2.4688 2.4688-2.4688 1.0625 1.0625-2.4688 2.4688 2.4688 2.4688-1.0625 1.0625-2.4688-2.4688-2.4688 2.4688-1.0625-1.0625 2.4688-2.4688-2.4688-2.4688 1.0625-1.0625z" fill="#000"/>
|
||||
</svg>
|
||||
<!-- source:
|
||||
<g stroke-width="1.5" fill="none">
|
||||
<circle cx="8" cy="8" r="7" fill="#000"/>
|
||||
<path d="M11.0 11.0l-6-6" stroke="#ffffff"/>
|
||||
<path d="M5.0 11.0l+6-6" stroke="#ffffff"/>
|
||||
</g>
|
||||
-->
|
||||
|
After Width: | Height: | Size: 528 B |
6
src/content/theme/images/search.svg
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
||||
<g stroke-width="1.5" stroke="#000" fill="none">
|
||||
<path d="M14 14l-4-4"/>
|
||||
<circle cx="7" cy="7" r="4.5"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 177 B |
3
src/content/theme/images/select-dark.svg
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14">
|
||||
<polyline points="2 6, 7 11, 12 6" stroke-width="2" stroke="#aaa" fill="none"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 148 B |
3
src/content/theme/images/select.svg
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14">
|
||||
<polyline points="2 6, 7 11, 12 6" stroke-width="2" stroke="#444" fill="none"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 148 B |
5
src/content/theme/images/selectlist.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
||||
<circle cx="3" cy="8" r="1.5" fill="#333"/>
|
||||
<circle cx="8" cy="8" r="1.5" fill="#333"/>
|
||||
<circle cx="13" cy="8" r="1.5" fill="#333"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 200 B |
7
src/content/theme/images/selectlist2.svg
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
||||
<g fill="none" stroke-width="1.5" stroke="#000" stroke-linecap="round">
|
||||
<line x1="2" y1="3" x2="14" y2="3"/>
|
||||
<line x1="2" y1="8" x2="14" y2="8"/>
|
||||
<line x1="4" y1="13" x2="14" y2="13"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 260 B |
62
src/content/theme/images/svg2base64.php
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
This file is a part of myTinyTodo.
|
||||
(C) Copyright 2023 Max Pozdeev <maxpozdeev@gmail.com>
|
||||
Licensed under the GNU GPL version 2 or any later. See file COPYRIGHT for details.
|
||||
*/
|
||||
|
||||
// call like: php -f svg2base64.php > ../images.css
|
||||
|
||||
if (php_sapi_name() != 'cli') {
|
||||
error_log("Supports cli only");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
if (isset($argv[1])) {
|
||||
print base64file($argv[1]);
|
||||
exit();
|
||||
}
|
||||
|
||||
$files = [];
|
||||
$h = opendir(__DIR__);
|
||||
while ( false !== ($file = readdir($h)) )
|
||||
{
|
||||
if ( preg_match('/(.+)\.svg$/', $file, $m) ) {
|
||||
$files[] = $m[1];
|
||||
}
|
||||
}
|
||||
closedir($h);
|
||||
|
||||
if (!$files) {
|
||||
exit;
|
||||
}
|
||||
sort($files);
|
||||
|
||||
print ":root {\n";
|
||||
foreach ($files as $name) {
|
||||
$b64 = base64file(__DIR__. "/$name.svg");
|
||||
print " --svg-{$name}: url('data:image/svg+xml;base64,$b64');\n";
|
||||
}
|
||||
print "}\n";
|
||||
|
||||
function base64file(string $filename): string
|
||||
{
|
||||
$content = file_get_contents($filename);
|
||||
//$content = str_replace(["\n","\r\n"], ['',''], $content);
|
||||
$content = cleanXml($content);
|
||||
return base64_encode($content);
|
||||
}
|
||||
|
||||
function cleanXml(string $data): string
|
||||
{
|
||||
$dom = new DOMDocument;
|
||||
$dom->preserveWhiteSpace = false;
|
||||
$dom->loadXML($data);
|
||||
|
||||
$xpath = new DOMXPath($dom);
|
||||
foreach ($xpath->query('//comment()') as $comment) {
|
||||
$comment->parentNode->removeChild($comment);
|
||||
}
|
||||
return $dom->saveXML();
|
||||
}
|
||||
4
src/content/theme/images/task-menu.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14">
|
||||
<!--<rect x="0" y="0" width="14" height="14" fill="lightpink"/>-->
|
||||
<polyline points="2 6, 7 11, 12 6" stroke-width="2" stroke="#000" fill="none" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 216 B |
8
src/content/theme/images/task-menu2.svg
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14">
|
||||
<!--<rect x="0" y="0" width="14" height="14" fill="lightpink"/>-->
|
||||
<g fill="#000">
|
||||
<circle cx="7" cy="2" r="1.5" />
|
||||
<circle cx="7" cy="7" r="1.5" />
|
||||
<circle cx="7" cy="12" r="1.5" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 259 B |
0
src/content/theme/index.html
Normal file
123
src/content/theme/markdown.css
Normal file
|
|
@ -0,0 +1,123 @@
|
|||
/* Markdown notes */
|
||||
|
||||
.markdown-note {
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.markdown-note > *:first-child { margin-top: 0 !important; }
|
||||
.markdown-note > *:last-child { margin-bottom: 0 !important; }
|
||||
|
||||
.markdown-note h1 { font-size:2rem; }
|
||||
.markdown-note h2 { font-size:1.5rem; }
|
||||
.markdown-note h3 { font-size:1.2rem; }
|
||||
.markdown-note h4 { font-size:1rem; }
|
||||
.markdown-note h5 { font-size:1rem; }
|
||||
.markdown-note h6 { font-size:1rem; }
|
||||
|
||||
.markdown-note hr {
|
||||
height: 1px;
|
||||
border: 0;
|
||||
background-color: var(--color-border-default);
|
||||
}
|
||||
|
||||
.markdown-note p,
|
||||
.markdown-note blockquote,
|
||||
.markdown-note ul,
|
||||
.markdown-note ol,
|
||||
.markdown-note dl,
|
||||
.markdown-note table,
|
||||
.markdown-note pre {
|
||||
margin: 12px 0;
|
||||
}
|
||||
.markdown-note ul,
|
||||
.markdown-note ol {
|
||||
padding-left: 2.3rem;
|
||||
}
|
||||
.markdown-note ul.no-list,
|
||||
.markdown-note ol.no-list {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.markdown-note blockquote {
|
||||
margin:15px 0;
|
||||
border-left: 4px solid var(--color-md-border);
|
||||
padding: 0 15px;
|
||||
color: var(--color-md-text-blockquote, #777);
|
||||
}
|
||||
.markdown-note blockquote > :first-child {
|
||||
margin-top: 0px;
|
||||
}
|
||||
.markdown-note blockquote > :last-child {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.markdown-note table {
|
||||
width: 100%;
|
||||
overflow: auto;
|
||||
display: block;
|
||||
border-spacing: 0;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
.markdown-note table th {
|
||||
font-weight: bold;
|
||||
}
|
||||
.markdown-note table th,
|
||||
.markdown-note table td {
|
||||
border: 1px solid var(--color-md-border);
|
||||
padding: 6px 13px;
|
||||
}
|
||||
.markdown-note table tr {
|
||||
border-top: 1px solid var(--color-border-default);
|
||||
background-color: var(--color-tasklist-row);
|
||||
}
|
||||
.markdown-note table tr:nth-child(2n) {
|
||||
background-color: var(--color-md-bg-highlighted);
|
||||
}
|
||||
|
||||
|
||||
.markdown-note code, /* inline code */
|
||||
.markdown-note tt {
|
||||
font-size: 13px; /* if main font is 14px */
|
||||
font-family: ui-monospace,Consolas,"SF Mono",Menlo,"Noto Sans Mono","Liberation Mono",monospace;
|
||||
padding: 0px 5px;
|
||||
background-color: var(--color-md-bg-highlighted);
|
||||
border-radius: 3px;
|
||||
}
|
||||
.markdown-note code {
|
||||
white-space: break-spaces;
|
||||
}
|
||||
.markdown-note pre {
|
||||
font-size: 13px;
|
||||
font-family: ui-monospace,Consolas,"SF Mono",Menlo,"Noto Sans Mono","Liberation Mono",monospace;
|
||||
line-height: 1.2rem;
|
||||
padding: 10px;
|
||||
background-color: var(--color-md-bg-highlighted);
|
||||
overflow: auto;
|
||||
border-radius: 3px;
|
||||
}
|
||||
.markdown-note pre code, /* block of code */
|
||||
.markdown-note pre tt {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
}
|
||||
.markdown-note pre > code {
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
.markdown-note img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
|
||||
/* narrow screens */
|
||||
@media only screen and (max-width: 600px) {
|
||||
|
||||
.markdown-note pre,
|
||||
.markdown-note code,
|
||||
.markdown-note tt {
|
||||
font-size: 14px; /* if main font is 16px */
|
||||
}
|
||||
}
|
||||
57
src/content/theme/print.css
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
@media print {
|
||||
|
||||
html,body { height:auto; }
|
||||
h2 { display: none; }
|
||||
h3 { border-bottom:2px solid #777777; }
|
||||
#toolbar { display: none; }
|
||||
|
||||
.topblock { display:none; }
|
||||
.mtt-tab { display:none; }
|
||||
.mtt-tab.mtt-tab-selected { display:block; border:none; background:none; margin:0; }
|
||||
.mtt-tab.mtt-tab-selected a { padding:0; display:inline-block; height:auto; }
|
||||
.mtt-tab.mtt-tab-selected .title-block { display:inline-block; }
|
||||
.mtt-tab.mtt-tab-selected .list-action { display:none; }
|
||||
.mtt-tab.mtt-tab-selected .title { text-align:left; padding:0; margin:0; max-width:none; font-size:1.3rem; color:#000; }
|
||||
|
||||
.mtt-tabs-new-button { display:none; }
|
||||
#tabs_buttons { display:none; }
|
||||
#taskview { padding-left:0; font-weight:normal; }
|
||||
#taskview .arrdown { display:none; }
|
||||
|
||||
#tasklist { list-style-type: decimal; list-style-position: outside; }
|
||||
#tasklist li.task-row {
|
||||
border-bottom:none;
|
||||
margin-left:2.5rem;
|
||||
/*border-bottom:1px solid #f0f0f0;*/
|
||||
border: none;
|
||||
}
|
||||
#tasklist li.task-row:hover { box-shadow: none; }
|
||||
#tasklist li.task-row.task-has-note.task-expanded .task-block,
|
||||
#tasklist li.task-row.task-has-note.clicked .task-block,
|
||||
#tasklist li.task-row.task-expanded { border: none; }
|
||||
|
||||
div.task-note-block {
|
||||
border-left:1px solid #777777;
|
||||
padding-left:10px;
|
||||
margin-left:3px;
|
||||
padding-top:0px;
|
||||
font-size:9pt;
|
||||
color:#333333;
|
||||
}
|
||||
.task-middle { margin-left:0px; margin-right:3px; }
|
||||
.task-left { display:none; }
|
||||
.task-actions { display:none; }
|
||||
.task-date { white-space:nowrap; margin-left:10px; }
|
||||
#tasklist li.today, #tasklist li.past { background-color:#ffffff; border-color:#dedede; }
|
||||
.task-prio { font-weight:bold; }
|
||||
|
||||
li.task-completed { opacity:1; }
|
||||
|
||||
#footer_content { border-top:1px solid #777777; background:none; }
|
||||
#footer_content a { text-decoration:none; color:#000000; }
|
||||
|
||||
#tagcloudbtn { display:none; }
|
||||
.mtt-notes-showhide { display:none; }
|
||||
#taskview img { display:none; }
|
||||
|
||||
}
|
||||
1531
src/content/theme/style.css
Normal file
47
src/content/theme/style_rtl.css
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
body { direction:rtl; }
|
||||
.topblock h2 {
|
||||
background-position: right;
|
||||
padding-left: 10px;
|
||||
padding-right: 30px;
|
||||
}
|
||||
#loading { margin-left:6px; margin-right:0px; }
|
||||
.bar-menu { text-align: left; }
|
||||
.bar-menu > * {
|
||||
margin-right: 10px;
|
||||
margin-left: unset;
|
||||
}
|
||||
|
||||
.mtt-tab { margin-left:3px; margin-right:0px; border-top-right-radius:0px; border-top-left-radius:8px; }
|
||||
.mtt-tabs-new-button { border-top-right-radius:0px; border-top-left-radius:8px; }
|
||||
.mtt-tabs-select-button>span { transform:rotateY(180deg); }
|
||||
|
||||
#task { padding-left:20px; padding-right:4px; }
|
||||
.mtt-taskbox-icon { left:2px; right:auto; transform:rotateY(180deg); }
|
||||
#newtask_adv { margin-left:0; margin-right:0.5rem; transform:rotateY(180deg); }
|
||||
.mtt-searchbox-icon.mtt-icon-search { right:4px; left:auto; }
|
||||
.mtt-searchbox-icon.mtt-icon-cancelsearch { left:4px; right:auto; }
|
||||
|
||||
#tagcloudbtn { margin-left:0; margin-right:auto; }
|
||||
|
||||
.task-toggle { margin-left:2px; margin-right:0; transform:rotate(180deg); }
|
||||
.task-middle { margin-left:0; margin-right:5px; }
|
||||
.task-actions { margin-left:0; margin-right:5px; }
|
||||
|
||||
.task-prio, .task-title, .task-date, .task-tags { display:inline-block; } /* TODO: fix this */
|
||||
|
||||
.task-prio { margin-left:5px; margin-right:0; }
|
||||
.task-note-block { margin-left:0; margin-right:2px; padding-left:0; padding-right:19px; background-position:right 0px;}
|
||||
.task-date { margin-left:0; margin-right:4px; }
|
||||
.duedate { margin-left:0; margin-right:5px; }
|
||||
.duedate-arrow { display:none; }
|
||||
.duedate:before { content:'\20\2190\20'; }
|
||||
|
||||
#tagcloud { box-shadow:-1px 2px 5px rgba(0,0,0,0.5); }
|
||||
|
||||
h3.page-title a.mtt-back-button { transform:rotate(180deg); }
|
||||
.form-row-short { margin-left:12px; margin-right:0; }
|
||||
.alltags-cell { padding-left:0; padding-right:5px; }
|
||||
|
||||
.mtt-menu-container { box-shadow:-1px 2px 5px rgba(0,0,0,0.5); }
|
||||
.mtt-menu-container .menu-icon { left:auto; right:6px; }
|
||||
li.mtt-menu-indicator .submenu-icon { left:6px; right:auto; transform:rotate(180deg); }
|
||||
|
|
@ -1,48 +0,0 @@
|
|||
<?php
|
||||
|
||||
# Configuration goes here
|
||||
$config = array();
|
||||
|
||||
# Database type: sqlite or mysql
|
||||
$config['db'] = 'sqlite';
|
||||
|
||||
# Specify these settings if you selected above to use Mysql
|
||||
$config['mysql.host'] = "localhost";
|
||||
$config['mysql.db'] = "mytinytodo";
|
||||
$config['mysql.user'] = "user";
|
||||
$config['mysql.password'] = "";
|
||||
|
||||
# Tables prefix
|
||||
$config['prefix'] = "mtt_";
|
||||
|
||||
# Language pack
|
||||
$config['lang'] = "en";
|
||||
|
||||
# Specify password here to protect your tasks from modification,
|
||||
# or leave empty that everyone could read/write todolist
|
||||
$config['password'] = "";
|
||||
|
||||
# To disable smart syntax uncomment the line below
|
||||
#$config['smartsyntax'] = 0;
|
||||
|
||||
# To disable auto detecting user time zone uncomment the line below
|
||||
#$config['autotz'] = 0;
|
||||
|
||||
# To disable auto adding selected tag comment out the line below or set value to 0
|
||||
$config['autotag'] = 1;
|
||||
|
||||
# duedate calendar format: 1 => y-m-d (default), 2 => m/d/y, 3 => d.m.y
|
||||
$config['duedateformat'] = 1;
|
||||
|
||||
# First day of week: 0-Sunday, 1-Monday, 2-Tuesday, .. 6-Saturday
|
||||
$config['firstdayofweek'] = 1;
|
||||
|
||||
# select session handling mechanism: files or default (php default)
|
||||
$config['session'] = 'files';
|
||||
|
||||
# Date/time formats
|
||||
$config['clock'] = 24;
|
||||
$config['dateformat'] = 'j M Y';
|
||||
$config['dateformatshort'] = 'j M';
|
||||
|
||||
?>
|
||||
23
src/docker-config.php
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
// Rename it to config.php before using in docker.
|
||||
|
||||
if (getenv('MTT_DB_TYPE') == 'mysql' || getenv('MTT_DB_TYPE') == 'postgres') {
|
||||
define("MTT_DB_TYPE", getenv('MTT_DB_TYPE'));
|
||||
define("MTT_DB_HOST", getenv('MTT_DB_HOST') ?: "undefined_host");
|
||||
define("MTT_DB_NAME", getenv('MTT_DB_NAME') ?: "undefined_db");
|
||||
define("MTT_DB_USER", getenv('MTT_DB_USER') ?: "undefined_user");
|
||||
define("MTT_DB_PASSWORD", getenv('MTT_DB_PASSWORD') ?: "");
|
||||
define("MTT_DB_PREFIX", getenv('MTT_DB_PREFIX') ?: "mtt_");
|
||||
define("MTT_DB_DRIVER", getenv('MTT_DB_DRIVER') ?: "");
|
||||
}
|
||||
else if (getenv('MTT_DB_TYPE') == 'sqlite') {
|
||||
define("MTT_DB_TYPE", "sqlite");
|
||||
define("MTT_DB_PREFIX", "");
|
||||
}
|
||||
|
||||
define("MTT_SALT", "Put Random Text Here");
|
||||
//define("MTT_DISABLE_EXT", 1);
|
||||
if (getenv('MTT_API_USE_PATH_INFO')) {
|
||||
define("MTT_API_USE_PATH_INFO", 1);
|
||||
}
|
||||
150
src/export.php
Normal file
|
|
@ -0,0 +1,150 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
This file is a part of myTinyTodo.
|
||||
(C) Copyright 2010-2011,2019-2021 Max Pozdeev <maxpozdeev@gmail.com>
|
||||
Licensed under the GNU GPL version 2 or any later. See file COPYRIGHT for details.
|
||||
*/
|
||||
|
||||
//$dontStartSession = 1;
|
||||
require_once('./init.php');
|
||||
|
||||
$listId = (int)_get('list');
|
||||
$db = DBConnection::instance();
|
||||
$listData = $db->sqa("SELECT * FROM {$db->prefix}lists WHERE id=$listId");
|
||||
if ( $listData && !is_logged() && !$listData['published'] ) {
|
||||
$extra = json_decode($listData['extra'] ?? '', true, 10, JSON_INVALID_UTF8_SUBSTITUTE);
|
||||
$feedKey = (string) ($extra['feedKey'] ?? '');
|
||||
$inFeedKey = trim(_get('key'));
|
||||
if ($feedKey == '' || $feedKey != $inFeedKey) {
|
||||
die("Access denied.");
|
||||
}
|
||||
}
|
||||
if (!$listData) {
|
||||
die("No list found.");
|
||||
}
|
||||
|
||||
$data = DBCore::default()->getTasksByListId($listId, '', (int)$listData['sorting']);
|
||||
|
||||
if (_get('format') == 'ical') {
|
||||
printICal($listData, $data);
|
||||
}
|
||||
else {
|
||||
printCSV($listData, $data);
|
||||
}
|
||||
|
||||
|
||||
function printCSV(array $listData, array $data)
|
||||
{
|
||||
$s = "\xEF\xBB\xBF". "Completed;Priority;Task;Notes;Tags;Due;DateCreated;DateCompleted\n";
|
||||
foreach($data as $r)
|
||||
{
|
||||
$s .= ($r['compl']?'1':'0'). ';'.
|
||||
$r['prio']. ';'. escape_csv($r['title'] ?? ''). ';'.
|
||||
escape_csv($r['note'] ?? ''). ';'.
|
||||
escape_csv($r['tags'] ?? ''). ';'.
|
||||
$r['duedate']. ';'.
|
||||
date('Y-m-d H:i:s O',$r['d_created']). ';'.
|
||||
($r['d_completed'] ? date('Y-m-d H:i:s O',$r['d_completed']) :''). "\n";
|
||||
}
|
||||
header('Content-type: text/csv; charset=utf-8');
|
||||
header('Content-disposition: attachment; filename=list_'.(int)$listData['id'].'.csv');
|
||||
print $s;
|
||||
}
|
||||
|
||||
function escape_csv(string $v)
|
||||
{
|
||||
//escape formulas
|
||||
$nf = '';
|
||||
$trimmed = ltrim($v);
|
||||
if (strlen($trimmed) > 0 && in_array(substr($trimmed, 0, 1), array('=', '+', '-', '@'))) {
|
||||
$nf = "'";
|
||||
}
|
||||
return '"'. $nf. str_replace('"', '""', $v). '"';
|
||||
}
|
||||
|
||||
function printICal(array $listData, array $data)
|
||||
{
|
||||
$mttToIcalPrio = array("1" => 5, "2" => 1);
|
||||
$s = "BEGIN:VCALENDAR\r\nVERSION:2.0\r\nMETHOD:PUBLISH\r\nCALSCALE:GREGORIAN\r\nPRODID:-//myTinyTodo//iCalendar Export v1.4//EN\r\n".
|
||||
"X-WR-CALNAME:". $listData['name']. "\r\nX-MTT-TIMEZONE:".Config::get('timezone')."\r\n";
|
||||
# to-do
|
||||
foreach($data as $r)
|
||||
{
|
||||
$a = array();
|
||||
$a[] = "BEGIN:VTODO";
|
||||
$a[] = "UID:". $r['uuid'];
|
||||
$a[] = "CREATED:". gmdate('Ymd\THis\Z', $r['d_created']);
|
||||
$a[] = "DTSTAMP:". gmdate('Ymd\THis\Z', $r['d_edited']);
|
||||
$a[] = "LAST-MODIFIED:". gmdate('Ymd\THis\Z', $r['d_edited']);
|
||||
$a[] = utf8chunks("SUMMARY:". $r['title']);
|
||||
if($r['duedate']) {
|
||||
$dda = explode('-', $r['duedate']);
|
||||
$a[] = "DUE;VALUE=DATE:".sprintf("%u%02u%02u", $dda[0], $dda[1], $dda[2]);
|
||||
}
|
||||
# Apple's iCal priorities: low-9, medium-5, high-1
|
||||
if($r['prio'] > 0 && isset($mttToIcalPrio[$r['prio']])) $a[] = "PRIORITY:". $mttToIcalPrio[$r['prio']];
|
||||
$a[] = "X-MTT-PRIORITY:". $r['prio'];
|
||||
|
||||
$descr = array();
|
||||
if($r['tags'] != '') $descr[] = Lang::instance()->get('tags'). ": ". str_replace(',', ', ', $r['tags']);
|
||||
if($r['note'] != '') $descr[] = Lang::instance()->get('note'). ": ". $r['note'];
|
||||
if($descr) $a[] = utf8chunks("DESCRIPTION:". str_replace("\n", '\\n', implode("\n",$descr)));
|
||||
|
||||
if($r['compl']) {
|
||||
$a[] = "STATUS:COMPLETED"; #used in Sunbird
|
||||
$a[] = "COMPLETED:". gmdate('Ymd\THis\Z', $r['d_completed']);
|
||||
#$a[] = "PERCENT-COMPLETE:100"; #used in Sunbird
|
||||
}
|
||||
if($r['tags'] != '') $a[] = utf8chunks("X-MTT-TAGS:". $r['tags']);
|
||||
$a[] = "END:VTODO\r\n";
|
||||
$s .= implode("\r\n", $a);
|
||||
}
|
||||
# events
|
||||
foreach($data as $r)
|
||||
{
|
||||
if(!$r['duedate'] || $r['compl']) continue; # skip tasks completed and without duedate
|
||||
$a = array();
|
||||
$a[] = "BEGIN:VEVENT";
|
||||
$a[] = "UID:_". $r['uuid']; # do not duplicate VTODO UID
|
||||
$a[] = "CREATED:". gmdate('Ymd\THis\Z', $r['d_created']);
|
||||
$a[] = "DTSTAMP:". gmdate('Ymd\THis\Z', $r['d_edited']);
|
||||
$a[] = "LAST-MODIFIED:". gmdate('Ymd\THis\Z', $r['d_edited']);
|
||||
$a[] = utf8chunks("SUMMARY:". $r['title']);
|
||||
if($r['prio'] > 0 && isset($mttToIcalPrio[$r['prio']])) $a[] = "PRIORITY:". $mttToIcalPrio[$r['prio']];
|
||||
$dda = explode('-', $r['duedate']);
|
||||
$a[] = "DTSTART;VALUE=DATE:".sprintf("%u%02u%02u", $dda[0], $dda[1], $dda[2]);
|
||||
$a[] = "DTEND;VALUE=DATE:".date('Ymd', mktime(1,1,1,$dda[1],$dda[2],$dda[0]) + 86400);
|
||||
$descr = array();
|
||||
if($r['tags'] != '') $descr[] = Lang::instance()->get('tags'). ": ". str_replace(',', ', ', $r['tags']);
|
||||
if($r['note'] != '') $descr[] = Lang::instance()->get('note'). ": ". $r['note'];
|
||||
if($descr) $a[] = utf8chunks("DESCRIPTION:". str_replace("\n", '\\n', implode("\n",$descr)));
|
||||
$a[] = "END:VEVENT\r\n";
|
||||
$s .= implode("\r\n", $a);
|
||||
}
|
||||
$s .= "END:VCALENDAR\r\n";
|
||||
header('Content-type: text/calendar; charset=utf-8');
|
||||
header('Content-disposition: attachment; filename=list_'.(int)$listData['id'].'.ics');
|
||||
print $s;
|
||||
}
|
||||
|
||||
function utf8chunks($text, $chunklen=75, $delimiter="\r\n\t")
|
||||
{
|
||||
if($text == '') return '';
|
||||
preg_match_all('/./u', $text, $m);
|
||||
$chars = $m[0];
|
||||
$a = array();
|
||||
$s = '';
|
||||
$max = count($chars);
|
||||
for($i=0; $i<$max; $i++)
|
||||
{
|
||||
$ch = $chars[$i];
|
||||
if(strlen($s) + strlen($ch) > $chunklen) { # line should be not more than $chunklen bytes
|
||||
$a[] = $s;
|
||||
$s = $ch;
|
||||
}
|
||||
else $s .= $ch;
|
||||
}
|
||||
if($s != '') $a[] = $s;
|
||||
return implode($delimiter, $a);
|
||||
}
|
||||
5
src/ext/.htaccess
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<FilesMatch "\.(json|md|MD)$">
|
||||
Order deny,allow
|
||||
Deny from all
|
||||
</FilesMatch>
|
||||
|
||||
1
src/ext/CustomCSS/.htaccess
Normal file
|
|
@ -0,0 +1 @@
|
|||
deny from all
|
||||
6
src/ext/CustomCSS/extension.json
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"bundleId": "CustomCSS",
|
||||
"name": "Custom CSS",
|
||||
"version": "1.0.1",
|
||||
"description": "Add you own css rules"
|
||||
}
|
||||
7
src/ext/CustomCSS/lang/en.json
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"ext.CustomCSS.name": "Custom CSS",
|
||||
"customcss.h_css": "CSS",
|
||||
"customcss.d_css": "Write you own CSS rules",
|
||||
"customcss.not_writable": "CSS file is not writable, check permissions for custom.css",
|
||||
"customcss.saved": "Saved"
|
||||
}
|
||||
7
src/ext/CustomCSS/lang/pl.json
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"ext.CustomCSS.name": "Własny styl CSS",
|
||||
"customcss.h_css": "CSS",
|
||||
"customcss.d_css": "Dodaj własne reguły CSS",
|
||||
"customcss.not_writable": "Plik stylu nie jest zapisywalny, sprawdź uprawnienia dla pliku custom.css",
|
||||
"customcss.saved": "Zmiany zostały zapisane"
|
||||
}
|
||||
7
src/ext/CustomCSS/lang/ru.json
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"ext.CustomCSS.name": "Дополнительные стили",
|
||||
"customcss.h_css": "CSS",
|
||||
"customcss.d_css": "Добавляйте собственные стили CSS",
|
||||
"customcss.not_writable": "Ошибка записи в файл, проверьте права доступа к custom.css",
|
||||
"customcss.saved": "Сохранено"
|
||||
}
|
||||
93
src/ext/CustomCSS/loader.php
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
<?php declare(strict_types=1);
|
||||
|
||||
/*
|
||||
This file is a part of myTinyTodo.
|
||||
(C) Copyright 2022 Max Pozdeev <maxpozdeev@gmail.com>
|
||||
Licensed under the GNU GPL version 2 or any later. See file COPYRIGHT for details.
|
||||
*/
|
||||
|
||||
if (!defined('MTTPATH')) {
|
||||
die("Unexpected usage.");
|
||||
}
|
||||
|
||||
function mtt_ext_customcss_instance(): MTTExtension
|
||||
{
|
||||
return new CustomCssExtension();
|
||||
}
|
||||
|
||||
class CustomCssExtension extends MTTExtension implements MTTExtensionSettingsInterface
|
||||
{
|
||||
//the same as dir name
|
||||
const bundleId = 'CustomCSS';
|
||||
|
||||
// settings domain
|
||||
const domain = "ext.customcss.json";
|
||||
|
||||
const cssFilename = 'custom.css';
|
||||
|
||||
function init()
|
||||
{
|
||||
$prefs = self::preferences();
|
||||
if (isset($prefs['css'])) {
|
||||
$href = htmlspecialchars( get_unsafe_mttinfo('theme_url'). self::cssFilename. '?v='. ($prefs['edited'] ?? 0) );
|
||||
$cb = function() use ($href) {
|
||||
print "<link rel='stylesheet' type='text/css' href='$href'>\n";
|
||||
};
|
||||
add_action('theme_head_end', $cb);
|
||||
}
|
||||
}
|
||||
|
||||
function settingsPage(): string
|
||||
{
|
||||
$e = function($s) { return __($s, true); };
|
||||
$prefs = self::preferences();
|
||||
$css = htmlspecialchars($prefs['css'] ?? '');
|
||||
|
||||
return
|
||||
<<<EOD
|
||||
<div class="tr">
|
||||
<div class="th"> {$e('customcss.h_css')}
|
||||
<div class="descr">{$e('customcss.d_css')}</div>
|
||||
</div>
|
||||
<div class="td"> <textarea name="css" class="inmax monospace">$css</textarea> </div>
|
||||
</div>
|
||||
EOD;
|
||||
}
|
||||
|
||||
function settingsPageType(): int
|
||||
{
|
||||
return 0; //default page
|
||||
}
|
||||
|
||||
function saveSettings(array $params, ?string &$outMessage): bool
|
||||
{
|
||||
if (defined('MTT_DEMO')) {
|
||||
$outMessage = "Demo";
|
||||
return true;
|
||||
}
|
||||
$css = $params['css'] ?? '';
|
||||
|
||||
$cssFilename = MTT_THEME_PATH. self::cssFilename;
|
||||
if (!file_exists($cssFilename)) {
|
||||
@touch($cssFilename);
|
||||
}
|
||||
if (!is_writable($cssFilename)) {
|
||||
$outMessage = __('customcss.not_writable');
|
||||
return false;
|
||||
}
|
||||
@file_put_contents($cssFilename, $css);
|
||||
$outMessage = __('customcss.saved');
|
||||
return true;
|
||||
}
|
||||
|
||||
static function preferences(): array
|
||||
{
|
||||
$prefs['cssFilename'] = $cssFilename = MTT_THEME_PATH. self::cssFilename;
|
||||
if (file_exists($prefs['cssFilename'])) {
|
||||
$prefs['edited'] = filemtime($cssFilename) ?? 0;
|
||||
$prefs['css'] = @file_get_contents($cssFilename) ?? '';
|
||||
}
|
||||
return $prefs;
|
||||
}
|
||||
|
||||
}
|
||||
1
src/ext/_examples/CustomSmartSyntax/.htaccess
Normal file
|
|
@ -0,0 +1 @@
|
|||
deny from all
|
||||
6
src/ext/_examples/CustomSmartSyntax/extension.json
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"bundleId": "CustomSmartSyntax",
|
||||
"name": "Custom Smart Syntax",
|
||||
"version": "1.0",
|
||||
"description": "Prototype to write you own smart syntax parser"
|
||||
}
|
||||
41
src/ext/_examples/CustomSmartSyntax/loader.php
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
<?php declare(strict_types=1);
|
||||
|
||||
/*
|
||||
This file is a part of myTinyTodo.
|
||||
(C) Copyright 2023 Max Pozdeev <maxpozdeev@gmail.com>
|
||||
Licensed under the GNU GPL version 2 or any later. See file COPYRIGHT for details.
|
||||
*/
|
||||
|
||||
if (!defined('MTTPATH')) {
|
||||
die("Unexpected usage.");
|
||||
}
|
||||
|
||||
function mtt_ext_customsmartsyntax_instance(): MTTExtension
|
||||
{
|
||||
return new CustomSmartSyntaxExtension();
|
||||
}
|
||||
|
||||
class CustomSmartSyntaxExtension extends MTTExtension implements MTTFilterInterface
|
||||
{
|
||||
//the same as dir name
|
||||
const bundleId = 'CustomSmartSyntax';
|
||||
|
||||
function init() {
|
||||
\MTTFilterCenter::addFilterForAction('parseSmartSyntax', $this);
|
||||
}
|
||||
|
||||
// parseSmartSyntax
|
||||
function filter($title, &$out)
|
||||
{
|
||||
$a = [
|
||||
'prio' => 0, // int: -1 .. 2
|
||||
'title' => $title, // string
|
||||
'tags' => '', // string: "tag1, tag2, tag3,..."
|
||||
'duedate' => null, // string: "Y-m-d" format
|
||||
];
|
||||
|
||||
// This filter just overwrites results of default parser
|
||||
|
||||
$out = $a;
|
||||
}
|
||||
}
|
||||
1
src/ext/backup/.htaccess
Normal file
|
|
@ -0,0 +1 @@
|
|||
deny from all
|
||||
203
src/ext/backup/class.backup.php
Normal file
|
|
@ -0,0 +1,203 @@
|
|||
<?php declare(strict_types=1);
|
||||
|
||||
/*
|
||||
This file is a part of myTinyTodo.
|
||||
(C) Copyright 2023-2025 Max Pozdeev <maxpozdeev@gmail.com>
|
||||
Licensed under the GNU GPL version 2 or any later. See file COPYRIGHT for details.
|
||||
*/
|
||||
|
||||
namespace BackupExtension;
|
||||
|
||||
use Exception;
|
||||
|
||||
class Backup
|
||||
{
|
||||
public $lastErrorString = null;
|
||||
public $filename;
|
||||
private $fh;
|
||||
private $level = 0;
|
||||
private $tagClosed = true;
|
||||
|
||||
function __construct(?string $filename)
|
||||
{
|
||||
$this->filename = is_null($filename) ? MTTPATH. 'db/backup.xml' : $filename;
|
||||
}
|
||||
|
||||
function isFileWritable()
|
||||
{
|
||||
if (!file_exists($this->filename)) {
|
||||
@touch($this->filename);
|
||||
}
|
||||
if (!is_writable($this->filename)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function makeBackup()
|
||||
{
|
||||
if (!$this->isFileWritable()) {
|
||||
$this->lastErrorString = __('backup.not_writable');
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->fh = fopen($this->filename, 'w');
|
||||
if ($this->fh === false) {
|
||||
$ea = error_get_last();
|
||||
$this->lastErrorString = $ea['message'] ?? "Failed to open file for writing";
|
||||
return false;
|
||||
}
|
||||
|
||||
$db = \DBConnection::instance();
|
||||
|
||||
fwrite($this->fh, "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n");
|
||||
$this->writeOpeningTag('mttdb', [
|
||||
'version' => 1,
|
||||
'appversion' => \mytinytodo\Version::VERSION,
|
||||
'dbversion' => \mytinytodo\Version::DB_VERSION,
|
||||
'dbtype' => $db::DBTYPE,
|
||||
'created' => date(DATE_ATOM)
|
||||
]);
|
||||
$this->level = 0;
|
||||
|
||||
|
||||
$this->writeTable($db->prefix.'lists', 'lists', 'list');
|
||||
$this->writeTable($db->prefix.'todolist', 'tasks', 'task');
|
||||
$this->writeTable($db->prefix.'tags', 'tags', 'tag');
|
||||
$this->writeTable($db->prefix.'tag2task', 'tag2task', 'item');
|
||||
$this->writeTable($db->prefix.'settings', 'settings', 'item');
|
||||
|
||||
|
||||
$this->writeClosingTag('mttdb');
|
||||
fwrite($this->fh, "\n");
|
||||
|
||||
if (!fclose($this->fh)) {
|
||||
$ea = error_get_last();
|
||||
$this->lastErrorString = $ea['message'] ?? "Failed to close file";
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function writeTable(string $table, string $group, string $itemName)
|
||||
{
|
||||
if (!preg_match("/^[\\w:]+$/", $table)) {
|
||||
throw new Exception("Malformed table name: $table");
|
||||
}
|
||||
$db = \DBConnection::instance();
|
||||
$props = null;
|
||||
$autoinc = $this->getTableAutoIncrement($table);
|
||||
if ($autoinc != '') {
|
||||
$props = ['auto_increment' => $autoinc];
|
||||
}
|
||||
$this->writeOpeningTag($group, $props);
|
||||
$q = $db->dq("SELECT * FROM $table");
|
||||
while ($r = $q->fetchAssoc()) {
|
||||
$this->writeItem($itemName, $r);
|
||||
}
|
||||
$this->writeClosingTag($group);
|
||||
}
|
||||
|
||||
function writeItem(string $entity, $r)
|
||||
{
|
||||
$tagAttrs = null;
|
||||
if (isset($r['id'])) {
|
||||
$tagAttrs = ['id' => $r['id']];
|
||||
unset($r['id']);
|
||||
}
|
||||
$this->writeOpeningTag($entity, $tagAttrs);
|
||||
foreach ($r as $field => $value) {
|
||||
$props = null;
|
||||
if (is_null($value)) {
|
||||
$props['isnull'] = 'yes';
|
||||
}
|
||||
$this->writeOpeningTag($field, $props);
|
||||
$this->writeTagContent((string)$value);
|
||||
$this->writeClosingTag($field);
|
||||
}
|
||||
$this->writeClosingTag($entity);
|
||||
}
|
||||
|
||||
function getTableAutoIncrement($table): string
|
||||
{
|
||||
$db = \DBConnection::instance();
|
||||
if ($db::DBTYPE == \DBConnection::DBTYPE_MYSQL) {
|
||||
$r = $db->sqa("SHOW TABLE STATUS WHERE Name=?", [$table]);
|
||||
return (string)$r['Auto_increment'] ?? '';
|
||||
}
|
||||
else if ($db::DBTYPE == \DBConnection::DBTYPE_SQLITE) {
|
||||
$seq = (int)$db->sq("SELECT seq FROM sqlite_sequence WHERE name=?", [$table]);
|
||||
if ($seq > 0)
|
||||
return (string)$seq;
|
||||
}
|
||||
else if ($db::DBTYPE == \DBConnection::DBTYPE_POSTGRES) {
|
||||
if ($db->tableFieldExists($table, 'id')) {
|
||||
$v = (int)$db->sq("SELECT last_value FROM ". $table. '_id_seq');
|
||||
if ($v > 0)
|
||||
return (string)$v;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
|
||||
function writeOpeningTag(string $tag, ?array $attrs = null)
|
||||
{
|
||||
if (!preg_match("/^[\\w:]+$/", $tag)) {
|
||||
throw new Exception("Malformed tag: $tag");
|
||||
}
|
||||
$data = "<$tag";
|
||||
if ($attrs !== null) {
|
||||
$a = [];
|
||||
foreach ($attrs as $k => $v) {
|
||||
if (!preg_match("/^[\\w:-]+$/", $k)) {
|
||||
throw new Exception("Malformed attribute name: $k");
|
||||
}
|
||||
$v = (string)$v;
|
||||
if (preg_match("/[\\r\\n]+/", $v)) {
|
||||
throw new Exception("Malformed attribute value: $v");
|
||||
}
|
||||
$a[] = "$k=\"". htmlspecialchars($v). "\"";
|
||||
}
|
||||
if (count($a) > 0) {
|
||||
$data .= " ". implode(" ", $a);
|
||||
}
|
||||
}
|
||||
$data .= ">";
|
||||
$this->write( ($this->tagClosed ? "" : "\n"). str_repeat(' ', $this->level) . $data );
|
||||
$this->level += 1;
|
||||
$this->tagClosed = false;
|
||||
}
|
||||
|
||||
function writeClosingTag(string $tag)
|
||||
{
|
||||
if (!preg_match("/^[\\w:]+$/", $tag)) {
|
||||
throw new Exception("Malformed tag: $tag");
|
||||
}
|
||||
$this->level -= 1;
|
||||
if ($this->level < 0) $this->level = 0;
|
||||
$padding = '';
|
||||
if ($this->tagClosed) {
|
||||
$padding = str_repeat(' ', $this->level);
|
||||
}
|
||||
$this->write( $padding . "</$tag>\n" );
|
||||
$this->tagClosed = true;
|
||||
}
|
||||
|
||||
function writeTagContent(?string $content)
|
||||
{
|
||||
if ($content !== null) {
|
||||
$this->write( htmlspecialchars($content, ENT_XML1, 'UTF-8') ); //TODO: make xml compliant?
|
||||
}
|
||||
}
|
||||
|
||||
function write(string $data)
|
||||
{
|
||||
if (false === @fwrite($this->fh, $data)) {
|
||||
$ea = error_get_last();
|
||||
throw new Exception("Failed to write to file: ". ($ea['message'] ?? "unknown reason"));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
126
src/ext/backup/class.check.php
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
<?php declare(strict_types=1);
|
||||
|
||||
/*
|
||||
This file is a part of myTinyTodo.
|
||||
(C) Copyright 2023 Max Pozdeev <maxpozdeev@gmail.com>
|
||||
Licensed under the GNU GPL version 2 or any later. See file COPYRIGHT for details.
|
||||
*/
|
||||
|
||||
namespace BackupExtension;
|
||||
|
||||
use DBConnection;
|
||||
|
||||
class Check
|
||||
{
|
||||
public $lastErrorString = null;
|
||||
public $report = '';
|
||||
|
||||
function check(): bool
|
||||
{
|
||||
$db = DBConnection::instance();
|
||||
$msg = [];
|
||||
|
||||
// Task without list
|
||||
$count = $db->sq("SELECT COUNT(*) FROM {$db->prefix}todolist WHERE list_id NOT IN (SELECT id FROM {$db->prefix}lists)");
|
||||
if ($count) {
|
||||
$msg[] = "Tasks without list: $count";
|
||||
}
|
||||
|
||||
// Tag without task (not a broblem)
|
||||
$count = $db->sq("SELECT COUNT(*) FROM {$db->prefix}tags WHERE id NOT IN (SELECT tag_id FROM {$db->prefix}tag2task)");
|
||||
if ($count) {
|
||||
$msg[] = "Tags without task: $count";
|
||||
}
|
||||
|
||||
// tag2task no list
|
||||
$count = $db->sq("SELECT COUNT(*) FROM {$db->prefix}tag2task WHERE list_id NOT IN (SELECT id FROM {$db->prefix}lists)");
|
||||
if ($count) {
|
||||
$msg[] = "tag2task no list: $count";
|
||||
}
|
||||
|
||||
// tag2task no tag
|
||||
$count = $db->sq("SELECT COUNT(*) FROM {$db->prefix}tag2task WHERE tag_id NOT IN (SELECT id FROM {$db->prefix}tags)");
|
||||
if ($count) {
|
||||
$msg[] = "tag2task no tag: $count";
|
||||
}
|
||||
|
||||
// tag2task no task
|
||||
$count = $db->sq("SELECT COUNT(*) FROM {$db->prefix}tag2task WHERE task_id NOT IN (SELECT id FROM {$db->prefix}todolist)");
|
||||
if ($count) {
|
||||
$msg[] = "tag2task no task: $count";
|
||||
}
|
||||
|
||||
$count = 0;
|
||||
$uniqTag = []; // lowerTag => [id, tag]
|
||||
$nonuniqTag = []; // id => [tag, lowerTag, uniqId, uniqTag, taskCount]
|
||||
$q = $db->dq("SELECT id,name,COUNT(task_id) c FROM {$db->prefix}tags t LEFT JOIN {$db->prefix}tag2task tt ON t.id=tt.tag_id GROUP BY id ORDER BY id");
|
||||
while ($r = $q->fetchAssoc()) {
|
||||
$v = mb_strtolower((string)$r['name'], 'UTF-8');
|
||||
if (!isset($uniqTag[$v])) {
|
||||
$uniqTag[$v] = [$r['id'], $r['name']];
|
||||
}
|
||||
else {
|
||||
$count++;
|
||||
$nonuniqTag[$r['id']] = [$r['name'], $v, $uniqTag[$v][0], $uniqTag[$v][1], $r['c']];
|
||||
}
|
||||
}
|
||||
if ($count > 0) {
|
||||
$msg[] = "Non-unique tags: $count";
|
||||
foreach ($nonuniqTag as $id => $a) {
|
||||
$msg[] = " ID:{$id} Tag:{$a[0]} (tasks: {$a[4]}) same as ID:{$a[2]} Tag:{$a[3]}";
|
||||
}
|
||||
}
|
||||
|
||||
if (count($msg) == 0) {
|
||||
$msg[] = "OK";
|
||||
}
|
||||
|
||||
$this->report = implode("\n", $msg);
|
||||
return true;
|
||||
}
|
||||
|
||||
function repair(): bool
|
||||
{
|
||||
$db = DBConnection::instance();
|
||||
|
||||
$db->ex("BEGIN");
|
||||
|
||||
// Task without list
|
||||
$count = (int)$db->sq("SELECT COUNT(*) FROM {$db->prefix}todolist WHERE list_id NOT IN (SELECT id FROM {$db->prefix}lists)");
|
||||
if ($count > 0) {
|
||||
// Move to new list
|
||||
$listID = \DBCore::default()->createListWithName("Restored tasks");
|
||||
$db->ex("UPDATE {$db->prefix}todolist SET list_id=? WHERE list_id NOT IN (SELECT id FROM {$db->prefix}lists)", [$listID]);
|
||||
}
|
||||
|
||||
//Tags
|
||||
$db->ex("DELETE FROM {$db->prefix}tags WHERE id NOT IN (SELECT tag_id FROM {$db->prefix}tag2task)");
|
||||
$db->ex("DELETE FROM {$db->prefix}tag2task WHERE task_id NOT IN (SELECT id FROM {$db->prefix}todolist)");
|
||||
$db->ex("DELETE FROM {$db->prefix}tag2task WHERE tag_id NOT IN (SELECT id FROM {$db->prefix}tags)");
|
||||
|
||||
//Non-unique tags replace with first unique
|
||||
$uniqTag = [];
|
||||
$replace = [];
|
||||
$q = $db->dq("SELECT id,name FROM {$db->prefix}tags t LEFT JOIN {$db->prefix}tag2task tt ON t.id=tt.tag_id GROUP BY id ORDER BY id");
|
||||
while ($r = $q->fetchAssoc()) {
|
||||
$v = mb_strtolower((string)$r['name'], 'UTF-8');
|
||||
if (!isset($uniqTag[$v])) {
|
||||
$uniqTag[$v] = $r['id'];
|
||||
}
|
||||
else {
|
||||
$replace[$r['id']] = $uniqTag[$v];
|
||||
}
|
||||
}
|
||||
foreach ($replace as $id => $newId) {
|
||||
$db->ex("UPDATE {$db->prefix}tag2task SET tag_id=? WHERE tag_id=?", [$newId, $id]);
|
||||
}
|
||||
$db->ex("DELETE FROM {$db->prefix}tags WHERE id NOT IN (SELECT tag_id FROM {$db->prefix}tag2task)");
|
||||
|
||||
|
||||
// TODO: tag2task no list ?
|
||||
|
||||
$db->ex("COMMIT");
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
156
src/ext/backup/class.controller.php
Normal file
|
|
@ -0,0 +1,156 @@
|
|||
<?php declare(strict_types=1);
|
||||
|
||||
/*
|
||||
This file is a part of myTinyTodo.
|
||||
(C) Copyright 2023 Max Pozdeev <maxpozdeev@gmail.com>
|
||||
Licensed under the GNU GPL version 2 or any later. See file COPYRIGHT for details.
|
||||
*/
|
||||
|
||||
namespace BackupExtension;
|
||||
|
||||
use BackupExtension;
|
||||
use BackupExtension\Backup;
|
||||
use BackupExtension\Download;
|
||||
use BackupExtension\Check;
|
||||
|
||||
class Controller extends \ApiController
|
||||
{
|
||||
function postMakeBackup()
|
||||
{
|
||||
require_once('class.backup.php');
|
||||
$filename = BackupExtension::backupFilePath();
|
||||
$backup = new Backup($filename);
|
||||
|
||||
if (!$backup->makeBackup()) {
|
||||
$this->response->data = [
|
||||
'total' => 0,
|
||||
'msg' => __("error"),
|
||||
'details' => $backup->lastErrorString ?? '',
|
||||
];
|
||||
}
|
||||
|
||||
$this->response->data = [
|
||||
'total' => 1,
|
||||
'ok' => true,
|
||||
'msg' => __("backup.done"),
|
||||
'alertTextOnLoad' => __("backup.done"),
|
||||
];
|
||||
}
|
||||
|
||||
function postDownload()
|
||||
{
|
||||
require_once('class.download.php');
|
||||
$filename = BackupExtension::backupFilePath();
|
||||
$download = new Download($filename);
|
||||
|
||||
if (!$download->checkFileAccess()) {
|
||||
$this->response->data = [
|
||||
'total' => 0,
|
||||
'msg' => __("error"),
|
||||
'details' => $download->lastErrorString ?? '',
|
||||
];
|
||||
return;
|
||||
}
|
||||
$this->response->data = [
|
||||
'total' => 1,
|
||||
'redirect' => $download->downloadUrl()
|
||||
];
|
||||
}
|
||||
|
||||
function getDownload()
|
||||
{
|
||||
require_once('class.download.php');
|
||||
$filename = BackupExtension::backupFilePath();
|
||||
$download = new Download($filename);
|
||||
|
||||
$ott = (string)_get('t');
|
||||
if (!$download->checkFileAccess($ott)) {
|
||||
$this->response->data = [
|
||||
'total' => 0,
|
||||
'msg' => __("error"),
|
||||
'details' => $download->lastErrorString ?? '',
|
||||
];
|
||||
return;
|
||||
}
|
||||
$download->printFile();
|
||||
exit();
|
||||
}
|
||||
|
||||
function postRestore()
|
||||
{
|
||||
require_once('class.restore.php');
|
||||
$restore = new Restore();
|
||||
|
||||
if (!$restore->isUploaded()) {
|
||||
$this->response->data = [
|
||||
'total' => 0,
|
||||
'msg' => __("error"),
|
||||
'details' => $restore->lastErrorString ?? '',
|
||||
];
|
||||
return;
|
||||
}
|
||||
|
||||
if (!$restore->restore()) {
|
||||
$this->response->data = [
|
||||
'total' => 0,
|
||||
'msg' => __("error"),
|
||||
'details' => $restore->lastErrorString ?? '',
|
||||
];
|
||||
return;
|
||||
}
|
||||
|
||||
$this->response->data = [
|
||||
'total' => 1,
|
||||
'msg' => __("backup.done"),
|
||||
'redirect' => get_mttinfo('url'),
|
||||
];
|
||||
}
|
||||
|
||||
function postCheckInconsistency()
|
||||
{
|
||||
require_once('class.check.php');
|
||||
$check = new Check();
|
||||
|
||||
if (!$check->check()) {
|
||||
$this->response->data = [
|
||||
'total' => 0,
|
||||
'msg' => __("error"),
|
||||
'details' => $check->lastErrorString ?? '',
|
||||
];
|
||||
return;
|
||||
}
|
||||
$this->response->data = [
|
||||
'total' => 1,
|
||||
'ok' => true,
|
||||
'msg' => __("backup.done"),
|
||||
];
|
||||
if ($check->report == 'OK') {
|
||||
$this->response->data['alertText'] = "OK";
|
||||
}
|
||||
else {
|
||||
$this->response->data['html'] = "<pre>". htmlspecialchars($check->report). "</pre>";
|
||||
}
|
||||
}
|
||||
|
||||
function postRepairInconsistency()
|
||||
{
|
||||
require_once('class.check.php');
|
||||
$check = new Check();
|
||||
|
||||
if (!$check->repair()) {
|
||||
$this->response->data = [
|
||||
'total' => 0,
|
||||
'msg' => __("error"),
|
||||
'details' => $check->lastErrorString ?? '',
|
||||
];
|
||||
return;
|
||||
}
|
||||
$this->response->data = [
|
||||
'total' => 1,
|
||||
'ok' => true,
|
||||
'msg' => __("backup.done"),
|
||||
'alertText' => __("backup.done"),
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
74
src/ext/backup/class.download.php
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
<?php declare(strict_types=1);
|
||||
|
||||
/*
|
||||
This file is a part of myTinyTodo.
|
||||
(C) Copyright 2023 Max Pozdeev <maxpozdeev@gmail.com>
|
||||
Licensed under the GNU GPL version 2 or any later. See file COPYRIGHT for details.
|
||||
*/
|
||||
|
||||
namespace BackupExtension;
|
||||
|
||||
use BackupExtension;
|
||||
|
||||
class Download
|
||||
{
|
||||
public $filename;
|
||||
public $lastErrorString = null;
|
||||
private $token = '';
|
||||
|
||||
function __construct(?string $filename)
|
||||
{
|
||||
$this->filename = is_null($filename) ? MTTPATH. 'db/backup.xml' : $filename;
|
||||
}
|
||||
|
||||
function checkFileAccess(?string $tokenHash = null): bool
|
||||
{
|
||||
if (!file_exists($this->filename)) {
|
||||
$this->lastErrorString = "Backup file not found";
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->token = access_token();
|
||||
if ($this->token == '') {
|
||||
$this->lastErrorString = "No token provided";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!is_null($tokenHash)) {
|
||||
$a = explode(':', $tokenHash, 2);
|
||||
$rnd = $a[0] ?? '';
|
||||
$hash = $a[1] ?? '';
|
||||
if (!hash_equals(hash_hmac('sha256', $rnd, $this->token), $hash)) {
|
||||
$this->lastErrorString = "No temp token provided";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function downloadUrl()
|
||||
{
|
||||
$rnd = randomString();
|
||||
$hash = $rnd. ':'. hash_hmac('sha256', $rnd, $this->token);
|
||||
$url = BackupExtension::extApiActionUrl("download", "t=$hash");
|
||||
return $url;
|
||||
}
|
||||
|
||||
function printFile()
|
||||
{
|
||||
header('Content-type: application/xml; charset=utf-8');
|
||||
header('Content-disposition: attachment; filename=backup.xml');
|
||||
|
||||
$fh = fopen($this->filename, "r") or die("Couldn't open file");
|
||||
if ($fh) {
|
||||
while (!feof($fh)) {
|
||||
$buffer = fgets($fh, 4096);
|
||||
print($buffer);
|
||||
}
|
||||
fclose($fh);
|
||||
}
|
||||
exit();
|
||||
}
|
||||
|
||||
}
|
||||
255
src/ext/backup/class.restore.php
Normal file
|
|
@ -0,0 +1,255 @@
|
|||
<?php declare(strict_types=1);
|
||||
|
||||
/*
|
||||
This file is a part of myTinyTodo.
|
||||
(C) Copyright 2023-2025 Max Pozdeev <maxpozdeev@gmail.com>
|
||||
Licensed under the GNU GPL version 2 or any later. See file COPYRIGHT for details.
|
||||
*/
|
||||
|
||||
namespace BackupExtension;
|
||||
|
||||
use XMLReader;
|
||||
use DBConnection;
|
||||
use Exception;
|
||||
|
||||
class Restore
|
||||
{
|
||||
public $lastErrorString = null;
|
||||
private $filename;
|
||||
/** @var XMLReader */
|
||||
private $reader;
|
||||
private $tableItem;
|
||||
|
||||
function __construct()
|
||||
{
|
||||
// xml table => [ db table, xml item ]
|
||||
$this->tableItem = [
|
||||
'lists' => ['lists', 'list'],
|
||||
'tasks' => ['todolist', 'task'],
|
||||
'tags' => ['tags', 'tag'],
|
||||
'tag2task' => ['tag2task', 'item'],
|
||||
'settings' => ['settings', 'item'],
|
||||
];
|
||||
}
|
||||
|
||||
function isUploaded(): bool
|
||||
{
|
||||
if (!isset($_FILES['file']) || !isset($_FILES['file']['name']) || !isset($_FILES['file']['tmp_name'])) {
|
||||
$this->lastErrorString = "Not uploaded";
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->filename = $_FILES['file']['tmp_name'];
|
||||
if (!file_exists($this->filename) || !is_readable($this->filename)) {
|
||||
$this->lastErrorString = "Can't open file";
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function restore(): bool
|
||||
{
|
||||
$this->reader = $reader = new XMLReader();
|
||||
$reader->open($this->filename);
|
||||
|
||||
// root element
|
||||
$reader->next('mttdb');
|
||||
if ($reader->name != 'mttdb') {
|
||||
$this->lastErrorString = "Incorrect format: missing 'mttdb'.";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!$this->moveNextElement()) {
|
||||
$this->lastErrorString = "Incorrect format: tables not found.";
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->beginRestore();
|
||||
|
||||
$tables = array_keys($this->tableItem);
|
||||
|
||||
// Enumerate tables
|
||||
do {
|
||||
if ($reader->nodeType != XMLReader::ELEMENT) {
|
||||
error_log("Unexpected element '{$reader->name}' of type: {$reader->nodeType}");
|
||||
break;
|
||||
}
|
||||
//error_log("Found table '{$reader->name}'");
|
||||
|
||||
$result = null;
|
||||
if (in_array($reader->name, $tables)) {
|
||||
$result = $this->readTable($this->tableItem[$reader->name][0], $this->tableItem[$reader->name][1]);
|
||||
}
|
||||
else {
|
||||
continue; // Unexpected table, just skip
|
||||
}
|
||||
if (is_null($result)) {
|
||||
return false; // Incorrect format, error is set, stop
|
||||
}
|
||||
|
||||
} while ($this->moveNextElementSameLevel());
|
||||
|
||||
$this->endRestore();
|
||||
|
||||
$reader->close();
|
||||
return true;
|
||||
}
|
||||
|
||||
function moveNextElement(?string $el = null): ?bool
|
||||
{
|
||||
while ($this->reader->read()) {
|
||||
if ($this->reader->nodeType == XMLReader::ELEMENT) {
|
||||
if (!is_null($el) && $this->reader->name != $el) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else if ($this->reader->nodeType == XMLReader::END_ELEMENT) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function moveNextElementSameLevel(?string $el = null)
|
||||
{
|
||||
return $this->reader->next() && ($this->reader->nodeType == XMLReader::ELEMENT || $this->moveNextElement($el));
|
||||
}
|
||||
|
||||
function readTable(string $table, string $itemName): ?int
|
||||
{
|
||||
$autoinc = $this->reader->getAttribute("auto_increment");
|
||||
$maxId = 0;
|
||||
$count = 0;
|
||||
|
||||
// find first item
|
||||
$found = $this->moveNextElement($itemName);
|
||||
if ($found === false) {
|
||||
$this->lastErrorString = "Incorrect item name {$this->reader->name}, expected '{$itemName}'";
|
||||
return null; // Error
|
||||
}
|
||||
else if (is_null($found)) {
|
||||
return 0; // No items found
|
||||
}
|
||||
|
||||
do {
|
||||
$count++;
|
||||
$id = $this->reader->getAttribute("id");
|
||||
if (!is_null($id)) {
|
||||
$maxId = max($maxId, (int)$id);
|
||||
}
|
||||
// error_log("# $count: found $itemName with id $id");
|
||||
|
||||
$itemXml = $this->reader->readOuterXml();
|
||||
$xml = simplexml_load_string($itemXml); //SimpleXMLElement
|
||||
if ($xml === false) {
|
||||
error_log("Incorrect format of $itemName");
|
||||
continue;
|
||||
}
|
||||
if (!$this->insertToTable($table, $xml)) {
|
||||
return null; // Error
|
||||
}
|
||||
|
||||
} while ($this->moveNextElementSameLevel($itemName));
|
||||
|
||||
// restore table last auto_increment (mysql)
|
||||
if (!is_null($autoinc)) {
|
||||
$autoinc = max((int)$autoinc, $maxId);
|
||||
}
|
||||
else {
|
||||
$autoinc = $maxId + 1;
|
||||
}
|
||||
if ($autoinc > 1) {
|
||||
$this->updateAutoinc($table, $autoinc);
|
||||
}
|
||||
return $count;
|
||||
}
|
||||
|
||||
private function insertToTable(string $table, \SimpleXMLElement $xml): bool
|
||||
{
|
||||
if (!preg_match("/^[\\w]+$/", $table)) {
|
||||
throw new Exception("Malformed table name: $table");
|
||||
}
|
||||
$fields = [];
|
||||
$values = [];
|
||||
|
||||
$attrsXml = $xml->attributes();
|
||||
if (isset($attrsXml['id']) && $attrsXml['id'] != '') {
|
||||
$fields[] = 'id';
|
||||
$values[] = (string)$attrsXml['id'];
|
||||
}
|
||||
|
||||
foreach ($xml->children() as $item) {
|
||||
$field = $item->getName();
|
||||
$value = (string)$item;
|
||||
if (!preg_match("/^[\\w]+$/", $field)) {
|
||||
throw new Exception("Malformed field name: $field");
|
||||
}
|
||||
$attrsXml = $item->attributes();
|
||||
if (isset($attrsXml['isnull']) && $attrsXml['isnull'] == 'yes') { //$attrsXml['isnull']->__toString()
|
||||
$value = null;
|
||||
}
|
||||
$fields[] = $field;
|
||||
$values[] = $value;
|
||||
}
|
||||
|
||||
$fieldsStr = implode(',', $fields); // id,name,title ...
|
||||
$subsStr = implode(',', array_fill(0, count($fields), '?')); // ?,?,? ...
|
||||
$db = DBConnection::instance();
|
||||
try {
|
||||
$db->ex("INSERT INTO {$db->prefix}{$table} ($fieldsStr) VALUES ($subsStr)", $values);
|
||||
}
|
||||
catch (Exception $e) {
|
||||
error_log("Failed query: {$db->lastQuery}");
|
||||
$this->lastErrorString = "Failed to add data to table '{$db->prefix}$table'. Database error (see query in error log): ". $e->getMessage();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private function updateAutoinc(string $table, int $autoinc)
|
||||
{
|
||||
$db = DBConnection::instance();
|
||||
switch ($db::DBTYPE) {
|
||||
case DBConnection::DBTYPE_MYSQL:
|
||||
$db->ex("ALTER TABLE {$db->prefix}$table AUTO_INCREMENT = ". (int)$autoinc);
|
||||
break;
|
||||
case DBConnection::DBTYPE_POSTGRES:
|
||||
$db->ex("ALTER TABLE {$db->prefix}$table ALTER COLUMN id RESTART WITH ". (int)$autoinc);
|
||||
break;
|
||||
case DBConnection::DBTYPE_SQLITE:
|
||||
$db->ex("UPDATE sqlite_sequence SET seq=? WHERE name=?", [$autoinc, $db->prefix. $table]);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private function beginRestore()
|
||||
{
|
||||
$db = DBConnection::instance();
|
||||
$db->ex("BEGIN");
|
||||
foreach ($this->tableItem as $a) {
|
||||
$table = $db->prefix. $a[0];
|
||||
if ($db::DBTYPE == DBConnection::DBTYPE_POSTGRES) {
|
||||
$db->ex("TRUNCATE TABLE $table RESTART IDENTITY");
|
||||
}
|
||||
else {
|
||||
# - we do not use TRUNCATE on mysql due to autocommit
|
||||
# - sqlite has truncate optimizer while delete all to make it faster
|
||||
# - no need to reset auto_increment sequence before inserting lower ids
|
||||
$db->ex("DELETE FROM $table");
|
||||
}
|
||||
}
|
||||
$db->ex("DELETE FROM {$db->prefix}sessions");
|
||||
}
|
||||
|
||||
private function endRestore()
|
||||
{
|
||||
$db = DBConnection::instance();
|
||||
$db->ex("COMMIT");
|
||||
// vacuum?
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
6
src/ext/backup/extension.json
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"bundleId": "backup",
|
||||
"name": "Backup",
|
||||
"version": "1.1",
|
||||
"description": "Backup"
|
||||
}
|
||||
17
src/ext/backup/lang/en.json
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"ext.backup.name": "Backup",
|
||||
"backup.h_make": "Make backup",
|
||||
"backup.d_make": "Will create backup file in '%s' folder.",
|
||||
"backup.make": "Make",
|
||||
"backup.download": "Download",
|
||||
"backup.done": "Done",
|
||||
"backup.not_writable": "Backup file is not writable, check permissions for db/backup.xml",
|
||||
"backup.last_backup": "Last backup: %s",
|
||||
"backup.h_inconsistency": "Check for inconsistency",
|
||||
"backup.d_inconsistency": "If you want to restore the backup to another database version or type, it's better to fix inconsistency before making backup.",
|
||||
"backup.check": "Check",
|
||||
"backup.repair": "Repair",
|
||||
"backup.h_restore": "Restore from backup",
|
||||
"backup.d_restore": "Will delete all records in existing database before restoring.",
|
||||
"backup.restore": "Restore…"
|
||||
}
|
||||
17
src/ext/backup/lang/ru.json
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"ext.backup.name": "Резервное копирование",
|
||||
"backup.h_make": "Сделать копию",
|
||||
"backup.d_make": "Сохранит файл в папке '%s'.",
|
||||
"backup.make": "Создать",
|
||||
"backup.download": "Скачать",
|
||||
"backup.done": "Выполнено",
|
||||
"backup.not_writable": "Ошибка записи в файл, проверьте права доступа к db/backup.xml",
|
||||
"backup.last_backup": "Резервная копия: %s",
|
||||
"backup.h_inconsistency": "Проверка базы данных",
|
||||
"backup.d_inconsistency": "Если планируете восстановление из резервной копии в другую базу данных, то лучше исправить возможные ошибки перед резервным копированием.",
|
||||
"backup.check": "Проверить",
|
||||
"backup.repair": "Исправить",
|
||||
"backup.h_restore": "Восстановить из резервной копии",
|
||||
"backup.d_restore": "Удалит все существующие записи во время восстановления.",
|
||||
"backup.restore": "Восстановить…"
|
||||
}
|
||||
140
src/ext/backup/loader.php
Normal file
|
|
@ -0,0 +1,140 @@
|
|||
<?php declare(strict_types=1);
|
||||
|
||||
/*
|
||||
This file is a part of myTinyTodo.
|
||||
(C) Copyright 2023 Max Pozdeev <maxpozdeev@gmail.com>
|
||||
Licensed under the GNU GPL version 2 or any later. See file COPYRIGHT for details.
|
||||
*/
|
||||
|
||||
if (!defined('MTTPATH')) {
|
||||
die("Unexpected usage.");
|
||||
}
|
||||
|
||||
require_once('class.controller.php');
|
||||
|
||||
function mtt_ext_backup_instance(): MTTExtension
|
||||
{
|
||||
return new BackupExtension();
|
||||
}
|
||||
|
||||
use BackupExtension\Controller;
|
||||
|
||||
class BackupExtension extends MTTExtension implements MTTExtensionSettingsInterface, MTTHttpApiExtender
|
||||
{
|
||||
//the same as dir name
|
||||
const bundleId = 'backup';
|
||||
|
||||
// settings domain
|
||||
const domain = "ext.backup.json";
|
||||
|
||||
function init() {
|
||||
}
|
||||
|
||||
// MTTHttpApiExtender
|
||||
function extendHttpApi(): array
|
||||
{
|
||||
return array(
|
||||
'/makeBackup' => [
|
||||
'POST' => [ Controller::class , 'postMakeBackup' ],
|
||||
],
|
||||
'/download' => [
|
||||
'POST' => [ Controller::class , 'postDownload' ],
|
||||
'GET' => [ Controller::class , 'getDownload', true ], // doesn't check auth token
|
||||
],
|
||||
'/restore' => [
|
||||
'POST' => [ Controller::class , 'postRestore' ],
|
||||
],
|
||||
'/checkInconsistency' => [
|
||||
'POST' => [ Controller::class , 'postCheckInconsistency' ],
|
||||
],
|
||||
'/repairInconsistency' => [
|
||||
'POST' => [ Controller::class , 'postRepairInconsistency' ],
|
||||
],
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
function settingsPage(): string
|
||||
{
|
||||
$warning = '';
|
||||
$e = function($s, $arg=null) { return __($s, true, $arg); };
|
||||
$ext = htmlspecialchars(self::bundleId);
|
||||
|
||||
$downloadDisabled = '';
|
||||
$lastBackup = '';
|
||||
$filename = MTTPATH. 'db/backup.xml';
|
||||
if (file_exists($filename)) {
|
||||
$time = filemtime($filename);
|
||||
$lastBackup = htmlspecialchars( sprintf($e('backup.last_backup'), formatTime(Config::get('dateformat'). " H:i:s", $time)) );
|
||||
}
|
||||
else {
|
||||
$downloadDisabled = 'disabled';
|
||||
}
|
||||
|
||||
return <<<EOD
|
||||
$warning
|
||||
<script>
|
||||
function onBackupFileChange(el) {
|
||||
const fd = new FormData();
|
||||
fd.append('file', el.files[0]);
|
||||
mytinytodo.extensionSettingsAction(el.dataset.extSettingsAction, el.dataset.ext, fd);
|
||||
}
|
||||
</script>
|
||||
<div class="tr">
|
||||
<div class="th"> {$e('backup.h_make')}
|
||||
<div class="descr">{$e('backup.d_make', 'db')}</div>
|
||||
</div>
|
||||
<div class="td">
|
||||
<button type=button data-ext-settings-action="post:makeBackup" data-ext="$ext"> {$e('backup.make')} </button> <br>
|
||||
<br> $lastBackup
|
||||
<button type=button data-ext-settings-action="post:download" data-ext="$ext" $downloadDisabled> {$e('backup.download')} </button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tr">
|
||||
<div class="th"> {$e('backup.h_inconsistency')}
|
||||
<div class="descr">{$e('backup.d_inconsistency')}</div>
|
||||
</div>
|
||||
<div class="td">
|
||||
<button type=button data-ext-settings-action="post:checkInconsistency" data-ext="$ext"> {$e('backup.check')} </button>
|
||||
<button type=button data-ext-settings-action="post:repairInconsistency" data-ext="$ext"> {$e('backup.repair')} </button> <br>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tr">
|
||||
<div class="th"> {$e('backup.h_restore')}
|
||||
<div class="descr"> {$e('backup.d_restore')} </div>
|
||||
</div>
|
||||
<div class="td">
|
||||
<label class="mtt-settings-upload-button">
|
||||
<input type="file" name="file" onchange="return onBackupFileChange(this)" data-ext-settings-action="post:restore" data-ext="$ext">
|
||||
{$e('backup.restore')}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
EOD;
|
||||
}
|
||||
|
||||
function settingsPageType(): int
|
||||
{
|
||||
return 1; //no form buttons
|
||||
}
|
||||
|
||||
function saveSettings(array $params, ?string &$outMessage): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
/*
|
||||
static function preferences(): array
|
||||
{
|
||||
return [
|
||||
'backupFilePath' => MTTPATH. 'db/backup.xml'
|
||||
];
|
||||
}
|
||||
*/
|
||||
static function backupFilePath()
|
||||
{
|
||||
//return self::preferences()['backupFilePath'];
|
||||
return MTTPATH. 'db/backup.xml';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
0
src/ext/index.html
Normal file
1
src/ext/notifications/.htaccess
Normal file
|
|
@ -0,0 +1 @@
|
|||
deny from all
|
||||