X-Git-Url: http://git.cyclocoop.org/?p=ptitvelo%2Fweb%2Fwww.git;a=blobdiff_plain;f=www%2Fplugins%2Fagenda_3_5%2Fagenda_pipelines.php;h=fd52721c139a0061366f78874c542d4d7f9f3476;hp=1cdf7eb102e452646e3501c87331006e30276df4;hb=HEAD;hpb=f854641371bdfbaba8fbab6212853d9795ba8cc8 diff --git a/www/plugins/agenda_3_5/agenda_pipelines.php b/www/plugins/agenda_3_5/agenda_pipelines.php index 1cdf7eb..fd52721 100644 --- a/www/plugins/agenda_3_5/agenda_pipelines.php +++ b/www/plugins/agenda_3_5/agenda_pipelines.php @@ -21,7 +21,7 @@ function agenda_insert_head_css($flux){ include_spip("inc/config"); $cfg = (defined('_AGENDA_INSERT_HEAD_CSS')?_AGENDA_INSERT_HEAD_CSS:lire_config("agenda/insert_head_css")); if ($cfg){ - $flux .= ''; + $flux .= ''; } } return $flux; @@ -113,7 +113,7 @@ function agenda_optimiser_base_disparus($flux){ while ($row = sql_fetch($res)) sql_updateq("spip_evenements",array('statut'=>'poubelle'),"id_article=".$row['id_article']); - // Evenements a la pouvelle + // Evenements a la poubelle sql_delete("spip_evenements", "statut='poubelle' AND maj < ".$flux['args']['date']); include_spip('action/editer_liens'); @@ -249,5 +249,28 @@ function agenda_compositions_declarer_heritage($heritages) { return $heritages; } +/** + * Insertion dans le pipeline revisions_chercher_label (Plugin révisions) + * Trouver le bon label à afficher sur les champs dans les listes de révisions + * + * Si un champ est un champ extra, son label correspond au label défini du champs extra + * + * @pipeline revisions_chercher_label + * @param array $flux Données du pipeline + * @return array Données du pipeline +**/ +function agenda_revisions_chercher_label($flux){ + foreach(array('date_debut', 'date_fin','horaire','lieu') as $champ){ + if($flux['args']['champ'] == $champ){ + $flux['data'] = _T('agenda:evenement_'.$champ); + return $flux; + } + } + + if($flux['args']['champ'] == 'id_article') + $flux['data'] = _T('agenda:evenement_article'); + + return $flux; +} ?>