DowntimeQuery: Rename baseQuery to select

This commit is contained in:
Eric Lippmann 2014-04-15 17:58:06 +02:00
parent 64bee6a414
commit 67ce376ef0
1 changed files with 3 additions and 6 deletions

View File

@ -64,23 +64,20 @@ class DowntimeQuery extends IdoQuery
*/
protected function joinBaseTables()
{
$this->baseQuery = $this->db->select()->from(
$this->select->from(
array('sd' => $this->prefix . 'scheduleddowntime'),
array()
);
$this->baseQuery->joinLeft(
$this->select->joinLeft(
array('ho' => $this->prefix . 'objects'),
'sd.object_id = ho.object_id AND ho.is_active = 1 AND ho.objecttype_id = 1',
array()
);
$this->baseQuery->joinLeft(
$this->select->joinLeft(
array('so' => $this->prefix . 'objects'),
'sd.object_id = so.object_id AND so.is_active = 1 AND so.objecttype_id = 2',
array()
);
$this->joinedVirtualTables = array('downtime' => true);
}
}