Exemplo n.º 1
0
     } catch (Exception $e) {
         $result->success = false;
         $result->msg = $e->getMessage();
     }
     print G::json_encode($result);
     break;
 case 'removeDynaform':
     try {
         if (!isset($_POST['DYN_UID'])) {
             throw new Exception('DYN_UID was not set!');
         }
         $DYN_UIDS = explode(',', $_POST['DYN_UID']);
         foreach ($DYN_UIDS as $i => $DYN_UID) {
             $dynaform = new dynaform();
             //in table dynaform
             $dynaform->remove($DYN_UID);
             //in table Step
             $oStep = new Step();
             $oStep->removeStep('DYNAFORM', $DYN_UID);
             //in table ObjectPermission
             $oOP = new ObjectPermission();
             $oOP->removeByObject('DYNAFORM', $DYN_UID);
             //in table Step_supervisor
             $oSS = new StepSupervisor();
             $oSS->removeByObject('DYNAFORM', $DYN_UID);
             //in table case_tracker_object
             $oCTO = new CaseTrackerObject();
             $oCTO->removeByObject('DYNAFORM', $DYN_UID);
         }
         $result->success = true;
         $result->msg = G::LoadTranslation('ID_DYNAFORM_REMOVED');