Beispiel #1
0
 protected function get_params(Query $query)
 {
     $this->set_param('is_variation_list', false);
     if (is_numeric($query->url(0))) {
         $this->set_param('mode', false);
         $this->set_param('id', $query->url(0));
         $this->id_art = $query->url(0);
     } else {
         if (!$query->get_pool_mode()) {
             if (!$query->is_variation_list() || !Session::getInstance()->is_moderator()) {
                 $this->disable();
             } else {
                 $this->set_param('is_variation_list', true);
                 $this->set_param('id', $query->get('parent'));
             }
         } else {
             $this->set_param('mode', $query->get_pool_mode());
             $this->set_param('id', $query->get_pool_value());
             if ($query->get_pool_mode() == 'artist') {
                 $this->id_artist = $query->get_pool_value();
             }
             if ($query->is_pool_full_view()) {
                 $this->set_param('is_list', true);
             } else {
                 $this->set_param('is_list', false);
                 $this->set_param('list_link', $query->get_pool_mode() . '=' . $query->get_pool_value() . '&per_page=all');
             }
         }
     }
     $this->set_param('moderator', Session::getInstance()->is_moderator());
 }