Skip to content

Commit

Permalink
Merge branch 'no-file-upload'
Browse files Browse the repository at this point in the history
  • Loading branch information
Schrank committed Sep 14, 2017
2 parents 09e8ca0 + 38c8c8e commit 6755d7e
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ public function prepareForSave($data)
}
}

if (empty($data['value']) && empty($data['existing'])) {
return '';
}

$fileName = !empty($data['value']) ? $data['value'] : $data['existing'];
return Mage_Core_Model_File_Uploader::getNewFileName(strtolower($fileName));
}
Expand Down Expand Up @@ -100,4 +104,4 @@ protected function uploadComplete()
{
return ($this->extractFilePostInformation('error') === UPLOAD_ERR_OK);
}
}
}

0 comments on commit 6755d7e

Please sign in to comment.