Skip to content

Commit

Permalink
EZP-31220: Migrated codebase to Symfony 5 (#280)
Browse files Browse the repository at this point in the history
* Symfony 5 compatibility

* EZEE-2982: Avoided creating draft when user is edited

Co-authored-by: Dariusz Szut <dew326@gmail.com>
Co-authored-by: Łukasz Serwatka <lukasz.serwatka@ez.no>
3 people authored Mar 18, 2020
1 parent baf7a12 commit 1af18c8
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
@@ -10,10 +10,10 @@
],
"require": {
"php": "^7.3",
"symfony/http-kernel": "^4.3",
"symfony/config": "^4.3",
"symfony/dependency-injection": "^4.3",
"symfony/yaml": "^4.3"
"symfony/http-kernel": "^5.0",
"symfony/config": "^5.0",
"symfony/dependency-injection": "^5.0",
"symfony/yaml": "^5.0"
},
"autoload": {
"psr-4": {
Original file line number Diff line number Diff line change
@@ -67,6 +67,14 @@ const ContentEditButton = ({ version, location, isDisabled }) => {
};
const editContent = (languageCode) => {
const contentId = location.ContentInfo.Content._id;
const contentTypeInfo = contentTypesMap[location.ContentInfo.Content.ContentType._href];
const isUser = window.eZ.adminUiConfig.userContentTypes.includes(contentTypeInfo.identifier);

if (isUser) {
redirectToContentEdit(contentId, version.VersionInfo.versionNo, languageCode, location.id);

return;
}

createDraft(
{

0 comments on commit 1af18c8

Please sign in to comment.