mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-10-19 18:02:34 -04:00
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
This commit is contained in:
1 parent
9c6682e7ed
commit
31cb07ac1a
3 files changed
+9
-2
No files matched your search
@@ -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>
|
||||
|
||||
@@ -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 ' — ';
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user