コード例 #1
0
 public function delete(CveException &$exception)
 {
     $this->db->query("delete from CveException where id=" . $this->db->escape($exception->getId()));
 }
コード例 #2
0
ファイル: exceptions.php プロジェクト: basvandervlies/pakiti3
$exp_id = Utils::getHttpPostVar("exp_id");
if ($exp_id != "") {
    $exp = $pakiti->getManager("CveExceptionsManager")->getCveExceptionById($exp_id);
    $pakiti->getManager("CveExceptionsManager")->removeCveException($exp);
}
$selectedCveName = Utils::getHttpPostVar("cve-name");
$cveExceptions = array();
$cveNames = $pakiti->getManager("CveDefsManager")->getCveNames();
$osGroups = $pakiti->getManager("OsGroupsManager")->getOsGroups();
if ($entries > 0) {
    for ($i = 0; $i < $entries; $i++) {
        if (isset($_POST["exception{$i}"])) {
            $data = explode(' ', Utils::getHttpPostVar("exception{$i}"));
            # data[0] - pkgId
            # data[1] - osGroupId
            $exception = new CveException();
            $exception->setCveName($selectedCveName);
            $exception->setPkgId($data[0]);
            $exception->setOsGroupId($data[1]);
            $exception->setReason(Utils::getHttpPostVar("reason{$i}"));
            $exception->setModifier("");
            $pakiti->getManager("CveExceptionsManager")->createCveException($exception);
        }
    }
}
if ($selectedCveName != "") {
    $cveExceptions = $pakiti->getManager("CveExceptionsManager")->getCveExceptionsByCveName($selectedCveName);
} else {
    $cveExceptions = array();
}
$html->printHeader();