From 94aad523095ef2839fd233ba6236d2e5f0546b7b Mon Sep 17 00:00:00 2001
From: Thibault Dockx <thibault.dockx@fusiondirectory.org>
Date: Mon, 16 May 2022 11:42:21 +0100
Subject: [PATCH] :sparkles: Feat(Tasks) - Enhances column class for tasks

Removes filter tasks method and simplifies the class
---
 plugins/addons/tasks/class_tasksColumn.inc | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/plugins/addons/tasks/class_tasksColumn.inc b/plugins/addons/tasks/class_tasksColumn.inc
index 97e2be359..9849f74f5 100644
--- a/plugins/addons/tasks/class_tasksColumn.inc
+++ b/plugins/addons/tasks/class_tasksColumn.inc
@@ -21,6 +21,7 @@
 
 /*!
  * \brief Column rendering Tasks
+ * Important that a "query method" must be defined in order to have the listing
  */
 class tasksColumn extends Column
 
@@ -33,7 +34,7 @@ class tasksColumn extends Column
     } else {
       switch ($this->attributes[0]) {
         case 'TYPE':
-          return static::filterTypes($value, $entry['PROGRESS']);
+          return static::filterTypes();
         case 'TIMESTAMP':
           return static::filterSchedule($value);
         case 'STATUS':
@@ -44,17 +45,10 @@ class tasksColumn extends Column
     }
   }
 
-  static function filterTypes (string $name, string $targetdn, string $targettype): string
+  static function filterTypes (): string
   {
-    $text = '';
-    if (!empty($name) && ($name != 'none')) {
-      $text = $name;
-    }
-    if (!empty($targetdn) && !empty($targettype)) {
-      return objects::link($targetdn, $targettype, '', $text, TRUE);
-    } else {
-      return htmlescape($text);
-    }
+    //A method retriving the type of the tasks.
+    return '';
   }
 
   static function filterSchedule (string $stamp): string
-- 
GitLab