<?php
/*
 * Gasell: Copyright 2005 Linux-Nantes Association <contact@linux-nantes.fr.eu.org>
 *
 * You should have received a copy of the GNU Public
 * License along with this package; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 *
 * Authors: Raude-Morvan Damien (DrazziB) <drazzib@drazzib.com>
 *
 * Histoire
 *  * 09/07/02005 DrazziB : Création de l'action
 */

/**
 * Recuperation de la liste des activites
 *
 * @param string $args['racine'] : racine qui va servir de base a la recuperation
 * @param boolean $args['showAll'] : si 'true', on recupere l'ensemble des activites,
 * meme celles qui sont cloturees.
 * 
 * @return array activite[]
 */

require_once GASELL_BASE . '/lib/Activite.php';

// TODO Recuperation de la liste des Activites.
// Pour la personne et pour ses differents type d'adhesion

$result = array();
$result['base'] = NULL;
$result['list'] = array();

if (isset($args['racine']) &&  $args['racine'] != "")
 {
	$result['base'] = new Activite($args['racine']);
	$result['list'] = Activite::GetListActivite($args['racine'], $args['showAll']);
 }
else
 {
	$result['list'] = Activite::GetListActivite(NULL, $args['showAll']);
 }

?>