mirror of
https://github.com/Icinga/icingadb-web.git
synced 2026-06-08 16:22:05 -04:00
usergroup: Add fallback route which redirects to contactgroup
This commit is contained in:
parent
04b8e220fd
commit
09df9368bf
1 changed files with 28 additions and 0 deletions
28
application/controllers/UsergroupController.php
Normal file
28
application/controllers/UsergroupController.php
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<?php
|
||||
|
||||
/* Icinga DB Web | (c) 2025 Icinga GmbH | GPLv2 */
|
||||
|
||||
namespace Icinga\Module\Icingadb\Controllers;
|
||||
|
||||
use Icinga\Module\Icingadb\Web\Controller;
|
||||
|
||||
/**
|
||||
* @deprecated Will be removed with 1.3, use ContactgroupController instead
|
||||
*/
|
||||
class UsergroupController extends Controller
|
||||
{
|
||||
public function preDispatch()
|
||||
{
|
||||
$url = $this->getRequest()->getUrl();
|
||||
$url->setPath(preg_replace(
|
||||
'~^icingadb/usergroup(?=/|$)~',
|
||||
'icingadb/contactgroup',
|
||||
$url->getPath()
|
||||
));
|
||||
|
||||
$this->getResponse()
|
||||
->setHttpResponseCode(301)
|
||||
->setHeader('Location', $url->getAbsoluteUrl())
|
||||
->sendResponse();
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue