core = $core; $this->list = $list; $this->improve = new improve($core); $this->saveConfig(); $this->displayConfig(); } private function getModules(): array { $modules = []; foreach ($this->improve->modules() as $action) { $modules[$action->name()] = $action->id(); } $modules = array_merge($modules, array_flip($this->improve->disabled())); return $modules; } private function saveConfig(): void { if (empty($_POST['save'])) { return; } try { $pdisabled = ''; if (!empty($_POST['disabled']) && is_array($_POST['disabled'])) { $pdisabled = implode(';', $_POST['disabled']); } $this->core->blog->settings->improve->put('disabled', $pdisabled); $this->core->blog->settings->improve->put('nodetails', !empty($_POST['nodetails'])); dcPage::addSuccessNotice(__('Configuration successfully updated')); $this->core->adminurl->redirect( 'admin.plugins', ['module' => 'improve', 'conf' => 1, 'chk' => 1, 'redir' => $this->list->getRedir()] ); } catch (Exception $e) { $this->core->error->add($e->getMessage()); } } private function displayConfig(): void { echo '