X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=dbinstall.php;h=63dee9c78f7c7bf416288d3e2c4b357cf591cf77;hb=0282363535e651129be0f07ecd1a5390b01c8b85;hp=c65358a81a37751bfe31b314ee902c1a9c878c16;hpb=098a79f0819ebb89b7d48df4a6b154af4560f68e;p=timetracker.git
diff --git a/dbinstall.php b/dbinstall.php
index c65358a8..63dee9c7 100644
--- a/dbinstall.php
+++ b/dbinstall.php
@@ -28,55 +28,178 @@
require_once('WEB-INF/config.php');
require_once('WEB-INF/lib/common.lib.php');
-if (!require_once('MDB2.php')) {
- die ("Unable to require MDB2 module. Please check it
\n");
-}
require_once('initialize.php');
import('ttUserHelper');
import('ttTaskHelper');
+import('ttRoleHelper');
+// setChange - executes an sql statement. TODO: rename this function to something better.
+// Better yet, redo the entire thing and make an installer.
function setChange($sql) {
- print "
".$sql.""; - $mdb2 = getConnection(); - $affected = $mdb2->exec($sql); - if (is_a($affected, 'PEAR_Error')) { - print "error: ".$affected->getMessage()."
".$sql.""; + $mdb2 = getConnection(); + $affected = $mdb2->exec($sql); + if (is_a($affected, 'PEAR_Error')) + print "error: ".$affected->getMessage()."