Fix: Do not include an output class (form) inside a core system class.

This commit is contained in:
Laurent Destailleur 2012-02-22 14:43:13 +01:00
parent 65104cbb40
commit e4cf111ac2
2 changed files with 11 additions and 9 deletions

View File

@ -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).'<br>';
}
$triggers[$j]['info'] = $form->textwithpicto('',$text);
$triggers[$j]['info'] = $text;
$j++;
}
return $triggers;

View File

@ -19,7 +19,7 @@
<!-- BEGIN PHP TEMPLATE -->
<table class="noborder" width="100%">
<table class="noborder" style="width: 100%">
<tr class="liste_titre">
<td colspan="2"><?php echo $langs->trans("File"); ?></td>
<td align="center"><?php echo $langs->trans("Version"); ?></td>
@ -29,7 +29,8 @@
<?php
$var=True;
foreach ($triggers as $trigger) {
foreach ($triggers as $trigger)
{
$var=!$var;
?>
@ -39,11 +40,13 @@ $var=!$var;
<td valign="top"><?php echo $trigger['file']; ?></td>
<td valign="top" align="center"><?php echo $trigger['version']; ?></td>
<td valign="top" align="center"><?php echo $trigger['status']; ?></td>
<td valign="top"><?php echo $trigger['info']; ?></td>
<td valign="top"><?php echo $form->textwithpicto('', $trigger['info']); ?></td>
</tr>
<?php } ?>
<?php
}
?>
</table>