Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function checkForNameDuplicatesAction(Request $request): JsonResponse

if ($value !== null) {
$list = $this->getCompanyRepository()->getList();
$list->addConditionParam(sprintf('name LIKE "%%%s%%"', (string) $value));
$list->addConditionParam('name LIKE ?', '%' . $value . '%');
$foundObjects = $list->getData();
}

Expand Down
4 changes: 2 additions & 2 deletions src/CoreShop/Bundle/CoreBundle/Report/CategoriesReport.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,10 @@ public function getReportData(ParameterBag $parameterBag): array
INNER JOIN object_query_$orderItemClassId AS orderItems ON orderItems.product__id = catProductDependencies.targetId
INNER JOIN object_relations_$orderClassId AS orderRelations ON orderRelations.dest_id = orderItems.oo_id AND orderRelations.fieldname = \"items\"
INNER JOIN object_query_$orderClassId AS `orders` ON `orders`.oo_id = orderRelations.src_id
WHERE orders.store = :storeId" . $orderStateInClause . " AND orders.orderDate > :fromTimestamp AND orders.orderDate < :toTimestamp AND orderItems.product__id IS NOT NULL
WHERE orders.store = :storeId" . $orderStateInClause . ' AND orders.orderDate > :fromTimestamp AND orders.orderDate < :toTimestamp AND orderItems.product__id IS NOT NULL
GROUP BY categories.oo_id
ORDER BY quantityCount DESC
LIMIT " . (int) $offset . ', ' . (int) $limit;
LIMIT ' . (int) $offset . ', ' . (int) $limit;
$results = $this->db->fetchAllAssociative($query, $queryParameters);
}

Expand Down
4 changes: 2 additions & 2 deletions src/CoreShop/Bundle/CoreBundle/Report/ProductsReport.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,10 @@ public function getReportData(ParameterBag $parameterBag): array
INNER JOIN object_relations_$orderClassId AS orderRelations ON orderRelations.src_id = orders.oo_id AND orderRelations.fieldname = \"items\"
INNER JOIN object_query_$orderItemClassId AS orderItems ON orderRelations.dest_id = orderItems.oo_id
INNER JOIN object_localized_query_" . $orderItemClassId . '_' . $locale . " AS orderItemsTranslated ON orderItems.oo_id = orderItemsTranslated.ooo_id
WHERE `orders`.store = :storeId AND $productTypeCondition" . $orderStateInClauseOrders . " AND `orders`.orderDate > :fromTimestamp AND `orders`.orderDate < :toTimestamp
WHERE `orders`.store = :storeId AND $productTypeCondition" . $orderStateInClauseOrders . ' AND `orders`.orderDate > :fromTimestamp AND `orders`.orderDate < :toTimestamp
GROUP BY orderItems.objectId
ORDER BY orderCount DESC
LIMIT " . (int) $offset . ', ' . (int) $limit;
LIMIT ' . (int) $offset . ', ' . (int) $limit;
}

$queryParameters = array_merge([
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading