[aur-dev] [PATCH 1/6] Add comment edit icon and form
Lukas Fleischer
lfleischer at archlinux.org
Fri Jul 10 14:31:42 UTC 2015
On Fri, 10 Jul 2015 at 16:24:03, Marcel Korpel wrote:
> [...]
> +function pkgbase_get_comment($comment_id) {
Should this function really be called pkgbase_get_comment()? It does not
expect a package base ID parameter which is an indication that this
should rather be called comment_by_id() or similar.
> + $dbh = DB::connect();
> + $q = "SELECT Comments FROM PackageComments ";
> + $q.= "WHERE ID = " . $comment_id;
> [...]
Please explicitly cast into an integer here (even if the called already
does that).
Looks good otherwise, thanks!
More information about the aur-dev
mailing list