Keep filter after saving patching

This commit is contained in:
Frank Schubert
2021-09-23 21:14:42 +02:00
parent ba1c96c3f5
commit 8a9e29087a
4 changed files with 65 additions and 10 deletions

View File

@@ -1,5 +1,29 @@
<?php
class Patching extends mfBaseModel {
private $termination;
private $patcher;
public function getProperty($name) {
if($this->$name == null) {
if($name == "patcher") {
$this->patcher = new User($this->patched_by);
return $this->patcher;
}
$classname = ucfirst($name);
$idfield = $name."_id";
$this->$name = new $classname($this->$idfield);
if($this->$name->id) {
return $this->$name;
} else {
return null;
}
}
return $this->$name;
}
}