From 8df3db566a3a937b45ebf11adb90d265e6f5e2d4 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sun, 17 Nov 2019 20:45:02 +0100 Subject: initial checking of customized version 1.0rc9 --- js/callbacks/savesearches.php | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 js/callbacks/savesearches.php (limited to 'js/callbacks/savesearches.php') diff --git a/js/callbacks/savesearches.php b/js/callbacks/savesearches.php new file mode 100644 index 0000000..e656a0a --- /dev/null +++ b/js/callbacks/savesearches.php @@ -0,0 +1,27 @@ +check_account_ok(); + + if( !Post::has('csrftoken') ){ + http_response_code(428); # 'Precondition Required' + die('missingtoken'); + }elseif( Post::val('csrftoken')==$_SESSION['csrftoken']){ + # empty + }else{ + http_response_code(412); # 'Precondition Failed' + die('wrongtoken'); + } + + $user->save_search(); +} + +?> -- cgit v1.2.3-54-g00ecf