Fixed a bug with downloadSample that returns all accessible samples instead of the requested one, fixes #610

- fixed incorrect branch order causing this issue
pull/542/merge
Iglocska 2015-08-24 13:29:25 +02:00
parent 6ba92be513
commit 64485ad4a6
1 changed files with 2 additions and 3 deletions

View File

@ -2113,9 +2113,8 @@ class AttributesController extends AppController {
if ($hash) $validTypes = $this->Attribute->resolveHashType($hash);
$types = array();
if ($hash && $allSamples) {
if ($hash) {
debug($hash);
if ($hash) {
if ($allSamples) {
if (empty($validTypes)) {
$error = 'Invalid hash format (valid options are ' . implode(', ', array_keys($this->Attribute->hashTypes)) . ')';
}