You are here

function space_type_purl::purge_request_destination in Spaces 6.3

Same name and namespace in other branches
  1. 7.3 plugins/space_type_purl.inc \space_type_purl::purge_request_destination()
  2. 7 plugins/space_type_purl.inc \space_type_purl::purge_request_destination()

Pull the destination out of the $_REQUEST to prevent a redirect directly to it within purl_goto. This function should be used immediately before a call to purl_goto.

2 calls to space_type_purl::purge_request_destination()
space_type_purl::activate in plugins/space_type_purl.inc
Override of activate(). Ensure that the PURL modifier is present when the space is active.
space_type_purl::deactivate in plugins/space_type_purl.inc
Override of deactivate(). Ensure that the PURL modifier is not present when the space is not active.

File

plugins/space_type_purl.inc, line 67

Class

space_type_purl
Common functionality for space types that use a PURL modifier to trigger their activation. Examples: space_og, space_taxonomy.

Code

function purge_request_destination() {
  if (isset($_REQUEST['destination'])) {
    unset($_REQUEST['destination']);
  }
  if (isset($_REQUEST['edit']['destination'])) {
    unset($_REQUEST['edit']['destination']);
  }
}