Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-32117 EQUELLA plugin: Don't restrict to MIME types if '*' is used…

…, as user should be able to select any type at this point
  • Loading branch information...
commit cb1871a829c298ec0889d4ede7b33dd79de3d6a8 1 parent 1be875b
@nickread nickread authored danpoltawski committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 repository/equella/lib.php
View
4 repository/equella/lib.php
@@ -30,7 +30,7 @@ class repository_equella extends repository {
public function __construct($repositoryid, $context = SYSCONTEXTID, $options = array()) {
parent::__construct($repositoryid, $context, $options);
- if (!empty($this->options['mimetypes'])) {
+ if (!empty($this->options['mimetypes']) && !in_array('*', $this->options['mimetypes'])) {
$this->mimetypes = $this->options['mimetypes'];
$this->mimetypes = array_unique(array_map(array($this, 'toMimeType'), $this->options['mimetypes']));
} else {
@@ -48,7 +48,7 @@ public function __construct($repositoryid, $context = SYSCONTEXTID, $options = a
public function get_listing($path = null, $page = null) {
global $CFG, $COURSE;
$callbackurl = $CFG->wwwroot . '/repository/equella/callback.php?repo_id=' . $this->id;
-
+
$mimetypesstr = '';
if (!empty($this->mimetypes)) {
$mimetypesstr = '&mimeTypes=' . implode(',', $this->mimetypes);
Please sign in to comment.
Something went wrong with that request. Please try again.