diff options
| author | Lester Caine <lester@lsces.co.uk> | 2026-05-31 10:06:48 +0100 |
|---|---|---|
| committer | Lester Caine <lester@lsces.co.uk> | 2026-05-31 10:06:48 +0100 |
| commit | cef2bbde0cbaa042a545f432865de11e0bc51d03 (patch) | |
| tree | 53315ea10db725ec3b99ca31c7c016b0b60f89f6 /templates/stockassembly | |
| parent | 693acd68d2dcdbfd700a3aab6c49251552cc9be0 (diff) | |
| download | stock-cef2bbde0cbaa042a545f432865de11e0bc51d03.tar.gz stock-cef2bbde0cbaa042a545f432865de11e0bc51d03.tar.bz2 stock-cef2bbde0cbaa042a545f432865de11e0bc51d03.zip | |
Remove stock_component table — use liberty_content directly
stock_component was a pure alias (component_id ↔ content_id with no
other data). All queries now target liberty_content WHERE
content_type_guid = STOCKCOMPONENT_CONTENT_TYPE_GUID directly.
- StockComponent: drop mComponentId, constructor takes content_id only
- All component_id URL params changed to content_id
- Import files, edit_movement, sitemap updated to match
- BOM xref templates updated (xref column migrated from component_id
to content_id in live DB — 130 rows)
- StockAssembly loadXrefList/enrichXrefDisplay join liberty_content
directly; loadComponents drops stock_component LEFT JOIN
- StockBase: previous/next keys renamed to _content_id
stock_component table left in schema_inc.php pending DB reset.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'templates/stockassembly')
4 files changed, 4 insertions, 4 deletions
diff --git a/templates/stockassembly/edit_xref_bom_item.tpl b/templates/stockassembly/edit_xref_bom_item.tpl index 2f4ba8b..0ab5294 100644 --- a/templates/stockassembly/edit_xref_bom_item.tpl +++ b/templates/stockassembly/edit_xref_bom_item.tpl @@ -14,7 +14,7 @@ {formlabel label="Component"} {forminput} <p class="form-control-static"> - <a href="{$smarty.const.STOCK_PKG_URL}view_component.php?component_id={$xrefInfo.xref|escape}">{$xrefInfo.xref_title|default:$xrefInfo.xref|escape}</a> + <a href="{$smarty.const.STOCK_PKG_URL}view_component.php?content_id={$xrefInfo.xref|escape}">{$xrefInfo.xref_title|default:$xrefInfo.xref|escape}</a> </p> {/forminput} </div> diff --git a/templates/stockassembly/edit_xref_bompck_item.tpl b/templates/stockassembly/edit_xref_bompck_item.tpl index 1c4a32b..72acbd2 100644 --- a/templates/stockassembly/edit_xref_bompck_item.tpl +++ b/templates/stockassembly/edit_xref_bompck_item.tpl @@ -14,7 +14,7 @@ {formlabel label="Component"} {forminput} <p class="form-control-static"> - <a href="{$smarty.const.STOCK_PKG_URL}view_component.php?component_id={$xrefInfo.xref|escape}">{$xrefInfo.xref_title|default:$xrefInfo.xref|escape}</a> + <a href="{$smarty.const.STOCK_PKG_URL}view_component.php?content_id={$xrefInfo.xref|escape}">{$xrefInfo.xref_title|default:$xrefInfo.xref|escape}</a> </p> {/forminput} </div> diff --git a/templates/stockassembly/view_xref_bom_item.tpl b/templates/stockassembly/view_xref_bom_item.tpl index 100d986..8742ea9 100644 --- a/templates/stockassembly/view_xref_bom_item.tpl +++ b/templates/stockassembly/view_xref_bom_item.tpl @@ -2,7 +2,7 @@ <tr class="{cycle values="even,odd"}"> <td> {if $gContent->mInfo.$source[xref].xref > 0} - <a href="{$smarty.const.STOCK_PKG_URL}view_component.php?component_id={$gContent->mInfo.$source[xref].xref|escape}">{$gContent->mInfo.$source[xref].xref_title|default:$gContent->mInfo.$source[xref].xref|escape}</a> + <a href="{$smarty.const.STOCK_PKG_URL}view_component.php?content_id={$gContent->mInfo.$source[xref].xref|escape}">{$gContent->mInfo.$source[xref].xref_title|default:$gContent->mInfo.$source[xref].xref|escape}</a> {else} {/if} diff --git a/templates/stockassembly/view_xref_bompck_item.tpl b/templates/stockassembly/view_xref_bompck_item.tpl index 9c64a86..6053efa 100644 --- a/templates/stockassembly/view_xref_bompck_item.tpl +++ b/templates/stockassembly/view_xref_bompck_item.tpl @@ -2,7 +2,7 @@ <tr class="{cycle values="even,odd"}"> <td> {if $gContent->mInfo.$source[xref].xref > 0} - <a href="{$smarty.const.STOCK_PKG_URL}view_component.php?component_id={$gContent->mInfo.$source[xref].xref|escape}">{$gContent->mInfo.$source[xref].xref_title|default:$gContent->mInfo.$source[xref].xref|escape}</a> + <a href="{$smarty.const.STOCK_PKG_URL}view_component.php?content_id={$gContent->mInfo.$source[xref].xref|escape}">{$gContent->mInfo.$source[xref].xref_title|default:$gContent->mInfo.$source[xref].xref|escape}</a> {else} {/if} |
