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