Exemple #1
0
            $I18N->redirectTo($Tool->generatePermalink(array('msg' => 2)), 302);
            break;
        case 'renewcookies':
            $I18N->renewCookies();
            $I18N->redirectTo($Tool->generatePermalink(array('msg' => 3)), 302);
            break;
    }
}
/**
 * Custom return to
 * -------------------------------------------------
 */
// Tools can pass returnto and returntoquery parameters
// to redirect visitors back to them after setting, changing
// or doing something (eg. clearcookies, renewcookies or prefset)
if ($I18N->isRedirecting()) {
    $returnTo = $kgReq->getVal('returnto');
    $returnToQuery = $kgReq->getVal('returntoquery');
    if (IntuitionUtil::nonEmptyStr($returnTo)) {
        if (IntuitionUtil::nonEmptyStr($returnToQuery)) {
            $returnToQuery = '?' . urldecode($returnToQuery);
        } else {
            $returnToQuery = '';
        }
        $I18N->redirectTo("//{$_SERVER['SERVER_NAME']}{$returnTo}{$returnToQuery}", 302);
    }
}
$I18N->doRedirect();
/**
 * Main content output
 * -------------------------------------------------