This commit is contained in:
Michael RICOIS 2017-03-29 13:56:15 +02:00
parent e93df1d6d6
commit 4de0c30270

View File

@ -117,17 +117,17 @@ class Metier_Liens_Base
->where('l.idPar = :id')->setParameter('id', $id) ->where('l.idPar = :id')->setParameter('id', $id)
->orderBy('l.PDetention', 'DESC'); ->orderBy('l.PDetention', 'DESC');
// Actif / Inactif // Actif / Inactif
if (null !== $actif) { if (null !== $actif) {
if (false === $actif) { if (false === $actif) {
$qb->andWhere('l.actif = 0'); $qb->andWhere('l.actif = 0');
} else { } else {
$qb->andWhere('l.actif = 1'); $qb->andWhere('l.actif = 1');
}
} }
}
// Don't display deleted - anomaly // Don't display deleted - anomaly
$qb->andWhere("l.dateSuppr = '0000-00-00 00:00:00'"); $qb->andWhere("l.dateSuppr = '0000-00-00 00:00:00'");
$stmt = $qb->execute(); $stmt = $qb->execute();
$liens = $stmt->fetchAll(\PDO::FETCH_OBJ); $liens = $stmt->fetchAll(\PDO::FETCH_OBJ);
} catch (\Doctrine\DBAL\DBALException $e) { } catch (\Doctrine\DBAL\DBALException $e) {