retest
This commit is contained in:
parent
9369ee17ce
commit
200f6aab15
@ -594,8 +594,15 @@ class CRVI_Event_Model extends Main_Model {
|
||||
* get departement nom
|
||||
*/
|
||||
public function get_departement_nom($id_departement) {
|
||||
|
||||
if (empty($id_departement)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$departement = get_term_by('id', $id_departement, 'departement');
|
||||
if (!$departement || is_wp_error($departement)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return $departement->name;
|
||||
}
|
||||
|
||||
@ -603,7 +610,15 @@ class CRVI_Event_Model extends Main_Model {
|
||||
* get type_intervention nom
|
||||
*/
|
||||
public function get_type_intervention_nom($id_type_intervention) {
|
||||
if (empty($id_type_intervention)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$type_intervention = get_term_by('id', $id_type_intervention, 'type_intervention');
|
||||
if (!$type_intervention || is_wp_error($type_intervention)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return $type_intervention->name;
|
||||
}
|
||||
|
||||
|
||||
@ -991,9 +991,12 @@ class CRVI_TraductionLangue_Model extends Main_Model {
|
||||
if ($use_cache) {
|
||||
$cached = \get_transient($cache_key);
|
||||
if ($cached !== false) {
|
||||
error_log('🔍 Cache utilisé pour ' . $cache_key . ' - Résultat: ' . (empty($cached) ? 'vide' : count($cached) . ' langues'));
|
||||
return $cached;
|
||||
}
|
||||
}
|
||||
|
||||
error_log('🔍 Calcul des capacités pour ' . $date_debut . ' à ' . $date_fin);
|
||||
|
||||
// Récupérer tous les posts 'traduction_langue' publiés et actifs
|
||||
$capacites_posts = \get_posts([
|
||||
|
||||
Loading…
Reference in New Issue
Block a user