Update productonoff.php
This commit is contained in:
parent
f5f50045d6
commit
33bb150b44
@ -35,6 +35,7 @@ $id=GETPOST('id', 'int');
|
||||
$value=GETPOST('value', 'int');
|
||||
|
||||
$object = new GenericObject($db);
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
@ -43,16 +44,10 @@ top_httphead();
|
||||
|
||||
print '<!-- Ajax page called with url '.$_SERVER["PHP_SELF"].'?'.$_SERVER["QUERY_STRING"].' -->'."\n";
|
||||
|
||||
// Registering the location of boxes
|
||||
if (! empty($action) && ! empty($id))
|
||||
{
|
||||
//$entity = GETPOST('entity','int');
|
||||
|
||||
if ($user->rights->produit->creer) {
|
||||
if ($action == 'setstatus')
|
||||
$object->setValueFrom('tosell', $value, 'product', $id);
|
||||
else if ($action == 'setstatus_buy')
|
||||
$object->setValueFrom('tobuy', $value, 'product', $id);
|
||||
|
||||
}
|
||||
// Registering new values
|
||||
if (! empty($action) && ! empty($id) && $user->rights->produit->creer) {
|
||||
if ($action == 'setstatus')
|
||||
$object->setValueFrom('tosell', $value, 'product', $id);
|
||||
else if ($action == 'setstatus_buy')
|
||||
$object->setValueFrom('tobuy', $value, 'product', $id);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user