Check-in [ea758fe3d3]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Remove exit codes, resulting in internal errors.
Timelines: family | ancestors | descendants | both | develop
Files: files | file ages | folders
SHA1:ea758fe3d3fae43c5a90b597cf41052c84ee5bc2
User & Date: tux 2014-09-15 10:27:06
Context
2014-09-15
10:27
Remove additional exit codes potentially resulting in internal errors. check-in: ed9e534869 user: tux tags: develop
10:27
Remove exit codes, resulting in internal errors. check-in: ea758fe3d3 user: tux tags: develop
10:15
Merge hotfix back to develop. check-in: 6bbe724313 user: tux tags: develop
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to index.cgi.

148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
			if [ -z "$p" ]; then
				# We're creating a new project
				[ -z "$p" ] && p=NULL
				sql="INSERT INTO projects VALUES ( $p, \"$title\", \"$desc\", $producer, $editor, $category, \"$music\", \"$created\", \"$exp_done\", \"$exp_length\", \"$real_length\", \"$release\", \"$participants\" );"
				realp=$(sqlite3 $db "SELECT MAX(id) FROM projects")
				realp=$(($realp + 1 ))
				redir="Location: ${script}?view&p=$realp"
				exit 0
			elif [ -z "$(sqlite3 $db 'SELECT id FROM projects WHERE id == '$p)" ]; then
				# We're creating a new project with id $p
				sql="INSERT INTO projects VALUES ( $p, \"$title\", \"$desc\", $producer, $editor, $category, \"$music\", \"$created\", \"$exp_done\", \"$exp_length\", \"$real_length\", \"$release\", \"$participants\" );"
				redir="Location: ${script}?view&p=$p"
				exit 0
			else
				# We're updating an existing project
				sql="UPDATE projects SET title = \"$title\", desc = \"$desc\", producer = $producer, editor = $editor, category = $category, music = \"$music\", created = \"$created\", expected_done = \"$exp_done\", expected_length = \"$exp_length\", real_length = \"$real_length\", release = \"$release\", participants = \"$participants\" WHERE id == $p;"
				redir="Location: ${script}?view&p=$p"
				exit 0
			fi
			exit 0
		else
			header "Location: $HTTP_REFERER"
			exit 0
		fi
		sqlite3 $db "$sql"
		local err=$?
		if [ "$err" == "0" ]; then







<




<




<

<







148
149
150
151
152
153
154

155
156
157
158

159
160
161
162

163

164
165
166
167
168
169
170
			if [ -z "$p" ]; then
				# We're creating a new project
				[ -z "$p" ] && p=NULL
				sql="INSERT INTO projects VALUES ( $p, \"$title\", \"$desc\", $producer, $editor, $category, \"$music\", \"$created\", \"$exp_done\", \"$exp_length\", \"$real_length\", \"$release\", \"$participants\" );"
				realp=$(sqlite3 $db "SELECT MAX(id) FROM projects")
				realp=$(($realp + 1 ))
				redir="Location: ${script}?view&p=$realp"

			elif [ -z "$(sqlite3 $db 'SELECT id FROM projects WHERE id == '$p)" ]; then
				# We're creating a new project with id $p
				sql="INSERT INTO projects VALUES ( $p, \"$title\", \"$desc\", $producer, $editor, $category, \"$music\", \"$created\", \"$exp_done\", \"$exp_length\", \"$real_length\", \"$release\", \"$participants\" );"
				redir="Location: ${script}?view&p=$p"

			else
				# We're updating an existing project
				sql="UPDATE projects SET title = \"$title\", desc = \"$desc\", producer = $producer, editor = $editor, category = $category, music = \"$music\", created = \"$created\", expected_done = \"$exp_done\", expected_length = \"$exp_length\", real_length = \"$real_length\", release = \"$release\", participants = \"$participants\" WHERE id == $p;"
				redir="Location: ${script}?view&p=$p"

			fi

		else
			header "Location: $HTTP_REFERER"
			exit 0
		fi
		sqlite3 $db "$sql"
		local err=$?
		if [ "$err" == "0" ]; then