noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 01/32: Do no save empty comment or descriptio


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 01/32: Do no save empty comment or description
Date: Thu, 5 Jan 2023 14:18:28 -0500 (EST)

sparkyx pushed a commit to branch devel
in repository noalyss.

commit fa6b1a8d43ea63800aa6fb8cf2732ab5171f8d9c
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Sat Dec 3 23:02:36 2022 +0100

    Do no save empty comment or description
---
 include/class/follow_up.class.php | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/include/class/follow_up.class.php 
b/include/class/follow_up.class.php
index ec89f1955..7fa5c4dee 100644
--- a/include/class/follow_up.class.php
+++ b/include/class/follow_up.class.php
@@ -1024,8 +1024,16 @@ class Follow_Up
         
$this->ag_dest=$http->extract("ag_dest","string",$g_user->get_profile());
         $this->ag_priority=$http->extract("ag_priority","string","2");
         $this->ag_contact=$http->extract("ag_contact","string","");
-        $this->ag_comment=$http->extract("ag_comment","raw","");
-        $this->ag_description=$http->extract("ag_description","raw","");
+       $ag_comment=trim($http->extract("ag_comment","raw",""));
+       if ( strip_tags($ag_comment) == '') 
+               $this->ag_comment='';
+       else 
+               $this->ag_comment=$ag_comment;
+        $ag_description=trim($http->extract("ag_description","raw",""));
+       if ( strip_tags($ag_description) == '') 
+               $this->ag_description='';
+       else 
+               $this->ag_description=$ag_description;
         $this->ag_remind_date=$http->extract("ag_remind_date","string",null);
         $this->operation=$http->extract("operation","string",null);
         $this->action=$http->extract("action","string",null);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]