Merge branch 'master' of https://github.com/openclassify/openclassify into muammertop

 Conflicts:
	addons/default/visiosoft/advs-module/resources/config/settings/settings.php
	addons/default/visiosoft/advs-module/resources/lang/en/setting.php
This commit is contained in:
Muammer Top 2021-03-12 12:40:13 +03:00
commit 60d1ba95c1
4 changed files with 32 additions and 19 deletions

View File

@ -63,6 +63,7 @@ return [
'ads_image' => [
'title' => 'visiosoft.module.advs::section.ads_image',
'fields' => [
'watermark',
'image_resize_backend',
'full_image_width',
'full_image_height',

View File

@ -295,6 +295,12 @@ return [
'default_value' => 600,
],
],
'watermark' => [
'type' => 'anomaly.field_type.boolean',
'config' => [
'default_value' => false,
]
],
'watermark_type' => [
'type' => 'anomaly.field_type.select',
'bind' => 'adv.watermark_type',

View File

@ -249,5 +249,9 @@ return [
],
'disable_sentry' => [
'name' => 'Disable Sentry'
]
],
'watermark' => [
'name' => 'Watermark',
'instructions' => 'Is watermark active?'
],
];

View File

@ -118,6 +118,7 @@ class UploadController extends AdminController
foreach ($image_types as $key => $image) {
if (setting_value('visiosoft.module.advs::watermark', false)) {
if ($settings_value['watermark_type'] == 'image') {
if ($watermarkimage = $this->files->find($settings_value['watermark_image'])) {
@ -139,6 +140,7 @@ class UploadController extends AdminController
});
}
}
if ($key === "full") {
$fileName = $file->getAttributes()['name'];