From c0e250a21f76bbb39f449cf71141e8abb78548f8 Mon Sep 17 00:00:00 2001 From: "o.pinke" Date: Fri, 10 Feb 2023 11:52:16 +0100 Subject: [PATCH] fixed bug with empty description --- conlite/includes/rights_lay.inc.php | 2 +- conlite/includes/rights_mod.inc.php | 2 +- conlite/includes/rights_tpl.inc.php | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/conlite/includes/rights_lay.inc.php b/conlite/includes/rights_lay.inc.php index daf534a..5c23b2d 100644 --- a/conlite/includes/rights_lay.inc.php +++ b/conlite/includes/rights_lay.inc.php @@ -118,7 +118,7 @@ $db->query($sql); while ($db->next_record()) { $tplname = clHtmlEntities($db->f("name")); - $description = clHtmlEntities($db->f("description")); + $description = empty($db->f("description"))?'':clHtmlEntities($db->f("description")); $sTable .= $table->row(); $sTable .= $table->cell($tplname,"", "", " class=\"td_rights0\"", false); diff --git a/conlite/includes/rights_mod.inc.php b/conlite/includes/rights_mod.inc.php index 390f7f2..1230fdf 100644 --- a/conlite/includes/rights_mod.inc.php +++ b/conlite/includes/rights_mod.inc.php @@ -117,7 +117,7 @@ $db->query($sql); while ($db->next_record()) { $tplname = clHtmlEntities($db->f("name")); - $description = clHtmlEntities($db->f("description")); + $description = empty($db->f("description"))?'':clHtmlEntities($db->f("description")); $sTable .= $table->row(); $sTable .= $table->cell($tplname,"", "", " class=\"td_rights0\"", false); diff --git a/conlite/includes/rights_tpl.inc.php b/conlite/includes/rights_tpl.inc.php index d045243..4aeba1f 100644 --- a/conlite/includes/rights_tpl.inc.php +++ b/conlite/includes/rights_tpl.inc.php @@ -112,14 +112,14 @@ foreach ($aSecondHeaderRow as $value) { $sTable .= $table->end_row(); -//Select the itemid�s +//Select the itemid $sql = "SELECT * FROM ".$cfg["tab"]["tpl"]." WHERE idclient='".Contenido_Security::toInteger($rights_client)."' ORDER BY name"; $db->query($sql); while ($db->next_record()) { - $tplname = clHtmlEntities($db->f("name")); - $description = clHtmlEntities($db->f("description")); + $tplname = clHtmlEntities($db->f("name")); + $description = empty($db->f("description"))?'':clHtmlEntities($db->f("description")); $sTable .= $table->row(); $sTable .= $table->cell($tplname,"", "", " class=\"td_rights0\"", false);