From 648aad913a81dbd6317239edcc1d0e46d664dfcd Mon Sep 17 00:00:00 2001 From: Andrew Davis Date: Wed, 13 Jun 2012 11:49:13 +0700 Subject: [PATCH] MDL-33686 Repositories: we were accessing a non-existent variable and thus never displaying the maximum number of attachments --- files/renderer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/renderer.php b/files/renderer.php index 2f5f5d41221..4d9dbcefa1d 100644 --- a/files/renderer.php +++ b/files/renderer.php @@ -453,11 +453,11 @@ class core_files_renderer extends plugin_renderer_base { */ private function fm_print_restrictions($fm) { $maxbytes = display_size($fm->options->maxbytes); - if (empty($options->maxfiles) || $options->maxfiles == -1) { + if (empty($fm->options->maxfiles) || $fm->options->maxfiles == -1) { $maxsize = get_string('maxfilesize', 'moodle', $maxbytes); //$string['maxfilesize'] = 'Maximum size for new files: {$a}'; } else { - $strparam = (object)array('size' => $maxbytes, 'attachments' => $options->maxfiles); + $strparam = (object)array('size' => $maxbytes, 'attachments' => $fm->options->maxfiles); $maxsize = get_string('maxsizeandattachments', 'moodle', $strparam); //$string['maxsizeandattachments'] = 'Maximum size for new files: {$a->size}, maximum attachments: {$a->attachments}'; }