/** * Save branding table settings * @return json * @author Ruslan Ushakov */ public function save_ranking_table_settings() { $site_id = $this->input->post('site_id'); $view = $this->input->post('view'); $date_of_upload = $this->input->post('date_of_upload'); $term_id = $this->input->post('term_id'); if (($view == '1s1b' || $view == '1s1bpn') && !empty($term_id) && !empty($site_id) && !empty($date_of_upload)) { if (is_array($date_of_upload) && count($date_of_upload) > 1) { if ($view == '1s1b') { $view = '1s1b1r_md'; } else { $view = '1s1bpn_md'; } } else { if ($view == '1s1b') { $view = '1s1b1r'; } else { $view = '1s1bpn'; } } } if ('1s1bpn' == $view && is_array($date_of_upload) && count($date_of_upload) > 1) { $view = '1s1bpn_md'; } if ($view == '1srv' && is_array($date_of_upload) && count($date_of_upload) > 1) { $view = '1srv_md'; } $column_names = $this->input->post('column_names'); $column_vars = $this->input->post('column_vars'); $this->load->model('user_summary_settings', 'uss'); $result = 0; if (count($column_names) == count($column_vars)) { $settings_value = array(); for ($i = 0; $i < count($column_names); $i++) { $settings_value[$column_names[$i]] = $column_vars[$i]; } $this->load->library('RankingTable'); $result = $this->rankingtable->save_ranking_table_settings($view, $settings_value); } $this->output->set_content_type('application/json')->set_output(json_encode($result)); }
public function equals(RankingTable $rankingTable) { return $this->getRankingLeague() == $rankingTable->getRankingLeague() && $this->getRankingSeparator() == $rankingTable->getRankingSeparator(); }