mirror of
https://github.com/moodle/moodle.git
synced 2025-04-27 11:23:06 +02:00
Merge branch 'MDL-48889-master' of git://github.com/jethac/moodle
This commit is contained in:
commit
21c7e25a94
@ -105,7 +105,13 @@ class repository_s3 extends repository {
|
||||
try {
|
||||
$buckets = $this->s->listBuckets();
|
||||
} catch (S3Exception $e) {
|
||||
throw new moodle_exception('errorwhilecommunicatingwith', 'repository', '', $this->get_name());
|
||||
throw new moodle_exception(
|
||||
'errorwhilecommunicatingwith',
|
||||
'repository',
|
||||
'',
|
||||
$this->get_name(),
|
||||
$e->getMessage()
|
||||
);
|
||||
}
|
||||
foreach ($buckets as $bucket) {
|
||||
$folder = array(
|
||||
@ -124,7 +130,13 @@ class repository_s3 extends repository {
|
||||
try {
|
||||
$contents = $this->s->getBucket($bucket, $uri, null, null, '/', true);
|
||||
} catch (S3Exception $e) {
|
||||
throw new moodle_exception('errorwhilecommunicatingwith', 'repository', '', $this->get_name());
|
||||
throw new moodle_exception(
|
||||
'errorwhilecommunicatingwith',
|
||||
'repository',
|
||||
'',
|
||||
$this->get_name(),
|
||||
$e->getMessage()
|
||||
);
|
||||
}
|
||||
foreach ($contents as $object) {
|
||||
|
||||
@ -199,7 +211,13 @@ class repository_s3 extends repository {
|
||||
try {
|
||||
$this->s->getObject($bucket, $uri, $path);
|
||||
} catch (S3Exception $e) {
|
||||
throw new moodle_exception('errorwhilecommunicatingwith', 'repository', '', $this->get_name());
|
||||
throw new moodle_exception(
|
||||
'errorwhilecommunicatingwith',
|
||||
'repository',
|
||||
'',
|
||||
$this->get_name(),
|
||||
$e->getMessage()
|
||||
);
|
||||
}
|
||||
return array('path' => $path);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user