summaryrefslogtreecommitdiffstats
path: root/bin/addproject
diff options
context:
space:
mode:
Diffstat (limited to 'bin/addproject')
-rwxr-xr-xbin/addproject8
1 files changed, 7 insertions, 1 deletions
diff --git a/bin/addproject b/bin/addproject
index 8c85195..d922d17 100755
--- a/bin/addproject
+++ b/bin/addproject
@@ -97,7 +97,13 @@ main() {
popd > /dev/null
eheading "adding initial project member to the database"
- eexec dbquery "INSERT INTO project (project_name) VALUES ('${project_name}')"
+ if [[ ${project_closed} == y ]]
+ then
+ eexec dbquery "INSERT INTO project (project_name, private) VALUES ('${project_name}', 1)"
+ else
+ eexec dbquery "INSERT INTO project (project_name) VALUES ('${project_name}')"
+ fi
+
eexec dbquery "INSERT INTO member (user_id, project_id) VALUES (" \
"(SELECT id FROM user WHERE login = '${user_name}')," \
"(SELECT id FROM project WHERE project_name = '${project_name}'))"