diff options
author | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2008-12-28 08:06:03 +0000 |
---|---|---|
committer | Karl 'vollmerk' Vollmer <vollmer@ampache.org> | 2008-12-28 08:06:03 +0000 |
commit | 748af8fc7c3172c48f8be3a111bc2cf2af92eefd (patch) | |
tree | 4cb22b8738db577f930405c18448cb4c78ecabb5 /image.php | |
parent | a55a80fd30a6b45845fde643cd3f102c71efd071 (diff) | |
download | ampache-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.php | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -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) { |