Merge branch 'MDL-69187' of https://github.com/paulholden/moodle
This commit is contained in:
+4
-1
@@ -2067,9 +2067,12 @@ function get_mimetype_description($obj, $capitalise=false) {
|
||||
*/
|
||||
function file_get_typegroup($element, $groups) {
|
||||
static $cached = array();
|
||||
|
||||
// Turn groups into a list.
|
||||
if (!is_array($groups)) {
|
||||
$groups = array($groups);
|
||||
$groups = preg_split('/[\s,;:"\']+/', $groups, -1, PREG_SPLIT_NO_EMPTY);
|
||||
}
|
||||
|
||||
if (!array_key_exists($element, $cached)) {
|
||||
$cached[$element] = array();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user