From 63fe7babb2d7e25e82968fe084391b56d4ec2c75 Mon Sep 17 00:00:00 2001 From: eric Date: Mon, 20 Sep 2004 21:59:27 +0000 Subject: added upload comments/history, still need to finish the actual db calls --- web/html/pkgsubmit.php | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'web/html') 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 " \n"; print "\n"; + print "\n"; + print " "; + print __("Comments").":\n"; + print " "; + print ""; + print " \n"; + print "\n"; print "\n"; print "  \n"; print " "; print "\n"; + print "   "; + print "\n"; print "\n"; print "\n"; print "\n"; -- cgit v1.2.3-24-g4f1b