diff options
| author | Lester Caine ext:(%22) <lester@lsces.co.uk> | 2012-04-10 19:32:13 +0100 |
|---|---|---|
| committer | Lester Caine ext:(%22) <lester@lsces.co.uk> | 2012-04-10 19:32:13 +0100 |
| commit | 15d16c7025a3947379cbc7a0d1a359238cf3d6f1 (patch) | |
| tree | 2f755593b7d6a506ea513ac37cea38ca29ee47ed /add_xref.php | |
| parent | 5af03942572e04ac86f269657d04c0d278c943fb (diff) | |
| download | contact-15d16c7025a3947379cbc7a0d1a359238cf3d6f1.tar.gz contact-15d16c7025a3947379cbc7a0d1a359238cf3d6f1.tar.bz2 contact-15d16c7025a3947379cbc7a0d1a359238cf3d6f1.zip | |
Problem with static functions not passing data
Add_xref extracts identified data fields to generic fields for storage
Diffstat (limited to 'add_xref.php')
| -rw-r--r-- | add_xref.php | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/add_xref.php b/add_xref.php index 8c405fa..95d6d30 100644 --- a/add_xref.php +++ b/add_xref.php @@ -22,19 +22,27 @@ include_once( CONTACT_PKG_PATH.'lookup_contact_inc.php' ); if (isset($_REQUEST["fCancel"])) { if( !empty( $gContent->mContentId ) ) { - header("Location: ".$gContent->getDisplayUrl() ); + header("Location: ".$gContent->getDisplayUrl( $gContent->mContentId ) ); } else { header("Location: ".CONTACT_PKG_URL ); } die; } elseif (isset($_REQUEST["fAddXref"])) { + $source = $_REQUEST["source"]; + $format = $_REQUEST["format-".$source]; + if ( $format != 'generic' ) { + if ( isset( $_REQUEST[$format."xref"] ) ) { $_REQUEST["xref"] = $_REQUEST[$format."xref"]; } + if ( isset( $_REQUEST[$format."xkey"] ) ) { $_REQUEST["xkey"] = $_REQUEST[$format."xkey"]; } + if ( isset( $_REQUEST[$format."xkey_ext"] ) ) { $_REQUEST["xkey_ext"] = $_REQUEST[$format."xkey_ext"]; } + } if( $gContent->storeXref( $_REQUEST ) ) { - header("Location: ".$gContent->getDisplayUrl() ); + header("Location: ".$gContent->getDisplayUrl( $gContent->mContentId ) ); + die; } else { $xrefInfo = $_REQUEST; $xrefInfo['data'] = &$_REQUEST['edit']; } -} +} if( !isset( $_REQUEST['xref_type'] ) ) $_REQUEST['xref_type'] = 0; |
