Code Duplication    Length = 5-6 lines in 2 locations

Sources/QueryString.php 1 location

@@ 669-673 (lines=5) @@
666
			{
667
				global $scripturl; return '"' . $scripturl . "/" . strtr("$m[1]", '&;=', '//,') . ".html?" . SID . (isset($m[2]) ? $m[2] : "") . '"';
668
			}, $buffer);
669
		else
670
			$buffer = preg_replace_callback('~"' . preg_quote($scripturl, '/') . '\?((?:board|topic)=[^#"]+?)(#[^"]*?)?"~', function($m)
671
			{
672
				global $scripturl; return '"' . $scripturl . '/' . strtr("$m[1]", '&;=', '//,') . '.html' . (isset($m[2]) ? $m[2] : "") . '"';
673
			}, $buffer);
674
	}
675
676
	// Return the changed buffer.

Sources/Subs.php 1 location

@@ 2775-2780 (lines=6) @@
2772
				{
2773
					return $scripturl . '/' . strtr("$m[1]", '&;=', '//,') . '.html?' . SID. (isset($m[2]) ? "$m[2]" : "");
2774
				}, $setLocation);
2775
		else
2776
			$setLocation = preg_replace_callback('~^' . preg_quote($scripturl, '/') . '\?((?:board|topic)=[^#"]+?)(#[^"]*?)?$~',
2777
				function ($m) use ($scripturl)
2778
				{
2779
					return $scripturl . '/' . strtr("$m[1]", '&;=', '//,') . '.html' . (isset($m[2]) ? "$m[2]" : "");
2780
				}, $setLocation);
2781
	}
2782
2783
	// Maybe integrations want to change where we are heading?