summaryrefslogtreecommitdiff
path: root/edit_component.php
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2026-05-31 10:06:48 +0100
committerLester Caine <lester@lsces.co.uk>2026-05-31 10:06:48 +0100
commitcef2bbde0cbaa042a545f432865de11e0bc51d03 (patch)
tree53315ea10db725ec3b99ca31c7c016b0b60f89f6 /edit_component.php
parent693acd68d2dcdbfd700a3aab6c49251552cc9be0 (diff)
downloadstock-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 'edit_component.php')
-rwxr-xr-xedit_component.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/edit_component.php b/edit_component.php
index 9a6d34a..7733b20 100755
--- a/edit_component.php
+++ b/edit_component.php
@@ -29,7 +29,7 @@ if( !empty($_REQUEST['save']) ) {
}
if( empty( $gContent->mErrors ) ) {
$url = $isNew
- ? STOCK_PKG_URL.'edit_component.php?component_id='.$gContent->mComponentId
+ ? STOCK_PKG_URL.'edit_component.php?content_id='.$gContent->mContentId
: $gContent->getDisplayUrl();
header( 'Location: '.$url );
die;
@@ -42,7 +42,7 @@ if( !empty($_REQUEST['save']) ) {
// user cancelled
} elseif( empty( $_REQUEST['confirm'] ) ) {
$formHash['delete'] = true;
- $formHash['component_id'] = $gContent->mComponentId;
+ $formHash['content_id'] = $gContent->mContentId;
$gBitSystem->confirmDialog( $formHash,
[
'confirm_item' => $gContent->getTitle(),
@@ -70,9 +70,9 @@ if( $gContent->mContentId ) {
if( $gBitSystem->isFeatureActive( 'stock_show_all_to_admins' ) && $gBitUser->hasPermission( 'p_stock_admin' ) ) {
unset( $getHash['user_id'] );
}
-$galleryTree = $gStockAssembly->generateList( $getHash, [ 'name' => 'assembly_id', 'id' => 'gallerylist', 'item_attributes' => [ 'class' => 'listingtitle' ], 'radio_checkbox' => true ], true );
+$galleryTree = $gStockAssembly->generateList( $getHash, [ 'name' => 'assembly_content_id', 'id' => 'gallerylist', 'item_attributes' => [ 'class' => 'listingtitle' ], 'radio_checkbox' => true ], true );
$gBitSmarty->assign( 'galleryTree', $galleryTree );
-$gBitSmarty->assign( 'requested_gallery', !empty($_REQUEST['assembly_id']) ? $_REQUEST['assembly_id'] : null );
+$gBitSmarty->assign( 'requested_gallery', !empty($_REQUEST['assembly_content_id']) ? $_REQUEST['assembly_content_id'] : null );
$gContent->mInfo['stockcomponent_types'] = $gContent->getXrefGroupList();