Skip to content

Commit

Permalink
Merge pull request #73 from oat-sa/release-0.8.0
Browse files Browse the repository at this point in the history
Release 0.8.0
  • Loading branch information
siwane authored Mar 3, 2017
2 parents b2deb34 + 82253c4 commit 4a946c4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion manifest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
'label' => 'extension-tao-mediamanager',
'description' => 'TAO media manager extension',
'license' => 'GPL-2.0',
'version' => '0.7.0',
'version' => '0.8.0',
'author' => 'Open Assessment Technologies SA',
'requires' => array(
'tao' => '>=7.74.0',
Expand Down
8 changes: 7 additions & 1 deletion model/ZipImporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
namespace oat\taoMediaManager\model;

use core_kernel_classes_Class;
use oat\oatbox\service\ServiceManager;
use oat\tao\model\upload\UploadService;
use tao_helpers_form_Form;

/**
Expand Down Expand Up @@ -56,9 +58,13 @@ public function import($class, $form)
$file = $form->getValue('source');
$resource = new core_kernel_classes_Class($form->getValue('classUri'));

/** @var UploadService $uploadService */
$uploadService = ServiceManager::getServiceManager()->get(UploadService::SERVICE_ID);
$uploadedFile = $uploadService->getUploadedFile($file['uploaded_file']);

// unzip the file
try {
$directory = $this->extractArchive($file['uploaded_file']);
$directory = $this->extractArchive($uploadedFile);
} catch (\Exception $e) {
return \common_report_Report::createFailure(__('Unable to extract the archive'));
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/update/Updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,6 @@ public function update($initialVersion)
$currentVersion = '0.3.0';
}

$this->skip('0.3.0', '0.7.0');
$this->skip('0.3.0', '0.8.0');
}
}

0 comments on commit 4a946c4

Please sign in to comment.