예제 #1
0
function passesPageCacheValidation()
{
    if (NITRO_IGNORE_AJAX_REQUESTS && isAJAXRequest()) {
        return false;
    }
    if (NITRO_IGNORE_POST_REQUESTS && isPOSTRequest()) {
        return false;
    }
    if (isItemsInCart() || isCustomerLogged() || isWishlistAdded() || isAdminLogged() && NITRO_DISABLE_FOR_ADMIN || isYMM()) {
        return false;
    }
    $ignoredRoutes = getIgnoredRoutes();
    global $registry;
    if (!empty($registry)) {
        $current_route = !empty($registry->get('request')->get['route']) ? $registry->get('request')->get['route'] : NULL;
    }
    if (!empty($_GET['route']) && in_array($_GET['route'], $ignoredRoutes) || !empty($current_route) && in_array($current_route, $ignoredRoutes)) {
        return false;
    }
    if (areWeInIgnoredUrl()) {
        return false;
    }
    return true;
}
예제 #2
0
파일: top.php 프로젝트: BulatSa/Ctex
function passesPageCacheValidation()
{
    if (NITRO_IGNORE_AJAX_REQUESTS == TRUE && isAJAXRequest()) {
        return false;
    }
    if (NITRO_IGNORE_POST_REQUESTS == TRUE && isPOSTRequest()) {
        return false;
    }
    if (isItemsInCart() || isCustomerLogged() || isWishlistAdded()) {
        return false;
    }
    $ignoredRoutes = getIgnoredRoutes();
    if (!empty($_GET['route']) && in_array($_GET['route'], $ignoredRoutes)) {
        return false;
    }
    if (areWeInIgnoredUrl()) {
        return false;
    }
    return true;
}