summaryrefslogtreecommitdiff
path: root/liberty_plugins
diff options
context:
space:
mode:
authorspiderr <spider@viovio.com>2012-07-25 13:25:09 -0400
committerspiderr <spider@viovio.com>2012-07-25 13:25:09 -0400
commit9afbf3c1fffff956aa074eed5423a9a9449a87b4 (patch)
tree3c084913d0ae390e9a568e2bf3ecc74b406027bd /liberty_plugins
parentdef5e12a4f883e0c746f2a949b00f961db30fbc0 (diff)
downloadfisheye-9afbf3c1fffff956aa074eed5423a9a9449a87b4.tar.gz
fisheye-9afbf3c1fffff956aa074eed5423a9a9449a87b4.tar.bz2
fisheye-9afbf3c1fffff956aa074eed5423a9a9449a87b4.zip
use getDownloadUrl() method
Diffstat (limited to 'liberty_plugins')
-rw-r--r--liberty_plugins/data.image.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/liberty_plugins/data.image.php b/liberty_plugins/data.image.php
index d421158..178aedc 100644
--- a/liberty_plugins/data.image.php
+++ b/liberty_plugins/data.image.php
@@ -74,7 +74,7 @@ function data_image( $pData, $pParams ) {
if( $item->load() ) {
// insert source url if we need the original file
if( !empty( $pParams['size'] ) && $pParams['size'] == 'original' ) {
- $thumbUrl = $item->mInfo['source_url'];
+ $thumbUrl = $item->getDownloadUrl();
} elseif( $item->mInfo['thumbnail_url'] ) {
$thumbUrl = ( !empty( $pParams['size'] ) && !empty( $item->mInfo['thumbnail_url'][$pParams['size']] ) ? $item->mInfo['thumbnail_url'][$pParams['size']] : $item->mInfo['thumbnail_url']['medium'] );
}
@@ -100,8 +100,8 @@ function data_image( $pData, $pParams ) {
// if this image is linking to something, wrap the image with the <a>
$ret = '<a href="'.trim( $wrapper['link'] ).'">'.$ret.'</a>';
} elseif ( empty( $pParams['size'] ) || $pParams['size'] != 'original' ) {
- if ( !empty( $item->mInfo['source_url'] ) ) {
- $ret = '<a href="'.trim( $item->mInfo['source_url'] ).'">'.$ret.'</a>';
+ if ( $item->getDownloadUrl() ) {
+ $ret = '<a href="'.trim( $item->getDownloadUrl() ).'">'.$ret.'</a>';
} else if ( !empty( $item->mInfo['media_url'] ) ) {
$ret = '<a href="'.trim( $item->mInfo['media_url'] ).'">'.$ret.'</a>';
}