예제 #1
0
 private function _all($ignoreRestrictions)
 {
     $res = array_values($this->themes);
     $user = DatawrapperSession::getInstance()->getUser();
     $email = $user->getEmail();
     $domain = substr($email, strpos($email, '@'));
     $res = array();
     foreach ($this->themes as $meta) {
         $res[] = $meta;
     }
     return $res;
 }
예제 #2
0
 private function _all($ignoreRestrictions)
 {
     $res = array_values($this->themes);
     $user = DatawrapperSession::getInstance()->getUser();
     $email = $user->getEmail();
     $domain = substr($email, strpos($email, '@'));
     $res = array();
     foreach ($this->themes as $meta) {
         if (!isset($meta['restrict']) || $meta['restrict'] == $domain || $meta['restrict'] == $email || $ignoreRestrictions === true || $user->isAdmin()) {
             // of course, admins can see all, too
             $res[] = $meta;
         }
     }
     return $res;
 }