Code Duplication    Length = 14-16 lines in 2 locations

core/cron.php 1 location

@@ 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.

controller/acp/cat.php 1 location

@@ 696-711 (lines=16) @@
693
	* @param	int		$cat_id	The category ID
694
	* @return 	array
695
	*/
696
	private function _get_cat_info($cat_id)
697
	{
698
		$sql = 'SELECT cat_id, parent_id, right_id, left_id, cat_desc, cat_desc_uid, cat_desc_options, cat_icon, cat_name, 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
699
			FROM ' . $this->categories_table . '
700
			WHERE cat_id = ' . (int) $cat_id;
701
		$result = $this->db->sql_query($sql);
702
		$row = $this->db->sql_fetchrow($result);
703
		$this->db->sql_freeresult($result);
704
705
		if (!$row)
706
		{
707
			trigger_error('DIR_ERROR_NO_CATS', E_USER_ERROR);
708
		}
709
710
		return $row;
711
	}
712
713
	/**
714
	* Update category data