mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-27 16:14:39 -06:00
Fixes for PHP 7.4 and Pyrocms 3.8
This commit is contained in:
parent
6300c06736
commit
a229c6bec0
@ -78,8 +78,7 @@ class AdvTableBuilder extends TableBuilder
|
||||
protected $options = [
|
||||
'order_by' => [
|
||||
'id' => 'DESC',
|
||||
],
|
||||
'table_view' => 'visiosoft.module.advs::admin/table/table'
|
||||
]
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
@ -23,7 +23,6 @@ use Visiosoft\AdvsModule\Option\Contract\OptionRepositoryInterface;
|
||||
use Visiosoft\AdvsModule\OptionConfiguration\Contract\OptionConfigurationRepositoryInterface;
|
||||
use Visiosoft\AdvsModule\Productoption\Contract\ProductoptionRepositoryInterface;
|
||||
use Visiosoft\AdvsModule\ProductoptionsValue\Contract\ProductoptionsValueRepositoryInterface;
|
||||
use Visiosoft\AlgoliaModule\Search\SearchModel;
|
||||
use Visiosoft\CatsModule\Category\CategoryModel;
|
||||
use Visiosoft\CatsModule\Category\Contract\CategoryRepositoryInterface;
|
||||
use Visiosoft\CloudinaryModule\Video\VideoModel;
|
||||
@ -257,7 +256,7 @@ class AdvsController extends PublicController
|
||||
$advs[$index]->detail_url = $this->adv_model->getAdvDetailLinkByModel($ad, 'list');
|
||||
$advs[$index] = $this->adv_model->AddAdsDefaultCoverImage($ad);
|
||||
}
|
||||
|
||||
$seenList = array();
|
||||
if ($isActiveCustomFields) {
|
||||
$cfRepository = app('Visiosoft\CustomfieldsModule\CustomField\CustomFieldRepository');
|
||||
|
||||
@ -286,7 +285,8 @@ class AdvsController extends PublicController
|
||||
$allCats = true;
|
||||
}
|
||||
|
||||
$cFArray = array();
|
||||
$cFArray = $checkboxes = $topfields = $selectDropdown = $selectRange = $selectImage = $ranges = $radio = array();
|
||||
|
||||
if ($isActiveCustomFields) {
|
||||
$returnvalues = app('Visiosoft\CustomfieldsModule\Http\Controller\cfController')->index($mainCats, $subCats);
|
||||
$checkboxes = $returnvalues['checkboxes'];
|
||||
@ -785,16 +785,6 @@ class AdvsController extends PublicController
|
||||
$adv->is_get_adv = $request->is_get_adv;
|
||||
$adv->save();
|
||||
|
||||
//algolia Search Module
|
||||
$isActiveAlgolia = $advModel->is_enabled('algolia');
|
||||
if ($isActiveAlgolia) {
|
||||
$algolia = new SearchModel();
|
||||
if ($adv->slug == "") {
|
||||
$algolia->saveAlgolia($adv->toArray(), $settings);
|
||||
} else {
|
||||
$algolia->updateAlgolia($request->toArray(), $settings);
|
||||
}
|
||||
}
|
||||
//Cloudinary Module
|
||||
$isActiveCloudinary = $advModel->is_enabled('cloudinary');
|
||||
if ($isActiveCloudinary) {
|
||||
@ -884,6 +874,7 @@ class AdvsController extends PublicController
|
||||
->packageAddCart(\request()->pack_id, $new->id);
|
||||
}
|
||||
}
|
||||
$events->dispatch(new EditAd($advModel));
|
||||
|
||||
return redirect('/advs/edit_advs/' . $new->id);
|
||||
}
|
||||
@ -975,12 +966,6 @@ class AdvsController extends PublicController
|
||||
}
|
||||
}
|
||||
|
||||
$isActiveAlgolia = $this->adv_model->is_enabled('algolia');
|
||||
if ($isActiveAlgolia) {
|
||||
$algolia = new SearchModel();
|
||||
$algolia->updateStatus($id, $type, $settings);
|
||||
}
|
||||
|
||||
$this->adv_model->statusAds($id, $type);
|
||||
event(new ChangedStatusAd($ad));//Create Notify
|
||||
if ($type === 'approved') {
|
||||
|
||||
@ -7,7 +7,6 @@
|
||||
<a href="{{ url_route('adv_list_seo', [main_category.slug]) }}" class="main-category">
|
||||
<b>{{ main_category.name }}</b>
|
||||
{% if showAdsCount %}
|
||||
{% set catAdsCount = entries('advs', 'advs').countAdsByCategoryId(main_category.id) %}
|
||||
<small class="text-muted">
|
||||
({{ catAdsCount }})
|
||||
</small>
|
||||
@ -33,7 +32,6 @@
|
||||
<a href="{{ url_route('adv_list_seo', [sub_category.slug]) }}">{{ sub_category.name }}</a>
|
||||
{% if showAdsCount %}
|
||||
{% set catLevel = getParentsCount(sub_category.id) + 1 %}
|
||||
{% set catAdsCount = entries('advs', 'advs').countAdsByCategoryId(sub_category.id, catLevel) %}
|
||||
<small class="text-muted">
|
||||
({{ catAdsCount }})
|
||||
</small>
|
||||
|
||||
@ -80,7 +80,7 @@ class CategoryTableBuilder extends TableBuilder
|
||||
* @var array
|
||||
*/
|
||||
protected $options = [
|
||||
'table_view' => 'visiosoft.module.cats::table.table'
|
||||
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
@ -21,7 +21,7 @@ class CitiesController extends AdminController
|
||||
$cities = new CityModel();
|
||||
if(!isset($request->country) || $request->country==""){
|
||||
return $table->render();
|
||||
}else{
|
||||
} else {
|
||||
$cities = $cities->getSubCities($request->country);
|
||||
if (count($cities) == 0) {
|
||||
$this->messages->error('Selected country has no related city.');
|
||||
|
||||
@ -96,7 +96,6 @@ class ValueTableBuilder extends TableBuilder
|
||||
'limit' => 9999,
|
||||
'show_headers' => false,
|
||||
'sortable_headers' => false,
|
||||
'table_view' => 'visiosoft.field_type.media::table/table',
|
||||
'no_results_message' => 'visiosoft.field_type.media::message.no_files_selected',
|
||||
];
|
||||
|
||||
|
||||
@ -63,7 +63,6 @@ class ValueTableBuilder extends TableBuilder
|
||||
'limit' => 1,
|
||||
'show_headers' => false,
|
||||
'sortable_headers' => false,
|
||||
'table_view' => 'visiosoft.field_type.singlefile::table',
|
||||
'no_results_message' => 'visiosoft.field_type.singlefile::message.no_file_selected',
|
||||
];
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user