From 51b4458a9b47fe3295601a18f7f642ad2eaf1dbf Mon Sep 17 00:00:00 2001 From: Atul Ghate <59052-atulghate@users.noreply.drupalcode.org> Date: Wed, 7 Aug 2024 20:44:22 +0000 Subject: [PATCH] Issue #3461340 by atul_ghate, chrisfromredfin, amin.ankit, phenaproxima: The result count on the Recipes tab isn't affected by search queries --- src/Plugin/ProjectBrowserSource/Recipes.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Plugin/ProjectBrowserSource/Recipes.php b/src/Plugin/ProjectBrowserSource/Recipes.php index cfcab182c..ce3764562 100644 --- a/src/Plugin/ProjectBrowserSource/Recipes.php +++ b/src/Plugin/ProjectBrowserSource/Recipes.php @@ -115,8 +115,6 @@ class Recipes extends ProjectBrowserSourceBase { $this->cacheBin->set($this->getPluginId(), $projects); } - $total = count($projects); - // Filter by project machine name. if (!empty($query['machine_name'])) { $projects = array_filter($projects, fn(Project $project) => $project->machineName === $query['machine_name']); @@ -137,6 +135,8 @@ class Recipes extends ProjectBrowserSourceBase { $projects = array_filter($projects, fn(Project $project) => stripos($project->title, $query['search']) !== FALSE); } + $total = count($projects); + // Filter by sorting criterion. if (!empty($query['sort'])) { $sort = $query['sort']; -- GitLab