]> git.mjollnir.org Git - moodle.git/commitdiff
Replace require_variable() by required_param()
authorgustav_delius <gustav_delius>
Thu, 6 Apr 2006 12:56:37 +0000 (12:56 +0000)
committergustav_delius <gustav_delius>
Thu, 6 Apr 2006 12:56:37 +0000 (12:56 +0000)
blog/edit.php
enrol/paypal/return.php

index c0c563052b6cd337b37919a57ada439a52b120b3..329fa272617de36c8f86679254af01c64be2cf30 100755 (executable)
@@ -107,7 +107,7 @@ if (($post = data_submitted( get_referer() )) && confirm_sesskey()) {
         } else if ($post->act == 'update') {
             do_update($post, $PAGE->bloginfo);
         } else if ($post->act == 'del') {
-            require_variable($postid);
+            $postid = required_param('postid', PARAM_INT);
             do_delete($PAGE->bloginfo, $postid);
         }
     }
index e6d5ebecf81cfecd753dcdc08904db912d091af5..f97e265de7d5170e2d2d6d5f3e2d4da36a85d8c1 100644 (file)
@@ -3,7 +3,7 @@
     require("../../config.php");
     require_once("$CFG->dirroot/enrol/paypal/enrol.php");
 
-    require_variable($id);
+    $id = required_param('id', PARAM_INT);
 
     if (!$course = get_record("course", "id", $id)) {
         redirect($CFG->wwwroot);