Code Duplication    Length = 17-17 lines in 2 locations

Sources/Subs.php 2 locations

@@ 1397-1413 (lines=17) @@
1394
					'height' => array('optional' => true, 'value' => ' height="$1"', 'match' => '(\d+)'),
1395
				),
1396
				'content' => '<img src="$1" alt="{alt}" title="{title}"{width}{height} class="bbc_img resized">',
1397
				'validate' => function (&$tag, &$data, $disabled)
1398
				{
1399
					global $image_proxy_enabled, $image_proxy_secret, $boardurl;
1400
1401
					$data = strtr($data, array('<br>' => ''));
1402
					$scheme = parse_url($data, PHP_URL_SCHEME);
1403
					if ($image_proxy_enabled)
1404
					{
1405
						if (empty($scheme))
1406
							$data = 'http://' . ltrim($data, ':/');
1407
1408
						if ($scheme != 'https')
1409
							$data = $boardurl . '/proxy.php?request=' . urlencode($data) . '&hash=' . md5($data . $image_proxy_secret);
1410
					}
1411
					elseif (empty($scheme))
1412
						$data = '//' . ltrim($data, ':/');
1413
				},
1414
				'disabled_content' => '($1)',
1415
			),
1416
			array(
@@ 1420-1436 (lines=17) @@
1417
				'tag' => 'img',
1418
				'type' => 'unparsed_content',
1419
				'content' => '<img src="$1" alt="" class="bbc_img">',
1420
				'validate' => function (&$tag, &$data, $disabled)
1421
				{
1422
					global $image_proxy_enabled, $image_proxy_secret, $boardurl;
1423
1424
					$data = strtr($data, array('<br>' => ''));
1425
					$scheme = parse_url($data, PHP_URL_SCHEME);
1426
					if ($image_proxy_enabled)
1427
					{
1428
						if (empty($scheme))
1429
							$data = 'http://' . ltrim($data, ':/');
1430
1431
						if ($scheme != 'https')
1432
							$data = $boardurl . '/proxy.php?request=' . urlencode($data) . '&hash=' . md5($data . $image_proxy_secret);
1433
					}
1434
					elseif (empty($scheme))
1435
						$data = '//' . ltrim($data, ':/');
1436
				},
1437
				'disabled_content' => '($1)',
1438
			),
1439
			array(