| @@ 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. |
|
| @@ 740-755 (lines=16) @@ | ||
| 737 | * @param int $cat_id The category ID |
|
| 738 | * @return array |
|
| 739 | */ |
|
| 740 | private function _get_cat_info($cat_id) |
|
| 741 | { |
|
| 742 | $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 |
|
| 743 | FROM ' . $this->categories_table . ' |
|
| 744 | WHERE cat_id = ' . (int) $cat_id; |
|
| 745 | $result = $this->db->sql_query($sql); |
|
| 746 | $row = $this->db->sql_fetchrow($result); |
|
| 747 | $this->db->sql_freeresult($result); |
|
| 748 | ||
| 749 | if (!$row) |
|
| 750 | { |
|
| 751 | trigger_error('DIR_ERROR_NO_CATS', E_USER_ERROR); |
|
| 752 | } |
|
| 753 | ||
| 754 | return $row; |
|
| 755 | } |
|
| 756 | ||
| 757 | /** |
|
| 758 | * Update category data |
|