Beispiel #1
0
 public function vapplianceusedversionsAction()
 {
     $this->_helper->layout->disableLayout();
     $this->_helper->viewRenderer->setNoRender();
     header('Content-type: application/json');
     $appid = intval($this->_getParam('appid'));
     if ($appid === 0) {
         echo json_encode(array("result" => array("error" => "No vappliance id given")));
         return;
     }
     $versions = VApplianceVersionState::getVapplianceUsedVersions($appid);
     echo json_encode(array("result" => array("success" => true, "versions" => $versions)));
 }
Beispiel #2
0
 public function isUsedVaVersion($appid, $d = "")
 {
     $usedversions = VApplianceVersionState::getVapplianceUsedVersions($appid);
     return in_array(trim($d), $usedversions);
 }