Merge pull request #908 from openclassify/vedat

added sahibinden check icon and show features for web view && fixed g…
This commit is contained in:
Fatih Alp 2021-01-09 13:01:48 +03:00 committed by GitHub
commit 03298c6d64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 129 additions and 120 deletions

View File

@ -782,8 +782,12 @@ class AdvsController extends PublicController
} }
} }
$get_categories = in_array($adv->cat1, setting_value('visiosoft.module.advs::get_categories')); $get_categories_status = false;
$adv->is_get_adv = ($request->is_get_adv and $get_categories) ? true : false; if ($get_categories = setting_value('visiosoft.module.advs::get_categories') and $get_categories = in_array($adv->cat1, $get_categories)) {
$get_categories_status = true;
}
$adv->is_get_adv = ($request->is_get_adv and $get_categories_status) ? true : false;
$adv->save(); $adv->save();
//algolia Search Module //algolia Search Module
@ -803,7 +807,9 @@ class AdvsController extends PublicController
$CloudinaryModel = new VideoModel(); $CloudinaryModel = new VideoModel();
$CloudinaryModel->updateRequest($request); $CloudinaryModel->updateRequest($request);
if ($request->url != "") { $adv->save(); } if ($request->url != "") {
$adv->save();
}
} }
if ($this->adv_model->is_enabled('customfields')) { if ($this->adv_model->is_enabled('customfields')) {
app('Visiosoft\CustomfieldsModule\Http\Controller\cfController')->store($adv, $request); app('Visiosoft\CustomfieldsModule\Http\Controller\cfController')->store($adv, $request);

View File

@ -10,4 +10,5 @@ return [
'uploading' => 'Uploading', 'uploading' => 'Uploading',
'loading' => 'Loading', 'loading' => 'Loading',
'error_upload' => 'There was a problem uploading the file.', 'error_upload' => 'There was a problem uploading the file.',
'error_upload_docs' => 'There is no document upload support. Please contact your system administrator!',
]; ];

View File

@ -10,4 +10,5 @@ return [
'uploading' => 'Yükleme', 'uploading' => 'Yükleme',
'loading' => 'Yükleniyor', 'loading' => 'Yükleniyor',
'error_upload' => 'Dosyayı yüklerken bir sorun oluştu.', 'error_upload' => 'Dosyayı yüklerken bir sorun oluştu.',
'error_upload_docs' => 'Döküman yükleme desteği bulunmamaktadır.Lütfen sistem yöneticiniz ile iletişim kurunuz!',
]; ];

View File

@ -50,13 +50,14 @@ class UploadController extends AdminController
public function upload() public function upload()
{ {
$doc_folder = app(FolderRepositoryInterface::class)->findBySlug('ads_documents')->id;
$mimes = explode('/', $this->request->file('upload')->getMimeType()); $mimes = explode('/', $this->request->file('upload')->getMimeType());
if ($mimes[0] == 'image') { if ($mimes[0] == 'image') {
$file = $this->uploader->upload($this->request->file('upload'), $this->folders->find($this->request->get('folder'))); $file = $this->uploader->upload($this->request->file('upload'), $this->folders->find($this->request->get('folder')));
} else if ($doc_folder = app(FolderRepositoryInterface::class)->findBySlug('ads_documentsssssss')) {
$file = $this->uploader->upload($this->request->file('upload'), $doc_folder);
} else { } else {
$file = $this->uploader->upload($this->request->file('upload'), $this->folders->find($doc_folder)); return $this->response->json(['error' => trans('visiosoft.field_type.media::message.error_upload_docs')], 500);
} }
if ($file) { if ($file) {