summaryrefslogtreecommitdiffstats
path: root/image.php
diff options
context:
space:
mode:
authorKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-12-28 08:06:03 +0000
committerKarl 'vollmerk' Vollmer <vollmer@ampache.org>2008-12-28 08:06:03 +0000
commit748af8fc7c3172c48f8be3a111bc2cf2af92eefd (patch)
tree4cb22b8738db577f930405c18448cb4c78ecabb5 /image.php
parenta55a80fd30a6b45845fde643cd3f102c71efd071 (diff)
downloadampache-748af8fc7c3172c48f8be3a111bc2cf2af92eefd.tar.gz
ampache-748af8fc7c3172c48f8be3a111bc2cf2af92eefd.tar.bz2
ampache-748af8fc7c3172c48f8be3a111bc2cf2af92eefd.zip
fix issue where the small thumbnail is used for larger images if resize album art enabled
Diffstat (limited to 'image.php')
-rw-r--r--image.php14
1 files changed, 6 insertions, 8 deletions
diff --git a/image.php b/image.php
index 53ff786d..85bd9041 100644
--- a/image.php
+++ b/image.php
@@ -31,11 +31,7 @@ define('NO_SESSION','1');
require 'lib/init.php';
// Check to see if they've got an interface session or a valid API session, if not GTFO
-if ( !vauth::session_exists('interface',$_COOKIE[Config::get('session_name')])
- AND !vauth::session_exists('api',$_REQUEST['auth'])
- AND !vauth::session_exists('xml-rpc',$_REQUEST['auth'])
- )
-{
+if (!vauth::session_exists('interface',$_COOKIE[Config::get('session_name')]) AND !vauth::session_exists('api',$_REQUEST['auth']) AND !vauth::session_exists('xml-rpc',$_REQUEST['auth'])) {
debug_event('DENIED','Image Access, Checked Cookie Session and Auth:' . $_REQUEST['auth'],'1');
exit;
}
@@ -50,18 +46,20 @@ switch ($_REQUEST['thumb']) {
case '2':
$size['height'] = '128';
$size['width'] = '128';
+ $return_raw = true;
break;
case '3':
/* This is used by the flash player */
$size['height'] = '80';
$size['width'] = '80';
+ $return_raw = true;
break;
-
default:
$size['height'] = '275';
$size['width'] = '275';
+ $return_raw = true;
break;
-}
+} // define size based on thumbnail
switch ($_REQUEST['type']) {
case 'popup':
@@ -89,7 +87,7 @@ switch ($_REQUEST['type']) {
$album = new Album($_REQUEST['id']);
// Attempt to pull art from the database
- $art = $album->get_art();
+ $art = $album->get_art($return_raw);
$mime = $art['mime'];
if (!$mime) {