diff options
| author | Max Kremmel <xing@synapse.plus.com> | 2008-09-17 06:54:04 +0000 |
|---|---|---|
| committer | Max Kremmel <xing@synapse.plus.com> | 2008-09-17 06:54:04 +0000 |
| commit | d70b62b5d39984be56602406cc20b1fd42a18a6e (patch) | |
| tree | 8b169c2497f1b538256ad0ed1fe2cefca2a60c82 | |
| parent | 68c430c5c8d1e8d6ed00852eb207a3b2cb31ea8e (diff) | |
| download | fisheye-d70b62b5d39984be56602406cc20b1fd42a18a6e.tar.gz fisheye-d70b62b5d39984be56602406cc20b1fd42a18a6e.tar.bz2 fisheye-d70b62b5d39984be56602406cc20b1fd42a18a6e.zip | |
fix for fish and mime interaction - rushed commit cos i have to run
| -rw-r--r-- | FisheyeImage.php | 16 | ||||
| -rw-r--r-- | templates/view_image.tpl | 2 | ||||
| -rw-r--r-- | view_image.php | 4 |
3 files changed, 13 insertions, 9 deletions
diff --git a/FisheyeImage.php b/FisheyeImage.php index d0bd00b..ef45c93 100644 --- a/FisheyeImage.php +++ b/FisheyeImage.php @@ -1,6 +1,6 @@ <?php /** - * @version $Header: /cvsroot/bitweaver/_bit_fisheye/FisheyeImage.php,v 1.89 2008/09/14 17:22:37 spiderr Exp $ + * @version $Header: /cvsroot/bitweaver/_bit_fisheye/FisheyeImage.php,v 1.90 2008/09/17 06:54:04 squareing Exp $ * @package fisheye */ @@ -110,18 +110,22 @@ class FisheyeImage extends FisheyeBase { $this->mInfo['title'] = $this->getTitle(); $this->mInfo['display_url'] = $this->getDisplayUrl(); - // LibertyMime will load the attachment details + + // LibertyMime will load the attachment details in $this->mStorage LibertyMime::load( NULL, $pPluginParams ); // parse the data after parent load so we have our html prefs $this->mInfo['parsed_data'] = $this->parseData(); - // copy mStorage to mInfo for easy access - // Duplicate copy to mInfo['image_file'] for legacy tpl's + // Copy mStorage to mInfo['image_file'] for easy access if( !empty( $this->mStorage ) && count( $this->mStorage ) > 0 ) { + // it seems that this is not necessary and causes confusing copies of the same stuff all over the place + //$this->mInfo = array_merge( current( $this->mStorage ), $this->mInfo ); + // copy the image data by reference to reduce memory reset( $this->mStorage ); - $this->mInfo = array_merge( current( $this->mStorage ), $this->mInfo ); - $this->mInfo['image_file'] = current($this->mStorage); + $this->mInfo['image_file'] =& current( $this->mStorage ); + // override original display_url that mime knows where we keep the image + $this->mInfo['image_file']['display_url'] = $this->getDisplayUrl(); } else { $this->mInfo['image_file'] = NULL; } diff --git a/templates/view_image.tpl b/templates/view_image.tpl index 7bde54a..d89974e 100644 --- a/templates/view_image.tpl +++ b/templates/view_image.tpl @@ -30,7 +30,7 @@ {/if} {/if} - {include file=$gLibertySystem->getMimeTemplate('view',$gContent->mInfo.attachment_plugin_guid) attachment=$gContent->mInfo} + {include file=$gLibertySystem->getMimeTemplate('view',$gContent->mInfo.attachment_plugin_guid) attachment=$gContent->mInfo.image_file} {if $gBitSystem->isFeatureActive('fisheye_image_list_description') and $gContent->mInfo.data ne ''} <p class="description">{$gContent->mInfo.parsed_data}</p> diff --git a/view_image.php b/view_image.php index aaf2459..19cd3f2 100644 --- a/view_image.php +++ b/view_image.php @@ -1,6 +1,6 @@ <?php /** - * @version $Header: /cvsroot/bitweaver/_bit_fisheye/view_image.php,v 1.12 2008/09/15 01:51:28 spiderr Exp $ + * @version $Header: /cvsroot/bitweaver/_bit_fisheye/view_image.php,v 1.13 2008/09/17 06:54:04 squareing Exp $ * @package fisheye * @subpackage functions */ @@ -43,6 +43,6 @@ if( is_object( $gGallery ) && $gGallery->isCommentable() ) { $gContent->addHit(); -$gContent->mInfo['original'] = TRUE; +$gContent->mInfo['image_file']['original'] = TRUE; require_once( FISHEYE_PKG_PATH.'display_fisheye_image_inc.php' ); ?> |
