summaryrefslogtreecommitdiff
path: root/display_contact.php
diff options
context:
space:
mode:
authorlsces <lester@lsces.co.uk>2025-08-24 15:35:09 +0100
committerlsces <lester@lsces.co.uk>2025-08-24 15:35:09 +0100
commitce4fa87baac56fe2478cfea56b539cba63887467 (patch)
tree6d5f6a74d4d80fcc11b12ce2fa86715e1bff9b88 /display_contact.php
parent69b08377a8a2d3791b21d96720657d93beda2af0 (diff)
downloadcontact-ce4fa87baac56fe2478cfea56b539cba63887467.tar.gz
contact-ce4fa87baac56fe2478cfea56b539cba63887467.tar.bz2
contact-ce4fa87baac56fe2478cfea56b539cba63887467.zip
Just a crude merging of the PHP7 code base with the PHP8.4 version
Diffstat (limited to 'display_contact.php')
-rwxr-xr-x[-rw-r--r--]display_contact.php40
1 files changed, 20 insertions, 20 deletions
diff --git a/display_contact.php b/display_contact.php
index 151ee3a..749ac98 100644..100755
--- a/display_contact.php
+++ b/display_contact.php
@@ -13,38 +13,39 @@
/**
* required setup
*/
-require_once( '../kernel/setup_inc.php' );
+use Bitweaver\Fisheye\FisheyeGallery;
+
+require_once '../kernel/includes/setup_inc.php';
$gBitSystem->verifyPackage( 'contact' );
$gBitSystem->verifyPermission( 'p_contact_view' );
-include_once( CONTACT_PKG_PATH.'lookup_contact_inc.php' );
+include_once CONTACT_PKG_INCLUDE_PATH . 'lookup_contact_inc.php';
-require_once( FISHEYE_PKG_PATH.'FisheyeGallery.php');
-require_once( FISHEYE_PKG_PATH.'FisheyeImage.php');
global $gBitSystem, $fisheyeErrors, $fisheyeWarnings, $fisheyeSuccess;
-$lookup = array();
-$gGallery = new FisheyeGallery(4);
+$lookup = [];
+$lookup['max_records'] = 4;
+$gGallery = new FisheyeGallery( $gContent->mInfo['client_gallery'] );
$gGallery->load();
-$gGallery->loadImages(0,4);
-$gBitSmarty->assignByRef('gGallery', $gGallery);
-$gBitSmarty->assignByRef('galleryId', $gGallery->mGalleryId);
-$gBitSmarty->assign('galLayout', 'fixed_grid');
+$gGallery->loadImages( $lookup );
+$gBitSmarty->assign( 'gGallery', $gGallery );
+$gBitSmarty->assign( 'galleryId', $gGallery->mGalleryId );
+$gBitSmarty->assign( 'galLayout', 'fixed_grid' );
-if ( !$gContent->isValid() ) {
- header ("location: ".CONTACT_PKG_URL."list.php");
+if (!$gContent->isValid()) {
+ header( "location: " . CONTACT_PKG_URL . "list.php" );
die;
}
-if( $gContent->isCommentable() ) {
+if ($gContent->isCommentable()) {
$commentsParentId = $gContent->mContentId;
- $comments_vars = Array('contact');
- $comments_prefix_var='contact:';
- $comments_object_var='contact';
- $comments_return_url = $_SERVER['PHP_SELF']."?content_id=".$gContent->mContentId;
- include_once( LIBERTY_PKG_PATH.'comments_inc.php' );
+ $comments_vars = [ 'contact' ];
+ $comments_prefix_var = 'contact:';
+ $comments_object_var = 'contact';
+ $comments_return_url = $_SERVER['PHP_SELF'] . "?content_id=" . $gContent->mContentId;
+ include_once LIBERTY_PKG_INCLUDE_PATH . 'comments_inc.php';
- if ( isset($_REQUEST['post_comment_submit']) and !$_REQUEST['post_comment_submit'] == 'Post' ) {
+ if (isset($_REQUEST['post_comment_submit']) and !$_REQUEST['post_comment_submit'] == 'Post' ) {
header ("location: ".CONTACT_PKG_URL."index.php?content_id=".$gContent->mContentId );
die;
}
@@ -54,4 +55,3 @@ $gContent->mInfo['type'] = $gContent->getContactGroupList();
$gBitSystem->setBrowserTitle("Contact Information");
$gBitSystem->display( 'bitpackage:contact/show_contact.tpl');
-?>