Exemple #1
0
function prefixEncryptUrl($url, $prefix = true)
{
    $result = encryptUrl($url);
    if (false == $result) {
        return $url;
    }
    $urlEncMaxLen = CSmarty::getUrlEncMaxLen();
    $length = strlen($result);
    if ($urlEncMaxLen > 0 && $length > $urlEncMaxLen) {
        return $url;
    }
    if (true == $prefix) {
        $prefix_str = CSmarty::getEncryptionPrefix();
        $result = $prefix_str . $result;
    }
    return $result;
}