Compare commits

...

223 Commits

Author SHA1 Message Date
yuri 1049ec56eb change version 2015-01-16 17:04:31 +02:00
yuri 734936b605 fix moment 2015-01-16 13:21:18 +02:00
yuri 67e1a088ff Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2015-01-16 11:06:31 +02:00
yuri af623631d1 change gitignore 2015-01-16 11:06:16 +02:00
Taras Machyshyn 8035bc424e added 2015 to the license 2015-01-15 15:36:20 +02:00
Taras Machyshyn 7e99cd94b3 changed link title 2015-01-15 12:22:47 +02:00
Taras Machyshyn a88218aceb added 'desabled' option for popupNotifications 2015-01-15 12:04:28 +02:00
yuri e5fd4dac4d update fullcalendar and moment 2015-01-15 10:59:06 +02:00
yuri 26d407bd68 Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2015-01-15 10:31:25 +02:00
yuri 80ad96cce6 Merge branch 'hotfix/2.8.2' 2015-01-15 10:31:09 +02:00
yuri 1d85ac3428 fix customLabel 2015-01-14 15:34:37 +02:00
yuri ca5dfd851d customLabels for list 2015-01-14 15:12:37 +02:00
Taras Machyshyn 8c76b88b8d improved notifications 2015-01-14 15:02:45 +02:00
yuri ff5616c399 fix field manager 2015-01-14 14:36:09 +02:00
yuri 2027b5aca9 method name change in app.js 2015-01-14 10:58:04 +02:00
yuri a43e401ce7 fix nl_NL 2015-01-14 09:42:04 +02:00
yuri 396e2c176c fix lang 2015-01-14 09:41:18 +02:00
Taras Machyshyn 4ab40990f5 fixed a test 2015-01-13 16:23:40 +02:00
Taras Machyshyn 35e325d8d0 improving metadata caching 2015-01-13 16:17:59 +02:00
Taras Machyshyn b947d667d6 added 'module.json' - options for modules 2015-01-13 13:48:01 +02:00
yuri b4ab83d2d8 Merge branch 'hotfix/2.8.2' of ssh://172.20.0.1/var/git/espo/backend into hotfix/2.8.2 2015-01-13 10:43:19 +02:00
yuri 74adfb8b3e update nl_NL 2015-01-13 10:43:01 +02:00
Taras Machyshyn 63bea467c3 Merge branch 'hotfix/2.8.2' 2015-01-12 16:53:19 +02:00
Taras Machyshyn cf449bba31 Merge branch 'hotfix/2.8.2' of ssh://172.20.0.1/var/git/espo/backend into hotfix/2.8.2 2015-01-12 15:18:25 +02:00
Taras Machyshyn d247557fa9 Improving pt_BR translation by Bruno Franca 2015-01-12 15:18:01 +02:00
Taras Machyshyn bcd1c9618d fixed error message with permission denied 2015-01-12 15:15:11 +02:00
yuri cb1c87155f Merge branch 'hotfix/2.8.2' 2015-01-12 12:13:32 +02:00
yuri 0b757b94a4 Merge branch 'hotfix/2.8.2' of ssh://172.20.0.1/var/git/espo/backend into hotfix/2.8.2 2015-01-12 12:13:07 +02:00
yuri 4ffcca7978 sanitize 2015-01-12 12:12:47 +02:00
Taras Machyshyn aac68b9624 Fix error when 'data' directory is not writable 2015-01-12 11:21:44 +02:00
yuri 4b0aeea778 Merge branch 'hotfix/2.8.2' 2015-01-12 11:17:58 +02:00
yuri 1b9522f89c Merge branch 'hotfix/2.8.2' of ssh://172.20.0.1/var/git/espo/backend into hotfix/2.8.2 2015-01-12 11:17:34 +02:00
yuri 391f77d6f8 navbar fix 2015-01-12 11:17:17 +02:00
Taras Machyshyn feb8a300d9 remove test code 2015-01-09 17:43:28 +02:00
Taras Machyshyn e2e77d59f9 Merge branch 'hotfix/2.8.2' of ssh://172.20.0.1/var/git/espo/backend into hotfix/2.8.2 2015-01-09 17:39:01 +02:00
Taras Machyshyn 2cb2d2cc2d bug fixing in Util 2015-01-09 17:38:39 +02:00
Taras Machyshyn d62c83d869 'Language' saving improvements 2015-01-09 17:25:43 +02:00
Taras Machyshyn 0639ab8424 Json helper improvements 2015-01-09 17:16:41 +02:00
yuri 9bdc19d3c2 fix mentions 2015-01-09 11:54:27 +02:00
yuri 6e26c093fa remove trailing spaces 2015-01-09 11:42:35 +02:00
yuri ca40c99ac2 improve relationship panels 2015-01-09 11:37:03 +02:00
yuri 6e1cef3d2f Merge branch 'hotfix/2.8.2' 2015-01-09 11:12:48 +02:00
yuri cc6f89366a Import: utf8 message 2015-01-09 11:08:12 +02:00
yuri d0e486a97c Merge branch 'hotfix/2.8.2' of ssh://172.20.0.1/var/git/espo/backend into hotfix/2.8.2 2015-01-09 10:58:45 +02:00
yuri 9c3db209d8 fix export 2015-01-09 10:58:18 +02:00
yuri 3ff6b93ccb Calendar: slotDuration changes 2015-01-08 15:09:12 +02:00
yuri 2bfc86323d remove spaces 2015-01-08 14:57:50 +02:00
Taras Machyshyn ed1a58cd1f cache optimization 2015-01-08 13:10:41 +02:00
Yuri Kuznetsov 3f89bd23af Merge pull request #32 from alasdaircr/ArrayFilters
Allow filtering array field types. fixes #17
2015-01-08 12:18:36 +02:00
Taras Machyshyn e2fa620a81 bug fixes for HookManager 2015-01-08 11:34:41 +02:00
Alasdair Campbell 05b3645321 Allow filtering array field types. fixes #17 2015-01-06 23:46:15 +00:00
yuri 0e71e145bd Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2015-01-06 13:21:45 +02:00
yuri f13baad163 fix integration data 2015-01-06 13:20:24 +02:00
Taras Machyshyn 2d60fa1edc added custom loaders in metadata 'app' 2015-01-05 17:43:18 +02:00
Taras Machyshyn 2653873ff6 removed support custom loaders 2015-01-05 17:31:01 +02:00
Taras Machyshyn d849cf1115 Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2015-01-05 17:23:07 +02:00
Taras Machyshyn 28fcdca977 added custom loaders in metadata 'app' 2015-01-05 17:22:56 +02:00
yuri 3f620ae742 fix navbar resize 2015-01-05 17:14:21 +02:00
yuri 0af8dde821 quick create small fix 2015-01-05 16:41:10 +02:00
yuri 522931c64d meeting/call account field readOnly 2015-01-05 16:23:25 +02:00
yuri 265373bdcb change version 2014-12-30 11:56:16 +02:00
yuri 0dbd649bff Merge remote-tracking branch 'origin/hotfix/2.8.1' into hotfix/2.8.1 2014-12-30 11:55:21 +02:00
yuri 8fa4012267 merge origin 2014-12-30 11:54:37 +02:00
yuri 477a57571b fix preferences smtp password 2014-12-30 11:53:35 +02:00
yuri 1de853ab95 fix test send 2014-12-30 11:48:37 +02:00
yuri 4567d0de78 fix smtp password 2014-12-30 11:29:11 +02:00
Taras Machyshyn b2cc82d7e1 ru_RU translation correction 2014-12-30 11:28:39 +02:00
Taras Machyshyn d3710cd8c0 fix translation 2014-12-29 17:24:19 +02:00
Taras Machyshyn 2a4a9cbaa7 Improved russian traslation 2014-12-29 17:23:58 +02:00
yuri e27d02e782 fix email and phone fields 2014-12-29 16:18:23 +02:00
yuri ea1b7502bb remove $person static prop from Person entity 2014-12-25 16:54:43 +02:00
yuri 69c173bc6c change avatar color 2014-12-25 11:55:42 +02:00
yuri 944fa45e76 change identicon colors 2014-12-25 11:39:45 +02:00
yuri eb2413085c cleanup 2014-12-25 11:32:15 +02:00
yuri 04ecebbfef remove color from identicons 2014-12-24 12:24:57 +02:00
yuri 585ae2a58f fix navbar issue 2014-12-24 12:03:52 +02:00
yuri 9aae12f9ae dont display avatars in activities panels 2014-12-24 11:08:04 +02:00
yuri 73c6cabaa7 fix model:populateFromDefaults 2014-12-23 17:22:49 +02:00
yuri 247075e168 Merge remote-tracking branch 'origin/hotfix/2.8.1' into hotfix/2.8.1 2014-12-23 15:40:01 +02:00
yuri 6791733761 merge origin 2014-12-23 15:39:10 +02:00
yuri f6003088d8 identicons colors 2014-12-23 15:38:19 +02:00
Taras Machyshyn 95f93351ea Integration: fixed array type 2014-12-23 11:56:20 +02:00
yuri b5bd7d043b clearnup 2014-12-22 17:38:32 +02:00
yuri 8095665835 fix dashboard preferences patch 2014-12-22 17:37:48 +02:00
yuri dd3f9d5ff8 fix calendar dashlet 2014-12-22 17:21:52 +02:00
yuri 7c39df74bc fix calendar for mobile 2014-12-22 17:14:49 +02:00
Yuri Kuznetsov 0a1497e3e8 calendar resizr 2014-12-18 16:30:31 +02:00
Yuri Kuznetsov 25b81357c7 de_DE 2014-12-17 11:42:32 +02:00
Yuri Kuznetsov f7f380ff04 Merge remote-tracking branch 'origin/master' 2014-12-17 10:36:20 +02:00
Yuri Kuznetsov a09d99fe53 fix date field 2014-12-17 10:35:20 +02:00
Taras Machyshyn bdd6538984 exclude custom Loaders from .gitignore 2014-12-16 12:34:45 +02:00
Yuri Kuznetsov 2787d3bc72 cleanup 2014-12-15 18:15:58 +02:00
Yuri Kuznetsov 72e53d096f replace tabs 2014-12-15 18:15:35 +02:00
Yuri Kuznetsov acd48513f7 po.js and lang.js 2014-12-15 16:55:42 +02:00
Yuri Kuznetsov 6ffa5654ea fix calendar 2014-12-15 15:38:02 +02:00
Yuri Kuznetsov b2dfdb3446 fix cache 2014-12-15 12:29:41 +02:00
Yuri Kuznetsov dc5934a0ad change reminder interval 2014-12-15 11:41:11 +02:00
Yuri Kuznetsov ec586874a6 change version 2014-12-15 11:39:32 +02:00
Yuri Kuznetsov eb99d643b1 remove outline css 2014-12-12 16:37:56 +02:00
Yuri Kuznetsov f6b37f346f search button 2014-12-12 15:38:11 +02:00
Yuri Kuznetsov 180b31f6fa less changes 2014-12-10 17:11:12 +02:00
Yuri Kuznetsov b16de8591e cleanup 2014-12-10 16:17:35 +02:00
Yuri Kuznetsov f87f418c1b globar search refactor 2014-12-10 16:04:05 +02:00
Yuri Kuznetsov f79fd38478 sendEmailReminders record 2014-12-10 14:59:45 +02:00
Yuri Kuznetsov 2e13f73b34 email reminder 2014-12-10 13:14:26 +02:00
Yuri Kuznetsov 300f442b22 invitation email changes 2014-12-10 11:52:55 +02:00
Yuri Kuznetsov 0f1c31e55a some changes in lang 2014-12-09 18:11:05 +02:00
Yuri Kuznetsov 86633b31d3 change css 2014-12-09 17:20:04 +02:00
Yuri Kuznetsov f60aa78dde popup norifications dev 2014-12-09 17:18:27 +02:00
Yuri Kuznetsov ae77cb1d77 reminder css fix 2014-12-09 15:22:35 +02:00
Yuri Kuznetsov 74d99d8cda upgrade bootstrap 2014-12-09 15:13:20 +02:00
Yuri Kuznetsov a90e0874bd reminders dev 2014-12-09 13:09:11 +02:00
Yuri Kuznetsov 141d20b472 reminders 2 2014-12-08 17:44:25 +02:00
Yuri Kuznetsov 6f08ecc1a7 reminders 1 2014-12-08 15:51:02 +02:00
Yuri Kuznetsov 3e4d6edac8 popup notifications 2 2014-12-05 18:12:18 +02:00
Yuri Kuznetsov 19784fc09c popup notifications 1 2014-12-05 17:46:19 +02:00
Yuri Kuznetsov 554f8cc37c big fix in repository 2014-12-04 17:07:45 +02:00
Yuri Kuznetsov c6153f6af3 calendar fixes 2014-12-04 15:33:54 +02:00
Yuri Kuznetsov 048f5318fc fix calendar 2014-12-04 13:22:14 +02:00
Yuri Kuznetsov 62985c9776 calendar fixes 2014-12-03 18:32:22 +02:00
Yuri Kuznetsov 9b30c02c22 improve export 2014-12-03 16:37:10 +02:00
Yuri Kuznetsov 122f18e8bf remove duration field from mass update 2014-12-03 16:13:46 +02:00
Yuri Kuznetsov 9d316da4e0 fix meeting/call attendees 2014-12-03 15:50:00 +02:00
Yuri Kuznetsov 46439ff394 Merge branch 'hotfix/2.7.3' 2014-12-03 12:25:59 +02:00
Yuri Kuznetsov f73a60ad9f merge hotfix/2.7.3 2014-12-03 12:04:54 +02:00
Yuri Kuznetsov c05a153719 cleanup 2014-12-03 12:04:01 +02:00
Yuri Kuznetsov 094f39e987 fix settings array fields 2014-12-03 12:03:17 +02:00
Yuri Kuznetsov c247def1bc stream changes 2014-12-03 11:20:12 +02:00
Yuri Kuznetsov c7cd372554 clearnup 2014-12-03 11:06:59 +02:00
Yuri Kuznetsov ea951a8738 changes in list and stream list 2014-12-03 11:01:09 +02:00
Yuri Kuznetsov d9973bf353 cleanup 2014-12-03 10:31:51 +02:00
Yuri Kuznetsov 0baaf82909 added disable avatars param 2014-12-03 10:07:30 +02:00
Yuri Kuznetsov e62cb881c9 Merge branch 'hotfix/2.7.3' 2014-12-03 09:57:05 +02:00
Yuri Kuznetsov a965f6037f fix array field sortable 2014-12-03 09:55:50 +02:00
Yuri Kuznetsov d6251f995c stream tab 2014-12-03 09:49:51 +02:00
Yuri Kuznetsov 483c971e3e stream centered 2014-12-02 17:47:28 +02:00
Yuri Kuznetsov 3186dcc65f stream and dashlet scopes 2014-12-02 17:33:22 +02:00
Yuri Kuznetsov e7aeebee8d Merge remote-tracking branch 'origin/master' 2014-12-02 16:32:21 +02:00
Taras Machyshyn 14c3287131 changed indexes name 2014-12-02 16:32:00 +02:00
Yuri Kuznetsov 4754b2db2f Merge remote-tracking branch 'origin/master' 2014-12-02 16:13:22 +02:00
Yuri Kuznetsov 8fa0fae265 add indexes 2014-12-02 16:13:00 +02:00
Taras Machyshyn dc4c4bd084 Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2014-12-02 16:12:17 +02:00
Taras Machyshyn 6a5239cedc added camel case for indexes 2014-12-02 16:12:03 +02:00
Taras Machyshyn 9ea9429757 camel case convertation improvements 2014-12-02 16:11:22 +02:00
Yuri Kuznetsov 20f89cf75a layout manager fix 2014-12-02 15:35:30 +02:00
Yuri Kuznetsov e8acf8aaaf layout manager fixes 2014-12-02 15:05:21 +02:00
Yuri Kuznetsov 0fac47e227 Merge remote-tracking branch 'origin/master' 2014-12-02 13:20:08 +02:00
Yuri Kuznetsov fe3cc09623 orm refactor 2014-12-02 13:19:45 +02:00
Taras Machyshyn 91445f2f9c indexes improvements 2014-12-02 12:25:38 +02:00
Yuri Kuznetsov 053d516bc9 user avatars in user list view 2014-12-02 11:21:01 +02:00
Yuri Kuznetsov 63a9f67bd9 fix avatar 2014-12-01 16:58:09 +02:00
Yuri Kuznetsov 344f0227e9 Merge branch 'hotfix/2.7.2' 2014-12-01 14:22:04 +02:00
Yuri Kuznetsov 16384b9f72 Merge remote-tracking branch 'origin/master' 2014-11-28 18:14:25 +02:00
Yuri Kuznetsov db9d8e1006 fix css 2014-11-28 18:14:05 +02:00
Taras Machyshyn c7dd503d80 Integration Entity minor fixes 2014-11-28 17:49:30 +02:00
Taras Machyshyn c96265e2a9 Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2014-11-28 17:27:20 +02:00
Taras Machyshyn ff35f7b1ff Integration entity fixes 2014-11-28 17:27:02 +02:00
Yuri Kuznetsov ac1748067b fix crypt 2014-11-28 16:34:20 +02:00
Yuri Kuznetsov a4de09ea36 clenup 2014-11-28 14:22:15 +02:00
Yuri Kuznetsov 0816831fe1 preview attachments in email 2014-11-28 12:57:12 +02:00
Yuri Kuznetsov 0e83325e92 Merge branch 'hotfix/2.7.1' 2014-11-28 10:49:29 +02:00
Yuri Kuznetsov 261e52e64d Merge branch 'hotfix/2.7.1' 2014-11-27 17:22:47 +02:00
Yuri Kuznetsov f1a990e80a fix email sender 2014-11-27 17:14:14 +02:00
Yuri Kuznetsov a3a8110ae6 email archive: accountId from contact 2014-11-27 14:44:12 +02:00
Yuri Kuznetsov 82a213555b cleanup 2014-11-27 14:12:02 +02:00
Yuri Kuznetsov 3590ff2e33 Merge remote-tracking branch 'origin/master' 2014-11-27 14:07:47 +02:00
Yuri Kuznetsov 775cfec744 remove comment 2014-11-27 14:07:22 +02:00
Yuri Kuznetsov 9ca1d6608c archive relate by message id 2014-11-27 12:46:57 +02:00
Yuri Kuznetsov 59140b0814 fix side 2014-11-27 11:14:14 +02:00
Yuri Kuznetsov 90cf300334 cleanup 2014-11-27 11:01:11 +02:00
Taras Machyshyn 7bd3c7cb0d Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2014-11-27 10:27:09 +02:00
Taras Machyshyn ce75cc90f5 added possibility to define 'view' for intergations 2014-11-27 10:26:52 +02:00
Yuri Kuznetsov 00a911434b change user list layout 2014-11-26 17:44:09 +02:00
Yuri Kuznetsov 69840086c9 Merge branch 'hotfix/2.7.1' 2014-11-26 16:48:12 +02:00
Yuri Kuznetsov b72f6fa2cc manual merge with hotfix/2.7.1 2014-11-26 16:45:26 +02:00
Yuri Kuznetsov 9f9d0cb2dc cleanup 2014-11-26 16:43:11 +02:00
Yuri Kuznetsov 6a036595d6 dont notify about mention to current user 2014-11-26 16:29:47 +02:00
Yuri Kuznetsov f4c57046dd cleanup 2014-11-26 15:47:58 +02:00
Yuri Kuznetsov 7b507f1bab edit note is wide 2014-11-26 15:35:05 +02:00
Yuri Kuznetsov c0b8c5e7d2 change avatar size 2014-11-26 15:25:49 +02:00
Yuri Kuznetsov 6e49afddf0 Merge branch 'hotfix/2.7.1' 2014-11-26 14:54:50 +02:00
Yuri Kuznetsov 4908f281a3 ability to disable avatars 2014-11-26 12:37:59 +02:00
Yuri Kuznetsov 796b51d620 avatar for side field 2014-11-26 12:17:58 +02:00
Yuri Kuznetsov 9cc44cf917 modal backdrop param 2014-11-26 11:16:47 +02:00
Yuri Kuznetsov 9f7eecac73 attachment block fix 2014-11-26 10:47:14 +02:00
Yuri Kuznetsov cba59fe847 EmailReceived Note: dont copy attachments 2014-11-26 10:17:36 +02:00
Yuri Kuznetsov 07df97ab9e ability to use entryPoint w/o build 2014-11-25 18:03:14 +02:00
Yuri Kuznetsov 0a1322843f Fix conflicts on merge with hotfix/2.7.1 2014-11-25 17:48:38 +02:00
Yuri Kuznetsov 6c6a3621e8 avatar 2014-11-25 17:37:16 +02:00
Yuri Kuznetsov 4a075819d1 avatar 3 2014-11-25 17:37:16 +02:00
Yuri Kuznetsov 3aa3914f3a fix notices 2014-11-25 17:37:16 +02:00
Yuri Kuznetsov eef9c3e35c email sending fix 2014-11-25 17:37:16 +02:00
Taras Machyshyn fe61fadc09 fileManager improvements 2014-11-25 17:37:16 +02:00
Taras Machyshyn 4c931514a2 E_STRICT notice fixes 2014-11-25 17:37:16 +02:00
Taras Machyshyn 8ad886d871 addded autoload.json for Resources 2014-11-25 16:44:50 +02:00
Yuri Kuznetsov 93b8745599 Merge branch 'hotfix/2.7.1' 2014-11-21 18:19:39 +02:00
Yuri Kuznetsov fa25dc715f avatar 2 2014-11-21 17:00:30 +02:00
Yuri Kuznetsov c010cf43bf avatar 1 2014-11-21 16:19:47 +02:00
Yuri Kuznetsov 51bdd15c9e change password 3 2014-11-20 16:25:43 +02:00
Yuri Kuznetsov b48f10b45f load language on login form 2014-11-20 11:52:10 +02:00
Yuri Kuznetsov 027e928bd3 rename getController for app.js 2014-11-19 16:47:01 +02:00
Yuri Kuznetsov 3cfcfb02de changes in app.js 2014-11-19 16:42:20 +02:00
Yuri Kuznetsov 322df7ff68 Merge branch 'hotfix/2.7.1' 2014-11-19 16:05:45 +02:00
Yuri Kuznetsov d58b9cac40 change password 2 2014-11-19 16:03:33 +02:00
Yuri Kuznetsov cca6567bbd fix query 2014-11-19 16:03:33 +02:00
Yuri Kuznetsov 26eb194ccb small change 2014-11-19 16:03:33 +02:00
Yuri Kuznetsov 9b42ae41e7 change password 1 2014-11-19 16:03:33 +02:00
Yuri Kuznetsov 83916cacd9 cleanup 2014-11-19 16:03:33 +02:00
Yuri Kuznetsov 85b484c04e use jsonObject 2014-11-19 16:03:33 +02:00
Yuri Kuznetsov 0d302e99af clearnup 2014-11-19 16:03:33 +02:00
Taras Machyshyn ae4a6fa3d2 EmailTemplate minor improvements 2014-11-18 17:17:26 +02:00
Taras Machyshyn 8f64fdd025 Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2014-11-18 13:36:53 +02:00
Taras Machyshyn 5ee83505af metedata improvements 2014-11-18 13:36:37 +02:00
Yuri Kuznetsov 4527358a53 Merge remote-tracking branch 'origin/master' 2014-11-18 11:58:54 +02:00
Yuri Kuznetsov 51cca50828 some changes in select manager 2014-11-18 11:50:27 +02:00
Taras Machyshyn 8f1752575a Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2014-11-17 17:06:25 +02:00
Taras Machyshyn 29c39fb4fd use MyISAM engine for database 2014-11-17 17:06:04 +02:00
Yuri Kuznetsov 63663ccf6c Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2014-11-17 16:42:48 +02:00
Yuri Kuznetsov 1ba81c3350 Merge branch 'hotfix/2.7.1' 2014-11-17 16:37:15 +02:00
Taras Machyshyn f7879f425f added 'indexes' section in entityDefs 2014-11-17 13:11:09 +02:00
Yuri Kuznetsov 93ed5dce6b merge hotfix/2.7.1 2014-11-17 12:07:03 +02:00
Yuri Kuznetsov a08adcf6d5 change readme 2014-11-14 16:17:30 +02:00
Yuri Kuznetsov a7bad6aa58 added repository field to package.json 2014-11-14 16:00:07 +02:00
944 changed files with 11184 additions and 5018 deletions
+1 -1
View File
@@ -4,7 +4,6 @@
/data/preferences/*
/data/.backup/*
/data/config.php
/custom
/build
/node_modules
/client
@@ -14,3 +13,4 @@
/tests/testData/cache/*
composer.phar
vendor/
/custom/Espo/Custom/Resources/*
+69 -48
View File
@@ -1,49 +1,69 @@
/************************************************************************
* 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/.
************************************************************************/
module.exports = function (grunt) {
var jsFilesToMinify = [
'client/lib/jquery-2.0.2.min.js',
'client/lib/underscore-min.js',
'client/lib/backbone-min.js',
'client/lib/handlebars.js',
'client/lib/base64.js',
'client/lib/jquery-ui.min.js',
'client/lib/moment.min.js',
'client/lib/moment-timezone-with-data.min.js',
'client/lib/jquery.timepicker.min.js',
'client/lib/jquery.autocomplete.js',
'client/lib/bootstrap.min.js',
'client/lib/bootstrap-datepicker.js',
'client/lib/bull.min.js',
'client/src/namespace.js',
'client/src/exceptions.js',
'client/src/app.js',
'client/src/utils.js',
'client/src/storage.js',
'client/src/loader.js',
'client/src/pre-loader.js',
'client/src/ui.js',
'client/src/acl.js',
'client/src/model.js',
'client/src/model-offline.js',
'client/src/metadata.js',
'client/src/language.js',
'client/src/cache.js',
'client/src/controller.js',
'client/src/router.js',
'client/src/date-time.js',
'client/src/field-manager.js',
'client/src/search-manager.js',
'client/src/collection.js',
'client/src/multi-collection.js',
'client/src/view-helper.js',
'client/src/layout-manager.js',
'client/src/model-factory.js',
'client/src/collection-factory.js',
'client/src/models/settings.js',
'client/src/models/user.js',
'client/src/models/preferences.js',
'client/src/controllers/base.js',
'client/src/view.js',
'client/lib/jquery-2.0.2.min.js',
'client/lib/underscore-min.js',
'client/lib/backbone-min.js',
'client/lib/handlebars.js',
'client/lib/base64.js',
'client/lib/jquery-ui.min.js',
'client/lib/moment.min.js',
'client/lib/moment-timezone-with-data.min.js',
'client/lib/jquery.timepicker.min.js',
'client/lib/jquery.autocomplete.js',
'client/lib/bootstrap.min.js',
'client/lib/bootstrap-datepicker.js',
'client/lib/bull.min.js',
'client/src/namespace.js',
'client/src/exceptions.js',
'client/src/app.js',
'client/src/utils.js',
'client/src/storage.js',
'client/src/loader.js',
'client/src/pre-loader.js',
'client/src/ui.js',
'client/src/acl.js',
'client/src/model.js',
'client/src/model-offline.js',
'client/src/metadata.js',
'client/src/language.js',
'client/src/cache.js',
'client/src/controller.js',
'client/src/router.js',
'client/src/date-time.js',
'client/src/field-manager.js',
'client/src/search-manager.js',
'client/src/collection.js',
'client/src/multi-collection.js',
'client/src/view-helper.js',
'client/src/layout-manager.js',
'client/src/model-factory.js',
'client/src/collection-factory.js',
'client/src/models/settings.js',
'client/src/models/user.js',
'client/src/models/preferences.js',
'client/src/controllers/base.js',
'client/src/view.js',
];
grunt.initConfig({
@@ -106,6 +126,7 @@ module.exports = function (grunt) {
'modules/**',
'img/**',
'css/**',
'sounds/**'
],
dest: 'build/tmp/client',
},
@@ -119,7 +140,7 @@ module.exports = function (grunt) {
cwd: 'frontend/client/lib',
src: '**',
dest: 'build/tmp/client/lib/',
},
},
backend: {
expand: true,
dot: true,
@@ -152,7 +173,7 @@ module.exports = function (grunt) {
options: {
mode: '755'
},
php: {
php: {
options: {
mode: '644'
},
@@ -160,7 +181,7 @@ module.exports = function (grunt) {
'build/EspoCRM-<%= pkg.version %>/**/*.php',
'build/EspoCRM-<%= pkg.version %>/**/*.json',
'build/EspoCRM-<%= pkg.version %>/**/*.config',
'build/EspoCRM-<%= pkg.version %>/**/.htaccess',
'build/EspoCRM-<%= pkg.version %>/**/.htaccess',
'build/EspoCRM-<%= pkg.version %>/client/**/*.js',
'build/EspoCRM-<%= pkg.version %>/client/**/*.css',
'build/EspoCRM-<%= pkg.version %>/client/**/*.tpl',
@@ -230,7 +251,7 @@ module.exports = function (grunt) {
'clean:start',
'mkdir:tmp',
'less',
'cssmin',
'cssmin',
'uglify',
'copy:frontendFolders',
'copy:frontendHtml',
@@ -240,6 +261,6 @@ module.exports = function (grunt) {
'copy:final',
'chmod',
'clean:final',
]);
]);
};
+1 -1
View File
@@ -25,7 +25,7 @@ If your repository is accessible via a web server then you can run EspoCRM by ur
### How to build
You need to have nodejs installed.
You need to have nodejs and Grunt CLI installed.
1. Change to the project's root directory.
2. Install project dependencies with `npm install`.
+21 -1
View File
@@ -1,4 +1,24 @@
<?php
<?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/.
************************************************************************/
require_once('../../bootstrap.php');
+1 -1
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
+11 -8
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -27,24 +27,27 @@ use \Espo\Core\Exceptions\BadRequest;
class App extends \Espo\Core\Controllers\Record
{
public function actionUser()
{
{
$preferences = $this->getPreferences()->toArray();
unset($preferences['smtpPassword']);
return array(
'user' => $this->getUser()->toArray(),
'acl' => $this->getAcl()->toArray(),
'preferences' => $this->getPreferences()->toArray(),
'preferences' => $preferences,
'token' => $this->getUser()->get('token')
);
);
}
public function actionDestroyAuthToken($params, $data)
{
$token = $data['token'];
{
$token = $data['token'];
if (empty($token)) {
throw new BadRequest();
}
$auth = new \Espo\Core\Utils\Auth($this->getContainer());
return $auth->destroyAuthToken($token);
return $auth->destroyAuthToken($token);
}
}
+1 -1
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
+1 -1
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
+1 -1
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
+1 -1
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
+1 -1
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
+1 -1
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
+1 -1
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
+1 -1
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
+1 -1
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
+1 -1
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
+1 -1
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
+1 -1
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
+5 -1
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -57,6 +57,10 @@ class Settings extends \Espo\Core\Controllers\Base
throw new Forbidden();
}
if (isset($data['useCache']) && $data['useCache'] != $this->getConfig()->get('useCache')) {
$this->getContainer()->get('dataManager')->clearCache();
}
$this->getConfig()->setData($data, $this->getUser()->isAdmin());
$result = $this->getConfig()->save();
if ($result === false) {
+1 -1
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
+1 -1
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
+47 -4
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -25,11 +25,12 @@ namespace Espo\Controllers;
use \Espo\Core\Exceptions\Error;
use \Espo\Core\Exceptions\NotFound;
use \Espo\Core\Exceptions\Forbidden;
use \Espo\Core\Exceptions\BadRequest;
class User extends \Espo\Core\Controllers\Record
{
{
public function actionAcl($params, $data, $request)
{
{
$userId = $request->get('id');
if (empty($userId)) {
throw new Error();
@@ -46,12 +47,54 @@ class User extends \Espo\Core\Controllers\Record
$acl = new \Espo\Core\Acl($user, $this->getConfig(), $this->getContainer()->get('fileManager'), $this->getMetadata());
return $acl->toArray();
return $acl->toArray();
}
public function actionChangeOwnPassword($params, $data)
{
return $this->getService('User')->changePassword($this->getUser()->id, $data['password']);
}
public function actionChangePasswordByRequest($params, $data, $request)
{
if (!$request->isPost()) {
throw new Forbidden();
}
if (empty($data['requestId']) || empty($data['password'])) {
throw new BadRequest();
}
$p = $this->getEntityManager()->getRepository('PasswordChangeRequest')->where(array(
'requestId' => $data['requestId']
))->findOne();
if (!$p) {
throw new Forbidden();
}
$userId = $p->get('userId');
if (!$userId) {
throw new Error();
}
$this->getEntityManager()->removeEntity($p);
return $this->getService('User')->changePassword($userId, $data['password']);
}
public function actionPasswordChangeRequest($params, $data, $request)
{
if (!$request->isPost()) {
throw new Forbidden();
}
if (empty($data['userName']) || empty($data['emailAddress'])) {
throw new BadRequest();
}
$userName = $data['userName'];
$emailAddress = $data['emailAddress'];
return $this->getService('User')->passwordChangeRequest($userName, $emailAddress);
}
}
+3 -3
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -218,14 +218,14 @@ class Acl
$userRoles = $this->user->get('roles');
foreach ($userRoles as $role) {
$aclTables[] = json_decode($role->get('data'));
$aclTables[] = $role->get('data');
}
$teams = $this->user->get('teams');
foreach ($teams as $team) {
$teamRoles = $team->get('roles');
foreach ($teamRoles as $role) {
$aclTables[] = json_decode($role->get('data'));
$aclTables[] = $role->get('data');
}
}
+38 -3
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -43,6 +43,8 @@ class Application
date_default_timezone_set('UTC');
$GLOBALS['log'] = $this->container->get('log');
$this->initAutoloads();
}
public function getSlim()
@@ -88,6 +90,7 @@ class Application
$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('{{runScript}}', 'app.start();' , $html);
echo $html;
exit;
}
@@ -151,7 +154,11 @@ class Application
$container = $this->getContainer();
$slim = $this->getSlim();
$auth = $this->getAuth();
try {
$auth = $this->getAuth();
} catch (\Exception $e) {
$container->get('output')->processError($e->getMessage(), $e->getCode());
}
$apiAuth = new \Espo\Core\Utils\Api\Auth($auth);
$this->getSlim()->add($apiAuth);
@@ -215,7 +222,6 @@ class Application
});
}
protected function initRoutes()
{
$routes = new \Espo\Core\Utils\Route($this->getContainer()->get('config'), $this->getMetadata(), $this->getContainer()->get('fileManager'));
@@ -238,5 +244,34 @@ class Application
}
}
}
protected function initAutoloads()
{
$autoload = new \Espo\Core\Utils\Autoload($this->getContainer()->get('config'), $this->getMetadata(), $this->getContainer()->get('fileManager'));
try {
$autoloadList = $autoload->getAll();
} catch (\Exception $e) {} //bad permissions
if (empty($autoloadList)) {
return;
}
$namespacesPath = 'vendor/composer/autoload_namespaces.php';
$existingNamespaces = file_exists($namespacesPath) ? include($namespacesPath) : array();
if (!empty($existingNamespaces) && is_array($existingNamespaces)) {
$existingNamespaces = array_keys($existingNamespaces);
}
$classLoader = new \Composer\Autoload\ClassLoader();
foreach ($autoloadList as $prefix => $path) {
if (!in_array($prefix, $existingNamespaces)) {
$classLoader->add($prefix, $path);
}
}
$classLoader->register(true);
}
}
+13 -6
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -51,9 +51,16 @@ class Container
$obj = $this->$loadMethod();
$this->data[$name] = $obj;
} else {
$className = '\Espo\Custom\Core\Loaders\\'.ucfirst($name);
if (!class_exists($className)) {
$className = '\Espo\Core\Loaders\\'.ucfirst($name);
try {
$className = $this->get('metadata')->get('app.loaders.' . ucfirst($name));
} catch (\Exception $e) {}
if (!isset($className) || !class_exists($className)) {
$className = '\Espo\Custom\Core\Loaders\\'.ucfirst($name);
if (!class_exists($className)) {
$className = '\Espo\Core\Loaders\\'.ucfirst($name);
}
}
if (class_exists($className)) {
@@ -64,7 +71,7 @@ class Container
return null;
}
protected function getServiceClassName($name, $default)
{
$metadata = $this->get('metadata');
@@ -204,7 +211,7 @@ class Container
$this->get('preferences')
);
}
private function loadCrypt()
{
return new \Espo\Core\Utils\Crypt(
+1 -1
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
+1 -1
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
+1 -1
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
+1 -1
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
+1 -1
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
+1 -1
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
+1 -1
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
+5 -7
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -18,18 +18,16 @@
*
* 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\Entities;
class Person extends \Espo\Core\ORM\Entity
{
public static $person = true;
public function _setLastName($value)
{
$this->setValue('lastName', $value);
$firstName = $this->get('firstName');
if (empty($firstName)) {
$this->setValue('name', $value);
@@ -37,11 +35,11 @@ class Person extends \Espo\Core\ORM\Entity
$this->setValue('name', $firstName . ' ' . $value);
}
}
public function _setFirstName($value)
{
$this->setValue('firstName', $value);
$lastName = $this->get('lastName');
if (empty($lastName)) {
$this->setValue('name', $value);
+1 -1
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
+1 -1
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
+1 -1
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
+1 -1
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
+3 -3
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -83,10 +83,10 @@ class HookManager
foreach ($metadata->getModuleList() as $moduleName) {
$modulePath = str_replace('{*}', $moduleName, $this->paths['modulePath']);
$this->data = array_merge($this->data, $this->getHookData($modulePath));
$this->data = array_merge_recursive($this->data, $this->getHookData($modulePath));
}
$this->data = array_merge($this->data, $this->getHookData($this->paths['customPath']));
$this->data = array_merge_recursive($this->data, $this->getHookData($this->paths['customPath']));
if ($this->getConfig()->get('useCache')) {
$this->getFileManager()->putContentsPHP($this->cacheFile, $this->data);
+1 -1
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
+1 -1
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
+1 -1
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
+1 -1
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -36,6 +36,8 @@ class EntityManager extends Base
'password' => $config->get('database.password'),
'metadata' => $this->getContainer()->get('metadata')->getOrmMetadata(),
'repositoryFactoryClassName' => '\\Espo\\Core\\ORM\\RepositoryFactory',
'driver' => $config->get('database.driver'),
'platform' => $config->get('database.platform')
);
$entityManager = new \Espo\Core\ORM\EntityManager($params);
+1 -1
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
+93 -33
View File
@@ -1,25 +1,52 @@
<?php
<?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 \Zend\Mime\Mime as Mime;
class Importer
{
{
private $entityManager;
private $fileManager;
private $config;
public function __construct($entityManager, $fileManager)
public function __construct($entityManager, $fileManager, $config)
{
$this->entityManager = $entityManager;
$this->fileManager = $fileManager;
$this->config = $config;
}
protected function getEntityManager()
{
return $this->entityManager;
}
protected function getConfig()
{
return $this->config;
}
protected function getFileManager()
{
@@ -36,22 +63,22 @@ class Importer
$subject = '--empty--';
}
$email->set('isHtml', false);
$email->set('isHtml', false);
$email->set('name', $subject);
$email->set('status', 'Archived');
$email->set('attachmentsIds', array());
$email->set('attachmentsIds', array());
$email->set('assignedUserId', $userId);
$email->set('teamsIds', $teamsIds);
$fromArr = $this->getAddressListFromMessage($message, 'from');
$fromArr = $this->getAddressListFromMessage($message, 'from');
if (isset($message->from)) {
$email->set('fromName', $message->from);
}
}
$email->set('from', $fromArr[0]);
$email->set('to', implode(';', $this->getAddressListFromMessage($message, 'to')));
$email->set('to', implode(';', $this->getAddressListFromMessage($message, 'to')));
$email->set('cc', implode(';', $this->getAddressListFromMessage($message, 'cc')));
if (isset($message->messageId) && !empty($message->messageId)) {
if (isset($message->messageId) && !empty($message->messageId)) {
$email->set('messageId', $message->messageId);
if (isset($message->deliveredTo)) {
$email->set('messageIdInternal', $message->messageId . '-' . $message->deliveredTo);
@@ -60,29 +87,29 @@ class Importer
if ($this->checkIsDuplicate($email)) {
return false;
}
}
if (isset($message->date)) {
$dt = new \DateTime($message->date);
if ($dt) {
$dateSent = $dt->setTimezone(new \DateTimeZone('UTC'))->format('Y-m-d H:i:s');
$dateSent = $dt->setTimezone(new \DateTimeZone('UTC'))->format('Y-m-d H:i:s');
$email->set('dateSent', $dateSent);
}
}
if (isset($message->deliveryDate)) {
$dt = new \DateTime($message->deliveryDate);
if ($dt) {
$deliveryDate = $dt->setTimezone(new \DateTimeZone('UTC'))->format('Y-m-d H:i:s');
$deliveryDate = $dt->setTimezone(new \DateTimeZone('UTC'))->format('Y-m-d H:i:s');
$email->set('deliveryDate', $deliveryDate);
}
}
$inlineIds = array();
if ($message->isMultipart()) {
if ($message->isMultipart()) {
foreach (new \RecursiveIteratorIterator($message) as $part) {
$this->importPartDataToEmail($email, $part, $inlineIds);
}
}
} else {
$this->importPartDataToEmail($email, $message, $inlineIds);
}
@@ -95,6 +122,39 @@ class Importer
$email->set('body', $body);
}
if (isset($message->references) && !empty($message->references)) {
$reference = str_replace(array('/', '@'), " ", trim($message->references, '<>'));
$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)) {
$email->set('parentType', $parentType);
$email->set('parentId', $parentId);
}
}
}
if (!$email->has('parentId')) {
$from = $email->get('from');
if ($from) {
$contact = $this->getEntityManager()->getRepository('Contact')->where(array(
'emailAddress' => $from
))->findOne();
if ($contact) {
if (!$this->getConfig()->get('b2cMode')) {
if ($contact->get('accountId')) {
$email->set('parentType', 'Account');
$email->set('parentId', $contact->get('accountId'));
}
} else {
$email->set('parentType', 'Contact');
$email->set('parentId', $contact->id);
}
}
}
}
$this->getEntityManager()->saveEntity($email);
return $email;
@@ -128,15 +188,15 @@ class Importer
}
protected function importPartDataToEmail(\Espo\Entities\Email $email, $part, &$inlineIds = array())
{
{
try {
$type = strtok($part->contentType, ';');
$encoding = null;
switch ($type) {
case 'text/plain':
$content = $this->getContentFromPart($part);
if (!$email->get('body')) {
case 'text/plain':
$content = $this->getContentFromPart($part);
if (!$email->get('body')) {
$email->set('body', $content);
}
$email->set('bodyPlain', $content);
@@ -147,23 +207,23 @@ class Importer
$email->set('isHtml', true);
break;
default:
$content = $part->getContent();
$content = $part->getContent();
$disposition = null;
$fileName = null;
$contentId = null;
if (isset($part->ContentDisposition)) {
if (isset($part->ContentDisposition)) {
if (strpos($part->ContentDisposition, 'attachment') === 0) {
if (preg_match('/filename="?([^"]+)"?/i', $part->ContentDisposition, $m)) {
$fileName = $m[1];
$disposition = 'attachment';
}
}
} else if (strpos($part->ContentDisposition, 'inline') === 0) {
$contentId = trim($part->contentID, '<>');
$fileName = $contentId;
$disposition = 'inline';
}
}
}
if (isset($part->contentTransferEncoding)) {
@@ -171,7 +231,7 @@ class Importer
}
$attachment = $this->getEntityManager()->getEntity('Attachment');
$attachment->set('name', $fileName);
$attachment->set('name', $fileName);
$attachment->set('type', $type);
if ($disposition == 'inline') {
@@ -188,18 +248,18 @@ class Importer
$this->getEntityManager()->saveEntity($attachment);
$path = 'data/upload/' . $attachment->id;
$this->getFileManager()->putContents($path, $content);
$path = 'data/upload/' . $attachment->id;
$this->getFileManager()->putContents($path, $content);
if ($disposition == 'attachment') {
$attachmentsIds = $email->get('attachmentsIds');
$attachmentsIds[] = $attachment->id;
$email->set('attachmentsIds', $attachmentsIds);
$email->set('attachmentsIds', $attachmentsIds);
} else if ($disposition == 'inline') {
$inlineIds[$contentId] = $attachment->id;
}
}
}
} catch (\Exception $e) {}
} catch (\Exception $e) {}
}
protected function getContentFromPart($part)
@@ -223,7 +283,7 @@ class Importer
$content = base64_decode($content);
}
$charset = 'UTF-8';
$charset = 'UTF-8';
if (isset($part->contentType)) {
$ctHeader = $part->getHeader('Content-Type');
@@ -235,14 +295,14 @@ class Importer
if ($charset !== 'UTF-8') {
$content = mb_convert_encoding($content, 'UTF-8', $charset);
}
}
if (isset($part->contentTransferEncoding)) {
$cteHeader = $part->getHeader('Content-Transfer-Encoding');
if ($cteHeader->getTransferEncoding() == 'quoted-printable') {
$cteHeader = $part->getHeader('Content-Transfer-Encoding');
if ($cteHeader->getTransferEncoding() == 'quoted-printable') {
$content = quoted_printable_decode($content);
}
}
}
}
return $content;
}
+1 -1
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
+21 -1
View File
@@ -1,4 +1,24 @@
<?php
<?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\Storage;
+1 -1
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
+1 -1
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
+14 -7
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -32,8 +32,6 @@ use \Espo\Core\Interfaces\Injectable;
class RDB extends \Espo\ORM\Repositories\RDB implements Injectable
{
public static $mapperClassName = '\\Espo\\Core\\ORM\\DB\\MysqlMapper';
protected $dependencies = array(
'metadata'
);
@@ -247,8 +245,18 @@ class RDB extends \Espo\ORM\Repositories\RDB implements Injectable
foreach ($entity->getRelations() as $name => $defs) {
if (in_array($defs['type'], $relationTypes)) {
$fieldName = $name . 'Ids';
if ($entity->has($fieldName)) {
$specifiedIds = $entity->get($fieldName);
$columnsFieldsName = $name . 'Columns';
if ($entity->has($fieldName) || $entity->has($columnsFieldsName)) {
if ($entity->has($fieldName)) {
$specifiedIds = $entity->get($fieldName);
} else {
$specifiedIds = array();
foreach ($entity->get($columnsFieldsName) as $id => $d) {
$specifiedIds[] = $id;
}
}
if (is_array($specifiedIds)) {
$toRemoveIds = array();
$existingIds = array();
@@ -258,9 +266,8 @@ class RDB extends \Espo\ORM\Repositories\RDB implements Injectable
$defs = array();
$columns = $this->getMetadata()->get("entityDefs." . $entity->getEntityName() . ".fields.{$name}.columns");
if (!empty($columns)) {
$columnData = $entity->get($name . 'Columns');
$columnData = $entity->get($columnsFieldsName);
$defs['additionalColumns'] = $columns;
}
foreach ($entity->get($name, $defs) as $foreignEntity) {
+1 -1
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
+39 -12
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -40,6 +40,8 @@ class Base
protected $metadata;
private $seed = null;
const MIN_LENGTH_FOR_CONTENT_SEARCH = 4;
public function __construct($entityManager, \Espo\Entities\User $user, Acl $acl, $metadata)
@@ -90,6 +92,14 @@ class Base
return $this->metadata->get("entityDefs.{$this->entityName}.collection.textFilterFields", array('name'));
}
protected function getSeed()
{
if (empty($this->seed)) {
$this->seed = $this->entityManager->getEntity($this->entityName);
}
return $this->seed;
}
protected function where($params, &$result)
{
if (!empty($params['where']) && is_array($params['where'])) {
@@ -108,7 +118,7 @@ class Base
if (empty($result['whereClause'])) {
$result['whereClause'] = array();
}
$fieldDefs = $this->entityManager->getEntity($this->entityName)->getFields();
$fieldDefs = $this->getSeed()->getFields();
$fieldList = $this->getTextFilterFields();
$d = array();
foreach ($fieldList as $field) {
@@ -146,14 +156,32 @@ class Base
$joins = array();
$part = array();
foreach ($linkedWith as $link => $ids) {
$joins[] = $link;
$defs = $this->entityManager->getMetadata()->get($this->entityName);
$entityName = $defs['relations'][$link]['entity'];
if ($entityName) {
$part[$entityName . '.id'] = $ids;
foreach ($linkedWith as $link => $idsValue) {
if (is_array($idsValue) && count($idsValue) == 1) {
$idsValue = $idsValue[0];
}
$relDefs = $this->getSeed()->getRelations();
if (!empty($relDefs[$link])) {
$defs = $relDefs[$link];
if ($defs['type'] == 'manyMany') {
$joins[] = $link;
if (!empty($defs['relationName']) && !empty($defs['midKeys'])) {
$key = $defs['midKeys'][1];
$relationName = $defs['relationName'];
$part[$relationName . '.' . $key] = $idsValue;
}
} else if ($defs['type'] == 'belongsTo') {
if (!empty($defs['type']['key'])) {
$key = $defs['type']['key'];
$part[$key] = $idsValue;
}
}
}
}
if (!empty($part)) {
@@ -175,7 +203,7 @@ class Base
$result['whereClause'] = array();
}
$fieldDefs = $this->entityManager->getEntity($this->entityName)->getFields();
$fieldDefs = $this->getSeed()->getFields();
$value = $params['q'];
@@ -222,7 +250,6 @@ class Base
'Team.id' => $this->user->get('teamsIds'),
'assignedUserId' => $this->user->id
);
//$result['whereClause']['Team.id'] = $this->user->get('teamsIds');
}
}
@@ -263,7 +290,7 @@ class Base
$a = $this->getWherePart($i);
foreach ($a as $left => $right) {
if (!empty($right)) {
$arr[$left] = $right;
$arr[] = array($left => $right);
}
}
}
+1 -1
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
+1 -1
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
+1 -1
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
+1 -1
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
+1 -1
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
+10 -7
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -64,7 +64,12 @@ class Output
public function processError($message = 'Error', $code = 500, $isPrint = false)
{
$GLOBALS['log']->error('API ['.$this->getSlim()->request()->getMethod().']:'.$this->getSlim()->router()->getCurrentRoute()->getPattern().', Params:'.print_r($this->getSlim()->router()->getCurrentRoute()->getParams(), true).', InputData: '.$this->getSlim()->request()->getBody().' - '.$message);
$currentRoute = $this->getSlim()->router()->getCurrentRoute();
if (isset($currentRoute)) {
$GLOBALS['log']->error('API ['.$this->getSlim()->request()->getMethod().']:'.$currentRoute->getPattern().', Params:'.print_r($currentRoute->getParams(), true).', InputData: '.$this->getSlim()->request()->getBody().' - '.$message);
}
$this->displayError($message, $code, $isPrint);
}
@@ -80,6 +85,8 @@ class Output
{
$GLOBALS['log']->error('Display Error: '.$text.', Code: '.$statusCode.' URL: '.$_SERVER['REQUEST_URI']);
ob_clean();
if (!empty( $this->slim)) {
$this->getSlim()->response()->status($statusCode);
$this->getSlim()->response()->header('X-Status-Reason', $text);
@@ -91,8 +98,7 @@ class Output
}
$this->getSlim()->stop();
}
else {
} else {
$GLOBALS['log']->info('Could not get Slim instance. It looks like a direct call (bypass API). URL: '.$_SERVER['REQUEST_URI']);
die($text);
}
@@ -112,8 +118,5 @@ class Output
return null;
}
}
+1 -1
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
+1 -1
View File
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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
@@ -3,7 +3,7 @@
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* 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

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