Subversion Repositories eFlore/Applications.del

Compare Revisions

Ignore whitespace Rev 1810 → Rev 1811

/branches/v1.3-beryllium/services/modules/0.1/determinations/ListeImagesDeterminationsProbables.php
139,15 → 139,17
$limite = @min(intval($this->parametres['navigation.limite']), 1000);
$limite = $limite ? $limite : 10; // 0 => 10
 
$whereClause = count($where) > 0 ? 'WHERE '.implode(' AND ', $where) : '';
 
$requeteLiaisons = sprintf(
'SELECT SQL_CALC_FOUND_ROWS %s ce_protocole, moyenne, nb_votes, nb_tags'
// IF(LENGTH()) workaround pour la jointure sur tela_annuaire depuis un hash md5 casté
. ' FROM v_del_image di LEFT JOIN del_utilisateur du ON du.id_utilisateur = IF(LENGTH(di.ce_utilisateur) > 5, 0, di.ce_utilisateur)'
. ' LEFT JOIN del_image_stat ds ON di.id_image = ds.ce_image'
. ' WHERE %s GROUP BY id_image /* car plusieurs image pour obs, see PHP */ ORDER BY moyenne LIMIT %d, %d -- %s:%d',
. ' %s GROUP BY id_image ORDER BY moyenne LIMIT %d,%d -- %s:%d',
 
implode(', ',$champs),
implode(' AND ', $where),
$whereClause,
intval(@$this->parametres['navigation.depart']),
$limite,
__FILE__, __LINE__);