From 1b22f8046f0f948ffa7bd505e602580983d88f01 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Fri, 3 Oct 2014 12:56:18 +0200 Subject: rss.php: Include package functions This is needed since 4426877 (Move latest_pkgs() to pkgfuncs.inc.php, 2014-05-29). Signed-off-by: Lukas Fleischer --- web/html/rss.php | 1 + 1 file changed, 1 insertion(+) (limited to 'web') diff --git a/web/html/rss.php b/web/html/rss.php index 84d22057..2470d994 100644 --- a/web/html/rss.php +++ b/web/html/rss.php @@ -2,6 +2,7 @@ set_include_path(get_include_path() . PATH_SEPARATOR . '../lib' . PATH_SEPARATOR . '../lang'); include_once("aur.inc.php"); +include_once("pkgfuncs.inc.php"); include_once("feedcreator.class.php"); #detect prefix -- cgit v1.2.3-24-g4f1b From 76872d8b080c5924dac2f65760ee6190a7a368b1 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Fri, 3 Oct 2014 13:08:32 +0200 Subject: Fix permission check in pkgreq_close() Make sure that requests can be auto-accepted if filed by a regular user. Signed-off-by: Lukas Fleischer --- web/lib/pkgreqfuncs.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'web') diff --git a/web/lib/pkgreqfuncs.inc.php b/web/lib/pkgreqfuncs.inc.php index 92070434..b2a70894 100644 --- a/web/lib/pkgreqfuncs.inc.php +++ b/web/lib/pkgreqfuncs.inc.php @@ -241,7 +241,7 @@ function pkgreq_close($id, $reason, $comments, $auto_close=false) { $dbh = DB::connect(); $id = intval($id); - if (!has_credential(CRED_PKGREQ_CLOSE)) { + if (!$auto_close && !has_credential(CRED_PKGREQ_CLOSE)) { return array(false, __("Only TUs and developers can close requests.")); } -- cgit v1.2.3-24-g4f1b From 55586d9c22d5404d3d47aeb4290bc86944f98602 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Fri, 3 Oct 2014 13:00:40 +0200 Subject: Include proper timestamp in auto-accept emails Fixes a regression introduced in c70b340 (Close requests before accepting, 2014-07-29). Signed-off-by: Lukas Fleischer --- web/lib/pkgreqfuncs.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'web') diff --git a/web/lib/pkgreqfuncs.inc.php b/web/lib/pkgreqfuncs.inc.php index b2a70894..1b54a6af 100644 --- a/web/lib/pkgreqfuncs.inc.php +++ b/web/lib/pkgreqfuncs.inc.php @@ -199,13 +199,13 @@ function pkgreq_file($ids, $type, $merge_into, $comments) { * maintainer will not be included in the Cc list of the * request notification email. */ + $out_of_date_time = gmdate("Y-m-d", intval($details["OutOfDateTS"])); pkgreq_close($request_id, "accepted", "The package base has been flagged out-of-date " . "since " . $out_of_date_time . ".", true); $q = "UPDATE PackageBases SET MaintainerUID = NULL "; $q.= "WHERE ID = " . $base_id; $dbh->exec($q); - $out_of_date_time = gmdate("Y-m-d", intval($details["OutOfDateTS"])); } return array(true, __("Added request successfully.")); -- cgit v1.2.3-24-g4f1b