diff --git a/ChangeLog b/ChangeLog
index 7537a891c9b..d4a8b55625f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -19,8 +19,8 @@ WARNING:
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
* The ICS value for direct debit or credit transfer is now store on each bank account instead of into the global setup.
* API /setup/shipment_methods has been replaced with API /setup/shipping_methods
-* Field "tva" renamed into "total_tva" in llx_propal, llx_supplier_proposal, llx_commande, llx_commande_fournisseur for better field name consistency
-* Field "total" renamed into "total_ttc" in llx_propal, llx_supplier_proposal for better field name consistency
+* Field "tva" renamed into "total_tva" for table llx_propal, llx_supplier_proposal, llx_commande, llx_commande_fournisseur for better field name consistency
+* Field "total" renamed into "total_ttc" for table lx_propal, llx_supplier_proposal for better field name consistency
* If your database is PostgreSql, you must use version 9.1.0 or more (Dolibarr need the SQL function CONCAT)
* If your database is MySql or MariaDB, you need at least version 5.1
diff --git a/htdocs/user/info.php b/htdocs/user/info.php
index 74b7e70e582..f6a0c731e14 100644
--- a/htdocs/user/info.php
+++ b/htdocs/user/info.php
@@ -32,6 +32,8 @@ $langs->load("users");
// Security check
$id = GETPOST('id', 'int');
+$ref = GETPOST('ref', 'alpha');
+
$object = new User($db);
if ($id > 0 || !empty($ref)) {
$result = $object->fetch($id, $ref, '', 1);
diff --git a/htdocs/user/notify/card.php b/htdocs/user/notify/card.php
index fa2cf5a5d41..228bbd7882e 100644
--- a/htdocs/user/notify/card.php
+++ b/htdocs/user/notify/card.php
@@ -32,9 +32,11 @@ require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/triggers/interface_50_modNotification_Notification.class.php';
// Load translation files required by page
-$langs->loadLangs(array('companies', 'mails', 'admin', 'other'));
+$langs->loadLangs(array('companies', 'mails', 'admin', 'other', 'errors'));
$id = GETPOST("id", 'int');
+$ref = GETPOST('ref', 'alpha');
+
$action = GETPOST('action', 'aZ09');
$actionid = GETPOST('actionid');
@@ -63,11 +65,24 @@ $pagenext = $page + 1;
$now = dol_now();
+// Security check
+$object = new User($db);
+if ($id > 0 || !empty($ref)) {
+ $result = $object->fetch($id, $ref, '', 1);
+ $object->getrights();
+}
+
+$permissiontoadd = (($object->id == $user->id) || (!empty($user->rights->user->user->lire)));
+
/*
* Actions
*/
+if (GETPOST('cancel', 'alpha')) {
+ $action = 'list';
+}
+
// Add a notification
if ($action == 'add') {
$error = 0;
@@ -75,6 +90,7 @@ if ($action == 'add') {
if ($actionid <= 0) {
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Action")), null, 'errors');
$error++;
+ $action = 'create';
}
if (!$error) {
@@ -98,6 +114,7 @@ if ($action == 'add') {
$db->commit();
} else {
$db->rollback();
+ $action = 'create';
}
}
}
@@ -185,7 +202,7 @@ if ($result > 0) {
// Add notification form
- print load_fiche_titre($langs->trans("AddNewNotification"), '', '');
+ // print load_fiche_titre($langs->trans("AddNewNotification"), '', '');
print '