mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-27 16:14:39 -06:00
#2278 Emlak24 Bugs 10.5.20
This commit is contained in:
parent
592be415fe
commit
4e5bc7cd4a
@ -2,6 +2,7 @@
|
||||
|
||||
use Anomaly\Streams\Platform\Image\Command\MakeImageInstance;
|
||||
use Anomaly\Streams\Platform\Model\Advs\AdvsCustomFieldsEntryModel;
|
||||
use Carbon\Carbon;
|
||||
use GuzzleHttp\Client;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
@ -371,4 +372,9 @@ class AdvModel extends AdvsAdvsEntryModel implements AdvInterface
|
||||
$neighborhood = $neighborhoodModel->newQuery()->find($this->neighborhood);
|
||||
return $neighborhood ? $neighborhood->name : false;
|
||||
}
|
||||
|
||||
public function expired()
|
||||
{
|
||||
return $this->finish_at ? $this->finish_at < Carbon::now() : true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,4 +4,5 @@ use Anomaly\Streams\Platform\Entry\Contract\EntryInterface;
|
||||
|
||||
interface AdvInterface extends EntryInterface
|
||||
{
|
||||
public function expired();
|
||||
}
|
||||
|
||||
@ -433,7 +433,7 @@ class AdvsController extends PublicController
|
||||
|
||||
$adv = $this->adv_repository->getListItemAdv($id);
|
||||
|
||||
if ($adv) {
|
||||
if ($adv && !$adv->expired()) {
|
||||
|
||||
if ($this->adv_model->is_enabled('complaints')) {
|
||||
$complaints = ComplaintsComplainTypesEntryModel::all();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user