Пример #1
0
 /**
  * Return cache page id without application. Depends on GET super global array.
  *
  * @param Enterprise_PageCache_Model_Processor $processor
  * @return string
  */
 public function getPageIdWithoutApp(Enterprise_PageCache_Model_Processor $processor)
 {
     $this->_updateCategoryViewedCookie($processor);
     $queryParams = $_GET;
     /**
      * unset known tracking codes
      */
     unset($queryParams["trk_module"]);
     unset($queryParams["trk_msg"]);
     unset($queryParams["trk_contact"]);
     unset($queryParams["utm_source"]);
     unset($queryParams["utm_medium"]);
     unset($queryParams["utm_term"]);
     unset($queryParams["utm_campaign"]);
     unset($queryParams["utm_content"]);
     /** End Edit */
     $sessionParams = Enterprise_PageCache_Model_Cookie::getCategoryCookieValue();
     if ($sessionParams) {
         $sessionParams = (array) json_decode($sessionParams);
         foreach ($sessionParams as $key => $value) {
             if (in_array($key, $this->_paramsMap) && !isset($queryParams[$key])) {
                 $queryParams[$key] = $value;
             }
         }
     }
     ksort($queryParams);
     $queryParams = json_encode($queryParams);
     Enterprise_PageCache_Model_Cookie::setCategoryCookieValue($queryParams);
     return $processor->getRequestId() . '_' . md5($queryParams);
 }
Пример #2
0
 /**
  * Return cache page id without application. Depends on GET super global array.
  *
  * @param Enterprise_PageCache_Model_Processor $processor
  * @return string
  */
 public function getPageIdWithoutApp(Enterprise_PageCache_Model_Processor $processor)
 {
     $queryParams = $_GET;
     $sessionParams = Enterprise_PageCache_Model_Cookie::getCategoryCookieValue();
     if ($sessionParams) {
         $sessionParams = (array) json_decode($sessionParams);
         foreach ($sessionParams as $key => $value) {
             if (in_array($key, $this->_paramsMap) && !isset($queryParams[$key])) {
                 $queryParams[$key] = $value;
             }
         }
     }
     ksort($queryParams);
     $queryParams = json_encode($queryParams);
     Enterprise_PageCache_Model_Cookie::setCategoryCookieValue($queryParams);
     return $processor->getRequestId() . '_' . md5($queryParams);
 }