diff options
| author | Lester Caine <lester@lsces.co.uk> | 2026-06-11 10:44:41 +0100 |
|---|---|---|
| committer | Lester Caine <lester@lsces.co.uk> | 2026-06-11 10:44:41 +0100 |
| commit | eaa8de0f28f296e889593bc2221d29917aa15712 (patch) | |
| tree | fc9309c31135ab8b01809561994acae46604c301 | |
| parent | 51195f3ae4cbc9ce3ae6f6054e75a72fdf0a5e32 (diff) | |
| download | stock-eaa8de0f28f296e889593bc2221d29917aa15712.tar.gz stock-eaa8de0f28f296e889593bc2221d29917aa15712.tar.bz2 stock-eaa8de0f28f296e889593bc2221d29917aa15712.zip | |
stock: remove orphaned add_xref/edit_xref files — all links already use liberty package versions
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
| -rw-r--r-- | add_xref.php | 50 | ||||
| -rw-r--r-- | edit_xref.php | 54 | ||||
| -rw-r--r-- | templates/add_xref.tpl | 44 | ||||
| -rw-r--r-- | templates/edit_xref.tpl | 45 |
4 files changed, 0 insertions, 193 deletions
diff --git a/add_xref.php b/add_xref.php deleted file mode 100644 index a42b41c..0000000 --- a/add_xref.php +++ /dev/null @@ -1,50 +0,0 @@ -<?php -/** - * @package stock - * @subpackage functions - */ - -namespace Bitweaver\Stock; - -use Bitweaver\Liberty\LibertyContent; - -require_once '../kernel/includes/setup_inc.php'; - -global $gBitSystem, $gBitSmarty, $gBitUser, $gContent; - -$gBitSystem->verifyPackage( 'stock' ); -$gBitSystem->verifyPermission( 'p_stock_update' ); - -if( empty( $_REQUEST['content_id'] ) || !is_numeric( $_REQUEST['content_id'] ) ) { - $gBitSystem->fatalError( 'No content ID specified.' ); -} - -$gContent = LibertyContent::getLibertyObject( (int)$_REQUEST['content_id'] ); - -if( !$gContent || !$gContent->isValid() ) { - $gBitSystem->fatalError( 'Content not found.' ); -} - -$gContent->verifyUpdatePermission(); - -if( !empty( $_REQUEST['fCancel'] ) ) { - header( 'Location: '.$gContent->getDisplayUrl() ); - die; -} - -if( !empty( $_REQUEST['fAddXref'] ) ) { - if( $gContent->storeXref( $_REQUEST ) ) { - header( 'Location: '.$gContent->getDisplayUrl() ); - die; - } -} - -$xref_type = (int)( $_REQUEST['xref_type'] ?? 1 ); -$xrefTypeList = $gContent->getXrefTypeList( $xref_type ); - -$gBitSmarty->assign( 'gContent', $gContent ); -$gBitSmarty->assign( 'xref_type', $xref_type ); -$gBitSmarty->assign( 'xrefTypeList', $xrefTypeList ); -$gBitSmarty->assign( 'errors', $gContent->mErrors ); - -$gBitSystem->display( 'bitpackage:stock/add_xref.tpl', 'Add Detail', [ 'display_mode' => 'edit' ] ); diff --git a/edit_xref.php b/edit_xref.php deleted file mode 100644 index edbd84f..0000000 --- a/edit_xref.php +++ /dev/null @@ -1,54 +0,0 @@ -<?php -/** - * @package stock - * @subpackage functions - */ - -namespace Bitweaver\Stock; - -use Bitweaver\Liberty\LibertyContent; - -require_once '../kernel/includes/setup_inc.php'; - -global $gBitSystem, $gBitSmarty, $gBitUser, $gContent; - -$gBitSystem->verifyPackage( 'stock' ); -$gBitSystem->verifyPermission( 'p_stock_update' ); - -if( empty( $_REQUEST['content_id'] ) || !is_numeric( $_REQUEST['content_id'] ) ) { - $gBitSystem->fatalError( 'No content ID specified.' ); -} - -$gContent = LibertyContent::getLibertyObject( (int)$_REQUEST['content_id'] ); - -if( !$gContent || !$gContent->isValid() ) { - $gBitSystem->fatalError( 'Content not found.' ); -} - -if( !empty( $_REQUEST['xref_id'] ) ) { - $gContent->loadXref( $_REQUEST['xref_id'] ); -} - -$gContent->verifyUpdatePermission(); - -if( !empty( $_REQUEST['fCancel'] ) ) { - header( 'Location: '.$gContent->getDisplayUrl() ); - die; -} - -if( !empty( $_REQUEST['fSaveXref'] ) ) { - if( $gContent->storeXref( $_REQUEST ) ) { - header( 'Location: '.$gContent->getDisplayUrl() ); - die; - } - $xrefInfo = $_REQUEST; - $xrefInfo['data'] = $_REQUEST['edit'] ?? ''; -} else { - $xrefInfo = $gContent->mInfo['xref_store']['data'] ?? []; -} - -$gBitSmarty->assign( 'gContent', $gContent ); -$gBitSmarty->assign( 'xrefInfo', $xrefInfo ); -$gBitSmarty->assign( 'errors', $gContent->mErrors ); - -$gBitSystem->display( 'bitpackage:stock/edit_xref.tpl', 'Edit Detail', [ 'display_mode' => 'edit' ] ); diff --git a/templates/add_xref.tpl b/templates/add_xref.tpl deleted file mode 100644 index 63166cb..0000000 --- a/templates/add_xref.tpl +++ /dev/null @@ -1,44 +0,0 @@ -{strip} -<div class="edit stock"> - <div class="header"> - <h1>{tr}Add Detail{/tr}: {$gContent->getTitle()|escape}</h1> - </div> - - <div class="body"> - {formfeedback error=$errors} - - {form id="addStockXrefForm"} - <input type="hidden" name="content_id" value="{$gContent->mContentId}" /> - <input type="hidden" name="group" value="{$group}" /> - - <div class="form-group"> - {formlabel label="Type" for="item"} - {forminput} - {html_options name="item" id="item" options=$xrefTypeList.list} - {/forminput} - </div> - - <div class="form-group"> - {formlabel label="Value" for="edit"} - {forminput} - <input type="text" class="form-control" name="edit" id="edit" value="" /> - {formhelp note="Enter the value for this detail record."} - {/forminput} - </div> - - <div class="form-group"> - {formlabel label="Linked Content ID" for="xref"} - {forminput} - <input type="text" class="form-control input-small" name="xref" id="xref" value="" /> - {formhelp note="For supplier links: enter the contact content_id. Leave blank for all other types."} - {/forminput} - </div> - - <div class="form-group submit"> - <input type="submit" class="btn btn-default" name="fCancel" value="{tr}Cancel{/tr}" /> - <input type="submit" class="btn btn-primary" name="fAddXref" value="{tr}Save{/tr}" /> - </div> - {/form} - </div><!-- end .body --> -</div><!-- end .stock --> -{/strip} diff --git a/templates/edit_xref.tpl b/templates/edit_xref.tpl deleted file mode 100644 index 35ac2ff..0000000 --- a/templates/edit_xref.tpl +++ /dev/null @@ -1,45 +0,0 @@ -{strip} -<div class="edit stock"> - <div class="header"> - <h1>{tr}Edit Detail{/tr}: {$gContent->getTitle()|escape}</h1> - </div> - - <div class="body"> - {formfeedback error=$errors} - - {form id="editStockXrefForm"} - <input type="hidden" name="content_id" value="{$xrefInfo.content_id}" /> - <input type="hidden" name="xref_id" value="{$xrefInfo.xref_id}" /> - <input type="hidden" name="item" value="{$xrefInfo.item|escape}" /> - - <div class="form-group"> - {formlabel label="Type"} - {forminput} - <p class="form-control-static">{$xrefInfo.template_title|escape}</p> - {/forminput} - </div> - - <div class="form-group"> - {formlabel label="Value" for="edit"} - {forminput} - <input type="text" class="form-control" name="edit" id="edit" value="{$xrefInfo.data|escape}" /> - {formhelp note="Enter the value for this detail record."} - {/forminput} - </div> - - <div class="form-group"> - {formlabel label="Linked Content ID" for="xref"} - {forminput} - <input type="text" class="form-control input-small" name="xref" id="xref" value="{$xrefInfo.xref|escape}" /> - {formhelp note="For supplier links: enter the contact content_id. Leave blank for all other types."} - {/forminput} - </div> - - <div class="form-group submit"> - <input type="submit" class="btn btn-default" name="fCancel" value="{tr}Cancel{/tr}" /> - <input type="submit" class="btn btn-primary" name="fSaveXref" value="{tr}Save{/tr}" /> - </div> - {/form} - </div><!-- end .body --> -</div><!-- end .stock --> -{/strip} |
