summaryrefslogtreecommitdiffstats
path: root/web/html/pkgsubmit.php
diff options
context:
space:
mode:
authoreric <eric>2004-09-20 23:59:27 +0200
committereric <eric>2004-09-20 23:59:27 +0200
commit63fe7babb2d7e25e82968fe084391b56d4ec2c75 (patch)
tree4a53821c1bcf855437edad7a43b545f35082b901 /web/html/pkgsubmit.php
parentcb820450f89ea0c55c96a9a43e3a5a921bbdf765 (diff)
downloadaur-63fe7babb2d7e25e82968fe084391b56d4ec2c75.tar.gz
aur-63fe7babb2d7e25e82968fe084391b56d4ec2c75.tar.xz
added upload comments/history, still need to finish the actual db calls
Diffstat (limited to 'web/html/pkgsubmit.php')
-rw-r--r--web/html/pkgsubmit.php22
1 files changed, 17 insertions, 5 deletions
diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php
index a6704218..10947999 100644
--- a/web/html/pkgsubmit.php
+++ b/web/html/pkgsubmit.php
@@ -32,6 +32,10 @@ if ($_COOKIE["AURSID"]) {
}
}
+ if (!$_REQUEST["comments"] && !$error) {
+ $error = __("You must supply a comment.");
+ }
+
if (!$error) {
# first, see if this package already exists, and if it can be overwritten
#
@@ -195,7 +199,8 @@ if ($_COOKIE["AURSID"]) {
# this is a variable/value pair, strip out
# array parens and any quoting
#
- $pkgbuild[$lparts[0]] = str_replace(array("(",")","\"","'"), "", $lparts[1]);
+ $pkgbuild[$lparts[0]] = str_replace(array("(",")","\"","'"), "",
+ $lparts[1]);
} else {
# either a comment, blank line, continued line, or build function
#
@@ -246,10 +251,6 @@ if ($_COOKIE["AURSID"]) {
$dbh = db_connect();
if ($pkg_exists) {
- # TODO add some kind of package history table - for who
- # was the last person to upload, a timestamp, and maybe a
- # comment about it too
-
# this is an overwrite of an existing package, the database ID
# needs to be preserved so that any votes are retained. However,
# PackageDepends, PackageSources, and PackageContents can be
@@ -272,6 +273,8 @@ if ($_COOKIE["AURSID"]) {
# TODO
# $q = "UPDATE Packages ..."
+ # $q = "INSERT INTO PackageUploadHistory ..."
+
} else {
# this is a brand new package
#
@@ -330,11 +333,20 @@ if ($_COOKIE["AURSID"]) {
print __("No");
print " </td>\n";
print "</tr>\n";
+ print "<tr>\n";
+ print " <td valign='top' span='f4' align='right'>";
+ print __("Comments").":</td>\n";
+ print " <td span='f4' align='left'>";
+ print "<textarea rows='10' cols='50' name='comments'></textarea>";
+ print " </td>\n";
+ print "</tr>\n";
print "<tr>\n";
print " <td>&nbsp;</td>\n";
print " <td align='left'>";
print "<input class='button' type='submit' value='".__("Upload")."' />\n";
+ print "&nbsp;&nbsp;&nbsp;";
+ print "<input class='button' type='reset' value='".__("Reset")."' />\n";
print "</td>\n";
print "</tr>\n";
print "</table>\n";