| @@ 699-703 (lines=5) @@ | ||
| 696 | { |
|
| 697 | global $scripturl; return '"' . $scripturl . "/" . strtr("$m[1]", '&;=', '//,') . ".html?" . SID . (isset($m[2]) ? $m[2] : "") . '"'; |
|
| 698 | }, $buffer); |
|
| 699 | else |
|
| 700 | $buffer = preg_replace_callback('~"' . preg_quote($scripturl, '/') . '\?((?:board|topic)=[^#"]+?)(#[^"]*?)?"~', function($m) |
|
| 701 | { |
|
| 702 | global $scripturl; return '"' . $scripturl . '/' . strtr("$m[1]", '&;=', '//,') . '.html' . (isset($m[2]) ? $m[2] : "") . '"'; |
|
| 703 | }, $buffer); |
|
| 704 | } |
|
| 705 | ||
| 706 | // Return the changed buffer. |
|
| @@ 2934-2939 (lines=6) @@ | ||
| 2931 | { |
|
| 2932 | return $scripturl . '/' . strtr("$m[1]", '&;=', '//,') . '.html?' . SID. (isset($m[2]) ? "$m[2]" : ""); |
|
| 2933 | }, $setLocation); |
|
| 2934 | else |
|
| 2935 | $setLocation = preg_replace_callback('~^' . preg_quote($scripturl, '/') . '\?((?:board|topic)=[^#"]+?)(#[^"]*?)?$~', |
|
| 2936 | function ($m) use ($scripturl) |
|
| 2937 | { |
|
| 2938 | return $scripturl . '/' . strtr("$m[1]", '&;=', '//,') . '.html' . (isset($m[2]) ? "$m[2]" : ""); |
|
| 2939 | }, $setLocation); |
|
| 2940 | } |
|
| 2941 | ||
| 2942 | // Maybe integrations want to change where we are heading? |
|