diff options
| author | 2021-01-02 18:59:57 -0500 | |
|---|---|---|
| committer | 2021-01-03 00:59:57 +0100 | |
| commit | 31cb07ac1acf7bad8c1bf6bbef45a17f4e0edbf3 (patch) | |
| tree | de55a9b14be7aa83c6064ed6e9417bb3f3e512f4 /lib | |
| parent | 9c6682e7edf8cbad828088cbeeef66c7ecefdd9a (diff) | |
Fix author search link (#3315)
Before, when clicking on the author link, the search was done on the
main stream in the normal view. It's fine until the feed is not visible
in the main stream.
Now, the current context is used along with the search.
See #3314
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/Minz/Request.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Minz/Request.php b/lib/Minz/Request.php index 271bcf738..0c0a0b6a0 100644 --- a/lib/Minz/Request.php +++ b/lib/Minz/Request.php @@ -71,6 +71,13 @@ class Minz_Request { 'params' => self::$params, ); } + public static function modifiedCurrentRequest(array $extraParams = null) { + $currentRequest = self::currentRequest(); + if (null !== $extraParams) { + $currentRequest['params'] = array_merge($currentRequest['params'], $extraParams); + } + return $currentRequest; + } /** * Setteurs |
