From 0866d4924c3de5efa9e4a66b8cdcf8819e70ca10 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 17 Oct 2008 16:04:21 +0200 Subject: record if project is open/closed in mysql --- bin/addproject | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'bin/addproject') 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}'))" -- cgit v1.2.3