Added support for CFG->forcelogin in some files. Bug 1396

(http://moodle.org/bugs/bug.php?op=show&bugid=1396)
This commit is contained in:
stronk7 2004-05-16 10:26:04 +00:00
parent 8cadd23f98
commit 4f006bc149
9 changed files with 38 additions and 3 deletions

View File

@ -3,18 +3,21 @@
// In editing mode, allows the admin to edit a category,
// and rearrange courses
require_once("../config.php");
require_once("lib.php");
require_once("../config.php");
require_once("lib.php");
require_variable($id); // Category id
optional_variable($page, "0"); // which page to show
optional_variable($perpage, "20"); // how many per page
if (!$site = get_site()) {
error("Site isn't defined!");
}
if ($CFG->forcelogin) {
require_login();
}
if (!$category = get_record("course_categories", "id", $id)) {
error("Category not known!");
}

View File

@ -24,6 +24,10 @@
$site = get_site();
if ($CFG->forcelogin) {
require_login();
}
if (empty($THEME->custompix)) {
$pixpath = "$CFG->wwwroot/pix";
} else {

View File

@ -23,6 +23,10 @@
$site = get_site();
if ($CFG->forcelogin) {
require_login();
}
$displaylist = array();
$parentlist = array();
make_categories_list($displaylist, $parentlist, "");

View File

@ -6,6 +6,10 @@
error("404 - File Not Found");
}
if ($CFG->forcelogin) {
require_login();
}
include($info->filepath);
print_header();

View File

@ -7,6 +7,10 @@
optional_variable($sub, ""); // sub-section (named anchor)
optional_variable($lang, ""); // override current language
if ($CFG->forcelogin) {
require_login();
}
if (!empty($lang)) {
$SESSION->lang = $lang;
}

View File

@ -2,6 +2,10 @@
require("../config.php");
if ($CFG->forcelogin) {
require_login();
}
if (empty($CFG->langmenu)) {
$langmenu = "";
} else {

View File

@ -7,6 +7,10 @@
$file = clean_filename($file);
if ($CFG->forcelogin) {
require_login();
}
if ($id) {
if (! $course = get_record("course", "id", $id)) {
error("Course is misconfigured");

View File

@ -9,6 +9,10 @@
$lifetime = 86400;
if ($CFG->forcelogin) {
require_login();
}
if (isset($file)) { // workaround for situations where / syntax doesn't work
$pathinfo = $file;

View File

@ -9,6 +9,10 @@
$lifetime = 86400;
if ($CFG->forcelogin) {
require_login();
}
if (isset($file)) { // workaround for situations where / syntax doesn't work
$pathinfo = $file;