diff options
| author | "Lester Caine ext:(%22) <lester@lsces.co.uk> | 2010-11-03 09:46:53 +0000 |
|---|---|---|
| committer | "Lester Caine ext:(%22) <lester@lsces.co.uk> | 2010-11-03 09:46:53 +0000 |
| commit | 3261da3afcc151ebc1ddd77b1055d5bde3c70b7f (patch) | |
| tree | a582efa13411b27c7a3a041a38d8afe6d42d26ff /edit_xref.php | |
| download | contact-3261da3afcc151ebc1ddd77b1055d5bde3c70b7f.tar.gz contact-3261da3afcc151ebc1ddd77b1055d5bde3c70b7f.tar.bz2 contact-3261da3afcc151ebc1ddd77b1055d5bde3c70b7f.zip | |
Import package again after stripping private data which should not have been commited
Diffstat (limited to 'edit_xref.php')
| -rw-r--r-- | edit_xref.php | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/edit_xref.php b/edit_xref.php new file mode 100644 index 0000000..2815875 --- /dev/null +++ b/edit_xref.php @@ -0,0 +1,61 @@ +<?php +/** + * $Header: /cvsroot/bitweaver/_bit_contact/edit.php,v 1.6 2010/02/08 21:27:22 wjames5 Exp $ + * + * Copyright (c) 2006 bitweaver.org + * All Rights Reserved. See below for details and a complete list of authors. + * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See http://www.gnu.org/copyleft/lesser.html for details + * + * @package contact + * @subpackage functions + */ + +/** + * required setup + */ +require_once( '../kernel/setup_inc.php' ); + +$gBitSystem->verifyPackage( 'contact' ); +$gBitSystem->verifyPermission( 'p_contact_update' ); + +include_once( CONTACT_PKG_PATH.'lookup_contact_inc.php' ); + +if( !empty( $_REQUEST['xref_id'] ) ) { + $gContent->loadXref( $_REQUEST['xref_id'] ); +} + +if (isset($_REQUEST["fCancel"])) { + if( !empty( $gContent->mContentId ) ) { + header("Location: ".$gContent->getDisplayUrl() ); + } else { + header("Location: ".CONTACT_PKG_URL ); + } + die; +} else if(isset($_REQUEST["fSaveXref"])) { + if( $gContent->storeXref( $_REQUEST ) ) { + header("Location: ".$gContent->getDisplayUrl() ); + die; + } else { + $xrefInfo = $_REQUEST; + $xrefInfo['data'] = &$_REQUEST['edit']; + } +} else if(isset( $_REQUEST["expunge"] ) ) { + if( $gContent->stepXref( $_REQUEST ) ) { + if ( $_REQUEST['expunge'] > 2) { + header("Location: ".$gContent->getDisplayUrl() ); + die; + } + } +} + +// formInfo might be set due to a error on submit +if( empty( $xrefInfo ) ) { + $xrefInfo = &$gContent->mInfo['xref_store']['data']; +} +$gBitSmarty->assign_by_ref( 'xrefInfo', $xrefInfo ); +$gBitSmarty->assign_by_ref( 'title', $gContent->mInfo['title'] ); +$gBitSmarty->assign_by_ref( 'xref_title', $gContent->mInfo['xref_title'] ); + +$gBitSmarty->assign_by_ref( 'errors', $gContent->mErrors ); +$gBitSystem->display( 'bitpackage:contact/edit_xref.tpl', 'Edit: ' , array( 'display_mode' => 'edit' )); +?> |
