Suite de la fonction générique d'export

This commit is contained in:
Laurent Destailleur 2005-10-30 14:02:38 +00:00
parent 8a1d94203d
commit e9e8da4b70

View File

@ -49,7 +49,7 @@ while (($file = readdir($handle))!==false)
{ {
if (substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS') if (substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS')
{ {
if (eregi("(.*)\.class\.php",$file,$reg)) if (eregi("^(mod.*)\.class\.php",$file,$reg))
{ {
$modulename=$reg[1]; $modulename=$reg[1];
@ -63,6 +63,7 @@ while (($file = readdir($handle))!==false)
{ {
foreach($module->export_code as $r => $value) foreach($module->export_code as $r => $value)
{ {
dolibarr_syslog("Exports trouvés pour le module ".$modulename);
$perm=$module->export_permission[$r][0]; $perm=$module->export_permission[$r][0];
if (strlen($perms[2]) > 0) if (strlen($perms[2]) > 0)
{ {
@ -130,6 +131,8 @@ print '<td>'.$langs->trans("Module").'</td>';
print '<td>'.$langs->trans("ExportableDatas").'</td>'; print '<td>'.$langs->trans("ExportableDatas").'</td>';
print '</tr>'; print '</tr>';
$val=true; $val=true;
if (sizeof($array_export_code))
{
foreach ($array_export_code as $key => $value) foreach ($array_export_code as $key => $value)
{ {
$val=!$val; $val=!$val;
@ -141,6 +144,11 @@ foreach ($array_export_code as $key => $value)
print '</td></tr>'; print '</td></tr>';
} }
}
else
{
print '<tr><td '.$bc[false].' colspan="2">'.$langs->trans("NoExportableData").'</td></tr>';
}
print '</table>'; print '</table>';