summaryrefslogtreecommitdiffstats
path: root/bin/addproject
diff options
context:
space:
mode:
authorroot <root@dev.spline.de>2008-10-17 16:04:21 +0200
committerroot <root@dev.spline.de>2008-10-17 16:04:21 +0200
commit0866d4924c3de5efa9e4a66b8cdcf8819e70ca10 (patch)
tree61958b0598e164781d4e674c64fb4c992ee2cd47 /bin/addproject
parent12b71da0152f924de1faccaae62032f5d41fbbcc (diff)
downloaddev-scripts-0866d4924c3de5efa9e4a66b8cdcf8819e70ca10.tar.gz
dev-scripts-0866d4924c3de5efa9e4a66b8cdcf8819e70ca10.tar.xz
dev-scripts-0866d4924c3de5efa9e4a66b8cdcf8819e70ca10.zip
record if project is open/closed in mysql
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}'))"