Exemple #1
0
 protected function set_query_params()
 {
     static $display_type;
     if ($display_type === null) {
         $display_type = $this->nc_core->get_display_type();
     }
     // Условия
     if ($this->result_mode != 'custom') {
         if (!$this->ignore_check) {
             $this->table->where('Checked', 1);
         }
         $this->table->where('Catalogue_ID', $this->site_id);
         if (in_array($display_type, array('longpage_vertical', 'shortpage'))) {
             $this->table->where_in('DisplayType', array('inherit', $display_type));
         }
     }
     // Сортировка
     if (!$this->custom_ordering) {
         $this->table->order_by('Priority')->order_by('Subdivision_Name');
     }
 }