Code Duplication    Length = 17-17 lines in 2 locations

Sources/Subs.php 2 locations

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