mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
Set up Smarty template system in the setup.php
This commit is contained in:
parent
1854c99cc2
commit
afb18f5aea
@ -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)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user