]> git.mjollnir.org Git - moodle.git/commitdiff
Added support for CFG->forcelogin in some files. Bug 1396
authorstronk7 <stronk7>
Sun, 16 May 2004 10:26:04 +0000 (10:26 +0000)
committerstronk7 <stronk7>
Sun, 16 May 2004 10:26:04 +0000 (10:26 +0000)
(http://moodle.org/bugs/bug.php?op=show&bugid=1396)

course/category.php
course/info.php
course/search.php
doc/contents.php
doc/index.php
doc/top.php
doc/view.php
user/pix.php
user/pixgroup.php

index 096cf0de4db507e025f3e7d2a3583c92b4af0372..0b91c17f5095f6964128ebc879defb2599cfff68 100644 (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!");
     }
index eda64232186eae250c26a2c9ab00414783c7e6c6..7baae3b2cc6a4e9420b104ec3e12f74d35302dc4 100644 (file)
 
     $site = get_site();
 
+    if ($CFG->forcelogin) {
+        require_login();
+    }
+
     if (empty($THEME->custompix)) {
         $pixpath = "$CFG->wwwroot/pix";
     } else {
index 8eac25f971ea3ad20672cf56bda4a3681739bd27..9a5d4843d6290c6d22d1603409feda3b4a190f4e 100644 (file)
 
     $site = get_site();
 
+    if ($CFG->forcelogin) {
+        require_login();
+    }
+
     $displaylist = array();
     $parentlist = array();
     make_categories_list($displaylist, $parentlist, "");
index bbde6f7797c2f18dafdf90003043121a157cc232..f101a467ab4a5031d8e71896cd574d75fc82a227 100755 (executable)
@@ -6,6 +6,10 @@
         error("404 - File Not Found");\r
     }\r
 \r
+    if ($CFG->forcelogin) {\r
+        require_login();\r
+    }\r
+\r
     include($info->filepath);\r
 \r
     print_header();\r
index a73030b188d43a5067e876cfb43bd35b6fc60842..46be9c2742596024088a64e15ed1729e45f8981a 100644 (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;
     }
index 1618cdef51e8a0669b172594fa4db5d55e47243b..bef501e38a07c642a627d33758f9e5fbb246dc53 100644 (file)
@@ -2,6 +2,10 @@
 
     require("../config.php");
 
+    if ($CFG->forcelogin) {
+        require_login();
+    }
+
     if (empty($CFG->langmenu)) {
         $langmenu = "";
     } else {
index 088c59f30677963fecfee83729009f3143726b16..f3efc204c6a6ab68f7e910ea762aa9a701dd1273 100644 (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");
index 979214893864c579f65d6471748387c7f33e8d42..0929d942f5a434bfe7700872ae6a49fb7410887a 100644 (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;
 
index c5505a204cb08389187b3dcffc9b5739cdce6799..53654f782d7294af85b5a63dd5e6cf05177d0a89 100644 (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;