Code Duplication    Length = 17-17 lines in 2 locations

Sources/Subs.php 2 locations

@@ 1323-1339 (lines=17) @@
1320
					'height' => array('optional' => true, 'value' => ' height="$1"', 'match' => '(\d+)'),
1321
				),
1322
				'content' => '<img src="$1" alt="{alt}" title="{title}"{width}{height} class="bbc_img resized">',
1323
				'validate' => function (&$tag, &$data, $disabled)
1324
				{
1325
					global $image_proxy_enabled, $image_proxy_secret, $boardurl;
1326
1327
					$data = strtr($data, array('<br>' => ''));
1328
					$scheme = parse_url($data, PHP_URL_SCHEME);
1329
					if ($image_proxy_enabled)
1330
					{
1331
						if (empty($scheme))
1332
							$data = 'http://' . ltrim($data, ':/');
1333
1334
						if ($scheme != 'https')
1335
							$data = $boardurl . '/proxy.php?request=' . urlencode($data) . '&hash=' . md5($data . $image_proxy_secret);
1336
					}
1337
					elseif (empty($scheme))
1338
						$data = '//' . ltrim($data, ':/');
1339
				},
1340
				'disabled_content' => '($1)',
1341
			),
1342
			array(
@@ 1346-1362 (lines=17) @@
1343
				'tag' => 'img',
1344
				'type' => 'unparsed_content',
1345
				'content' => '<img src="$1" alt="" class="bbc_img">',
1346
				'validate' => function (&$tag, &$data, $disabled)
1347
				{
1348
					global $image_proxy_enabled, $image_proxy_secret, $boardurl;
1349
1350
					$data = strtr($data, array('<br>' => ''));
1351
					$scheme = parse_url($data, PHP_URL_SCHEME);
1352
					if ($image_proxy_enabled)
1353
					{
1354
						if (empty($scheme))
1355
							$data = 'http://' . ltrim($data, ':/');
1356
1357
						if ($scheme != 'https')
1358
							$data = $boardurl . '/proxy.php?request=' . urlencode($data) . '&hash=' . md5($data . $image_proxy_secret);
1359
					}
1360
					elseif (empty($scheme))
1361
						$data = '//' . ltrim($data, ':/');
1362
				},
1363
				'disabled_content' => '($1)',
1364
			),
1365
			array(