[aur-dev] [PATCH 3/6] Allow for closing package requests

Lukas Fleischer archlinux at cryptocrack.de
Tue Jul 1 13:34:00 EDT 2014


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."));
> > +}
> 


More information about the aur-dev mailing list