/** * Implements integrate_redirect * When SMF calls redirectexit, we need to rewrite the URL its redirecting to * Without this, the convertQueryString would catch it, but would cause an * extra page load. This helps reduce server load and streamlines redirects * * @global string $scripturl * @global array $modSettings * @param string $setLocation The original location (passed by reference) * @param boolean $refresh Unused, but declares if we are using meta refresh * @return <type> */ public static function fixRedirectUrl(&$setLocation, &$refresh) { global $scripturl, $modSettings; if (empty($modSettings['simplesef_enable'])) { return; } self::$redirect = true; //self::log('Fixing redirect location: ' . $setLocation); // Only do this if it's an URL for this board if (strpos($setLocation, $scripturl) !== false) { $setLocation = self::create_sef_url($setLocation); } }