diff --git a/web/includes/Monitor.php b/web/includes/Monitor.php index ad3e95a0d..4f9450a3d 100644 --- a/web/includes/Monitor.php +++ b/web/includes/Monitor.php @@ -1,11 +1,13 @@ AlarmCommand('disable'); } + function Model() { + if (!$this->{'Model'}) { + $this->{'Model'} = Model::find_one(array('Id'=>$this->ModelId())); + if (!$this->{'Model'}) $this->{'Model'} = new Model(); + } + return $this->{'Model'}; + } + function Manufacturer() { + if (!$this->{'Manufacturer'}) { + $this->{'Manufacturer'} = Manufacturer::find_one(array('Id'=>$this->ManufacturerId())); + if (!$this->{'Manufacturer'}) $this->{'Manufacturer'} = new Manufacturer(); + } + return $this->{'Manufacturer'}; + } } // end class Monitor ?>