[SPIP Zone] r4160 - in /_plugins_branche_stable_/_spip_1_9_0_/pim_agenda: pim_agenda_mes_fonctions.php public/criteres_agenda.php public/criteres_pim_agenda.php

Author: cedric@yterium.com
Date: Sat Jul 22 13:19:47 2006
New Revision: 4160

Log:
critere_agenda.php est commun et identique a celui du plugin agenda
critere pim_agenda_actif deplace dans un fichier specifique.

Added:
    _plugins_branche_stable_/_spip_1_9_0_/pim_agenda/public/criteres_pim_agenda.php
Modified:
    _plugins_branche_stable_/_spip_1_9_0_/pim_agenda/pim_agenda_mes_fonctions.php
    _plugins_branche_stable_/_spip_1_9_0_/pim_agenda/public/criteres_agenda.php

Modified: _plugins_branche_stable_/_spip_1_9_0_/pim_agenda/pim_agenda_mes_fonctions.php

--- _plugins_branche_stable_/_spip_1_9_0_/pim_agenda/pim_agenda_mes_fonctions.php (original)
+++ _plugins_branche_stable_/_spip_1_9_0_/pim_agenda/pim_agenda_mes_fonctions.php Sat Jul 22 13:19:47 2006
@@ -1,6 +1,7 @@
<?php

include_spip('public/criteres_agenda');
+include_spip('public/criteres_pim_agenda');
include_spip('inc/agenda_filtres');

Modified: _plugins_branche_stable_/_spip_1_9_0_/pim_agenda/public/criteres_agenda.php

--- _plugins_branche_stable_/_spip_1_9_0_/pim_agenda/public/criteres_agenda.php (original)
+++ _plugins_branche_stable_/_spip_1_9_0_/pim_agenda/public/criteres_agenda.php Sat Jul 22 13:19:47 2006
@@ -1,20 +1,5 @@
<?php

-function critere_pim_agenda_actif_dist($idb, &$boucles, $crit){
- $not = $crit->not;
- $boucle = &$boucles[$idb];
- $type = $boucle->type_requete;
- $nom = $table_des_tables[$type];
- if ($boucle->id_table=='auteurs'){
- if (isset($GLOBALS['meta']['pim_agenda_auteurs_actifs']))
- $auteurs_agenda_actif = unserialize($GLOBALS['meta']['pim_agenda_auteurs_actifs']);
- else
- $auteurs_agenda_actif = array();
- $c = "calcul_mysql_in('$type.id_auteur', implode(',',isset(\$GLOBALS['meta']['pim_agenda_auteurs_actifs'])?unserialize(\$GLOBALS['meta']['pim_agenda_auteurs_actifs']):array()),'$not')";
- $boucle->where[]= "$c";
- }
-}
-
// {branche ?}
// http://www.spip.net/@branche
function critere_branche($idb, &$boucles, $crit) {

Added: _plugins_branche_stable_/_spip_1_9_0_/pim_agenda/public/criteres_pim_agenda.php

--- _plugins_branche_stable_/_spip_1_9_0_/pim_agenda/public/criteres_pim_agenda.php (added)
+++ _plugins_branche_stable_/_spip_1_9_0_/pim_agenda/public/criteres_pim_agenda.php Sat Jul 22 13:19:47 2006
@@ -0,0 +1,18 @@
+<?php
+
+function critere_pim_agenda_actif_dist($idb, &$boucles, $crit){
+ $not = $crit->not;
+ $boucle = &$boucles[$idb];
+ $type = $boucle->type_requete;
+ $nom = $table_des_tables[$type];
+ if ($boucle->id_table=='auteurs'){
+ if (isset($GLOBALS['meta']['pim_agenda_auteurs_actifs']))
+ $auteurs_agenda_actif = unserialize($GLOBALS['meta']['pim_agenda_auteurs_actifs']);
+ else
+ $auteurs_agenda_actif = array();
+ $c = "calcul_mysql_in('$type.id_auteur', implode(',',isset(\$GLOBALS['meta']['pim_agenda_auteurs_actifs'])?unserialize(\$GLOBALS['meta']['pim_agenda_auteurs_actifs']):array()),'$not')";
+ $boucle->where[]= "$c";
+ }
+}
+
+?>
\ No newline at end of file