From 0182c65cec8a62be2fc3373f7b7bf2abfb5bd888 Mon Sep 17 00:00:00 2001 From: moodler Date: Tue, 18 Jan 2005 18:28:25 +0000 Subject: [PATCH] Fixed the problem with enrolments not sticking. Also commented out Smarty stuff for now (for better performance in 1.5) --- lib/setup.php | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/lib/setup.php b/lib/setup.php index cabc270f3f..0200988072 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -69,10 +69,6 @@ global $THEME; die; } - if (!isset($CFG->enrol)) { // This is a hack to fix bug 1598 - $CFG->enrol = 'internal'; - } - /// If there are any errors in the standard libraries we want to know! error_reporting(E_ALL); @@ -145,6 +141,7 @@ global $THEME; } + /// Set error reporting back to normal if (empty($CFG->debug)) { $CFG->debug = 7; @@ -152,6 +149,11 @@ global $THEME; error_reporting($CFG->debug); +/// Set a default enrolment configuration (see bug 1598) + if (!isset($CFG->enrol)) { + $CFG->enrol = 'internal'; + } + /// File permissions on created directories in the $CFG->dataroot if (empty($CFG->directorypermissions)) { @@ -159,13 +161,13 @@ global $THEME; } /// Set up smarty template system - require_once($CFG->libdir .'/smarty/Smarty.class.php'); - $smarty = new Smarty; - $smarty->template_dir = $CFG->dirroot .'/templates/'. $CFG->template; - if (!file_exists($CFG->dataroot .'/cache')) { - make_upload_directory('cache'); - } - $smarty->compile_dir = $CFG->dataroot .'/cache'; + //require_once($CFG->libdir .'/smarty/Smarty.class.php'); + //$smarty = new Smarty; + //$smarty->template_dir = $CFG->dirroot .'/templates/'. $CFG->template; + //if (!file_exists($CFG->dataroot .'/cache')) { + // make_upload_directory('cache'); + //} + //$smarty->compile_dir = $CFG->dataroot .'/cache'; /// Set up session handling if (empty($CFG->dbsessions)) { /// File-based sessions -- 2.39.5