vtiger Forum Index vtiger
The Honest Open Source CRM
 

[Ancien forum - entraide] Template Mail [Réglé]
Click here to go to the original topic

 
       vtiger Forum Index -> French Forum
Previous topic :: Next topic  
Author Message
tiolito



Joined: 25 Jul 2007
Posts: 17
Location: Paris

Posted: Tue Aug 14, 2007 2:31 pm    Post subject: [Ancien forum - entraide] Template Mail [Réglé]  

Question jerry :

Quote: Bonjour,

J'ai eu un problème en enregistrant un modèle d'email. Impossible d'enregistrer le modèle si un apostrophe est présent dans le texte.

Y a-t-il une solution connue à ce problème ?

Merci d'avance.

Réponse Aissa :

Quote: Solution :

remplacez le contenu du fichier /modules/Settings/saveemailtemplate.php par ceci

Code: <?php
/*********************************************************************************
** The contents of this file are subject to the vtiger CRM Public License Version 1.0
 * ("License"); You may not use this file except in compliance with the License
 * The Original Code is:  vtiger CRM Open Source
 * The Initial Developer of the Original Code is vtiger.
 * Portions created by vtiger are Copyright (C) vtiger.
 * All Rights Reserved.
*
 ********************************************************************************/
require_once('include/database/PearDatabase.php');
require_once('include/utils/utils.php');

global $log;
$db = new PearDatabase();
   $log->debug("the foldername is ".$folderName);
$folderName = $_REQUEST["foldername"];
$templateName = addslashes($_REQUEST["templatename"]);
     $log->debug("the templatename is ".$templateName);
$templateid = $_REQUEST["templateid"];
     $log->debug("the templateid is ".$templateid);
$description = addslashes($_REQUEST["description"]);
     $log->debug("the description is ".$description);
$subject = addslashes($_REQUEST["subject"]);
     $log->debug("the subject is ".$subject);
$body = $_REQUEST["body"];
     $log->debug("the body is ".$body);
if ($body !='')
{
   $body = to_html($body);
     $log->info("the body value is set ");
}
if(isset($templateid) && $templateid !='')
{
   $log->info("the templateid is set");
   $sql = "update vtiger_emailtemplates set foldername = '".$folderName."', templatename ='".addslashes($templateName)."', subject ='".addslashes($subject)."', description ='".addslashes($description)."', body ='".addslashes($body)."' where templateid =".$templateid;
   $adb->query($sql);
 
   $log->info("about to invoke the detailviewemailtemplate file");
   header("Location:index.php?module=Settings&action=detailviewemailtemplate&parenttab=Settings&templateid=".$templateid);
}
else
{
   $templateid = $db->getUniqueID('vtiger_emailtemplates');
   $sql = "insert into vtiger_emailtemplates values ('". $folderName. "','".addslashes($templateName)."','".addslashes($subject)."','".addslashes($description)."','".addslashes($body)."',0,".$templateid.")";
   $adb->query($sql);

    $log->info("added to the db the emailtemplate");
   header("Location:index.php?module=Settings&action=detailviewemailtemplate&parenttab=Settings&templateid=".$templateid);
}
?>

Réponse jerry :

Quote: Ca fonctionne parfaitement.

Merci Aïssa.
Back to top  
driss



Joined: 12 Nov 2006
Posts: 5

Posted: Tue Sep 18, 2007 9:38 am    Post subject: [Ancien forum - entraide] Template Mail [Réglé]  

Bonjour,

Est-ce que cette solution est valable pour Vtiger 5.0.3 ?

Merci à Aïssa et aux autres membres pour vos réponses.

Driss
Back to top  
gyrev



Joined: 13 Oct 2007
Posts: 16

Posted: Thu Oct 25, 2007 1:14 pm    Post subject: [Ancien forum - entraide] Template Mail [Réglé]  

Salut,

Des fois que quelqu'un d'autre se pose la question, oui, ça a l'air de marcher pour Vtiger 5.0.3

Ant
Back to top  
mahi



Joined: 17 Jun 2006
Posts: 60
Location: Grenoble France

Posted: Mon Oct 29, 2007 12:31 pm    Post subject: Re: [Ancien forum - entraide] Template Mail [Réglé]  

salut,

pour vtiger 5.03 la réponse est là:

http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/4416
Back to top  
 
       vtiger Forum Index -> French Forum
Page 1 of 1


Powered by phpBB Search Engine Indexer
Powered by phpBB 2.0.15 © 2001, 2002 phpBB Group