From cad4689bc471a7db451bb1558ac39290c7c2a182 Mon Sep 17 00:00:00 2001 From: Callan Barrett Date: Mon, 5 May 2008 01:53:11 +0800 Subject: 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 Signed-off-by: Loui Chang --- web/html/pkgsubmit.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'web/html/pkgsubmit.php') diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php index 1b74ce77..d7026b75 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'])."', "; -- cgit v1.2.3-24-g4f1b