Prettied up the permissions page a bit
[gwvp.git] / gwvplib / gwvpdebug.php
index ee44f40..71e0a93 100644 (file)
@@ -88,7 +88,8 @@ function gwvp_DebugCall()
                                        break;
                                case "recreatedb":
                                        global $db_name;
-                                       unlink("$db_name");
+                                       gwvp_forceDisconnect();
+                                       rename("$db_name", "$db_name.tmp");
                                        gwvp_dbCreateSQLiteStructure("$db_name");
                                        //gwvp_createGroup($group_name, $is_admin, $owner_id)
                                        //gwvp_createUser($email, $fullname, $password, $username, $desc, $status)
@@ -105,13 +106,12 @@ function gwvp_DebugCall()
                                        gwvp_addGroupMember("user@localhost", "usergroup");
                                        gwvp_SendMessage("info", "blank db re-created");
                                        
-                                       gwvp_createGitRepo("repo1");
-                                       gwvp_createGitRepo("repo2");
-                                       gwvp_createGitRepo("repo3");
                                        gwvp_AddRepo("repo1", "this is a test repo1", 1);
                                        gwvp_AddRepo("repo2", "this is a test repo2", 1);
                                        gwvp_AddRepo("repo2", "this is a test repo3", 1);
                                        
+                                       gwvp_setConfigVal("repodir", "/tmp/");
+                                       
                                        header("Location: $BASE_URL/debug");
                                        break;
                                case "dropallusersandgroups":