diff --git a/app/Router/Collection.php b/app/Router/Collection.php index d430c8a..dc2fa08 100644 --- a/app/Router/Collection.php +++ b/app/Router/Collection.php @@ -84,6 +84,10 @@ class Collection throw new \Exception; } + if (count($params)) { + // + } + return parse_url('/' . $this->names[$name]->path, PHP_URL_PATH); } } diff --git a/app/Session.php b/app/Session.php index fff3a9d..7c61398 100644 --- a/app/Session.php +++ b/app/Session.php @@ -163,8 +163,10 @@ class Session return false; } - /* completely removed the code for ip checking because it only worked with IPv4 + if ($ip !== null) { + /* completely removed the code for ip checking because it only worked with IPv4 good thing is i can probably do CIDR based checking */ + } // If the remember flag is set extend the session time if ($session->session_remember) { diff --git a/sakura.php b/sakura.php index 891a6be..701c59a 100644 --- a/sakura.php +++ b/sakura.php @@ -77,31 +77,3 @@ if (!defined('IN_CLI')) { 'session' => $_SESSION, ]); } - -// use Sakura\Router\Route; -// use Sakura\Router\Router; - -// Router::add( -// Route::path('/') -// ->methods('GET') -// ->controller(Controllers\MetaController::class) -// ->action('index') -// ->name('main.index'), -// Route::path('/test') -// ->controller(Controllers\MetaController::class) -// ->group( -// Route::path('faq') -// ->methods('GET') -// ->action('faq') -// ->group( -// Route::path('sub/{meow}/{cock}?') -// ->methods(['GET', 'POST']) -// ->action('search') -// ->name('main.search') -// ) -// ) -// ); - -// echo Router::url('main.search'); -// header('Content-Type: text/plain'); -// exit;