mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
#1190 when Auto approve on doesnt set ending time
This commit is contained in:
parent
6d4145d087
commit
23bc0b8ec6
@ -587,9 +587,13 @@ class AdvsController extends PublicController
|
||||
|
||||
// Auto approve
|
||||
if (setting_value('visiosoft.module.advs::auto_approve')) {
|
||||
if ($adv->status == 'pending_admin' || $adv->status == 'pending_user') {
|
||||
$adv->status = 'approved';
|
||||
}
|
||||
$defaultAdPublishTime = setting_value('visiosoft.module.advs::default_published_time');
|
||||
|
||||
$adv->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')
|
||||
]);
|
||||
}
|
||||
|
||||
$form->render($request->update_id);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user