From e4cf111ac2111dff32933d6267bff5a2cf5c77ac Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 22 Feb 2012 14:43:13 +0100 Subject: [PATCH] Fix: Do not include an output class (form) inside a core system class. --- htdocs/core/class/interfaces.class.php | 9 ++++----- htdocs/core/tpl/triggers.tpl.php | 11 +++++++---- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/htdocs/core/class/interfaces.class.php b/htdocs/core/class/interfaces.class.php index 030aa241852..d3614fff0c5 100644 --- a/htdocs/core/class/interfaces.class.php +++ b/htdocs/core/class/interfaces.class.php @@ -78,10 +78,11 @@ class Interfaces foreach($dirtriggers as $reldir) { $dir=dol_buildpath($reldir,0); + $dir=dol_osencode($dir); //print "xx".$dir;exit; // Check if directory exists - if (!is_dir($dir)) continue; + if (! dol_is_dir($dir)) continue; $handle=opendir($dir); if (is_resource($handle)) @@ -197,14 +198,12 @@ class Interfaces { global $conf, $langs; - $form = new Form($this->db); - $files = array(); $modules = array(); $orders = array(); $i = 0; - $dirtriggers=array_merge(array('/core/triggers'),$conf->triggers_modules); + $dirtriggers=array_merge(array('/core/triggers/'),$conf->triggers_modules); foreach($dirtriggers as $reldir) { $dir=dol_buildpath($reldir,0); @@ -298,7 +297,7 @@ class Interfaces if ($disabledbymodule == 2) $text.=$langs->trans("TriggerDisabledAsModuleDisabled",$module).'
'; } - $triggers[$j]['info'] = $form->textwithpicto('',$text); + $triggers[$j]['info'] = $text; $j++; } return $triggers; diff --git a/htdocs/core/tpl/triggers.tpl.php b/htdocs/core/tpl/triggers.tpl.php index aacdcc7cdc9..c72b6cdf41d 100644 --- a/htdocs/core/tpl/triggers.tpl.php +++ b/htdocs/core/tpl/triggers.tpl.php @@ -19,7 +19,7 @@ - +
@@ -29,7 +29,8 @@ @@ -39,11 +40,13 @@ $var=!$var; - + - +
trans("File"); ?> trans("Version"); ?> textwithpicto('', $trigger['info']); ?>