monitoring: Ensure to ask subqueries whether to allow custom vars

fixes #9998
This commit is contained in:
Johannes Meyer 2015-08-27 08:53:46 +02:00
parent ef8ee3302b
commit 66570c95e0
14 changed files with 184 additions and 0 deletions

View File

@ -55,6 +55,20 @@ class CommentQuery extends IdoQuery
*/
protected $subQueries = array();
/**
* {@inheritdoc}
*/
public function allowsCustomVars()
{
foreach ($this->subQueries as $query) {
if (! $query->allowsCustomVars()) {
return false;
}
}
return true;
}
/**
* {@inheritdoc}
*/

View File

@ -58,6 +58,20 @@ class CommentdeletionhistoryQuery extends IdoQuery
*/
protected $fetchHistoryColumns = false;
/**
* {@inheritdoc}
*/
public function allowsCustomVars()
{
foreach ($this->subQueries as $query) {
if (! $query->allowsCustomVars()) {
return false;
}
}
return true;
}
/**
* {@inheritdoc}
*/

View File

@ -58,6 +58,20 @@ class CommenthistoryQuery extends IdoQuery
*/
protected $fetchHistoryColumns = false;
/**
* {@inheritdoc}
*/
public function allowsCustomVars()
{
foreach ($this->subQueries as $query) {
if (! $query->allowsCustomVars()) {
return false;
}
}
return true;
}
/**
* {@inheritdoc}
*/

View File

@ -60,6 +60,20 @@ class DowntimeQuery extends IdoQuery
*/
protected $subQueries = array();
/**
* {@inheritdoc}
*/
public function allowsCustomVars()
{
foreach ($this->subQueries as $query) {
if (! $query->allowsCustomVars()) {
return false;
}
}
return true;
}
/**
* {@inheritdoc}
*/

View File

@ -58,6 +58,20 @@ class DowntimeendhistoryQuery extends IdoQuery
*/
protected $fetchHistoryColumns = false;
/**
* {@inheritdoc}
*/
public function allowsCustomVars()
{
foreach ($this->subQueries as $query) {
if (! $query->allowsCustomVars()) {
return false;
}
}
return true;
}
/**
* {@inheritdoc}
*/

View File

@ -58,6 +58,20 @@ class DowntimestarthistoryQuery extends IdoQuery
*/
protected $fetchHistoryColumns = false;
/**
* {@inheritdoc}
*/
public function allowsCustomVars()
{
foreach ($this->subQueries as $query) {
if (! $query->allowsCustomVars()) {
return false;
}
}
return true;
}
/**
* {@inheritdoc}
*/

View File

@ -75,6 +75,20 @@ class EventhistoryQuery extends IdoQuery
$this->joinedVirtualTables['eventhistory'] = true;
}
/**
* {@inheritdoc}
*/
public function allowsCustomVars()
{
foreach ($this->subQueries as $query) {
if (! $query->allowsCustomVars()) {
return false;
}
}
return true;
}
/**
* {@inheritdoc}
*/

View File

@ -66,6 +66,20 @@ class HostgroupsummaryQuery extends IdoQuery
*/
protected $subQueries = array();
/**
* {@inheritdoc}
*/
public function allowsCustomVars()
{
foreach ($this->subQueries as $query) {
if (! $query->allowsCustomVars()) {
return false;
}
}
return true;
}
/**
* {@inheritdoc}
*/

View File

@ -34,6 +34,14 @@ class HoststatussummaryQuery extends IdoQuery
*/
protected $subSelect;
/**
* {@inheritdoc}
*/
public function allowsCustomVars()
{
return $this->subSelect->allowsCustomVars();
}
/**
* {@inheritdoc}
*/

View File

@ -129,6 +129,20 @@ class NotificationQuery extends IdoQuery
$this->notificationQuery->union(array($services), Zend_Db_Select::SQL_UNION_ALL);
}
/**
* {@inheritdoc}
*/
public function allowsCustomVars()
{
foreach ($this->subQueries as $query) {
if (! $query->allowsCustomVars()) {
return false;
}
}
return true;
}
/**
* {@inheritdoc}
*/

View File

@ -58,6 +58,20 @@ class ServicegroupsummaryQuery extends IdoQuery
*/
protected $subQueries = array();
/**
* {@inheritdoc}
*/
public function allowsCustomVars()
{
foreach ($this->subQueries as $query) {
if (! $query->allowsCustomVars()) {
return false;
}
}
return true;
}
/**
* {@inheritdoc}
*/

View File

@ -46,6 +46,14 @@ class ServicestatussummaryQuery extends IdoQuery
*/
protected $subSelect;
/**
* {@inheritdoc}
*/
public function allowsCustomVars()
{
return $this->subSelect->allowsCustomVars();
}
/**
* {@inheritdoc}
*/

View File

@ -58,6 +58,20 @@ class StatehistoryQuery extends IdoQuery
*/
protected $fetchHistoryColumns = false;
/**
* {@inheritdoc}
*/
public function allowsCustomVars()
{
foreach ($this->subQueries as $query) {
if (! $query->allowsCustomVars()) {
return false;
}
}
return true;
}
/**
* {@inheritdoc}
*/

View File

@ -130,6 +130,20 @@ We have to find a better solution here.
*/
protected $subQueries = array();
/**
* {@inheritdoc}
*/
public function allowsCustomVars()
{
foreach ($this->subQueries as $query) {
if (! $query->allowsCustomVars()) {
return false;
}
}
return true;
}
/**
* {@inheritdoc}
*/