72 Commits

Author SHA1 Message Date
Johannes Meyer
a55cced039 Merge branch 'master' into feature/custom-menu-items-5600
Conflicts:
	modules/monitoring/application/views/scripts/list/comments.phtml
	modules/monitoring/application/views/scripts/list/downtimes.phtml
2015-09-25 14:12:43 +02:00
Alexander A. Klimov
812545c04b IniStore::load(): use IniParser::parseIniFile() instead of parse_ini_file()
refs #10150
2015-09-25 12:15:47 +02:00
Johannes Meyer
274a0c8a09 Store a user's preferences in a dedicated directory rather than in a single file
refs #5600
2015-09-07 11:20:36 +02:00
Eric Lippmann
d414d7e395 Fix that preferences can't be stored in a database
The mtime column is a column to update, not a column for the where condition.

fixes #8629
2015-03-08 10:19:17 +01: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 338d067aba41dd6e9178cebec5433eecd614196e.
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
Johannes Meyer
d452f3218d Use "ini" as preferences store in case preferences are not configured
refs #8234
2015-01-23 16:25:24 +01:00
Johannes Meyer
2a543bb5ae Rename the preference setting type' to store'
refs #8234
2015-01-23 16:25:23 +01:00
Eric Lippmann
74683ea025 Preferences: Use the lowercase username 2014-11-19 15:42:33 +01:00
Johannes Meyer
7621f6642d Adjust usages of Icinga\Application\Config
refs #7147
2014-11-18 13:11:52 +01:00
Eric Lippmann
ac2ec83852 Merge branch 'master' into feature/localization-form-6073
Conflicts:
	library/Icinga/Application/ApplicationBootstrap.php
	test/php/library/Icinga/User/Store/DbStoreTest.php
2014-11-13 17:03:41 +01:00
Alexander Fuhr
c7f36a5afa Fix empty preferences array warning in the DbStore 2014-11-12 17:03:22 +01:00
Alexander Fuhr
4f84979c89 Fix IniStore to save and load proper user preferences 2014-11-12 13:16:09 +01:00
Alexander Fuhr
33107ff8f2 Add new table columns and change the preferences DB save process 2014-11-12 11:08:05 +01:00
Johannes Meyer
7b99b74ae1 Prefer Icinga\Application\Config instead of Zend_Config
refs #7147
2014-11-07 13:53:03 +01:00
Eric Lippmann
b38e3affb9 Move INI writer classes to the File namespace
fixes #7150
2014-10-31 10:54:53 +01:00
Eric Lippmann
1b83ec3ce2 Preferences: Fix saving preferences when using a database store
Our DbSelect::where() is not (or no longer?) compatible w/ Zend_Db_Select::where().
DbStore::load() now uses Zend_Db_Select but we should definitely think about our
DbSelect::where() implementation.

fixes #7353
2014-10-30 09:49:21 +01:00
Alexander Fuhr
c8a24f72b8 Introduce getValue() in Preferences and fix the loading of values 2014-09-26 14:15:50 +02:00
Johannes Meyer
1ba3df310c Remove BaseConfigController, User\Message and Widget\AlertMesageBox
refs #6758
2014-09-02 16:25:03 +02:00
Alexander Klimov
7ff51caed0 Remove leading backslashes from the targets of use statements
- use \Exception;
+ use Exception;
2014-08-27 15:51:49 +02:00
Eric Lippmann
1dea19504f Revert "Remove leading backslashes from the targets of use statements"
This reverts commit 87a59675011a4cf284d8e44c4fb66042ad84c39f.

At least 'modules/doc/run.php' issues a warning about "The use statement with non-compound name 'Zend_Controller_Router_Route' has no effect"
2014-08-27 12:24:11 +02:00
Alexander Klimov
87a5967501 Remove leading backslashes from the targets of use statements
- use \Exception;
+ use Exception;
2014-08-27 11:16:44 +02:00
Alexander Klimov
7074fa1331 NotWritableError: extend IcingaException
refs #6931
2014-08-25 12:56:35 +02:00
Alexander Klimov
6c9947326d NotReadableError: extend IcingaException
refs #6931
2014-08-25 12:38:34 +02:00
Alexander Klimov
9c5878cbbe ConfigurationError: extend IcingaException
refs #6931
2014-08-22 11:46:11 +02:00
Johannes Meyer
c7c2ad3790 Improve preference changeset calculation
The calculation is still subject to the concrete writer implementation as its
parent Icinga\User\Preferences\PreferencesStore is only an abstraction
layer without any knowledge how the data is actually stored so it is not able
to determine how to handle differences.

