Skip to content

Commit 789935d

Browse files
committed
Deleting users fix
1 parent f08920d commit 789935d

5 files changed

Lines changed: 17 additions & 18 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-11) UNRELEASED; urgency=medium
1+
icinga-editor (0.200-12) UNRELEASED; urgency=medium
22

33
[ dvorak ]
44
* Initial release. (Closes: #XXXXXX)
@@ -23,5 +23,6 @@ icinga-editor (0.200-11) UNRELEASED; urgency=medium
2323
* Database Renamed to icinga_editor
2424
* Fix User(s content) delete
2525
* Namespace use fix for engine classes
26+
* Namespace use fix for engine classes II
2627

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

debian/conf/icinga-editor.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Alias /icinga-editor /usr/share/icinga-editor
1818
php_admin_flag allow_url_fopen On
1919
php_value include_path .:/usr/share/php:/usr/share/icinga-editor/classes
2020
# php_admin_value upload_tmp_dir /var/lib/icinga-editor/tmp
21-
php_admin_value open_basedir /usr/share/icinga-editor/:/etc/icinga-editor/:/etc/icinga/generated/:/var/lib/icinga-editor/:/usr/share/php/:/usr/share/javascript/:/usr/share/locale:/var/lib/icinga-editor/:/var/tmp:/tmp:/etc/apache2/conf-enabled/:/usr/share/icinga/htdocs/images/logos/:/usr/share/nagios/htdocs/images
21+
php_admin_value open_basedir /usr/share/icinga-editor/:/etc/icinga-editor/:/etc/icinga/generated/:/var/lib/icinga-editor/:/usr/share/php/:/usr/share/javascript/:/usr/share/locale:/var/lib/icinga-editor/:/var/tmp:/tmp:/etc/apache2/conf-enabled/icinga-web.conf:/usr/share/icinga/htdocs/images/logos/:/usr/share/nagios/htdocs/images
2222
</IfModule>
2323

2424
# enable gzip compression

debian/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Priority: optional
77
Homepage: http://vitexsoftware.cz/monitoring.php
88

99
Package: icinga-editor
10-
Depends: ${misc:Depends},libjs-twitter-bootstrap, ease-framework, dbconfig-common , php-mail, php5-curl, icinga, mtr-tiny, php-image-graphviz, libjs-d3js, php5-cli, php5-intl, composer
10+
Depends: ${misc:Depends},libjs-twitter-bootstrap, ease-framework, dbconfig-common , php-mail, php5-curl, icinga, mtr-tiny, php-image-graphviz, libjs-d3js, php5-cli, php5-intl, composer, libjs-twitter-bootstrap-switch
1111
Recommends: mysql-server,icinga-web, icinga-web-config-icinga, graphicsmagick-imagemagick-compat, pnp4icinga
1212
Architecture: all
1313
Section: web

debian/revison

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

src/classes/User.php

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -274,11 +274,11 @@ public function delete($id = null)
274274
}
275275

276276

277-
$userGroup = new Engine\UserGroup;
277+
$userGroup = new Engine\UserGroup();
278278
$userGroup->delUser($id);
279279

280280

281-
$command = new Engine\Command;
281+
$command = new Engine\Command();
282282
$myCommand = $command->getOwned($id);
283283
if ($myCommand) {
284284
foreach ($myCommand as $command_id => $cmd) {
@@ -287,7 +287,7 @@ public function delete($id = null)
287287
}
288288
}
289289

290-
$contact = new Engine\Contact;
290+
$contact = new Engine\Contact();
291291
$myContact = $contact->getOwned($id);
292292
if ($myContact) {
293293
foreach ($myContact as $contact_id => $cmd) {
@@ -298,7 +298,7 @@ public function delete($id = null)
298298
}
299299

300300

301-
$contactgroup = new Engine\Contactgroup;
301+
$contactgroup = new Engine\Contactgroup();
302302
$myContactgroup = $contactgroup->getOwned($id);
303303
if ($myContactgroup) {
304304
foreach ($myContactgroup as $contactgroup_id => $cmd) {
@@ -308,7 +308,7 @@ public function delete($id = null)
308308
}
309309

310310

311-
$hostgroup = new Engine\Hostgroup;
311+
$hostgroup = new Engine\Hostgroup();
312312
$myHostgroup = $hostgroup->getOwned($id);
313313
if ($myHostgroup) {
314314
foreach ($myHostgroup as $hostgroup_id => $cmd) {
@@ -317,7 +317,7 @@ public function delete($id = null)
317317
}
318318
}
319319

320-
$host = new Engine\Host;
320+
$host = new Engine\Host();
321321
$myHost = $host->getOwned($id);
322322
if ($myHost) {
323323
foreach ($myHost as $host_id => $cmd) {
@@ -326,7 +326,7 @@ public function delete($id = null)
326326
}
327327
}
328328

329-
$servicegroup = new Engine\Servicegroup;
329+
$servicegroup = new Engine\Servicegroup();
330330
$myServicegroup = $servicegroup->getOwned($id);
331331
if ($myServicegroup) {
332332
foreach ($myServicegroup as $servicegroup_id => $cmd) {
@@ -335,7 +335,7 @@ public function delete($id = null)
335335
}
336336
}
337337

338-
$service = new Engine\Service;
338+
$service = new Engine\Service();
339339
$myService = $service->getOwned($id);
340340
if ($myService) {
341341
foreach ($myService as $service_id => $cmd) {
@@ -344,7 +344,7 @@ public function delete($id = null)
344344
}
345345
}
346346

347-
$timeperiod = new Engine\Timeperiod;
347+
$timeperiod = new Engine\Timeperiod();
348348
$myTimeperiod = $timeperiod->getOwned($id);
349349
if ($myTimeperiod) {
350350
foreach ($myTimeperiod as $timeperiod_id => $cmd) {
@@ -365,14 +365,12 @@ public function delete($id = null)
365365
}
366366
}
367367

368-
if ($this->deleteFromSQL()) {
368+
if ($this->deleteFromSQL($this->getUserID())) {
369369

370370
$this->addStatusMessage(sprintf(_('Uživatel %s byl smazán'),
371371
$this->getUserLogin()));
372372

373-
require_once 'Ease/EaseMail.php';
374-
375-
$email = new EaseMail($this->getDataValue('email'),
373+
$email = new \Ease\Mailer($this->getDataValue('email'),
376374
_('Oznámení o zrušení účtu'));
377375
$email->setMailHeaders(['From' => EMAIL_FROM]);
378376
$email->addItem(new \Ease\Html\Div("Právě jste byl/a smazán/a z Aplikace VSMonitoring s těmito přihlašovacími údaji:\n"));

0 commit comments

Comments
 (0)