Merge branch 'MDL-33686_options' of git://github.com/andyjdavis/moodle
authorSam Hemelryk <sam@moodle.com>
Mon, 2 Jul 2012 02:53:31 +0000 (14:53 +1200)
committerSam Hemelryk <sam@moodle.com>
Mon, 2 Jul 2012 02:53:31 +0000 (14:53 +1200)
1  2 
files/renderer.php

@@@ -455,11 -453,13 +455,11 @@@ class core_files_renderer extends plugi
       */
      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}';
          }
          // TODO MDL-32020 also should say about 'File types accepted'
          return '<span>'. $maxsize. '</span>';