@@ 103-116 (lines=14) @@ | ||
100 | * @param int $cat_id The category ID |
|
101 | * @return array |
|
102 | */ |
|
103 | public function get_cat($cat_id) |
|
104 | { |
|
105 | $sql = 'SELECT cat_id, cat_cron_enable, cat_cron_next, cat_cron_freq, cat_cron_nb_check |
|
106 | FROM ' . $this->categories_table . ' |
|
107 | WHERE cat_id = ' . (int) $cat_id; |
|
108 | $result = $this->db->sql_query($sql); |
|
109 | $row = $this->db->sql_fetchrow($result); |
|
110 | $this->db->sql_freeresult($result); |
|
111 | ||
112 | if ($row) |
|
113 | { |
|
114 | return $row; |
|
115 | } |
|
116 | } |
|
117 | ||
118 | /** |
|
119 | * Check, for website with backlink specified, if backlink is always here. |
@@ 732-747 (lines=16) @@ | ||
729 | * @param int $cat_id The category ID |
|
730 | * @return array |
|
731 | */ |
|
732 | private function _get_cat_info($cat_id) |
|
733 | { |
|
734 | $sql = 'SELECT cat_id, parent_id, right_id, left_id, cat_desc, cat_desc_uid, cat_desc_options, cat_icon, cat_name, cat_route, display_subcat_list, cat_allow_comments, cat_allow_votes, cat_must_describe, cat_count_all, cat_validate, cat_cron_freq, cat_cron_nb_check, cat_link_back, cat_cron_enable, cat_cron_next |
|
735 | FROM ' . $this->categories_table . ' |
|
736 | WHERE cat_id = ' . (int) $cat_id; |
|
737 | $result = $this->db->sql_query($sql); |
|
738 | $row = $this->db->sql_fetchrow($result); |
|
739 | $this->db->sql_freeresult($result); |
|
740 | ||
741 | if (!$row) |
|
742 | { |
|
743 | trigger_error('DIR_ERROR_NO_CATS', E_USER_ERROR); |
|
744 | } |
|
745 | ||
746 | return $row; |
|
747 | } |
|
748 | ||
749 | /** |
|
750 | * Update category data |