Code Duplication    Length = 9-9 lines in 3 locations

controller/acp/cat.php 1 location

@@ 978-986 (lines=9) @@
975
		{
976
			$link_ids[] = $row['link_id'];
977
978
			if ($row['link_banner'] && !preg_match('/^(http:\/\/|https:\/\/|ftp:\/\/|ftps:\/\/|www\.).+/si', $row['link_banner']))
979
			{
980
				$banner_img = $this->get_banner_path(basename($row['link_banner']));
981
982
				if (file_exists($banner_img))
983
				{
984
					@unlink($banner_img);
985
				}
986
			}
987
		}
988
		$this->db->sql_freeresult($result);
989

controller/acp/validation.php 1 location

@@ 354-362 (lines=9) @@
351
	{
352
		foreach ($this->links_data as $row)
353
		{
354
			if ($row['link_banner'] && !preg_match('/^(http:\/\/|https:\/\/|ftp:\/\/|ftps:\/\/|www\.).+/si', $row['link_banner']))
355
			{
356
				$banner_img = $this->get_banner_path(basename($row['link_banner']));
357
358
				if (file_exists($banner_img))
359
				{
360
					@unlink($banner_img);
361
				}
362
			}
363
364
			$sql = 'DELETE FROM ' . $this->links_table . ' WHERE link_id = ' . (int) $row['link_id'];
365
			$this->db->sql_query($sql);

core/link.php 1 location

@@ 230-238 (lines=9) @@
227
228
		while ($row = $this->db->sql_fetchrow($result))
229
		{
230
			if ($row['link_banner'] && !preg_match('/^(http:\/\/|https:\/\/|ftp:\/\/|ftps:\/\/|www\.).+/si', $row['link_banner']))
231
			{
232
				$banner_img = $this->get_banner_path(basename($row['link_banner']));
233
234
				if (file_exists($banner_img))
235
				{
236
					@unlink($banner_img);
237
				}
238
			}
239
		}
240
241
		foreach ($link_datas_ary as $table => $field)