Ejemplo n.º 1
0
 public static function getCookieLifetime(Pap_Contexts_Tracking $context) {
     if ($context->getCommissionGroup() !== null &&
     ($cookieLifetime = $context->getCommissionGroup()->getCookieLifetime()) > Pap_Db_CommissionGroup::COOKIE_LIFETIME_VALUE_SAME_AS_CAMPAIGN) {
     	return $cookieLifetime;
     }
     $lifetime = 0;
     if ($context->getCampaignObject() != null) {
         $lifetime = $context->getCampaignObject()->getCookieLifetime();
     }
     if($lifetime == 0) {
         $lifetime = self::COOKIE_LIFETIME_FOREVER;
     }
     return $lifetime;
 }