';
- if (! empty($conf->global->$param) && ! isValidEmail($conf->global->$param)) print ' '.img_warning($langs->trans("ErrorBadEMail"));
+ $value=GETPOST($param)?GETPOST($param,'alpha'):$conf->global->$param;
+ $s=''; // Do not use type="email" here, we must be able to enter a list of email with , separator.
+ $arrayemail=explode(',',$value);
+ $showwarning=0;
+ foreach($arrayemail as $key=>$valuedet)
+ {
+ $valuedet=trim($valuedet);
+ if (! empty($valuedet) && ! isValidEmail($valuedet)) $showwarning++;
+ }
+ if ((! empty($conf->global->$param)) && $showwarning) $s.=' '.img_warning($langs->trans("ErrorBadEMail"));
+ print $form->textwithpicto($s,$langs->trans("YouCanUseCommaSeparatorForSeveralRecipients"));
print '
';
print '';
}
diff --git a/htdocs/admin/supplierinvoice_extrafields.php b/htdocs/admin/supplierinvoice_extrafields.php
index e47c8738041..e1f71d8d147 100644
--- a/htdocs/admin/supplierinvoice_extrafields.php
+++ b/htdocs/admin/supplierinvoice_extrafields.php
@@ -31,6 +31,7 @@ require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/fourn.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
+$langs->load("orders");
if (!$user->admin)
accessforbidden();
diff --git a/htdocs/comm/action/class/ical.class.php b/htdocs/comm/action/class/ical.class.php
index da062176d13..e7bddb8bd7e 100644
--- a/htdocs/comm/action/class/ical.class.php
+++ b/htdocs/comm/action/class/ical.class.php
@@ -23,10 +23,11 @@
* \ingroup agenda
* \brief File of class to parse ical calendars
*/
+require_once DOL_DOCUMENT_ROOT.'/core/lib/xcal.lib.php';
/**
- * Class to parse ICal calendars
+ * Class to read/parse ICal calendars
*/
class ICal
{
@@ -107,6 +108,7 @@ class ICal
if (!stristr($this->file_text[0],'BEGIN:VCALENDAR')) return 'error not VCALENDAR';
$insidealarm=0;
+ $tmpkey='';$tmpvalue='';
foreach ($this->file_text as $text)
{
$text = trim($text); // trim one line
@@ -137,7 +139,7 @@ class ICal
case "BEGIN:DAYLIGHT":
case "BEGIN:VTIMEZONE":
case "BEGIN:STANDARD":
- $type = $value; // save tu array under value key
+ $type = $value; // save array under value key
break;
case "END:VTODO": // end special text - goto VCALENDAR key
@@ -159,8 +161,31 @@ class ICal
$insidealarm=0;
break;
- default: // no special string
- if (! $insidealarm) $this->add_to_array($type, $key, $value); // add to array
+ default: // no special string (SUMMARY, DESCRIPTION, ...)
+ if ($tmpvalue)
+ {
+ $tmpvalue .= $text;
+ if (! preg_match('/=$/',$text)) // No more lines
+ {
+ $key=$tmpkey;
+ $value=quotedPrintDecode(preg_replace('/^ENCODING=QUOTED-PRINTABLE:/i','',$tmpvalue));
+ $tmpkey='';
+ $tmpvalue='';
+ }
+ }
+ elseif (preg_match('/^ENCODING=QUOTED-PRINTABLE:/i',$value))
+ {
+ if (preg_match('/=$/',$value))
+ {
+ $tmpkey=$key;
+ $tmpvalue=$tmpvalue.preg_replace('/=$/',"",$value); // We must wait to have next line to have complete message
+ }
+ else
+ {
+ $value=quotedPrintDecode(preg_replace('/^ENCODING=QUOTED-PRINTABLE:/i','',$tmpvalue.$value));
+ }
+ } //$value=quotedPrintDecode($tmpvalue.$value);
+ if (! $insidealarm && ! $tmpkey) $this->add_to_array($type, $key, $value); // add to array
break;
}
}
diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php
index ae646e5d2c3..2ec95810536 100644
--- a/htdocs/comm/action/index.php
+++ b/htdocs/comm/action/index.php
@@ -361,6 +361,7 @@ if (! empty($conf->use_javascript_ajax))
foreach ($showextcals as $val)
{
$htmlname = dol_string_nospecial($val['name']);
+ $htmlname = dol_string_nospecial($htmlname,'_',array("\.","#"));
$s.='