public function __destruct()
 {
     parent::__destruct();
 }
Esempio n. 2
0
 /**
  * Delete the given workgroup and display the list of workgroups
  * @param array $params the parameters for the request
  * @return array the vars and template for displaying the list of workgroups
  */
 public function deleteWorkgroup($params)
 {
     $openSRS = new openSRS_mail($params["configoption1"], $params["configoption2"], $params["configoption3"], $params["configoption4"], $params["configoption5"]);
     try {
         $workgroup = $_POST["workgroup"];
         $result = $openSRS->deleteWorkgroup($params["domain"], $workgroup);
         if ($result["is_success"]) {
             $this->vars["deleteSuccess"] = true;
         } else {
             $this->vars["error"][] = $result["response_text"];
         }
     } catch (Exception $e) {
         $this->vars["error"][] = "Communication error, please contact the administrator.";
     }
     return $this->listWorkgroups($params);
 }