]> git.mjollnir.org Git - moodle.git/commitdiff
Set up Smarty template system in the setup.php
authormoodler <moodler>
Thu, 24 Jun 2004 13:10:47 +0000 (13:10 +0000)
committermoodler <moodler>
Thu, 24 Jun 2004 13:10:47 +0000 (13:10 +0000)
lib/setup.php

index ecce1a2226eb7c80061a1bb06f13fa4657c2bbab..06e4dfab9554f394ce9a45d45f0e7aaeb0385b65 100644 (file)
@@ -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')) {
         $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)) {