From d4b07f2b334dada626e4743951cdd6adab87f62e Mon Sep 17 00:00:00 2001
From: Callan Barrett
';
print __("Couldn't add to notification list.");
diff --git a/web/html/pkgedit.php b/web/html/pkgedit.php
index 6d8314fb..9eb2fe24 100644
--- a/web/html/pkgedit.php
+++ b/web/html/pkgedit.php
@@ -58,7 +58,6 @@ if ($_REQUEST["del_Comment"]) {
} else {
print __("Missing comment ID.")."
\n";
}
- pkgdetails_link($_REQUEST["ID"]);
html_footer(AUR_VERSION);
exit();
}
@@ -76,8 +75,7 @@ if ($_REQUEST["add_Comment"]) {
$q.= "'".mysql_real_escape_string($_REQUEST["comment"])."', ";
$q.= "UNIX_TIMESTAMP())";
db_query($q, $dbh);
- print __("Comment has been added.")."
\n";
- pkgdetails_link($_REQUEST["ID"]);
+ print __("Comment has been added.");
# Send email notifications
#
@@ -144,8 +142,6 @@ if ($_REQUEST["change_Category"]) {
} else {
print __("Invalid category ID.")."
\n";
}
- pkgdetails_link($_REQUEST["ID"]);
-
} else {
# Prompt visitor for new category_id
#
@@ -179,10 +175,7 @@ if ($_REQUEST["change_Category"]) {
print __("You've found a bug if you see this....")."
\n";
-html_footer(AUR_VERSION); # Use the $Id$ keyword
- # NOTE: when checking in a new file, use
- # 'svn propset svn:keywords "Id" filename.php'
- # to tell svn to expand the "Id" keyword.
+html_footer(AUR_VERSION);
# vim: ts=2 sw=2 noet ft=php
?>
diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php
index e3495918..638654bc 100644
--- a/web/html/pkgsubmit.php
+++ b/web/html/pkgsubmit.php
@@ -421,11 +421,15 @@ if ($_COOKIE["AURSID"]) {
db_query($q, $dbh);
}
- $sources = explode(" ", $new_pkgbuild['source']);
- while (list($k, $v) = each($sources)) {
- $q = "INSERT INTO PackageSources (PackageID, Source) VALUES (";
- $q .= $pdata["ID"].", '".mysql_real_escape_string($v)."')";
- db_query($q, $dbh);
+ # Insert sources, if they don't exist don't inser them
+ #
+ if ($new_pkgbuild['source'] != "") {
+ $sources = explode(" ", $new_pkgbuild['source']);
+ while (list($k, $v) = each($sources)) {
+ $q = "INSERT INTO PackageSources (PackageID, Source) VALUES (";
+ $q .= $pdata["ID"].", '".mysql_real_escape_string($v)."')";
+ db_query($q, $dbh);
+ }
}
} else {
# this is a brand new package
@@ -483,11 +487,15 @@ if ($_COOKIE["AURSID"]) {
db_query($q, $dbh);
}
- $sources = explode(" ", $new_pkgbuild['source']);
- while (list($k, $v) = each($sources)) {
- $q = "INSERT INTO PackageSources (PackageID, Source) VALUES (";
- $q .= $packageID.", '".mysql_real_escape_string($v)."')";
- db_query($q, $dbh);
+ # insert sources
+ #
+ if ($new_pkgbuild['source'] != "") {
+ $sources = explode(" ", $new_pkgbuild['source']);
+ while (list($k, $v) = each($sources)) {
+ $q = "INSERT INTO PackageSources (PackageID, Source) VALUES (";
+ $q .= $packageID.", '".mysql_real_escape_string($v)."')";
+ db_query($q, $dbh);
+ }
}
}
}
--
cgit v1.2.3-24-g4f1b