Skip to content

Commit

Permalink
CLI - switch blog to saved blog id
Browse files Browse the repository at this point in the history
  • Loading branch information
Tymotey committed Jul 5, 2024
1 parent 16fae8e commit 32a2b4f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/router.cls.php
Original file line number Diff line number Diff line change
Expand Up @@ -512,14 +512,15 @@ private function verify_action()
return;
}

$save_blog = get_current_blog_id();
if ($_REQUEST['switch_blog']) {
// If request parameter "switch_blog", switch to correct blog to generate hash.
switch_to_blog($_REQUEST['switch_blog']);
}
$hash = Router::get_hash(self::VALIDATE_PURGE);
if ($_REQUEST['switch_blog']) {
// Restore blog if needed.
restore_current_blog();
switch_to_blog($save_blog);
}


Expand Down

0 comments on commit 32a2b4f

Please sign in to comment.