Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/10.5' into 10.6
Browse files Browse the repository at this point in the history
# Conflicts:
#	composer.json
  • Loading branch information
brusch committed Dec 14, 2022
2 parents 0a77e92 + e1a51fc commit 520f220
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ protected function updateGridConfigFavourites($gridConfig, $metadata)
}

/**
* @Route("/get-export-jobs", name="pimcore_admin_asset_assethelper_getexportjobs", methods={"GET"})
* @Route("/get-export-jobs", name="pimcore_admin_asset_assethelper_getexportjobs", methods={"POST"})
*
* @param Request $request
* @param GridHelperService $gridHelperService
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,13 @@ private function prepareObjectData(
LocaleServiceInterface $localeService
): array {
$user = Tool\Admin::getCurrentUser();
$allLanguagesAllowed = false;
$languagePermissions = [];
if (!$user->isAdmin()) {
$languagePermissions = $object->getPermissions('lEdit', $user);

//sets allowed all languages modification when the lEdit column is empty
$allLanguagesAllowed = $languagePermissions['lEdit'] == '';
$languagePermissions = explode(',', $languagePermissions['lEdit']);
if ($languagePermissions['lEdit']) {
$languagePermissions = explode(',', $languagePermissions['lEdit']);
}
}

$class = $object->getClass();
Expand Down Expand Up @@ -280,7 +279,7 @@ private function prepareObjectData(
$brick->$valueSetter($value);
}
} else {
if (!$user->isAdmin() && $languagePermissions) {
if ($languagePermissions) {
$fd = $class->getFieldDefinition($key);
if (!$fd) {
// try to get via localized fields
Expand All @@ -289,7 +288,7 @@ private function prepareObjectData(
$field = $localized->getFieldDefinition($key);
if ($field) {
$currentLocale = $localeService->findLocale();
if (!$allLanguagesAllowed && !in_array($currentLocale, $languagePermissions)) {
if (!in_array($currentLocale, $languagePermissions)) {
continue;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1297,7 +1297,7 @@ protected function getCsvFile($fileHandle)
}

/**
* @Route("/get-export-jobs", name="getexportjobs", methods={"GET"})
* @Route("/get-export-jobs", name="getexportjobs", methods={"POST"})
*
* @param Request $request
* @param GridHelperService $gridHelperService
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,7 @@ pimcore.element.helpers.gridColumnConfig = {
settings = Ext.encode(settings);
params["settings"] = settings;
Ext.Ajax.request({
method: 'POST',
url: this.exportPrepareUrl,
params: params,
success: function (response) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ pimcore.object.helpers.classTree = Class.create({

newNode = fn();

if (con.children) {
if (con.children && newNode) {
for (var i = 0; i < con.children.length; i++) {
this.recursiveAddNode(con.children[i], newNode, brickDescriptor, config);
}
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
"codeception/module-symfony": "^1.6.0",
"codeception/phpunit-wrapper": "^9",
"pimcore/elasticsearch-client": "^1.0.0",
"phpstan/phpstan": "^1.9",
"phpstan/phpstan": "^1.9.3",
"phpstan/phpstan-symfony": "^1.2.14",
"phpunit/phpunit": "^9.3",
"spiritix/php-chrome-html2pdf": "^1.6",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ pimcore:
## Custom JS Class for Report Visualization
If you need to fully customize the appearance of the report, you can specify a custom java script class that should
be used when opening the report in Pimcore Backend. This class can be specified in `Report Class` option and should extend
the default java script class for the reports which is `pimcore.report.custom.report``.
the default java script class for the reports which is `pimcore.report.custom.report`.

2 changes: 1 addition & 1 deletion lib/Image/Adapter/Imagick.php
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ private function hasAlphaChannel()
for ($i = 0; $i < $width; $i++) {
for ($j = 0; $j < $height; $j++) {
$pixel = $this->resource->getImagePixelColor($i, $j);
$color = $pixel->getColor(true); // get the real alpha not just 1/0
$color = $pixel->getColor(1); // get the real alpha not just 1/0
if ($color['a'] < 1) { // if there's an alpha pixel, return true
return true;
}
Expand Down

0 comments on commit 520f220

Please sign in to comment.