MDL-38712 mod_glossary: fix missing PARAM type
authorDan Poltawski <dan@moodle.com>
Tue, 26 Mar 2013 09:05:10 +0000 (17:05 +0800)
committerDan Poltawski <dan@moodle.com>
Tue, 26 Mar 2013 09:05:10 +0000 (17:05 +0800)
mod/glossary/mod_form.php

index e7af45a..5342979 100644 (file)
@@ -29,6 +29,7 @@ class mod_glossary_mod_form extends moodleform_mod {
         $mform->setDefault('entbypage', 10);
         $mform->addRule('entbypage', null, 'required', null, 'client');
         $mform->addRule('entbypage', null, 'numeric', null, 'client');
         $mform->setDefault('entbypage', 10);
         $mform->addRule('entbypage', null, 'required', null, 'client');
         $mform->addRule('entbypage', null, 'numeric', null, 'client');
+        $mform->setType('entbypage', PARAM_INT);
 
         if (has_capability('mod/glossary:manageentries', context_system::instance())) {
             $mform->addElement('checkbox', 'globalglossary', get_string('isglobal', 'glossary'));
 
         if (has_capability('mod/glossary:manageentries', context_system::instance())) {
             $mform->addElement('checkbox', 'globalglossary', get_string('isglobal', 'glossary'));