Code Duplication    Length = 5-6 lines in 2 locations

Sources/QueryString.php 1 location

@@ 694-698 (lines=5) @@
691
			{
692
				global $scripturl; return '"' . $scripturl . "/" . strtr("$m[1]", '&;=', '//,') . ".html?" . SID . (isset($m[2]) ? $m[2] : "") . '"';
693
			}, $buffer);
694
		else
695
			$buffer = preg_replace_callback('~"' . preg_quote($scripturl, '/') . '\?((?:board|topic)=[^#"]+?)(#[^"]*?)?"~', function($m)
696
			{
697
				global $scripturl; return '"' . $scripturl . '/' . strtr("$m[1]", '&;=', '//,') . '.html' . (isset($m[2]) ? $m[2] : "") . '"';
698
			}, $buffer);
699
	}
700
701
	// Return the changed buffer.

Sources/Subs.php 1 location

@@ 2871-2876 (lines=6) @@
2868
				{
2869
					return $scripturl . '/' . strtr("$m[1]", '&;=', '//,') . '.html?' . SID. (isset($m[2]) ? "$m[2]" : "");
2870
				}, $setLocation);
2871
		else
2872
			$setLocation = preg_replace_callback('~^' . preg_quote($scripturl, '/') . '\?((?:board|topic)=[^#"]+?)(#[^"]*?)?$~',
2873
				function ($m) use ($scripturl)
2874
				{
2875
					return $scripturl . '/' . strtr("$m[1]", '&;=', '//,') . '.html' . (isset($m[2]) ? "$m[2]" : "");
2876
				}, $setLocation);
2877
	}
2878
2879
	// Maybe integrations want to change where we are heading?