diff --git a/htdocs/opensurvey/results.php b/htdocs/opensurvey/results.php
index f3fd135f16d..34945504943 100644
--- a/htdocs/opensurvey/results.php
+++ b/htdocs/opensurvey/results.php
@@ -1050,18 +1050,20 @@ $toutsujet = explode(",", $object->sujet); // With old versions, this field was
$compteursujet = 0;
$meilleursujet = '';
-for ($i = 0; $i < $nbcolonnes; $i++) {
- if (isset($sumfor[$i]) === true && isset($meilleurecolonne) === true && $sumfor[$i] == $meilleurecolonne) {
+for ($i = 0; $i < $nbcolonnes; $i++)
+{
+ if (isset($sumfor[$i]) === true && isset($meilleurecolonne) === true && $sumfor[$i] == $meilleurecolonne)
+ {
$meilleursujet.=", ";
if ($object->format == "D") {
$meilleursujetexport = $toutsujet[$i];
-
+ //var_dump($toutsujet);
if (strpos($toutsujet[$i], '@') !== false) {
$toutsujetdate = explode("@", $toutsujet[$i]);
- $meilleursujet .= dol_print_date($toutsujetdate[0],'daytext'). ' ('.dol_print_date($toutsujetdate[0],'%A').')' . ' - ' . $toutsujetdate[1];
+ $meilleursujet .= dol_print_date($toutsujetdate[0],'daytext'). ($toutsujetdate[0] ? ' ('.dol_print_date($toutsujetdate[0],'%A').')' : '') . ' - ' . $toutsujetdate[1];
} else {
- $meilleursujet .= dol_print_date($toutsujet[$i],'daytext'). ' ('.dol_print_date($toutsujet[$i],'%A').')';
+ $meilleursujet .= dol_print_date($toutsujet[$i],'daytext'). ($toutsujet[$i] ? ' ('.dol_print_date($toutsujet[$i],'%A').')' : '');
}
}
else
@@ -1083,9 +1085,9 @@ if ($nbofcheckbox >= 2)
print '
'."\n";
if (isset($meilleurecolonne) && $compteursujet == "1") {
- print "
" . $langs->trans('TheBestChoice') . ": ".$meilleursujet." " . $langs->trans("with") . " ".$meilleurecolonne."" . $vote_str . ".\n";
+ print "
" . $langs->trans('TheBestChoice') . ": ".$meilleursujet." " . $langs->trans("with") . " ".$meilleurecolonne." " . $vote_str . ".\n";
} elseif (isset($meilleurecolonne)) {
- print "
" . $langs->trans('TheBestChoices') . ": ".$meilleursujet." " . $langs->trans("with") . " ".$meilleurecolonne."" . $vote_str . ".\n";
+ print "
" . $langs->trans('TheBestChoices') . ": ".$meilleursujet." " . $langs->trans("with") . " ".$meilleurecolonne." " . $vote_str . ".\n";
}
print '
'."\n";
}
diff --git a/htdocs/public/opensurvey/studs.php b/htdocs/public/opensurvey/studs.php
index a9bd8a0fb70..acf986bb226 100644
--- a/htdocs/public/opensurvey/studs.php
+++ b/htdocs/public/opensurvey/studs.php
@@ -95,7 +95,7 @@ if (GETPOST('ajoutcomment','alpha'))
}
// Add vote
-if (GETPOST("boutonp") || GETPOST("boutonp.x") || GETPOST("boutonp_x")) // boutonp for chrom, boutonp_x for firefox
+if (GETPOST("boutonp") || GETPOST("boutonp.x") || GETPOST("boutonp_x")) // boutonp for chrome, boutonp_x for firefox
{
if (!$canbemodified) accessforbidden();
@@ -160,9 +160,12 @@ if (GETPOST("boutonp") || GETPOST("boutonp.x") || GETPOST("boutonp_x")) // bout
if ($email) {
include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
- $body = $langs->trans('EmailSomeoneVoted', $nom, getUrlSondage($numsondage, true));
+ $application = ($conf->global->MAIN_APPLICATION_TITLE ? $conf->global->MAIN_APPLICATION_TITLE : 'Dolibarr ERP/CRM');
- $cmailfile=new CMailFile("[".MAIN_APPLICATION_TITLE."] ".$langs->trans("Poll").': '.$object->titre, $email, $conf->global->MAIN_MAIL_EMAIL_FROM, $body);
+ $body = str_replace('\n', '
', $langs->transnoentities('EmailSomeoneVoted', $nom, getUrlSondage($numsondage, true)));
+ //var_dump($body);exit;
+
+ $cmailfile=new CMailFile("[".$application."] ".$langs->trans("Poll").': '.$object->titre, $email, $conf->global->MAIN_MAIL_EMAIL_FROM, $body, null, null, null, '', '', 0, -1);
$result=$cmailfile->sendfile();
}
}
diff --git a/htdocs/theme/md/img/menus/generic1.png b/htdocs/theme/md/img/menus/generic1.png
index b51ce3ed95a..39f808bed32 100644
Binary files a/htdocs/theme/md/img/menus/generic1.png and b/htdocs/theme/md/img/menus/generic1.png differ
diff --git a/htdocs/theme/md/img/menus/generic1_over.png b/htdocs/theme/md/img/menus/generic1_over.png
new file mode 100644
index 00000000000..adfa8c1599b
Binary files /dev/null and b/htdocs/theme/md/img/menus/generic1_over.png differ
diff --git a/htdocs/theme/md/img/menus/generic2.png b/htdocs/theme/md/img/menus/generic2.png
index b51ce3ed95a..f4dfc5f360a 100644
Binary files a/htdocs/theme/md/img/menus/generic2.png and b/htdocs/theme/md/img/menus/generic2.png differ
diff --git a/htdocs/theme/md/img/menus/generic2_over.png b/htdocs/theme/md/img/menus/generic2_over.png
new file mode 100644
index 00000000000..c8e58fc2220
Binary files /dev/null and b/htdocs/theme/md/img/menus/generic2_over.png differ
diff --git a/htdocs/theme/md/img/menus/generic3.png b/htdocs/theme/md/img/menus/generic3.png
index b51ce3ed95a..00769352dae 100644
Binary files a/htdocs/theme/md/img/menus/generic3.png and b/htdocs/theme/md/img/menus/generic3.png differ
diff --git a/htdocs/theme/md/img/menus/generic3_over.png b/htdocs/theme/md/img/menus/generic3_over.png
new file mode 100644
index 00000000000..0672d20bce4
Binary files /dev/null and b/htdocs/theme/md/img/menus/generic3_over.png differ
diff --git a/htdocs/theme/md/img/menus/generic4.png b/htdocs/theme/md/img/menus/generic4.png
index b51ce3ed95a..5f9240240da 100644
Binary files a/htdocs/theme/md/img/menus/generic4.png and b/htdocs/theme/md/img/menus/generic4.png differ
diff --git a/htdocs/theme/md/img/menus/generic4_over.png b/htdocs/theme/md/img/menus/generic4_over.png
new file mode 100644
index 00000000000..6a4d7b1acce
Binary files /dev/null and b/htdocs/theme/md/img/menus/generic4_over.png differ