mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Merging from stable.
Added required_param or optional_param.
This commit is contained in:
parent
119534750a
commit
8da03148ee
5 changed files with 6 additions and 6 deletions
|
@ -1,6 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
include("../../config.php");
|
include("../../config.php");
|
||||||
|
|
||||||
|
$id = optional_param('id', 0, PARAM_INT);
|
||||||
|
|
||||||
$lastmodified = filemtime("htmlarea.php");
|
$lastmodified = filemtime("htmlarea.php");
|
||||||
$lifetime = 1800;
|
$lifetime = 1800;
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
include("../../../config.php");
|
include("../../../config.php");
|
||||||
|
|
||||||
require_variable($id);
|
$id = required_param('id', PARAM_INT);
|
||||||
|
|
||||||
if (!$course = get_record("course", "id", $id)) {
|
if (!$course = get_record("course", "id", $id)) {
|
||||||
$course->fullname = ""; // Just to keep display happy, though browsing may fail
|
$course->fullname = ""; // Just to keep display happy, though browsing may fail
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
include("../../../config.php");
|
include("../../../config.php");
|
||||||
|
|
||||||
require_variable($id);
|
$id = required_param('id', PARAM_INT);
|
||||||
|
|
||||||
if (!$course = get_record("course", "id", $id)) {
|
if (!$course = get_record("course", "id", $id)) {
|
||||||
$course->fullname = ""; // Just to keep display happy, though browsing may fail
|
$course->fullname = ""; // Just to keep display happy, though browsing may fail
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
<?php // $Id$
|
<?php // $Id$
|
||||||
include("../../../config.php");
|
include("../../../config.php");
|
||||||
|
|
||||||
$id = $_GET['id'];
|
$id = required_param('id', PARAM_INT);
|
||||||
|
|
||||||
require_variable($id);
|
|
||||||
|
|
||||||
if (!$course = get_record("course", "id", $id)) {
|
if (!$course = get_record("course", "id", $id)) {
|
||||||
$course->fullname = ""; // Just to keep display happy, though browsing may fail
|
$course->fullname = ""; // Just to keep display happy, though browsing may fail
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php // $Id$
|
<?php // $Id$
|
||||||
include("../../../config.php");
|
include("../../../config.php");
|
||||||
|
|
||||||
$id = required_param('id');
|
$id = required_param('id', PARAM_INT);
|
||||||
|
|
||||||
if ($course = get_record("course", "id", $id)) {
|
if ($course = get_record("course", "id", $id)) {
|
||||||
$isteacher = isteacher($course->id);
|
$isteacher = isteacher($course->id);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue