summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCallan Barrett <wizzomafizzo@gmail.com>2008-05-05 01:53:11 +0800
committerLoui Chang <louipc.ist@gmail.com>2008-06-05 19:21:38 -0400
commitcad4689bc471a7db451bb1558ac39290c7c2a182 (patch)
tree0cea00cef9e487b388e8770220a0490bf56fb903
parent800aca0eeba1de4c5406eb3f5251748cd50464ba (diff)
downloadaurweb-cad4689bc471a7db451bb1558ac39290c7c2a182.tar.xz
Don't reset category on update.
When updating a package and no category is selected the category will no longer reset itself to "none", it will only update if something else is chosen. Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com> Signed-off-by: Loui Chang <louipc.ist@gmail.com>
-rw-r--r--web/html/pkgsubmit.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php
index 1b74ce7..d7026b7 100644
--- a/web/html/pkgsubmit.php
+++ b/web/html/pkgsubmit.php
@@ -361,7 +361,9 @@ if ($_COOKIE["AURSID"]) {
$q.="Name='".mysql_real_escape_string($new_pkgbuild['pkgname'])."', ";
$q.="Version='".mysql_real_escape_string($new_pkgbuild['pkgver'])."-".
mysql_real_escape_string($new_pkgbuild['pkgrel'])."',";
+ if ($_POST['category'] > 1) {
$q.="CategoryID=".mysql_real_escape_string($_REQUEST['category']).", ";
+ }
$q.="License='".mysql_real_escape_string($new_pkgbuild['license'])."', ";
$q.="Description='".mysql_real_escape_string($new_pkgbuild['pkgdesc'])."', ";
$q.="URL='".mysql_real_escape_string($new_pkgbuild['url'])."', ";