Compare commits

...

359 Commits
3.5.2 ... 3.7.2

Author SHA1 Message Date
yuri
901bee6d3f fix campaign 2015-10-15 11:52:25 +03:00
yuri
72a0415207 fix orderBy by alias 2015-10-14 13:03:08 +03:00
yuri
de69652137 fix id in model.set 2015-10-14 11:35:21 +03:00
yuri
1cd2d6b35e target lists field not importable 2015-10-12 10:43:50 +03:00
yuri
9888ec8a6f fix global searct 2015-10-12 10:30:16 +03:00
yuri
ea5321577a fix target list import 2015-10-08 17:55:48 +03:00
yuri
23c772e029 fix config 2015-10-07 16:53:22 +03:00
yuri
e67387d9ea additionalSelectColumns 2015-10-07 15:00:03 +03:00
yuri
2156094407 cleanup 2015-10-07 12:21:59 +03:00
yuri
03d5bf1ef2 tree impr 2015-10-07 12:18:01 +03:00
yuri
42f57409c8 list tree imp 2015-10-07 12:08:11 +03:00
yuri
69d7ce408d fix preferences layout 2015-10-07 11:24:52 +03:00
yuri
15b3c0440c lead converted panel change 2015-10-07 10:56:56 +03:00
yuri
e1f0715c4d email import: relate to converted entity if lead is converted 2015-10-07 10:35:07 +03:00
yuri
15aec72e97 fix double quick view 2015-10-07 10:33:47 +03:00
yuri
66eade5db7 v 2015-10-07 10:20:37 +03:00
yuri
3d89e25349 label 2015-10-05 14:36:52 +03:00
yuri
7c890aa83a fix empty tablist 2015-10-02 17:23:02 +03:00
yuri
62a29c86ab fix record controller 2015-10-02 15:27:34 +03:00
yuri
bd57b6bb8e detailLayout param 2 2015-10-02 15:10:13 +03:00
yuri
9ab1d16ea0 detailLayout param 2015-10-02 15:09:39 +03:00
yuri
435aa28ca2 iconHtml for menu items 2015-10-01 13:11:05 +03:00
yuri
4bd375f154 fix notice 2015-09-30 17:22:15 +03:00
yuri
d6521f9176 de_DE 2015-09-30 15:07:20 +03:00
yuri
f8e0e4955a fix meeting onlymy 2015-09-30 15:06:34 +03:00
yuri
7957359c15 fix prev 2015-09-30 11:41:53 +03:00
yuri
bdc3731b9a fix select manager 2015-09-30 11:39:11 +03:00
yuri
6b8af1220b opp lost filter 2015-09-30 10:24:39 +03:00
yuri
58fffeaa84 fix typo 2015-09-29 17:56:35 +03:00
yuri
5806785286 fix email notification dups 2015-09-29 11:56:15 +03:00
yuri
2f2d9b5f6f fix roles 2015-09-29 10:27:02 +03:00
yuri
5af20c1ee0 merge targetLists 2015-09-28 16:41:28 +03:00
yuri
7620be3b40 ve 2015-09-28 14:26:20 +03:00
yuri
86f591b409 trim emails when search 2015-09-28 11:18:12 +03:00
yuri
533dfe24d0 default dashlet options 2015-09-28 11:08:13 +03:00
yuri
10c51dc46e target lists panels 2015-09-28 10:55:58 +03:00
yuri
a9d24a1e09 fix mass update 2015-09-28 10:45:30 +03:00
yuri
0cfe093701 fix german language 2015-09-28 10:29:50 +03:00
yuri
11ec99fe6a duplicate email template 2015-09-28 10:26:59 +03:00
yuri
b07e5a6da2 campaign list layout 2015-09-28 10:24:10 +03:00
yuri
151738f896 fix tracking img 2015-09-28 10:23:20 +03:00
yuri
075a370e7a fix log opened 2015-09-25 16:46:55 +03:00
yuri
e7aa147b90 fix import 2015-09-25 15:41:38 +03:00
yuri
2e988fab6d css fiux 2015-09-25 14:51:56 +03:00
yuri
b38e03a53a cleanup 2015-09-25 11:32:17 +03:00
yuri
68e01f9e6f fix backbone id 2015-09-25 11:25:24 +03:00
yuri
4d32955e28 wysywyg field 2015-09-24 17:30:39 +03:00
yuri
13a2aa7f03 decrease wysywyg height 2015-09-24 17:17:17 +03:00
yuri
ac91087b82 header menu improvements 2015-09-24 12:55:47 +03:00
yuri
57a4a30402 updade history panel on activities changes 2015-09-24 12:26:27 +03:00
yuri
dd3ee8d69a update backbone and improve list view listening 2015-09-24 12:05:22 +03:00
yuri
accbc9582e add email settings 2015-09-24 10:47:26 +03:00
yuri
4a2845d7a5 showNewRecords stream panel 2015-09-23 15:41:13 +03:00
yuri
9b2ae8992f stream fetch new 2015-09-23 15:26:20 +03:00
yuri
1bb0038be8 dont reset filters if primary filter changed 2015-09-23 11:32:38 +03:00
yuri
6c4e73f1c4 created by field in export 2015-09-23 09:53:02 +03:00
yuri
72f5dbea87 created fields in export 2015-09-23 09:52:10 +03:00
yuri
aeb8411695 de_DE 2015-09-23 09:49:47 +03:00
yuri
df6db9bd47 changes in mass email 2015-09-22 16:26:13 +03:00
yuri
ab17044da9 grunt 2015-09-22 15:41:38 +03:00
yuri
7356bd98ab fix filter 2015-09-22 13:23:44 +03:00
yuri
a631e52f63 fix usubscribe email link 2015-09-22 12:50:23 +03:00
yuri
b925100df7 fix importer 2015-09-22 12:49:47 +03:00
yuri
eeba65440c email template info 2015-09-22 11:46:02 +03:00
yuri
95f72933a4 fix header menu 2015-09-22 11:28:20 +03:00
yuri
4b03e74662 update zend 2015-09-22 10:27:20 +03:00
yuri
b316eeb3eb fix attachment download 2015-09-21 18:44:03 +03:00
yuri
53e6904ce1 fix campaign 2015-09-21 12:38:26 +03:00
yuri
e2b9647cf1 not render list after sync if modal is opened 2015-09-21 12:02:50 +03:00
yuri
1145406531 remove queue after mass email remove 2015-09-21 11:41:14 +03:00
yuri
9ce65c9a2b fix email account 2015-09-18 17:20:43 +03:00
yuri
2ec1db8379 refactor select manager 2 2015-09-18 17:19:23 +03:00
yuri
8074baef56 activities dashlet 2015-09-18 15:44:19 +03:00
yuri
4584211c04 select manager refactoring 2015-09-18 13:51:00 +03:00
yuri
290099641b dont show declined meetings/calls in only my 2015-09-18 12:00:49 +03:00
yuri
d0c3044e8e dont show declined in calendar 2015-09-18 11:58:44 +03:00
yuri
4e983ff440 user calendar 2015-09-17 17:38:48 +03:00
yuri
9aba8b0d8f format address in js 2015-09-17 15:26:08 +03:00
yuri
ee6ef6694f custom tab list 2015-09-17 15:01:11 +03:00
yuri
8330137c4e fixes with assignment in mass update and autopopulate 2015-09-17 13:18:05 +03:00
yuri
bd420ad963 clear roles cache on team change 2015-09-17 12:18:12 +03:00
yuri
e03bedf439 job improvement 2015-09-17 11:46:05 +03:00
yuri
5cba246bb2 improve link 2 2015-09-17 11:21:26 +03:00
yuri
3490c16285 link select improvements 2015-09-17 11:19:33 +03:00
yuri
957fda9e8e clear cache if user changed roles 2015-09-17 11:00:21 +03:00
yuri
b940adc341 clear roles cache after role change 2015-09-17 10:46:18 +03:00
yuri
f44a093ea9 acl for activities 2015-09-16 15:53:21 +03:00
yuri
0b6dc1ff5f acl attendees 2015-09-16 15:41:28 +03:00
yuri
907eb5feb5 opted out remove 2015-09-16 15:17:14 +03:00
yuri
17a339c318 target list no remove 2015-09-16 14:24:49 +03:00
yuri
3bea161618 tooltip 2015-09-16 12:50:57 +03:00
yuri
b39a4a3624 track opened 2015-09-16 12:46:28 +03:00
yuri
2530d13d25 mass email test send 2015-09-16 12:26:19 +03:00
yuri
67e152c923 mass email dev 2015-09-15 15:38:58 +03:00
yuri
4934d4ad95 cleanup 2015-09-15 15:17:34 +03:00
yuri
9a072949fd lead listSmall change 2015-09-15 15:15:55 +03:00
yuri
6e5f8676a1 campaign dev 2015-09-15 14:59:03 +03:00
yuri
5a52484295 panel filters 2015-09-15 12:41:30 +03:00
yuri
a3338b0db7 mass email dev 2015-09-15 11:40:27 +03:00
yuri
d212d4a193 dev 2015-09-11 17:45:49 +03:00
yuri
e3f9a0f607 dev 2015-09-11 17:02:01 +03:00
yuri
91b7635d26 dev 2015-09-11 16:47:50 +03:00
yuri
532581cb50 small change 2015-09-11 11:47:19 +03:00
yuri
9b4a3a8ca9 fix lang 2015-09-11 11:43:01 +03:00
yuri
564c397258 Merge branch 'hotfix/3.6.3' 2015-09-11 11:27:45 +03:00
yuri
22e81898c0 fix external account 2015-09-11 11:27:30 +03:00
yuri
ec863fe09a dev 2015-09-11 11:25:11 +03:00
yuri
cb9a1d31d8 email account readOnl 2015-09-11 11:05:00 +03:00
yuri
0e8d0495a9 dev 2015-09-10 17:58:03 +03:00
yuri
fa19e5ebce dev 2015-09-10 17:27:27 +03:00
yuri
b67e8960fa Merge branch 'hotfix/3.6.3' 2015-09-10 11:02:06 +03:00
yuri
6efd697a1e fix email import counter 2015-09-10 10:57:48 +03:00
yuri
a9379dcf0a Merge branch 'hotfix/3.6.3' 2015-09-10 10:41:44 +03:00
yuri
9798f399bd fix import time 2015-09-10 10:41:37 +03:00
yuri
a520510f9b Merge branch 'hotfix/3.6.3' 2015-09-10 10:36:21 +03:00
yuri
fbfe82870f fix import dates 2015-09-10 10:36:00 +03:00
yuri
3b668f4dbd dev 2015-09-10 10:22:19 +03:00
yuri
62eb54d853 dev 2015-09-09 17:03:37 +03:00
yuri
81335454fd fix insert template 2015-09-09 17:03:32 +03:00
yuri
1b33221fc1 autoincrement field change 2015-09-09 09:49:01 +03:00
yuri
152c96838f detailSmall layouts changes 2015-09-09 09:42:18 +03:00
yuri
f78af9b204 dev 2015-09-08 17:51:00 +03:00
yuri
302b9e759f campaign log acl 2015-09-08 17:29:00 +03:00
yuri
dab7e329df dev 2015-09-08 17:22:36 +03:00
yuri
6a93fe77ca dev 2015-09-08 15:56:00 +03:00
yuri
0e21a9bf91 dev 2015-09-08 15:18:44 +03:00
yuri
723f504a56 dev 2015-09-08 12:21:49 +03:00
yuri
121b324532 add activities and tasks actions 2015-09-07 11:21:56 +03:00
yuri
c54a4eee95 varchar trim and system emails 2015-09-04 17:17:41 +03:00
yuri
2a03797436 return list fix 2015-09-04 16:11:49 +03:00
yuri
55dc4d1e77 loader change 2015-09-04 15:14:39 +03:00
yuri
cb51feef48 fix email importer 2015-09-04 13:24:28 +03:00
yuri
e75c957aad Merge branch 'hotfix/3.6.3' 2015-09-04 12:42:27 +03:00
yuri
e08624fae3 fix preferences controler 2015-09-04 12:42:09 +03:00
yuri
e8ac486d4a default select filters 2015-09-04 12:34:30 +03:00
yuri
1ded65b85d fix selectRelatedFilters 2015-09-04 12:14:23 +03:00
yuri
35b2f0e57e fix removeButton 2015-09-04 11:57:58 +03:00
yuri
d6ef8e1b33 fix list view return 2015-09-04 11:36:19 +03:00
yuri
118025f646 fix currency 2015-09-03 16:31:41 +03:00
yuri
0888752e2a range fields 2015-09-03 15:59:13 +03:00
yuri
df5177a565 activities panel change 2015-09-03 12:15:45 +03:00
yuri
3f03770b6e refactor activities service 2015-09-03 11:59:19 +03:00
yuri
27ebac0722 app status styles 2015-09-03 11:25:09 +03:00
yuri
e5b46bc547 email replyTo 2015-09-03 11:05:20 +03:00
yuri
468a236ce1 fix edit layout column 2015-09-02 15:40:18 +03:00
yuri
6fda3dd147 mass update layout fix 2015-09-02 15:17:09 +03:00
yuri
9f0705c82d pass event obj to actions 2015-09-02 14:02:48 +03:00
yuri
0ab0de2371 fix linkMultipeCategoryTree 2015-09-02 13:18:47 +03:00
yuri
ba7d79ef39 Merge branch 'master' of https://github.com/espocrm/espocrm 2015-09-02 11:56:39 +03:00
yuri
c0e51d85b5 vertical theme width 2015-09-02 11:56:30 +03:00
yuri
80334d59ff back route and isReturn 2015-09-02 11:20:00 +03:00
yuri
759ad1a8d3 rename scheduled job 2015-09-02 10:05:44 +03:00
yuri
7c569d3880 fix global search padding 2015-09-02 10:03:14 +03:00
yuri
7b21b82a2e email to case fix 2015-09-02 10:00:15 +03:00
yuri
5e86c5da8c list view return imporovement 2015-09-02 09:40:17 +03:00
Yuri Kuznetsov
9998f82596 Update README.md 2015-09-01 21:42:29 +03:00
Yuri Kuznetsov
9cb3f5fb3a Update README.md 2015-09-01 21:40:40 +03:00
yuri
dcce3335cd returnDispatchParams 2015-09-01 16:30:41 +03:00
yuri
5f9b4d99f3 list view stored 2015-09-01 16:02:39 +03:00
yuri
a6f4111383 automatically accept meeting/call for current user 2015-09-01 12:58:37 +03:00
yuri
569180ed86 email important 2015-09-01 12:31:08 +03:00
yuri
f9cc21a06d import update 2015-08-31 15:19:09 +03:00
yuri
e5ad31a965 prevent loop 2015-08-31 12:24:46 +03:00
yuri
5252d63260 lastXDays and nextXDays filters 2015-08-31 12:10:44 +03:00
yuri
a9fea0b9f5 change default jobs 2015-08-31 11:27:45 +03:00
yuri
cee91eb6af email replied 2015-08-31 11:23:39 +03:00
yuri
c61765cc31 Merge branch 'hotfix/3.6.3' 2015-08-28 15:50:28 +03:00
yuri
03d3884bf4 follow fix 2015-08-28 15:50:09 +03:00
yuri
cb01caddd3 Merge branch 'hotfix/3.6.2' 2015-08-28 14:30:56 +03:00
yuri
725a2be959 fix resize 3 2015-08-28 14:30:17 +03:00
yuri
45d2cec423 Merge branch 'hotfix/3.6.2' 2015-08-28 14:24:41 +03:00
yuri
08b576105c fix nav resize 2 2015-08-28 14:24:27 +03:00
yuri
6d86c65ea6 Merge branch 'hotfix/3.6.2' 2015-08-27 17:13:01 +03:00
yuri
0e19fe087b fix email restricted appearance 2015-08-27 17:12:42 +03:00
yuri
2571f967b7 displayTotalCount option 2015-08-27 16:04:21 +03:00
yuri
a93d5a0678 change email filter descriptipon 2015-08-27 16:00:21 +03:00
yuri
be1647548a email filters final 2015-08-27 15:50:49 +03:00
yuri
91571fa47c fix readOnly and create 2015-08-27 15:43:05 +03:00
yuri
cf3220581f Merge branch 'hotfix/3.6.2' 2015-08-27 15:29:37 +03:00
yuri
44ddf9b400 fix acl manager 2015-08-27 15:29:30 +03:00
yuri
99b4f7eb5c email filters dev 2015-08-27 15:28:36 +03:00
yuri
803111b12f Merge branch 'hotfix/3.6.2' 2015-08-27 12:17:35 +03:00
yuri
9509d00fd4 readOnlyDisabled option 2015-08-27 12:16:53 +03:00
yuri
70eb562400 fix user limit 2015-08-27 12:04:10 +03:00
yuri
2ceb686198 Merge branch 'hotfix/3.6.2' 2015-08-27 10:29:33 +03:00
yuri
6f89a01c50 convert lead improvements 2015-08-27 10:29:07 +03:00
yuri
2d85106a1f dont error 500 if try to follow entity w/o stream 2015-08-27 10:10:41 +03:00
yuri
cefe304c2f filters 2 2015-08-26 16:30:45 +03:00
yuri
cbe4f0009b Merge branch 'hotfix/3.6.2' 2015-08-26 12:09:12 +03:00
yuri
a9cad90a02 hack issue with user theme and not rendered css 2015-08-26 12:07:53 +03:00
yuri
597d83c6f7 version 2015-08-25 16:18:16 +03:00
yuri
cbc3c3e921 fix theme 2015-08-25 16:17:03 +03:00
yuri
2d1aa77ddc email filter 2 2015-08-25 16:16:12 +03:00
yuri
5357061d52 campaign lead created change 2015-08-25 10:30:52 +03:00
yuri
13b7db63d0 add createdBy filters 2015-08-25 09:40:22 +03:00
yuri
62b0020c67 email filters dev 2015-08-24 17:33:43 +03:00
yuri
4512dfd420 refactor acl and assigmnent permissions, email filter entity 2015-08-24 16:50:54 +03:00
yuri
b1303cb50e rename hasAttachments 2015-08-24 15:07:47 +03:00
yuri
3facbc782b Merge branch 'hotfix/3.6.2' 2015-08-24 14:50:05 +03:00
yuri
cdcaf7cd24 fix auth tokens 2015-08-24 14:49:53 +03:00
yuri
dae249e4b2 Merge branch 'hotfix/3.6.2' 2015-08-24 12:10:29 +03:00
yuri
ce782ab8bd de_DE 2015-08-24 12:10:18 +03:00
yuri
2497ab6a5e hasAttachments icon 2015-08-24 12:03:40 +03:00
yuri
2d00b27fb6 translatedOptions param 2015-08-24 11:48:45 +03:00
yuri
8d179aa719 version 2015-08-20 15:36:41 +03:00
yuri
6688e19789 fix integration 2015-08-20 15:23:52 +03:00
yuri
1db8b94ea7 remove sticked panel 2015-08-20 14:40:16 +03:00
yuri
63a61349ea job name 3 2015-08-20 13:28:37 +03:00
yuri
811066a201 job name 2015-08-20 13:27:47 +03:00
yuri
0b547c26a2 fix jobs 2015-08-20 13:17:30 +03:00
yuri
15497b96d1 change colors 2015-08-20 12:11:14 +03:00
yuri
9c3cf0b8dd rename theme 2015-08-20 12:00:30 +03:00
yuri
eeaff7ac9d css fix 2015-08-20 11:54:35 +03:00
yuri
17e48c4e9f fix create 2015-08-20 11:02:23 +03:00
yuri
4a878c73be lang 2015-08-20 10:49:59 +03:00
yuri
f05e41afb6 global search margin 2015-08-18 15:27:24 +03:00
yuri
ba8e63c40b fix user 2015-08-18 12:47:42 +03:00
yuri
5d6b9b4785 fix email import 2015-08-18 12:32:45 +03:00
yuri
06c0a59632 fix hookManager 2 2015-08-18 11:19:03 +03:00
yuri
f6df48278c fix hookManager 2015-08-18 11:14:51 +03:00
yuri
8207684193 fix grantfile 2015-08-18 10:45:07 +03:00
yuri
49ac186f80 disable isReturn 2015-08-17 17:48:25 +03:00
yuri
4325e1591c return to list and edit attributes fix 2015-08-17 17:43:05 +03:00
yuri
16eb1e0b6d back button 2015-08-17 17:25:32 +03:00
yuri
68668acf57 fix calendar dashlet 2015-08-17 15:42:48 +03:00
yuri
5e5e82d6b6 lang 2015-08-17 15:35:19 +03:00
yuri
8e23ef59a3 lang 2015-08-17 15:34:44 +03:00
yuri
0213064217 fix preset filters dropdown 2015-08-17 12:55:06 +03:00
yuri
d360cbcb4b fix restrictedMode check 2015-08-17 11:22:06 +03:00
yuri
d1dea478f7 fix email notifications 2015-08-17 10:54:03 +03:00
yuri
778e7b335e request check fixes 2015-08-14 16:54:50 +03:00
yuri
5fc502c6a2 fix install css 2015-08-14 16:40:27 +03:00
yuri
ba5bd60931 fix xss in link multiple with role 2015-08-14 16:28:50 +03:00
yuri
dfb72bb3e1 lang change 2015-08-14 15:04:20 +03:00
yuri
c4880b77e6 layout reset to default 2015-08-14 15:02:32 +03:00
yuri
8aab9d17b1 controller action changes 2015-08-14 13:33:17 +03:00
yuri
205beb068c fix layouts 2015-08-14 12:26:55 +03:00
yuri
80cf2f2e10 fix mavbar css 2015-08-14 12:25:13 +03:00
yuri
5982b27b90 last 7 days filter 2015-08-14 12:12:38 +03:00
yuri
d696ca3013 returnUrl for list-edit 2015-08-14 11:46:16 +03:00
yuri
9d10218487 cleanup 2015-08-14 11:42:14 +03:00
yuri
b41ef6094a returnUrl for quick edit 2015-08-14 11:40:21 +03:00
yuri
9a9a69ace4 improve navbar for mobile view 2015-08-14 11:28:48 +03:00
yuri
1000139d01 dont fit modal height if window height is small 2015-08-14 09:47:10 +03:00
yuri
129984f4c6 unique joins 2015-08-13 17:42:03 +03:00
yuri
d665bc54e0 fix acl 2015-08-13 17:28:21 +03:00
yuri
69b027698d acl global search 2015-08-13 17:24:49 +03:00
yuri
6ffff16f06 global search pagination 2015-08-13 17:22:29 +03:00
yuri
79393f16d3 importove global search 2015-08-13 17:15:07 +03:00
yuri
5821a06f9e fix case 2015-08-13 15:02:28 +03:00
yuri
3eb4cf27f2 case - contact many-to-many 2015-08-13 14:54:31 +03:00
yuri
94c345c386 -sticked 2015-08-13 12:56:33 +03:00
yuri
6fe7853eb7 added new noification type message 2015-08-13 09:44:55 +03:00
yuri
c45ea08ab2 cleanup 2015-08-12 17:56:06 +03:00
yuri
04d41e9c86 fix iinsert image 2015-08-12 17:55:19 +03:00
yuri
2850cffc6a audited param 2015-08-12 16:28:12 +03:00
yuri
0cdc15ecaf rel panels filx 2015-08-12 15:13:22 +03:00
yuri
ee85ee369b select document filter 2015-08-12 15:08:57 +03:00
yuri
738e56cc63 field manager change 2015-08-12 14:43:11 +03:00
yuri
6b38e1561b fix pre 2015-08-11 16:55:22 +03:00
yuri
a56d8b7d1c default layoutSmall change 2015-08-11 16:53:37 +03:00
yuri
db6e5ee778 remove sticked from history panel 2015-08-11 15:46:03 +03:00
yuri
a0bf1af3d3 mass update for emails 2015-08-11 12:23:44 +03:00
yuri
5b47178162 createDisabled 2 2015-08-11 12:13:57 +03:00
yuri
3f0684c1ea createDisabled 2015-08-11 12:07:19 +03:00
yuri
d2bc49755d email address autocomplete 2 2015-08-11 11:52:07 +03:00
yuri
0502c1768b auto complete search by email address 2015-08-11 11:49:14 +03:00
yuri
cf7d21db32 keep emails unread 2015-08-11 11:15:16 +03:00
yuri
977fb47efb version 2015-08-10 17:03:31 +03:00
yuri
6c7a3adcdd email fix 2015-08-10 16:45:47 +03:00
yuri
3b22e08840 fix users activities 2015-08-10 16:34:18 +03:00
yuri
8d79524c62 extension.php 2015-08-10 15:37:32 +03:00
yuri
3c70f28dc0 ability to use standartizized view name 2015-08-10 15:00:50 +03:00
yuri
79b37e7047 dashlet row actions 2015-08-10 14:56:06 +03:00
yuri
3050d8b5b5 account history fix 2015-08-10 13:57:44 +03:00
yuri
231a40e4a8 notification entityRemoved 2015-08-10 13:45:01 +03:00
yuri
1f1c87513b set defaults 2015-08-10 12:26:51 +03:00
yuri
910822334e group email accounts 2015-08-10 10:56:51 +03:00
yuri
af02d721c3 try catch getMessage 2015-08-10 10:45:08 +03:00
yuri
faf7cb9acd lang 2015-08-10 10:33:56 +03:00
yuri
73869d5674 fix link multiple 2015-08-07 17:05:13 +03:00
yuri
f60732170e ability to disable field param in entity manager 2015-08-07 16:00:54 +03:00
yuri
aecf04a4f8 fix theme and user change 2015-08-07 15:41:06 +03:00
yuri
7a383912c8 system notification 2015-08-07 15:30:50 +03:00
yuri
21c288badf fix theme 2015-08-07 13:26:29 +03:00
yuri
65492ea1dc lead convertion follow 2015-08-07 12:08:58 +03:00
yuri
7fd10104cc task dashlet dont show deferred 2015-08-07 11:39:59 +03:00
yuri
ad85c6fa3f lang 2015-08-07 11:18:14 +03:00
yuri
e32bf06e4d lang typo 2015-08-07 10:56:26 +03:00
yuri
f363d77cb7 max size error message 2015-08-06 17:21:40 +03:00
yuri
8986b6f426 campaign budget 2015-08-06 16:24:48 +03:00
yuri
8b35c064c8 sacura vertical theme 2015-08-06 15:05:49 +03:00
yuri
da5ea180ab fix login 2015-08-06 14:55:33 +03:00
yuri
3aca557420 fix enum 2015-08-06 13:10:42 +03:00
yuri
ea723742c7 theme change 2015-08-06 12:55:32 +03:00
yuri
d85675f540 vertical theme 2015-08-06 12:21:00 +03:00
yuri
9b4aeb8e4c vertival theme dev 2015-08-05 18:23:20 +03:00
yuri
2c539b1fe6 jobs link 2015-08-05 16:05:33 +03:00
yuri
5f31e7e148 modal change var names 2015-08-05 15:53:25 +03:00
yuri
cc9227910f jobs 2015-08-05 15:49:23 +03:00
yuri
85d8dfe885 change diff 2015-08-05 14:06:33 +03:00
yuri
563179bec7 vertical theme mobile 2015-08-05 13:18:33 +03:00
yuri
386ada05d6 cleanup 2015-08-05 13:02:57 +03:00
yuri
70c2992282 theme in preferences 2015-08-05 12:35:57 +03:00
yuri
36d6483a51 ability to create custom note types 2015-08-05 10:36:27 +03:00
yuri
01039b9881 attachment multiple field 2015-08-05 10:25:45 +03:00
yuri
bbd1297302 attachment block 2015-08-05 09:38:41 +03:00
yuri
88c0d8810c css changes 2015-08-05 09:35:19 +03:00
yuri
b365bc17db fix record.base 2015-08-05 09:35:12 +03:00
yuri
3f24e64988 fix enum translation 2015-08-04 17:25:23 +03:00
yuri
7a5ce2f4ee fix theme 2015-08-04 17:11:37 +03:00
yuri
a410fb903a theme fixes 2015-08-04 16:21:27 +03:00
yuri
ba4004d720 theme fix 2015-08-04 16:07:51 +03:00
yuri
cdc980c2b6 theme fixes 2015-08-04 15:53:38 +03:00
yuri
3578cc9523 vertical theme 2015-08-04 15:49:35 +03:00
yuri
09ff1d1e5a mobile view collapse fix 2015-08-04 11:29:34 +03:00
yuri
8e4a6ef183 stick panels 2015-08-04 11:13:02 +03:00
yuri
0d111a6bd8 Opportunity listForAccount 2015-08-04 11:08:41 +03:00
yuri
3e503852db translate links 2015-08-04 10:55:23 +03:00
yuri
d3fe435115 theme changes 2015-08-04 09:51:07 +03:00
yuri
e6a0080c0e vertical theme 2015-08-03 17:06:12 +03:00
yuri
b8ddb72d3b color change 2015-08-03 14:45:49 +03:00
yuri
58953ca009 show total count 2015-08-03 14:43:21 +03:00
yuri
d4e98155d0 gitignore 2015-08-03 12:28:21 +03:00
yuri
86fabe3352 email: get rid of assigned user 2015-08-03 12:00:06 +03:00
yuri
c5ccf8e6da Enum is Sorted 2015-08-03 11:43:49 +03:00
yuri
b7e0a0de23 Merge branch 'hotfix/3.5.3' 2015-08-03 11:12:34 +03:00
yuri
9c2a18f0aa indestry options added 2015-08-03 11:11:50 +03:00
yuri
aa95f2cf88 change currency field 2015-08-03 11:00:27 +03:00
yuri
8dd7f262a2 color change 2015-07-31 17:22:46 +03:00
yuri
b76feba080 remove css 2015-07-31 17:18:57 +03:00
yuri
1b5aea85ba themes 2015-07-31 17:18:24 +03:00
yuri
c89c7f5e0e stylesheet 2015-07-31 11:25:58 +03:00
yuri
bcaaf539be remove fields from settings 2015-07-31 11:23:06 +03:00
yuri
48f0988373 stylesheet 2015-07-31 11:17:22 +03:00
yuri
a0c0d37bfd navbar fix 2015-07-31 10:44:03 +03:00
yuri
9c696fe8d6 navbar fix 2015-07-31 10:43:38 +03:00
yuri
224e3475d8 Merge branch 'hotfix/3.5.3' 2015-07-30 17:05:29 +03:00
yuri
841c5f85bd fix email import 2015-07-30 14:38:23 +03:00
yuri
6745419a4f install lang fix 2015-07-30 11:40:21 +03:00
yuri
6bf9bb875a email address search improvement 2015-07-30 11:12:49 +03:00
yuri
d6e1322775 Merge branch 'hotfix/3.5.3' 2015-07-30 10:07:41 +03:00
yuri
bb0e97160c fix task layout 2015-07-30 10:00:48 +03:00
yuri
8124ceea6b email import fix 2015-07-29 16:48:53 +03:00
yuri
b5cb0c0881 email import fix 2015-07-29 16:43:46 +03:00
yuri
8747ccc105 show error message reason 2015-07-29 15:06:03 +03:00
yuri
8b0147484c userLimit 2015-07-29 13:56:18 +03:00
yuri
233037a1eb adminPanelIframeUrl 2015-07-29 11:16:19 +03:00
yuri
11446ef857 dashlet actions 2015-07-29 10:21:04 +03:00
Taras Machyshyn
4403131235 Merge branch 'hotfix/3.5.3' 2015-07-29 09:47:43 +03:00
Taras Machyshyn
9dde3d0645 Fixed a bug for module orders 2015-07-29 09:46:49 +03:00
yuri
2fcf00ef4f Merge branch 'stable' 2015-07-28 17:52:43 +03:00
yuri
e94564b5e7 Merge branch 'hotfix/3.5.2' 2015-07-28 14:38:49 +03:00
yuri
c6542c0698 restrictedMode 2015-07-27 11:02:42 +03:00
yuri
f74959ab00 fix user layout 2015-07-27 10:48:42 +03:00
yuri
2bb28ac270 Merge branch 'stable' 2015-07-24 17:04:59 +03:00
yuri
ca64d7c8ec Merge branch 'hotfix/3.5.1' 2015-07-23 16:10:25 +03:00
yuri
ce2a2a03a3 list changes 2015-07-23 14:50:15 +03:00
yuri
d947223b9b fix wysiwyg 2015-07-23 14:41:51 +03:00
612 changed files with 12510 additions and 2150 deletions

