gives priority to default eula being checked vs catregory eula

This commit is contained in:
Godfrey M 2024-09-03 12:23:23 -07:00
parent e1fcfc8dc1
commit cf07186ae8

View file

@ -950,11 +950,12 @@ class Asset extends Depreciable
{ {
if (($this->model) && ($this->model->category)) { if (($this->model) && ($this->model->category)) {
if ($this->model->category->eula_text) { if (($this->model->category->eula_text) && ($this->model->category->use_default_eula === 0)) {
return Helper::parseEscapedMarkedown($this->model->category->eula_text); return Helper::parseEscapedMarkedown($this->model->category->eula_text);
} elseif ($this->model->category->use_default_eula == '1') { } elseif ($this->model->category->use_default_eula === 1) {
return Helper::parseEscapedMarkedown(Setting::getSettings()->default_eula_text); return Helper::parseEscapedMarkedown(Setting::getSettings()->default_eula_text);
} else { } else {
return false; return false;
} }
} }