diff options
Diffstat (limited to 'add_xref.php')
| -rw-r--r-- | add_xref.php | 50 |
1 files changed, 0 insertions, 50 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' ] ); |
