Skip to content

Commit 1af18c8

Browse files
webhdxdew326lserwatka
authored
EZP-31220: Migrated codebase to Symfony 5 (#280)
* Symfony 5 compatibility * EZEE-2982: Avoided creating draft when user is edited Co-authored-by: Dariusz Szut <[email protected]> Co-authored-by: Łukasz Serwatka <[email protected]>
1 parent baf7a12 commit 1af18c8

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
],
1111
"require": {
1212
"php": "^7.3",
13-
"symfony/http-kernel": "^4.3",
14-
"symfony/config": "^4.3",
15-
"symfony/dependency-injection": "^4.3",
16-
"symfony/yaml": "^4.3"
13+
"symfony/http-kernel": "^5.0",
14+
"symfony/config": "^5.0",
15+
"symfony/dependency-injection": "^5.0",
16+
"symfony/yaml": "^5.0"
1717
},
1818
"autoload": {
1919
"psr-4": {

src/modules/universal-discovery/components/content-edit-button/content.edit.button.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,14 @@ const ContentEditButton = ({ version, location, isDisabled }) => {
6767
};
6868
const editContent = (languageCode) => {
6969
const contentId = location.ContentInfo.Content._id;
70+
const contentTypeInfo = contentTypesMap[location.ContentInfo.Content.ContentType._href];
71+
const isUser = window.eZ.adminUiConfig.userContentTypes.includes(contentTypeInfo.identifier);
72+
73+
if (isUser) {
74+
redirectToContentEdit(contentId, version.VersionInfo.versionNo, languageCode, location.id);
75+
76+
return;
77+
}
7078

7179
createDraft(
7280
{

0 commit comments

Comments
 (0)