Code Duplication    Length = 10-10 lines in 2 locations

core/acp_manager.php 1 location

@@ 155-164 (lines=10) @@
152
	 * @return int The maximum order
153
	 * @access public
154
	 */
155
	public function get_max_bbcode_order()
156
	{
157
		$sql = 'SELECT MAX(bbcode_order) AS max_bbcode_order
158
			FROM ' . BBCODES_TABLE;
159
		$result = $this->db->sql_query($sql);
160
		$max_order = (int) $this->db->sql_fetchfield('max_bbcode_order');
161
		$this->db->sql_freeresult($result);
162
163
		return $max_order;
164
	}
165
166
	/**
167
	 * Get the bbcode_group data from the posted form

core/bbcodes_installer.php 1 location

@@ 123-132 (lines=10) @@
120
	 * @return int bbcode identifier
121
	 * @access protected
122
	 */
123
	protected function get_max_bbcode_id()
124
	{
125
		$sql = 'SELECT MAX(bbcode_id) AS max_bbcode_id
126
			FROM ' . BBCODES_TABLE;
127
		$result = $this->db->sql_query($sql);
128
		$max_bbcode_id = $this->db->sql_fetchfield('max_bbcode_id');
129
		$this->db->sql_freeresult($result);
130
131
		return (int) $max_bbcode_id;
132
	}
133
134
	/**
135
	 * Check if bbcode exists