Skip to content

Commit aac3535

Browse files
committed
Merge remote-tracking branch 'origin/wip-111004-m401' into MOODLE_401_STABLE
2 parents 5104f7a + 54f3ac6 commit aac3535

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

lib.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ function auth_oidc_initialize_customicon($filefullname) {
9898
$fullpath = "/{$systemcontext->id}/auth_oidc/customicon/0{$file}";
9999

100100
$fs = get_file_storage();
101-
if (!$file = $fs->get_file_by_hash(sha1($fullpath)) || $file->is_directory()) {
101+
if (!($file = $fs->get_file_by_hash(sha1($fullpath))) || $file->is_directory()) {
102102
return false;
103103
}
104104
$pixpluginsdir = 'pix_plugins/auth/oidc/0';

settings.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,8 @@
226226
$configkey = new lang_string('cfg_customicon_key', 'auth_oidc');
227227
$configdesc = new lang_string('cfg_customicon_desc', 'auth_oidc');
228228
$customiconsetting = new admin_setting_configstoredfile('auth_oidc/customicon',
229-
get_string('cfg_customicon_key', 'auth_oidc'), get_string('cfg_customicon_desc', 'auth_oidc'), 'customicon');
229+
get_string('cfg_customicon_key', 'auth_oidc'), get_string('cfg_customicon_desc', 'auth_oidc'), 'customicon', 0,
230+
['accepted_types' => ['.png', '.jpg', '.ico'], 'maxbytes' => get_max_upload_file_size()]);
230231
$customiconsetting->set_updatedcallback('auth_oidc_initialize_customicon');
231232
$settings->add($customiconsetting);
232233

0 commit comments

Comments
 (0)