#2466 [packages-module] error when trying to approve package

This commit is contained in:
Diatrex 2020-10-23 11:17:47 +03:00
parent 3f22510051
commit 99a53a863f

View File

@ -451,7 +451,7 @@ class AdvRepository extends EntryRepository implements AdvRepositoryInterface
public function approveAds($adsIDs)
{
$defaultAdPublishTime = setting_value('visiosoft.module.advs::default_published_time');
$ads = $this->newQuery()->where('advs_advs.id', $adsIDs)->update([
$ads = $this->newQuery()->whereIn('advs_advs.id', $adsIDs)->update([
'status' => 'approved',
'finish_at' => date('Y-m-d H:i:s', strtotime(date('Y-m-d H:i:s') . ' + ' . $defaultAdPublishTime . ' day')),
'publish_at' => date('Y-m-d H:i:s')