commit 7f34bca9a0d128df43558523fa4b1973ca1a7d5c
parent 90f1a83a9b95b553791fdea99f069ffdaafc529f
Author: Gerco van Woudenbergh <[email protected]>
Date: Mon, 3 Jul 2023 15:46:03 +0200
Merge branch 'main' of https://github.com/friedelschoen/iwa-panda
Diffstat:
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
@@ -6,8 +6,9 @@
<component name="ChangeListManager">
<list default="true" id="f1ac0514-5d96-49e8-8c16-ecccecd1bbe1" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/Model/Key.php" beforeDir="false" afterPath="$PROJECT_DIR$/Model/Key.php" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/index.php" beforeDir="false" afterPath="$PROJECT_DIR$/index.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/Lollipop/Router.php" beforeDir="false" afterPath="$PROJECT_DIR$/Lollipop/Router.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/js/panda.js" beforeDir="false" afterPath="$PROJECT_DIR$/js/panda.js" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/routing/login.php" beforeDir="false" afterPath="$PROJECT_DIR$/routing/login.php" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -60,7 +61,7 @@
<workItem from="1688384517492" duration="305000" />
<workItem from="1688384956857" duration="828000" />
<workItem from="1688387080412" duration="1016000" />
- <workItem from="1688388326819" duration="1107000" />
+ <workItem from="1688388326819" duration="2118000" />
</task>
<servers />
</component>
diff --git a/Lollipop/Router.php b/Lollipop/Router.php
@@ -107,10 +107,8 @@ namespace Lollipop {
}
}
}
-
- echo "404 '$this->path' not found!";
- http_response_code(404);
- return null;
+ http_response_code(401);
+ return header("Location: /");
}
}
}
diff --git a/routing/login.php b/routing/login.php
@@ -33,6 +33,7 @@ $login = function (&$vars) {
$_SESSION[$key] = $data;
}
}
+
//get permissions form db and set sessions_permissions
$p = $db->all_where(Model\PermissionUser::class, [login => $u->{login}]);
$user_permissions = [];