From afb18f5aeac9fd6a90b907053a20a1c9094ff78e Mon Sep 17 00:00:00 2001 From: moodler Date: Thu, 24 Jun 2004 13:10:47 +0000 Subject: [PATCH] Set up Smarty template system in the setup.php --- lib/setup.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/setup.php b/lib/setup.php index ecce1a2226..06e4dfab95 100644 --- a/lib/setup.php +++ b/lib/setup.php @@ -69,6 +69,8 @@ require_once("$CFG->libdir/moodlelib.php"); // Other general-purpose functions + + /// Load up any configuration from the config table if ($configs = get_records('config')) { @@ -95,6 +97,14 @@ $CFG->directorypermissions = 0777; // Must be octal (that's why it's here) } +/// 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"; /// Set session timeouts if (!empty($CFG->sessiontimeout)) { -- 2.39.5