Code Duplication    Length = 4-4 lines in 6 locations

controller/acp/cat.php 6 locations

@@ 151-154 (lines=4) @@
148
	*/
149
	public function action_delete()
150
	{
151
		if (!$this->cat_id)
152
		{
153
			trigger_error($this->language->lang('DIR_NO_CAT') . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);
154
		}
155
156
		$this->cat_data = $this->_get_cat_info($this->cat_id);
157
@@ 235-238 (lines=4) @@
232
	*/
233
	public function action_move()
234
	{
235
		if (!$this->cat_id)
236
		{
237
			trigger_error($this->language->lang('DIR_NO_CAT') . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);
238
		}
239
240
		$sql = 'SELECT cat_id, cat_name, parent_id, left_id, right_id
241
			FROM ' . $this->categories_table . '
@@ 247-250 (lines=4) @@
244
		$row = $this->db->sql_fetchrow($result);
245
		$this->db->sql_freeresult($result);
246
247
		if (!$row)
248
		{
249
			trigger_error($this->language->lang('DIR_NO_CAT') . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);
250
		}
251
252
		try
253
		{
@@ 305-308 (lines=4) @@
302
	*/
303
	public function action_sync()
304
	{
305
		if (!$this->cat_id)
306
		{
307
			trigger_error($this->language->lang('DIR_NO_CAT') . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);
308
		}
309
310
		@set_time_limit(0);
311
@@ 319-322 (lines=4) @@
316
		$row = $this->db->sql_fetchrow($result);
317
		$this->db->sql_freeresult($result);
318
319
		if (!$row)
320
		{
321
			trigger_error($this->language->lang('DIR_NO_CAT') . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);
322
		}
323
324
		$sql = 'SELECT MIN(link_id) as min_link_id, MAX(link_id) as max_link_id
325
			FROM ' . $this->links_table . '
@@ 397-400 (lines=4) @@
394
		$row = $this->db->sql_fetchrow($result);
395
		$this->db->sql_freeresult($result);
396
397
		if (!$row)
398
		{
399
			trigger_error($this->language->lang('DIR_NO_CAT') . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id), E_USER_WARNING);
400
		}
401
402
		$this->_sync_dir_cat($this->cat_id);
403