Code Duplication    Length = 10-11 lines in 2 locations

core/acp_manager.php 2 locations

@@ 147-157 (lines=11) @@
144
	 * @return array Custom BBCode user group ids
145
	 * @access public
146
	 */
147
	public function get_bbcode_group_data($bbcode_id)
148
	{
149
		$sql = 'SELECT bbcode_group
150
			FROM ' . BBCODES_TABLE . '
151
			WHERE bbcode_id = ' . (int) $bbcode_id;
152
		$result = $this->db->sql_query($sql);
153
		$row = $this->db->sql_fetchrow($result);
154
		$this->db->sql_freeresult($result);
155
156
		return explode(',', $row['bbcode_group']);
157
	}
158
159
	/**
160
	 * Get the bbcode_group data from the database,
@@ 304-313 (lines=10) @@
301
	 * @return int The maximum value in the column
302
	 * @access protected
303
	 */
304
	protected function get_max_column_value($column)
305
	{
306
		$sql = 'SELECT MAX(' . $this->db->sql_escape($column) . ') AS maximum
307
			FROM ' . BBCODES_TABLE;
308
		$result = $this->db->sql_query($sql);
309
		$maximum = $this->db->sql_fetchfield('maximum');
310
		$this->db->sql_freeresult($result);
311
312
		return (int) $maximum;
313
	}
314
315
	/**
316
	 * Send a JSON response