mirror of
https://github.com/moodle/moodle.git
synced 2025-01-29 19:50:14 +01:00
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:
parent
8cadd23f98
commit
4f006bc149
@ -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!");
|
||||
}
|
||||
|
@ -24,6 +24,10 @@
|
||||
|
||||
$site = get_site();
|
||||
|
||||
if ($CFG->forcelogin) {
|
||||
require_login();
|
||||
}
|
||||
|
||||
if (empty($THEME->custompix)) {
|
||||
$pixpath = "$CFG->wwwroot/pix";
|
||||
} else {
|
||||
|
@ -23,6 +23,10 @@
|
||||
|
||||
$site = get_site();
|
||||
|
||||
if ($CFG->forcelogin) {
|
||||
require_login();
|
||||
}
|
||||
|
||||
$displaylist = array();
|
||||
$parentlist = array();
|
||||
make_categories_list($displaylist, $parentlist, "");
|
||||
|
@ -6,6 +6,10 @@
|
||||
error("404 - File Not Found");
|
||||
}
|
||||
|
||||
if ($CFG->forcelogin) {
|
||||
require_login();
|
||||
}
|
||||
|
||||
include($info->filepath);
|
||||
|
||||
print_header();
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -2,6 +2,10 @@
|
||||
|
||||
require("../config.php");
|
||||
|
||||
if ($CFG->forcelogin) {
|
||||
require_login();
|
||||
}
|
||||
|
||||
if (empty($CFG->langmenu)) {
|
||||
$langmenu = "";
|
||||
} else {
|
||||
|
@ -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");
|
||||
|
@ -9,6 +9,10 @@
|
||||
|
||||
$lifetime = 86400;
|
||||
|
||||
if ($CFG->forcelogin) {
|
||||
require_login();
|
||||
}
|
||||
|
||||
if (isset($file)) { // workaround for situations where / syntax doesn't work
|
||||
$pathinfo = $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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user