Code Duplication    Length = 7-7 lines in 3 locations

root/includes/acp/acp_directory.php 2 locations

@@ 1046-1052 (lines=7) @@
1043
								WHERE link_id = ' . (int)$row['link_id'];
1044
							$db->sql_query($sql);
1045
						}
1046
						elseif($row['link_banner'] && !preg_match('/^(http:\/\/|https:\/\/|ftp:\/\/|ftps:\/\/|www\.).+/si', $row['link_banner']))
1047
						{
1048
							if (file_exists($phpbb_root_path . 'images/directory/banners' .'/'. basename($row['link_banner'])))
1049
							{
1050
								@unlink($phpbb_root_path . 'images/directory/banners' .'/'. basename($row['link_banner']));
1051
							}
1052
						}
1053
					}
1054
					$db->sql_freeresult($result);
1055
@@ 1828-1834 (lines=7) @@
1825
		{
1826
			$link_ids[] = $row['link_id'];
1827
1828
			if($row['link_banner'] && !preg_match('/^(http:\/\/|https:\/\/|ftp:\/\/|ftps:\/\/|www\.).+/si', $row['link_banner']))
1829
			{
1830
				if (file_exists($phpbb_root_path . 'images/directory/banners' .'/'. basename($row['link_banner'])))
1831
				{
1832
					@unlink($phpbb_root_path . 'images/directory/banners' .'/'. basename($row['link_banner']));
1833
				}
1834
			}
1835
		}
1836
		$db->sql_freeresult($result);
1837

root/includes/mods/directory/functions.php 1 location

@@ 122-128 (lines=7) @@
119
120
			while ($row = $db->sql_fetchrow($result))
121
			{
122
				if($row['link_banner'] && !preg_match('/^(http:\/\/|https:\/\/|ftp:\/\/|ftps:\/\/|www\.).+/si', $row['link_banner']))
123
				{
124
					if (file_exists($phpbb_root_path . 'images/directory/banners' .'/'. basename($row['link_banner'])))
125
					{
126
						@unlink($phpbb_root_path . 'images/directory/banners' .'/'. basename($row['link_banner']));
127
					}
128
				}
129
			}
130
131
			foreach ($link_datas_ary as $table => $field)