Skip to content

Commit

Permalink
Fix #67 bug with missing referrer
Browse files Browse the repository at this point in the history
  • Loading branch information
ausi committed Mar 8, 2024
1 parent 092f72d commit cf3bc6b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/BackendHooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public function initializeSystemHook()
}

Environment::set('queryString', preg_replace('(([&?])rsfhr=1(&|$))', '$1', Environment::get('queryString')));
Environment::set('requestUri', preg_replace('(([&?])rsfhr=1(&|$))', '$1', Environment::get('requestUri')));

// Fix missing CURRENT_ID if rsfhr is set
if (Input::get('act') === 'create' && Input::get('id')) {
Expand All @@ -59,7 +60,7 @@ public function loadDataContainerHook($table)
}

// Only handle requests from the frontend helper
if (!Input::get('rsfhr')) {
if (!Input::get('rsfhr') || Input::isPost()) {
return;
}

Expand Down

0 comments on commit cf3bc6b

Please sign in to comment.