$update = update::byId(init('id')); if (!is_object($update)) { $update = update::byLogicalId(init('id')); } if (!is_object($update)) { throw new Exception(__('Aucune correspondance pour l\'ID : ' . init('id'), __FILE__)); } $update->deleteObjet(); ajax::success(); } if (init('action') == 'updateAll') { update::makeUpdateLevel(init('mode'), init('level'), init('version', ''), init('onlyThisVersion', '')); ajax::success(); } if (init('action') == 'changeState') { $update = update::byId(init('id')); if (!is_object($update)) { throw new Exception(__('Aucune correspondance pour l\'ID : ' . init('id'), __FILE__)); } if (init('state') == '') { throw new Exception(__('Le status ne peut être vide', __FILE__)); } if (init('state') == 'hold') { $update->setStatus('hold'); $update->save(); } else { $update->checkUpdate(); } ajax::success(); } throw new Exception(__('Aucune methode correspondante à : ', __FILE__) . init('action'));