Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
8ee9e59173
@ -133,7 +133,7 @@ if (empty($reshook))
|
|||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
// Set if we used free entry or predefined product
|
// Set if we used free entry or predefined product
|
||||||
$idprod = GETPOST('idprod', 'int');
|
$idprod = (int) GETPOST('idprod', 'int');
|
||||||
$qty = GETPOST('qty', 'int');
|
$qty = GETPOST('qty', 'int');
|
||||||
$qty_frozen = GETPOST('qty_frozen', 'int');
|
$qty_frozen = GETPOST('qty_frozen', 'int');
|
||||||
$disable_stock_change = GETPOST('disable_stock_change', 'int');
|
$disable_stock_change = GETPOST('disable_stock_change', 'int');
|
||||||
@ -172,8 +172,7 @@ if (empty($reshook))
|
|||||||
$bomline->position = ($ranktouse + 1);
|
$bomline->position = ($ranktouse + 1);
|
||||||
|
|
||||||
$result = $bomline->create($user);
|
$result = $bomline->create($user);
|
||||||
if ($result <= 0)
|
if ($result <= 0) {
|
||||||
{
|
|
||||||
setEventMessages($bomline->error, $bomline->errors, 'errors');
|
setEventMessages($bomline->error, $bomline->errors, 'errors');
|
||||||
$action = '';
|
$action = '';
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -37,8 +37,8 @@ if (!$user->rights->bookmark->lire) {
|
|||||||
|
|
||||||
$id = GETPOST("id", 'int');
|
$id = GETPOST("id", 'int');
|
||||||
$action = GETPOST("action", "alpha");
|
$action = GETPOST("action", "alpha");
|
||||||
$title = GETPOST("title", "alpha");
|
$title = (string) GETPOST("title", "alpha");
|
||||||
$url = GETPOST("url", "alpha");
|
$url = (string) GETPOST("url", "alpha");
|
||||||
$urlsource = GETPOST("urlsource", "alpha");
|
$urlsource = GETPOST("urlsource", "alpha");
|
||||||
$target = GETPOST("target", "alpha");
|
$target = GETPOST("target", "alpha");
|
||||||
$userid = GETPOST("userid", "int");
|
$userid = GETPOST("userid", "int");
|
||||||
@ -71,8 +71,9 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update')
|
|||||||
|
|
||||||
if ($action == 'update') $object->fetch(GETPOST("id", 'int'));
|
if ($action == 'update') $object->fetch(GETPOST("id", 'int'));
|
||||||
// Check if null because user not admin can't set an user and send empty value here.
|
// Check if null because user not admin can't set an user and send empty value here.
|
||||||
if (!empty($userid))
|
if (!empty($userid)) {
|
||||||
$object->fk_user = $userid;
|
$object->fk_user = $userid;
|
||||||
|
}
|
||||||
$object->title = $title;
|
$object->title = $title;
|
||||||
$object->url = $url;
|
$object->url = $url;
|
||||||
$object->target = $target;
|
$object->target = $target;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user