Skip to content

Commit af2b6fe

Browse files
authored
Fix(Export): fix bad where clause (#446)
* Fix(Export): fix bad where clause * adapt changelog
1 parent dfb8435 commit af2b6fe

2 files changed

Lines changed: 11 additions & 13 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased]
99

10+
### Fixed
11+
12+
- Fix ODT export generation
13+
1014
## [2.11.0] - 2025-07-10
1115

1216
### Fixed

front/export.php

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,14 @@
3535
$PluginOrderOrder = new PluginOrderOrder();
3636

3737
if ($config->canGenerateOrderPDF() && ($PluginOrderOrder->canGenerateWithoutValidation() || $PluginOrderOrder->canGenerate())) {
38-
$PluginOrderOrder = new PluginOrderOrder();
38+
$criteria = ['id' => $_GET['id']] + getEntitiesRestrictCriteria(
39+
getTableForItemType(PluginOrderOrder::class),
40+
'',
41+
'',
42+
true
43+
);
3944

40-
// load related order with entity restrict criteria
41-
if (
42-
$PluginOrderOrder->getFromDBByCrit([
43-
'id' => $_GET['id'],
44-
'entities_id' => getEntitiesRestrictCriteria(
45-
getTableForItemType(PluginOrderOrder::class),
46-
'',
47-
'',
48-
true
49-
),
50-
])
51-
) {
45+
if ($PluginOrderOrder->getFromDBByCrit($criteria)) {
5246
$PluginOrderOrder->generateOrder($_GET);
5347
} else {
5448
Html::displayRightError("You don't have permission to perform this action.");

0 commit comments

Comments
 (0)