summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2026-06-10 09:16:33 +0100
committerLester Caine <lester@lsces.co.uk>2026-06-10 09:16:33 +0100
commit8566070da24cd53845c64cdf2cd2104c847e450c (patch)
tree8348a496fe32a74713fad9f3850c40d90be7d6a4 /includes
parent0582e0b40f3440e8ec4c95c99501019e6933e20b (diff)
downloadstock-8566070da24cd53845c64cdf2cd2104c847e450c.tar.gz
stock-8566070da24cd53845c64cdf2cd2104c847e450c.tar.bz2
stock-8566070da24cd53845c64cdf2cd2104c847e450c.zip
stock: add kitlocker gallery — view_kitlocker.php, stock_fixed_grid_inc.tpl, view_xref_kitlocker_group.tpl; stgrp getList filter; stgrp template field set to kitlocker
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'includes')
-rwxr-xr-xincludes/classes/StockAssembly.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/includes/classes/StockAssembly.php b/includes/classes/StockAssembly.php
index 5765031..4fe4bdc 100755
--- a/includes/classes/StockAssembly.php
+++ b/includes/classes/StockAssembly.php
@@ -996,6 +996,11 @@ class StockAssembly extends StockBase {
}
$selectSql .= ", (SELECT COUNT(*) FROM `".BIT_DB_PREFIX."stock_assembly_map` sacmc WHERE sacmc.`assembly_content_id` = lc.`content_id`) AS `child_count`";
+ if( !empty( $pListHash['stgrp'] ) ) {
+ $whereSql .= " AND EXISTS (SELECT 1 FROM `".BIT_DB_PREFIX."liberty_xref` sx WHERE sx.`content_id` = lc.`content_id` AND sx.`item` = ?)";
+ $bindVars[] = $pListHash['stgrp'];
+ }
+
// Putting in the below hack because mssql cannot select distinct on a text blob column.
$selectSql .= $gBitDbType == 'mssql' ? " ,CAST(lc.`data` AS VARCHAR(250)) as `data` " : " ,lc.`data` ";