From 67a4431529f57bb7083033d4ac0facf2526725af Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 14 Apr 2013 20:05:23 +0200 Subject: [PATCH] Fix into emailing --- htdocs/opensurvey/fonctions.php | 2 ++ htdocs/opensurvey/public/studs.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/opensurvey/fonctions.php b/htdocs/opensurvey/fonctions.php index 9c3ecba0b2d..3935045d35f 100755 --- a/htdocs/opensurvey/fonctions.php +++ b/htdocs/opensurvey/fonctions.php @@ -103,6 +103,8 @@ function showlogo() */ function get_server_name() { + global $dolibarr_main_url_root; + $urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',trim($dolibarr_main_url_root)); $urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file //$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current diff --git a/htdocs/opensurvey/public/studs.php b/htdocs/opensurvey/public/studs.php index 8a59b894d4f..9da1c4f79cb 100755 --- a/htdocs/opensurvey/public/studs.php +++ b/htdocs/opensurvey/public/studs.php @@ -139,7 +139,7 @@ if (isset($_POST["boutonp"]) || isset($_POST["boutonp_x"])) if (! empty($object->mailsonde)) { include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; - $cmailfile=new CMailFile("[".DOL_APPLICATION_TITLE."] ".$langs->trans("Poll").': '.$object->titre, $object->mail_admin, $conf->global->MAIN_MAIL_EMAIL_FROM, $nom." has filled a line.\nou can find your poll at the link:\n".getUrlSondage($numsondage)); + $cmailfile=new CMailFile("[".MAIN_APPLICATION_TITLE."] ".$langs->trans("Poll").': '.$object->titre, $object->mail_admin, $conf->global->MAIN_MAIL_EMAIL_FROM, $nom." has filled a line.\nYou can find your poll at the link:\n".getUrlSondage($numsondage)); $result=$cmailfile->sendfile(); if ($result) {