summaryrefslogtreecommitdiff
path: root/app.php
diff options
context:
space:
mode:
Diffstat (limited to 'app.php')
-rw-r--r--app.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/app.php b/app.php
index 5e5e5e9..e436e42 100644
--- a/app.php
+++ b/app.php
@@ -6,7 +6,8 @@ $loader = new \Twig\Loader\FilesystemLoader(__DIR__ . '/views');
$twig = new \Twig\Environment($loader); # no cache
$function = new \Twig\TwigFunction('is_active', function($route) {
- if ( $_SERVER['REQUEST_URI'] == $route ) {
+ $url = strtok($_SERVER["REQUEST_URI"], '?');
+ if ( $url == $route ) {
echo " active ";
}
});