Code Duplication    Length = 5-6 lines in 2 locations

Sources/QueryString.php 1 location

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

Sources/Subs.php 1 location

@@ 2623-2628 (lines=6) @@
2620
				{
2621
					return $scripturl . '/' . strtr("$m[1]", '&;=', '//,') . '.html?' . SID. (isset($m[2]) ? "$m[2]" : "");
2622
				}, $setLocation);
2623
		else
2624
			$setLocation = preg_replace_callback('~^' . preg_quote($scripturl, '/') . '\?((?:board|topic)=[^#"]+?)(#[^"]*?)?$~',
2625
				function ($m) use ($scripturl)
2626
				{
2627
					return $scripturl . '/' . strtr("$m[1]", '&;=', '//,') . '.html' . (isset($m[2]) ? "$m[2]" : "");
2628
				}, $setLocation);
2629
	}
2630
2631
	// Maybe integrations want to change where we are heading?