diff options
| -rw-r--r-- | app/views/index/normal.phtml | 2 | ||||
| -rw-r--r-- | app/views/index/reader.phtml | 2 | ||||
| -rw-r--r-- | lib/Minz/Request.php | 7 |
3 files changed, 9 insertions, 2 deletions
diff --git a/app/views/index/normal.phtml b/app/views/index/normal.phtml index 88b194a65..3de94f321 100644 --- a/app/views/index/normal.phtml +++ b/app/views/index/normal.phtml @@ -88,7 +88,7 @@ $today = @strtotime('today'); echo $first ? _t('gen.short.by_author') . ' ' : '· '; $first = false; ?> - <em><a href="<?= _url('index', 'index', 'search', 'author:' . str_replace(' ', '+', htmlspecialchars_decode($author, ENT_QUOTES))) ?>"><?= $author ?></a></em> + <em><a href="<?= Minz_Url::display(Minz_Request::modifiedCurrentRequest(['search' => 'author:' . str_replace(' ', '+', htmlspecialchars_decode($author, ENT_QUOTES))])) ?>"><?= $author ?></a></em> <?php endforeach; ?> </div><?php endif; ?> </div> diff --git a/app/views/index/reader.phtml b/app/views/index/reader.phtml index 32e2bee04..f2f76f8b6 100644 --- a/app/views/index/reader.phtml +++ b/app/views/index/reader.phtml @@ -57,7 +57,7 @@ $content_width = FreshRSS_Context::$user_conf->content_width; echo $first ? _t('gen.short.by_author') . ' ' : '· '; $first = false; ?> -<em><a href="<?= _url('index', 'index', 'search', 'author:' . str_replace(' ', '+', htmlspecialchars_decode($author, ENT_QUOTES))) ?>"><?= $author ?></a></em> +<em><a href="<?= Minz_Url::display(Minz_Request::modifiedCurrentRequest(['search' => 'author:' . str_replace(' ', '+', htmlspecialchars_decode($author, ENT_QUOTES))])) ?>"><?= $author ?></a></em> <?php endforeach; echo ' — '; 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 |
