Icons, themes, removed instance proxy and more

This commit is contained in:
Pablo Ferreiro 2022-03-29 19:30:31 +02:00
parent 9a35c61023
commit 44ee065ec6
No known key found for this signature in database
GPG key ID: 41FBCE65B779FA24
52 changed files with 476 additions and 511 deletions

View file

@ -7,17 +7,25 @@ use App\Helpers\Misc;
*/
class RedirectController {
static public function redirect() {
$endpoint = '';
if (isset($_GET['user'])) {
$endpoint = '/@' . $_GET['user'];
} else if (isset($_GET['tag'])) {
$endpoint = '/tag/' . $_GET['tag'];
} else if (isset($_GET['music'])) {
$endpoint = '/music/' . $_GET['music'];
} else if (isset($_GET['video'])) {
// The @username part is not used, but
// it is the schema that TikTok follows
$endpoint = '/@placeholder/video/' . $_GET['video'];
$endpoint = '/';
if (isset($_GET['type'], $_GET['term'])) {
$term = $_GET['term'];
switch ($_GET['type']) {
case 'user':
$endpoint = '/@' . $term;
break;
case 'tag':
$endpoint = '/tag/' . $term;
break;
case 'music':
$endpoint = '/music/' . $term;
break;
case 'video':
// The @username part is not used, but
// it is the schema that TikTok follows
$endpoint = '/@placeholder/video/' . $term;
break;
}
}
$url = Misc::url($endpoint);