From 858d6c6a9f09e02f1c55c43e07fb4c69ce385e69 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=B4me=20Chilliet?= <come.chilliet@fusiondirectory.org>
Date: Mon, 15 Mar 2021 15:41:21 +0100
Subject: [PATCH] :ambulance: fix(management) Specific actions should take
 precedence on act field

issue #6156
---
 include/management/class_managementListing.inc | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/management/class_managementListing.inc b/include/management/class_managementListing.inc
index 5c3dce60d..4bbe62d5a 100644
--- a/include/management/class_managementListing.inc
+++ b/include/management/class_managementListing.inc
@@ -482,6 +482,11 @@ class managementListing
       return $result;
     }
 
+    // Filter POST with "act" attributes -> posted from action menu
+    if (isset($_POST['act']) && ($_POST['act'] != '')) {
+      $result['action'] = validate($_POST['act']);
+    }
+
     // Filter POST with "listing_" attributes
     foreach (array_keys($_POST) as $key) {
       // Capture selections
@@ -510,11 +515,6 @@ class managementListing
       }
     }
 
-    // Filter POST with "act" attributes -> posted from action menu
-    if (isset($_POST['act']) && ($_POST['act'] != '')) {
-      $result['action'] = validate($_POST['act']);
-    }
-
     if (preg_match('/^([a-zA-Z\.]+)_([a-zA-Z_\.]+)$/', $result['action'], $m)) {
       $result['action']     = $m[1];
       $result['subaction']  = $m[2];
-- 
GitLab