]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-20169 fixed coding style, parameter type required
authorskodak <skodak>
Thu, 27 Aug 2009 19:20:03 +0000 (19:20 +0000)
committerskodak <skodak>
Thu, 27 Aug 2009 19:20:03 +0000 (19:20 +0000)
backup/restore_check.html
backup/restore_form.html
lib/ajax/setuserpref.php

index 0be840998399c019f503521257d24869bbaa0099..eeb85b1026e615e0fdf4a457dcd5f7a63066decf 100644 (file)
@@ -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) {
index 844d7ae18147e8d95c9b30c39cecd62b49b5e3b4..982ee1b29a5f9fc9894b910e959db0fb47e184d7 100644 (file)
@@ -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();
index e112aeffc2e815ac4309395bff11a3f840c5245d..0137ee928cdc2c9d05b92bc75c2e1f42b4b4ac2b 100644 (file)
@@ -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)) {