1 Jul
2014
1 Jul
'14
7:34 p.m.
On Tue, 01 Jul 2014 at 18:42:09, Florian Pritz wrote:
[...]
+ +/** + * Close a deletion/orphan request + * + * @param int $id The package request to close + * + * @return void
You return an array, not void.
Will send a patch to fix the documentation, thanks.
+ */ +function pkgbase_close_request($id) { + $dbh = DB::connect(); + + if (!check_user_privileges()) { + return array(false, __("Only TUs and developers can close requests.")); + } + + $q = "UPDATE PackageRequests SET Status = 1 WHERE ID = " . intval($id); + $dbh->exec($q); + + return array(true, __("Request closed successfully.")); +}