Skip to content

Commit

Permalink
Fixed site add/edit event parammeters to match
Browse files Browse the repository at this point in the history
  • Loading branch information
givanz committed Mar 20, 2024
1 parent 6b5d30b commit 3a2cfc6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions admin/controller/settings/site.php
Expand Up @@ -104,7 +104,7 @@ function save() {
$settingsValidator = new Validator(['site-settings']);

$view = $this->view;
$site = $this->request->post['site'] ?? [];
$site = $this->request->post['site'] ?? [];
$settings = $this->request->post['settings'] ?? [];

if (($errors = $siteValidator->validate($site)) === true &&
Expand All @@ -129,7 +129,7 @@ function save() {

Sites::setSiteDataById($data['site_id'], null, $site);

list($data, $settings, $site_id) = Event :: trigger(__CLASS__,__FUNCTION__, $data, $settings, $site_id);
list($site, $settings, $site_id, $data) = Event :: trigger(__CLASS__,__FUNCTION__, $site, $settings, $site_id, $data);

if ($result >= 0) {
//CacheManager::delete('site');
Expand All @@ -149,7 +149,7 @@ function save() {
$site['id'] = $site_id;
Sites::saveSite($site);

list($site, $setting, $site_id, $data) = Event :: trigger(__CLASS__,__FUNCTION__, $site, $setting, $site_id, $data);
list($site, $settings, $site_id, $data) = Event :: trigger(__CLASS__,__FUNCTION__, $site, $settings, $site_id, $data);

if (! $site_id) {
$view->errors = [$sites->error];
Expand Down

0 comments on commit 3a2cfc6

Please sign in to comment.