Removed home.js
Added Discover
This commit is contained in:
parent
df052dab36
commit
8816f4a1a1
25 changed files with 213 additions and 145 deletions
24
app/Controllers/RedirectController.php
Normal file
24
app/Controllers/RedirectController.php
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
namespace App\Controllers;
|
||||
use App\Helpers\Misc;
|
||||
|
||||
/**
|
||||
* Used to be compatible with HTML forms
|
||||
*/
|
||||
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'])) {
|
||||
$endpoint = '/video/' . $_GET['video'];
|
||||
}
|
||||
|
||||
$url = Misc::url($endpoint);
|
||||
header("Location: {$url}");
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue