Skip to content

Commit

Permalink
When the config form is submitted use "Use license parameters" value …
Browse files Browse the repository at this point in the history
…from the form, not from the stored configuration
  • Loading branch information
Dmitry Lomakin committed Feb 16, 2017
1 parent f5b7806 commit aff9bbe
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ plib/library/vendor/
# Binary gettext files
*.mo

.gitignore
.idea/
/spamexperts-extension.zip
/composer.phar
Expand Down
2 changes: 1 addition & 1 deletion plib/controllers/IndexController.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function settingsAction()
if ($this->getRequest()->isPost()
&& $form->isValid($this->getRequest()->getPost())) {

if (! Modules_SpamexpertsExtension_Form_Settings::useSettingsFromLicense()) {
if (1 != $form->getValue(Modules_SpamexpertsExtension_Form_Settings::OPTION_USE_CONFIG_FROM_LICENSE)) {
foreach ([
$form::OPTION_SPAMPANEL_URL,
$form::OPTION_SPAMPANEL_API_HOST,
Expand Down
3 changes: 3 additions & 0 deletions plib/library/Form/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

/**
* @SuppressWarnings(PHPMD.CamelCaseClassName)
*
* @method getValue($name)
* @method isValid($data)
*/
class Modules_SpamexpertsExtension_Form_Settings extends pm_Form_Simple
{
Expand Down

0 comments on commit aff9bbe

Please sign in to comment.