livestatus: Stop relying on broken short-cut63/563/1maint-6.2v3.2.4-beta1
commit47f19f91fd147f0cd268dc4c20374837f50e3e98
authorRobin Sonefors <robin.sonefors@op5.com>
Wed, 9 Apr 2014 07:54:00 +0000 (9 09:54 +0200)
committerRobin Sonefors <robin.sonefors@op5.com>
Wed, 9 Apr 2014 09:24:09 +0000 (9 11:24 +0200)
tree16d288f81e29545b48434dee1e03c76cde2e9e0f
parentfbed23a2d5b8347ac54d56af57ee1fea51c9ab38
livestatus: Stop relying on broken short-cut

Earlier versions of the livestatus library had a short-cut, where you
could give a string as a column name, in which case the library would
assume you wanted less deeply nested arrays back - which as if by
accident happened to correspond to what we need whenever we want to get
a list of names.

This version of the livestatus library's support for stat responses
seemingly makes the shortcut appear to work, except the query building
code doesn't support the shortcut, so that instead of restricting the
columns in the query to what we'll be returning, we download ALL THE
DATAS! This has the downside of large installations eating up tons of
memory and crashing horribly whenever a stupidly written form is about
to be rendered.

This works around that "quirk" in a minimally invasive way, by no longer
relying on that shortcut in all the places I've found it to be used.

The config page is still weird, though, as this is 6.2, and bug #8139
was only resolved in 6.3. The PNP helper by design throws an exception,
so it won't run in a browser, but it showed up in my grep. The
execute_command code (bug #8617) is triggered by rendering a recurring
downtime form (due to bug #7637) which works, and the tests that
exercise the summary_reports code has passed.

Signed-off-by: Robin Sonefors <robin.sonefors@op5.com>
application/controllers/config.php
application/helpers/nagvisconfig.php
application/helpers/pnp.php
application/models/execute_command.php
modules/reports/models/summary_reports.php