diff options
| author | David Siegfried <david.siegfried@uni-vechta.de> | 2025-05-27 14:28:38 +0200 |
|---|---|---|
| committer | David Siegfried <david.siegfried@uni-vechta.de> | 2025-09-12 14:19:48 +0200 |
| commit | 61ca2f2a3fc71afed3550b19141bb9fededa3011 (patch) | |
| tree | 8fb7dcf5591c000795c168c1a77f7606a6e51a23 /app/controllers/u.php | |
| parent | cc9dbbccb76f32066f153b7635193cbd07efdd16 (diff) | |
add deeplinks
Diffstat (limited to 'app/controllers/u.php')
| -rw-r--r-- | app/controllers/u.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app/controllers/u.php b/app/controllers/u.php new file mode 100644 index 0000000..29a77b8 --- /dev/null +++ b/app/controllers/u.php @@ -0,0 +1,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)); + } +} |
