Fixed: review changes

This commit is contained in:
amit sharma
2026-10-06 14:33:37 +05:30
parent da04006da5
commit 96c2b100d8
3 changed files with 19 additions and 8 deletions

View File

@@ -3991,11 +3991,25 @@ class AdminControllerCore extends Controller
protected function postImage($id)
{
if (isset($this->fieldImageSettings['name']) && isset($this->fieldImageSettings['dir'])) {
return $this->uploadImage($id, $this->fieldImageSettings['name'], $this->fieldImageSettings['dir'].'/');
return $this->uploadImage(
$id,
$this->fieldImageSettings['name'],
$this->fieldImageSettings['dir'].'/',
false,
isset($this->fieldImageSettings['width']) ? $this->fieldImageSettings['width'] : null,
isset($this->fieldImageSettings['height']) ? $this->fieldImageSettings['height'] : null
);
} elseif (!empty($this->fieldImageSettings)) {
foreach ($this->fieldImageSettings as $image) {
if (isset($image['name']) && isset($image['dir'])) {
$this->uploadImage($id, $image['name'], $image['dir'].'/');
$this->uploadImage(
$id,
$image['name'],
$image['dir'].'/',
false,
isset($image['width']) ? $image['width'] : null,
isset($image['height']) ? $image['height'] : null
);
}
}
}