blob: 29a77b8426d9506a12b6017cfe8145d8fa38b663 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
<?php
class UController extends AuthenticatedController
{
public function r_action(string $short_url_alias): void
{
$short_url = ShortUrl::findOneBySQL('alias = ?', [$short_url_alias]);
if (!$short_url) {
PageLayout::postError(_('Diese Kurz-URL existiert nicht.'));
$this->redirect($this->url_for('start'));
return;
}
$this->redirect(URLHelper::getURL($short_url->path));
}
}
|