From 96aee6eed4926ee4dfc00f4250587d47014d9a7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 18 Oct 2014 15:48:59 +0200 Subject: [PATCH] Update ajax.lib.php --- htdocs/core/lib/ajax.lib.php | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/htdocs/core/lib/ajax.lib.php b/htdocs/core/lib/ajax.lib.php index 4bc6da083aa..2f9732a0876 100644 --- a/htdocs/core/lib/ajax.lib.php +++ b/htdocs/core/lib/ajax.lib.php @@ -460,21 +460,18 @@ function ajax_constantonoff($code, $input=array(), $entity=null, $revertonoff=0, } /** - * On/off button for product tosell or tobuy + * On/off button for object * - * @param int $id Id product to set - * @param string $code Name of constant : status or status_buy + * @param int $object Object to set + * @param string $code Name of constant : status or status_buy for product by example * @param array $input Array of type->list of CSS element to switch. Example: array('disabled'=>array(0=>'cssid')) * @return void */ -function ajax_productonoff($id, $code, $input=array()) +function ajax_object_onoff($object, $code, $input=array()) { require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; global $conf, $langs, $db; - $object = new Product($db); - $object->fetch($id); - $out= '