Merge pull request #1274 from openclassify/dia

#5159 openclassify new setup
This commit is contained in:
Muammer Top 2022-01-20 16:33:15 +03:00 committed by GitHub
commit ed55fde460
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 6 deletions

View File

@ -1,6 +1,5 @@
<!-- Meta Tags -->
<meta charset="utf-8">
<meta name="generator" content="{{ config_get('streams::distribution.name') }}"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, viewport-fit=cover">
<meta name="description"
content="{{ (template.get('meta_description') ?: setting_value('streams::description'))|slice(0,160) }}"/>

View File

@ -129,18 +129,21 @@ class CategoryController extends AdminController
$this->createIconFile($category->getId());
$this->dispatch(new CalculateCategoryLevel($category->getId()));
} else {
$this->messages->error(trans('visiosoft.module.cats::message.cat_slug_exists', [
'slug' => $slug
]));
}
$this->messages->error(trans('visiosoft.module.cats::message.cat_slug_exists', [
'slug' => $slug
]));
} else {
for ($i = 0; $i < count($isMultiCat[0]); $i++) {
foreach ($isMultiCat as $cat) {
$translatableEntries = array_merge($translatableEntries, $cat[$i]);
}
$slug = $this->str->slug(reset($translatableEntries)['name'], '_');
$slug = $this->str->slug(
collect($translatableEntries)->where('name', '!=', '')->first()['name'],
'_'
);
if ($this->categoryRepository->findBySlug($slug)) {
$this->messages->error(trans('visiosoft.module.cats::message.cat_slug_exists', [
'slug' => $slug