From: skodak Date: Thu, 27 Aug 2009 19:20:03 +0000 (+0000) Subject: MDL-20169 fixed coding style, parameter type required X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=d4b5bd43930e090ab173428d563ced5166411d80;p=moodle.git MDL-20169 fixed coding style, parameter type required --- diff --git a/backup/restore_check.html b/backup/restore_check.html index 0be8409983..eeb85b1026 100644 --- a/backup/restore_check.html +++ b/backup/restore_check.html @@ -60,9 +60,9 @@ if (!isset($restore)) { //Check that we have all we need //backup_unique_code - $backup_unique_code = required_param( 'backup_unique_code' ); + $backup_unique_code = required_param('backup_unique_code', PARAM_INT); //file - $file = required_param( 'file'); + $file = required_param('file', PARAM_PATH); //Checks for the required restoremod parameters if ($allmods = $DB->get_records("modules")) { foreach ($allmods as $mod) { diff --git a/backup/restore_form.html b/backup/restore_form.html index 844d7ae181..982ee1b29a 100644 --- a/backup/restore_form.html +++ b/backup/restore_form.html @@ -18,9 +18,9 @@ //Check that we have all we need //backup_unique_code - $backup_unique_code = required_param( 'backup_unique_code' ); + $backup_unique_code = required_param('backup_unique_code', PARAM_INT); //file - $file = required_param( 'file' ); + $file = required_param('file', PARAM_PATH); //Check login require_login(); diff --git a/lib/ajax/setuserpref.php b/lib/ajax/setuserpref.php index e112aeffc2..0137ee928c 100644 --- a/lib/ajax/setuserpref.php +++ b/lib/ajax/setuserpref.php @@ -49,7 +49,7 @@ if (!isset($USER->ajax_updatable_user_prefs[$name])) { } // Get and the value. -$value = required_param('value', $USER->ajax_updatable_user_prefs[$name]); +$value = required_param('value', PARAM_RAW); // Update if (!set_user_preference($name, $value)) {