Re: Liste des catégories organiser par leurs nom et non par leur id sur extcal | Titre du sujet : Re: Liste des catégories organiser par leurs nom et non par leur id sur extcal par Nikita sur 01/01/2010 20:46:40
Bonsoir Celetron,
Dans le fichier /modules/extcal/class/cat.php
normalement ça devrait fonctionner si tu rajoutes les critères d'affichage
function getAllCat($user, $perm='extcal_cat_view')
{
$criteriaCompo = new CriteriaCompo();
if($perm != 'all') {
$authorizedAccessCats = $this->_extcalPerm->getAuthorizedCat($user, $perm);
$count = count($authorizedAccessCats);
if($count > 0) {
$in = '('.$authorizedAccessCats[0];
array_shift($authorizedAccessCats);
foreach($authorizedAccessCats as $authorizedAccessCat) {
$in .= ','.$authorizedAccessCat;
}
$in .= ')';
$criteriaCompo->add(new Criteria('cat_id', $in, 'IN'));
} else {
$criteriaCompo->add(new Criteria('cat_id', '(0)', 'IN'));
}
}
$criteriaCompo->setSort('cat_name');//critère d'affichage
$criteriaCompo->setOrder('ASC');//critère d'affichage
return $this->getObjects($criteriaCompo);
}
|
|