Merging from stable.

Added required_param or optional_param.
This commit is contained in:
julmis 2005-11-17 10:37:41 +00:00
parent 119534750a
commit 8da03148ee
5 changed files with 6 additions and 6 deletions

View file

@ -1,6 +1,8 @@
<?php
include("../../config.php");
$id = optional_param('id', 0, PARAM_INT);
$lastmodified = filemtime("htmlarea.php");
$lifetime = 1800;

View file

@ -2,7 +2,7 @@
include("../../../config.php");
require_variable($id);
$id = required_param('id', PARAM_INT);
if (!$course = get_record("course", "id", $id)) {
$course->fullname = ""; // Just to keep display happy, though browsing may fail

View file

@ -2,7 +2,7 @@
include("../../../config.php");
require_variable($id);
$id = required_param('id', PARAM_INT);
if (!$course = get_record("course", "id", $id)) {
$course->fullname = ""; // Just to keep display happy, though browsing may fail

View file

@ -1,9 +1,7 @@
<?php // $Id$
include("../../../config.php");
$id = $_GET['id'];
require_variable($id);
$id = required_param('id', PARAM_INT);
if (!$course = get_record("course", "id", $id)) {
$course->fullname = ""; // Just to keep display happy, though browsing may fail

View file

@ -1,7 +1,7 @@
<?php // $Id$
include("../../../config.php");
$id = required_param('id');
$id = required_param('id', PARAM_INT);
if ($course = get_record("course", "id", $id)) {
$isteacher = isteacher($course->id);