Advertisement
Guest User

Untitled

a guest
Apr 14th, 2014
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.01 KB | None | 0 0
  1.  public function get_group() {
  2.         static $group = null;
  3.        
  4.         if($_COOKIE['use_mobile_cache'] == 'false') {
  5.         $group = null;    
  6.         } elseif($_COOKIE['use_mobile_cache'] == 'true') {
  7.         $group = 'use_mobile_cache';
  8.         } else {
  9.         if ($group === null) {
  10.             if ($this->do_get_group()) {
  11.                 foreach ($this->_groups as $config_group => $config) {
  12.                     if (isset($config['enabled']) && $config['enabled'] && isset($config[$this->_compare_key])) {
  13.                         foreach ((array) $config[$this->_compare_key] as $group_compare_value) {
  14.                             if ($group_compare_value && $this->group_verifier($group_compare_value)) {
  15.                                 $group = $config_group;
  16.                                 return $group;
  17.                             }
  18.                         }
  19.                     }
  20.                 }
  21.             }
  22.  
  23.             $group = false;
  24.         }
  25.         }
  26.  
  27.         return $group;
  28.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement