summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2026-05-31 12:10:39 +0100
committerLester Caine <lester@lsces.co.uk>2026-05-31 12:10:39 +0100
commit8c97edc1011e46e52ccecd9e7cc5f1bd9fcadc08 (patch)
tree45fe227bc8a430e206706a5c5bf8169cb16bf4d2 /modules
parentcef2bbde0cbaa042a545f432865de11e0bc51d03 (diff)
downloadstock-8c97edc1011e46e52ccecd9e7cc5f1bd9fcadc08.tar.gz
stock-8c97edc1011e46e52ccecd9e7cc5f1bd9fcadc08.tar.bz2
stock-8c97edc1011e46e52ccecd9e7cc5f1bd9fcadc08.zip
Remove assembly_id/component_id: use content_id throughout
All stock classes, templates, imports, and controllers now reference content_id directly. StockRemote deleted (unused). StockBase: dead methods (isMachineName, updatePosition, isEditable) removed; hash_key aliases dropped. getList() keyed by content_id, fixing missing content_id in row data. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'modules')
-rwxr-xr-xmodules/mod_components.php2
-rwxr-xr-xmodules/mod_navigation.tpl8
2 files changed, 5 insertions, 5 deletions
diff --git a/modules/mod_components.php b/modules/mod_components.php
index a164cb1..4115ed3 100755
--- a/modules/mod_components.php
+++ b/modules/mod_components.php
@@ -19,7 +19,7 @@ $listHash = $moduleParams->value;
if( !empty( $gContent ) && $gContent->getField( 'content_type_guid' ) == STOCKASSEMBLY_CONTENT_TYPE_GUID ) {
$displayCount = empty( $gContent->mItems ) ? 0 : count( $gContent->mItems );
$thumbCount = $gContent->mInfo['rows_per_page'] * $gContent->mInfo['cols_per_page'];
- $listHash['assembly_id'] = $gContent->mAssemblyId;
+ $listHash['assembly_content_id'] = $gContent->mContentId;
$display = $displayCount >= $thumbCount;
}
diff --git a/modules/mod_navigation.tpl b/modules/mod_navigation.tpl
index 6c41a67..b3ba27e 100755
--- a/modules/mod_navigation.tpl
+++ b/modules/mod_navigation.tpl
@@ -11,10 +11,10 @@
<a class="btn btn-primary btn-block" href="{$smarty.const.STOCK_PKG_URL}edit_component.php">{booticon iname="fa-plus" iexplain="Add Component"} {tr}Add Component{/tr}</a>
{/if}
{if $gContent && $gContent->isValid() && $gContent->hasUpdatePermission()}
- {if $gContent->mAssemblyId}
- <a class="btn btn-warning btn-block" href="{$smarty.const.STOCK_PKG_URL}edit.php?assembly_id={$gContent->mAssemblyId}">{booticon iname="fa-pen-to-square" iexplain="Edit"} {tr}Edit Assembly{/tr}</a>
- <a class="btn btn-default btn-block" href="{$smarty.const.STOCK_PKG_URL}component_order.php?assembly_id={$gContent->mAssemblyId}">{booticon iname="fa-sort" iexplain="Order"} {tr}Component Order{/tr}</a>
- {elseif $gContent->mContentId && $gContent->mContentTypeGuid == 'stockcomponent'}
+ {if $gContent->mContentId && $gContent->mContentTypeGuid == $smarty.const.STOCKASSEMBLY_CONTENT_TYPE_GUID}
+ <a class="btn btn-warning btn-block" href="{$smarty.const.STOCK_PKG_URL}edit.php?content_id={$gContent->mContentId}">{booticon iname="fa-pen-to-square" iexplain="Edit"} {tr}Edit Assembly{/tr}</a>
+ <a class="btn btn-default btn-block" href="{$smarty.const.STOCK_PKG_URL}component_order.php?content_id={$gContent->mContentId}">{booticon iname="fa-sort" iexplain="Order"} {tr}Component Order{/tr}</a>
+ {elseif $gContent->mContentId && $gContent->mContentTypeGuid == $smarty.const.STOCKCOMPONENT_CONTENT_TYPE_GUID}
<a class="btn btn-warning btn-block" href="{$smarty.const.STOCK_PKG_URL}edit_component.php?content_id={$gContent->mContentId}">{booticon iname="fa-pen-to-square" iexplain="Edit"} {tr}Edit Component{/tr}</a>
{/if}
{/if}