Fix: No validate unlined interventions

This commit is contained in:
Juanjo Menent 2011-07-06 09:39:04 +00:00
parent 6861f1cda7
commit 3c5b0b21c6

View File

@ -23,7 +23,7 @@
* \file htdocs/fichinter/fiche.php * \file htdocs/fichinter/fiche.php
* \brief Fichier fiche intervention * \brief Fichier fiche intervention
* \ingroup ficheinter * \ingroup ficheinter
* \version $Id: fiche.php,v 1.165 2011/07/02 17:14:58 eldy Exp $ * \version $Id: fiche.php,v 1.166 2011/07/06 09:39:04 simnandez Exp $
*/ */
require("../main.inc.php"); require("../main.inc.php");
@ -1037,7 +1037,7 @@ elseif ($fichinterid)
if ($action != 'editdescription') if ($action != 'editdescription')
{ {
// Validate // Validate
if ($object->statut == 0 && $user->rights->ficheinter->creer) if ($object->statut == 0 && $user->rights->ficheinter->creer && sizeof($object->lines) > 0)
{ {
print '<a class="butAction" href="fiche.php?id='.$id.'&action=validate"'; print '<a class="butAction" href="fiche.php?id='.$id.'&action=validate"';
print '>'.$langs->trans("Valid").'</a>'; print '>'.$langs->trans("Valid").'</a>';
@ -1178,5 +1178,5 @@ elseif ($fichinterid)
$db->close(); $db->close();
llxFooter('$Date: 2011/07/02 17:14:58 $ - $Revision: 1.165 $'); llxFooter('$Date: 2011/07/06 09:39:04 $ - $Revision: 1.166 $');
?> ?>