fixes #6220
2014-07-15 14:54:57 +02:00
Johannes Meyer
3105c2059e Remove license headers from all files
refs #6309
2014-07-15 13:43:52 +02:00
Johannes Meyer
0fc2604af3 Use Icinga\Data\Db\DbConnection instead of Zend_Db_Select directly
fixes #6218
2014-07-09 10:41:54 +02:00
Johannes Meyer
f2e5d8afa5 Remove @codeCoverageIgnoreStart/-Stop annotations
refs #6091
2014-06-30 13:58:37 +02:00
Johannes Meyer
7f99be73fd Adjust usages of Icinga\Util\File to suit the new interface introduced earlier 2014-06-26 15:57:14 +02:00
Alexander Klimov
ab1d8655f9 Config: Hard-code path to preferences INI files 2014-06-25 11:59:09 +02:00
Alexander Klimov
ebca81b040 Revert "Make preferences INI path NOT be configurable"
This reverts commit f2693613d1b9e169b3f7249fd71800fb5981a9db.
2014-06-25 11:59:08 +02:00
Alexander Klimov
f2693613d1 Make preferences INI path NOT be configurable
refs #6567
2014-06-24 18:00:40 +02:00
Johannes Meyer
c563479888 Use Icinga\Util\File instead of fopen 2014-06-23 15:02:06 +02:00
Thomas Gelf
db3accc704 Data\Db: rename Query and Connection to Db...
Class names in namespaces should not be chosen as once we didn't have
such. The fact that we already did "use Db\Connection as DbConnection"
is the best hint that naming was wrong.

So this patch renames Db\Connection to Db\DbConnection and does the
same with DbQuery. DbQuery has been adjusted to fit our new SimpleQuery
and to handle the new Filter implementation.
2014-06-06 06:43:13 +00:00
Marius Hein
79fb8b1e0d Config: Remove base path subsitution
Test for leading slash and prepend base path to allow
absolute configuration files.

fixes #5556
2014-06-02 14:54:31 +02:00
Eric Lippmann
50e01d1284 Config: Rename configPath' to config_path'
We use underscore_case notation for all configuration keys.

refs #4952
2014-06-02 12:09:16 +02:00
Johannes Meyer
98ca15d1fb Mark less important or non-testable code as skipped for code coverage
refs #6011
2014-04-28 14:06:41 +02:00
Johannes Meyer
c93159d287 Add test for Icinga\User\Preferences\Store\IniStore
refs #6011
2014-04-28 14:06:39 +02:00
Johannes Meyer
9efe71441a Add test for Icinga\User\Preferences\Store\DbStore
refs #6011
2014-04-28 14:06:39 +02:00
Johannes Meyer
d44aaeb8d7 Add test for Icinga\User\Preferences
refs #6011
2014-04-28 14:06:39 +02:00
Johannes Meyer
3195e6a897 Rewrite preference DbStore
refs #5682
2014-04-08 13:28:45 +02:00
Johannes Meyer
a1649a1f22 Refactor PreferencesStore and IniStore
refs #5682
2014-04-07 15:13:28 +02:00
Eric Lippmann
07d04628cf Merge branch 'feature/installation-and-configuration-cleanup-5638'
Conflicts:
	config/config.ini.in
	library/Icinga/Application/ApplicationBootstrap.php
	library/Icinga/Application/Cli.php
	library/Icinga/Application/EmbeddedWeb.php
	library/Icinga/Application/Logger.php
	library/Icinga/Application/Modules/Manager.php
	library/Icinga/Application/Web.php
	library/Icinga/Authentication/Backend/DbUserBackend.php
	library/Icinga/Authentication/Manager.php
	library/Icinga/User/Preferences/IniStore.php
	test/php/library/Icinga/Application/LoggerTest.php
2014-03-03 19:03:39 +01:00
Johannes Meyer
3555e66018 Make IcingaWeb using the new log wrapper
refs #5683
2014-02-26 11:19:52 +01:00
Johannes Meyer
68357e9ca2 Fix coding style 2014-02-21 14:07:32 +01:00
Eric Lippmann
35fc451115 Rework save preferences 2014-02-17 14:11:55 +01:00