Keep filter after saving patching
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user