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

@@ 2791-2796 (lines=6) @@
2788
				{
2789
					return $scripturl . '/' . strtr("$m[1]", '&;=', '//,') . '.html?' . SID. (isset($m[2]) ? "$m[2]" : "");
2790
				}, $setLocation);
2791
		else
2792
			$setLocation = preg_replace_callback('~^' . preg_quote($scripturl, '/') . '\?((?:board|topic)=[^#"]+?)(#[^"]*?)?$~',
2793
				function ($m) use ($scripturl)
2794
				{
2795
					return $scripturl . '/' . strtr("$m[1]", '&;=', '//,') . '.html' . (isset($m[2]) ? "$m[2]" : "");
2796
				}, $setLocation);
2797
	}
2798
2799
	// Maybe integrations want to change where we are heading?