From 9ab2f4494644d6e9ea2b8558767be1a41204ecc8 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Fri, 31 May 2019 15:14:56 +0200 Subject: [PATCH 1/2] Fix : missing rights test to display tag create link --- htdocs/categories/index.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/htdocs/categories/index.php b/htdocs/categories/index.php index 9f41c0b016a..d6a314791c8 100644 --- a/htdocs/categories/index.php +++ b/htdocs/categories/index.php @@ -65,9 +65,12 @@ $arrayofcss=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.css') llxHeader('',$title,'','',0,0,$arrayofjs,$arrayofcss); -$newcardbutton = ''.$langs->trans("NewCategory").''; -$newcardbutton.= ''; -$newcardbutton.= ''; +$newcardbutton=''; +if($user->rights->categorie->creer) { + $newcardbutton = ''.$langs->trans("NewCategory").''; + $newcardbutton.= ''; + $newcardbutton.= ''; +} print load_fiche_titre($title, $newcardbutton); From 3e9fbf0148c6c324e89c3ca962bb2481d82d4f10 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 2 Jun 2019 12:14:07 +0200 Subject: [PATCH 2/2] Update index.php --- htdocs/categories/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/categories/index.php b/htdocs/categories/index.php index d6a314791c8..06b70616792 100644 --- a/htdocs/categories/index.php +++ b/htdocs/categories/index.php @@ -66,7 +66,7 @@ $arrayofcss=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.css') llxHeader('',$title,'','',0,0,$arrayofjs,$arrayofcss); $newcardbutton=''; -if($user->rights->categorie->creer) { +if (! empty($user->rights->categorie->creer)) { $newcardbutton = ''.$langs->trans("NewCategory").''; $newcardbutton.= ''; $newcardbutton.= '';