mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-07-28 15:57:27 -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:
committed by
GitHub
parent
9c6682e7ed
commit
31cb07ac1a
@@ -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