5
.gitignore vendored
View File

@@ -9,7 +9,10 @@
/client
/test.php
/main.html
/frontend/client/css/bootstrap.css
/frontend/client/css/espo.css
/frontend/client/css/espo-vertical.css
/frontend/client/css/sakura.css
/frontend/client/css/sakura-vertical.css
/tests/testData/cache/*
composer.phar
vendor/

View File

@@ -59,22 +59,44 @@ module.exports = function (grunt) {
final: ['build/tmp'],
},
less: {
bootstrap: {
espo: {
options: {
yuicompress: true,
},
files: {
'frontend/client/css/bootstrap.css': 'frontend/less/espo/main.less',
'frontend/client/css/espo.css': 'frontend/less/espo/main.less',
},
},
sakura: {
options: {
yuicompress: true,
},
files: {
'frontend/client/css/sakura.css': 'frontend/less/sakura/main.less',
},
},
espoVertical: {
options: {
yuicompress: true,
},
files: {
'frontend/client/css/espo-vertical.css': 'frontend/less/espo-vertical/main.less',
},
},
sakuraVertical: {
options: {
yuicompress: true,
},
files: {
'frontend/client/css/sakura-vertical.css': 'frontend/less/sakura-vertical/main.less',
},
}
},
cssmin: {
minify: {
files: {
'build/tmp/client/css/espo.min.css': [
'frontend/client/css/bootstrap.css',
'frontend/client/css/datepicker.css',
'frontend/client/css/jquery.timepicker.css',
'build/tmp/client/css/espo.css': [
'frontend/client/css/espo.css',
]
}
},
@@ -131,6 +153,7 @@ module.exports = function (grunt) {
'rebuild.php',
'clear_cache.php',
'upgrade.php',
'extension.php',
'index.php',
'LICENSE.txt',
'.htaccess',

View File

@@ -40,20 +40,20 @@ You need to have nodejs and Grunt CLI installed.
The build will be created in the `build` directory.
### How to make translation
### How to make a translation
Build po file with command:
`node po.js en_EN`
(specify needed language instead of en_EN)
After that tranlate the generated po file.
After that translate the generated po file.
Build json files from the translated po file:
1. Put your po file espocrm-en_EN.po to the `build` directory
1. Put your po file espocrm-en_EN.po into `build` directory
2. Run `node lang.js en_EN`
The files will be created in build directory.
Json files will be created in build directory grouped by folders.
### License

View File

@@ -0,0 +1,46 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 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/.
************************************************************************/
namespace Espo\Acl;
use \Espo\Entities\User;
use \Espo\ORM\Entity;
class EmailFilter extends \Espo\Core\Acl\Base
{
public function checkIsOwner(User $user, Entity $entity)
{
if ($entity->has('parentId') && $entity->has('parentType')) {
$parentType = $entity->get('parentType');
$parentId = $entity->get('parentId');
if (!$parentType || !$parentId) return;
$parent = $this->getEntityManager()->getEntity($parentType, $parentId);
if ($parent && $parent->has('assignedUserId') && $parent->get('assignedUserId') === $user->id) {
return true;
}
}
return;
}
}

View File

