Code Duplication    Length = 10-11 lines in 2 locations

core/acp_manager.php 2 locations

@@ 164-174 (lines=11) @@
161
	 * @return array Custom BBCode user group ids
162
	 * @access public
163
	 */
164
	public function get_bbcode_group_data($bbcode_id)
165
	{
166
		$sql = 'SELECT bbcode_group
167
			FROM ' . BBCODES_TABLE . '
168
			WHERE bbcode_id = ' . (int) $bbcode_id;
169
		$result = $this->db->sql_query($sql);
170
		$row = $this->db->sql_fetchrow($result);
171
		$this->db->sql_freeresult($result);
172
173
		return explode(',', $row['bbcode_group']);
174
	}
175
176
	/**
177
	 * Get the bbcode_group data from the database,
@@ 321-330 (lines=10) @@
318
	 * @return int The maximum value in the column
319
	 * @access protected
320
	 */
321
	protected function get_max_column_value($column)
322
	{
323
		$sql = 'SELECT MAX(' . $this->db->sql_escape($column) . ') AS maximum
324
			FROM ' . BBCODES_TABLE;
325
		$result = $this->db->sql_query($sql);
326
		$maximum = $this->db->sql_fetchfield('maximum');
327
		$this->db->sql_freeresult($result);
328
329
		return (int) $maximum;
330
	}
331
332
	/**
333
	 * Send a JSON response