Skip to content

Commit f08920d

Browse files
committed
Namespace use fix for engine classes II
1 parent 5bf092f commit f08920d

5 files changed

Lines changed: 12 additions & 11 deletions

File tree

debian/changelog

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
icinga-editor (0.200-10) UNRELEASED; urgency=medium
1+
icinga-editor (0.200-11) UNRELEASED; urgency=medium
22

33
[ dvorak ]
44
* Initial release. (Closes: #XXXXXX)
@@ -22,5 +22,6 @@ icinga-editor (0.200-10) UNRELEASED; urgency=medium
2222
* typo fix
2323
* Database Renamed to icinga_editor
2424
* Fix User(s content) delete
25+
* Namespace use fix for engine classes
2526

26-
-- vitex <vitex@developer.kancl.brevnov.czf> Tue, 19 Jul 2016 15:22:55 +0200
27+
-- vitex <vitex@developer.kancl.brevnov.czf> Tue, 19 Jul 2016 15:26:34 +0200

debian/revison

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
10
1+
11

src/classes/engine/Contact.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,8 +409,8 @@ public function rename($newname)
409409

410410
if ($this->saveToSQL()) {
411411
$childs = $this->getChilds();
412-
$subcontact = new Engine\IEContact();
413-
$service = new Engine\IEService();
412+
$subcontact = new Contact();
413+
$service = new Service();
414414
foreach ($childs as $childID => $childInfo) {
415415
$subcontact->loadFromSQL($childID);
416416
$type = $subcontact->getDataValue('alias');

src/classes/engine/Host.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -443,11 +443,11 @@ public function rename($newname)
443443
$oldname = $this->getName();
444444
$this->setDataValue($this->nameColumn, $newname);
445445

446-
$hostGroup = new Engine\IEHostgroup();
446+
$hostGroup = new Hostgroup();
447447
$hostGroup->renameHost($oldname, $newname);
448448

449449
$renameAll = true;
450-
$service = new Engine\IEService();
450+
$service = new Service();
451451
$servicesAssigned = $service->dblink->queryToArray('SELECT '.$service->myKeyColumn.','.$service->nameColumn.' FROM '.$service->myTable.' WHERE '.'host_name'.' LIKE \'%"'.$oldname.'"%\'',
452452
$service->myKeyColumn);
453453
foreach ($servicesAssigned as $serviceID => $serviceInfo) {
@@ -463,7 +463,7 @@ public function rename($newname)
463463
$childsAssigned = $this->dblink->queryToArray('SELECT '.$this->myKeyColumn.','.$this->nameColumn.' FROM '.$this->myTable.' WHERE '.'parents'.' LIKE \'%"'.$oldname.'"%\'',
464464
$this->myKeyColumn);
465465
foreach ($childsAssigned as $chid_id => $child_info) {
466-
$child = new Engine\IEHost($chid_id);
466+
$child = new Host($chid_id);
467467
$child->delMember('parents', $this->getId(), $oldname);
468468
$child->addMember('parents', $this->getId(), $newname);
469469
$child->updateToSQL();
@@ -599,7 +599,7 @@ public function getServices()
599599
{
600600
$services = [];
601601

602-
$service = new Engine\IEService;
602+
$service = new Service;
603603
$servicesAssigned = $service->dblink->queryToArray('SELECT '.$service->myKeyColumn.','.$service->nameColumn.' FROM '.$service->myTable.' WHERE host_name LIKE \'%"'.$this->getName().'"%\'',
604604
$service->myKeyColumn);
605605
if ($servicesAssigned) {

src/classes/engine/Hostgroup.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ function delete($id = null)
172172
} else {
173173
$id = $this->getId();
174174
}
175-
$host = new Engine\IEHost;
175+
$host = new Host;
176176
$hosts = $host->getColumnsFromSQL(
177177
[$host->myKeyColumn],
178178
[
@@ -200,7 +200,7 @@ function delete($id = null)
200200
}
201201

202202

203-
$subgroup = new Engine\IEHostgroup;
203+
$subgroup = new Hostgroup;
204204
$subgroups = $subgroup->getColumnsFromSQL(
205205
[$subgroup->myKeyColumn],
206206
[

0 commit comments

Comments
 (0)