mirror of
https://github.com/espocrm/espocrm.git
synced 2026-03-04 11:27:02 +00:00
Compare commits
1328 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a4c15992a9 | ||
|
|
14d1173a0c | ||
|
|
1e7acbdbd2 | ||
|
|
35e729b25c | ||
|
|
4ee5ea78e3 | ||
|
|
fe971f9f67 | ||
|
|
a828523f26 | ||
|
|
af9ca6788e | ||
|
|
36d1c3af63 | ||
|
|
1853e98209 | ||
|
|
f526d43798 | ||
|
|
ae8c76cecb | ||
|
|
2b32c94543 | ||
|
|
b6f5909df1 | ||
|
|
ef35bbbb63 | ||
|
|
64f2cc6c7e | ||
|
|
a16635eb26 | ||
|
|
6e614f0a7d | ||
|
|
859f4eab0a | ||
|
|
104e0b9079 | ||
|
|
612abbf5c0 | ||
|
|
2dfbf71806 | ||
|
|
c43f4d129d | ||
|
|
8d47a48f62 | ||
|
|
9a333e6e38 | ||
|
|
f6e0ef8cc6 | ||
|
|
36a45717f1 | ||
|
|
86f63d72e1 | ||
|
|
ade4078f0d | ||
|
|
fdeac68216 | ||
|
|
4c220a5a65 | ||
|
|
f148bd82c5 | ||
|
|
0d983ef34c | ||
|
|
75ad9f5cf2 | ||
|
|
893efe212e | ||
|
|
4a4d2e473f | ||
|
|
9d663ad140 | ||
|
|
f377dfc5b1 | ||
|
|
a4054f5273 | ||
|
|
fcc3ac978f | ||
|
|
2bbeaa8198 | ||
|
|
70308d19ae | ||
|
|
143897cf18 | ||
|
|
ddc90a05d9 | ||
|
|
bbbadb1c32 | ||
|
|
8995835d8e | ||
|
|
df3c119f5f | ||
|
|
6a2ba73412 | ||
|
|
cbee8cc541 | ||
|
|
22f186af29 | ||
|
|
77ab385db8 | ||
|
|
13495ee32e | ||
|
|
254ce7d5d2 | ||
|
|
4e1053d037 | ||
|
|
2fcc6e168f | ||
|
|
96ea0ae690 | ||
|
|
aa66001981 | ||
|
|
173ff943a4 | ||
|
|
79ac73bb95 | ||
|
|
2143832c25 | ||
|
|
c656e36265 | ||
|
|
8564adca6a | ||
|
|
19c9922115 | ||
|
|
b22a6f204a | ||
|
|
daa0cf9fc9 | ||
|
|
6365aa04df | ||
|
|
ff20e077b1 | ||
|
|
1106aaf18e | ||
|
|
872ba225b4 | ||
|
|
95c15efa92 | ||
|
|
c179cec8a0 | ||
|
|
97f96396c5 | ||
|
|
e05cac1261 | ||
|
|
f9d8894f37 | ||
|
|
5bd5a76722 | ||
|
|
2fbb4f3725 | ||
|
|
61e1b18eb9 | ||
|
|
08c1710326 | ||
|
|
39d3baf1b5 | ||
|
|
fd4753d190 | ||
|
|
29745367f7 | ||
|
|
25bb4f08ba | ||
|
|
40a13c16eb | ||
|
|
8ad2c425bf | ||
|
|
2b6c9bc57e | ||
|
|
bebbee5abd | ||
|
|
99156499f1 | ||
|
|
9ad81581bb | ||
|
|
1b4cd1478b | ||
|
|
5fdf2e4403 | ||
|
|
319b523117 | ||
|
|
62823646b0 | ||
|
|
3c16758605 | ||
|
|
4705d2e38d | ||
|
|
05b405f76e | ||
|
|
f54b2788de | ||
|
|
6ac0c7b301 | ||
|
|
c44cc9906e | ||
|
|
ecd5671e1a | ||
|
|
c83f729eea | ||
|
|
10afd2dfef | ||
|
|
8229b8320f | ||
|
|
50493cf725 | ||
|
|
3937b80254 | ||
|
|
bcb7aaf13c | ||
|
|
f9d7ec7f47 | ||
|
|
b7d43edf22 | ||
|
|
0f0060f0f6 | ||
|
|
036bad3912 | ||
|
|
c9d675798b | ||
|
|
10703750f9 | ||
|
|
4d942851d3 | ||
|
|
1434c31b2f | ||
|
|
74405b2842 | ||
|
|
1070d18085 | ||
|
|
b729c13c7a | ||
|
|
1c99327bfd | ||
|
|
61279b0e59 | ||
|
|
31cb17a41d | ||
|
|
f9349d5545 | ||
|
|
c3703494eb | ||
|
|
d94ff7c4fa | ||
|
|
01e0bf4d6d | ||
|
|
ca5f1a47fd | ||
|
|
54af8ee7c6 | ||
|
|
8572b565f3 | ||
|
|
ea1cc1c65a | ||
|
|
4610c61bd4 | ||
|
|
02f04ea9c4 | ||
|
|
1ce4db6be4 | ||
|
|
888291a99d | ||
|
|
3f9773a4cf | ||
|
|
a223c721aa | ||
|
|
5bce57b1f8 | ||
|
|
3666c34845 | ||
|
|
0dceccac46 | ||
|
|
59a2644e0f | ||
|
|
6c33a7304d | ||
|
|
e89f01a525 | ||
|
|
7181b45461 | ||
|
|
b7ce52f476 | ||
|
|
d2a8cd961f | ||
|
|
c152dbf4bf | ||
|
|
594a111bc3 | ||
|
|
005be2fe5a | ||
|
|
8f194e6d9e | ||
|
|
e3a5cb464c | ||
|
|
779f0df83e | ||
|
|
086d9bdbb6 | ||
|
|
9dcaa46bc7 | ||
|
|
3bca95a4da | ||
|
|
be09935287 | ||
|
|
410c338da8 | ||
|
|
be0606ede6 | ||
|
|
f54a84420a | ||
|
|
6a0d1e3b8b | ||
|
|
33127cd1bb | ||
|
|
5cd03312e1 | ||
|
|
391c0dcaf8 | ||
|
|
0b7b9599d3 | ||
|
|
b45ff69376 | ||
|
|
1836d0a127 | ||
|
|
048e156e59 | ||
|
|
a85be60e30 | ||
|
|
90d5c9eca6 | ||
|
|
1c8f0c7d9c | ||
|
|
f8d1c9ce05 | ||
|
|
28052bac23 | ||
|
|
c361a940eb | ||
|
|
fbc1e936db | ||
|
|
84661f88fd | ||
|
|
10b4c88872 | ||
|
|
10ddc7d941 | ||
|
|
b1c63e2cb9 | ||
|
|
3f6544d03b | ||
|
|
a9f211dfd5 | ||
|
|
f2427abbf4 | ||
|
|
a6187f9838 | ||
|
|
384600ed95 | ||
|
|
6d06f03ef9 | ||
|
|
0829c714fd | ||
|
|
9e2251755f | ||
|
|
436f871be2 | ||
|
|
8d09f8e9b2 | ||
|
|
e4d43a6790 | ||
|
|
bb3d9d3466 | ||
|
|
bd208e259c | ||
|
|
1a1cfec3e5 | ||
|
|
1e95e98549 | ||
|
|
82056b5650 | ||
|
|
c0d118ee98 | ||
|
|
da13177292 | ||
|
|
4cc38ca564 | ||
|
|
fa945c981e | ||
|
|
63d76c6b71 | ||
|
|
9b749a8f67 | ||
|
|
1ce1d5c79a | ||
|
|
0c2dd73334 | ||
|
|
7331f14e0a | ||
|
|
d44f2fd7cd | ||
|
|
4da7eddc69 | ||
|
|
3ebe30a9c0 | ||
|
|
e959361df9 | ||
|
|
7773506361 | ||
|
|
9db652a501 | ||
|
|
27ebfd7f23 | ||
|
|
96f80e0008 | ||
|
|
5f3c208161 | ||
|
|
d402f33c74 | ||
|
|
879da4dca2 | ||
|
|
3e862790e6 | ||
|
|
425e36bff6 | ||
|
|
705ecbdf72 | ||
|
|
c658d67ac8 | ||
|
|
c46055b469 | ||
|
|
66e4b89d1a | ||
|
|
38b9f1d68c | ||
|
|
19b8a4e771 | ||
|
|
937ffea4ab | ||
|
|
1ae49a3d47 | ||
|
|
c76daf50db | ||
|
|
9e5c797243 | ||
|
|
662c4afcdf | ||
|
|
9b50b97e79 | ||
|
|
d00cefc37f | ||
|
|
1f94c13e25 | ||
|
|
75801ea717 | ||
|
|
b845f5086e | ||
|
|
8c8e6ec551 | ||
|
|
a4aecee18d | ||
|
|
3c0d445824 | ||
|
|
c36c6dc42d | ||
|
|
f7f8f14725 | ||
|
|
9402bf4baf | ||
|
|
12fcdcdb2d | ||
|
|
61735ed4aa | ||
|
|
3c65d252b6 | ||
|
|
6423859195 | ||
|
|
53df34d6f2 | ||
|
|
ed762c9be3 | ||
|
|
f05f14b12a | ||
|
|
183b5cb29b | ||
|
|
07193b1fb2 | ||
|
|
b24f8f538b | ||
|
|
a259174415 | ||
|
|
3d93c2a4b1 | ||
|
|
8c112791ef | ||
|
|
0ff4553c94 | ||
|
|
1e6094b5ee | ||
|
|
a646d97aec | ||
|
|
57f4980802 | ||
|
|
2477f5b696 | ||
|
|
6463422e81 | ||
|
|
3daf041698 | ||
|
|
933456ecdf | ||
|
|
ab18f72f69 | ||
|
|
28465cf2bf | ||
|
|
4cef5c547e | ||
|
|
057abf8024 | ||
|
|
20de5658e9 | ||
|
|
4a2ed2e0f7 | ||
|
|
3dc574bc48 | ||
|
|
d43a42b646 | ||
|
|
823c46a6df | ||
|
|
919c0bc8ae | ||
|
|
54d62a19cd | ||
|
|
18304fb710 | ||
|
|
cc1afbed5d | ||
|
|
a195acfee9 | ||
|
|
e22ec4c20b | ||
|
|
7c8f4f9db8 | ||
|
|
d28ff1e438 | ||
|
|
5af7499fdb | ||
|
|
6588d783cc | ||
|
|
f1b8279d50 | ||
|
|
252d31ffac | ||
|
|
8a98cca4fa | ||
|
|
0b8486c1a7 | ||
|
|
b0bd0664f9 | ||
|
|
286fd7e0ce | ||
|
|
42f5d28369 | ||
|
|
ea5d873cc3 | ||
|
|
ee8608469e | ||
|
|
f541625318 | ||
|
|
ee70fb8483 | ||
|
|
f79e093f52 | ||
|
|
254d9280b9 | ||
|
|
ddd9c765b8 | ||
|
|
080f204eed | ||
|
|
f30325849a | ||
|
|
8caa5b3e60 | ||
|
|
0daeed49c1 | ||
|
|
34540e12f3 | ||
|
|
b954a81630 | ||
|
|
56472d6746 | ||
|
|
2721649313 | ||
|
|
24d7de60ab | ||
|
|
441f9296ad | ||
|
|
3116a152e7 | ||
|
|
77784c4224 | ||
|
|
bf13c7ca8c | ||
|
|
26c779a2c5 | ||
|
|
1bfaf6c3ad | ||
|
|
69229ff6af | ||
|
|
719164524b | ||
|
|
5a67b17916 | ||
|
|
db4968b1ca | ||
|
|
e50f46e38a | ||
|
|
adc8988f6c | ||
|
|
a480ad9c11 | ||
|
|
d9be685f89 | ||
|
|
bd9db140de | ||
|
|
74c0204590 | ||
|
|
ce9d3299b1 | ||
|
|
8b27bc194d | ||
|
|
1a6b4a6683 | ||
|
|
2ae4d6e090 | ||
|
|
9467171c84 | ||
|
|
402db729b7 | ||
|
|
e16be12438 | ||
|
|
605912443d | ||
|
|
62acc14f4a | ||
|
|
017066a311 | ||
|
|
273b122ca8 | ||
|
|
ce2ec3dd6c | ||
|
|
fda22605cc | ||
|
|
1076fa6230 | ||
|
|
019af59c8a | ||
|
|
08bb644b58 | ||
|
|
6ec1273e61 | ||
|
|
ba5df9a4ae | ||
|
|
050d77ef12 | ||
|
|
f8ccaeab08 | ||
|
|
3c4c464e4a | ||
|
|
2a5730def9 | ||
|
|
48fe3e6b86 | ||
|
|
eecbc3aa2c | ||
|
|
e177f14446 | ||
|
|
493ab0396a | ||
|
|
c776150ce0 | ||
|
|
b6bca982bb | ||
|
|
aa8a243bf1 | ||
|
|
75da037656 | ||
|
|
56a06a5581 | ||
|
|
0af67bea3a | ||
|
|
08b8d899b7 | ||
|
|
cf07cb39c4 | ||
|
|
810d10c1c2 | ||
|
|
342bdcfaac | ||
|
|
d933dbb31a | ||
|
|
fe61364178 | ||
|
|
88c3c03f99 | ||
|
|
c21b16f5c7 | ||
|
|
2481a2504f | ||
|
|
dcb1e8040a | ||
|
|
0e1c611034 | ||
|
|
fccd9d642c | ||
|
|
849f1becc7 | ||
|
|
be6c4a63ed | ||
|
|
4e48483276 | ||
|
|
6817a54aa0 | ||
|
|
482f235dcc | ||
|
|
90b863c4ae | ||
|
|
8541a87d1f | ||
|
|
002adeb00e | ||
|
|
30e7d1ba7c | ||
|
|
0923f2e120 | ||
|
|
38a0c8e19f | ||
|
|
facf90d964 | ||
|
|
cca3482bc0 | ||
|
|
6178ca550b | ||
|
|
dc51e467d4 | ||
|
|
300827c1f0 | ||
|
|
aacf09a444 | ||
|
|
0123488828 | ||
|
|
a43b188f36 | ||
|
|
f0285ef8f2 | ||
|
|
70a0ffbf3d | ||
|
|
f2e6a4fc55 | ||
|
|
df5fd76ae2 | ||
|
|
f34d258b45 | ||
|
|
28c52763c8 | ||
|
|
ebe22fa7f0 | ||
|
|
160327e471 | ||
|
|
dd080dbff2 | ||
|
|
d509886cd1 | ||
|
|
239a8f0af8 | ||
|
|
c0565306c3 | ||
|
|
79d159511d | ||
|
|
e123fc7e6f | ||
|
|
52fa30f389 | ||
|
|
1d744d5abc | ||
|
|
2629c12ade | ||
|
|
8fb6b1a5a9 | ||
|
|
d4a23c9a4f | ||
|
|
05d0f982a7 | ||
|
|
e3c8a3fcda | ||
|
|
8cd56d2705 | ||
|
|
f94d1f3cd8 | ||
|
|
5f64b74fad | ||
|
|
b422cd6f52 | ||
|
|
17698409b9 | ||
|
|
fb0dabebe1 | ||
|
|
f81805fbf4 | ||
|
|
596c9d4996 | ||
|
|
a7530dcce9 | ||
|
|
55d59eea80 | ||
|
|
0c66a1fb7b | ||
|
|
ad7ca5d287 | ||
|
|
b34be4730d | ||
|
|
1c264055eb | ||
|
|
12f41baff5 | ||
|
|
9a9ad1baa7 | ||
|
|
46c31278e7 | ||
|
|
a08dc3d422 | ||
|
|
158a74f79b | ||
|
|
bacf85ccf8 | ||
|
|
ef683bd7fa | ||
|
|
20c233fb8c | ||
|
|
ac21313190 | ||
|
|
8ba6918139 | ||
|
|
5e357b460d | ||
|
|
d660abe1f6 | ||
|
|
fd9617ec8f | ||
|
|
48ccdaab5e | ||
|
|
52d9548333 | ||
|
|
4706d28560 | ||
|
|
033f5de85d | ||
|
|
6760f6f03d | ||
|
|
e1a7862194 | ||
|
|
8ef53d229d | ||
|
|
c6d215f87c | ||
|
|
dccaed124c | ||
|
|
ccfca4a61a | ||
|
|
417a05f24f | ||
|
|
7a85f7576d | ||
|
|
8407ab3a74 | ||
|
|
c120ebd3ca | ||
|
|
d0635484a2 | ||
|
|
d3c487a28a | ||
|
|
14f46a5d5d | ||
|
|
00a8ca8273 | ||
|
|
deec457728 | ||
|
|
5a5508a973 | ||
|
|
357b285346 | ||
|
|
f8444b9e67 | ||
|
|
e0a224e414 | ||
|
|
9dfb128e1d | ||
|
|
462d1f0274 | ||
|
|
2e3803eef1 | ||
|
|
42b186eb94 | ||
|
|
ccdee9ec09 | ||
|
|
05eeb82efd | ||
|
|
6eefe64f4c | ||
|
|
5b96b19735 | ||
|
|
3764d877ce | ||
|
|
30e713c161 | ||
|
|
da3a76e441 | ||
|
|
adff467b50 | ||
|
|
d59f05ad8b | ||
|
|
9c3d124f48 | ||
|
|
4404b0f02e | ||
|
|
77533fba72 | ||
|
|
62d36ed0c2 | ||
|
|
94ad0123c7 | ||
|
|
109842f0fe | ||
|
|
d931d65cd8 | ||
|
|
b7861a7cb1 | ||
|
|
a49ad3bb48 | ||
|
|
d94acf5b78 | ||
|
|
fd0e1d1460 | ||
|
|
2ed9d5487e | ||
|
|
5dc44cb701 | ||
|
|
9e07c383fe | ||
|
|
9e1ec2768b | ||
|
|
39674e8c7f | ||
|
|
5dca4b7061 | ||
|
|
5d3cb25d14 | ||
|
|
6e337affbb | ||
|
|
87ab8cc15f | ||
|
|
b654e5cebd | ||
|
|
11958f2abf | ||
|
|
2a329ba92d | ||
|
|
b22487ef70 | ||
|
|
bf03a2f540 | ||
|
|
ece51a6f9f | ||
|
|
915dbffe72 | ||
|
|
fda0d6df1f | ||
|
|
25891f9dc0 | ||
|
|
35902adbdc | ||
|
|
981d15ee55 | ||
|
|
adfec3441b | ||
|
|
a208aa051f | ||
|
|
9068302357 | ||
|
|
1bb0439f19 | ||
|
|
f28585e245 | ||
|
|
99cfeb25ee | ||
|
|
6b7da9a39e | ||
|
|
18bba7baec | ||
|
|
ec8ffbc090 | ||
|
|
60eb1ca236 | ||
|
|
5e3756313c | ||
|
|
d303d5a423 | ||
|
|
938415aa79 | ||
|
|
9033710e56 | ||
|
|
2fd77e4034 | ||
|
|
b733d8205e | ||
|
|
f725ad09d7 | ||
|
|
e9a53c5b25 | ||
|
|
43e94cfe68 | ||
|
|
07d713734f | ||
|
|
4f004b8402 | ||
|
|
b1f4131af9 | ||
|
|
1adb19f427 | ||
|
|
fce4a4b1d9 | ||
|
|
61f35bcb5e | ||
|
|
0db68917a1 | ||
|
|
9da8ab9bdb | ||
|
|
8d1724df84 | ||
|
|
cd88d59937 | ||
|
|
cab4f5ce64 | ||
|
|
62ab1f8d00 | ||
|
|
f0e1439c79 | ||
|
|
5060918087 | ||
|
|
bf6b058152 | ||
|
|
40b607a73f | ||
|
|
2bdbba0eff | ||
|
|
058d821a7c | ||
|
|
4575ff89ad | ||
|
|
608454fcf2 | ||
|
|
58c1bec2da | ||
|
|
e1ce16c399 | ||
|
|
2d3a748286 | ||
|
|
06834dd8bf | ||
|
|
e4c0f19b1c | ||
|
|
84faf7a782 | ||
|
|
61db675ab1 | ||
|
|
59e72796e3 | ||
|
|
76e61a6358 | ||
|
|
455eceefa1 | ||
|
|
834e979060 | ||
|
|
ece36c8711 | ||
|
|
9b999a1ec8 | ||
|
|
80c53e15e5 | ||
|
|
a37b6077c1 | ||
|
|
fabfa392b7 | ||
|
|
8ff717cfd5 | ||
|
|
eae042d730 | ||
|
|
f6fda22160 | ||
|
|
c120ecab1a | ||
|
|
6afcbe90a1 | ||
|
|
130bde63cf | ||
|
|
c76e8f96d9 | ||
|
|
7b92014249 | ||
|
|
33df80559d | ||
|
|
c0d9d1e514 | ||
|
|
ed2567913b | ||
|
|
9a7bd94ce1 | ||
|
|
036aea5c7f | ||
|
|
1bc1311113 | ||
|
|
135fe6f2e6 | ||
|
|
f366a1d0dd | ||
|
|
b4cda3b349 | ||
|
|
0e92ae792c | ||
|
|
cf4247321c | ||
|
|
994be85579 | ||
|
|
8cdaf1a534 | ||
|
|
f9996d3643 | ||
|
|
6b7bcca21b | ||
|
|
c7109906bc | ||
|
|
63583ad630 | ||
|
|
4d063194ed | ||
|
|
c579e08614 | ||
|
|
40414a0f17 | ||
|
|
5e1ee6f06f | ||
|
|
f885333310 | ||
|
|
72149851cf | ||
|
|
e2ce971b70 | ||
|
|
802bb9b1c2 | ||
|
|
30ce642d88 | ||
|
|
bc901fad0b | ||
|
|
dae251fb43 | ||
|
|
f98a916a55 | ||
|
|
a7fd14ef36 | ||
|
|
5ff2eb1945 | ||
|
|
a60e82591f | ||
|
|
2ae59a5820 | ||
|
|
1d46427d51 | ||
|
|
8bd7009c02 | ||
|
|
cc90d546a5 | ||
|
|
e916ff5a0b | ||
|
|
54fa8f4867 | ||
|
|
7d92ee7d7a | ||
|
|
884388d0df | ||
|
|
50b386388e | ||
|
|
f03c0d7c57 | ||
|
|
83a3552b21 | ||
|
|
1462f54a65 | ||
|
|
b7cd1657b0 | ||
|
|
9d1ae432d5 | ||
|
|
1e32df5a26 | ||
|
|
07128d04b0 | ||
|
|
8d0c1348b1 | ||
|
|
7bcacdbd27 | ||
|
|
65c3bb3291 | ||
|
|
a08fa65fae | ||
|
|
85d8c9795a | ||
|
|
9a17dbbd68 | ||
|
|
f83827886e | ||
|
|
8964e98873 | ||
|
|
63e17e91bd | ||
|
|
f95cbe4ed2 | ||
|
|
9ddd1dac3a | ||
|
|
5ff0e67392 | ||
|
|
a60a2885e1 | ||
|
|
7e9ddf0c14 | ||
|
|
5cb82cca42 | ||
|
|
02edc35d3a | ||
|
|
a30c17ed91 | ||
|
|
d2dfd7ddb0 | ||
|
|
2a35b9912c | ||
|
|
bc097db09f | ||
|
|
75eb49ced3 | ||
|
|
cd2e3eec08 | ||
|
|
d72884a0e4 | ||
|
|
315e35965c | ||
|
|
f2fb3fc077 | ||
|
|
f4d9e3fbc6 | ||
|
|
d44f8e7ab4 | ||
|
|
b0438991bf | ||
|
|
0a23a469e2 | ||
|
|
2900e8afb7 | ||
|
|
e3e25785c7 | ||
|
|
7c4e1393fe | ||
|
|
b06736351b | ||
|
|
9c5a8c63ce | ||
|
|
e8c171be92 | ||
|
|
1b7aa9e48c | ||
|
|
51fd3e681c | ||
|
|
484510f763 | ||
|
|
7fde7327fe | ||
|
|
2c8094bf28 | ||
|
|
256d30847e | ||
|
|
0bbfee8716 | ||
|
|
8d58e81d28 | ||
|
|
8fb80d12c9 | ||
|
|
2b5eed3a38 | ||
|
|
dccd5305e7 | ||
|
|
bbb418d2af | ||
|
|
a5bae56f8d | ||
|
|
aa3d2f8787 | ||
|
|
e9750e145f | ||
|
|
d0cdefd972 | ||
|
|
451aa7f5da | ||
|
|
43ee6ef8f6 | ||
|
|
c366e8decc | ||
|
|
8610c61c18 | ||
|
|
bee3a3b012 | ||
|
|
dc2d46ca21 | ||
|
|
1b5346e86d | ||
|
|
8bc633aed9 | ||
|
|
ee3dee0570 | ||
|
|
69048d8f89 | ||
|
|
427025c2ed | ||
|
|
6deb336115 | ||
|
|
a8be115d4b | ||
|
|
115ae82b17 | ||
|
|
e4b357e8d3 | ||
|
|
560a7b2465 | ||
|
|
acfe05297b | ||
|
|
16579ff1a8 | ||
|
|
2dcf81a516 | ||
|
|
44f379e3d2 | ||
|
|
9be406c0a2 | ||
|
|
a030c50780 | ||
|
|
c9ca3a497f | ||
|
|
71886cd91c | ||
|
|
e60d46b2ec | ||
|
|
9829ca8d28 | ||
|
|
28c4651599 | ||
|
|
14de81520b | ||
|
|
3a11d335a2 | ||
|
|
0d3554cc49 | ||
|
|
6b458f3b55 | ||
|
|
874885671b | ||
|
|
a75f4dacab | ||
|
|
8c5a455f08 | ||
|
|
1b12cd46b2 | ||
|
|
42581469da | ||
|
|
562fa03c6c | ||
|
|
7389acd87f | ||
|
|
8feca2783f | ||
|
|
a290f7aba9 | ||
|
|
eb11f9f757 | ||
|
|
2ace19face | ||
|
|
25b6a94fd6 | ||
|
|
d0768b3dce | ||
|
|
b4c27f50ea | ||
|
|
669cb10f10 | ||
|
|
e9c0cd6d53 | ||
|
|
06708a8b7e | ||
|
|
fba8ca7817 | ||
|
|
37cae817a7 | ||
|
|
7d847cf179 | ||
|
|
a32c560f60 | ||
|
|
a4d4e640a2 | ||
|
|
74093976db | ||
|
|
76f17e3f95 | ||
|
|
ab4ce21927 | ||
|
|
eb14dedb63 | ||
|
|
004dfc1687 | ||
|
|
62b4b92815 | ||
|
|
e429bde5b8 | ||
|
|
6c3ee8d462 | ||
|
|
43f1c0d889 | ||
|
|
2cd1bb8cdd | ||
|
|
3d8bbdd01d | ||
|
|
1e90153f75 | ||
|
|
61ef68d4ae | ||
|
|
517953a097 | ||
|
|
5ca757ac05 | ||
|
|
1e69075099 | ||
|
|
5e12a4b238 | ||
|
|
9ddbad0b50 | ||
|
|
6e444c3289 | ||
|
|
385f8733ab | ||
|
|
42c0c50e1b | ||
|
|
3c17a8982a | ||
|
|
e0abf85014 | ||
|
|
35db6e5cde | ||
|
|
7abdb854ea | ||
|
|
924e50d135 | ||
|
|
0f70f7a169 | ||
|
|
7d4683d130 | ||
|
|
8803e96bb7 | ||
|
|
3a4220878d | ||
|
|
21ee02d4ed | ||
|
|
fbecb09d45 | ||
|
|
bbbec3b54a | ||
|
|
d62f7f3628 | ||
|
|
fc07a06248 | ||
|
|
c32682b245 | ||
|
|
fc502a55b3 | ||
|
|
d580a3fa26 | ||
|
|
639686253b | ||
|
|
1274731a02 | ||
|
|
9ca51fcd94 | ||
|
|
8cabec8a3b | ||
|
|
967b6cfc81 | ||
|
|
416ae76a94 | ||
|
|
05cfe65d8e | ||
|
|
d7dd804822 | ||
|
|
aa56a20240 | ||
|
|
23b85d078b | ||
|
|
154dad7cb4 | ||
|
|
0a4c552602 | ||
|
|
ae479449fc | ||
|
|
f215196bcb | ||
|
|
79b688535b | ||
|
|
b5bd3ec514 | ||
|
|
696cab7f65 | ||
|
|
9f3122df29 | ||
|
|
2ef1d5becb | ||
|
|
f5b5d94b27 | ||
|
|
3a61e9b62d | ||
|
|
8ec70cc42f | ||
|
|
e336bfbc1d | ||
|
|
bdd8579e7b | ||
|
|
9b19e67eac | ||
|
|
62a4ea9080 | ||
|
|
8dc9076de3 | ||
|
|
4a72481a7d | ||
|
|
ad22d2bab6 | ||
|
|
d879d70b7d | ||
|
|
ec01288930 | ||
|
|
6bb03bb176 | ||
|
|
fd085f5fde | ||
|
|
6e0b34d9d5 | ||
|
|
a69cee274f | ||
|
|
63126a8371 | ||
|
|
2a2e7524e8 | ||
|
|
87f1a84e0d | ||
|
|
08b90e08cf | ||
|
|
e5dad4622f | ||
|
|
f6f2010670 | ||
|
|
fa8b77392a | ||
|
|
00476f082b | ||
|
|
60eefda570 | ||
|
|
7532ba06cd | ||
|
|
a86ba2b704 | ||
|
|
4d9bd89544 | ||
|
|
a6dc770afc | ||
|
|
a4deda924a | ||
|
|
f75511e723 | ||
|
|
b72c8bb212 | ||
|
|
62eb33d936 | ||
|
|
aa481dc14d | ||
|
|
b2276950ca | ||
|
|
1c032405fe | ||
|
|
2ae9b9239d | ||
|
|
b390cb921e | ||
|
|
fbee7df8da | ||
|
|
43559a0158 | ||
|
|
0409a6102e | ||
|
|
30985196b2 | ||
|
|
f289072486 | ||
|
|
d244192783 | ||
|
|
87bf131f8e | ||
|
|
ff1d010745 | ||
|
|
c0a72f3cbe | ||
|
|
14db1291b6 | ||
|
|
76ab6bde62 | ||
|
|
df92a6e110 | ||
|
|
0836dec4a6 | ||
|
|
6ae345a9e1 | ||
|
|
4c283747a4 | ||
|
|
a504bc8d4f | ||
|
|
f6fcfeae06 | ||
|
|
11376e3a09 | ||
|
|
86d1650ede | ||
|
|
3c1d2a4236 | ||
|
|
c80cfc9574 | ||
|
|
4e47f203fb | ||
|
|
42bbf92111 | ||
|
|
e4be63222a | ||
|
|
061ff019ea | ||
|
|
84b0b4a713 | ||
|
|
f9d4cdca51 | ||
|
|
b2ab2a9b01 | ||
|
|
b044566309 | ||
|
|
14e95414ab | ||
|
|
88836f2d3a | ||
|
|
d2aefab3e2 | ||
|
|
a62e91af6f | ||
|
|
cdf473fb2c | ||
|
|
4f1730d929 | ||
|
|
4a3a13414b | ||
|
|
939ead833c | ||
|
|
0946c8dba8 | ||
|
|
47e1687029 | ||
|
|
9230519d91 | ||
|
|
915ddab072 | ||
|
|
7293910d45 | ||
|
|
3cfae1964e | ||
|
|
e02fc8c9a2 | ||
|
|
53fb2513d4 | ||
|
|
ecc0d65ee4 | ||
|
|
c8dcc686c0 | ||
|
|
543a6447ae | ||
|
|
78939a7152 | ||
|
|
b6bcb75dcf | ||
|
|
81e841f784 | ||
|
|
3e64daae0c | ||
|
|
124acbc17d | ||
|
|
0060823de6 | ||
|
|
e60999ca5d | ||
|
|
aab28fcc5d | ||
|
|
452c5981a8 | ||
|
|
ebf43b64af | ||
|
|
dbd95a96fb | ||
|
|
8362ec825f | ||
|
|
e44d240f22 | ||
|
|
c04722c8d5 | ||
|
|
26a5e5fa33 | ||
|
|
5b3837af9f | ||
|
|
6a64d5fe0e | ||
|
|
4ceae087fa | ||
|
|
321d45dc86 | ||
|
|
066b2b3803 | ||
|
|
448387f29c | ||
|
|
64b6eb42cc | ||
|
|
c2f4e689e8 | ||
|
|
f0d2856f44 | ||
|
|
0465a03aee | ||
|
|
ef7eaa925f | ||
|
|
e4d0fbaf37 | ||
|
|
0bd2e65d93 | ||
|
|
4f98f39f2a | ||
|
|
230364b3f3 | ||
|
|
5fa591c84f | ||
|
|
f70ef6bb14 | ||
|
|
9586b725ad | ||
|
|
a96a306901 | ||
|
|
366c0ca069 | ||
|
|
a22f8ce76c | ||
|
|
96c97df1e0 | ||
|
|
d683425ee1 | ||
|
|
cd9690a45a | ||
|
|
81338e9120 | ||
|
|
51c279047f | ||
|
|
a095f1255e | ||
|
|
2675b1f8e3 | ||
|
|
f4d39051e3 | ||
|
|
d8f682393f | ||
|
|
e592227628 | ||
|
|
853e8dcebc | ||
|
|
cd77b5867a | ||
|
|
8d80e25d08 | ||
|
|
8b0ee19d6e | ||
|
|
817b853472 | ||
|
|
cbc0597852 | ||
|
|
642f12e894 | ||
|
|
7a0ed9ecf6 | ||
|
|
a7d7c6e8f0 | ||
|
|
14c747a26c | ||
|
|
f1d57bd0df | ||
|
|
fc2bc0c715 | ||
|
|
47268cd6e0 | ||
|
|
214e7e4953 | ||
|
|
8161f387aa | ||
|
|
8f7d395a81 | ||
|
|
df9320bb8c | ||
|
|
0075f42c58 | ||
|
|
e76a05a436 | ||
|
|
e8eeb98131 | ||
|
|
67d47d59d3 | ||
|
|
30ebcf6d76 | ||
|
|
468c1c5fc2 | ||
|
|
bf4a172cb5 | ||
|
|
55a4a836c6 | ||
|
|
2fe6f87b23 | ||
|
|
d0d9c91487 | ||
|
|
a3c7d8c0c2 | ||
|
|
e1b8565358 | ||
|
|
21b7ef1f21 | ||
|
|
547583a1bc | ||
|
|
1c513cfb6f | ||
|
|
ae9c69307d | ||
|
|
db5db54fcf | ||
|
|
34d28c1b34 | ||
|
|
92fa02514b | ||
|
|
5aad4489c1 | ||
|
|
acf990e621 | ||
|
|
4f211cf691 | ||
|
|
be467cbbc1 | ||
|
|
1293620bbd | ||
|
|
047c5d5f65 | ||
|
|
b66732bcd0 | ||
|
|
cc245b3de8 | ||
|
|
bb32b06063 | ||
|
|
f2f1fbddf3 | ||
|
|
ee3378f88b | ||
|
|
9f57e68252 | ||
|
|
70262f4e89 | ||
|
|
7305ff7792 | ||
|
|
b035f7aab4 | ||
|
|
401a9c4687 | ||
|
|
420645800e | ||
|
|
f4f33e3d1f | ||
|
|
7da0dfde7d | ||
|
|
9c77281942 | ||
|
|
b67f775404 | ||
|
|
ba844c4382 | ||
|
|
b8e526757a | ||
|
|
0797b71d95 | ||
|
|
17cef2461d | ||
|
|
cfec27eab8 | ||
|
|
0ae8f95313 | ||
|
|
3d2ff947e4 | ||
|
|
df5fead77c | ||
|
|
6081aca66c | ||
|
|
2e51e3f363 | ||
|
|
ea66bd16cb | ||
|
|
80e9ffe881 | ||
|
|
cc9cacc04b | ||
|
|
355ca2e7fe | ||
|
|
851cef40c4 | ||
|
|
4cde4a5885 | ||
|
|
c6d37b7195 | ||
|
|
618aa84555 | ||
|
|
82d53474d3 | ||
|
|
9d0d6d7475 | ||
|
|
f7923bdf52 | ||
|
|
e4598d5ebf | ||
|
|
fbe41afdca | ||
|
|
b94f702cc0 | ||
|
|
3951c8e35b | ||
|
|
a331edafe8 | ||
|
|
a82b3acc2b | ||
|
|
2637698641 | ||
|
|
ffeb600382 | ||
|
|
171ed885eb | ||
|
|
e3e05a07f3 | ||
|
|
5a990de0d6 | ||
|
|
3b11245525 | ||
|
|
94923d3ddf | ||
|
|
37a1a5246b | ||
|
|
428cfa3fe0 | ||
|
|
d08a100259 | ||
|
|
be567b9c0e | ||
|
|
748231b8f1 | ||
|
|
48b1fbe66e | ||
|
|
30fb116676 | ||
|
|
c6149cedcc | ||
|
|
5eb2b92397 | ||
|
|
26bbd6672f | ||
|
|
3cfacafb16 | ||
|
|
d3bc318307 | ||
|
|
405200d109 | ||
|
|
6dfb4dd989 | ||
|
|
763840e7fc | ||
|
|
a9f9a8ef7f | ||
|
|
2480ad34af | ||
|
|
e2f6e3324a | ||
|
|
ca7b5cab86 | ||
|
|
76471a6db1 | ||
|
|
dd8e51a1d9 | ||
|
|
83a6a8663d | ||
|
|
3c6fc62a8a | ||
|
|
5fff3bd09e | ||
|
|
9cbfb930a4 | ||
|
|
4015bf7d3b | ||
|
|
7a7dc9b2b7 | ||
|
|
0c993c069d | ||
|
|
d04035dd3f | ||
|
|
5e18528d02 | ||
|
|
68e42e9c5a | ||
|
|
495f8bf968 | ||
|
|
506a9a2e3f | ||
|
|
95992e918a | ||
|
|
cf53edf604 | ||
|
|
a581879a8e | ||
|
|
7581205800 | ||
|
|
4ed742fa4a | ||
|
|
d3cb258440 | ||
|
|
2d42c21c1a | ||
|
|
1e2700cde1 | ||
|
|
6c39a89636 | ||
|
|
e5f8883399 | ||
|
|
92b9a40891 | ||
|
|
7d45be983b | ||
|
|
63c60f3e6f | ||
|
|
badadbf469 | ||
|
|
c32b665c12 | ||
|
|
b37f60053d | ||
|
|
87d96b285b | ||
|
|
0ad12719f0 | ||
|
|
8ad80c7a1a | ||
|
|
7a17c78a51 | ||
|
|
05acdc4c5c | ||
|
|
0787252f36 | ||
|
|
c8089bfc32 | ||
|
|
1f38f5fd66 | ||
|
|
1fb1edb2fa | ||
|
|
9f5aa292ab | ||
|
|
92e61db752 | ||
|
|
67977a944c | ||
|
|
9b170483da | ||
|
|
71ecc3c59e | ||
|
|
04039f5bc3 | ||
|
|
94d0bccd96 | ||
|
|
72a12636b3 | ||
|
|
bfbc69fb25 | ||
|
|
206dc36a78 | ||
|
|
54a35674bc | ||
|
|
d73bf51fcb | ||
|
|
65f285e93f | ||
|
|
41f842e581 | ||
|
|
9879f749e4 | ||
|
|
b88686816b | ||
|
|
59219a8f55 | ||
|
|
08da60b1b0 | ||
|
|
6481f38f66 | ||
|
|
987b838856 | ||
|
|
4706c971d6 | ||
|
|
8ba79cce2a | ||
|
|
bfa1533ebf | ||
|
|
5db8069872 | ||
|
|
3a48b155e2 | ||
|
|
c5af04ec2b | ||
|
|
46692fd3dd | ||
|
|
4aa27ce269 | ||
|
|
db38756b88 | ||
|
|
62f0b6ad04 | ||
|
|
65e32d351b | ||
|
|
e7787b18a3 | ||
|
|
e77127e2d5 | ||
|
|
bc11e35d35 | ||
|
|
39940b3cc7 | ||
|
|
d2d7b6805e | ||
|
|
9df45f6564 | ||
|
|
a44a25f2e7 | ||
|
|
37827dfda1 | ||
|
|
827b69076a | ||
|
|
b5d830361a | ||
|
|
2ec595f8b0 | ||
|
|
9d61f22296 | ||
|
|
69a99667a3 | ||
|
|
2665df0f1e | ||
|
|
6d5fc0a082 | ||
|
|
41d12504ff | ||
|
|
20e069b5b2 | ||
|
|
5f0a065f4b | ||
|
|
f7c5e8773d | ||
|
|
990b38a4c6 | ||
|
|
d48571cb04 | ||
|
|
1e7bdaa991 | ||
|
|
52acd88e97 | ||
|
|
b265375148 | ||
|
|
fcd40af7c9 | ||
|
|
da1f339fd1 | ||
|
|
8d949fa1fc | ||
|
|
83f0d70291 | ||
|
|
d9504360d9 | ||
|
|
bcd21f6fd1 | ||
|
|
09c34ff006 | ||
|
|
dfc3f0a5d3 | ||
|
|
0a3f1dad50 | ||
|
|
3772e1e839 | ||
|
|
c4f5416adf | ||
|
|
fcdb9aca5d | ||
|
|
eaadcca1a9 | ||
|
|
f0bff56146 | ||
|
|
1760e8019b | ||
|
|
92e2177ed3 | ||
|
|
444b45a0c0 | ||
|
|
de72e6d6af | ||
|
|
32a8efad0e | ||
|
|
a35e149e13 | ||
|
|
f8523cf2b6 | ||
|
|
4e1df42f36 | ||
|
|
9a60ee9fe6 | ||
|
|
4cba0dac6e | ||
|
|
19f1ef75fd | ||
|
|
0561ba1f83 | ||
|
|
b29172ad18 | ||
|
|
312ced7e62 | ||
|
|
8f201944a4 | ||
|
|
6c9a350e43 | ||
|
|
a8881d146a | ||
|
|
6f1be59b4c | ||
|
|
5a15fcbbb5 | ||
|
|
40d1b7a654 | ||
|
|
9084e6b679 | ||
|
|
2f280151d4 | ||
|
|
ccb4fb13a9 | ||
|
|
b07c3b62cf | ||
|
|
d4805acef7 | ||
|
|
0637304a4f | ||
|
|
1454ac9299 | ||
|
|
8f9089f0a3 | ||
|
|
83ccec26ee | ||
|
|
db427c0bf1 | ||
|
|
0785ab9ee1 | ||
|
|
3882bddc8a | ||
|
|
767dcd1e9f | ||
|
|
7e997b224b | ||
|
|
1c11442aea | ||
|
|
7a08eea518 | ||
|
|
cb14ca4627 | ||
|
|
7a6a8bc707 | ||
|
|
157d63e2ed | ||
|
|
cc3ba89ab3 | ||
|
|
f9da876818 | ||
|
|
88135f93fe | ||
|
|
1148e391a6 | ||
|
|
f7c5706004 | ||
|
|
569a23759a | ||
|
|
3120afb55e | ||
|
|
4d565b853e | ||
|
|
e991241ad2 | ||
|
|
22e7756083 | ||
|
|
c65f537b8f | ||
|
|
f2e48df7ea | ||
|
|
935792fa9f | ||
|
|
3b4dc45984 | ||
|
|
fc747a94bd | ||
|
|
d9b1418f36 | ||
|
|
443016790a | ||
|
|
ca9253ecd5 | ||
|
|
ed8960d71f | ||
|
|
395b11474e | ||
|
|
71c2cb93cf | ||
|
|
615438f1dd | ||
|
|
dd14c94202 | ||
|
|
1c7fb79b33 | ||
|
|
0c8ac1539c | ||
|
|
c6c16cd488 | ||
|
|
86bd65556f | ||
|
|
a56502b814 | ||
|
|
24137df013 | ||
|
|
b945473422 | ||
|
|
d1fd6bfc8a | ||
|
|
ab7db9d084 | ||
|
|
c36007f216 | ||
|
|
1d8cc18411 | ||
|
|
0ec31c689d | ||
|
|
723fc52d1c | ||
|
|
8f15b098fb | ||
|
|
073aedc18b | ||
|
|
035abf03cb | ||
|
|
5808e85182 | ||
|
|
50dbc60a5c | ||
|
|
dbdc83c544 | ||
|
|
3551b3a8d4 | ||
|
|
1d743afd2a | ||
|
|
3240d3161b | ||
|
|
094bf69fab | ||
|
|
706226298a | ||
|
|
322bbb5d95 | ||
|
|
3d9bd3b646 | ||
|
|
5c12c6133f | ||
|
|
417367838c | ||
|
|
eb3480b514 | ||
|
|
6f1cc78329 | ||
|
|
a2faab036c | ||
|
|
a32441543c | ||
|
|
f4497402ca | ||
|
|
ef6548bc82 | ||
|
|
99ec7d43c5 | ||
|
|
f1bf0b3dee | ||
|
|
ec23cae38d | ||
|
|
771e3237cf | ||
|
|
ae72146d14 | ||
|
|
20d6865323 | ||
|
|
89e13b0bac | ||
|
|
8fa36ac14c | ||
|
|
e557782c64 | ||
|
|
7cc7f3fbcf | ||
|
|
3f293a6d23 | ||
|
|
309b09f6ce | ||
|
|
0b7e9f3d62 | ||
|
|
58c17ffd5c | ||
|
|
7d3ba23a9f | ||
|
|
ca2e4f5b37 | ||
|
|
d82174fec5 | ||
|
|
033c65b79b | ||
|
|
dbc8e5d9cc | ||
|
|
42407935d5 | ||
|
|
e7d558b0bf | ||
|
|
290b530b92 | ||
|
|
18726bdccd | ||
|
|
06b0498abb | ||
|
|
7a7627e931 | ||
|
|
c6038e9cee | ||
|
|
0e05596155 | ||
|
|
0ca212f911 | ||
|
|
94c2b9deda | ||
|
|
2016a1bb0d | ||
|
|
6841ba9c85 | ||
|
|
d5988f2c04 | ||
|
|
a56c9c3a46 | ||
|
|
9d0bbdcd4d | ||
|
|
4bfaac3414 | ||
|
|
d54c044fd9 | ||
|
|
1def66bb77 | ||
|
|
75041db2e9 | ||
|
|
356948cdf7 | ||
|
|
db92abf3ee | ||
|
|
d5d59abf13 | ||
|
|
69c1e3e8e0 | ||
|
|
963c4e3e2b | ||
|
|
cc4c735a27 | ||
|
|
175517a9dc | ||
|
|
9cb3548393 | ||
|
|
ac0dea317f | ||
|
|
839dfb9709 | ||
|
|
2c7a4098f3 | ||
|
|
0228396376 | ||
|
|
c5aa0eba48 | ||
|
|
ac4472975d | ||
|
|
379f5fbaaf | ||
|
|
af71408c52 | ||
|
|
b7a4fa1e7c | ||
|
|
92b6e45ef2 | ||
|
|
acf6f67627 | ||
|
|
017c34dcde | ||
|
|
f6e54918b2 | ||
|
|
75b3c33526 | ||
|
|
f784760735 | ||
|
|
a739b3a96e | ||
|
|
0a8e0f00c2 | ||
|
|
00c4cf4893 | ||
|
|
e8e9ea9e2f | ||
|
|
c9cdb6767b | ||
|
|
24f9c1c762 | ||
|
|
766a880799 | ||
|
|
07de0dbeb0 | ||
|
|
d1752f2ff0 | ||
|
|
ef27234ef8 | ||
|
|
685862f1de | ||
|
|
97621c45a8 | ||
|
|
b96d433796 | ||
|
|
03d784c284 | ||
|
|
02ef97724f | ||
|
|
93e2c65d30 | ||
|
|
d02bf65a55 | ||
|
|
fb2f566314 | ||
|
|
2227870854 | ||
|
|
b195509843 | ||
|
|
2100fa0606 | ||
|
|
3fe43bdfa3 | ||
|
|
26ad3d48af | ||
|
|
9c224fefb7 | ||
|
|
e4db873e43 | ||
|
|
f06d53b3d2 | ||
|
|
4ef706b716 | ||
|
|
b8be2c9e13 | ||
|
|
f05c763119 | ||
|
|
262b3bb3b3 | ||
|
|
d3ea71c726 | ||
|
|
62ccfaa9c0 | ||
|
|
c0b169f7dd | ||
|
|
3d68c77ed4 | ||
|
|
a2e241966e | ||
|
|
7bf7944360 | ||
|
|
9f72b074d5 | ||
|
|
59b7934aa2 | ||
|
|
a7a61a993c | ||
|
|
68d1c0854b | ||
|
|
fdd6f01415 | ||
|
|
54a045e25a | ||
|
|
862b76f165 | ||
|
|
5ed0b2ba6b | ||
|
|
bbe26618ac | ||
|
|
6f65d9e8d8 | ||
|
|
f1b0decbab | ||
|
|
c2b60698bc | ||
|
|
63ff4c1dca | ||
|
|
8987ec61fe | ||
|
|
a93627d274 | ||
|
|
90fe18b660 | ||
|
|
6182376d1f | ||
|
|
66235f7e77 | ||
|
|
49b61dab53 | ||
|
|
a10f2949a4 | ||
|
|
666d8ab5ad | ||
|
|
bbcf9e00fa |
9
.gitignore
vendored
9
.gitignore
vendored
@@ -8,15 +8,6 @@
|
||||
/node_modules
|
||||
/test.php
|
||||
/main.html
|
||||
/client/css/espo.css
|
||||
/client/css/espo-vertical.css
|
||||
/client/css/sakura.css
|
||||
/client/css/sakura-vertical.css
|
||||
/client/css/violet.css
|
||||
/client/css/violet-vertical.css
|
||||
/client/css/espo-rtl.css
|
||||
/client/css/hazyblue.css
|
||||
/client/css/hazyblue-vertical.css
|
||||
|
||||
/tests/unit/testData/cache/*
|
||||
!/tests/unit/testData/cache/.data
|
||||
|
||||
@@ -6,4 +6,4 @@ Before we can merge your pull request you need to accept our CLA [here](https://
|
||||
|
||||
## Issues
|
||||
|
||||
We don't provide developer help or any kind of support on github. Please use our [forum](http://forum.espocrm.com/) for this.
|
||||
We don't provide developer help or any kind of support on github. Please use our [forum](https://forum.espocrm.com) for this.
|
||||
|
||||
154
Gruntfile.js
154
Gruntfile.js
@@ -2,7 +2,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -35,12 +35,72 @@ module.exports = function (grunt) {
|
||||
'client/lib/bootstrap.min.js',
|
||||
'client/lib/bootstrap-datepicker.js',
|
||||
'client/lib/bull.js',
|
||||
'client/lib/marked.min.js',
|
||||
|
||||
'client/src/namespace.js',
|
||||
'client/src/exceptions.js',
|
||||
'client/src/loader.js',
|
||||
'client/src/utils.js'
|
||||
'client/src/utils.js',
|
||||
|
||||
'client/src/acl.js',
|
||||
'client/src/model.js',
|
||||
'client/src/model-offline.js',
|
||||
'client/src/ajax.js',
|
||||
'client/src/controller.js',
|
||||
|
||||
'client/src/ui.js',
|
||||
'client/src/acl-manager.js',
|
||||
'client/src/cache.js',
|
||||
'client/src/storage.js',
|
||||
'client/src/models/settings.js',
|
||||
'client/src/language.js',
|
||||
'client/src/metadata.js',
|
||||
'client/src/field-manager.js',
|
||||
'client/src/models/user.js',
|
||||
'client/src/models/preferences.js',
|
||||
'client/src/model-factory.js',
|
||||
'client/src/collection-factory.js',
|
||||
'client/src/pre-loader.js',
|
||||
'client/src/controllers/base.js',
|
||||
'client/src/router.js',
|
||||
'client/src/date-time.js',
|
||||
'client/src/layout-manager.js',
|
||||
'client/src/theme-manager.js',
|
||||
'client/src/session-storage.js',
|
||||
'client/src/view-helper.js',
|
||||
|
||||
'client/src/app.js'
|
||||
];
|
||||
|
||||
function camelCaseToHyphen (string){
|
||||
if (string == null) {
|
||||
return string;
|
||||
}
|
||||
return string.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
|
||||
}
|
||||
|
||||
var fs = require('fs');
|
||||
|
||||
var themeList = [];
|
||||
fs.readdirSync('application/Espo/Resources/metadata/themes').forEach(function (file) {
|
||||
themeList.push(file.substr(0, file.length - 5));
|
||||
});
|
||||
|
||||
var lessData = {};
|
||||
themeList.forEach(function (theme) {
|
||||
var name = camelCaseToHyphen(theme);
|
||||
var files = {};
|
||||
files['client/css/espo/'+name+'.css'] = 'frontend/less/'+name+'/main.less';
|
||||
files['client/css/espo/'+name+'-iframe.css'] = 'frontend/less/'+name+'/iframe/main.less';
|
||||
var o = {
|
||||
options: {
|
||||
yuicompress: true,
|
||||
},
|
||||
files: files
|
||||
};
|
||||
lessData[theme] = o;
|
||||
});
|
||||
|
||||
grunt.initConfig({
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
|
||||
@@ -59,89 +119,7 @@ module.exports = function (grunt) {
|
||||
start: ['build/*'],
|
||||
final: ['build/tmp'],
|
||||
},
|
||||
less: {
|
||||
espo: {
|
||||
options: {
|
||||
yuicompress: true,
|
||||
},
|
||||
files: {
|
||||
'client/css/espo.css': 'frontend/less/espo/main.less',
|
||||
}
|
||||
},
|
||||
espoVertical: {
|
||||
options: {
|
||||
yuicompress: true,
|
||||
},
|
||||
files: {
|
||||
'client/css/espo-vertical.css': 'frontend/less/espo-vertical/main.less',
|
||||
}
|
||||
},
|
||||
espoRtl: {
|
||||
options: {
|
||||
yuicompress: true
|
||||
},
|
||||
files: {
|
||||
'client/css/espo-rtl.css': 'frontend/less/espo-rtl/main.less'
|
||||
}
|
||||
},
|
||||
hazyblueVertical: {
|
||||
options: {
|
||||
yuicompress: true,
|
||||
},
|
||||
files: {
|
||||
'client/css/hazyblue-vertical.css': 'frontend/less/hazyblue-vertical/main.less',
|
||||
}
|
||||
},
|
||||
hazyblue: {
|
||||
options: {
|
||||
yuicompress: true,
|
||||
},
|
||||
files: {
|
||||
'client/css/hazyblue.css': 'frontend/less/hazyblue/main.less',
|
||||
}
|
||||
},
|
||||
sakura: {
|
||||
options: {
|
||||
yuicompress: true,
|
||||
},
|
||||
files: {
|
||||
'client/css/sakura.css': 'frontend/less/sakura/main.less',
|
||||
}
|
||||
},
|
||||
sakuraVertical: {
|
||||
options: {
|
||||
yuicompress: true,
|
||||
},
|
||||
files: {
|
||||
'client/css/sakura-vertical.css': 'frontend/less/sakura-vertical/main.less',
|
||||
}
|
||||
},
|
||||
violet: {
|
||||
options: {
|
||||
yuicompress: true,
|
||||
},
|
||||
files: {
|
||||
'client/css/violet.css': 'frontend/less/violet/main.less',
|
||||
}
|
||||
},
|
||||
violetVertical: {
|
||||
options: {
|
||||
yuicompress: true,
|
||||
},
|
||||
files: {
|
||||
'client/css/violet-vertical.css': 'frontend/less/violet-vertical/main.less',
|
||||
}
|
||||
}
|
||||
},
|
||||
cssmin: {
|
||||
minify: {
|
||||
files: {
|
||||
'build/tmp/client/css/espo.css': [
|
||||
'client/css/espo.css',
|
||||
]
|
||||
}
|
||||
},
|
||||
},
|
||||
less: lessData,
|
||||
uglify: {
|
||||
options: {
|
||||
mangle: false,
|
||||
@@ -168,10 +146,6 @@ module.exports = function (grunt) {
|
||||
],
|
||||
dest: 'build/tmp/client',
|
||||
},
|
||||
frontendHtml: {
|
||||
src: 'frontend/reset.html',
|
||||
dest: 'build/tmp/reset.html'
|
||||
},
|
||||
frontendLib: {
|
||||
expand: true,
|
||||
dot: true,
|
||||
@@ -311,10 +285,8 @@ module.exports = function (grunt) {
|
||||
'clean:start',
|
||||
'mkdir:tmp',
|
||||
'less',
|
||||
'cssmin',
|
||||
'uglify',
|
||||
'copy:frontendFolders',
|
||||
'copy:frontendHtml',
|
||||
'copy:frontendLib',
|
||||
'copy:backend',
|
||||
'replace',
|
||||
|
||||
10
README.md
10
README.md
@@ -8,10 +8,14 @@ Download the latest release from our [website](http://www.espocrm.com).
|
||||
|
||||
### Requirements
|
||||
|
||||
* PHP 5.5 or above (with pdo, json, gd, mcrypt extensions);
|
||||
* MySQL 5.1 or above.
|
||||
* PHP 5.6 or above (with pdo, json, gd, openssl, zip, imap, mbstring, curl extensions);
|
||||
* MySQL 5.5.3 or above.
|
||||
|
||||
For more information about server configuration see [this article](http://blog.espocrm.com/administration/server-configuration-for-espocrm/).
|
||||
For more information about server configuration see [this article](https://www.espocrm.com/documentation/administration/server-configuration/).
|
||||
|
||||
### Documentation
|
||||
|
||||
Documentation for administrators, users and developers is available [here](https://www.espocrm.com/documentation/).
|
||||
|
||||
### How to report bug
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
63
application/Espo/Acl/EmailAddress.php
Normal file
63
application/Espo/Acl/EmailAddress.php
Normal file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM 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.
|
||||
*
|
||||
* EspoCRM 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.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
|
||||
************************************************************************/
|
||||
|
||||
namespace Espo\Acl;
|
||||
|
||||
use \Espo\Entities\User as EntityUser;
|
||||
use \Espo\ORM\Entity;
|
||||
|
||||
class EmailAddress extends \Espo\Core\Acl\Base
|
||||
{
|
||||
public function checkEditInEntity(EntityUser $user, Entity $entity, Entity $excludeEntity)
|
||||
{
|
||||
$id = $entity->id;
|
||||
|
||||
$isFobidden = false;
|
||||
|
||||
$repository = $this->getEntityManager()->getRepository('EmailAddress');
|
||||
|
||||
if (!$user->isAdmin()) {
|
||||
$entityWithSameAddressList = $repository->getEntityListByAddressId($id, $excludeEntity);
|
||||
foreach ($entityWithSameAddressList as $e) {
|
||||
if (!$this->getAclManager()->check($user, $e, 'edit')) {
|
||||
$isFobidden = true;
|
||||
if (
|
||||
$e->get('isPortalUser') && $excludeEntity->getEntityType() === 'Contact' &&
|
||||
$e->get('contactId') === $excludeEntity->id
|
||||
) {
|
||||
$isFobidden = false;
|
||||
}
|
||||
if ($isFobidden) break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return !$isFobidden;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
45
application/Espo/Acl/Note.php
Normal file
45
application/Espo/Acl/Note.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM 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.
|
||||
*
|
||||
* EspoCRM 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.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
|
||||
************************************************************************/
|
||||
|
||||
namespace Espo\Acl;
|
||||
|
||||
use \Espo\Entities\User as EntityUser;
|
||||
use \Espo\ORM\Entity;
|
||||
|
||||
class Note extends \Espo\Core\Acl\Base
|
||||
{
|
||||
public function checkIsOwner(EntityUser $user, Entity $entity)
|
||||
{
|
||||
if ($entity->get('type') === 'Post' && $user->id === $entity->get('createdById')) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
63
application/Espo/Acl/PhoneNumber.php
Normal file
63
application/Espo/Acl/PhoneNumber.php
Normal file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM 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.
|
||||
*
|
||||
* EspoCRM 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.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
|
||||
************************************************************************/
|
||||
|
||||
namespace Espo\Acl;
|
||||
|
||||
use \Espo\Entities\User as EntityUser;
|
||||
use \Espo\ORM\Entity;
|
||||
|
||||
class PhoneNumber extends \Espo\Core\Acl\Base
|
||||
{
|
||||
public function checkEditInEntity(EntityUser $user, Entity $entity, Entity $excludeEntity)
|
||||
{
|
||||
$id = $entity->id;
|
||||
|
||||
$isFobidden = false;
|
||||
|
||||
$repository = $this->getEntityManager()->getRepository('PhoneNumber');
|
||||
|
||||
if (!$user->isAdmin()) {
|
||||
$entityWithSameNumberList = $repository->getEntityListByPhoneNumberId($id, $excludeEntity);
|
||||
foreach ($entityWithSameNumberList as $e) {
|
||||
if (!$this->getAclManager()->check($user, $e, 'edit')) {
|
||||
$isFobidden = true;
|
||||
if (
|
||||
$e->get('isPortalUser') && $excludeEntity->getEntityType() === 'Contact' &&
|
||||
$e->get('contactId') === $excludeEntity->id
|
||||
) {
|
||||
$isFobidden = false;
|
||||
}
|
||||
if ($isFobidden) break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return !$isFobidden;
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -30,6 +30,7 @@
|
||||
namespace Espo\Acl;
|
||||
|
||||
use \Espo\ORM\Entity;
|
||||
use \Espo\Entities\User as EntityUser;
|
||||
|
||||
class User extends \Espo\Core\Acl\Base
|
||||
{
|
||||
@@ -37,5 +38,36 @@ class User extends \Espo\Core\Acl\Base
|
||||
{
|
||||
return $user->id === $entity->id;
|
||||
}
|
||||
}
|
||||
|
||||
public function checkEntityCreate(EntityUser $user, Entity $entity, $data)
|
||||
{
|
||||
if (!$user->isAdmin()) {
|
||||
return false;
|
||||
}
|
||||
return $this->checkEntity($user, $entity, $data, 'create');
|
||||
}
|
||||
|
||||
public function checkEntityDelete(EntityUser $user, Entity $entity, $data)
|
||||
{
|
||||
if ($entity->id === 'system') {
|
||||
return false;
|
||||
}
|
||||
if (!$user->isAdmin()) {
|
||||
return false;
|
||||
}
|
||||
return parent::checkEntityDelete($user, $entity, $data);
|
||||
}
|
||||
|
||||
public function checkEntityEdit(EntityUser $user, Entity $entity, $data)
|
||||
{
|
||||
if ($entity->id === 'system') {
|
||||
return false;
|
||||
}
|
||||
if (!$user->isAdmin()) {
|
||||
if ($user->id !== $entity->id) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return $this->checkEntity($user, $entity, $data, 'edit');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
56
application/Espo/AclPortal/EmailAddress.php
Normal file
56
application/Espo/AclPortal/EmailAddress.php
Normal file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM 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.
|
||||
*
|
||||
* EspoCRM 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.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
|
||||
************************************************************************/
|
||||
|
||||
namespace Espo\AclPortal;
|
||||
|
||||
use \Espo\Entities\User as EntityUser;
|
||||
use \Espo\ORM\Entity;
|
||||
|
||||
class EmailAddress extends \Espo\Core\AclPortal\Base
|
||||
{
|
||||
public function checkEditInEntity(EntityUser $user, Entity $entity, Entity $excludeEntity)
|
||||
{
|
||||
$id = $entity->id;
|
||||
|
||||
$isFobidden = false;
|
||||
|
||||
$repository = $this->getEntityManager()->getRepository('EmailAddress');
|
||||
|
||||
if (!$user->isAdmin()) {
|
||||
$entityWithSameAddressList = $repository->getEntityListByAddressId($id, $excludeEntity);
|
||||
foreach ($entityWithSameAddressList as $e) {
|
||||
if (!$this->getAclManager()->check($user, $e, 'edit')) {
|
||||
$isFobidden = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return !$isFobidden;
|
||||
}
|
||||
}
|
||||
45
application/Espo/AclPortal/Note.php
Normal file
45
application/Espo/AclPortal/Note.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM 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.
|
||||
*
|
||||
* EspoCRM 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.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
|
||||
************************************************************************/
|
||||
|
||||
namespace Espo\AclPortal;
|
||||
|
||||
use \Espo\Entities\User as EntityUser;
|
||||
use \Espo\ORM\Entity;
|
||||
|
||||
class Note extends \Espo\Core\AclPortal\Base
|
||||
{
|
||||
public function checkIsOwner(EntityUser $user, Entity $entity)
|
||||
{
|
||||
if ($entity->get('type') === 'Post' && $user->id === $entity->get('createdById')) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
57
application/Espo/AclPortal/PhoneNumber.php
Normal file
57
application/Espo/AclPortal/PhoneNumber.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM 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.
|
||||
*
|
||||
* EspoCRM 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.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
|
||||
************************************************************************/
|
||||
|
||||
namespace Espo\AclPortal;
|
||||
|
||||
use \Espo\Entities\User as EntityUser;
|
||||
use \Espo\ORM\Entity;
|
||||
|
||||
class PhoneNumber extends \Espo\Core\AclPortal\Base
|
||||
{
|
||||
public function checkEditInEntity(EntityUser $user, Entity $entity, Entity $excludeEntity)
|
||||
{
|
||||
$id = $entity->id;
|
||||
|
||||
$isFobidden = false;
|
||||
|
||||
$repository = $this->getEntityManager()->getRepository('PhoneNumber');
|
||||
|
||||
if (!$user->isAdmin()) {
|
||||
$entityWithSameNumberList = $repository->getEntityListByPhoneNumberId($id, $excludeEntity);
|
||||
foreach ($entityWithSameNumberList as $e) {
|
||||
if (!$this->getAclManager()->check($user, $e, 'edit')) {
|
||||
$isFobidden = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return !$isFobidden;
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -53,7 +53,7 @@ class Admin extends \Espo\Core\Controllers\Base
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function postActionClearCache($params, $data)
|
||||
public function postActionClearCache($params)
|
||||
{
|
||||
$result = $this->getContainer()->get('dataManager')->clearCache();
|
||||
return $result;
|
||||
@@ -93,15 +93,19 @@ class Admin extends \Espo\Core\Controllers\Base
|
||||
}
|
||||
|
||||
$upgradeManager = new \Espo\Core\UpgradeManager($this->getContainer());
|
||||
$upgradeManager->install($data);
|
||||
$upgradeManager->install(get_object_vars($data));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function actionCronMessage($params, $data)
|
||||
public function actionCronMessage($params)
|
||||
{
|
||||
return $this->getContainer()->get('scheduledJob')->getSetupMessage();
|
||||
}
|
||||
|
||||
public function actionAdminNotificationList($params)
|
||||
{
|
||||
$adminNotificationManager = new \Espo\Core\Utils\AdminNotificationManager($this->getContainer());
|
||||
return $adminNotificationManager->getNotificationList();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -35,57 +35,16 @@ class App extends \Espo\Core\Controllers\Base
|
||||
{
|
||||
public function actionUser()
|
||||
{
|
||||
$preferences = $this->getPreferences()->getValues();
|
||||
unset($preferences['smtpPassword']);
|
||||
|
||||
$user = $this->getUser();
|
||||
if (!$user->has('teamsIds')) {
|
||||
$user->loadLinkMultipleField('teams');
|
||||
}
|
||||
if ($user->get('isPortalUser')) {
|
||||
$user->loadAccountField();
|
||||
$user->loadLinkMultipleField('accounts');
|
||||
}
|
||||
|
||||
$userData = $user->getValues();
|
||||
|
||||
$emailAddressList = [];
|
||||
foreach ($user->get('emailAddresses') as $emailAddress) {
|
||||
if ($emailAddress->get('invalid')) continue;
|
||||
if ($user->get('emailAddrses') === $emailAddress->get('name')) continue;
|
||||
$emailAddressList[] = $emailAddress->get('name');
|
||||
}
|
||||
if ($user->get('emailAddrses')) {
|
||||
array_unshift($emailAddressList, $user->get('emailAddrses'));
|
||||
}
|
||||
$userData['emailAddressList'] = $emailAddressList;
|
||||
|
||||
$settings = (object)[];
|
||||
foreach ($this->getConfig()->get('userItems') as $item) {
|
||||
$settings->$item = $this->getConfig()->get($item);
|
||||
}
|
||||
|
||||
unset($userData['authTokenId']);
|
||||
unset($userData['password']);
|
||||
|
||||
return array(
|
||||
'user' => $userData,
|
||||
'acl' => $this->getAcl()->getMap(),
|
||||
'preferences' => $preferences,
|
||||
'token' => $this->getUser()->get('token'),
|
||||
'settings' => $settings
|
||||
);
|
||||
return $this->getServiceFactory()->create('App')->getUserData();
|
||||
}
|
||||
|
||||
public function postActionDestroyAuthToken($params, $data)
|
||||
{
|
||||
$token = $data['token'];
|
||||
if (empty($token)) {
|
||||
if (empty($data->token)) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
$auth = new \Espo\Core\Utils\Auth($this->getContainer());
|
||||
return $auth->destroyAuthToken($token);
|
||||
return $auth->destroyAuthToken($data->token);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -34,32 +34,5 @@ use \Espo\Core\Exceptions\BadRequest;
|
||||
|
||||
class Attachment extends \Espo\Core\Controllers\Record
|
||||
{
|
||||
public function actionUpload($params, $data, $request)
|
||||
{
|
||||
if (!$request->isPost()) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
if (!$this->getAcl()->checkScope('Attachment', 'create')) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
$arr = explode(',', $data);
|
||||
if (count($arr) > 1) {
|
||||
list($prefix, $contents) = $arr;
|
||||
$contents = base64_decode($contents);
|
||||
} else {
|
||||
$contents = '';
|
||||
}
|
||||
|
||||
$attachment = $this->getEntityManager()->getEntity('Attachment');
|
||||
$this->getEntityManager()->saveEntity($attachment);
|
||||
$this->getContainer()->get('fileStorageManager')->putContents($attachment, $contents);
|
||||
|
||||
return array(
|
||||
'attachmentId' => $attachment->id
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
67
application/Espo/Controllers/AuthLogRecord.php
Normal file
67
application/Espo/Controllers/AuthLogRecord.php
Normal file
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM 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.
|
||||
*
|
||||
* EspoCRM 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.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
|
||||
************************************************************************/
|
||||
|
||||
namespace Espo\Controllers;
|
||||
|
||||
use \Espo\Core\Exceptions\Forbidden;
|
||||
|
||||
class AuthLogRecord extends \Espo\Core\Controllers\Record
|
||||
{
|
||||
protected function checkControllerAccess()
|
||||
{
|
||||
if (!$this->getUser()->isAdmin()) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
}
|
||||
|
||||
public function actionUpdate($params, $data, $request)
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function actionMassUpdate($params, $data, $request)
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function actionCreate($params, $data, $request)
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function actionCreateLink($params, $data, $request)
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
public function actionRemoveLink($params, $data, $request)
|
||||
{
|
||||
throw new Forbidden();
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -42,12 +42,17 @@ class AuthToken extends \Espo\Core\Controllers\Record
|
||||
|
||||
public function actionUpdate($params, $data, $request)
|
||||
{
|
||||
$dataAr = get_object_vars($data);
|
||||
|
||||
if (
|
||||
is_array($data) &&
|
||||
array_key_exists('isActive', $data) &&
|
||||
$data['isActive'] === false &&
|
||||
count(array_keys($data)) === 1)
|
||||
{
|
||||
is_object($data)
|
||||
&&
|
||||
isset($data->isActive)
|
||||
&&
|
||||
$data->isActive === false
|
||||
&&
|
||||
count(array_keys($dataAr)) === 1
|
||||
) {
|
||||
return parent::actionUpdate($params, $data, $request);
|
||||
}
|
||||
throw new Forbidden();
|
||||
@@ -55,16 +60,19 @@ class AuthToken extends \Espo\Core\Controllers\Record
|
||||
|
||||
public function actionMassUpdate($params, $data, $request)
|
||||
{
|
||||
if (empty($data['attributes'])) {
|
||||
if (empty($data->attributes)) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
$attributes = $data['attributes'];
|
||||
$attributes = $data->attributes;
|
||||
|
||||
if (
|
||||
is_object($attributes) &&
|
||||
isset($attributes->isActive) &&
|
||||
$attributes->isActive === false &&
|
||||
is_object($attributes)
|
||||
&&
|
||||
isset($attributes->isActive)
|
||||
&&
|
||||
$attributes->isActive === false
|
||||
&&
|
||||
count(array_keys(get_object_vars($attributes))) === 1
|
||||
) {
|
||||
return parent::actionMassUpdate($params, $data, $request);
|
||||
@@ -87,4 +95,3 @@ class AuthToken extends \Espo\Core\Controllers\Record
|
||||
throw new Forbidden();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
55
application/Espo/Controllers/DataPrivacy.php
Normal file
55
application/Espo/Controllers/DataPrivacy.php
Normal file
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM 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.
|
||||
*
|
||||
* EspoCRM 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.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
|
||||
************************************************************************/
|
||||
|
||||
namespace Espo\Controllers;
|
||||
|
||||
use Espo\Core\Exceptions\Error;
|
||||
use Espo\Core\Exceptions\Forbidden;
|
||||
use Espo\Core\Exceptions\NotFound;
|
||||
use Espo\Core\Exceptions\BadRequest;
|
||||
|
||||
class DataPrivacy extends \Espo\Core\Controllers\Base
|
||||
{
|
||||
protected function checkControllerAccess()
|
||||
{
|
||||
if ($this->getAcl()->get('dataPrivacyPermission') === 'no') {
|
||||
throw new Forbidden();
|
||||
}
|
||||
}
|
||||
|
||||
public function postActionErase($params, $data)
|
||||
{
|
||||
if (empty($data->entityType) || empty($data->id) || empty($data->fieldList) || !is_array($data->fieldList)) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
return $this->getServiceFactory()->create('DataPrivacy')->erase($data->entityType, $data->id, $data->fieldList);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -38,10 +38,10 @@ class Email extends \Espo\Core\Controllers\Record
|
||||
{
|
||||
public function postActionGetCopiedAttachments($params, $data, $request)
|
||||
{
|
||||
if (empty($data['id'])) {
|
||||
if (empty($data->id)) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
$id = $data['id'];
|
||||
$id = $data->id;
|
||||
|
||||
return $this->getRecordService()->getCopiedAttachments($id);
|
||||
}
|
||||
@@ -56,25 +56,25 @@ class Email extends \Espo\Core\Controllers\Record
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
if (is_null($data['password'])) {
|
||||
if ($data['type'] == 'preferences') {
|
||||
if (!$this->getUser()->isAdmin() && $data['id'] !== $this->getUser()->id) {
|
||||
if (is_null($data->password)) {
|
||||
if ($data->type == 'preferences') {
|
||||
if (!$this->getUser()->isAdmin() && $data->id !== $this->getUser()->id) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
$preferences = $this->getEntityManager()->getEntity('Preferences', $data['id']);
|
||||
$preferences = $this->getEntityManager()->getEntity('Preferences', $data->id);
|
||||
if (!$preferences) {
|
||||
throw new NotFound();
|
||||
}
|
||||
|
||||
if (is_null($data['password'])) {
|
||||
$data['password'] = $this->getContainer()->get('crypt')->decrypt($preferences->get('smtpPassword'));
|
||||
if (is_null($data->password)) {
|
||||
$data->password = $this->getContainer()->get('crypt')->decrypt($preferences->get('smtpPassword'));
|
||||
}
|
||||
} else if ($data['type'] == 'emailAccount') {
|
||||
} else if ($data->type == 'emailAccount') {
|
||||
if (!$this->getAcl()->checkScope('EmailAccount')) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
if (!empty($data['id'])) {
|
||||
$emailAccount = $this->getEntityManager()->getEntity('EmailAccount', $data['id']);
|
||||
if (!empty($data->id)) {
|
||||
$emailAccount = $this->getEntityManager()->getEntity('EmailAccount', $data->id);
|
||||
if (!$emailAccount) {
|
||||
throw new NotFound();
|
||||
}
|
||||
@@ -83,49 +83,62 @@ class Email extends \Espo\Core\Controllers\Record
|
||||
throw new Forbidden();
|
||||
}
|
||||
}
|
||||
if (is_null($data['password'])) {
|
||||
$data['password'] = $this->getContainer()->get('crypt')->decrypt($emailAccount->get('smtpPassword'));
|
||||
if (is_null($data->password)) {
|
||||
$data->password = $this->getContainer()->get('crypt')->decrypt($emailAccount->get('smtpPassword'));
|
||||
}
|
||||
}
|
||||
} else if ($data->type == 'inboundEmail') {
|
||||
if (!$this->getUser()->isAdmin()) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
if (!empty($data->id)) {
|
||||
$emailAccount = $this->getEntityManager()->getEntity('InboundEmail', $data->id);
|
||||
if (!$emailAccount) {
|
||||
throw new NotFound();
|
||||
}
|
||||
if (is_null($data->password)) {
|
||||
$data->password = $this->getContainer()->get('crypt')->decrypt($emailAccount->get('smtpPassword'));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!$this->getUser()->isAdmin()) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
if (is_null($data['password'])) {
|
||||
$data['password'] = $this->getConfig()->get('smtpPassword');
|
||||
if (is_null($data->password)) {
|
||||
$data->password = $this->getConfig()->get('smtpPassword');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $this->getRecordService()->sendTestEmail($data);
|
||||
return $this->getRecordService()->sendTestEmail(get_object_vars($data));
|
||||
}
|
||||
|
||||
public function postActionMarkAsRead($params, $data, $request)
|
||||
{
|
||||
if (!empty($data['ids'])) {
|
||||
$ids = $data['ids'];
|
||||
if (!empty($data->ids)) {
|
||||
$idList = $data->ids;
|
||||
} else {
|
||||
if (!empty($data['id'])) {
|
||||
$ids = [$data['id']];
|
||||
if (!empty($data->id)) {
|
||||
$idList = [$data->id];
|
||||
} else {
|
||||
throw new BadRequest();
|
||||
}
|
||||
}
|
||||
return $this->getRecordService()->markAsReadByIdList($ids);
|
||||
return $this->getRecordService()->markAsReadByIdList($idList);
|
||||
}
|
||||
|
||||
public function postActionMarkAsNotRead($params, $data, $request)
|
||||
{
|
||||
if (!empty($data['ids'])) {
|
||||
$ids = $data['ids'];
|
||||
if (!empty($data->ids)) {
|
||||
$idList = $data->ids;
|
||||
} else {
|
||||
if (!empty($data['id'])) {
|
||||
$ids = [$data['id']];
|
||||
if (!empty($data->id)) {
|
||||
$idList = [$data->id];
|
||||
} else {
|
||||
throw new BadRequest();
|
||||
}
|
||||
}
|
||||
return $this->getRecordService()->markAsNotReadByIdList($ids);
|
||||
return $this->getRecordService()->markAsNotReadByIdList($idList);
|
||||
}
|
||||
|
||||
public function postActionMarkAllAsRead($params, $data, $request)
|
||||
@@ -135,58 +148,58 @@ class Email extends \Espo\Core\Controllers\Record
|
||||
|
||||
public function postActionMarkAsImportant($params, $data, $request)
|
||||
{
|
||||
if (!empty($data['ids'])) {
|
||||
$ids = $data['ids'];
|
||||
if (!empty($data->ids)) {
|
||||
$idList = $data->ids;
|
||||
} else {
|
||||
if (!empty($data['id'])) {
|
||||
$ids = [$data['id']];
|
||||
if (!empty($data->id)) {
|
||||
$idList = [$data->id];
|
||||
} else {
|
||||
throw new BadRequest();
|
||||
}
|
||||
}
|
||||
return $this->getRecordService()->markAsImportantByIdList($ids);
|
||||
return $this->getRecordService()->markAsImportantByIdList($idList);
|
||||
}
|
||||
|
||||
public function postActionMarkAsNotImportant($params, $data, $request)
|
||||
{
|
||||
if (!empty($data['ids'])) {
|
||||
$ids = $data['ids'];
|
||||
if (!empty($data->ids)) {
|
||||
$idList = $data->ids;
|
||||
} else {
|
||||
if (!empty($data['id'])) {
|
||||
$ids = [$data['id']];
|
||||
if (!empty($data->id)) {
|
||||
$idList = [$data->id];
|
||||
} else {
|
||||
throw new BadRequest();
|
||||
}
|
||||
}
|
||||
return $this->getRecordService()->markAsNotImportantByIdList($ids);
|
||||
return $this->getRecordService()->markAsNotImportantByIdList($idList);
|
||||
}
|
||||
|
||||
public function postActionMoveToTrash($params, $data)
|
||||
{
|
||||
if (!empty($data['ids'])) {
|
||||
$ids = $data['ids'];
|
||||
if (!empty($data->ids)) {
|
||||
$idList = $data->ids;
|
||||
} else {
|
||||
if (!empty($data['id'])) {
|
||||
$ids = [$data['id']];
|
||||
if (!empty($data->id)) {
|
||||
$idList = [$data->id];
|
||||
} else {
|
||||
throw new BadRequest();
|
||||
}
|
||||
}
|
||||
return $this->getRecordService()->moveToTrashByIdList($ids);
|
||||
return $this->getRecordService()->moveToTrashByIdList($idList);
|
||||
}
|
||||
|
||||
public function postActionRetrieveFromTrash($params, $data)
|
||||
{
|
||||
if (!empty($data['ids'])) {
|
||||
$ids = $data['ids'];
|
||||
if (!empty($data->ids)) {
|
||||
$idList = $data->ids;
|
||||
} else {
|
||||
if (!empty($data['id'])) {
|
||||
$ids = [$data['id']];
|
||||
if (!empty($data->id)) {
|
||||
$idList = [$data->id];
|
||||
} else {
|
||||
throw new BadRequest();
|
||||
}
|
||||
}
|
||||
return $this->getRecordService()->retrieveFromTrashByIdList($ids);
|
||||
return $this->getRecordService()->retrieveFromTrashByIdList($idList);
|
||||
}
|
||||
|
||||
public function getActionGetFoldersNotReadCounts(&$params, $request, $data)
|
||||
@@ -206,20 +219,19 @@ class Email extends \Espo\Core\Controllers\Record
|
||||
|
||||
public function postActionMoveToFolder($params, $data)
|
||||
{
|
||||
if (!empty($data['ids'])) {
|
||||
$ids = $data['ids'];
|
||||
if (!empty($data->ids)) {
|
||||
$idList = $data->ids;
|
||||
} else {
|
||||
if (!empty($data['id'])) {
|
||||
$ids = [$data['id']];
|
||||
if (!empty($data->id)) {
|
||||
$idList = [$data->id];
|
||||
} else {
|
||||
throw new BadRequest();
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($data['folderId'])) {
|
||||
if (empty($data->folderId)) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
return $this->getRecordService()->moveToFolderByIdList($ids, $data['folderId']);
|
||||
return $this->getRecordService()->moveToFolderByIdList($idList, $data->folderId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -59,9 +59,9 @@ class EmailAccount extends \Espo\Core\Controllers\Record
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
if (is_null($data['password'])) {
|
||||
$emailAccount = $this->getEntityManager()->getEntity('EmailAccount', $data['id']);
|
||||
if (!$emailAccount) {
|
||||
if (is_null($data->password)) {
|
||||
$emailAccount = $this->getEntityManager()->getEntity('EmailAccount', $data->id);
|
||||
if (!$emailAccount || !$emailAccount->id) {
|
||||
throw new Error();
|
||||
}
|
||||
|
||||
@@ -69,10 +69,10 @@ class EmailAccount extends \Espo\Core\Controllers\Record
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
$data['password'] = $this->getContainer()->get('crypt')->decrypt($emailAccount->get('password'));
|
||||
$data->password = $this->getContainer()->get('crypt')->decrypt($emailAccount->get('password'));
|
||||
}
|
||||
|
||||
return $this->getRecordService()->testConnection($data);
|
||||
return $this->getRecordService()->testConnection(get_object_vars($data));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -35,22 +35,22 @@ class EmailFolder extends \Espo\Core\Controllers\Record
|
||||
{
|
||||
public function postActionMoveUp($params, $data, $request)
|
||||
{
|
||||
if (empty($data['id'])) {
|
||||
if (empty($data->id)) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
$this->getRecordService()->moveUp($data['id']);
|
||||
$this->getRecordService()->moveUp($data->id);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function postActionMoveDown($params, $data, $request)
|
||||
{
|
||||
if (empty($data['id'])) {
|
||||
if (empty($data->id)) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
$this->getRecordService()->moveDown($data['id']);
|
||||
$this->getRecordService()->moveDown($data->id);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -60,4 +60,3 @@ class EmailFolder extends \Espo\Core\Controllers\Record
|
||||
return $this->getRecordService()->listAll();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
35
application/Espo/Controllers/EmailTemplateCategory.php
Normal file
35
application/Espo/Controllers/EmailTemplateCategory.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM 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.
|
||||
*
|
||||
* EspoCRM 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.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
|
||||
************************************************************************/
|
||||
|
||||
namespace Espo\Controllers;
|
||||
|
||||
class EmailTemplateCategory extends \Espo\Core\Templates\Controllers\CategoryTree
|
||||
{
|
||||
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -44,6 +44,8 @@ class EntityManager extends \Espo\Core\Controllers\Base
|
||||
|
||||
public function actionCreateEntity($params, $data, $request)
|
||||
{
|
||||
$data = get_object_vars($data);
|
||||
|
||||
if (!$request->isPost()) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
@@ -81,6 +83,17 @@ class EntityManager extends \Espo\Core\Controllers\Base
|
||||
if (isset($data['textFilterFields']) && is_array($data['textFilterFields'])) {
|
||||
$params['textFilterFields'] = $data['textFilterFields'];
|
||||
}
|
||||
if (!empty($data['color'])) {
|
||||
$params['color'] = $data['color'];
|
||||
}
|
||||
if (!empty($data['iconClass'])) {
|
||||
$params['iconClass'] = $data['iconClass'];
|
||||
}
|
||||
|
||||
$params['kanbanViewMode'] = !empty($data['kanbanViewMode']);
|
||||
if (!empty($data['kanbanStatusIgnoreList'])) {
|
||||
$params['kanbanStatusIgnoreList'] = $data['kanbanStatusIgnoreList'];
|
||||
}
|
||||
|
||||
$result = $this->getContainer()->get('entityManagerUtil')->create($name, $type, $params);
|
||||
|
||||
@@ -103,6 +116,8 @@ class EntityManager extends \Espo\Core\Controllers\Base
|
||||
|
||||
public function actionUpdateEntity($params, $data, $request)
|
||||
{
|
||||
$data = get_object_vars($data);
|
||||
|
||||
if (!$request->isPost()) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
@@ -129,6 +144,8 @@ class EntityManager extends \Espo\Core\Controllers\Base
|
||||
|
||||
public function actionRemoveEntity($params, $data, $request)
|
||||
{
|
||||
$data = get_object_vars($data);
|
||||
|
||||
if (!$request->isPost()) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
@@ -160,6 +177,8 @@ class EntityManager extends \Espo\Core\Controllers\Base
|
||||
|
||||
public function actionCreateLink($params, $data, $request)
|
||||
{
|
||||
$data = get_object_vars($data);
|
||||
|
||||
if (!$request->isPost()) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
@@ -218,6 +237,8 @@ class EntityManager extends \Espo\Core\Controllers\Base
|
||||
|
||||
public function actionUpdateLink($params, $data, $request)
|
||||
{
|
||||
$data = get_object_vars($data);
|
||||
|
||||
if (!$request->isPost()) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
@@ -235,7 +256,9 @@ class EntityManager extends \Espo\Core\Controllers\Base
|
||||
|
||||
$params = array();
|
||||
foreach ($paramList as $item) {
|
||||
$params[$item] = filter_var($data[$item], \FILTER_SANITIZE_STRING);
|
||||
if (array_key_exists($item, $data)) {
|
||||
$params[$item] = filter_var($data[$item], \FILTER_SANITIZE_STRING);
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($additionalParamList as $item) {
|
||||
@@ -269,6 +292,8 @@ class EntityManager extends \Espo\Core\Controllers\Base
|
||||
|
||||
public function actionRemoveLink($params, $data, $request)
|
||||
{
|
||||
$data = get_object_vars($data);
|
||||
|
||||
if (!$request->isPost()) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
@@ -295,20 +320,31 @@ class EntityManager extends \Espo\Core\Controllers\Base
|
||||
|
||||
public function postActionFormula($params, $data, $request)
|
||||
{
|
||||
if (empty($data['scope'])) {
|
||||
if (empty($data->scope)) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
if (!array_key_exists('data', $data)) {
|
||||
if (!property_exists($data, 'data')) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
$formulaData = get_object_vars($data['data']);
|
||||
$formulaData = get_object_vars($data->data);
|
||||
|
||||
$this->getContainer()->get('entityManagerUtil')->setFormulaData($data['scope'], $formulaData);
|
||||
$this->getContainer()->get('entityManagerUtil')->setFormulaData($data->scope, $formulaData);
|
||||
|
||||
$this->getContainer()->get('dataManager')->clearCache();
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public function postActionResetToDefault($params, $data, $request)
|
||||
{
|
||||
if (empty($data->scope)) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
$this->getContainer()->get('entityManagerUtil')->resetToDefaults($data->scope);
|
||||
$this->getContainer()->get('dataManager')->clearCache();
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -73,7 +73,7 @@ class Extension extends \Espo\Core\Controllers\Record
|
||||
|
||||
$manager = new \Espo\Core\ExtensionManager($this->getContainer());
|
||||
|
||||
$manager->install($data);
|
||||
$manager->install(get_object_vars($data));
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -90,7 +90,7 @@ class Extension extends \Espo\Core\Controllers\Record
|
||||
}
|
||||
|
||||
$manager = new \Espo\Core\ExtensionManager($this->getContainer());
|
||||
$manager->uninstall($data);
|
||||
$manager->uninstall(get_object_vars($data));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -149,4 +149,3 @@ class Extension extends \Espo\Core\Controllers\Record
|
||||
throw new Forbidden();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -65,7 +65,6 @@ class ExternalAccount extends \Espo\Core\Controllers\Record
|
||||
$id = $request->get('id');
|
||||
list($integration, $userId) = explode('__', $id);
|
||||
|
||||
|
||||
if ($this->getUser()->id != $userId) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
@@ -109,8 +108,8 @@ class ExternalAccount extends \Espo\Core\Controllers\Record
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
if (isset($data['enabled']) && !$data['enabled']) {
|
||||
$data['data'] = null;
|
||||
if (isset($data->enabled) && !$data->enabled) {
|
||||
$data->data = null;
|
||||
}
|
||||
|
||||
$entity = $this->getEntityManager()->getEntity('ExternalAccount', $params['id']);
|
||||
@@ -126,8 +125,8 @@ class ExternalAccount extends \Espo\Core\Controllers\Record
|
||||
throw new Error('Bad HTTP method type.');
|
||||
}
|
||||
|
||||
$id = $data['id'];
|
||||
$code = $data['code'];
|
||||
$id = $data->id;
|
||||
$code = $data->code;
|
||||
|
||||
list($integration, $userId) = explode('__', $id);
|
||||
|
||||
@@ -139,4 +138,3 @@ class ExternalAccount extends \Espo\Core\Controllers\Record
|
||||
return $service->authorizationCode($integration, $userId, $code);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -60,21 +60,26 @@ class FieldManager extends \Espo\Core\Controllers\Base
|
||||
|
||||
public function postActionCreate($params, $data)
|
||||
{
|
||||
if (empty($params['scope']) || empty($data['name'])) {
|
||||
if (empty($params['scope']) || empty($data->name)) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
$fieldManager = $this->getContainer()->get('fieldManager');
|
||||
$fieldManager->create($params['scope'], $data['name'], $data);
|
||||
$fieldManager->create($params['scope'], $data->name, get_object_vars($data));
|
||||
|
||||
try {
|
||||
$this->getContainer()->get('dataManager')->rebuild($params['scope']);
|
||||
} catch (Error $e) {
|
||||
$fieldManager->delete($params['scope'], $data['name']);
|
||||
$fieldManager->delete($params['scope'], $data->name);
|
||||
throw new Error($e->getMessage());
|
||||
}
|
||||
|
||||
return $fieldManager->read($params['scope'], $data['name']);
|
||||
return $fieldManager->read($params['scope'], $data->name);
|
||||
}
|
||||
|
||||
public function patchActionUpdate($params, $data)
|
||||
{
|
||||
return $this->putActionUpdate($params, $data);
|
||||
}
|
||||
|
||||
public function putActionUpdate($params, $data)
|
||||
@@ -84,7 +89,7 @@ class FieldManager extends \Espo\Core\Controllers\Base
|
||||
}
|
||||
|
||||
$fieldManager = $this->getContainer()->get('fieldManager');
|
||||
$fieldManager->update($params['scope'], $params['name'], $data);
|
||||
$fieldManager->update($params['scope'], $params['name'], get_object_vars($data));
|
||||
|
||||
if ($fieldManager->isChanged()) {
|
||||
$this->getContainer()->get('dataManager')->rebuild($params['scope']);
|
||||
@@ -110,15 +115,14 @@ class FieldManager extends \Espo\Core\Controllers\Base
|
||||
|
||||
public function postActionResetToDefault($params, $data)
|
||||
{
|
||||
if (empty($data['scope']) || empty($data['name'])) {
|
||||
if (empty($data->scope) || empty($data->name)) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
$this->getContainer()->get('fieldManager')->resetToDefault($data['scope'], $data['name']);
|
||||
$this->getContainer()->get('fieldManager')->resetToDefault($data->scope, $data->name);
|
||||
|
||||
$this->getContainer()->get('dataManager')->rebuildMetadata();
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -31,8 +31,11 @@ namespace Espo\Controllers;
|
||||
|
||||
class I18n extends \Espo\Core\Controllers\Base
|
||||
{
|
||||
public function actionRead($params, $data)
|
||||
public function actionRead($params, $data, $request)
|
||||
{
|
||||
if ($request->get('default')) {
|
||||
return $this->getContainer()->get('defaultLanguage')->getAll();
|
||||
}
|
||||
return $this->getContainer()->get('language')->getAll();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -101,24 +101,24 @@ class Import extends \Espo\Core\Controllers\Record
|
||||
|
||||
public function actionRevert($params, $data, $request)
|
||||
{
|
||||
if (empty($data['id'])) {
|
||||
if (empty($data->id)) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
if (!$request->isPost()) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
return $this->getService('Import')->revert($data['id']);
|
||||
return $this->getService('Import')->revert($data->id);
|
||||
}
|
||||
|
||||
public function actionRemoveDuplicates($params, $data, $request)
|
||||
{
|
||||
if (empty($data['id'])) {
|
||||
if (empty($data->id)) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
if (!$request->isPost()) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
return $this->getService('Import')->removeDuplicates($data['id']);
|
||||
return $this->getService('Import')->removeDuplicates($data->id);
|
||||
}
|
||||
|
||||
public function actionCreate($params, $data, $request)
|
||||
@@ -127,87 +127,90 @@ class Import extends \Espo\Core\Controllers\Record
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
if (!isset($data['fieldDelimiter'])) {
|
||||
if (!isset($data->fieldDelimiter)) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
if (!isset($data['textQualifier'])) {
|
||||
if (!isset($data->textQualifier)) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
if (!isset($data['dateFormat'])) {
|
||||
if (!isset($data->dateFormat)) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
if (!isset($data['timeFormat'])) {
|
||||
if (!isset($data->timeFormat)) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
if (!isset($data['personNameFormat'])) {
|
||||
if (!isset($data->personNameFormat)) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
if (!isset($data['decimalMark'])) {
|
||||
if (!isset($data->decimalMark)) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
if (!isset($data['defaultValues'])) {
|
||||
if (!isset($data->defaultValues)) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
if (!isset($data['action'])) {
|
||||
if (!isset($data->action)) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
if (!isset($data['attachmentId'])) {
|
||||
if (!isset($data->attachmentId)) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
if (!isset($data['entityType'])) {
|
||||
if (!isset($data->entityType)) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
if (!isset($data->fields)) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
$timezone = 'UTC';
|
||||
if (isset($data['timezone'])) {
|
||||
$timezone = $data['timezone'];
|
||||
if (isset($data->timezone)) {
|
||||
$timezone = $data->timezone;
|
||||
}
|
||||
|
||||
$importParams = array(
|
||||
'headerRow' => !empty($data['headerRow']),
|
||||
'fieldDelimiter' => $data['fieldDelimiter'],
|
||||
'textQualifier' => $data['textQualifier'],
|
||||
'dateFormat' => $data['dateFormat'],
|
||||
'timeFormat' => $data['timeFormat'],
|
||||
'headerRow' => !empty($data->headerRow),
|
||||
'fieldDelimiter' => $data->fieldDelimiter,
|
||||
'textQualifier' => $data->textQualifier,
|
||||
'dateFormat' => $data->dateFormat,
|
||||
'timeFormat' => $data->timeFormat,
|
||||
'timezone' => $timezone,
|
||||
'personNameFormat' => $data['personNameFormat'],
|
||||
'decimalMark' => $data['decimalMark'],
|
||||
'currency' => $data['currency'],
|
||||
'defaultValues' => $data['defaultValues'],
|
||||
'action' => $data['action'],
|
||||
'skipDuplicateChecking' => !empty($data['skipDuplicateChecking']),
|
||||
'idleMode' => !empty($data['idleMode'])
|
||||
'personNameFormat' => $data->personNameFormat,
|
||||
'decimalMark' => $data->decimalMark,
|
||||
'currency' => $data->currency,
|
||||
'defaultValues' => $data->defaultValues,
|
||||
'action' => $data->action,
|
||||
'skipDuplicateChecking' => !empty($data->skipDuplicateChecking),
|
||||
'idleMode' => !empty($data->idleMode)
|
||||
);
|
||||
|
||||
if (array_key_exists('updateBy', $data)) {
|
||||
$importParams['updateBy'] = $data['updateBy'];
|
||||
if (property_exists($data, 'updateBy')) {
|
||||
$importParams['updateBy'] = $data->updateBy;
|
||||
}
|
||||
|
||||
$attachmentId = $data['attachmentId'];
|
||||
$attachmentId = $data->attachmentId;
|
||||
|
||||
if (!$this->getAcl()->check($data['entityType'], 'edit')) {
|
||||
if (!$this->getAcl()->check($data->entityType, 'edit')) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
return $this->getService('Import')->import($data['entityType'], $data['fields'], $attachmentId, $importParams);
|
||||
return $this->getService('Import')->import($data->entityType, $data->fields, $attachmentId, $importParams);
|
||||
}
|
||||
|
||||
public function postActionUnmarkAsDuplicate($params, $data)
|
||||
{
|
||||
if (empty($data['id']) || empty($data['entityType']) || empty($data['entityId'])) {
|
||||
if (empty($data->id) || empty($data->entityType) || empty($data->entityId)) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
$this->getService('Import')->unmarkAsDuplicate($data['id'], $data['entityType'], $data['entityId']);
|
||||
$this->getService('Import')->unmarkAsDuplicate($data->id, $data->entityType, $data->entityId);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -59,15 +59,15 @@ class InboundEmail extends \Espo\Core\Controllers\Record
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
if (is_null($data['password'])) {
|
||||
$inboundEmail = $this->getEntityManager()->getEntity('InboundEmail', $data['id']);
|
||||
if (!$inboundEmail) {
|
||||
if (is_null($data->password)) {
|
||||
$inboundEmail = $this->getEntityManager()->getEntity('InboundEmail', $data->id);
|
||||
if (!$inboundEmail || !$inboundEmail->id) {
|
||||
throw new Error();
|
||||
}
|
||||
$data['password'] = $this->getContainer()->get('crypt')->decrypt($inboundEmail->get('password'));
|
||||
$data->password = $this->getContainer()->get('crypt')->decrypt($inboundEmail->get('password'));
|
||||
}
|
||||
|
||||
return $this->getRecordService()->testConnection($data);
|
||||
return $this->getRecordService()->testConnection(get_object_vars($data));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -79,7 +79,6 @@ class Integration extends \Espo\Core\Controllers\Record
|
||||
|
||||
$this->getConfig()->save();
|
||||
|
||||
|
||||
return $entity->toArray();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -76,4 +76,3 @@ class Job extends \Espo\Core\Controllers\Record
|
||||
throw new Forbidden();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
78
application/Espo/Controllers/LabelManager.php
Normal file
78
application/Espo/Controllers/LabelManager.php
Normal file
@@ -0,0 +1,78 @@
|
||||
<?php
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM 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.
|
||||
*
|
||||
* EspoCRM 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.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
|
||||
************************************************************************/
|
||||
|
||||
namespace Espo\Controllers;
|
||||
|
||||
use Espo\Core\Utils as Utils;
|
||||
use \Espo\Core\Exceptions\NotFound;
|
||||
use \Espo\Core\Exceptions\Error;
|
||||
use \Espo\Core\Exceptions\Forbidden;
|
||||
use \Espo\Core\Exceptions\BadRequest;
|
||||
|
||||
class LabelManager extends \Espo\Core\Controllers\Base
|
||||
{
|
||||
protected function checkControllerAccess()
|
||||
{
|
||||
if (!$this->getUser()->isAdmin()) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
}
|
||||
|
||||
public function postActionGetScopeList($params)
|
||||
{
|
||||
$labelManager = $this->getContainer()->get('injectableFactory')->createByClassName('\\Espo\\Core\\Utils\\LabelManager');
|
||||
|
||||
return $labelManager->getScopeList();
|
||||
}
|
||||
|
||||
public function postActionGetScopeData($params, $data, $request)
|
||||
{
|
||||
if (empty($data->scope) || empty($data->language)) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
$labelManager = $this->getContainer()->get('injectableFactory')->createByClassName('\\Espo\\Core\\Utils\\LabelManager');
|
||||
return $labelManager->getScopeData($data->language, $data->scope);
|
||||
}
|
||||
|
||||
public function postActionSaveLabels($params, $data)
|
||||
{
|
||||
if (empty($data->scope) || empty($data->language) || !isset($data->labels)) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
$labels = get_object_vars($data->labels);
|
||||
|
||||
$labelManager = $this->getContainer()->get('injectableFactory')->createByClassName('\\Espo\\Core\\Utils\\LabelManager');
|
||||
$returnData = $labelManager->saveLabels($data->language, $data->scope, $labels);
|
||||
|
||||
$this->getContainer()->get('dataManager')->clearCache();
|
||||
|
||||
return $returnData;
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -48,6 +48,10 @@ class Layout extends \Espo\Core\Controllers\Base
|
||||
|
||||
public function actionUpdate($params, $data, $request)
|
||||
{
|
||||
if (is_object($data)) {
|
||||
$data = get_object_vars($data);
|
||||
}
|
||||
|
||||
if (!$this->getUser()->isAdmin()) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
@@ -79,10 +83,10 @@ class Layout extends \Espo\Core\Controllers\Base
|
||||
if (!$request->isPost()) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
if (empty($data['scope']) || empty($data['name'])) {
|
||||
if (empty($data->scope) || empty($data->name)) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
return $this->getContainer()->get('layout')->resetToDefault($data['scope'], $data['name']);
|
||||
return $this->getContainer()->get('layout')->resetToDefault($data->scope, $data->name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -93,11 +93,11 @@ class Preferences extends \Espo\Core\Controllers\Base
|
||||
}
|
||||
|
||||
foreach ($this->getAcl()->getScopeForbiddenAttributeList('Preferences', 'edit') as $attribute) {
|
||||
unset($data[$attribute]);
|
||||
unset($data->$attribute);
|
||||
}
|
||||
|
||||
if (array_key_exists('smtpPassword', $data)) {
|
||||
$data['smtpPassword'] = $this->getCrypt()->encrypt($data['smtpPassword']);
|
||||
if (property_exists($data, 'smtpPassword')) {
|
||||
$data->smtpPassword = $this->getCrypt()->encrypt($data->smtpPassword);
|
||||
}
|
||||
|
||||
$user = $this->getEntityManager()->getEntity('User', $userId);
|
||||
@@ -113,7 +113,7 @@ class Preferences extends \Espo\Core\Controllers\Base
|
||||
|
||||
$entity->clear('smtpPassword');
|
||||
|
||||
return $entity->toArray();
|
||||
return $entity->getValueMap();
|
||||
}
|
||||
throw new Error();
|
||||
}
|
||||
@@ -140,7 +140,7 @@ class Preferences extends \Espo\Core\Controllers\Base
|
||||
$entity->clear($attribute);
|
||||
}
|
||||
|
||||
return $entity->toArray();
|
||||
return $entity->getValueMap();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -38,4 +38,3 @@ class ScheduledJob extends \Espo\Core\Controllers\Record
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -46,7 +46,7 @@ class Settings extends \Espo\Core\Controllers\Base
|
||||
$fieldDefs = $this->getMetadata()->get('entityDefs.Settings.fields');
|
||||
|
||||
foreach ($fieldDefs as $field => $d) {
|
||||
if ($d['type'] == 'password') {
|
||||
if ($d['type'] === 'password') {
|
||||
unset($data[$field]);
|
||||
}
|
||||
}
|
||||
@@ -76,7 +76,11 @@ class Settings extends \Espo\Core\Controllers\Base
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
if (isset($data['useCache']) && $data['useCache'] != $this->getConfig()->get('useCache')) {
|
||||
if (
|
||||
(isset($data->useCache) && $data->useCache !== $this->getConfig()->get('useCache'))
|
||||
||
|
||||
(isset($data->aclStrictMode) && $data->aclStrictMode !== $this->getConfig()->get('aclStrictMode'))
|
||||
) {
|
||||
$this->getContainer()->get('dataManager')->clearCache();
|
||||
}
|
||||
|
||||
@@ -86,11 +90,9 @@ class Settings extends \Espo\Core\Controllers\Base
|
||||
throw new Error('Cannot save settings');
|
||||
}
|
||||
|
||||
/** Rebuild for Currency Settings */
|
||||
if (isset($data['baseCurrency']) || isset($data['currencyRates'])) {
|
||||
$this->getContainer()->get('dataManager')->rebuildDatabase(array());
|
||||
if (isset($data->defaultCurrency) || isset($data->baseCurrency) || isset($data->currencyRates)) {
|
||||
$this->getContainer()->get('dataManager')->rebuildDatabase([]);
|
||||
}
|
||||
/** END Rebuild for Currency Settings */
|
||||
|
||||
return $this->getConfigData();
|
||||
}
|
||||
@@ -101,10 +103,12 @@ class Settings extends \Espo\Core\Controllers\Base
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
if (!isset($data['password'])) {
|
||||
$data['password'] = $this->getConfig()->get('ldapPassword');
|
||||
if (!isset($data->password)) {
|
||||
$data->password = $this->getConfig()->get('ldapPassword');
|
||||
}
|
||||
|
||||
$data = get_object_vars($data);
|
||||
|
||||
$ldapUtils = new \Espo\Core\Utils\Authentication\LDAP\Utils();
|
||||
$options = $ldapUtils->normalizeOptions($data);
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -31,6 +31,4 @@ namespace Espo\Controllers;
|
||||
|
||||
class Team extends \Espo\Core\Controllers\Record
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -35,4 +35,3 @@ class Template extends \Espo\Core\Controllers\Record
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -57,20 +57,20 @@ class User extends \Espo\Core\Controllers\Record
|
||||
|
||||
public function postActionChangeOwnPassword($params, $data, $request)
|
||||
{
|
||||
if (!array_key_exists('password', $data) || !array_key_exists('currentPassword', $data)) {
|
||||
if (!property_exists($data, 'password') || !property_exists($data, 'currentPassword')) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
return $this->getService('User')->changePassword($this->getUser()->id, $data['password'], true, $data['currentPassword']);
|
||||
return $this->getService('User')->changePassword($this->getUser()->id, $data->password, true, $data->currentPassword);
|
||||
}
|
||||
|
||||
public function postActionChangePasswordByRequest($params, $data, $request)
|
||||
{
|
||||
if (empty($data['requestId']) || empty($data['password'])) {
|
||||
if (empty($data->requestId) || empty($data->password)) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
$p = $this->getEntityManager()->getRepository('PasswordChangeRequest')->where(array(
|
||||
'requestId' => $data['requestId']
|
||||
'requestId' => $data->requestId
|
||||
))->findOne();
|
||||
|
||||
if (!$p) {
|
||||
@@ -83,7 +83,7 @@ class User extends \Espo\Core\Controllers\Record
|
||||
|
||||
$this->getEntityManager()->removeEntity($p);
|
||||
|
||||
if ($this->getService('User')->changePassword($userId, $data['password'])) {
|
||||
if ($this->getService('User')->changePassword($userId, $data->password)) {
|
||||
return array(
|
||||
'url' => $p->get('url')
|
||||
);
|
||||
@@ -92,15 +92,15 @@ class User extends \Espo\Core\Controllers\Record
|
||||
|
||||
public function postActionPasswordChangeRequest($params, $data, $request)
|
||||
{
|
||||
if (empty($data['userName']) || empty($data['emailAddress'])) {
|
||||
if (empty($data->userName) || empty($data->emailAddress)) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
$userName = $data['userName'];
|
||||
$emailAddress = $data['emailAddress'];
|
||||
$userName = $data->userName;
|
||||
$emailAddress = $data->emailAddress;
|
||||
$url = null;
|
||||
if (!empty($data['url'])) {
|
||||
$url = $data['url'];
|
||||
if (!empty($data->url)) {
|
||||
$url = $data->url;
|
||||
}
|
||||
|
||||
return $this->getService('User')->passwordChangeRequest($userName, $emailAddress, $url);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -217,7 +217,7 @@ class Base implements Injectable
|
||||
}
|
||||
}
|
||||
|
||||
if ($entity->hasAttribute('assignedUsersIds') && $entity->hasRelation('assignedUsers')) {
|
||||
if ($entity->hasLinkMultipleField('assignedUsers')) {
|
||||
if ($entity->hasLinkMultipleId('assignedUsers', $user->id)) {
|
||||
return true;
|
||||
}
|
||||
@@ -260,7 +260,11 @@ class Base implements Injectable
|
||||
|
||||
if (is_object($data)) {
|
||||
if ($data->edit !== 'no' || $data->create !== 'no') {
|
||||
if ($entity->has('createdById') && $entity->get('createdById') == $user->id) {
|
||||
if (
|
||||
$this->getConfig()->get('aclAllowDeleteCreated')
|
||||
&&
|
||||
$entity->has('createdById') && $entity->get('createdById') == $user->id
|
||||
) {
|
||||
if (!$entity->has('assignedUserId')) {
|
||||
return true;
|
||||
} else {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -59,13 +59,9 @@ class Table
|
||||
|
||||
protected $fieldLevelList = ['yes', 'no'];
|
||||
|
||||
protected $valuePermissionList = ['assignmentPermission', 'userPermission', 'portalPermission'];
|
||||
protected $valuePermissionHighestLevels = array();
|
||||
|
||||
protected $valuePrtmissionHighestLevels = array(
|
||||
'assignmentPermission' => 'all',
|
||||
'userPermission' => 'all',
|
||||
'portalPermission' => 'yes'
|
||||
);
|
||||
protected $valuePermissionList = [];
|
||||
|
||||
private $fileManager;
|
||||
|
||||
@@ -77,6 +73,10 @@ class Table
|
||||
|
||||
protected $forbiddenFieldsCache = array();
|
||||
|
||||
protected $isStrictModeForced = false;
|
||||
|
||||
protected $isStrictMode = false;
|
||||
|
||||
public function __construct(User $user, Config $config = null, FileManager $fileManager = null, Metadata $metadata = null, FieldManagerUtil $fieldManager = null)
|
||||
{
|
||||
$this->data = (object) [
|
||||
@@ -85,6 +85,12 @@ class Table
|
||||
'fieldTableQuickAccess' => (object) [],
|
||||
];
|
||||
|
||||
if ($this->isStrictModeForced) {
|
||||
$this->isStrictMode = true;
|
||||
} else {
|
||||
$this->isStrictMode = $config->get('aclStrictMode', false);
|
||||
}
|
||||
|
||||
$this->user = $user;
|
||||
|
||||
$this->metadata = $metadata;
|
||||
@@ -100,7 +106,8 @@ class Table
|
||||
if ($fileManager) {
|
||||
$this->fileManager = $fileManager;
|
||||
}
|
||||
$this->valuePermissionList = $this->metadata->get('app.' . $this->type . '.defs.valuePermissionList', $this->valuePermissionList);
|
||||
$this->valuePermissionList = $this->metadata->get(['app', $this->type, 'valuePermissionList'], []);
|
||||
$this->valuePermissionHighestLevels = $this->metadata->get(['app', $this->type, 'valuePermissionHighestLevels'], array());
|
||||
|
||||
$this->initCacheFilePath();
|
||||
|
||||
@@ -135,11 +142,6 @@ class Table
|
||||
return $this->fieldManager;
|
||||
}
|
||||
|
||||
protected function getConfig()
|
||||
{
|
||||
return $this->config;
|
||||
}
|
||||
|
||||
public function getMap()
|
||||
{
|
||||
return $this->data;
|
||||
@@ -167,7 +169,7 @@ class Table
|
||||
if (isset($this->data->$permission)) {
|
||||
return $this->data->$permission;
|
||||
}
|
||||
return null;
|
||||
return 'no';
|
||||
}
|
||||
|
||||
public function getLevel($scope, $action)
|
||||
@@ -208,6 +210,7 @@ class Table
|
||||
$this->applyDisabled($aclTable, $fieldTable);
|
||||
$this->applyMandatory($aclTable, $fieldTable);
|
||||
$this->applyAdditional($aclTable, $fieldTable, $valuePermissionLists);
|
||||
$this->applyReadOnlyFields($fieldTable);
|
||||
} else {
|
||||
$aclTable = (object) [];
|
||||
foreach ($this->getScopeList() as $scope) {
|
||||
@@ -242,8 +245,12 @@ class Table
|
||||
$this->fillFieldTableQuickAccess();
|
||||
|
||||
if (!$this->getUser()->isAdmin()) {
|
||||
$permissionsDefaultsGroupName = 'permissionsDefaults';
|
||||
if ($this->isStrictMode) {
|
||||
$permissionsDefaultsGroupName = 'permissionsStrictDefaults';
|
||||
}
|
||||
foreach ($this->valuePermissionList as $permission) {
|
||||
$this->data->$permission = $this->mergeValueList($valuePermissionLists->$permission, $this->metadata->get('app.'.$this->type.'.default.' . $permission, 'yes'));
|
||||
$this->data->$permission = $this->mergeValueList($valuePermissionLists->$permission, $this->metadata->get(['app', $this->type, $permissionsDefaultsGroupName, $permission, 'yes']));
|
||||
if ($this->metadata->get('app.'.$this->type.'.mandatory.' . $permission)) {
|
||||
$this->data->$permission = $this->metadata->get('app.'.$this->type.'.mandatory.' . $permission);
|
||||
}
|
||||
@@ -251,8 +258,8 @@ class Table
|
||||
|
||||
} else {
|
||||
foreach ($this->valuePermissionList as $permission) {
|
||||
if (isset($this->valuePrtmissionHighestLevels[$permission])) {
|
||||
$this->data->$permission = $this->valuePrtmissionHighestLevels[$permission];
|
||||
if (isset($this->valuePermissionHighestLevels[$permission])) {
|
||||
$this->data->$permission = $this->valuePermissionHighestLevels[$permission];
|
||||
continue;
|
||||
}
|
||||
$this->data->$permission = 'all';
|
||||
@@ -405,7 +412,12 @@ class Table
|
||||
return;
|
||||
}
|
||||
|
||||
$data = $this->metadata->get('app.'.$this->type.'.default.scopeLevel', array());
|
||||
$defaultsGroupName = 'default';
|
||||
if ($this->isStrictMode) {
|
||||
$defaultsGroupName = 'strictDefault';
|
||||
}
|
||||
|
||||
$data = $this->metadata->get(['app', $this->type, $defaultsGroupName, 'scopeLevel'], []);
|
||||
|
||||
foreach ($data as $scope => $item) {
|
||||
if (isset($table->$scope)) continue;
|
||||
@@ -416,7 +428,7 @@ class Table
|
||||
$table->$scope = $value;
|
||||
}
|
||||
|
||||
$defaultFieldData = $this->metadata->get('app.'.$this->type.'.default.fieldLevel', array());
|
||||
$defaultFieldData = $this->metadata->get(['app', $this->type, $defaultsGroupName, 'fieldLevel'], []);
|
||||
|
||||
foreach ($this->getScopeList() as $scope) {
|
||||
if (isset($table->$scope) && $table->$scope === false) continue;
|
||||
@@ -424,7 +436,7 @@ class Table
|
||||
|
||||
$fieldList = array_keys($this->getMetadata()->get("entityDefs.{$scope}.fields", []));
|
||||
|
||||
$defaultScopeFieldData = $this->metadata->get('app.'.$this->type.'.default.scopeFieldLevel.' . $scope, array());
|
||||
$defaultScopeFieldData = $this->metadata->get('app.'.$this->type.'.'.$defaultsGroupName.'.scopeFieldLevel.' . $scope, []);
|
||||
|
||||
foreach (array_merge($defaultFieldData, $defaultScopeFieldData) as $field => $f) {
|
||||
if (!in_array($field, $fieldList)) continue;
|
||||
@@ -454,7 +466,11 @@ class Table
|
||||
$aclType = $this->defaultAclType;
|
||||
}
|
||||
if (!empty($aclType)) {
|
||||
$defaultValue = $this->metadata->get('app.'.$this->type.'.scopeLevelTypesDefaults.' . $aclType, $this->metadata->get('app.'.$this->type.'.scopeLevelTypesDefaults.record'));
|
||||
$paramDefaultsName = 'scopeLevelTypesDefaults';
|
||||
if ($this->isStrictMode) {
|
||||
$paramDefaultsName = 'scopeLevelTypesStrictDefaults';
|
||||
}
|
||||
$defaultValue = $this->metadata->get(['app', $this->type, $paramDefaultsName, $aclType], $this->metadata->get(['app', $this->type, $paramDefaultsName, 'record']));
|
||||
if (is_array($defaultValue)) {
|
||||
$defaultValue = (object) $defaultValue;
|
||||
}
|
||||
@@ -698,25 +714,29 @@ class Table
|
||||
private function buildCache()
|
||||
{
|
||||
$this->fileManager->putPhpContents($this->cacheFilePath, $this->data, true);
|
||||
/*$contents = '<' . '?'. 'php return ' . $this->varExport($this->data) . ';';
|
||||
$this->fileManager->putContents($this->cacheFilePath, $contents);*/
|
||||
}
|
||||
|
||||
/*private function varExport($variable)
|
||||
protected function applyReadOnlyFields(&$fieldTable)
|
||||
{
|
||||
if ($variable instanceof \StdClass) {
|
||||
$result = '(object) ' . $this->varExport(get_object_vars($variable), true);
|
||||
} else if (is_array($variable)) {
|
||||
$array = array();
|
||||
foreach ($variable as $key => $value) {
|
||||
$array[] = var_export($key, true).' => ' . $this->varExport($value, true);
|
||||
// TODO Enable in 5.4.0
|
||||
return;
|
||||
$scopeList = $this->getScopeWithAclList();
|
||||
foreach ($scopeList as $scope) {
|
||||
if (!property_exists($fieldTable, $scope)) continue;
|
||||
$fieldList = array_keys($this->getMetadata()->get(['entityDefs', $scope, 'fields'], []));
|
||||
foreach ($fieldList as $field) {
|
||||
if ($this->getMetadata()->get(['entityDefs', $scope, 'fields', $field, 'readOnly'])) {
|
||||
if (property_exists($fieldTable->$scope, $field)) {
|
||||
$fieldTable->$scope->$field->edit = 'no';
|
||||
} else {
|
||||
$fieldTable->$scope->$field = (object) [];
|
||||
foreach ($this->fieldActionList as $action) {
|
||||
$fieldTable->$scope->$field->$action = 'yes';
|
||||
}
|
||||
$fieldTable->$scope->$field->edit = 'no';
|
||||
}
|
||||
}
|
||||
}
|
||||
$result = '['.implode(', ', $array).']';
|
||||
} else {
|
||||
$result = var_export($variable, true);
|
||||
}
|
||||
|
||||
return $result;
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -47,6 +47,8 @@ class AclManager
|
||||
|
||||
protected $tableClassName = '\\Espo\\Core\\Acl\\Table';
|
||||
|
||||
protected $userAclClassName = '\\Espo\\Core\\Acl';
|
||||
|
||||
public function __construct(Container $container)
|
||||
{
|
||||
$this->container = $container;
|
||||
@@ -279,5 +281,11 @@ class AclManager
|
||||
{
|
||||
return $this->checkUserPermission($user, $target, 'assignmentPermission');
|
||||
}
|
||||
}
|
||||
|
||||
public function createUserAcl(User $user)
|
||||
{
|
||||
$className = $this->userAclClassName;
|
||||
$acl = new $className($this, $user);
|
||||
return $acl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -50,7 +50,7 @@ class Table extends \Espo\Core\Acl\Table
|
||||
|
||||
protected $levelList = ['yes', 'all', 'account', 'contact', 'own', 'no'];
|
||||
|
||||
protected $valuePermissionList = [];
|
||||
protected $isStrictModeForced = true;
|
||||
|
||||
public function __construct(User $user, Portal $portal, Config $config = null, FileManager $fileManager = null, Metadata $metadata = null, FieldManagerUtil $fieldManager = null)
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -91,6 +91,7 @@ class Application
|
||||
public function runClient()
|
||||
{
|
||||
$this->getContainer()->get('clientManager')->display();
|
||||
exit;
|
||||
}
|
||||
|
||||
public function runEntryPoint($entryPoint, $data = array(), $final = false)
|
||||
@@ -134,7 +135,7 @@ class Application
|
||||
public function runCron()
|
||||
{
|
||||
$auth = $this->createAuth();
|
||||
$auth->useNoAuth(true);
|
||||
$auth->useNoAuth();
|
||||
|
||||
$cronManager = new \Espo\Core\CronManager($this->container);
|
||||
$cronManager->run();
|
||||
@@ -327,6 +328,7 @@ class Application
|
||||
public function setupSystemUser()
|
||||
{
|
||||
$user = $this->getContainer()->get('entityManager')->getEntity('User', 'system');
|
||||
$user->set('isAdmin', true);
|
||||
$this->getContainer()->setUser($user);
|
||||
$this->getContainer()->get('entityManager')->setUser($user);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -93,6 +93,24 @@ class Container
|
||||
return $className;
|
||||
}
|
||||
|
||||
protected function loadContainer()
|
||||
{
|
||||
return $this;
|
||||
}
|
||||
|
||||
protected function loadSlim()
|
||||
{
|
||||
return new \Espo\Core\Utils\Api\Slim();
|
||||
}
|
||||
|
||||
protected function loadFileStorageManager()
|
||||
{
|
||||
return new \Espo\Core\FileStorage\Manager(
|
||||
$this->get('metadata')->get(['app', 'fileStorage', 'implementationClassNameMap']),
|
||||
$this
|
||||
);
|
||||
}
|
||||
|
||||
protected function loadLog()
|
||||
{
|
||||
$config = $this->get('config');
|
||||
@@ -118,24 +136,6 @@ class Container
|
||||
return $log;
|
||||
}
|
||||
|
||||
protected function loadContainer()
|
||||
{
|
||||
return $this;
|
||||
}
|
||||
|
||||
protected function loadSlim()
|
||||
{
|
||||
return new \Espo\Core\Utils\Api\Slim();
|
||||
}
|
||||
|
||||
protected function loadFileStorageManager()
|
||||
{
|
||||
return new \Espo\Core\FileStorage\Manager(
|
||||
$this->get('metadata')->get(['app', 'fileStorage', 'implementationClassNameMap']),
|
||||
$this
|
||||
);
|
||||
}
|
||||
|
||||
protected function loadFileManager()
|
||||
{
|
||||
return new \Espo\Core\Utils\File\Manager(
|
||||
@@ -217,7 +217,8 @@ class Container
|
||||
$this->get('acl'),
|
||||
$this->get('aclManager'),
|
||||
$this->get('metadata'),
|
||||
$this->get('config')
|
||||
$this->get('config'),
|
||||
$this->get('injectableFactory')
|
||||
);
|
||||
}
|
||||
|
||||
@@ -295,10 +296,20 @@ class Container
|
||||
);
|
||||
}
|
||||
|
||||
protected function loadBaseLanguage()
|
||||
{
|
||||
return new \Espo\Core\Utils\Language(
|
||||
'en_US',
|
||||
$this->get('fileManager'),
|
||||
$this->get('metadata'),
|
||||
$this->get('useCache')
|
||||
);
|
||||
}
|
||||
|
||||
protected function loadDefaultLanguage()
|
||||
{
|
||||
return new \Espo\Core\Utils\Language(
|
||||
null,
|
||||
\Espo\Core\Utils\Language::detectLanguage($this->get('config')),
|
||||
$this->get('fileManager'),
|
||||
$this->get('metadata'),
|
||||
$this->get('useCache')
|
||||
@@ -329,8 +340,6 @@ class Container
|
||||
protected function loadFieldManager()
|
||||
{
|
||||
return new \Espo\Core\Utils\FieldManager(
|
||||
$this->get('metadata'),
|
||||
$this->get('language'),
|
||||
$this
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -60,9 +60,9 @@ class ControllerManager
|
||||
|
||||
public function process($controllerName, $actionName, $params, $data, $request)
|
||||
{
|
||||
$customeClassName = '\\Espo\\Custom\\Controllers\\' . Util::normilizeClassName($controllerName);
|
||||
if (class_exists($customeClassName)) {
|
||||
$controllerClassName = $customeClassName;
|
||||
$customClassName = '\\Espo\\Custom\\Controllers\\' . Util::normilizeClassName($controllerName);
|
||||
if (class_exists($customClassName)) {
|
||||
$controllerClassName = $customClassName;
|
||||
} else {
|
||||
$moduleName = $this->metadata->getScopeModuleName($controllerName);
|
||||
if ($moduleName) {
|
||||
@@ -76,11 +76,6 @@ class ControllerManager
|
||||
$data = json_decode($data);
|
||||
}
|
||||
|
||||
|
||||
if ($data instanceof \stdClass) {
|
||||
$data = get_object_vars($data);
|
||||
}
|
||||
|
||||
if (!class_exists($controllerClassName)) {
|
||||
throw new NotFound("Controller '$controllerName' is not found");
|
||||
}
|
||||
@@ -109,6 +104,13 @@ class ControllerManager
|
||||
throw new NotFound("Action '$actionName' (".$request->getMethod().") does not exist in controller '$controllerName'");
|
||||
}
|
||||
|
||||
// TODO Remove in 5.1.0
|
||||
if ($data instanceof \stdClass) {
|
||||
if ($this->getMetadata()->get(['app', 'deprecatedControllerActions', $controllerName, $primaryActionMethodName])) {
|
||||
$data = get_object_vars($data);
|
||||
}
|
||||
}
|
||||
|
||||
if (method_exists($controller, $beforeMethodName)) {
|
||||
$controller->$beforeMethodName($params, $data, $request);
|
||||
}
|
||||
@@ -125,6 +127,4 @@ class ControllerManager
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -73,7 +73,7 @@ class Record extends Base
|
||||
throw new NotFound();
|
||||
}
|
||||
|
||||
return $entity->toArray();
|
||||
return $entity->getValueMap();
|
||||
}
|
||||
|
||||
public function actionPatch($params, $data, $request)
|
||||
@@ -94,7 +94,7 @@ class Record extends Base
|
||||
$service = $this->getRecordService();
|
||||
|
||||
if ($entity = $service->createEntity($data)) {
|
||||
return $entity->toArray();
|
||||
return $entity->getValueMap();
|
||||
}
|
||||
|
||||
throw new Error();
|
||||
@@ -113,7 +113,7 @@ class Record extends Base
|
||||
$id = $params['id'];
|
||||
|
||||
if ($entity = $this->getRecordService()->updateEntity($id, $data)) {
|
||||
return $entity->toArray();
|
||||
return $entity->getValueMap();
|
||||
}
|
||||
|
||||
throw new Error();
|
||||
@@ -156,10 +156,52 @@ class Record extends Base
|
||||
|
||||
return array(
|
||||
'total' => $result['total'],
|
||||
'list' => isset($result['collection']) ? $result['collection']->toArray() : $result['list']
|
||||
'list' => isset($result['collection']) ? $result['collection']->getValueMapList() : $result['list']
|
||||
);
|
||||
}
|
||||
|
||||
public function getActionListKanban($params, $data, $request)
|
||||
{
|
||||
if (!$this->getAcl()->check($this->name, 'read')) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
$where = $request->get('where');
|
||||
$offset = $request->get('offset');
|
||||
$maxSize = $request->get('maxSize');
|
||||
$asc = $request->get('asc', 'true') === 'true';
|
||||
$sortBy = $request->get('sortBy');
|
||||
$q = $request->get('q');
|
||||
$textFilter = $request->get('textFilter');
|
||||
|
||||
if (empty($maxSize)) {
|
||||
$maxSize = self::MAX_SIZE_LIMIT;
|
||||
}
|
||||
if (!empty($maxSize) && $maxSize > self::MAX_SIZE_LIMIT) {
|
||||
throw new Forbidden("Max should should not exceed " . self::MAX_SIZE_LIMIT . ". Use pagination (offset, limit).");
|
||||
}
|
||||
|
||||
$params = array(
|
||||
'where' => $where,
|
||||
'offset' => $offset,
|
||||
'maxSize' => $maxSize,
|
||||
'asc' => $asc,
|
||||
'sortBy' => $sortBy,
|
||||
'q' => $q,
|
||||
'textFilter' => $textFilter
|
||||
);
|
||||
|
||||
$this->fetchListParamsFromRequest($params, $request, $data);
|
||||
|
||||
$result = $this->getRecordService()->getListKanban($params);
|
||||
|
||||
return (object) [
|
||||
'total' => $result->total,
|
||||
'list' => $result->collection->getValueMapList(),
|
||||
'additionalData' => $result->additionalData
|
||||
];
|
||||
}
|
||||
|
||||
protected function fetchListParamsFromRequest(&$params, $request, $data)
|
||||
{
|
||||
if ($request->get('primaryFilter')) {
|
||||
@@ -209,7 +251,7 @@ class Record extends Base
|
||||
|
||||
return array(
|
||||
'total' => $result['total'],
|
||||
'list' => isset($result['collection']) ? $result['collection']->toArray() : $result['list']
|
||||
'list' => isset($result['collection']) ? $result['collection']->getValueMapList() : $result['list']
|
||||
);
|
||||
}
|
||||
|
||||
@@ -237,14 +279,18 @@ class Record extends Base
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
if ($this->getAcl()->get('exportPermission') !== 'yes' && !$this->getUser()->isAdmin()) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
if (!$this->getAcl()->check($this->name, 'read')) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
$ids = isset($data['ids']) ? $data['ids'] : null;
|
||||
$where = isset($data['where']) ? json_decode(json_encode($data['where']), true) : null;
|
||||
$byWhere = isset($data['byWhere']) ? $data['byWhere'] : false;
|
||||
$selectData = isset($data['selectData']) ? json_decode(json_encode($data['selectData']), true) : null;
|
||||
$ids = isset($data->ids) ? $data->ids : null;
|
||||
$where = isset($data->where) ? json_decode(json_encode($data->where), true) : null;
|
||||
$byWhere = isset($data->byWhere) ? $data->byWhere : false;
|
||||
$selectData = isset($data->selectData) ? json_decode(json_encode($data->selectData), true) : null;
|
||||
|
||||
$params = array();
|
||||
if ($byWhere) {
|
||||
@@ -254,16 +300,16 @@ class Record extends Base
|
||||
$params['ids'] = $ids;
|
||||
}
|
||||
|
||||
if (isset($data['attributeList'])) {
|
||||
$params['attributeList'] = $data['attributeList'];
|
||||
if (isset($data->attributeList)) {
|
||||
$params['attributeList'] = $data->attributeList;
|
||||
}
|
||||
|
||||
if (isset($data['fieldList'])) {
|
||||
$params['fieldList'] = $data['fieldList'];
|
||||
if (isset($data->fieldList)) {
|
||||
$params['fieldList'] = $data->fieldList;
|
||||
}
|
||||
|
||||
if (isset($data['format'])) {
|
||||
$params['format'] = $data['format'];
|
||||
if (isset($data->format)) {
|
||||
$params['format'] = $data->format;
|
||||
}
|
||||
|
||||
return array(
|
||||
@@ -280,21 +326,21 @@ class Record extends Base
|
||||
if (!$this->getAcl()->check($this->name, 'edit')) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
if (empty($data['attributes'])) {
|
||||
if (empty($data->attributes)) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
$params = array();
|
||||
if (array_key_exists('where', $data) && !empty($data['byWhere'])) {
|
||||
$params['where'] = json_decode(json_encode($data['where']), true);
|
||||
if (array_key_exists('selectData', $data)) {
|
||||
$params['selectData'] = json_decode(json_encode($data['selectData']), true);
|
||||
if (property_exists($data, 'where') && !empty($data->byWhere)) {
|
||||
$params['where'] = json_decode(json_encode($data->where), true);
|
||||
if (property_exists($data, 'selectData')) {
|
||||
$params['selectData'] = json_decode(json_encode($data->selectData), true);
|
||||
}
|
||||
} else if (array_key_exists('ids', $data)) {
|
||||
$params['ids'] = $data['ids'];
|
||||
} else if (property_exists($data, 'ids')) {
|
||||
$params['ids'] = $data->ids;
|
||||
}
|
||||
|
||||
$attributes = $data['attributes'];
|
||||
$attributes = $data->attributes;
|
||||
|
||||
$idsUpdated = $this->getRecordService()->massUpdate($attributes, $params);
|
||||
|
||||
@@ -311,15 +357,15 @@ class Record extends Base
|
||||
}
|
||||
|
||||
$params = array();
|
||||
if (array_key_exists('where', $data) && !empty($data['byWhere'])) {
|
||||
$where = json_decode(json_encode($data['where']), true);
|
||||
if (property_exists($data, 'where') && !empty($data->byWhere)) {
|
||||
$where = json_decode(json_encode($data->where), true);
|
||||
$params['where'] = $where;
|
||||
if (array_key_exists('selectData', $data)) {
|
||||
$params['selectData'] = json_decode(json_encode($data['selectData']), true);
|
||||
if (property_exists($data, 'selectData')) {
|
||||
$params['selectData'] = json_decode(json_encode($data->selectData), true);
|
||||
}
|
||||
}
|
||||
if (array_key_exists('ids', $data)) {
|
||||
$params['ids'] = $data['ids'];
|
||||
if (property_exists($data, 'ids')) {
|
||||
$params['ids'] = $data->ids;
|
||||
}
|
||||
|
||||
return $this->getRecordService()->massRemove($params);
|
||||
@@ -338,25 +384,25 @@ class Record extends Base
|
||||
$id = $params['id'];
|
||||
$link = $params['link'];
|
||||
|
||||
if (!empty($data['massRelate'])) {
|
||||
if (!is_array($data['where'])) {
|
||||
if (!empty($data->massRelate)) {
|
||||
if (!is_array($data->where)) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
$where = json_decode(json_encode($data['where']), true);
|
||||
$where = json_decode(json_encode($data->where), true);
|
||||
|
||||
$selectData = null;
|
||||
if (isset($data['selectData']) && is_array($data['selectData'])) {
|
||||
$selectData = json_decode(json_encode($data['selectData']), true);
|
||||
if (isset($data->selectData) && is_array($data->selectData)) {
|
||||
$selectData = json_decode(json_encode($data->selectData), true);
|
||||
}
|
||||
|
||||
return $this->getRecordService()->linkEntityMass($id, $link, $where, $selectData);
|
||||
} else {
|
||||
$foreignIdList = array();
|
||||
if (isset($data['id'])) {
|
||||
$foreignIdList[] = $data['id'];
|
||||
if (isset($data->id)) {
|
||||
$foreignIdList[] = $data->id;
|
||||
}
|
||||
if (isset($data['ids']) && is_array($data['ids'])) {
|
||||
foreach ($data['ids'] as $foreignId) {
|
||||
if (isset($data->ids) && is_array($data->ids)) {
|
||||
foreach ($data->ids as $foreignId) {
|
||||
$foreignIdList[] = $foreignId;
|
||||
}
|
||||
}
|
||||
@@ -388,18 +434,18 @@ class Record extends Base
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
$foreignIds = array();
|
||||
if (isset($data['id'])) {
|
||||
$foreignIds[] = $data['id'];
|
||||
$foreignIdList = [];
|
||||
if (isset($data->id)) {
|
||||
$foreignIdList[] = $data->id;
|
||||
}
|
||||
if (isset($data['ids']) && is_array($data['ids'])) {
|
||||
foreach ($data['ids'] as $foreignId) {
|
||||
$foreignIds[] = $foreignId;
|
||||
if (isset($data->ids) && is_array($data->ids)) {
|
||||
foreach ($data->ids as $foreignId) {
|
||||
$foreignIdList[] = $foreignId;
|
||||
}
|
||||
}
|
||||
|
||||
$result = false;
|
||||
foreach ($foreignIds as $foreignId) {
|
||||
foreach ($foreignIdList as $foreignId) {
|
||||
if ($this->getRecordService()->unlinkEntity($id, $link, $foreignId)) {
|
||||
$result = $result || true;
|
||||
}
|
||||
@@ -441,12 +487,12 @@ class Record extends Base
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
if (empty($data['targetId']) || empty($data['sourceIds']) || !is_array($data['sourceIds']) || !($data['attributes'] instanceof \StdClass)) {
|
||||
if (empty($data->targetId) || empty($data->sourceIds) || !is_array($data->sourceIds) || !($data->attributes instanceof \StdClass)) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
$targetId = $data['targetId'];
|
||||
$sourceIds = $data['sourceIds'];
|
||||
$attributes = get_object_vars($data['attributes']);
|
||||
$targetId = $data->targetId;
|
||||
$sourceIds = $data->sourceIds;
|
||||
$attributes = $data->attributes;
|
||||
|
||||
if (!$this->getAcl()->check($this->name, 'edit')) {
|
||||
throw new Forbidden();
|
||||
@@ -457,7 +503,7 @@ class Record extends Base
|
||||
|
||||
public function postActionGetDuplicateAttributes($params, $data, $request)
|
||||
{
|
||||
if (empty($data['id'])) {
|
||||
if (empty($data->id)) {
|
||||
throw new BadRequest();
|
||||
}
|
||||
|
||||
@@ -468,7 +514,7 @@ class Record extends Base
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
return $this->getRecordService()->getDuplicateAttributes($data['id']);
|
||||
return $this->getRecordService()->getDuplicateAttributes($data->id);
|
||||
}
|
||||
|
||||
public function postActionMassFollow($params, $data, $request)
|
||||
@@ -477,8 +523,8 @@ class Record extends Base
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
if (array_key_exists('ids', $data)) {
|
||||
$params['ids'] = $data['ids'];
|
||||
if (property_exists($data, 'ids')) {
|
||||
$params['ids'] = $data->ids;
|
||||
}
|
||||
|
||||
return $this->getRecordService()->massFollow($params);
|
||||
@@ -490,11 +536,10 @@ class Record extends Base
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
if (array_key_exists('ids', $data)) {
|
||||
$params['ids'] = $data['ids'];
|
||||
if (property_exists($data, 'ids')) {
|
||||
$params['ids'] = $data->ids;
|
||||
}
|
||||
|
||||
return $this->getRecordService()->massUnfollow($params);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -61,5 +61,15 @@ class RecordTree extends Record
|
||||
'path' => $this->getRecordService()->getTreeItemPath($parentId)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function getActionLastChildrenIdList($params, $data, $request)
|
||||
{
|
||||
if (!$this->getAcl()->check($this->name, 'read')) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
$parentId = $request->get('parentId');
|
||||
|
||||
return $this->getRecordService()->getLastChildrenIdList($parentId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -44,6 +44,10 @@ class CronManager
|
||||
|
||||
private $scheduledJobUtil;
|
||||
|
||||
private $cronJobUtil;
|
||||
|
||||
private $cronScheduledJobUtil;
|
||||
|
||||
const PENDING = 'Pending';
|
||||
|
||||
const RUNNING = 'Running';
|
||||
@@ -64,8 +68,8 @@ class CronManager
|
||||
$this->serviceFactory = $this->container->get('serviceFactory');
|
||||
|
||||
$this->scheduledJobUtil = $this->container->get('scheduledJob');
|
||||
$this->cronJob = new \Espo\Core\Utils\Cron\Job($this->config, $this->entityManager);
|
||||
$this->cronScheduledJob = new \Espo\Core\Utils\Cron\ScheduledJob($this->config, $this->entityManager);
|
||||
$this->cronJobUtil = new \Espo\Core\Utils\Cron\Job($this->config, $this->entityManager);
|
||||
$this->cronScheduledJobUtil = new \Espo\Core\Utils\Cron\ScheduledJob($this->config, $this->entityManager);
|
||||
}
|
||||
|
||||
protected function getContainer()
|
||||
@@ -98,23 +102,24 @@ class CronManager
|
||||
return $this->scheduledJobUtil;
|
||||
}
|
||||
|
||||
protected function getCronJob()
|
||||
protected function getCronJobUtil()
|
||||
{
|
||||
return $this->cronJob;
|
||||
return $this->cronJobUtil;
|
||||
}
|
||||
|
||||
protected function getCronScheduledJob()
|
||||
protected function getCronScheduledJobUtil()
|
||||
{
|
||||
return $this->cronScheduledJob;
|
||||
return $this->cronScheduledJobUtil;
|
||||
}
|
||||
|
||||
protected function getLastRunTime()
|
||||
{
|
||||
$lastRunData = $this->getFileManager()->getPhpContents($this->lastRunTime);
|
||||
|
||||
$lastRunTime = time() - intval($this->getConfig()->get('cron.minExecutionTime')) - 1;
|
||||
if (is_array($lastRunData) && !empty($lastRunData['time'])) {
|
||||
$lastRunTime = $lastRunData['time'];
|
||||
} else {
|
||||
$lastRunTime = time() - intval($this->getConfig()->get('cronMinInterval', 0)) - 1;
|
||||
}
|
||||
|
||||
return $lastRunTime;
|
||||
@@ -132,9 +137,9 @@ class CronManager
|
||||
{
|
||||
$currentTime = time();
|
||||
$lastRunTime = $this->getLastRunTime();
|
||||
$minTime = $this->getConfig()->get('cron.minExecutionTime');
|
||||
$cronMinInterval = $this->getConfig()->get('cronMinInterval', 0);
|
||||
|
||||
if ($currentTime > ($lastRunTime + $minTime) ) {
|
||||
if ($currentTime > ($lastRunTime + $cronMinInterval)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -155,58 +160,69 @@ class CronManager
|
||||
|
||||
$this->setLastRunTime(time());
|
||||
|
||||
$this->getCronJob()->markFailedJobs();
|
||||
$this->getCronJob()->updateFailedJobAttempts();
|
||||
$this->getCronJobUtil()->markFailedJobs();
|
||||
$this->getCronJobUtil()->updateFailedJobAttempts();
|
||||
$this->createJobsFromScheduledJobs();
|
||||
$this->getCronJob()->removePendingJobDuplicates();
|
||||
$this->getCronJobUtil()->removePendingJobDuplicates();
|
||||
|
||||
$pendingJobList = $this->getCronJob()->getPendingJobList();
|
||||
$pendingJobList = $this->getCronJobUtil()->getPendingJobList();
|
||||
|
||||
foreach ($pendingJobList as $job) {
|
||||
$jobEntity = $this->getEntityManager()->getEntity('Job', $job['id']);
|
||||
$skip = false;
|
||||
$this->getEntityManager()->getPdo()->query('LOCK TABLES `job` WRITE');
|
||||
if ($this->getCronJobUtil()->isJobPending($job->id)) {
|
||||
if ($job->get('scheduledJobId')) {
|
||||
if ($this->getCronJobUtil()->isScheduledJobRunning($job->get('scheduledJobId'), $job->get('targetId'), $job->get('targetType'))) {
|
||||
$skip = true;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$skip = true;
|
||||
}
|
||||
|
||||
if (!isset($jobEntity)) {
|
||||
$GLOBALS['log']->error('CronManager: empty Job entity ['.$job['id'].'].');
|
||||
if ($skip) {
|
||||
$this->getEntityManager()->getPdo()->query('UNLOCK TABLES');
|
||||
continue;
|
||||
}
|
||||
|
||||
$jobEntity->set('status', self::RUNNING);
|
||||
$this->getEntityManager()->saveEntity($jobEntity);
|
||||
$job->set('status', self::RUNNING);
|
||||
$job->set('pid', $this->getCronJobUtil()->getPid());
|
||||
$this->getEntityManager()->saveEntity($job);
|
||||
$this->getEntityManager()->getPdo()->query('UNLOCK TABLES');
|
||||
|
||||
$isSuccess = true;
|
||||
$skipLog = false;
|
||||
|
||||
try {
|
||||
if (!empty($job['scheduled_job_id'])) {
|
||||
if ($job->get('scheduledJobId')) {
|
||||
$this->runScheduledJob($job);
|
||||
} else {
|
||||
$this->runService($job);
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
$isSuccess = false;
|
||||
$GLOBALS['log']->error('CronManager: Failed job running, job ['.$job['id'].']. Error Details: '.$e->getMessage());
|
||||
if ($e->getCode() === -1) {
|
||||
$job->set('attempts', 0);
|
||||
$skipLog = true;
|
||||
} else {
|
||||
$GLOBALS['log']->error('CronManager: Failed job running, job ['.$job->id.']. Error Details: '.$e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
$status = $isSuccess ? self::SUCCESS : self::FAILED;
|
||||
|
||||
$jobEntity->set('status', $status);
|
||||
$this->getEntityManager()->saveEntity($jobEntity);
|
||||
$job->set('status', $status);
|
||||
$this->getEntityManager()->saveEntity($job);
|
||||
|
||||
if (!empty($job['scheduled_job_id'])) {
|
||||
$this->getCronScheduledJob()->addLogRecord($job['scheduled_job_id'], $status, null, $job['target_id'], $job['target_type']);
|
||||
if ($job->get('scheduledJobId') && !$skipLog) {
|
||||
$this->getCronScheduledJobUtil()->addLogRecord($job->get('scheduledJobId'), $status, null, $job->get('targetId'), $job->get('targetType'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Run Scheduled Job
|
||||
*
|
||||
* @param array $job
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function runScheduledJob(array $job)
|
||||
protected function runScheduledJob($job)
|
||||
{
|
||||
$jobName = $job['method'];
|
||||
$jobName = $job->get('scheduledJobJob');
|
||||
|
||||
$className = $this->getScheduledJobUtil()->get($jobName);
|
||||
if ($className === false) {
|
||||
@@ -220,14 +236,12 @@ class CronManager
|
||||
}
|
||||
|
||||
$data = null;
|
||||
if (!empty($job['data'])) {
|
||||
$data = $job['data'];
|
||||
if (Json::isJSON($data)) {
|
||||
$data = Json::decode($data, true);
|
||||
}
|
||||
|
||||
if ($job->get('data')) {
|
||||
$data = $job->get('data');
|
||||
}
|
||||
|
||||
$jobClass->$method($data, $job['target_id'], $job['target_type']);
|
||||
$jobClass->$method($data, $job->get('targetId'), $job->get('targetType'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -237,92 +251,94 @@ class CronManager
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function runService(array $job)
|
||||
protected function runService($job)
|
||||
{
|
||||
$serviceName = $job['service_name'];
|
||||
$serviceName = $job->get('serviceName');
|
||||
|
||||
if (!$serviceName) {
|
||||
throw new Error('Job with empty serviceName.');
|
||||
}
|
||||
|
||||
if (!$this->getServiceFactory()->checkExists($serviceName)) {
|
||||
throw new NotFound();
|
||||
}
|
||||
|
||||
$service = $this->getServiceFactory()->create($serviceName);
|
||||
$serviceMethod = $job['method'];
|
||||
|
||||
if (!method_exists($service, $serviceMethod)) {
|
||||
$methodNameDeprecated = $job->get('method');
|
||||
$methodName = $job->get('methodName');
|
||||
|
||||
$isDeprecated = false;
|
||||
if (!$methodName) {
|
||||
$isDeprecated = true;
|
||||
$methodName = $methodNameDeprecated;
|
||||
}
|
||||
|
||||
if (!$methodName) {
|
||||
throw new Error('Job with empty methodName.');
|
||||
}
|
||||
|
||||
if (!method_exists($service, $methodName)) {
|
||||
throw new NotFound();
|
||||
}
|
||||
|
||||
$data = $job['data'];
|
||||
if (Json::isJSON($data)) {
|
||||
$data = Json::decode($data, true);
|
||||
$data = $job->get('data');
|
||||
|
||||
if ($isDeprecated) {
|
||||
$data = Json::decode(Json::encode($data), true);
|
||||
}
|
||||
|
||||
$service->$serviceMethod($data, $job['target_id'], $job['target_type']);
|
||||
$service->$methodName($data, $job->get('targetId'), $job->get('targetType'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Check scheduled jobs and create related jobs
|
||||
*
|
||||
* @return array List of created Jobs
|
||||
*/
|
||||
protected function createJobsFromScheduledJobs()
|
||||
{
|
||||
$activeScheduledJobList = $this->getCronScheduledJob()->getActiveScheduledJobList();
|
||||
$activeScheduledJobList = $this->getCronScheduledJobUtil()->getActiveScheduledJobList();
|
||||
|
||||
$runningScheduledJobIdList = $this->getCronJob()->getRunningScheduledJobIdList();
|
||||
$runningScheduledJobIdList = $this->getCronJobUtil()->getRunningScheduledJobIdList();
|
||||
|
||||
$createdJobIdList = array();
|
||||
foreach ($activeScheduledJobList as $scheduledJob) {
|
||||
$scheduling = $scheduledJob['scheduling'];
|
||||
$scheduling = $scheduledJob->get('scheduling');
|
||||
|
||||
try {
|
||||
$cronExpression = \Cron\CronExpression::factory($scheduling);
|
||||
} catch (\Exception $e) {
|
||||
$GLOBALS['log']->error('CronManager (ScheduledJob ['.$scheduledJob['id'].']): Scheduling string error - '. $e->getMessage() . '.');
|
||||
$GLOBALS['log']->error('CronManager (ScheduledJob ['.$scheduledJob->id.']): Scheduling string error - '. $e->getMessage() . '.');
|
||||
continue;
|
||||
}
|
||||
|
||||
try {
|
||||
$previousDate = $cronExpression->getPreviousRunDate()->format('Y-m-d H:i:s');
|
||||
$nextDate = $cronExpression->getNextRunDate()->format('Y-m-d H:i:s');
|
||||
} catch (\Exception $e) {
|
||||
$GLOBALS['log']->error('CronManager (ScheduledJob ['.$scheduledJob['id'].']): Unsupported CRON expression ['.$scheduling.']');
|
||||
$GLOBALS['log']->error('CronManager (ScheduledJob ['.$scheduledJob->id.']): Unsupported CRON expression ['.$scheduling.']');
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($cronExpression->isDue()) {
|
||||
$previousDate = date('Y-m-d H:i:s');
|
||||
}
|
||||
|
||||
$existingJob = $this->getCronJob()->getJobByScheduledJob($scheduledJob['id'], $previousDate);
|
||||
$existingJob = $this->getCronJobUtil()->getJobByScheduledJob($scheduledJob->id, $nextDate);
|
||||
if ($existingJob) continue;
|
||||
|
||||
$className = $this->getScheduledJobUtil()->get($scheduledJob['job']);
|
||||
$className = $this->getScheduledJobUtil()->get($scheduledJob->get('job'));
|
||||
if ($className) {
|
||||
if (method_exists($className, 'prepare')) {
|
||||
$implementation = new $className($this->container);
|
||||
$implementation->prepare($scheduledJob, $previousDate);
|
||||
$implementation->prepare($scheduledJob, $nextDate);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (in_array($scheduledJob['id'], $runningScheduledJobIdList)) {
|
||||
if (in_array($scheduledJob->id, $runningScheduledJobIdList)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$jobEntity = $this->getEntityManager()->getEntity('Job');
|
||||
$jobEntity->set(array(
|
||||
'name' => $scheduledJob['name'],
|
||||
'name' => $scheduledJob->get('name'),
|
||||
'status' => self::PENDING,
|
||||
'scheduledJobId' => $scheduledJob['id'],
|
||||
'executeTime' => $previousDate,
|
||||
'method' => $scheduledJob['job']
|
||||
'scheduledJobId' => $scheduledJob->id,
|
||||
'executeTime' => $nextDate
|
||||
));
|
||||
$this->getEntityManager()->saveEntity($jobEntity);
|
||||
|
||||
$createdJobIdList[] = $jobEntity->id;
|
||||
}
|
||||
|
||||
return $createdJobIdList;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -143,13 +143,17 @@ class DataManager
|
||||
if ($job) {
|
||||
$entityManager->removeEntity($job);
|
||||
}
|
||||
$name = $jobName;
|
||||
if (!empty($defs['name'])) {
|
||||
$name = $defs['name'];
|
||||
}
|
||||
$job = $entityManager->getEntity('ScheduledJob');
|
||||
$job->set(array(
|
||||
'job' => $jobName,
|
||||
'status' => 'Active',
|
||||
'scheduling' => $defs['scheduling'],
|
||||
'isInternal' => true,
|
||||
'name' => $jobName
|
||||
'name' => $name
|
||||
));
|
||||
$entityManager->saveEntity($job);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -31,19 +31,35 @@ namespace Espo\Core\Export;
|
||||
|
||||
use \Espo\Core\Exceptions\Error;
|
||||
|
||||
use \Espo\Core\ORM\Entity;
|
||||
|
||||
class Csv extends \Espo\Core\Injectable
|
||||
{
|
||||
protected $dependencyList = [
|
||||
'config',
|
||||
'preferences'
|
||||
'preferences',
|
||||
'metadata'
|
||||
];
|
||||
|
||||
public function loadAdditionalFields(Entity $entity, $fieldList)
|
||||
{
|
||||
foreach ($fieldList as $field) {
|
||||
if ($this->getInjection('metadata')->get(['entityDefs', $entity->getEntityType(), 'fields', $field, 'type']) === 'linkMultiple') {
|
||||
if (!$entity->has($field . 'Ids')) {
|
||||
$entity->loadLinkMultipleField($field);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function process($entityType, $params, $dataList)
|
||||
{
|
||||
if (!is_array($params['attributeList'])) {
|
||||
throw new Error();
|
||||
}
|
||||
|
||||
$dataList = $this->prepareDataList($dataList);
|
||||
|
||||
$attributeList = $params['attributeList'];
|
||||
|
||||
$delimiter = $this->getInjection('preferences')->get('exportDelimiter');
|
||||
@@ -62,4 +78,21 @@ class Csv extends \Espo\Core\Injectable
|
||||
|
||||
return $csv;
|
||||
}
|
||||
|
||||
protected function prepareDataList($dataList)
|
||||
{
|
||||
$prepareDataList = [];
|
||||
foreach ($dataList as $row) {
|
||||
$preparedRow = [];
|
||||
foreach ($row as $item) {
|
||||
if (is_array($item) || is_object($item)) {
|
||||
$item = \Espo\Core\Utils\Json::encode($item);
|
||||
}
|
||||
$preparedRow[] = $item;
|
||||
}
|
||||
$prepareDataList[] = $preparedRow;
|
||||
}
|
||||
|
||||
return $prepareDataList;
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -78,6 +78,27 @@ class Xlsx extends \Espo\Core\Injectable
|
||||
}
|
||||
}
|
||||
}
|
||||
foreach ($fieldList as $field) {
|
||||
if ($this->getMetadata()->get(['entityDefs', $entity->getEntityType(), 'fields', $field, 'type']) === 'linkMultiple') {
|
||||
if (!$entity->has($field . 'Ids')) {
|
||||
$entity->loadLinkMultipleField($field);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function filterFieldList($entityType, $fieldList, $exportAllFields)
|
||||
{
|
||||
if ($exportAllFields) {
|
||||
foreach ($fieldList as $i => $field) {
|
||||
$type = $this->getMetadata()->get(['entityDefs', $entityType, 'fields', $field, 'type']);
|
||||
if (in_array($type, ['linkMultiple', 'attachmentMultiple'])) {
|
||||
unset($fieldList[$i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return array_values($fieldList);
|
||||
}
|
||||
|
||||
public function addAdditionalAttributes($entityType, &$attributeList, $fieldList)
|
||||
@@ -123,7 +144,7 @@ class Xlsx extends \Espo\Core\Injectable
|
||||
throw new Error();
|
||||
}
|
||||
|
||||
$phpExcel = new \PHPExcel();
|
||||
$phpExcel = new \PhpOffice\PhpSpreadsheet\Spreadsheet();
|
||||
$sheet = $phpExcel->setActiveSheetIndex(0);
|
||||
|
||||
if (isset($params['exportName'])) {
|
||||
@@ -132,7 +153,7 @@ class Xlsx extends \Espo\Core\Injectable
|
||||
$exportName = $this->getInjection('language')->translate($entityType, 'scopeNamesPlural');
|
||||
}
|
||||
|
||||
$sheetName = substr($exportName, 0, 30);
|
||||
$sheetName = mb_substr($exportName, 0, 30, 'utf-8');
|
||||
$badCharList = ['*', ':', '/', '\\', '?', '[', ']'];
|
||||
foreach ($badCharList as $badChar) {
|
||||
$sheetName = str_replace($badCharList, ' ', $sheetName);
|
||||
@@ -155,10 +176,11 @@ class Xlsx extends \Espo\Core\Injectable
|
||||
)
|
||||
);
|
||||
|
||||
$now = new \DateTime();
|
||||
$now->setTimezone(new \DateTimeZone($this->getInjection('config')->get('timeZone', 'UTC')));
|
||||
|
||||
$sheet->setCellValue('A1', $exportName);
|
||||
|
||||
$sheet->setCellValue('B1', \PHPExcel_Shared_Date::PHPToExcel(strtotime(date('Y-m-d H:i:s'))));
|
||||
|
||||
$sheet->setCellValue('B1', \PhpOffice\PhpSpreadsheet\Shared\Date::PHPToExcel(strtotime($now->format('Y-m-d H:i:s'))));
|
||||
|
||||
$sheet->getStyle('A1')->applyFromArray($titleStyle);
|
||||
$sheet->getStyle('B1')->applyFromArray($dateStyle);
|
||||
@@ -195,9 +217,9 @@ class Xlsx extends \Espo\Core\Injectable
|
||||
$label = $name;
|
||||
if (strpos($name, '_') !== false) {
|
||||
list($linkName, $foreignField) = explode('_', $name);
|
||||
$foreigScope = $this->getInjection('metadata')->get(['entityDefs', $entityType, 'links', $linkName, 'entity']);
|
||||
if ($foreigScope) {
|
||||
$label = $this->getInjection('language')->translate($linkName, 'links', $entityType) . '.' . $this->getInjection('language')->translate($foreignField, 'fields', $foreigScope);
|
||||
$foreignScope = $this->getInjection('metadata')->get(['entityDefs', $entityType, 'links', $linkName, 'entity']);
|
||||
if ($foreignScope) {
|
||||
$label = $this->getInjection('language')->translate($linkName, 'links', $entityType) . '.' . $this->getInjection('language')->translate($foreignField, 'fields', $foreignScope);
|
||||
}
|
||||
} else {
|
||||
$label = $this->getInjection('language')->translate($name, 'fields', $entityType);
|
||||
@@ -205,13 +227,7 @@ class Xlsx extends \Espo\Core\Injectable
|
||||
|
||||
$sheet->setCellValue($col . $rowNumber, $label);
|
||||
$sheet->getColumnDimension($col)->setAutoSize(true);
|
||||
if (
|
||||
$defs['type'] == 'phone'
|
||||
|| $defs['type'] == 'email'
|
||||
|| $defs['type'] == 'url'
|
||||
|| $defs['type'] == 'link'
|
||||
|| $defs['type'] == 'linkParent'
|
||||
) {
|
||||
if (in_array($defs['type'], ['phone', 'email', 'url', 'link', 'linkParent'])) {
|
||||
$linkColList[] = $col;
|
||||
} else if ($name == 'name') {
|
||||
$linkColList[] = $col;
|
||||
@@ -231,6 +247,8 @@ class Xlsx extends \Espo\Core\Injectable
|
||||
$sheet->getStyle("A$rowNumber:$col$rowNumber")->applyFromArray($headerStyle);
|
||||
$sheet->setAutoFilter("A$rowNumber:$col$rowNumber");
|
||||
|
||||
$typesCache = array();
|
||||
|
||||
$rowNumber++;
|
||||
foreach ($dataList as $row) {
|
||||
$i = 0;
|
||||
@@ -242,18 +260,41 @@ class Xlsx extends \Espo\Core\Injectable
|
||||
$defs = array();
|
||||
$defs['type'] = 'base';
|
||||
}
|
||||
|
||||
$type = $defs['type'];
|
||||
$foreignField = $name;
|
||||
$linkName = null;
|
||||
if (strpos($name, '_') !== false) {
|
||||
list($linkName, $foreignField) = explode('_', $name);
|
||||
$foreignScope = $this->getInjection('metadata')->get(['entityDefs', $entityType, 'links', $linkName, 'entity']);
|
||||
if ($foreignScope) {
|
||||
$type = $this->getInjection('metadata')->get(['entityDefs', $foreignScope, 'fields', $foreignField, 'type'], $type);
|
||||
}
|
||||
}
|
||||
if ($type === 'foreign') {
|
||||
$linkName = $this->getInjection('metadata')->get(['entityDefs', $entityType, 'fields', $name, 'link']);
|
||||
$foreignField = $this->getInjection('metadata')->get(['entityDefs', $entityType, 'fields', $name, 'field']);
|
||||
$foreignScope = $this->getInjection('metadata')->get(['entityDefs', $entityType, 'links', $linkName, 'entity']);
|
||||
if ($foreignScope) {
|
||||
$type = $this->getInjection('metadata')->get(['entityDefs', $foreignScope, 'fields', $foreignField, 'type'], $type);
|
||||
}
|
||||
}
|
||||
$typesCache[$name] = $type;
|
||||
|
||||
$link = null;
|
||||
if ($defs['type'] == 'link') {
|
||||
if ($type == 'link') {
|
||||
if (array_key_exists($name.'Name', $row)) {
|
||||
$sheet->setCellValue("$col$rowNumber", $row[$name.'Name']);
|
||||
}
|
||||
} else if ($defs['type'] == 'linkParent') {
|
||||
} else if ($type == 'linkParent') {
|
||||
if (array_key_exists($name.'Name', $row)) {
|
||||
$sheet->setCellValue("$col$rowNumber", $row[$name.'Name']);
|
||||
}
|
||||
} else if ($defs['type'] == 'int') {
|
||||
} else if ($type == 'int') {
|
||||
$sheet->setCellValue("$col$rowNumber", $row[$name] ?: 0);
|
||||
} else if ($defs['type'] == 'currency') {
|
||||
} else if ($type == 'float') {
|
||||
$sheet->setCellValue("$col$rowNumber", $row[$name] ?: 0);
|
||||
} else if ($type == 'currency') {
|
||||
if (array_key_exists($name.'Currency', $row) && array_key_exists($name, $row)) {
|
||||
$sheet->setCellValue("$col$rowNumber", $row[$name] ? $row[$name] : '');
|
||||
$currency = $row[$name . 'Currency'];
|
||||
@@ -263,9 +304,9 @@ class Xlsx extends \Espo\Core\Injectable
|
||||
->getNumberFormat()
|
||||
->setFormatCode('[$'.$currencySymbol.'-409]#,##0.00;-[$'.$currencySymbol.'-409]#,##0.00');
|
||||
}
|
||||
} else if ($defs['type'] == 'currencyConverted') {
|
||||
} else if ($type == 'currencyConverted') {
|
||||
if (array_key_exists($name, $row)) {
|
||||
$currency = $this->getConfig()->get('baseCurrency');
|
||||
$currency = $this->getConfig()->get('defaultCurrency');
|
||||
$currencySymbol = $this->getMetadata()->get(['app', 'currency', 'symbolMap', $currency], '');
|
||||
|
||||
$sheet->getStyle("$col$rowNumber")
|
||||
@@ -274,7 +315,7 @@ class Xlsx extends \Espo\Core\Injectable
|
||||
|
||||
$sheet->setCellValue("$col$rowNumber", $row[$name] ? $row[$name] : '');
|
||||
}
|
||||
} else if ($defs['type'] == 'personName') {
|
||||
} else if ($type == 'personName') {
|
||||
if (!empty($row['name'])) {
|
||||
$sheet->setCellValue("$col$rowNumber", $row['name']);
|
||||
} else {
|
||||
@@ -290,20 +331,41 @@ class Xlsx extends \Espo\Core\Injectable
|
||||
}
|
||||
$sheet->setCellValue("$col$rowNumber", $personName);
|
||||
}
|
||||
} else if ($defs['type'] == 'date') {
|
||||
} else if ($type == 'date') {
|
||||
if (isset($row[$name])) {
|
||||
$sheet->setCellValue("$col$rowNumber", \PHPExcel_Shared_Date::PHPToExcel(strtotime($row[$name])));
|
||||
$sheet->setCellValue("$col$rowNumber", \PhpOffice\PhpSpreadsheet\Shared\Date::PHPToExcel(strtotime($row[$name])));
|
||||
}
|
||||
} else if ($defs['type'] == 'datetime' || $defs['type'] == 'datetimeOptional') {
|
||||
if (isset($row[$name])) {
|
||||
$sheet->setCellValue("$col$rowNumber", \PHPExcel_Shared_Date::PHPToExcel(strtotime($row[$name])));
|
||||
} else if ($type == 'datetime' || $type == 'datetimeOptional') {
|
||||
$value = null;
|
||||
if ($type == 'datetimeOptional') {
|
||||
if (isset($row[$name . 'Date']) && $row[$name . 'Date']) {
|
||||
$value = $row[$name . 'Date'];
|
||||
}
|
||||
}
|
||||
} else if ($defs['type'] == 'image') {
|
||||
if (!$value) {
|
||||
if (isset($row[$name])) {
|
||||
$value = $row[$name];
|
||||
}
|
||||
}
|
||||
if ($value && strlen($value) > 11) {
|
||||
try {
|
||||
$timeZone = $this->getInjection('config')->get('timeZone');
|
||||
$dt = new \DateTime($value);
|
||||
$dt->setTimezone(new \DateTimeZone($timeZone));
|
||||
$value = $dt->format($this->getInjection('dateTime')->getInternalDateTimeFormat());
|
||||
} catch (\Exception $e) {
|
||||
$value = '';
|
||||
}
|
||||
}
|
||||
if ($value) {
|
||||
$sheet->setCellValue("$col$rowNumber", \PhpOffice\PhpSpreadsheet\Shared\Date::PHPToExcel(strtotime($value)));
|
||||
}
|
||||
} else if ($type == 'image') {
|
||||
if (isset($row[$name . 'Id']) && $row[$name . 'Id']) {
|
||||
$attachment = $this->getEntityManager()->getEntity('Attachment', $row[$name . 'Id']);
|
||||
|
||||
if ($attachment) {
|
||||
$objDrawing = new \PHPExcel_Worksheet_Drawing();
|
||||
$objDrawing = new \PhpOffice\PhpSpreadsheet\Worksheet\Drawing();
|
||||
$filePath = $this->getInjection('fileStorageManager')->getLocalFilePath($attachment);
|
||||
|
||||
if ($filePath && file_exists($filePath)) {
|
||||
@@ -316,51 +378,144 @@ class Xlsx extends \Espo\Core\Injectable
|
||||
}
|
||||
}
|
||||
|
||||
} else if ($defs['type'] == 'file') {
|
||||
} else if ($type == 'file') {
|
||||
if (array_key_exists($name.'Name', $row)) {
|
||||
$sheet->setCellValue("$col$rowNumber", $row[$name.'Name']);
|
||||
}
|
||||
} else if ($defs['type'] == 'enum') {
|
||||
} else if ($type == 'enum') {
|
||||
if (array_key_exists($name, $row)) {
|
||||
$value = $this->getInjection('language')->translateOption($row[$name], $name, $entityType);
|
||||
if ($linkName) {
|
||||
$value = $this->getInjection('language')->translateOption($row[$name], $foreignField, $foreignScope);
|
||||
} else {
|
||||
$value = $this->getInjection('language')->translateOption($row[$name], $name, $entityType);
|
||||
}
|
||||
$sheet->setCellValue("$col$rowNumber", $value);
|
||||
}
|
||||
} else if ($type == 'linkMultiple') {
|
||||
if (array_key_exists($name . 'Ids', $row) && array_key_exists($name . 'Names', $row)) {
|
||||
$nameList = [];
|
||||
foreach ($row[$name . 'Ids'] as $relatedId) {
|
||||
$relatedName = $relatedId;
|
||||
if (property_exists($row[$name . 'Names'], $relatedId)) {
|
||||
$relatedName = $row[$name . 'Names']->$relatedId;
|
||||
}
|
||||
$nameList[] = $relatedName;
|
||||
}
|
||||
$sheet->setCellValue("$col$rowNumber", implode(', ', $nameList));
|
||||
}
|
||||
} else if ($type == 'address') {
|
||||
$value = '';
|
||||
if (!empty($row[$name . 'Street'])) {
|
||||
$value = $value .= $row[$name.'Street'];
|
||||
}
|
||||
if (!empty($row[$name.'City']) || !empty($row[$name.'State']) || !empty($row[$name.'PostalCode'])) {
|
||||
if ($value) {
|
||||
$value .= "\n";
|
||||
}
|
||||
if (!empty($row[$name.'City'])) {
|
||||
$value .= $row[$name.'City'];
|
||||
if (
|
||||
!empty($row[$name.'State']) || !empty($row[$name.'PostalCode'])
|
||||
) {
|
||||
$value .= ', ';
|
||||
}
|
||||
}
|
||||
if (!empty($row[$name.'State'])) {
|
||||
$value .= $row[$name.'State'];
|
||||
if (!empty($row[$name.'PostalCode'])) {
|
||||
$value .= ' ';
|
||||
}
|
||||
}
|
||||
if (!empty($row[$name.'PostalCode'])) {
|
||||
$value .= $row[$name.'PostalCode'];
|
||||
}
|
||||
}
|
||||
if (!empty($row[$name.'Country'])) {
|
||||
if ($value) {
|
||||
$value .= "\n";
|
||||
}
|
||||
$value .= $row[$name.'Country'];
|
||||
}
|
||||
$sheet->setCellValue("$col$rowNumber", $value);
|
||||
} else if ($type == 'duration') {
|
||||
if (!empty($row[$name])) {
|
||||
$seconds = intval($row[$name]);
|
||||
|
||||
$days = intval(floor($seconds / 86400));
|
||||
$seconds = $seconds - $days * 86400;
|
||||
$hours = intval(floor($seconds / 3600));
|
||||
$seconds = $seconds - $hours * 3600;
|
||||
$minutes = intval(floor($seconds / 60));
|
||||
|
||||
$value = '';
|
||||
if ($days) {
|
||||
$value .= (string) $days . $this->getInjection('language')->translate('d', 'durationUnits');
|
||||
if ($minutes || $hours) {
|
||||
$value .= ' ';
|
||||
}
|
||||
}
|
||||
if ($hours) {
|
||||
$value .= (string) $hours . $this->getInjection('language')->translate('h', 'durationUnits');
|
||||
if ($minutes) {
|
||||
$value .= ' ';
|
||||
}
|
||||
}
|
||||
if ($minutes) {
|
||||
$value .= (string) $minutes . $this->getInjection('language')->translate('m', 'durationUnits');
|
||||
}
|
||||
|
||||
$sheet->setCellValue("$col$rowNumber", $value);
|
||||
}
|
||||
|
||||
} else {
|
||||
if (array_key_exists($name, $row)) {
|
||||
$sheet->setCellValue("$col$rowNumber", $row[$name]);
|
||||
$sheet->setCellValueExplicit("$col$rowNumber", $row[$name], \PhpOffice\PhpSpreadsheet\Cell\DataType::TYPE_STRING);
|
||||
}
|
||||
}
|
||||
|
||||
$link = false;
|
||||
|
||||
$foreignLink = null;
|
||||
$isForeign = false;
|
||||
if (strpos($name, '_')) {
|
||||
$isForeign = true;
|
||||
list($foreignLink, $foreignField) = explode('_', $name);
|
||||
}
|
||||
|
||||
if ($name == 'name') {
|
||||
if (array_key_exists('id', $row)) {
|
||||
$link = $this->getConfig()->getSiteUrl() . "/#".$entityType . "/view/" . $row['id'];
|
||||
}
|
||||
} else if ($defs['type'] == 'url') {
|
||||
} else if ($type == 'url') {
|
||||
if (array_key_exists($name, $row) && filter_var($row[$name], FILTER_VALIDATE_URL)) {
|
||||
$link = $row[$name];
|
||||
}
|
||||
} else if ($defs['type'] == 'link') {
|
||||
} else if ($type == 'link') {
|
||||
if (array_key_exists($name.'Id', $row)) {
|
||||
$foreignEntity = $this->getMetadata()->get(['entityDefs', $entityType, 'links', $name, 'entity']);
|
||||
$foreignEntity = null;
|
||||
if (!$isForeign) {
|
||||
$foreignEntity = $this->getMetadata()->get(['entityDefs', $entityType, 'links', $name, 'entity']);
|
||||
} else {
|
||||
$foreignEntity1 = $this->getMetadata()->get(['entityDefs', $entityType, 'links', $foreignLink, 'entity']);
|
||||
$foreignEntity = $this->getMetadata()->get(['entityDefs', $foreignEntity1, 'links', $foreignField, 'entity']);
|
||||
}
|
||||
if ($foreignEntity) {
|
||||
$link = $this->getConfig()->getSiteUrl() . "/#" . $foreignEntity. "/view/". $row[$name.'Id'];
|
||||
}
|
||||
}
|
||||
} else if ($defs['type'] == 'file') {
|
||||
} else if ($type == 'file') {
|
||||
if (array_key_exists($name.'Id', $row)) {
|
||||
$link = $this->getConfig()->getSiteUrl() . "/?entryPoint=download&id=" . $row[$name.'Id'];
|
||||
}
|
||||
} else if ($defs['type'] == 'linkParent') {
|
||||
} else if ($type == 'linkParent') {
|
||||
if (array_key_exists($name.'Id', $row) && array_key_exists($name.'Type', $row)) {
|
||||
$link = $this->getConfig()->getSiteUrl() . "/#".$row[$name.'Type']."/view/". $row[$name.'Id'];
|
||||
}
|
||||
} else if ($defs['type'] == 'phone') {
|
||||
} else if ($type == 'phone') {
|
||||
if (array_key_exists($name, $row)) {
|
||||
$link = "tel:".$row[$name];
|
||||
}
|
||||
} else if ($defs['type'] == 'email' && array_key_exists($name, $row)) {
|
||||
} else if ($type == 'email' && array_key_exists($name, $row)) {
|
||||
if (array_key_exists($name, $row)) {
|
||||
$link = "mailto:".$row[$name];
|
||||
}
|
||||
@@ -373,52 +528,54 @@ class Xlsx extends \Espo\Core\Injectable
|
||||
$rowNumber++;
|
||||
}
|
||||
|
||||
$sheet->getStyle("A2:A$rowNumber")
|
||||
->getNumberFormat()
|
||||
->setFormatCode(\PhpOffice\PhpSpreadsheet\Style\NumberFormat::FORMAT_TEXT);
|
||||
|
||||
$startingRowNumber = 4;
|
||||
|
||||
foreach ($fieldList as $i => $name) {
|
||||
$col = $azRange[$i];
|
||||
|
||||
$defs = $this->getInjection('metadata')->get(['entityDefs', $entityType, 'fields', $name]);
|
||||
if (!$defs) {
|
||||
$defs['type'] = 'base';
|
||||
if (!array_key_exists($name, $typesCache)) {
|
||||
break;
|
||||
}
|
||||
$type = $typesCache[$name];
|
||||
|
||||
if ($col == 'A') {
|
||||
$sheet->getStyle("A2:A$rowNumber")
|
||||
->getNumberFormat()
|
||||
->setFormatCode(\PHPExcel_Style_NumberFormat::FORMAT_TEXT);
|
||||
} else {
|
||||
switch($defs['type']) {
|
||||
case 'currency':
|
||||
case 'currencyConverted': {
|
||||
switch ($type) {
|
||||
case 'currency':
|
||||
case 'currencyConverted': {
|
||||
|
||||
} break;
|
||||
case 'int': {
|
||||
$sheet->getStyle($col.$startingRowNumber.':'.$col.$rowNumber)
|
||||
->getNumberFormat()
|
||||
->setFormatCode('0');
|
||||
} break;
|
||||
case 'date': {
|
||||
$sheet->getStyle($col.$startingRowNumber.':'.$col.$rowNumber)
|
||||
->getNumberFormat()
|
||||
->setFormatCode($this->getInjection('dateTime')->getDateFormat());
|
||||
} break;
|
||||
case 'datetime': {
|
||||
$sheet->getStyle($col.$startingRowNumber.':'.$col.$rowNumber)
|
||||
->getNumberFormat()
|
||||
->setFormatCode($this->getInjection('dateTime')->getDateTimeFormat());
|
||||
} break;
|
||||
case 'datetimeOptional': {
|
||||
$sheet->getStyle($col.$startingRowNumber.':'.$col.$rowNumber)
|
||||
->getNumberFormat()
|
||||
->setFormatCode($this->getInjection('dateTime')->getDateTimeFormat());
|
||||
} break;
|
||||
default: {
|
||||
$sheet->getStyle($col.$startingRowNumber.':'.$col.$rowNumber)
|
||||
->getNumberFormat()
|
||||
->setFormatCode('@');
|
||||
} break;
|
||||
}
|
||||
} break;
|
||||
case 'int': {
|
||||
$sheet->getStyle($col.$startingRowNumber.':'.$col.$rowNumber)
|
||||
->getNumberFormat()
|
||||
->setFormatCode('0');
|
||||
} break;
|
||||
case 'float': {
|
||||
$sheet->getStyle($col.$startingRowNumber.':'.$col.$rowNumber)
|
||||
->getNumberFormat()
|
||||
->setFormatCode(\PhpOffice\PhpSpreadsheet\Style\NumberFormat::FORMAT_NUMBER_COMMA_SEPARATED1);
|
||||
} break;
|
||||
case 'date': {
|
||||
$sheet->getStyle($col.$startingRowNumber.':'.$col.$rowNumber)
|
||||
->getNumberFormat()
|
||||
->setFormatCode($this->getInjection('dateTime')->getDateFormat());
|
||||
} break;
|
||||
case 'datetime': {
|
||||
$sheet->getStyle($col.$startingRowNumber.':'.$col.$rowNumber)
|
||||
->getNumberFormat()
|
||||
->setFormatCode($this->getInjection('dateTime')->getDateTimeFormat());
|
||||
} break;
|
||||
case 'datetimeOptional': {
|
||||
$sheet->getStyle($col.$startingRowNumber.':'.$col.$rowNumber)
|
||||
->getNumberFormat()
|
||||
->setFormatCode($this->getInjection('dateTime')->getDateTimeFormat());
|
||||
} break;
|
||||
default: {
|
||||
$sheet->getStyle($col.$startingRowNumber.':'.$col.$rowNumber)
|
||||
->getNumberFormat()
|
||||
->setFormatCode('@');
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -432,7 +589,7 @@ class Xlsx extends \Espo\Core\Injectable
|
||||
$sheet->getStyle($linkColumn.$startingRowNumber.':'.$linkColumn.$rowNumber)->applyFromArray($linkStyle);
|
||||
}
|
||||
|
||||
$objWriter = \PHPExcel_IOFactory::createWriter($phpExcel, 'Excel2007');
|
||||
$objWriter = \PhpOffice\PhpSpreadsheet\IOFactory::createWriter($phpExcel, 'Xlsx');
|
||||
|
||||
if (!$this->getInjection('fileManager')->isDir('data/cache/')) {
|
||||
$this->getInjection('fileManager')->mkdir('data/cache/');
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
@@ -42,6 +42,11 @@ class ExtensionManager extends Upgrades\Base
|
||||
'after' => 'AfterInstall',
|
||||
'beforeUninstall' => 'BeforeUninstall',
|
||||
'afterUninstall' => 'AfterUninstall',
|
||||
),
|
||||
|
||||
'customDirNames' => array(
|
||||
'before' => 'beforeInstallFiles',
|
||||
'after' => 'afterInstallFiles',
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Copyright (C) 2014-2018 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user