[aur-dev] [PATCH] Unset $pinned unconditionally when displaying comments

Lukas Fleischer lfleischer at archlinux.org
Fri Feb 19 17:20:09 UTC 2016


On Tue, 16 Feb 2016 at 14:21:55, Mark Weiman wrote:
> Signed-off-by: Mark Weiman <mark.weiman at markzz.com>
> ---
>  web/lib/pkgbasefuncs.inc.php | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/web/lib/pkgbasefuncs.inc.php b/web/lib/pkgbasefuncs.inc.php
> index c0e672a..1691bff 100644
> --- a/web/lib/pkgbasefuncs.inc.php
> +++ b/web/lib/pkgbasefuncs.inc.php
> @@ -252,8 +252,8 @@ function pkgbase_display_details($base_id, $row, $SID="") {
>                 $pinned = pkgbase_comments($base_id, $limit_pinned, false, true);
>                 if (!empty($pinned)) {
>                         include('pkg_comments.php');
> -                       unset($pinned);
>                 }
> +               unset($pinned);

We probably need the same fix in pkg_display_details(). Will submit a
second version of the patch in a second.

>  
>                 $limit = isset($_GET['comments']) ? 0 : 10;
>                 $comments = pkgbase_comments($base_id, $limit, $include_deleted);
> -- 
> 2.7.1


More information about the aur-dev mailing list