Subversion Repositories Applications.projet

Rev

Rev 397 | Rev 407 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 397 Rev 402
Line 899... Line 899...
899
            include_once PROJET_CHEMIN_CLASSES.'annuaire.class.php' ;
899
            include_once PROJET_CHEMIN_CLASSES.'annuaire.class.php' ;
900
        	$utilisateur = new annuaire($this->_db, array('identifiant' => PROJET_CHAMPS_ID,
900
        	$utilisateur = new annuaire($this->_db, array('identifiant' => PROJET_CHAMPS_ID,
901
							'mail' => PROJET_CHAMPS_MAIL, 'table' => PROJET_ANNUAIRE,
901
							'mail' => PROJET_CHAMPS_MAIL, 'table' => PROJET_ANNUAIRE,
902
							'nom'=> PROJET_CHAMPS_NOM, 'prenom' => PROJET_CHAMPS_PRENOM)) ;
902
							'nom'=> PROJET_CHAMPS_NOM, 'prenom' => PROJET_CHAMPS_PRENOM)) ;
903
            $utilisateur->setId($this->_auth->getAuthData(PROJET_CHAMPS_ID)) ;
903
            $utilisateur->setId($this->_auth->getAuthData(PROJET_CHAMPS_ID)) ;
904
            $this->notifierCoordinateurs(PROJET_NOTIFICATION_NOUVEAU_DOC, $utilisateur);
904
	    $this->notifierCoordinateurs(PROJET_NOTIFICATION_NOUVEAU_DOC,
-
 
905
					 $utilisateur,
-
 
906
 
-
 
907
					 'http://'.$this->_url->host.'/projets/'.$this->_id_projet.'/telechargement/'.$id_document.
-
 
908
					 ' (' . $formulaire_document->getSubmitValue("document_nom") . ')');
905
        } else {
909
        } else {
906
            return $formulaire_document->toHTML() ;
910
            return $formulaire_document->toHTML() ;
907
        }
911
        }
908
        return $retour;
912
        return $retour;
909
    }
913
    }
Line 1661... Line 1665...
1661
	 *  Lorsqu un projet n a plus de coordinateur, la notification est
1665
	 *  Lorsqu un projet n a plus de coordinateur, la notification est
1662
	 *  envoyee aux administrateurs
1666
	 *  envoyee aux administrateurs
1663
	 *
1667
	 *
1664
	 */
1668
	 */
Line 1665... Line 1669...
1665
 
1669
 
Line 1666... Line 1670...
1666
	function notifierCoordinateurs ($notification, $utilisateur) {
1670
    function notifierCoordinateurs ($notification, $utilisateur, $lien = false) {
Line 1667... Line 1671...
1667
 
1671
 
1668
		include_once PROJET_CHEMIN_CLASSES.'projetTemplate.class.php';
1672
		include_once PROJET_CHEMIN_CLASSES.'projetTemplate.class.php';
Line 1707... Line 1711...
1707
	    if (PEAR::isError($sujet_mail)) $sujet_mail->raiseError ($sujet_mail->getMessage().'<br />'.$sujet_mail->getDebugInfo());
1711
	    if (PEAR::isError($sujet_mail)) $sujet_mail->raiseError ($sujet_mail->getMessage().'<br />'.$sujet_mail->getDebugInfo());
Line 1708... Line 1712...
1708
 
1712
 
1709
	    $corps_mail = str_replace ('{nom}', $utilisateur->getInfo( 'nom'), $corps_mail);
1713
	    $corps_mail = str_replace ('{nom}', $utilisateur->getInfo( 'nom'), $corps_mail);
1710
	    $corps_mail = str_replace ('{prenom}', $utilisateur->getInfo( 'prenom'), $corps_mail);
1714
	    $corps_mail = str_replace ('{prenom}', $utilisateur->getInfo( 'prenom'), $corps_mail);
-
 
1715
	    $corps_mail = str_replace ('{nom_projet}', $projet->getTitre(), $corps_mail);
-
 
1716
	    if($notification == PROJET_NOTIFICATION_NOUVEAU_DOC && $lien) {
-
 
1717
		$corps_mail = str_replace ('{lien}', $lien, $corps_mail);
-
 
1718
	    }
1711
	    $corps_mail = str_replace ('{nom_projet}', $projet->getTitre(), $corps_mail);
1719
	    else {
-
 
1720
		$corps_mail = str_replace ('{lien}', str_replace ('&amp;', '&', $this->_url->getURL()), $corps_mail);
Line 1712... Line 1721...
1712
	    $corps_mail = str_replace ('{lien}', str_replace ('&amp;', '&', $this->_url->getURL()), $corps_mail);
1721
	    }
1713
 
1722
 
1714
		$entetes['From'] = PROJET_MAIL_ADMINISTRATEUR;
1723
		$entetes['From'] = PROJET_MAIL_ADMINISTRATEUR;
1715
        $entetes['To'] = '';
1724
        $entetes['To'] = '';