Skip to content

Commit

Permalink
Fixed bug with file uploads and the form block
Browse files Browse the repository at this point in the history
  • Loading branch information
aembler committed Nov 17, 2014
1 parent af48886 commit 3c84a9f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion web/concrete/blocks/form/controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
use Page;
use UserInfo;
use Exception;
use FileImporter;
use FileSet;
use File;
use \Concrete\Core\File\Version;

class Controller extends BlockController {
public $btTable = 'btForm';
public $btQuestionsTablename = 'btFormQuestions';
Expand Down Expand Up @@ -319,7 +324,7 @@ function action_submit_form() {
}
$fi = new FileImporter();
$resp = $fi->import($_FILES[$questionName]['tmp_name'], $_FILES[$questionName]['name']);
if (!($resp instanceof FileVersion)) {
if (!($resp instanceof Version)) {
switch($resp) {
case FileImporter::E_FILE_INVALID_EXTENSION:
$errors['fileupload'] = t('Invalid file extension.');
Expand Down

0 comments on commit 3c84a9f

Please sign in to comment.