From ca53bcdbbbfd6a1b32b1a7e10d18fb88d1edd560 Mon Sep 17 00:00:00 2001 From: flashwave Date: Wed, 21 Sep 2016 13:30:01 +0200 Subject: [PATCH] more cleanup --- app/Router/Collection.php | 4 ++++ app/Session.php | 4 +++- sakura.php | 28 ---------------------------- 3 files changed, 7 insertions(+), 29 deletions(-) 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;