diff --git a/htdocs/actioncomm.class.php b/htdocs/actioncomm.class.php index c3348bd1b33..21cdfcd0bed 100644 --- a/htdocs/actioncomm.class.php +++ b/htdocs/actioncomm.class.php @@ -68,7 +68,7 @@ class ActionComm /** * \brief Constructeur - * \param db Handler d'accès base de donnée + * \param db Handler d'acc�s base de donn�e */ function ActionComm($db) { @@ -88,7 +88,7 @@ class ActionComm * \brief Ajout d'une action en base * \param user auteur de la creation de l'action * \param notrigger 1 ne declenche pas les triggers, 0 sinon - * \return int id de l'action créée, < 0 si erreur + * \return int id de l'action cr��e, < 0 si erreur */ function add($user,$notrigger=0) { @@ -198,7 +198,7 @@ class ActionComm /** * \brief Charge l'objet action depuis la base - * \param id id de l'action a récupérer + * \param id id de l'action a r�cup�rer */ function fetch($id) { @@ -446,9 +446,9 @@ class ActionComm /** - * \brief Retourne le libellé du statut de la commande - * \param mode 0=libellé long, 1=libellé court, 2=Picto + Libellé court, 3=Picto, 4=Picto + Libellé long, 5=Libellé court + Picto - * \return string Libellé + * \brief Retourne le libell� du statut de la commande + * \param mode 0=libell� long, 1=libell� court, 2=Picto + Libell� court, 3=Picto, 4=Picto + Libell� long, 5=Libell� court + Picto + * \return string Libell� */ function getLibStatut($mode) { @@ -456,10 +456,10 @@ class ActionComm } /** - * \brief Renvoi le libellé d'un statut donné + * \brief Renvoi le libell� d'un statut donn� * \param percent Pourcentage avancement - * \param mode 0=libellé long, 1=libellé court, 2=Picto + Libellé court, 3=Picto, 4=Picto + Libellé long, 5=Libellé court + Picto - * \return string Libellé + * \param mode 0=libell� long, 1=libell� court, 2=Picto + Libell� court, 3=Picto, 4=Picto + Libell� long, 5=Libell� court + Picto + * \return string Libell� */ function LibStatut($percent,$mode) { @@ -506,7 +506,7 @@ class ActionComm /** * \brief Renvoie nom clicable (avec eventuellement le picto) * \param withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul - * \param maxlength Nombre de caractères max dans libellé + * \param maxlength Nombre de caract�res max dans libell� * \param class Force style class on a link * \return string Chaine avec URL * \remarks Utilise $this->id, $this->code et $this->libelle @@ -596,10 +596,38 @@ class ActionComm $sql.= " c.id as type_id, c.code as type_code, c.libelle"; $sql.= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c"; $sql.= " WHERE a.fk_action=c.id"; - foreach($filters as $key => $value) + foreach ($filters as $key => $value) { if ($key == 'year') $sql.=' AND '; if ($key == 'idaction') $sql.=' AND a.id='.$value; + if ($key == 'login') + { + $userforfilter=new User($this->db); + $userforfilter->fetch($value); + $sql.= " AND ("; + $sql.= " a.fk_user_author = ".$userforfilter->id; + $sql.= " OR a.fk_user_action = ".$userforfilter->id; + $sql.= " OR a.fk_user_done = ".$userforfilter->id; + $sql.= ")"; + } + if ($key == 'logina') + { + $userforfilter=new User($this->db); + $userforfilter->fetch($value); + $sql.= " AND a.fk_user_author = ".$userforfilter->id; + } + if ($key == 'logint') + { + $userforfilter=new User($this->db); + $userforfilter->fetch($value); + $sql.= " AND a.fk_user_action = ".$userforfilter->id; + } + if ($key == 'logind') + { + $userforfilter=new User($this->db); + $userforfilter->fetch($value); + $sql.= " AND a.fk_user_done = ".$userforfilter->id; + } } $sql.= " ORDER by datec"; diff --git a/htdocs/comm/action/agendaexport.php b/htdocs/comm/action/agendaexport.php index 3152f628c60..34d07f223f9 100644 --- a/htdocs/comm/action/agendaexport.php +++ b/htdocs/comm/action/agendaexport.php @@ -19,6 +19,7 @@ /** \file htdocs/comm/action/agendaexport.php \ingroup agenda \brief Page export agenda + http://127.0.0.1/dolibarr/comm/action/agendaexport.php?format=rss&exportkey=cle&filter=mine \version $Id$ */ @@ -40,6 +41,11 @@ if (! empty($_GET["type"])) $type=$_GET["type"]; $filters=array(); if (! empty($_GET["year"])) $filters['year']=$_GET["year"]; if (! empty($_GET["idaction"])) $filters['idaction']=$_GET["idaction"]; +if (! empty($_GET["login"])) $filters['login']=$_GET["login"]; +if (! empty($_GET["logina"])) $filters['logina']=$_GET["logina"]; +if (! empty($_GET["logint"])) $filters['logint']=$_GET["logint"]; +if (! empty($_GET["logind"])) $filters['logind']=$_GET["logind"]; + // C'est un wrapper, donc header vierge function llxHeader() { print '