diff --git a/code/Pages/Listing.php b/code/Pages/Listing.php index ec7e2b7..020c933 100644 --- a/code/Pages/Listing.php +++ b/code/Pages/Listing.php @@ -538,9 +538,11 @@ function onBeforeWrite() { } if(($this->Status == "Available" || $this->Status == "Sold") && $this->ClassName != "Listing") { - $this->newClassInstance("Listing"); + //$this->newClassInstance("Listing"); + $this->ClassName('Listing'); } elseif( ( $this->Status == "Unavailable" || $this->Status == "Closed") && $this->ClassName != "UnavailableListing") { - $this->newClassInstance("UnavailableListing"); + //$this->newClassInstance("UnavailableListing"); + $this->ClassName('UnavailableListing'); } }