From 1d6baf5f2bd69806314a82b9bdb449cad92fba36 Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Thu, 22 Feb 2018 10:16:53 +0100 Subject: [PATCH] Fix: Not showing link to ad event if module is disabled --- htdocs/core/class/html.formactions.class.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php index 785ada1429c..31c33de889b 100644 --- a/htdocs/core/class/html.formactions.class.php +++ b/htdocs/core/class/html.formactions.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2010-2012 Regis Houssin - * Copyright (C) 2010 Juanjo Menent + * Copyright (C) 2010-2018 Juanjo Menent * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -187,10 +187,12 @@ class FormActions $urlbacktopage=$_SERVER['PHP_SELF'].'?id='.$object->id.($moreparambacktopage?'&'.$moreparambacktopage:''); - $buttontoaddnewevent = ''; - $buttontoaddnewevent.= $langs->trans("AddEvent"); - $buttontoaddnewevent.= ''; - print load_fiche_titre($title, $buttontoaddnewevent, ''); + if ($conf->agenda->enabled) { + $buttontoaddnewevent = ''; + $buttontoaddnewevent.= $langs->trans("AddEvent"); + $buttontoaddnewevent.= ''; + } + print load_fiche_titre($title, $buttontoaddnewevent, ''); $page=0; $param=''; $sortfield='a.datep';