Commit Graph

22 Commits

Author SHA1 Message Date
Eric Lippmann 9ed5685849 ConfigForm: Use transformEmptyValuesToNull() also in onSuccess()
refs #2751
2017-11-09 12:06:12 +01:00
Noah Hilverling 9791e6ffb8 ConfigForm: Do not ignore false while transforming to null
refs #2751
2017-11-09 11:57:59 +01:00
Noah Hilverling bf20611fd4 ConfigForm: Fix that empty values are not handled correctly
refs #2751
2017-11-09 11:57:59 +01:00
Johannes Meyer 181e2ef05c Swag: Fix swag (aka a whole bunch of code style issues..) 2017-01-27 14:48:59 +01:00
Johannes Meyer 2fa854b0a8 ConfigForm: Introduce and utilize method transformEmptyValuesToNull()
This utility method serves as alternative for all previous custom solutions to prevent empty values from being persisted to INI files.

Since the IniWriter now handles NULL correctly, we're able to refrain from using array_filter for this purpose which was the actual cause for the referenced bug.

fixes #13357
2016-12-01 10:55:24 +01:00
Alexander A. Klimov 474803fee4 Change all license headers to only reflect a file's year of creation
refs #11000
2016-02-08 15:41:00 +01:00
Eric Lippmann 395201eee9 lib: Automatically flatten subform values in ConfigForm::getValues()
Zend returns values from subforms grouped by their names and we have several places where we manually extract them. ConfigForm::getValues() does this automatically now.
2015-11-26 15:40:06 +01:00
Johannes Meyer a500937b7d Properly handle undefined configuration values
fixes #10597
2015-11-13 16:14:11 +01:00
Johannes Meyer ac3ef393b5 NavigationConfigForm: Write both configurations in a single "operation"
refs #5600
2015-09-16 10:58:57 +02:00
Alexander Klimov 967a2e82dc Use (only) "@return $this" in fluent interfaces' documentation 2015-04-07 14:24:11 +02:00
Eric Lippmann 6bae2e0a53 Note that our license is GPL v2 or any later version in our license header instead of pointing to the license's URL 2015-02-04 10:52:27 +01:00
Eric Lippmann 5b4fab0750 Add license header
This time without syntax errors hopefully :)
2015-02-03 16:27:59 +01:00
Eric Lippmann 5fa2e3cfdc Revert "Add license header"
This reverts commit 338d067aba.
2015-02-03 16:16:26 +01:00
Eric Lippmann 338d067aba Add license header
fixes #7788
2015-02-03 15:51:04 +01:00
Johannes Meyer 63305fdf9a Add Icinga\Application\Config::saveIni()
Simplifies saving INI files. Icinga\File\Ini\IniWriter does already require an
instance of Icinga\Application\Config so it's obvious to give "Config" the
task to initialize the writer.. We do also have a central place to handle
creating missing ancestor directories now.

refs #8219
2015-01-30 09:32:08 +01:00
Eric Lippmann aef81a56d6 Merge branch 'master' into feature/security-gui-5647
Conflicts:
	library/Icinga/Application/Config.php
	library/Icinga/File/Ini/IniWriter.php
	library/Icinga/Web/Form.php
	library/Icinga/Web/Menu.php
2014-11-18 17:08:25 +01:00
Johannes Meyer 775c20d9ad Rename namespace Icinga\Form to Icinga\Forms
refs #7553
2014-11-14 10:57:14 +01:00
Eric Lippmann aac161d7a0 config forms: prepend our custom view decorator when saving the configuration failed 2014-11-04 14:48:24 +01:00
Eric Lippmann b38e3affb9 Move INI writer classes to the File namespace
fixes #7150
2014-10-31 10:54:53 +01:00
Johannes Meyer 6bde740d21 Fix Icinga\Form\ConfigForm show config feature not available for modules
refs #5525
2014-09-09 13:22:51 +02:00
Johannes Meyer f53519c54d Rename ConfigForm::setConfig() to ConfigForm::setIniConfig()
We do not want to override Zend_Form::setConfig() so this renaming is
required. set*Ini*Config() because ConfigForm::save() utilizes an ini-writer
to persist the configuration to disk.

refs #5525
2014-09-08 13:31:25 +02:00
Johannes Meyer 364c7c0858 Add base form class for configuration forms
refs #5525
2014-08-29 12:25:25 +02:00