Ejemplo n.º 1
0
 /**
  * 
  */
 public static function cookieLessDomain($params)
 {
     $cookie_less_domain = trim($params->get('pro_cookielessdomain', ''));
     if ($cookie_less_domain == '') {
         return parent::cookieLessDomain($params);
     }
     static $sDomain = '';
     if ($sDomain == '') {
         $sDomain = '//' . preg_replace('#^(?:https?:)?//|/$#i', '', $cookie_less_domain);
     }
     return $sDomain;
 }
Ejemplo n.º 2
0
 /**
  * 
  */
 public static function cookieLessDomain($params, $path = '', $array = FALSE)
 {
     if (!$params->get('pro_cookielessdomain_enable', '0')) {
         return parent::cookieLessDomain($params, $path, $array);
     }
     static $aDomain = array();
     static $aFilePaths = array();
     if (empty($aDomain)) {
         if (trim($params->get('pro_cookielessdomain', '')) != '') {
             $aDomain[] = self::prepareDomain($params->get('pro_cookielessdomain'));
         }
         if (trim($params->get('pro_cookielessdomain_2', '')) != '') {
             $aDomain[] = self::prepareDomain($params->get('pro_cookielessdomain_2'));
         }
         if (trim($params->get('pro_cookielessdomain_3', '')) != '') {
             $aDomain[] = self::prepareDomain($params->get('pro_cookielessdomain_3'));
         }
     }
     if (empty($aDomain)) {
         return parent::cookieLessDomain($params, $path, $array);
     }
     if ($array) {
         return $aDomain;
     }
     if ($path != '') {
         $path = preg_replace('#\\?.*$#', '', $path);
         if (!isset($aFilePaths[$path])) {
             $aFilePaths[$path] = self::selectDomain($aDomain) . $path;
         }
         return $aFilePaths[$path];
     }
     return self::selectDomain($aDomain);
 }