Permalink
Browse files

Merge branch 'MDL-23393' of git://git.luns.net.uk/moodle

  • Loading branch information...
2 parents 1cc0c36 + 9268148 commit 0017173f1ad98c25780408e5022ac7dc92cf380b Sam Hemelryk committed Jan 10, 2011
Showing with 4 additions and 1 deletion.
  1. +1 −0 blog/preferences.php
  2. +3 −1 blog/preferences_form.php
@@ -73,6 +73,7 @@
/// If data submitted, then process and store.
$mform = new blog_preferences_form('preferences.php');
+$mform->set_data(array('pagesize' => get_user_preferences('blogpagesize')));
if (!$mform->is_cancelled() && $data = $mform->get_data()) {
$pagesize = $data->pagesize;
@@ -39,7 +39,9 @@ public function definition() {
$strpagesize = get_string('pagesize', 'blog');
$mform->addElement('text', 'pagesize', $strpagesize);
- $mform->setDefault('pagesize', get_user_preferences('pagesize'));
+ $mform->setType('pagesize', PARAM_INT);
+ $mform->addRule('pagesize', null, 'numeric', null, 'client');
+ $mform->setDefault('pagesize', 10);
$this->add_action_buttons();
}

0 comments on commit 0017173

Please sign in to comment.