--- /dev/null
+<?php
+
+// takes all the templates in Bugdar and moves them to the database
+// SVN $Id$
+
+chdir('..');
+require_once('./global.php');
+
+$files = $funct->scandir('templates');
+
+$db->query("TRUNCATE TABLE " . TABLE_PREFIX . "template");
+
+foreach ($files AS $path => $bits)
+{
+ foreach ($bits AS $file)
+ {
+ if ($funct->fetch_extension($file) == 'tpl')
+ {
+ $db->query("INSERT INTO " . TABLE_PREFIX . "template (filename, template, timestamp) VALUES ('$path" . substr($file, 0, strlen($file) - 4) . "', '" . $db->escape_string($template->_parse(file_get_contents("templates/$path$file"))) . "', " . time() . ")");
+ }
+ }
+}
+
+?>
\ No newline at end of file