| @@ 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. |
|
| @@ 2777-2782 (lines=6) @@ | ||
| 2774 | { |
|
| 2775 | return $scripturl . '/' . strtr("$m[1]", '&;=', '//,') . '.html?' . SID. (isset($m[2]) ? "$m[2]" : ""); |
|
| 2776 | }, $setLocation); |
|
| 2777 | else |
|
| 2778 | $setLocation = preg_replace_callback('~^' . preg_quote($scripturl, '/') . '\?((?:board|topic)=[^#"]+?)(#[^"]*?)?$~', |
|
| 2779 | function ($m) use ($scripturl) |
|
| 2780 | { |
|
| 2781 | return $scripturl . '/' . strtr("$m[1]", '&;=', '//,') . '.html' . (isset($m[2]) ? "$m[2]" : ""); |
|
| 2782 | }, $setLocation); |
|
| 2783 | } |
|
| 2784 | ||
| 2785 | // Maybe integrations want to change where we are heading? |
|