@@ -22,8 +22,10 @@
namespace Espo\Controllers;
use \Espo\Core\Exceptions\Error,
\Espo\Core\Exceptions\Forbidden;
use \Espo\Core\Exceptions\NotFound;
use \Espo\Core\Exceptions\Error;
use \Espo\Core\Exceptions\Forbidden;
use \Espo\Core\Exceptions\BadRequest;
class Admin extends \Espo\Core\Controllers\Base
{
@@ -34,17 +36,19 @@ class Admin extends \Espo\Core\Controllers\Base
}
}
public function actionRebuild($params, $data)
public function postActionRebuild($params, $data, $request)
{
if (!$request->isPost()) {
throw new BadRequest();
}
$result = $this->getContainer()->get('dataManager')->rebuild();
return $result;
}
public function actionClearCache($params, $data)
public function postActionClearCache($params, $data)
{
$result = $this->getContainer()->get('dataManager')->clearCache();
return $result;
}
@@ -55,8 +59,13 @@ class Admin extends \Espo\Core\Controllers\Base
return $scheduledJob->getAllNamesOnly();
}
public function actionUploadUpgradePackage($params, $data)
public function postActionUploadUpgradePackage($params, $data)
{
if ($this->getConfig()->get('restrictedMode')) {
if (!$this->getUser()->get('isSuperAdmin')) {
throw new Forbidden();
}
}
$upgradeManager = new \Espo\Core\UpgradeManager($this->getContainer());
$upgradeId = $upgradeManager->upload($data);
@@ -68,10 +77,15 @@ class Admin extends \Espo\Core\Controllers\Base
);
}
public function actionRunUpgrade($params, $data)
public function postActionRunUpgrade($params, $data)
{
$upgradeManager = new \Espo\Core\UpgradeManager($this->getContainer());
if ($this->getConfig()->get('restrictedMode')) {
if (!$this->getUser()->get('isSuperAdmin')) {
throw new Forbidden();
}
}
$upgradeManager = new \Espo\Core\UpgradeManager($this->getContainer());
$upgradeManager->install($data);
return true;

View File

@@ -44,7 +44,7 @@ class App extends \Espo\Core\Controllers\Base
);
}
public function actionDestroyAuthToken($params, $data)
public function postActionDestroyAuthToken($params, $data)
{
$token = $data['token'];
if (empty($token)) {

View File

@@ -22,11 +22,18 @@
namespace Espo\Controllers;
use \Espo\Core\Exceptions\Forbidden;
use \Espo\Core\Exceptions\BadRequest;
class Attachment extends \Espo\Core\Controllers\Record
{
public function actionUpload($params, $data)
public function actionUpload($params, $data, $request)
{
if (!$request->isPost()) {
throw new BadRequest();
}
list($prefix, $contents) = explode(',', $data);
$contents = base64_decode($contents);

View File

@@ -18,49 +18,49 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
************************************************************************/
************************************************************************/
namespace Espo\Controllers;
use \Espo\Core\Exceptions\Forbidden;
class AuthToken extends \Espo\Core\Controllers\Record
{
{
protected function checkControllerAccess()
{
if (!$this->getUser()->isAdmin()) {
throw new Forbidden();
}
}
public function actionUpdate($params, $data)
{
throw new Forbidden();
}
}
public function actionCreate($params, $data)
{
throw new Forbidden();
}
public function actionListLinked($params, $data)
{
throw new Forbidden();
}
public function actionMassUpdate($params, $data)
{
throw new Forbidden();
}
public function actionCreateLink($params, $data)
{
throw new Forbidden();
}
public function actionRemoveLink($params, $data)
{
throw new Forbidden();
}
}
}

View File

@@ -63,25 +63,65 @@ class Email extends \Espo\Core\Controllers\Record
return $this->getRecordService()->sendTestEmail($data);
}
public function actionMarkAsRead($params, $data, $request)
public function postActionMarkAsRead($params, $data, $request)
{
if (!$request->isPost()) {
throw new BadRequest();
if (!empty($data['ids'])) {
$ids = $data['ids'];
} else {
if (!empty($data['id'])) {
$ids = [$data['id']];
} else {
throw new BadRequest();
}
}
if (empty($data['ids']) || !is_array($data['ids'])) {
throw new BadRequest();
}
$ids = $data['ids'];
return $this->getRecordService()->markAsReadByIds($ids);
}
public function actionMarkAllAsRead($params, $data, $request)
public function postActionMarkAsNotRead($params, $data, $request)
{
if (!$request->isPost()) {
throw new BadRequest();
if (!empty($data['ids'])) {
$ids = $data['ids'];
} else {
if (!empty($data['id'])) {
$ids = [$data['id']];
} else {
throw new BadRequest();
}
}
return $this->getRecordService()->markAsNotReadByIds($ids);
}
public function postActionMarkAllAsRead($params, $data, $request)
{
return $this->getRecordService()->markAllAsRead();
}
public function postActionMarkAsImportant($params, $data, $request)
{
if (!empty($data['ids'])) {
$ids = $data['ids'];
} else {
if (!empty($data['id'])) {
$ids = [$data['id']];
} else {
throw new BadRequest();
}
}
return $this->getRecordService()->markAsImportantByIds($ids);
}
public function postActionMarkAsNotImportant($params, $data, $request)
{
if (!empty($data['ids'])) {
$ids = $data['ids'];
} else {
if (!empty($data['id'])) {
$ids = [$data['id']];
} else {
throw new BadRequest();
}
}
return $this->getRecordService()->markAsNotImportantByIds($ids);
}
}

View File

@@ -23,6 +23,7 @@
namespace Espo\Controllers;
use \Espo\Core\Exceptions\Forbidden;
use \Espo\Core\Exceptions\BadRequest;
class EmailAccount extends \Espo\Core\Controllers\Record
{

View File

@@ -0,0 +1,29 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 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/.
************************************************************************/
namespace Espo\Controllers;
class EmailFilter extends \Espo\Core\Controllers\Record
{
}

View File

@@ -58,6 +58,11 @@ class Extension extends \Espo\Core\Controllers\Record
if (!$request->isPost()) {
throw new Forbidden();
}
if ($this->getConfig()->get('restrictedMode')) {
if (!$this->getUser()->get('isSuperAdmin')) {
throw new Forbidden();
}
}
$manager = new \Espo\Core\ExtensionManager($this->getContainer());
@@ -71,11 +76,14 @@ class Extension extends \Espo\Core\Controllers\Record
if (!$request->isPost()) {
throw new Forbidden();
}
if ($this->getConfig()->get('restrictedMode')) {
if (!$this->getUser()->get('isSuperAdmin')) {
throw new Forbidden();
}
}
$manager = new \Espo\Core\ExtensionManager($this->getContainer());
$manager->uninstall($data);
return true;
}
@@ -99,12 +107,18 @@ class Extension extends \Espo\Core\Controllers\Record
throw new Forbidden();
}
public function actionDelete($params)
public function actionDelete($params, $data, $request)
{
if (!$request->isDelete()) {
throw BadRequest();
}
if ($this->getConfig()->get('restrictedMode')) {
if (!$this->getUser()->get('isSuperAdmin')) {
throw new Forbidden();
}
}
$manager = new \Espo\Core\ExtensionManager($this->getContainer());
$manager->delete($params);
return true;
}

View File

@@ -18,12 +18,13 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
************************************************************************/
************************************************************************/
namespace Espo\Controllers;
use \Espo\Core\Exceptions\Error;
use \Espo\Core\Exceptions\Forbidden;
use \Espo\Core\Exceptions\BadRequest;
class ExternalAccount extends \Espo\Core\Controllers\Record
{
@@ -34,7 +35,7 @@ class ExternalAccount extends \Espo\Core\Controllers\Record
$integrations = $this->getEntityManager()->getRepository('Integration')->find();
$arr = array();
foreach ($integrations as $entity) {
if ($entity->get('enabled') && $this->getMetadata()->get('integrations.' . $entity->id .'.allowUserAccounts')) {
if ($entity->get('enabled') && $this->getMetadata()->get('integrations.' . $entity->id .'.allowUserAccounts')) {
$arr[] = array(
'id' => $entity->id
);
@@ -77,15 +78,18 @@ class ExternalAccount extends \Espo\Core\Controllers\Record
return $entity->toArray();
}
public function actionUpdate($params, $data)
public function actionUpdate($params, $data, $request)
{
return $this->actionPatch($params, $data);
return $this->actionPatch($params, $data, $request);
}
public function actionPatch($params, $data)
public function actionPatch($params, $data, $request)
{
list($integration, $userId) = explode('__', $params['id']);
if (!$request->isPut() && !$request->isPost() && !$request->isPatch()) {
throw new BadRequest();
}
list($integration, $userId) = explode('__', $params['id']);
if ($this->getUser()->id != $userId) {
throw new Forbidden();

View File

@@ -18,7 +18,7 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
************************************************************************/
************************************************************************/
namespace Espo\Controllers;
@@ -29,11 +29,11 @@ class GlobalSearch extends \Espo\Core\Controllers\Base
{
public function actionSearch($params, $data, $request)
{
$query = $params['query'];
$offset = $request->get('offset');
$maxSize = $request->get('maxSize');
$query = $request->get('q');
$offset = intval($request->get('offset'));
$maxSize = intval($request->get('maxSize'));
return $this->getService('GlobalSearch')->find($query, $offset, $maxSize);
}
}

View File

@@ -71,10 +71,14 @@ class Import extends \Espo\Core\Controllers\Record
return $this->getContainer()->get('entityManager');
}
public function actionUploadFile($params, $data)
public function actionUploadFile($params, $data, $request)
{
$contents = $data;
if (!$request->isPost()) {
throw new BadRequest();
}
$attachment = $this->getEntityManager()->getEntity('Attachment');
$attachment->set('type', 'text/csv');
$attachment->set('role', 'Import File');
@@ -88,24 +92,34 @@ class Import extends \Espo\Core\Controllers\Record
);
}
public function actionRevert($params, $data)
public function actionRevert($params, $data, $request)
{
if (empty($data['id'])) {
throw new BadRequest();
}
if (!$request->isPost()) {
throw new BadRequest();
}
return $this->getService('Import')->revert($data['id']);
}
public function actionRemoveDuplicates($params, $data)
public function actionRemoveDuplicates($params, $data, $request)
{
if (empty($data['id'])) {
throw new BadRequest();
}
if (!$request->isPost()) {
throw new BadRequest();
}
return $this->getService('Import')->removeDuplicates($data['id']);
}
public function actionCreate($params, $data)
public function actionCreate($params, $data, $request)
{
if (!$request->isPost() && !$request->isPut()) {
throw new BadRequest();
}
$importParams = array(
'headerRow' => $data['headerRow'],
'fieldDelimiter' => $data['fieldDelimiter'],
@@ -119,6 +133,10 @@ class Import extends \Espo\Core\Controllers\Record
'action' => $data['action'],
);
if (array_key_exists('updateBy', $data)) {
$importParams['updateBy'] = $data['updateBy'];
}
$attachmentId = $data['attachmentId'];
if (!$this->getAcl()->check($data['entityType'], 'edit')) {

View File

@@ -22,6 +22,9 @@
namespace Espo\Controllers;
use \Espo\Core\Exceptions\Forbidden;
use \Espo\Core\Exceptions\BadRequest;
class InboundEmail extends \Espo\Core\Controllers\Record
{
protected function checkControllerAccess()

View File

@@ -18,21 +18,23 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
************************************************************************/
************************************************************************/
namespace Espo\Controllers;
use \Espo\Core\Exceptions\Error;
use \Espo\Core\Exceptions\Forbidden;
use \Espo\Core\Exceptions\BadRequest;
class Integration extends \Espo\Core\Controllers\Record
{
{
protected function checkControllerAccess()
{
if (!$this->getUser()->isAdmin()) {
throw new Forbidden();
}
}
public function actionIndex($params, $data, $request)
{
return false;
@@ -40,22 +42,25 @@ class Integration extends \Espo\Core\Controllers\Record
public function actionRead($params, $data, $request)
{
$entity = $this->getEntityManager()->getEntity('Integration', $params['id']);
$entity = $this->getEntityManager()->getEntity('Integration', $params['id']);
return $entity->toArray();
}
public function actionUpdate($params, $data)
public function actionUpdate($params, $data, $request)
{
return $this->actionPatch($params, $data);
return $this->actionPatch($params, $data, $request);
}
public function actionPatch($params, $data)
public function actionPatch($params, $data, $request)
{
if (!$request->isPut() && !$request->isPatch()) {
throw new BadRequest();
}
$entity = $this->getEntityManager()->getEntity('Integration', $params['id']);
$entity->set($data);
$this->getEntityManager()->saveEntity($entity);
return $entity->toArray();
return $entity->toArray();
}
}

View File

@@ -0,0 +1,72 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 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/.
************************************************************************/
namespace Espo\Controllers;
use \Espo\Core\Exceptions\Error;
use \Espo\Core\Exceptions\Forbidden;
class Job extends \Espo\Core\Controllers\Record
{
protected function checkControllerAccess()
{
if (!$this->getUser()->isAdmin()) {
throw new Forbidden();
}
}
public function actionCreate($params, $data)
{
throw new Forbidden();
}
public function actionUpdate($params, $data)
{
throw new Forbidden();
}
public function actionPatch($params, $data)
{
throw new Forbidden();
}
public function actionListLinked($params, $data, $request)
{
throw new Forbidden();
}
public function actionMassUpdate($params, $data, $request)
{
throw new Forbidden();
}
public function actionCreateLink($params, $data)
{
throw new Forbidden();
}
public function actionRemoveLink($params, $data)
{
throw new Forbidden();
}
}

View File

@@ -26,6 +26,7 @@ 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 Layout extends \Espo\Core\Controllers\Base
{
@@ -38,12 +39,16 @@ class Layout extends \Espo\Core\Controllers\Base
return $data;
}
public function actionUpdate($params, $data)
public function actionUpdate($params, $data, $request)
{
if (!$this->getUser()->isAdmin()) {
throw new Forbidden();
}
if (!$request->isPut() && !$request->isPatch()) {
throw new BadRequest();
}
$layoutManager = $this->getContainer()->get('layout');
$layoutManager->set($data, $params['scope'], $params['name']);
$result = $layoutManager->save();
@@ -57,8 +62,20 @@ class Layout extends \Espo\Core\Controllers\Base
return $layoutManager->get($params['scope'], $params['name']);
}
public function actionPatch($params, $data)
public function actionPatch($params, $data, $request)
{
return $this->actionUpdate($params, $data);
return $this->actionUpdate($params, $data, $request);
}
public function actionResetToDefault($params, $data, $request)
{
if (!$request->isPost()) {
throw new BadRequest();
}
if (empty($data['scope']) || empty($data['name'])) {
throw new BadRequest();
}
return $this->getContainer()->get('layout')->resetToDefault($data['scope'], $data['name']);
}
}

View File

@@ -18,7 +18,7 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
************************************************************************/
************************************************************************/
namespace Espo\Controllers;
@@ -32,32 +32,32 @@ class Notification extends \Espo\Core\Controllers\Base
{
$scope = $params['scope'];
$id = $params['id'];
$userId = $this->getUser()->id;
$offset = intval($request->get('offset'));
$maxSize = intval($request->get('maxSize'));
$maxSize = intval($request->get('maxSize'));
$params = array(
'offset' => $offset,
'maxSize' => $maxSize,
);
$result = $this->getService('Notification')->getList($userId, $params);
$result = $this->getService('Notification')->getList($userId, $params);
return array(
'total' => $result['total'],
'list' => $result['collection']->toArray()
);
}
public function actionNotReadCount()
{
$userId = $this->getUser()->id;
return $this->getService('Notification')->getNotReadCount($userId);
}
public function actionMarkAllRead($params, $data, $request)
public function postActionMarkAllRead($params, $data, $request)
{
$userId = $this->getUser()->id;
return $this->getService('Notification')->markAllRead($userId);

View File

@@ -53,27 +53,34 @@ class Preferences extends \Espo\Core\Controllers\Base
}
}
public function actionDelete($params, $data)
public function actionDelete($params, $data, $request)
{
$userId = $params['id'];
if (empty($userId)) {
throw new BadRequest();
}
if (!$request->isDelete()) {
throw new BadRequest();
}
$this->handleUserAccess($userId);
return $this->getEntityManager()->getRepository('Preferences')->resetToDefaults($userId);
}
public function actionPatch($params, $data)
public function actionPatch($params, $data, $request)
{
return $this->actionUpdate($params, $data);
return $this->actionUpdate($params, $data, $request);
}
public function actionUpdate($params, $data)
public function actionUpdate($params, $data, $request)
{
$userId = $params['id'];
$this->handleUserAccess($userId);
if (!$request->isPost() && !$request->isPatch() && !$request->isPut()) {
throw new BadRequest();
}
if (array_key_exists('smtpPassword', $data)) {
$data['smtpPassword'] = $this->getCrypt()->encrypt($data['smtpPassword']);
}

View File

@@ -18,12 +18,10 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
************************************************************************/
************************************************************************/
namespace Espo\Controllers;
class Role extends \Espo\Core\Controllers\Record
{
}

View File

@@ -24,6 +24,7 @@ namespace Espo\Controllers;
use \Espo\Core\Exceptions\Error;
use \Espo\Core\Exceptions\Forbidden;
use \Espo\Core\Exceptions\BadRequest;
class Settings extends \Espo\Core\Controllers\Base
{
@@ -46,17 +47,21 @@ class Settings extends \Espo\Core\Controllers\Base
return $this->getConfigData();
}
public function actionUpdate($params, $data)
public function actionUpdate($params, $data, $request)
{
return $this->actionPatch($params, $data);
return $this->actionPatch($params, $data, $request);
}
public function actionPatch($params, $data)
public function actionPatch($params, $data, $request)
{
if (!$this->getUser()->isAdmin()) {
throw new Forbidden();
}
if (!$request->isPut() && !$request->isPatch()) {
throw new BadRequest();
}
if (isset($data['useCache']) && $data['useCache'] != $this->getConfig()->get('useCache')) {
$this->getContainer()->get('dataManager')->clearCache();
}

View File

@@ -18,12 +18,12 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
************************************************************************/
************************************************************************/
namespace Espo\Controllers;
class Team extends \Espo\Core\Controllers\Record
{
}

View File

@@ -76,7 +76,7 @@ class Acl
public function checkScope($scope, $action = null, $isOwner = null, $inTeam = null, $entity = null)
{
return $this->getAclManager()->checkScope($this->getUser(), $subject, $action, $isOwner, $inTeam, $entity) ;
return $this->getAclManager()->checkScope($this->getUser(), $scope, $action, $isOwner, $inTeam, $entity) ;
}
}

View File

@@ -81,7 +81,7 @@ class Base implements Injectable
return $this->getInjection('aclManager');
}
public function checkReadOnlyTeam(User $user, $scope, $data)
public function checkReadOnlyTeam(User $user, $data)
{
if (empty($data) || !is_array($data) || !isset($data['read'])) {
return false;
@@ -89,7 +89,7 @@ class Base implements Injectable
return $data['read'] === 'team';
}
public function checkReadOnlyOwn(User $user, $scope, $data)
public function checkReadOnlyOwn(User $user, $data)
{
if (empty($data) || !is_array($data) || !isset($data['read'])) {
return false;
@@ -160,10 +160,11 @@ class Base implements Injectable
if ($user->id === $entity->get('assignedUserId')) {
return true;
}
}
if ($entity->has('createdById')) {
if ($user->id === $entity->get('createdById')) {
return true;
} else {
if ($entity->has('createdById')) {
if ($user->id === $entity->get('createdById')) {
return true;
}
}
}
return false;

View File

@@ -81,7 +81,12 @@ class Table
public function getScopeData($scope)
{
if (array_key_exists($scope, $this->data['table'])) {
return $this->data['table'][$scope];
$data = $this->data['table'][$scope];
if (is_string($data)) {
$data = $this->getScopeData($data);
return $data;
}
return $data;
}
return null;
}

View File

@@ -124,7 +124,7 @@ class AclManager
return false;
}
$data = $this->getTable($user)->getScopeData($scope);
return $this->getImplementation($scope)->checkReadOnlyTeam($user, $scope, $data);
return $this->getImplementation($scope)->checkReadOnlyTeam($user, $data);
}
public function checkReadOnlyOwn(User $user, $scope)
@@ -133,7 +133,7 @@ class AclManager
return false;
}
$data = $this->getTable($user)->getScopeData($scope);
return $this->getImplementation($scope)->checkReadOnlyOwn($user, $scope, $data);
return $this->getImplementation($scope)->checkReadOnlyOwn($user, $data);
}
public function check(User $user, $subject, $action = null, $isOwner = null, $inTeam = null)
@@ -166,7 +166,7 @@ class AclManager
return true;
}
$data = $this->getTable($user)->getScopeData($entity->getEntityType());
return $this->getImplementation($scope)->checkEntity($user, $entity, $data, $action);
return $this->getImplementation($entity->getEntityType())->checkEntity($user, $entity, $data, $action);
}
public function checkScope(User $user, $scope, $action = null, $isOwner = null, $inTeam = null, $entity = null)

View File

@@ -86,10 +86,12 @@ class Application
public function runClient()
{
$config = $this->getContainer()->get('config');
$themeManager = $this->getContainer()->get('themeManager');
$html = file_get_contents('main.html');
$html = str_replace('{{cacheTimestamp}}', $config->get('cacheTimestamp', 0), $html);
$html = str_replace('{{useCache}}', $config->get('useCache') ? 'true' : 'false' , $html);
$html = str_replace('{{stylesheet}}', $themeManager->getStylesheet(), $html);
$html = str_replace('{{runScript}}', 'app.start();' , $html);
echo $html;
exit;

View File

@@ -278,6 +278,14 @@ class Container
);
}
private function loadThemeManager()
{
return new \Espo\Core\Utils\ThemeManager(
$this->get('config'),
$this->get('metadata')
);
}
public function setUser($user)
{
$this->data['user'] = $user;

View File

@@ -87,18 +87,27 @@ class ControllerManager
$actionNameUcfirst = ucfirst($actionName);
$beforeMethodName = 'before' . $actionNameUcfirst;
$actionMethodName = 'action' . $actionNameUcfirst;
$afterMethodName = 'after' . $actionNameUcfirst;
$fullActionMethodName = strtolower($request->getMethod()) . ucfirst($actionMethodName);
if (method_exists($controller, $fullActionMethodName)) {
$primaryActionMethodName = $fullActionMethodName;
} else {
$primaryActionMethodName = $actionMethodName;
}
if (!method_exists($controller, $primaryActionMethodName)) {
throw new NotFound("Action '$actionName' (".$request->getMethod().") does not exist in controller '$controllerName'");
}
if (method_exists($controller, $beforeMethodName)) {
$controller->$beforeMethodName($params, $data, $request);
}
$actionMethodName = 'action' . $actionNameUcfirst;
if (!method_exists($controller, $actionMethodName)) {
throw new NotFound("Action '$actionMethodName' does not exist in controller '$controller'");
}
$result = $controller->$primaryActionMethodName($params, $data, $request);
$result = $controller->$actionMethodName($params, $data, $request);
$afterMethodName = 'after' . $actionNameUcfirst;
if (method_exists($controller, $afterMethodName)) {
$controller->$afterMethodName($params, $data, $request);
}

View File

@@ -124,22 +124,34 @@ class Record extends Base
$asc = $request->get('asc') === 'true';
$sortBy = $request->get('sortBy');
$q = $request->get('q');
$primaryFilter = $request->get('primaryFilter');
$textFilter = $request->get('textFilter');
$boolFilterList = $request->get('boolFilterList');
if (empty($maxSize)) {
$maxSize = self::MAX_SIZE_LIMIT;
}
if (!empty($maxSize) && $maxSize > self::MAX_SIZE_LIMIT) {
throw new Forbidden();
throw new Forbidden("Max should should not exceed " . self::MAX_SIZE_LIMIT . ". Use pagination (offset, limit).");
}
$result = $this->getRecordService()->findEntities(array(
$params = array(
'where' => $where,
'offset' => $offset,
'maxSize' => $maxSize,
'asc' => $asc,
'sortBy' => $sortBy,
'q' => $q,
));
'textFilter' => $textFilter
);
if ($request->get('primaryFilter')) {
$params['primaryFilter'] = $request->get('primaryFilter');
}
if ($request->get('boolFilterList')) {
$params['boolFilterList'] = $request->get('boolFilterList');
}
$result = $this->getRecordService()->findEntities($params);
return array(
'total' => $result['total'],
@@ -158,6 +170,7 @@ class Record extends Base
$asc = $request->get('asc') === 'true';
$sortBy = $request->get('sortBy');
$q = $request->get('q');
$textFilter = $request->get('textFilter');
if (empty($maxSize)) {
$maxSize = self::MAX_SIZE_LIMIT;
@@ -166,15 +179,23 @@ class Record extends Base
throw new Forbidden();
}
$result = $this->getRecordService()->findLinkedEntities($id, $link, array(
$params = array(
'where' => $where,
'offset' => $offset,
'maxSize' => $maxSize,
'asc' => $asc,
'sortBy' => $sortBy,
'q' => $q,
));
'textFilter' => $textFilter
);
if ($request->get('primaryFilter')) {
$params['primaryFilter'] = $request->get('primaryFilter');
}
if ($request->get('boolFilterList')) {
$params['boolFilterList'] = $request->get('boolFilterList');
}
$result = $this->getRecordService()->findLinkedEntities($id, $link, $params);
return array(
'total' => $result['total'],
@@ -198,7 +219,7 @@ class Record extends Base
public function actionExport($params, $data, $request)
{
if ($this->getConfig()->get('disableExport') && !$this->getUser()->isAdmin()) {
if ($this->getConfig()->get('exportDisabled') && !$this->getUser()->isAdmin()) {
throw new Forbidden();
}

View File

@@ -82,6 +82,11 @@ abstract class Base
return $this->getContainer()->get('fileManager');
}
protected function getLanguage()
{
return $this->getContainer()->get('language');
}
public function __construct(Container $container)
{
$this->container = $container;

View File

@@ -104,6 +104,9 @@ class HookManager
foreach ($this->data[$scope][$hookName] as $className) {
if (empty($this->hooks[$className])) {
$this->hooks[$className] = $this->createHookByClassName($className);
if (empty($this->hooks[$className])) {
continue;
}
}
$hook = $this->hooks[$className];
$hook->$hookName($injection, $options);
@@ -122,7 +125,7 @@ class HookManager
}
return $hook;
}
throw new Error("Class '$className' does not exist");
$GLOBALS['log']->error("Hook class '{$name}' does not exist.");
}
/**

View File

@@ -0,0 +1,94 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 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/.
************************************************************************/
namespace Espo\Core\Mail;
use \Espo\Entities\Email;
class FiltersMatcher
{
public function __construct()
{
}
public function match(Email $email, $filterList = [])
{
foreach ($filterList as $filter) {
if ($filter->get('from')) {
if (strtolower($filter->get('from')) === strtolower($email->get('from'))) {
return true;
}
}
if ($filter->get('to')) {
if ($email->get('to')) {
$toArr = explode(';', $email->get('to'));
foreach ($toArr as $to) {
if (strtolower($to) === strtolower($filter->get('to'))) {
return true;
}
}
}
}
if ($filter->get('subject')) {
if ($this->matchString($filter->get('subject'), $email->get('name'))) {
return true;
}
}
}
return false;
}
public function matchBody(Email $email, $filterList = [])
{
foreach ($filterList as $filter) {
if ($filter->get('bodyContains')) {
$phraseList = $filter->get('bodyContains');
$body = $email->get('body');
$bodyPlain = $email->get('bodyPlain');
foreach ($phraseList as $phrase) {
if (stripos($bodyPlain, $phrase) !== false) {
return true;
}
if (stripos($body, $phrase) !== false) {
return true;
}
}
}
}
return false;
}
protected function matchString($pattern, $value)
{
if ($pattern == $value) {
return true;
}
$pattern = preg_quote($pattern, '#');
$pattern = str_replace('\*', '.*', $pattern).'\z';
if (preg_match('#^'.$pattern.'#', $value)) {
return true;
}
return false;
}
}

View File

@@ -25,6 +25,7 @@ namespace Espo\Core\Mail;
use \Zend\Mime\Mime as Mime;
use \Espo\ORM\Entity;
use \Espo\ORM\Email;
class Importer
{
@@ -34,11 +35,14 @@ class Importer
private $config;
private $filtersMatcher;
public function __construct($entityManager, $fileManager, $config)
{
$this->entityManager = $entityManager;
$this->fileManager = $fileManager;
$this->config = $config;
$this->filtersMatcher = new FiltersMatcher();
}
protected function getEntityManager()
@@ -55,7 +59,12 @@ class Importer
return $this->fileManager;
}
public function importMessage($message, $userId, $teamsIds = array())
protected function getFiltersMatcher()
{
return $this->filtersMatcher;
}
public function importMessage($message, $userId, $teamsIds = [], $filterList = [])
{
try {
$email = $this->getEntityManager()->getEntity('Email');
@@ -82,16 +91,26 @@ class Importer
$toArr = $this->getAddressListFromMessage($message, 'to');
$ccArr = $this->getAddressListFromMessage($message, 'cc');
$replyToArr = $this->getAddressListFromMessage($message, 'replyTo');
$email->set('from', $fromArr[0]);
$email->set('to', implode(';', $toArr));
$email->set('cc', implode(';', $ccArr));
$email->set('replyTo', implode(';', $replyToArr));
if ($this->getFiltersMatcher()->match($email, $filterList)) {
return false;
}
if (isset($message->messageId) && !empty($message->messageId)) {
$email->set('messageId', $message->messageId);
if (isset($message->deliveredTo)) {
$email->set('messageIdInternal', $message->messageId . '-' . $message->deliveredTo);
}
if (stripos($message->messageId, '@espo-system') !== false) {
return;
}
}
if ($duplicate = $this->findDuplicate($email)) {
@@ -99,6 +118,7 @@ class Importer
$usersIds = $duplicate->get('usersIds');
$usersIds[] = $userId;
$duplicate->set('usersIds', $usersIds);
$this->getEntityManager()->saveEntity($duplicate);
if (!empty($teamsIds)) {
@@ -136,6 +156,10 @@ class Importer
$this->importPartDataToEmail($email, $message, $inlineIds, 'text/plain');
}
if (!$email->get('body') && $email->get('bodyPlain')) {
$email->set('body', $email->get('bodyPlain'));
}
$body = $email->get('body');
if (!empty($body)) {
foreach ($inlineIds as $cid => $attachmentId) {
@@ -144,15 +168,54 @@ class Importer
$email->set('body', $body);
}
if ($this->getFiltersMatcher()->matchBody($email, $filterList)) {
return false;
}
$parentFound = false;
if (isset($message->inReplyTo) && !empty($message->inReplyTo)) {
$arr = explode(' ', $message->inReplyTo);
$inReplyTo = $arr[0];
$replied = $this->getEntityManager()->getRepository('Email')->where(array(
'messageId' => $inReplyTo
))->findOne();
if ($replied) {
$email->set('repliedId', $replied->id);
}
}
if (isset($message->references) && !empty($message->references)) {
$reference = str_replace(array('/', '@'), " ", trim($message->references, '<>'));
$arr = explode(' ', $message->references);
$reference = $arr[0];
$reference = str_replace(array('/', '@'), " ", trim($reference, '<>'));
$parentType = $parentId = null;
$emailSent = PHP_INT_MAX;
$n = sscanf($reference, '%s %s %d %d espo', $parentType, $parentId, $emailSent, $number);
if ($n == 4 && $emailSent < time()) {
if (!empty($parentType) && !empty($parentId)) {
if ($parentType == 'Lead') {
$parent = $this->getEntityManager()->getEntity('Lead', $parentId);
if ($parent && $parent->get('status') == 'Converted') {
if ($parent->get('createdAccountId')) {
$account = $this->getEntityManager()->getEntity('Account', $parent->get('createdAccountId'));
if ($account) {
$parentType = 'Account';
$parentId = $account->id;
}
} else {
if ($this->getConfig()->get('b2cMode')) {
if ($parent->get('createdContactId')) {
$contact = $this->getEntityManager()->getEntity('Contact', $parent->get('createdContactId'));
if ($contact) {
$parentType = 'Contact';
$parentId = $contact->id;
}
}
}
}
}
}
$email->set('parentType', $parentType);
$email->set('parentId', $parentId);
$parentFound = true;
@@ -165,10 +228,15 @@ class Importer
if ($from) {
$parentFound = $this->findParent($email, $from);
}
if (!$parentFound) {
if (!empty($toArr)) {
$parentFound = $this->findParent($email, $toArr[0]);
}
}
if (!$parentFound) {
if (!empty($replyToArr)) {
$parentFound = $this->findParent($email, $replyToArr[0]);
}
}
if (!$parentFound) {
if (!empty($toArr)) {
$parentFound = $this->findParent($email, $toArr[0]);
}
}
@@ -229,12 +297,20 @@ class Importer
}
}
protected function normilizeHeader($header)
{
if (is_a($header, 'ArrayIterator')) {
return $header->current();
} else {
return $header;
}
}
protected function getAddressListFromMessage($message, $type)
{
$addressList = array();
if (isset($message->$type)) {
$list = $message->getHeader($type)->getAddressList();
$list = $this->normilizeHeader($message->getHeader($type))->getAddressList();
foreach ($list as $address) {
$addressList[] = $address->getEmail();
}
@@ -251,6 +327,15 @@ class Importer
$type = strtok($part->contentType, ';');
}
$contentDisposition = false;
if (isset($part->ContentDisposition)) {
if (strpos(strtolower($part->ContentDisposition), 'attachment') === 0) {
$contentDisposition = 'attachment';
} else if (strpos(strtolower($part->ContentDisposition), 'inline') === 0) {
$contentDisposition = 'inline';
}
}
if (empty($type)) {
if (!empty($defaultContentType)) {
$type = $defaultContentType;
@@ -260,28 +345,26 @@ class Importer
}
$encoding = null;
$isAttachment = true;
if ($type == 'text/plain' || $type == 'text/html') {
$isAttachment = false;
$content = $this->getContentFromPart($part);
if ($type == 'text/plain') {
if ($email->get('bodyPlain')) {
$isAttachment = true;
} else {
$email->set('bodyPlain', $content);
if (!$email->get('body')) {
$email->set('body', $content);
if ($contentDisposition !== 'attachment') {
$isAttachment = false;
$content = $this->getContentFromPart($part);
if ($type == 'text/plain') {
$bodyPlain = '';
if ($email->get('bodyPlain')) {
$bodyPlain .= $email->get('bodyPlain') . "\n";
}
}
} else if ($type == 'text/html') {
if ($email->get('isHtml')) {
$isAttachment = true;
} else {
$email->set('body', $content);
$bodyPlain .= $content;
$email->set('bodyPlain', $bodyPlain);
} else if ($type == 'text/html') {
$body = '';
if ($email->get('body')) {
$body .= $email->get('body') . "<br>";
}
$body .= $content;
$email->set('isHtml', true);
$email->set('body', $body);
}
}
}
@@ -293,13 +376,13 @@ class Importer
$fileName = null;
$contentId = null;
if (isset($part->ContentDisposition)) {
if (strpos($part->ContentDisposition, 'attachment') === 0) {
if ($contentDisposition) {
if ($contentDisposition === 'attachment') {
if (preg_match('/filename="?([^"]+)"?/i', $part->ContentDisposition, $m)) {
$fileName = $m[1];
$disposition = 'attachment';
}
} else if (strpos($part->ContentDisposition, 'inline') === 0) {
} else if ($contentDisposition === 'inline') {
if (isset($part->contentID)) {
$contentId = trim($part->contentID, '<>');
$fileName = $contentId;
@@ -317,7 +400,7 @@ class Importer
}
if (isset($part->contentTransferEncoding)) {
$encoding = strtolower($part->getHeader('Content-Transfer-Encoding')->getTransferEncoding());
$encoding = strtolower($this->normilizeHeader($part->getHeader('Content-Transfer-Encoding'))->getTransferEncoding());
}
$attachment = $this->getEntityManager()->getEntity('Attachment');
@@ -365,7 +448,7 @@ class Importer
$encoding = null;
if (isset($part->contentTransferEncoding)) {
$cteHeader = $part->getHeader('Content-Transfer-Encoding');
$cteHeader = $this->normilizeHeader($part->getHeader('Content-Transfer-Encoding'));
$encoding = strtolower($cteHeader->getTransferEncoding());
}
@@ -376,7 +459,7 @@ class Importer
$charset = 'UTF-8';
if (isset($part->contentType)) {
$ctHeader = $part->getHeader('Content-Type');
$ctHeader = $this->normilizeHeader($part->getHeader('Content-Type'));
$charsetParamValue = $ctHeader->getParameter('charset');
if (!empty($charsetParamValue)) {
$charset = strtoupper($charsetParamValue);
@@ -384,7 +467,7 @@ class Importer
}
if (isset($part->contentTransferEncoding)) {
$cteHeader = $part->getHeader('Content-Transfer-Encoding');
$cteHeader = $this->normilizeHeader($part->getHeader('Content-Transfer-Encoding'));
if ($cteHeader->getTransferEncoding() == 'quoted-printable') {
$content = quoted_printable_decode($content);
}

View File

@@ -0,0 +1,69 @@
<?php
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
namespace Espo\Core\Mail\Mail\Header;
use \Zend\Mail\Header;
use Zend\Mime\Mime;
class XQueueItemId implements Header\HeaderInterface
{
protected $fieldName = 'X-QueueItemId';
protected $id = null;
public static function fromString($headerLine)
{
list($name, $value) = Header\GenericHeader::splitHeaderLine($headerLine);
$value = Header\HeaderWrap::mimeDecodeValue($value);
if (strtolower($name) !== 'x-queue-item-id') {
throw new Header\Exception\InvalidArgumentException('Invalid header line for Message-ID string');
}
$header = new static();
$header->setId($value);
return $header;
}
public function getFieldName()
{
return $this->fieldName;
}
public function setFieldName($value)
{
}
public function setEncoding($encoding)
{
return $this;
}
public function setId($id)
{
$this->id = $id;
}
public function getEncoding()
{
return 'ASCII';
}
public function toString()
{
return $this->fieldName . ': ' . $this->getFieldValue();
}
public function getFieldValue($format = Header\HeaderInterface::FORMAT_RAW)
{
return $this->id;
}
}

View File

@@ -131,9 +131,11 @@ class Sender
return $this;
}
public function send(Email $email, $params = array(), &$message = null)
public function send(Email $email, $params = array(), &$message = null, $attachmetList = [])
{
$message = new Message();
if (!$message) {
$message = new Message();
}
$config = $this->config;
$params = $this->params + $params;
@@ -206,10 +208,24 @@ class Sender
}
}
$value = $email->get('replyTo');
if ($value) {
$arr = explode(';', $value);
if (is_array($arr)) {
foreach ($arr as $address) {
$message->addReplyTo(trim($address));
}
}
}
$attachmentPartList = array();
$attachmentCollection = $email->get('attachments');
$attachmentInlineCollection = $email->getInlineAttachments();
foreach ($attachmetList as $attachment) {
$attachmentCollection[] = $attachment;
}
if (!empty($attachmentCollection)) {
foreach ($attachmentCollection as $a) {
$fileName = 'data/upload/' . $a->id;
@@ -311,6 +327,9 @@ class Sender
} else {
$messageId = '' . md5($email->get('name')) . '/' . time() . '/' . $rand . '@espo';
}
if ($email->get('isSystem')) {
$messageId .= '-system';
}
$messageIdHeader = new \Zend\Mail\Header\MessageId();
$messageIdHeader->setId($messageId);

View File

@@ -37,6 +37,7 @@ class Entity extends \Espo\ORM\Entity
$collection = $this->get($field, $defs);
$ids = array();
$names = new \stdClass();
$types = new \stdClass();
if (!empty($columns)) {
$columnsData = new \stdClass();
}
@@ -46,6 +47,7 @@ class Entity extends \Espo\ORM\Entity
$id = $e->id;
$ids[] = $id;
$names->$id = $e->get('name');
$types->$id = $e->get('type');
if (!empty($columns)) {
$columnsData->$id = new \stdClass();
foreach ($columns as $column => $f) {
@@ -57,6 +59,7 @@ class Entity extends \Espo\ORM\Entity
$this->set($field . 'Ids', $ids);
$this->set($field . 'Names', $names);
$this->set($field . 'Types', $types);
if (!empty($columns)) {
$this->set($field . 'Columns', $columnsData);
}

View File

@@ -65,6 +65,11 @@ class Base
return $this->user;
}
protected function getAcl()
{
return $this->acl;
}
public function setEntityType($entityType)
{
$this->entityType = $entityType;
@@ -75,20 +80,20 @@ class Base
return $this->entityType;
}
protected function limit($params, &$result)
protected function limit($offset = null, $maxSize = null, &$result)
{
if (isset($params['offset']) && !is_null($params['offset'])) {
$result['offset'] = $params['offset'];
if (!is_null($offset)) {
$result['offset'] = $offset;
}
if (isset($params['maxSize']) && !is_null($params['maxSize'])) {
$result['limit'] = $params['maxSize'];
if (!is_null($maxSize)) {
$result['limit'] = $maxSize;
}
}
protected function order($params, &$result)
protected function order($sortBy, $asc, &$result)
{
if (!empty($params['sortBy'])) {
$result['orderBy'] = $params['sortBy'];
if (!empty($sortBy)) {
$result['orderBy'] = $sortBy;
$type = $this->metadata->get("entityDefs.{$this->entityType}.fields." . $result['orderBy'] . ".type");
if ($type == 'link') {
$result['orderBy'] .= 'Name';
@@ -96,12 +101,10 @@ class Base
$result['orderBy'] .= 'Type';
}
}
if (isset($params['asc'])) {
if ($params['asc']) {
$result['order'] = 'ASC';
} else {
$result['order'] = 'DESC';
}
if ($asc) {
$result['order'] = 'ASC';
} else {
$result['order'] = 'DESC';
}
}
@@ -118,78 +121,61 @@ class Base
return $this->seed;
}
protected function textFilter($value, &$result)
public function applyWhere($where, &$result)
{
$fieldDefs = $this->getSeed()->getFields();
$fieldList = $this->getTextFilterFields();
$d = array();
foreach ($fieldList as $field) {
if (
strlen($item['value']) >= self::MIN_LENGTH_FOR_CONTENT_SEARCH
&&
!empty($fieldDefs[$field]['type']) && $fieldDefs[$field]['type'] == 'text'
) {
$d[$field . '*'] = '%' . $value . '%';
} else {
$d[$field . '*'] = $value . '%';
}
}
$result['whereClause'][] = array(
'OR' => $d
);
$this->prepareResult($result);
$this->where($where, $result);
}
protected function where($params, &$result)
protected function where($where, &$result)
{
if (!empty($params['where']) && is_array($params['where'])) {
$where = array();
$this->prepareResult($result);
foreach ($params['where'] as $item) {
if ($item['type'] == 'bool' && !empty($item['value']) && is_array($item['value'])) {
foreach ($item['value'] as $filter) {
$p = $this->getBoolFilterWhere($filter);
if (!empty($p)) {
$params['where'][] = $p;
}
$this->boolFilter($filter, $result);
$whereClause = array();
foreach ($where as $item) {
if ($item['type'] == 'bool' && !empty($item['value']) && is_array($item['value'])) {
foreach ($item['value'] as $filter) {
$p = $this->getBoolFilterWhere($filter);
if (!empty($p)) {
$where[] = $p;
}
} else if ($item['type'] == 'textFilter' && !empty($item['value'])) {
if (!empty($item['value'])) {
$this->textFilter($item['value'], $result);
}
} else if ($item['type'] == 'primary' && !empty($item['value'])) {
$this->primaryFilter($item['value'], $result);
$this->applyBoolFilter($filter, $result);
}
} else if ($item['type'] == 'textFilter' && !empty($item['value'])) {
if (!empty($item['value'])) {
$this->textFilter($item['value'], $result);
}
} else if ($item['type'] == 'primary' && !empty($item['value'])) {
$this->applyPrimaryFilter($item['value'], $result);
}
}
$linkedWith = array();
$inCategory = array();
$ignoreList = ['linkedWith', 'inCategory', 'bool', 'primary'];
foreach ($where as $item) {
if (!in_array($item['type'], $ignoreList)) {
$part = $this->getWherePart($item);
if (!empty($part)) {
$whereClause[] = $part;
}
} else {
if ($item['type'] == 'linkedWith' && !empty($item['value'])) {
$linkedWith[$item['field']] = $item['value'];
} else if ($item['type'] == 'inCategory' && !empty($item['value'])) {
$inCategory[$item['field']] = $item['value'];
}
}
}
$linkedWith = array();
$inCategory = array();
$result['whereClause'] = array_merge($result['whereClause'], $whereClause);
$ignoreList = ['linkedWith', 'inCategory', 'bool', 'primary'];
foreach ($params['where'] as $item) {
if (!in_array($item['type'], $ignoreList)) {
$part = $this->getWherePart($item);
if (!empty($part)) {
$where[] = $part;
}
} else {
if ($item['type'] == 'linkedWith' && !empty($item['value'])) {
$linkedWith[$item['field']] = $item['value'];
} else if ($item['type'] == 'inCategory' && !empty($item['value'])) {
$inCategory[$item['field']] = $item['value'];
}
}
}
$result['whereClause'] = array_merge($result['whereClause'], $where);
if (!empty($linkedWith)) {
$this->handleLinkedWith($linkedWith, $result);
}
if (!empty($inCategory)) {
$this->handleInCategory($inCategory, $result);
}
if (!empty($linkedWith)) {
$this->handleLinkedWith($linkedWith, $result);
}
if (!empty($inCategory)) {
$this->handleInCategory($inCategory, $result);
}
}
@@ -226,6 +212,7 @@ class Base
$result['whereClause'][] = $part;
}
$result['joins'] = array_merge($result['joins'], $joins);
$result['joins'] = array_unique($result['joins']);
$result['distinct'] = true;
}
@@ -255,15 +242,15 @@ class Base
if ($defs['type'] == 'manyMany') {
if (!empty($defs['relationName']) && !empty($defs['midKeys'])) {
if (!empty($defs['midKeys'])) {
$result['distinct'] = true;
$result['joins'][] = $link;
$key = $defs['midKeys'][1];
$relationName = lcfirst($defs['relationName']);
$middleName = $link . 'Middle';
$result['customJoin'] .= "
JOIN " . $query->toDb($pathName) . " AS `{$pathName}` ON {$pathName}.descendor_id = ".$query->sanitize($relationName) . "." . $query->toDb($key) . "
JOIN " . $query->toDb($pathName) . " AS `{$pathName}` ON {$pathName}.descendor_id = ".$query->sanitize($middleName) . "." . $query->toDb($key) . "
";
$part[$pathName . '.ascendorId'] = $val;
}
@@ -289,27 +276,38 @@ class Base
protected function q($params, &$result)
{
if (!empty($params['q'])) {
$fieldDefs = $this->getSeed()->getFields();
$this->textFilter($params['q'], $result);
}
}
$value = $params['q'];
public function manageAccess(&$result)
{
$this->prepareResult($result);
$this->applyAccess($result);
}
$fieldList = $this->getTextFilterFields();
$d = array();
foreach ($fieldList as $field) {
if (
strlen($value) >= self::MIN_LENGTH_FOR_CONTENT_SEARCH
&&
!empty($fieldDefs[$field]['type']) && $fieldDefs[$field]['type'] == 'text'
) {
$d[$field . '*'] = '%' . $value . '%';
} else {
$d[$field . '*'] = $value . '%';
}
}
public function manageTextFilter($textFilter, &$result)
{
$this->prepareResult($result);
$this->q(array('q' => $textFilter), $result);
}
$result['whereClause'][] = array(
'OR' => $d
);
protected function prepareResult(&$result)
{
if (empty($result)) {
$result = array();
}
if (empty($result['joins'])) {
$result['joins'] = [];
}
if (empty($result['leftJoins'])) {
$result['leftJoins'] = [];
}
if (empty($result['whereClause'])) {
$result['whereClause'] = array();
}
if (empty($result['customJoin'])) {
$result['customJoin'] = '';
}
}
@@ -317,20 +315,28 @@ class Base
{
if ($this->acl->checkReadOnlyOwn($this->entityType)) {
$this->accessOnlyOwn($result);
}
if (!$this->user->isAdmin() && $this->acl->checkReadOnlyTeam($this->entityType)) {
$this->accessOnlyTeam($result);
} else {
if (!$this->user->isAdmin() && $this->acl->checkReadOnlyTeam($this->entityType)) {
$this->accessOnlyTeam($result);
}
}
}
protected function accessOnlyOwn(&$result)
{
if (!$this->getSeed()->hasField('assignedUserId')) {
if ($this->getSeed()->hasField('assignedUserId')) {
$result['whereClause'][] = array(
'assignedUserId' => $this->getUser()->id
);
return;
}
if ($this->getSeed()->hasField('createdById')) {
$result['whereClause'][] = array(
'createdById' => $this->getUser()->id
);
return;
}
$result['whereClause'][] = array(
'assignedUserId' => $this->getUser()->id
);
}
protected function accessOnlyTeam(&$result)
@@ -353,22 +359,48 @@ class Base
public function getAclParams()
{
$result = array();
$this->access($result);
$this->applyAccess($result);
return $result;
}
public function getSelectParams(array $params, $withAcl = false)
{
$result = array(
'joins' => [],
'leftJoins' => [],
'whereClause' => [],
'customJoin' => ''
);
$result = array();
$this->prepareResult($result);
if (!empty($params['sortBy'])) {
if (!array_key_exists('asc', $params)) {
$params['asc'] = true;
}
$this->order($params['sortBy'], $params['asc'], $result);
}
if (!isset($params['offset'])) {
$params['offset'] = null;
}
if (!isset($params['maxSize'])) {
$params['maxSize'] = null;
}
$this->limit($params['offset'], $params['maxSize'], $result);
if (!empty($params['primaryFilter'])) {
$this->applyPrimaryFilter($params['primaryFilter'], $result);
}
if (!empty($params['boolFilterList']) && is_array($params['boolFilterList'])) {
foreach ($params['boolFilterList'] as $filterName) {
$this->applyBoolFilter($filterName, $result);
}
}
if (!empty($params['where']) && is_array($params['where'])) {
$this->where($params['where'], $result);
}
if (!empty($params['textFilter'])) {
$this->textFilter($params['textFilter'], $result);
}
$this->order($params, $result);
$this->limit($params, $result);
$this->where($params, $result);
$this->q($params, $result);
if ($withAcl) {
@@ -439,6 +471,60 @@ class Base
$where['type'] = 'after';
$dt->setTimezone(new \DateTimeZone('UTC'));
$where['value'] = $dt->format($format);
break;
case 'lastSevenDays':
$where['type'] = 'between';
$dtFrom = clone $dt;
$dt->setTimezone(new \DateTimeZone('UTC'));
$to = $dt->format($format);
$dtFrom->modify('-7 day');
$dtFrom->setTime(0, 0, 0);
$dtFrom->setTimezone(new \DateTimeZone('UTC'));
$from = $dtFrom->format($format);
$where['value'] = [$from, $to];
break;
case 'lastXDays':
$where['type'] = 'between';
$dtFrom = clone $dt;
$dt->setTimezone(new \DateTimeZone('UTC'));
$to = $dt->format($format);
$number = strval(intval($item['value']));
$dtFrom->modify('-'.$number.' day');
$dtFrom->setTime(0, 0, 0);
$dtFrom->setTimezone(new \DateTimeZone('UTC'));
$from = $dtFrom->format($format);
$where['value'] = [$from, $to];
break;
case 'nextXDays':
$where['type'] = 'between';
$dtTo = clone $dt;
$dt->setTimezone(new \DateTimeZone('UTC'));
$from = $dt->format($format);
$number = strval(intval($item['value']));
$dtTo->modify('+'.$number.' day');
$dtTo->setTime(24, 59, 59);
$dtTo->setTimezone(new \DateTimeZone('UTC'));
$to = $dtTo->format($format);
$where['value'] = [$from, $to];
break;
case 'on':
$where['type'] = 'between';
@@ -568,6 +654,36 @@ class Base
case 'future':
$part[$item['field'] . '>='] = date('Y-m-d');
break;
case 'lastSevenDays':
$dt1 = new \DateTime();
$dt2 = clone $dt1;
$dt2->modify('-7 days');
$part['AND'] = array(
$item['field'] . '>=' => $dt2->format('Y-m-d'),
$item['field'] . '<=' => $dt1->format('Y-m-d'),
);
break;
case 'lastXDays':
$dt1 = new \DateTime();
$dt2 = clone $dt1;
$number = strval(intval($item['value']));
$dt2->modify('-'.$number.' days');
$part['AND'] = array(
$item['field'] . '>=' => $dt2->format('Y-m-d'),
$item['field'] . '<=' => $dt1->format('Y-m-d'),
);
break;
case 'nextXDays':
$dt1 = new \DateTime();
$dt2 = clone $dt1;
$number = strval(intval($item['value']));
$dt2->modify('+'.$number.' days');
$part['AND'] = array(
$item['field'] . '>=' => $dt1->format('Y-m-d'),
$item['field'] . '<=' => $dt2->format('Y-m-d'),
);
break;
case 'currentMonth':
$dt = new \DateTime();
$part['AND'] = array(
@@ -633,19 +749,78 @@ class Base
return $part;
}
protected function boolFilter($filterName, &$result)
public function applyOrder($sortBy, $asc, &$result)
{
$this->prepareResult($result);
$this->order($sortBy, $asc, $result);
}
public function applyLimit($offset, $maxSize, &$result)
{
$this->prepareResult($result);
$this->limit($offset, $maxSize, $result);
}
public function applyPrimaryFilter($filterName, &$result)
{
$this->prepareResult($result);
$method = 'filter' . ucfirst($filterName);
if (method_exists($this, $method)) {
$this->$method($result);
}
}
public function applyBoolFilter($filterName, &$result)
{
$this->prepareResult($result);
$method = 'boolFilter' . ucfirst($filterName);
if (method_exists($this, $method)) {
$this->$method($result);
}
}
protected function primaryFilter($filterName, &$result)
public function applyTextFilter($textFilter, &$result)
{
$method = 'filter' . ucfirst($filterName);
if (method_exists($this, $method)) {
$this->$method($result);
$this->prepareResult($result);
$this->textFilter($textFilter, $result);
}
protected function textFilter($textFilter, &$result)
{
$fieldDefs = $this->getSeed()->getFields();
$fieldList = $this->getTextFilterFields();
$d = array();
foreach ($fieldList as $field) {
if (
strlen($item['value']) >= self::MIN_LENGTH_FOR_CONTENT_SEARCH
&&
!empty($fieldDefs[$field]['type']) && $fieldDefs[$field]['type'] == 'text'
) {
$d[$field . '*'] = '%' . $textFilter . '%';
} else {
$d[$field . '*'] = $textFilter . '%';
}
}
$result['whereClause'][] = array(
'OR' => $d
);
}
public function applyAccess(&$result)
{
$this->prepareResult($result);
$this->access($result);
}
protected function boolFilters($params, &$result)
{
if (!empty($params['boolFilterList']) && is_array($params['boolFilterList'])) {
foreach ($params['boolFilterList'] as $filterName) {
$this->applyBoolFilter($filterName, $result);
}
}
}

View File

@@ -150,7 +150,17 @@ class Config
$removeData = empty($this->removeData) ? null : $this->removeData;
$result = $this->getFileManager()->mergePhpContents($this->configPath, $values, $removeData);
$data = include($this->configPath);
foreach ($values as $key => $value) {
$data[$key] = $value;
}
foreach ($removeData as $key) {
unset($data[$key]);
}
$result = $this->getFileManager()->putPhpContents($this->configPath, $data);
if ($result) {
$this->changedData = array();
@@ -220,7 +230,7 @@ class Config
$restrictItems = $this->getRestrictItems($isAdmin);
$values = array();
foreach($data as $key => $item) {
foreach ($data as $key => $item) {
if (!in_array($key, $restrictItems)) {
$values[$key]= $item;
}

View File

@@ -25,19 +25,19 @@ namespace Espo\Core\Utils;
class Crypt
{
private $config;
private $key = null;
private $cryptKey = null;
private $iv = null;
public function __construct($config)
{
$this->config = $config;
$this->cryptKey = $config->get('cryptKey', '');
}
protected function getKey()
{
if (empty($this->key)) {
@@ -53,13 +53,13 @@ class Crypt
}
return $this->iv;
}
public function encrypt($string)
{
$iv = $this->getIv();
return base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $this->getKey(), $string, MCRYPT_MODE_CBC, $iv) . $iv);
}
public function decrypt($encryptedString)
{
$encryptedString = base64_decode($encryptedString);
@@ -68,7 +68,7 @@ class Crypt
$iv = substr($encryptedString, -16);
return trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $this->getKey(), $string, MCRYPT_MODE_CBC, $iv));
}
public function generateKey()
{
return md5(uniqid());

View File

@@ -0,0 +1,51 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 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/.
************************************************************************/
namespace Espo\Core\Utils\Database\Orm\Fields;
class AttachmentMultiple extends Base
{
protected function load($fieldName, $entityType)
{
$data = array(
$entityType => array (
'fields' => array(
$fieldName.'Ids' => array(
'type' => 'varchar',
'notStorable' => true
),
$fieldName.'Names' => array(
'type' => 'varchar',
'notStorable' => true
),
)
),
'unset' => array(
$entityType => array(
'fields.'.$fieldName,
),
),
);
return $data;
}
}

View File

@@ -32,7 +32,7 @@ class Attachments extends HasChildren
$entityName => array (
'fields' => array(
$linkName.'Types' => array(
'type' => 'varchar',
'type' => 'jsonObject',
'notStorable' => true,
),
),

View File

@@ -66,23 +66,31 @@ class Layout
return $this->metadata;
}
protected function sanitizeInput($name)
{
return preg_replace("([\.]{2,})", '', $name);
}
/**
* Get Layout context
*
* @param $controller
* @param $scope
* @param $name
*
* @return json
*/
public function get($controller, $name)
public function get($scope, $name)
{
if (isset($this->changedData[$controller][$name])) {
return Json::encode($this->changedData[$controller][$name]);
$scope = $this->sanitizeInput($scope);
$name = $this->sanitizeInput($name);
if (isset($this->changedData[$scope][$name])) {
return Json::encode($this->changedData[$scope][$name]);
}
$fileFullPath = Util::concatPath($this->getLayoutPath($controller, true), $name.'.json');
$fileFullPath = Util::concatPath($this->getLayoutPath($scope, true), $name.'.json');
if (!file_exists($fileFullPath)) {
$fileFullPath = Util::concatPath($this->getLayoutPath($controller), $name.'.json');
$fileFullPath = Util::concatPath($this->getLayoutPath($scope), $name.'.json');
}
if (!file_exists($fileFullPath)) {
@@ -101,21 +109,39 @@ class Layout
/**
* Set Layout data
* Ex. $controller = Account, $name = detail then will be created a file layoutFolder/Account/detail.json
* Ex. $scope = Account, $name = detail then will be created a file layoutFolder/Account/detail.json
*
* @param array $data
* @param string $controller - ex. Account
* @param string $scope - ex. Account
* @param string $name - detail
*
* @return void
*/
public function set($data, $controller, $name)
public function set($data, $scope, $name)
{
if (empty($controller) || empty($name)) {
$scope = $this->sanitizeInput($scope);
$name = $this->sanitizeInput($name);
if (empty($scope) || empty($name)) {
return false;
}
$this->changedData[$controller][$name] = $data;
$this->changedData[$scope][$name] = $data;
}
public function resetToDefault($scope, $name)
{
$scope = $this->sanitizeInput($scope);
$name = $this->sanitizeInput($name);
$filePath = 'custom/Espo/Custom/Resources/layouts/' . $scope . '/' . $name . '.json';
if ($this->getFileManager()->isFile($filePath)) {
$this->getFileManager()->removeFile($filePath);
}
if (!empty($this->changedData[$scope]) && !empty($this->changedData[$scope][$name])) {
unset($this->changedData[$scope][$name]);
}
return $this->get($scope, $name);
}
/**
@@ -128,14 +154,14 @@ class Layout
$result = true;
if (!empty($this->changedData)) {
foreach ($this->changedData as $controllerName => $rowData) {
foreach ($this->changedData as $scope => $rowData) {
foreach ($rowData as $layoutName => $layoutData) {
if (empty($controllerName) || empty($layoutName)) {
if (empty($scope) || empty($layoutName)) {
continue;
}
$layoutPath = $this->getLayoutPath($controllerName, true);
$layoutPath = $this->getLayoutPath($scope, true);
$data = Json::encode($layoutData, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE);
$result &= $this->getFileManager()->putContents(array($layoutPath, $layoutName.'.json'), $data);
@@ -162,17 +188,20 @@ class Layout
/**
* Merge layout data
* Ex. $controller= Account, $name= detail then will be created a file layoutFolder/Account/detail.json
* Ex. $scope= Account, $name= detail then will be created a file layoutFolder/Account/detail.json
*
* @param JSON string $data
* @param string $controller - ex. Account
* @param string $scope - ex. Account
* @param string $name - detail
*
* @return bool
*/
public function merge($data, $controller, $name)
public function merge($data, $scope, $name)
{
$prevData = $this->get($controller, $name);
$scope = $this->sanitizeInput($scope);
$name = $this->sanitizeInput($name);
$prevData = $this->get($scope, $name);
$prevDataArray = Json::getArrayData($prevData);
$dataArray = Json::getArrayData($data);
@@ -180,7 +209,7 @@ class Layout
$data = Util::merge($prevDataArray, $dataArray);
$data = Json::encode($data);
return $this->set($data, $controller, $name);
return $this->set($data, $scope, $name);
}
/**
@@ -208,9 +237,4 @@ class Layout
return $path;
}
}
?>

View File

@@ -478,8 +478,7 @@ class Metadata
}
}
krsort($modulesToSort);
asort($modulesToSort);
array_multisort(array_values($modulesToSort), SORT_ASC, array_keys($modulesToSort), SORT_ASC, $modulesToSort);
$this->moduleList = array_keys($modulesToSort);
}

View File

@@ -0,0 +1,52 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 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/.
************************************************************************/
namespace Espo\Core\Utils;
class ThemeManager
{
protected $config;
protected $metadata;
private $defaultName = 'Espo';
private $defaultStylesheet = 'Espo';
public function __construct(Config $config, Metadata $metadata)
{
$this->config = $config;
$this->metadata = $metadata;
}
public function getName()
{
return $this->config->get('theme', $this->defaultName);
}
public function getStylesheet()
{
return $this->metadata->get('themes.' . $this->getName() . '.stylesheet', 'client/css/espo.css');
}
}

View File

@@ -91,7 +91,7 @@ return array (
"tabList" => array("Account", "Contact", "Lead", "Opportunity", "Calendar", "Meeting", "Call", "Task", "Case", "Email", "Document", "Campaign"),
"quickCreateList" => array("Account", "Contact", "Lead", "Opportunity", "Meeting", "Call", "Task", "Case"),
'calendarDefaultEntity' => 'Meeting',
'disableExport' => false,
'exportDisabled' => false,
'assignmentEmailNotifications' => false,
'assignmentEmailNotificationsEntityList' => array('Lead', 'Opportunity', 'Task', 'Case'),
'assignmentNotificationsEntityList' => array('Meeting', 'Call', 'Task', 'Email'),
@@ -101,6 +101,11 @@ return array (
'maxEmailAccountCount' => 2,
'followCreatedEntities' => false,
'b2cMode' => false,
'restrictedMode' => false,
'theme' => 'Espo',
'massEmailMaxPerHourCount' => 100,
'personalEmailMaxPortionSize' => 10,
'inboundEmailMaxPortionSize' => 20,
'isInstalled' => false,
);

View File

@@ -1,6 +1,6 @@
[{
"label":"",
"rows": [
[{"name":"name"}]
[{"name":"name", "fullWidth": true}, false]
]
}]

View File

@@ -84,7 +84,10 @@ return array (
'permissionMap',
'permissionRules',
'passwordSalt',
'cryptKey'
'cryptKey',
'restrictedMode',
'userLimit',
'stylesheet'
),
'adminItems' =>
array (
@@ -113,7 +116,10 @@ return array (
'ldapTryUsernameSplit',
'ldapOptReferrals',
'ldapCreateEspoUser',
'maxEmailAccountCount'
'maxEmailAccountCount',
'massEmailMaxPerHourCount',
'personalEmailMaxPortionSize',
'inboundEmailMaxPortionSize'
),
'isInstalled' => false,
);

View File

@@ -99,5 +99,53 @@ class Email extends \Espo\Core\ORM\Entity
}
return $attachmentList;
}
public function getToList()
{
$value = $email->get('to');
if ($value) {
$arr = explode(';', $value);
if (is_array($arr)) {
return $arr;
}
}
return [];
}
public function getCcList()
{
$value = $email->get('cc');
if ($value) {
$arr = explode(';', $value);
if (is_array($arr)) {
return $arr;
}
}
return [];
}
public function getBccList()
{
$value = $email->get('bcc');
if ($value) {
$arr = explode(';', $value);
if (is_array($arr)) {
return $arr;
}
}
return [];
}
public function getReplyToList()
{
$value = $email->get('replyTo');
if ($value) {
$arr = explode(';', $value);
if (is_array($arr)) {
return $arr;
}
}
return [];
}
}

View File

@@ -0,0 +1,29 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 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/.
************************************************************************/
namespace Espo\Entities;
class EmailFilter extends \Espo\Core\ORM\Entity
{
}

View File

@@ -18,7 +18,7 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
************************************************************************/
************************************************************************/
namespace Espo\EntryPoints;
@@ -29,7 +29,7 @@ use \Espo\Core\Exceptions\BadRequest;
class ChangePassword extends \Espo\Core\EntryPoints\Base
{
public static $authRequired = false;
public function run()
{
$requestId = $_GET['id'];
@@ -38,6 +38,7 @@ class ChangePassword extends \Espo\Core\EntryPoints\Base
}
$config = $this->getConfig();
$themeManager = $this->getThemeManager();
$p = $this->getEntityManager()->getRepository('PasswordChangeRequest')->where(array(
'requestId' => $requestId
@@ -56,9 +57,15 @@ class ChangePassword extends \Espo\Core\EntryPoints\Base
$html = file_get_contents('main.html');
$html = str_replace('{{cacheTimestamp}}', $config->get('cacheTimestamp', 0), $html);
$html = str_replace('{{useCache}}', $config->get('useCache') ? 'true' : 'false' , $html);
$html = str_replace('{{stylesheet}}', $themeManager->getStylesheet(), $html);
$html = str_replace('{{runScript}}', $runScript , $html);
echo $html;
exit;
}
protected function getThemeManager()
{
return $this->getContainer()->get('themeManager');
}
}

View File

@@ -63,6 +63,7 @@ class Download extends \Espo\Core\EntryPoints\Base
$fileName = "data/upload/{$attachment->id}";
if (!file_exists($fileName)) {
throw new NotFound();
}
@@ -78,7 +79,7 @@ class Download extends \Espo\Core\EntryPoints\Base
if ($type) {
header('Content-Type: ' . $type);
}
header('Content-Disposition: ' . $disposition . '; filename=' . $attachment->get('name'));
header("Content-Disposition: " . $disposition . ";filename=\"" . $attachment->get('name') . "\"");
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');

View File

@@ -29,7 +29,9 @@ class Notifications extends \Espo\Core\Hooks\Base
{
public static $order = 10;
protected $noticatorsHash = array();
protected $notifatorsHash = array();
private $streamService;
protected function init()
{
@@ -44,6 +46,11 @@ class Notifications extends \Espo\Core\Hooks\Base
return $this->getInjection('container');
}
protected function getServiceFactory()
{
return $this->getContainer()->get('serviceFactory');
}
protected function getMetadata()
{
return $this->getInjection('metadata');
@@ -59,7 +66,7 @@ class Notifications extends \Espo\Core\Hooks\Base
protected function getNotificator($entityType)
{
if (empty($this->noticatorsHash[$entityType])) {
if (empty($this->notifatorsHash[$entityType])) {
$normalizedName = Util::normilizeClassName($entityType);
$className = '\\Espo\\Custom\\Notificators\\' . $normalizedName;
@@ -81,19 +88,19 @@ class Notifications extends \Espo\Core\Hooks\Base
$notificator->inject($name, $this->getContainer()->get($name));
}
$this->noticatorsHash[$entityType] = $notificator;
$this->notifatorsHash[$entityType] = $notificator;
}
return $this->noticatorsHash[$entityType];
return $this->notifatorsHash[$entityType];
}
public function afterSave(Entity $entity, array $options = array())
{
$entityType = $entity->getEntityType();
if (!empty($options['silent']) && !empty($options['noNotifications'])) {
return;
}
$entityType = $entity->getEntityType();
if (!$this->checkHasStream($entityType)) {
if (in_array($entityType, $this->getConfig()->get('assignmentNotificationsEntityList', []))) {
$notificator = $this->getNotificator($entityType);
@@ -102,5 +109,43 @@ class Notifications extends \Espo\Core\Hooks\Base
}
}
public function beforeRemove(Entity $entity, array $options = array())
{
if (!empty($options['silent']) && !empty($options['noNotifications'])) {
return;
}
$entityType = $entity->getEntityType();
if ($this->checkHasStream($entityType)) {
$followersData = $this->getStreamService()->getEntityFollowers($entity);
foreach ($followersData['idList'] as $userId) {
if ($userId === $this->getUser()->id) {
continue;
}
$notification = $this->getEntityManager()->getEntity('Notification');
$notification->set(array(
'userId' => $userId,
'type' => 'EntityRemoved',
'data' => array(
'entityType' => $entity->getEntityType(),
'entityId' => $entity->id,
'entityName' => $entity->get('name'),
'userId' => $this->getUser()->id,
'userName' => $this->getUser()->get('name')
)
));
$this->getEntityManager()->saveEntity($notification);
}
}
}
protected function getStreamService()
{
if (empty($this->streamService)) {
$this->streamService = $this->getServiceFactory()->create('Stream');
}
return $this->streamService;
}
}

View File

@@ -137,7 +137,7 @@ class Stream extends \Espo\Core\Hooks\Base
protected function getAutofollowUserIdList(Entity $entity, array $ignoreList = array())
{
$entityType = $entity->getEntityName();
$entityType = $entity->getEntityType();
$pdo = $this->getEntityManager()->getPDO();
$userIdList = [];
@@ -160,7 +160,7 @@ class Stream extends \Espo\Core\Hooks\Base
public function afterSave(Entity $entity, array $options = array())
{
$entityName = $entity->getEntityName();
$entityName = $entity->getEntityType();
if ($this->checkHasStream($entity)) {
if ($entity->isNew()) {

View File

@@ -40,7 +40,7 @@ class Cleanup extends \Espo\Core\Jobs\Base
protected function cleanupJobs()
{
$query = "DELETE FROM `job` WHERE DATE(modified_at) < '".$this->getDate()."' ";
$query = "DELETE FROM `job` WHERE DATE(modified_at) < '".$this->getCleanupFromDate()."' AND status <> 'Pending'";
$pdo = $this->getEntityManager()->getPDO();
$sth = $pdo->prepare($query);
@@ -64,14 +64,14 @@ class Cleanup extends \Espo\Core\Jobs\Base
$delSql = "DELETE FROM `scheduled_job_log_record`
WHERE scheduled_job_id = '".$id."'
AND DATE(created_at) < '".$this->getDate()."'
AND DATE(created_at) < '".$this->getCleanupFromDate()."'
AND id NOT IN ('".implode("', '", $lastRowIds)."')
";
$pdo->query($delSql);
}
}
protected function getDate($format = 'Y-m-d')
protected function getCleanupFromDate($format = 'Y-m-d')
{
$datetime = new \DateTime();
$datetime->modify($this->period);

View File

@@ -0,0 +1,59 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 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/.
************************************************************************/
namespace Espo\Modules\Crm\Acl;
use \Espo\Entities\User;
use \Espo\ORM\Entity;
class CampaignLogRecord extends \Espo\Core\Acl\Base
{
public function checkIsOwner(User $user, Entity $entity)
{
if ($entity->has('campaignId')) {
$campaignId = $entity->get('campaignId');
if (!$campaignId) return;
$campaign = $this->getEntityManager()->getEntity('Campaign', $campaignId);
if ($campaign && $this->getAclManager()->getImplementation('Campaign')->checkIsOwner($user, $campaign)) {
return true;
}
}
return;
}
public function checkInTeam(User $user, Entity $entity)
{
if ($entity->has('campaignId')) {
$campaignId = $entity->get('campaignId');
if (!$campaignId) return;
$campaign = $this->getEntityManager()->getEntity('Campaign', $campaignId);
if ($campaign && $this->getAclManager()->getImplementation('Campaign')->checkInTeam($user, $campaign)) {
return true;
}
}
return;
}
}

View File

@@ -0,0 +1,59 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 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/.
************************************************************************/
namespace Espo\Modules\Crm\Acl;
use \Espo\Entities\User;
use \Espo\ORM\Entity;
class CampaignTrackingUrl extends \Espo\Core\Acl\Base
{
public function checkIsOwner(User $user, Entity $entity)
{
if ($entity->has('campaignId')) {
$campaignId = $entity->get('campaignId');
if (!$campaignId) return;
$campaign = $this->getEntityManager()->getEntity('Campaign', $campaignId);
if ($campaign && $this->getAclManager()->getImplementation('Campaign')->checkIsOwner($user, $campaign)) {
return true;
}
}
return;
}
public function checkInTeam(User $user, Entity $entity)
{
if ($entity->has('campaignId')) {
$campaignId = $entity->get('campaignId');
if (!$campaignId) return;
$campaign = $this->getEntityManager()->getEntity('Campaign', $campaignId);
if ($campaign && $this->getAclManager()->getImplementation('Campaign')->checkInTeam($user, $campaign)) {
return true;
}
}
return;
}
}

View File

@@ -0,0 +1,59 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 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/.
************************************************************************/
namespace Espo\Modules\Crm\Acl;
use \Espo\Entities\User;
use \Espo\ORM\Entity;
class MassEmail extends \Espo\Core\Acl\Base
{
public function checkIsOwner(User $user, Entity $entity)
{
if ($entity->has('campaignId')) {
$campaignId = $entity->get('campaignId');
if (!$campaignId) return;
$campaign = $this->getEntityManager()->getEntity('Campaign', $campaignId);
if ($campaign && $this->getAclManager()->getImplementation('Campaign')->checkIsOwner($user, $campaign)) {
return true;
}
}
return;
}
public function checkInTeam(User $user, Entity $entity)
{
if ($entity->has('campaignId')) {
$campaignId = $entity->get('campaignId');
if (!$campaignId) return;
$campaign = $this->getEntityManager()->getEntity('Campaign', $campaignId);
if ($campaign && $this->getAclManager()->getImplementation('Campaign')->checkInTeam($user, $campaign)) {
return true;
}
}
return;
}
}

View File

@@ -28,7 +28,6 @@ use \Espo\Core\Exceptions\Error,
class Activities extends \Espo\Core\Controllers\Base
{
public static $defaultAction = 'index';
public function actionListCalendarEvents($params, $data, $request)
{
@@ -43,9 +42,32 @@ class Activities extends \Espo\Core\Controllers\Base
throw new BadRequest();
}
$service = $this->getService('Activities');
return $service->getEvents($this->getUser()->id, $from, $to);
$userId = $request->get('userId');
if (!$userId) {
$userId = $this->getUser()->id;
}
return $service->getEvents($userId, $from, $to);
}
public function actionListUpcoming($params, $data, $request)
{
$service = $this->getService('Activities');
$userId = $request->get('userId');
if (!$userId) {
$userId = $this->getUser()->id;
}
$offset = intval($request->get('offset'));
$maxSize = intval($request->get('maxSize'));
return $service->getUpcomingActivities($userId, array(
'offset' => $offset,
'maxSize' => $maxSize
));
}
public function actionPopupNotifications()

View File

@@ -0,0 +1,28 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 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/.
************************************************************************/
namespace Espo\Modules\Crm\Controllers;
class CampaignLogRecord extends \Espo\Core\Controllers\Record
{
}

View File

@@ -0,0 +1,28 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 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/.
************************************************************************/
namespace Espo\Modules\Crm\Controllers;
class CampaignTrackingUrl extends \Espo\Core\Controllers\Record
{
}

View File

@@ -0,0 +1,33 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 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/.
************************************************************************/
namespace Espo\Modules\Crm\Controllers;
class EmailQueueItem extends \Espo\Core\Controllers\Record
{
protected function checkControllerAccess()
{
if (!$this->getUser()->isAdmin()) {
throw new Forbidden();
}
}
}

View File

@@ -18,7 +18,7 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
************************************************************************/
************************************************************************/
namespace Espo\Modules\Crm\Controllers;
@@ -27,16 +27,19 @@ use \Espo\Core\Exceptions\BadRequest;
class Lead extends \Espo\Core\Controllers\Record
{
public function actionConvert($params, $data)
{
public function actionConvert($params, $data, $request)
{
if (empty($data['id'])) {
throw new BadRequest();
}
if (!$request->isPost()) {
throw new BadRequest();
}
$entity = $this->getRecordService()->convert($data['id'], $data['records']);
if (!empty($entity)) {
return $entity->toArray();
}
throw new Error();
throw new Error();
}
}

View File

@@ -0,0 +1,64 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 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/.
************************************************************************/
namespace Espo\Modules\Crm\Controllers;
use \Espo\Core\Exceptions\BadRequest;
use \Espo\Core\Exceptions\Forbidden;
use \Espo\Core\Exceptions\NotFound;
class MassEmail extends \Espo\Core\Controllers\Record
{
public function postActionSendTest($params, $data)
{
if (empty($data['id']) || empty($data['targetList']) || !is_array($data['targetList'])) {
throw new BadRequest();
}
$id = $data['id'];
$targetList = [];
foreach ($data['targetList'] as $item) {
if (empty($item->id) || empty($item->type)) continue;
$targetId = $item->id;
$targetType = $item->type;
$target = $this->getEntityManager()->getEntity($targetType, $targetId);
if (!$target) continue;
if (!$this->getAcl()->check($target, 'read')) {
continue;
}
$targetList[] = $target;
}
$massEmail = $this->getEntityManager()->getEntity('MassEmail', $id);
if (!$massEmail) {
throw new NotFound();
}
if (!$this->getAcl()->check($massEmail, 'read')) {
throw new Forbidden();
}
$this->getRecordService()->createQueue($massEmail, true, $targetList);
$this->getRecordService()->processSending($massEmail, true);
return true;
}
}

View File

@@ -45,4 +45,18 @@ class TargetList extends \Espo\Core\Controllers\Record
return $this->getRecordService()->unlinkAll($data['id'], $data['link']);
}
public function postActionCancelOptOut($params, $data)
{
if (empty($data['id'])) {
throw new BadRequest();
}
if (empty($data['targetType'])) {
throw new BadRequest();
}
if (empty($data['targetId'])) {
throw new BadRequest();
}
return $this->getRecordService()->cancelOptOut($data['id'], $data['targetType'], $data['targetId']);
}
}

View File

@@ -0,0 +1,36 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 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/.
************************************************************************/
namespace Espo\Modules\Crm\Entities;
class CampaignTrackingUrl extends \Espo\Core\ORM\Entity
{
protected function _getUrlToUse()
{
return '{trackingUrl:' . $this->id . '}';
}
protected function _hasUrlToUse()
{
return !$this->isNew();
}
}

View File

@@ -0,0 +1,28 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 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/.
************************************************************************/
namespace Espo\Modules\Crm\Entities;
class EmailQueueItem extends \Espo\Core\ORM\Entity
{
}

View File

@@ -0,0 +1,28 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 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/.
************************************************************************/
namespace Espo\Modules\Crm\Entities;
class MassEmail extends \Espo\Core\ORM\Entity
{
}

View File

@@ -0,0 +1,79 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 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/.phpppph
************************************************************************/
namespace Espo\Modules\Crm\EntryPoints;
use \Espo\Core\Utils\Util;
use \Espo\Core\Exceptions\NotFound;
use \Espo\Core\Exceptions\Forbidden;
use \Espo\Core\Exceptions\BadRequest;
use \Espo\Core\Exceptions\Error;
class CampaignTrackOpened extends \Espo\Core\EntryPoints\Base
{
public static $authRequired = false;
public function run()
{
if (empty($_GET['id'])) {
throw new BadRequest();
}
$queueItemId = $_GET['id'];
$queueItem = $this->getEntityManager()->getEntity('EmailQueueItem', $queueItemId);
if (!$queueItem) {
throw new NotFound();
}
$target = null;
$campaign = null;
$targetType = $queueItem->get('targetType');
$targetId = $queueItem->get('targetId');
if ($targetType && $targetId) {
$target = $this->getEntityManager()->getEntity($targetType, $targetId);
}
$massEmailId = $queueItem->get('massEmailId');
if (!$massEmailId) return;
$massEmail = $this->getEntityManager()->getEntity('MassEmail', $massEmailId);
if (!$massEmail) return;
$campaignId = $massEmail->get('campaignId');
if (!$campaignId) return;
$campaign = $this->getEntityManager()->getEntity('Campaign', $campaignId);
if (!$campaign) return;
if (!$target) {
return;
}
$campaignService = $this->getServiceFactory()->create('Campaign');
$campaignService->logOpened($campaignId, $queueItemId, $target);
}
}

View File

@@ -0,0 +1,76 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 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/.phpppph
************************************************************************/
namespace Espo\Modules\Crm\EntryPoints;
use \Espo\Core\Utils\Util;
use \Espo\Core\Exceptions\NotFound;
use \Espo\Core\Exceptions\Forbidden;
use \Espo\Core\Exceptions\BadRequest;
use \Espo\Core\Exceptions\Error;
class CampaignUrl extends \Espo\Core\EntryPoints\Base
{
public static $authRequired = false;
public function run()
{
if (empty($_GET['id']) || empty($_GET['queueItemId'])) {
throw new BadRequest();
}
$queueItemId = $_GET['queueItemId'];
$trackingUrlId = $_GET['id'];
$queueItem = $this->getEntityManager()->getEntity('EmailQueueItem', $queueItemId);
$trackingUrl = $this->getEntityManager()->getEntity('CampaignTrackingUrl', $trackingUrlId);
if (!$queueItem || !$trackingUrl) {
throw new NotFound();
}
$target = null;
$campaign = null;
$targetType = $queueItem->get('targetType');
$targetId = $queueItem->get('targetId');
if ($targetType && $targetId) {
$target = $this->getEntityManager()->getEntity($targetType, $targetId);
}
$campaignId = $trackingUrl->get('campaignId');
if ($campaignId) {
$campaign = $this->getEntityManager()->getEntity('Campaign', $campaignId);
}
if ($campaign && $target) {
$campaignService = $this->getServiceFactory()->create('Campaign');
$campaignService->logClicked($campaignId, $queueItemId, $target, $trackingUrl);
}
ob_clean();
header('Location: ' . $trackingUrl->get('url') . '');
die;
}
}

View File

@@ -0,0 +1,101 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 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/.phpppph
************************************************************************/
namespace Espo\Modules\Crm\EntryPoints;
use \Espo\Core\Utils\Util;
use \Espo\Core\Exceptions\NotFound;
use \Espo\Core\Exceptions\Forbidden;
use \Espo\Core\Exceptions\BadRequest;
use \Espo\Core\Exceptions\Error;
class Unsubscribe extends \Espo\Core\EntryPoints\Base
{
public static $authRequired = false;
public function run()
{
if (empty($_GET['id'])) {
throw new BadRequest();
}
$queueItemId = $_GET['id'];
$queueItem = $this->getEntityManager()->getEntity('EmailQueueItem', $queueItemId);
if (!$queueItem) {
throw new NotFound();
}
$campaign = null;
$target = null;
$massEmailId = $queueItem->get('massEmailId');
if ($massEmailId) {
$massEmail = $this->getEntityManager()->getEntity('MassEmail', $massEmailId);
if ($massEmail) {
$campaignId = $massEmail->get('campaignId');
if ($campaignId) {
$campaign = $this->getEntityManager()->getEntity('Campaign', $campaignId);
}
$targetType = $queueItem->get('targetType');
$targetId = $queueItem->get('targetId');
if ($targetType && $targetId) {
$target = $this->getEntityManager()->getEntity($targetType, $targetId);
$link = null;
$m = array(
'Account' => 'accounts',
'Contact' => 'contacts',
'Lead' => 'leads',
'User' => 'users'
);
if (!empty($m[$target->getEntityType()])) {
$link = $m[$target->getEntityType()];
}
if ($link) {
if ($campaign) {
$targetListList = $campaign->get('targetLists');
} else {
$targetListList = $massEmail->get('targetLists');
}
foreach ($targetListList as $targetList) {
$this->getEntityManager()->getRepository('TargetList')->updateRelation($targetList, $link, $target->id, array(
'optedOut' => true
));
}
echo $this->getLanguage()->translate('unsubscribed', 'messages', 'Campaign');
}
}
}
}
if ($campaign && $target) {
$campaignService = $this->getServiceFactory()->create('Campaign');
$campaignService->logOptedOut($campaignId, $queueItemId, $target, $queueItem->get('emailAddress'));
}
}
}

View File

@@ -34,7 +34,7 @@ class CheckEmailAccounts extends \Espo\Core\Jobs\Base
try {
$service->fetchFromMailServer($entity);
} catch (\Exception $e) {
$GLOBALS['log']->error('Job CheckEmailAccounts: [' . $e->getCode() . '] ' .$e->getMessage());
$GLOBALS['log']->error('Job CheckEmailAccounts '.$entity->id.': [' . $e->getCode() . '] ' .$e->getMessage());
}
}

View File

@@ -34,7 +34,7 @@ class CheckInboundEmails extends \Espo\Core\Jobs\Base
try {
$service->fetchFromMailServer($entity);
} catch (\Exception $e) {
$GLOBALS['log']->error('Job CheckInboundEmails: [' . $e->getCode() . '] ' .$e->getMessage());
$GLOBALS['log']->error('Job CheckInboundEmails '.$entity->id.': [' . $e->getCode() . '] ' .$e->getMessage());
}
}

View File

@@ -0,0 +1,59 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 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/.
************************************************************************/
namespace Espo\Modules\Crm\Jobs;
use \Espo\Core\Exceptions;
class ProcessMassEmail extends \Espo\Core\Jobs\Base
{
public function run()
{
$service = $this->getServiceFactory()->create('MassEmail');
$massEmailList = $this->getEntityManager()->getRepository('MassEmail')->where(array(
'status' => 'Pending',
'startAt<=' => date('Y-m-d H:i:s')
))->find();
foreach ($massEmailList as $massEmail) {
try {
$service->createQueue($massEmail);
} catch (\Exception $e) {
$GLOBALS['log']->error('Job ProcessMassEmail#createQueue '.$massEmail->id.': [' . $e->getCode() . '] ' .$e->getMessage());
}
}
$massEmailList = $this->getEntityManager()->getRepository('MassEmail')->where(array(
'status' => 'In Process'
))->find();
foreach ($massEmailList as $massEmail) {
try {
$service->processSending($massEmail);
} catch (\Exception $e) {
$GLOBALS['log']->error('Job ProcessMassEmail#processSending '.$massEmail->id.': [' . $e->getCode() . '] ' .$e->getMessage());
}
}
return true;
}
}

View File

@@ -0,0 +1,67 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 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/.
************************************************************************/
namespace Espo\Modules\Crm\Repositories;
use Espo\ORM\Entity;
class CaseObj extends \Espo\Core\ORM\Repositories\RDB
{
public function afterSave(Entity $entity, array $options)
{
$result = parent::afterSave($entity, $options);
$this->handleAfterSaveContacts($entity, $options);
return $result;
}
protected function handleAfterSaveContacts(Entity $entity, array $options)
{
$contactIdChanged = $entity->has('contactId') && $entity->get('contactId') != $entity->getFetched('contactId');
if ($contactIdChanged) {
$contactId = $entity->get('contactId');
if (empty($contactId)) {
$this->unrelate($entity, 'contacts', $entity->getFetched('contactId'));
return;
}
}
if ($contactIdChanged) {
$pdo = $this->getEntityManager()->getPDO();
$sql = "
SELECT id FROM case_contact
WHERE
contact_id = ".$pdo->quote($contactId)." AND
case_id = ".$pdo->quote($entity->id)." AND
deleted = 0
";
$sth = $pdo->prepare($sql);
$sth->execute();
if (!$sth->fetch()) {
$this->relate($entity, 'contacts', $contactId);
}
}
}
}

View File

@@ -43,7 +43,17 @@ class Contact extends \Espo\Core\ORM\Repositories\RDB
public function afterSave(Entity $entity, array $options)
{
$result = parent::afterSave($entity, $options);
$this->handleAfterSaveAccounts($entity, $options);
if ($entity->has('targetListId')) {
$this->relate($entity, 'targetLists', $entity->get('targetListId'));
}
return $result;
}
protected function handleAfterSaveAccounts(Entity $entity, array $options)
{
$accountIdChanged = $entity->has('accountId') && $entity->get('accountId') != $entity->getFetched('accountId');
$titleChanged = $entity->has('title') && $entity->get('title') != $entity->getFetched('title');
@@ -51,7 +61,7 @@ class Contact extends \Espo\Core\ORM\Repositories\RDB
$accountId = $entity->get('accountId');
if (empty($accountId)) {
$this->unrelate($entity, 'accounts', $entity->getFetched('accountId'));
return $result;
return;
}
}
@@ -59,7 +69,7 @@ class Contact extends \Espo\Core\ORM\Repositories\RDB
if (empty($accountId)) {
$accountId = $entity->getFetched('accountId');
if (empty($accountId)) {
return $result;
return;
}
}
}
@@ -91,12 +101,6 @@ class Contact extends \Espo\Core\ORM\Repositories\RDB
}
}
}
if ($entity->has('targetListId') && $entity->isNew()) {
$this->relate($entity, 'targetLists', $entity->get('targetListId'));
}
return $result;
}
}

View File

@@ -30,7 +30,7 @@ class Lead extends \Espo\Core\ORM\Repositories\RDB
{
parent::afterSave($entity, $options);
if ($entity->has('targetListId') && $entity->isNew()) {
if ($entity->has('targetListId')) {
$this->relate($entity, 'targetLists', $entity->get('targetListId'));
}
}

View File

@@ -56,11 +56,28 @@ class Meeting extends \Espo\Core\ORM\Repositories\RDB
$usersIds[] = $assignedUserId;
$entity->set('usersIds', $usersIds);
$hash = $entity->get('usersNames');
if ($hash instanceof \stdClass) {
if ($hash instanceof \StdClass) {
$hash->$assignedUserId = $entity->get('assignedUserName');
$entity->set('usersNames', $hash);
}
}
if ($entity->isNew()) {
$currentUserId = $this->getEntityManager()->getUser()->id;
if (in_array($currentUserId, $usersIds)) {
$usersColumns = $entity->get('usersColumns');
if (empty($usersColumns)) {
$usersColumns = new \StdClass();
}
if ($usersColumns instanceof \StdClass) {
if (!($usersColumns->$currentUserId instanceof \StdClass)) {
$usersColumns->$currentUserId = new \StdClass();
}
if (empty($usersColumns->$currentUserId->status)) {
$usersColumns->$currentUserId->status = 'Accepted';
}
}
}
}
}
}

View File

@@ -44,15 +44,18 @@
"Computer": "Informationstechnologie",
"Education": "Bildungswesen",
"Electronics": "Elektronik",
"Energy": "Energieerzeuger",
"Entertainment & Leisure": "Freizeit- und Unterhaltungsindustrie",
"Finance": "Finanzsektor",
"Food & Beverage": "Speisen und Getränke",
"Grocery": "Einzelhandel",
"Healthcare": "Gesundheitswesen",
"Insurance": "Versicherung",
"Legal": "Rechtswesen",
"Manufacturing": "Produktion",
"Publishing": "Medien",
"Real Estate": "Immobilien",
"Service": "Dienstleistung",
"Service": "Service",
"Sports": "Sport",
"Software": "Software",
"Technology": "Technologie",

View File

@@ -16,7 +16,8 @@
"softBouncedCount": "Soft Bounced",
"leadCreatedCount": "Erstellte Interessenten",
"revenue": "Umsatz",
"revenueConverted": "Umsatz (konvertiert)"
"revenueConverted": "Umsatz (konvertiert)",
"budget": "Budget"
},
"links": {
"targetLists": "Kontaktlisten",
@@ -24,7 +25,9 @@
"contacts": "Kontakte",
"leads": "Interessenten",
"opportunities": "Verkaufschancen",
"campaignLogRecords": "Protokoll"
"campaignLogRecords": "Protokoll",
"massEmails": "Massen E-Mails",
"trackingUrls": "Tracking URLs"
},
"options": {
"type": {
@@ -47,9 +50,13 @@
"Target Lists": "Kontaktlisten",
"Statistics": "Statistik",
"hard": "hart",
"soft": "weich"
"soft": "weich",
"Unsubscribe": "Abmelden"
},
"presetFilters": {
"active": "Aktiv"
},
"messages": {
"unsubscribed": "Sie wurden erfolgreich von unserem Verteiler entfernt"
}
}

View File

@@ -6,7 +6,8 @@
"campaign": "Kampagne",
"parent": "Zielkontakt",
"object": "Objekt",
"application": "Applikation"
"application": "Applikation",
"queueItem": "Warteschlangeneintrag"
},
"options": {
"action": {
@@ -20,5 +21,13 @@
},
"labels": {
"All": "Alle"
},
"presetFilters": {
"sent": "Gesendet",
"opened": "Geöffnet",
"optedOut": "Keine E-Mails",
"bounced": "Nicht zustellbar",
"clicked": "Geklickt",
"leadCreated": "Interessent erstellt"
}
}

View File

@@ -0,0 +1,13 @@
{
"fields": {
"url": "URL",
"urlToUse": "Code zu Einfügen anstelle einer URL",
"campaign": "Kampagne"
},
"links": {
"campaign": "Kampagne"
},
"labels": {
"Create CampaignTrackingUrl": "Tracking URL erstellen"
}
}

View File

@@ -5,11 +5,21 @@
"status": "Status",
"account": "Firma",
"contact": "Kontakt",
"contacts": "Kontakte",
"priority": "Priorität",
"type": "Typ",
"description": "Beschreibung"
"description": "Beschreibung",
"inboundEmail": "Eingehende E-Mails"
},
"links": {
"inboundEmail": "Eingehende E-Mails",
"account": "Firma",
"contact": "Kontakt (Primär)",
"Contacts": "Kontakte",
"meetings": "Meetings",
"calls": "Anrufe",
"tasks": "Aufgaben",
"emails": "E-Mails"
},
"options": {
"status": {
@@ -33,7 +43,11 @@
}
},
"labels": {
"Create Case": "Fall erstellen"
"Create Case": "Fall erstellen",
"Close": "Schließen",
"Reject": "Ablehnen",
"Closed": "Abgeschlossen",
"Rejected": "Abgelehnt"
},
"presetFilters": {
"open": "Offen",

View File

@@ -21,7 +21,10 @@
"cases": "Fälle",
"targetLists": "Kontaktlisten",
"campaignLogRecords": "Kampagnen Log",
"campaign": "Kampagne"
"campaign": "Kampagne",
"account": "Firma (Primär)",
"accounts": "Firmen",
"casesPrimary": "Fälle (Primär)"
},
"labels": {
"Create Contact": "Kontakt erstellen"

View File

@@ -0,0 +1,28 @@
{
"fields": {
"name": "Name",
"status": "Status",
"target": "Zielkontakt",
"sentAt": "Sendedatum",
"attemptCount": "Versuche",
"emailAddress": "E-Mail Adresse",
"massEmail": "Massen E-Mails",
"isTest": "Ist Test"
},
"links": {
"target": "Zielkontakt",
"massEmail": "Massen E-Mails"
},
"options": {
"status": {
"Pending": "Schwebend",
"Sent": "Gesendet",
"Failed": "Fehlgeschlagen"
}
},
"presetFilters": {
"pending": "Schwebend",
"sent": "Gesendet",
"failed": "Fehlgeschlagen"
}
}

View File

@@ -13,7 +13,10 @@
"Document": "Dokument",
"DocumentFolder": "Dokumente Ordner",
"Campaign": "Kampagne",
"TargetList": "Kontaktliste"
"TargetList": "Kontaktliste",
"MassEmail": "Massen E-Mails",
"EmailQueueItem": "E-Mail Warteschlangeneintrag",
"CampaignTrackingUrl": "Tracking URL"
},
"scopeNamesPlural": {
"Account": "Firmen",
@@ -29,7 +32,10 @@
"Document": "Dokumente",
"DocumentFolder": "Dokumente Ordner",
"Campaign": "Kampagnen",
"TargetList": "Kontaktlisten"
"TargetList": "Kontaktlisten",
"MassEmail": "Massen E-Mails",
"EmailQueueItem": "E-Mail Warteschlangeneinträge",
"CampaignTrackingUrl": "Tracking URLs"
},
"dashlets": {
"Leads": "Meine Interessenten",
@@ -42,7 +48,8 @@
"OpportunitiesByStage": "Verkaufschancen nach Verkaufsphase",
"OpportunitiesByLeadSource": "Verkaufschancen nach Quelle",
"SalesByMonth": "Umsätze nach Monat",
"SalesPipeline": "Verkaufspipeline"
"SalesPipeline": "Verkaufspipeline",
"Activities": "Meine Aktivitäten"
},
"labels": {
"Create InboundEmail": "Eingehende E-Mail erstellen",
@@ -56,7 +63,7 @@
"Log Call": "Anruf erfassen",
"Archive Email": "E-Mail archivieren",
"Create Task": "Neue Aufgabe",
"Tasks": "Aufgaben"
"Tasks": "Aufgaben"
},
"fields": {
"billingAddressCity": "Ort",
@@ -68,7 +75,7 @@
"addressStreet": "Straße",
"addressCountry": "Land",
"addressState": "Bundesland/Kanton",
"addressPostalCode": "PLZ",
"addressPostalCode": "PLZ",
"shippingAddressCity": "Ort (Lieferadresse)",
"shippingAddressStreet": "Straße (Lieferadresse)",
"shippingAddressCountry": "Land (Lieferadresse)",
@@ -78,7 +85,7 @@
"links": {
"contacts": "Kontakte",
"opportunities": "Verkaufschancen",
"leads": "Interessenten",
"leads": "Interessenten",
"meetings": "Meetings",
"calls": "Anrufe",
"tasks": "Aufgaben",
@@ -87,7 +94,7 @@
"cases": "Fälle",
"documents": "Dokumente",
"account": "Firma",
"opportunity": "Verkaufschance",
"opportunity": "Verkaufschance",
"contact": "Kontakt",
"parent": "Bezieht sich auf"
},

View File

@@ -28,7 +28,10 @@
"links": {
"targetLists": "Kontaktlisten",
"campaignLogRecords": "Kampagnen Log",
"campaign": "Kampagne"
"campaign": "Kampagne",
"createdAccount": "Firma",
"createdContact": "Kontakt",
"createdOpportunity": "Verkaufschance"
},
"options": {
"status": {

View File

@@ -0,0 +1,41 @@
{
"fields": {
"name": "Name",
"status": "Status",
"storeSentEmails": "Gesendete E-Mails speichern",
"startAt": "Startdatum",
"fromAddress": "Von Adresse",
"fromName": "Von Name",
"replyToAddress": "Antwort-an Adresse",
"replyToName": "Antwort-an Name",
"campaign": "Kampagne",
"emailTemplate": "E-Mail Vorlage",
"inboundEmail": "E-Mail Konto",
"targetLists": "Kontaktlisten"
},
"links": {
"targetLists": "Kontaktlisten",
"queueItems": "Warteschlangeneinträge",
"campaign": "Kampagne",
"emailTemplate": "E-Mail Vorlage",
"inboundEmail": "E-Mail Konto"
},
"options": {
"status": {
"Draft": "Entwurf",
"Pending": "Schwebend",
"In Process": "In Arbeit",
"Complete": "Fertig",
"Canceled": "Storniert",
"Failed": "Fehlgeschlagen"
}
},
"labels": {
"Create MassEmail": "Massen E-Mail erstellen",
"Send Test": "Test senden"
},
"messages": {
"selectAtLeastOneTarget": "Zumindest ein Ziel auswählen",
"testSent": "Test E-Mail(s) die gesendet werden sollen"
}
}

View File

@@ -38,6 +38,7 @@
},
"presetFilters": {
"open": "Offen",
"won": "Gewonnen"
"won": "Gewonnen",
"lost": "Lost"
}
}

View File

@@ -1,10 +1,7 @@
{
"options": {
"job": {
"CheckInboundEmails": "Eingehende E-Mail prüfen",
"CheckEmailAccounts": "Persönliche E-Mail Konten prüfen",
"SendEmailReminders": "E-Mail Erinnerungen senden"
"ProcessMassEmail": "Massen E-Mails senden"
}
}
}

View File

@@ -11,7 +11,8 @@
"accounts": "Firmen",
"contacts": "Kontakte",
"leads": "Interessenten",
"campaigns": "Kampagnen"
"campaigns": "Kampagnen",
"massEmails": "Massen E-Mails"
},
"options": {
"type": {
@@ -24,6 +25,7 @@
},
"labels": {
"Create TargetList": "Kontaktliste erstellen",
"Opted Out": "Keine E-Mails"
"Opted Out": "Keine E-Mails",
"Cancel Opt-Out": "Opt-Out zurücksetzen"
}
}

View File

@@ -44,12 +44,15 @@
"Computer": "Computer",
"Education": "Education",
"Electronics": "Electronics",
"Energy": "Energy",
"Entertainment & Leisure": "Entertainment & Leisure",
"Finance": "Finance",
"Food & Beverage": "Food & Beverage",
"Grocery": "Grocery",
"Healthcare": "Healthcare",
"Insurance": "Insurance",
"Legal": "Legal",
"Manufacturing": "Manufacturing",
"Publishing": "Publishing",
"Real Estate": "Real Estate",
"Service": "Service",

View File

@@ -16,7 +16,8 @@
"softBouncedCount": "Soft Bounced",
"leadCreatedCount": "Leads Created",
"revenue": "Revenue",
"revenueConverted": "revenue (converted)"
"revenueConverted": "revenue (converted)",
"budget": "Budget"
},
"links": {
"targetLists": "Target Lists",
@@ -24,7 +25,9 @@
"contacts": "Contacts",
"leads": "Leads",
"opportunities": "Opportunities",
"campaignLogRecords": "Log"
"campaignLogRecords": "Log",
"massEmails": "Mass Emails",
"trackingUrls": "Tracking URLs"
},
"options": {
"type": {
@@ -47,9 +50,13 @@
"Target Lists": "Target Lists",
"Statistics": "Statistics",
"hard": "hard",
"soft": "soft"
"soft": "soft",
"Unsubscribe": "Unsubscribe"
},
"presetFilters": {
"active": "Active"
},
"messages": {
"unsubscribed": "You have been unsubscribed from our mailing list."
}
}

View File

@@ -6,7 +6,8 @@
"campaign": "Campaign",
"parent": "Target",
"object": "Object",
"application": "Application"
"application": "Application",
"queueItem": "Queue Item"
},
"options": {
"action": {
@@ -20,5 +21,13 @@
},
"labels": {
"All": "All"
},
"presetFilters": {
"sent": "Sent",
"opened": "Opened",
"optedOut": "Opted Out",
"bounced": "Bounced",
"clicked": "Clicked",
"leadCreated": "Lead Created"
}
}

View File

@@ -0,0 +1,13 @@
{
"fields": {
"url": "URL",
"urlToUse": "Code to insert instead of URL",
"campaign": "Campaign"
},
"links": {
"campaign": "Campaign"
},
"labels": {
"Create CampaignTrackingUrl": "Create Tracking URL"
}
}

View File

@@ -5,11 +5,21 @@
"status": "Status",
"account": "Account",
"contact": "Contact",
"contacts": "Contacts",
"priority": "Priority",
"type": "Type",
"description": "Description"
"description": "Description",
"inboundEmail": "Inbound Email"
},
"links": {
"inboundEmail": "Inbound Email",
"account": "Account",
"contact": "Contact (Primary)",
"Contacts": "Contacts",
"meetings": "Meetings",
"calls": "Calls",
"tasks": "Tasks",
"emails": "Emails"
},
"options": {
"status": {
@@ -33,7 +43,11 @@
}
},
"labels": {
"Create Case": "Create Case"
"Create Case": "Create Case",
"Close": "Close",
"Reject": "Reject",
"Closed": "Closed",
"Rejected": "Rejected"
},
"presetFilters": {
"open": "Open",

View File

@@ -21,7 +21,10 @@
"cases": "Cases",
"targetLists": "Target Lists",
"campaignLogRecords": "Campaign Log",
"campaign": "Campaign"
"campaign": "Campaign",
"account": "Account (Primary)",
"accounts": "Accounts",
"casesPrimary": "Cases (Primary)"
},
"labels": {
"Create Contact": "Create Contact"

View File

@@ -0,0 +1,28 @@
{
"fields": {
"name": "Name",
"status": "Status",
"target": "Target",
"sentAt": "Date Sent",
"attemptCount": "Attempts",
"emailAddress": "Email Address",
"massEmail": "Mass Email",
"isTest": "Is Test"
},
"links": {
"target": "Target",
"massEmail": "Mass Email"
},
"options": {
"status": {
"Pending": "Pending",
"Sent": "Sent",
"Failed": "Failed"
}
},
"presetFilters": {
"pending": "Pending",
"sent": "Sent",
"failed": "Failed"
}
}

Some files were not shown because too many files have changed in this diff Show More