Bridge Edit: Use message object instead of session var.

This commit is contained in:
Nate 2019-09-17 21:34:20 -06:00
parent b3d6db4b6b
commit 4b669970f2
1 changed files with 3 additions and 3 deletions

View File

@ -64,8 +64,8 @@
//validate the token
$token = new token;
if (!$token->validate('/app/bridges/bridge_edit.php')) {
$_SESSION["message"] = $text['message-invalid_token'];
if (!$token->validate($_SERVER['PHP_SELF'])) {
message::add($text['message-invalid_token'],'negative');
header('Location: bridges.php');
exit;
}
@ -138,7 +138,7 @@
//create token
$object = new token;
$token = $object->create('/app/bridges/bridge_edit.php');
$token = $object->create($_SERVER['PHP_SELF']);
//show the header
require_once "resources/header.php";