Beispiel #1
0
	public function show ($message = "") {
		if ($this->permission) {
			$system = System::getInstance();
			
			switch ($this->operation) {
				case 'delete':
					$incident = new Incident();
					$result = $incident->deleteIncident($this->id_incident);
					unset($incident);
					if ($result) {
						$this->id_incident = -1;
						$message = "<h2 class='suc'>".__('Successfully deleted')."</h2>";
					} else {
						$message = "<h2 class='error'>".__('An error ocurred while deleting the ticket')."</h2>";
					}
					break;
			}
			$this->showIncidents($message);
		}
		else {
			$this->showNoPermission();
		}
	}