parameter cleaup - round 4

This commit is contained in:
skodak 2006-03-06 19:27:25 +00:00
parent de533d2612
commit a2eaae6102
7 changed files with 28 additions and 36 deletions

View File

@ -5,12 +5,12 @@
// This page is not yet in service, the whole plug-in architecture
// for question types is still under construction.
require_once("../config.php");
require_once('../config.php');
$disable = optional_param('disable');
$enable = optional_param('enable');
$delete = optional_param('delete');
$confirm = optional_param('confirm');
$show = optional_param('show', '', PARAM_SAFEDIR);
$hide = optional_param('hide', '', PARAM_SAFEDIR);
$delete = optional_param('delete', '', PARAM_SAFEDIR);
$confirm = optional_param('confirm', '', PARAM_BOOL);
require_login();
@ -62,9 +62,9 @@
$strqtypename = get_string("qtypename", "qtype_$delete");
if (empty($confirm)) {
if (!$confirm) {
notice_yesno(get_string("qtypedeleteconfirm", "admin", $strqtypename),
"questiontypes.php?delete=$delete&confirm=$delete&sesskey=$USER->sesskey",
"questiontypes.php?delete=$delete&confirm=1&sesskey=$USER->sesskey",
"questiontypes.php");
print_footer();
exit;

View File

@ -1,7 +1,7 @@
<?php // $Id$
// register.php - allows admin to register their site on moodle.org
include("../config.php");
require_once('../config.php');
require_login();

View File

@ -1,10 +1,10 @@
<?php /// $Id$
/// Search and replace strings throughout all texts in the whole database
require('../config.php');
require_once('../config.php');
$search = optional_param('search', '');
$replace = optional_param('replace', '');
$search = optional_param('search', '', PARAM_RAW);
$replace = optional_param('replace', '', PARAM_RAW);
require_login();

View File

@ -1,11 +1,11 @@
<?php
require_once(dirname(dirname(__FILE__)).'/config.php');
require_once('../config.php');
require_once($CFG->dirroot.'/lib/statslib.php');
$report = optional_param('report',STATS_REPORT_ACTIVE_COURSES,PARAM_INT);
$time = optional_param('time',0,PARAM_INT);
$numcourses = optional_param('numcourses',20,PARAM_INT);
$report = optional_param('report', STATS_REPORT_ACTIVE_COURSES, PARAM_INT);
$time = optional_param('time', 0, PARAM_INT);
$numcourses = optional_param('numcourses', 20, PARAM_INT);
if (empty($CFG->enablestats)) {
error("Stats is not enabled.");

View File

@ -1,12 +1,12 @@
<?php
{
require_once(dirname(dirname(__FILE__)).'/config.php');
<?php // $Id$
require_once('../config.php');
require_once($CFG->dirroot.'/lib/statslib.php');
require_once($CFG->dirroot.'/lib/graphlib.php');
$report = required_param('report',0,PARAM_INT);
$time = required_param('time',0,PARAM_INT);
$numcourses = required_param('numcourses',20,PARAM_INT);
$report = required_param('report', PARAM_INT);
$time = required_param('time', PARAM_INT);
$numcourses = required_param('numcourses', PARAM_INT);
require_login();
@ -51,6 +51,4 @@
$graph->draw_stack();
}
?>

View File

@ -1,7 +1,7 @@
<?php // $Id$
require_once("../config.php");
require_once("../course/lib.php");
require_once('../config.php');
require_once('../course/lib.php');
if ($site = get_site()) {
require_login();
@ -11,6 +11,8 @@
$site->format = "social"; // override
}
$focus = "form.fullname";
/// If data submitted, then process and store.
if ($form = data_submitted()) {
@ -102,10 +104,6 @@
set_config("frontpage", $form->frontpage);
}
if (empty($focus)) {
$focus = "form.fullname";
}
$stradmin = get_string("administration");
$strconfiguration = get_string("configuration");
$strsitesettings = get_string("sitesettings");

View File

@ -1,12 +1,11 @@
<?
{
<?PHP // $Id$
require_once(dirname(dirname(__FILE__)).'/config.php');
require_once('../config.php');
require_once($CFG->dirroot.'/my/pagelib.php');
require_once($CFG->dirroot.'/lib/pagelib.php');
require_once($CFG->dirroot.'/lib/blocklib.php');
$pt = optional_param('pt',null,PARAM_CLEAN);
$pt = optional_param('pt', null, PARAM_SAFEDIR); //alhanumeric and -
$pagetypes = array(PAGE_MY_MOODLE => array('id' => PAGE_MY_MOODLE,
'lib' => '/my/pagelib.php',
@ -84,7 +83,4 @@
print_footer();
}
?>