diff --git a/htdocs/core/boxes/box_external_rss.php b/htdocs/core/boxes/box_external_rss.php
index 698cd6504a2..7e5a746a8d1 100644
--- a/htdocs/core/boxes/box_external_rss.php
+++ b/htdocs/core/boxes/box_external_rss.php
@@ -158,7 +158,6 @@ class box_external_rss extends ModeleBoxes
$title = preg_replace("/([[:alnum:]])\?([[:alnum:]])/", "\\1'\\2", $title); // Manage issue of quotes improperly (de)coded in utf-8
$title = preg_replace("/^\s+/", "", $title); // Remove leading whitespace
- $this->info_box_contents["$href"] = "$title";
$tooltip = $title;
$description = !empty($item['description']) ? $item['description'] : '';
diff --git a/htdocs/core/boxes/modules_boxes.php b/htdocs/core/boxes/modules_boxes.php
index 11af741a6a4..3d5a5bb8760 100644
--- a/htdocs/core/boxes/modules_boxes.php
+++ b/htdocs/core/boxes/modules_boxes.php
@@ -295,7 +295,7 @@ class ModeleBoxes // Can't be abstract as it is instantiated to build "empty" bo
if ($nblines) {
// Loop on each record
foreach (array_keys($contents) as $i) {
- if (isset($contents[$i])) {
+ if (isset($contents[$i]) && is_array($contents[$i])) {
// TR
if (isset($contents[$i][0]['tr'])) {
$out .= '
';
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 6850bdb80b8..0c62d6e7e2a 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -1302,7 +1302,7 @@ class Form
*
* @param string $selected Preselected type
* @param string $htmlname Name of field in form
- * @param string $filter Optional filters criteras. WARNING: To avoid SQL injection, only few chars [.a-z0-9 =<>()] are allowed here (example: 's.rowid <> x', 's.client IN (1,3)'). Do not use a filter coming from input of users.
+ * @param string $filter Optional filters criteras. WARNING: To avoid SQL injection, only few chars [.a-z0-9 =<>()] are allowed here. Example: ((s.client:IN:1,3) AND (s.status:=:1)). Do not use a filter coming from input of users.
* @param string $showempty Add an empty field (Can be '1' or text key to use on empty line like 'SelectThirdParty')
* @param int $showtype Show third party type in combolist (customer, prospect or supplier)
* @param int $forcecombo Force to load all values and output a standard combobox (with no beautification)
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index aae73201717..9ca3eb7abab 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -7482,7 +7482,7 @@ function picto_required()
* - you can decide to convert line feed into a space
*
* @param string $stringtoclean String to clean
- * @param integer $removelinefeed 1=Replace all new lines by 1 space, 0=Only ending new lines are removed others are replaced with \n, 2=Ending new lines are removed but others are kept with a same number of \n than nb of when there is both "... \n..."
+ * @param integer $removelinefeed 1=Replace all new lines by 1 space, 0=Only ending new lines are removed others are replaced with \n, 2=The ending new line is removed but others are kept with the same number of \n than the nb of when there is both "... \n..."
* @param string $pagecodeto Encoding of input/output string
* @param integer $strip_tags 0=Use internal strip, 1=Use strip_tags() php function (bugged when text contains a < char that is not for a html tag or when tags is not closed like ' 0) {
$param = '';
$newcardbutton = '';
+ $newcardbutton .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', $_SERVER["PHP_SELF"].'?socid='.$object->id.'&action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $user->rights->societe->creer);
$titlelist = $langs->trans("ListOfActiveNotifications");
@@ -270,141 +275,147 @@ if ($result > 0) {
print_liste_field_titre("Action", $_SERVER["PHP_SELF"], "", '', $param, 'width="35%"', $sortfield, $sortorder);
print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "n.type", '', $param, 'width="10%"', $sortfield, $sortorder);
print_liste_field_titre('');
+ print_liste_field_titre('');
+
print "
\n";
// Line to add a new subscription
- $listofemails = $object->thirdparty_and_contact_email_array();
- if (count($listofemails) > 0) {
- $actions = array();
+ if ($action == 'create') {
+ $listofemails = $object->thirdparty_and_contact_email_array();
+ if (count($listofemails) > 0) {
+ $actions = array();
- // Load array of available notifications
- $notificationtrigger = new InterfaceNotification($db);
- $listofmanagedeventfornotification = $notificationtrigger->getListOfManagedEvents();
+ // Load array of available notifications
+ $notificationtrigger = new InterfaceNotification($db);
+ $listofmanagedeventfornotification = $notificationtrigger->getListOfManagedEvents();
- foreach ($listofmanagedeventfornotification as $managedeventfornotification) {
- $label = ($langs->trans("Notify_".$managedeventfornotification['code']) != "Notify_".$managedeventfornotification['code'] ? $langs->trans("Notify_".$managedeventfornotification['code']) : $managedeventfornotification['label']);
- $actions[$managedeventfornotification['rowid']] = $label;
+ foreach ($listofmanagedeventfornotification as $managedeventfornotification) {
+ $label = ($langs->trans("Notify_".$managedeventfornotification['code']) != "Notify_".$managedeventfornotification['code'] ? $langs->trans("Notify_".$managedeventfornotification['code']) : $managedeventfornotification['label']);
+ $actions[$managedeventfornotification['rowid']] = $label;
+ }
+
+ $newlistofemails = array();
+ foreach ($listofemails as $tmpkey => $tmpval) {
+ $labelhtml = str_replace(array('<', '>'), array(' - ', ''), $tmpval);
+ $newlistofemails[$tmpkey] = array('label' => dol_string_nohtmltag($tmpval), 'id' => $tmpkey, 'data-html' => $labelhtml);
+ }
+
+ print '