icingaweb2/library/Icinga
Eric Lippmann 666bdfb4c4 Revert "Fix double query execution"
This reverts PR 6ea012af7e, reversing
changes made to be5b9f870b.

The reverted commit fixed a double query execution bug by only executing
the query once in either SimpleQuery::hasResult() or upon iteration.

But the fix (b20291a60) introduced two problems:

* Default sort rules no longer work
* Show more links missing

We work with DataView objects in our controllers and views. When
iterating over a DataView, it applies its default sort rules and then
returns the underlying query, see DataView::getIterator().

DataView::hasResult() on the other hand does not apply the default sort
rules. So, if hasResult() is called first, the default sort rules are no
longer applied because the query will be executed only once.
The fix would be as easy as to apply sorting in DataView::hasResult() as
well.

But now the show more part kicks in. We know whether there are more
results because we execute queries with $limit + 1. This is enabled via
SimpleQuery::peekAhead(). Unfortunately, we call
SimpleQuery::peekAhead() ALWAYS after SimpleQuery::hasResult(). And
that's why the show more links are missing because the query is executed
only once with the "wrong" limit.

For now, we just revert the commit in question and postpone a proper fix
for the double execution.
2019-08-07 13:29:57 +02:00
..
Application Raise version to 2.7.0 2019-07-30 10:19:53 +02:00
Authentication Introduce class RolesConfig 2019-07-23 13:53:29 +02:00
Chart Render `<title>` tags for line and bar charts instead of tipsy titles 2019-07-18 07:57:14 +02:00
Cli Optimize imports 2019-07-12 14:23:41 +02:00
Data Revert "Fix double query execution" 2019-08-07 13:29:57 +02:00
Date Add $requireTime to timeAgo() and timeSince() too 2019-07-15 10:11:52 +02:00
Exception IcingaException::getConfidentialTraceAsString(): respect functions which don't take args "by definition" 2018-02-13 12:46:06 +01:00
File IniParser: Add work-around for php bug 76965 2019-04-17 10:00:42 +02:00
Legacy dashboard: Use the non-translated versions of pane and dashlet names for storage 2019-07-18 08:33:35 +02:00
Protocol LdapConnection: Properly render logical NOTs with only single expression 2019-06-05 12:59:36 +02:00
Repository IniRepository: Fix wrong documentation for $configs 2019-07-23 13:53:29 +02:00
Security Change all license headers to only reflect a file's year of creation 2016-02-08 15:41:00 +01:00
Test Make running unittests with the icingacli work in package installations 2017-03-09 11:36:35 +01:00
User Swag: Fix swag (aka a whole bunch of code style issues..) 2017-01-27 14:48:59 +01:00
Util Translator: Also adjust env var `LANGUAGE` when setting up the locale 2019-05-10 12:33:31 +02:00
Web ApplicationStateMessages: Fix message layout 2019-07-29 10:19:39 +02:00
User.php renamed variable $currentUser$ to $user:local_name$ 2019-06-03 23:56:21 +02:00