upgrade() public method

Update version installed on a computer
public upgrade ( $instID, $softwareversions_id, $dohistory = 1 ) : nothing
$instID ID of the install software lienk
$softwareversions_id ID of the new version
$dohistory Do history ? (default 1)
return nothing
                }
                Event::log($_POST["computers_id"], "computers", 5, "inventory", $_SESSION["glpiname"] . " " . $LANG['log'][113]);
                glpi_header($_SERVER['HTTP_REFERER']);
                // From installation list on Software form
            } else {
                if (isset($_POST["deleteinstalls"])) {
                    checkRight("software", "w");
                    foreach ($_POST["item"] as $key => $val) {
                        if ($val == 1) {
                            $inst->delete(array('id' => $key));
                            Event::log($_POST["softwares_id"], "software", 5, "inventory", $_SESSION["glpiname"] . " " . $LANG['log'][114]);
                        }
                    }
                    glpi_header($_SERVER['HTTP_REFERER']);
                } else {
                    if (isset($_POST["moveinstalls"])) {
                        checkRight("software", "w");
                        foreach ($_POST["item"] as $key => $val) {
                            if ($val == 1 && $_POST['versionID'] > 0) {
                                $inst->upgrade($key, $_POST['versionID']);
                                Event::log($_POST["softwares_id"], "software", 5, "inventory", $_SESSION["glpiname"] . " " . $LANG['log'][115]);
                            }
                        }
                        glpi_header($_SERVER['HTTP_REFERER']);
                    }
                }
            }
        }
    }
}
displayErrorAndDie('Lost');