Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Back to browse results feature #3826

Open
wants to merge 35 commits into
base: dev
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
3356657
Back to browse results feature
rominail Jul 15, 2024
e476f3e
Back to browse results feature
rominail Jul 15, 2024
a3568bd
Back to browse results feature
rominail Jul 15, 2024
3a35807
Back to browse results feature
rominail Jul 15, 2024
16bc5cd
Back to browse results feature - Discussion changes
rominail Jul 25, 2024
df77e7d
Back to browse results feature - Discussion changes
rominail Jul 25, 2024
1acf6cf
Back to browse results feature - Fix pipelines
rominail Jul 25, 2024
0683fda
Discussion changes
rominail Jul 26, 2024
3185f9e
Discussion changes
rominail Jul 26, 2024
235ca56
Discussion changes
rominail Jul 26, 2024
b963d83
Discussion changes
rominail Jul 26, 2024
542beae
Discussion changes
rominail Jul 26, 2024
21b14ac
Fix pipelines
rominail Jul 26, 2024
fece41b
Fix pipelines
rominail Jul 26, 2024
5e693df
Fix pipelines
rominail Jul 26, 2024
4d47821
Fix pipelines
rominail Jul 26, 2024
2c297d5
Discussion changes
rominail Jul 29, 2024
27f8938
Discussion changes
rominail Jul 29, 2024
0d9af3d
Discussion changes
rominail Jul 29, 2024
f1969ee
Discussion changes
rominail Jul 29, 2024
3fbf094
Fix pipelines
rominail Jul 29, 2024
e273e08
Remove getService
rominail Jul 31, 2024
2a1585c
Fix conflicts
rominail Jul 31, 2024
86473b6
Discussion changes
rominail Aug 12, 2024
f78eb87
Discussion changes
rominail Aug 12, 2024
11168cd
Discussion changes
rominail Aug 12, 2024
c57879b
Discussion changes
rominail Aug 12, 2024
730d379
Fix bug
rominail Aug 14, 2024
233c78b
Discussion changes
rominail Aug 14, 2024
f9a2a9b
Discussion changes
rominail Aug 16, 2024
8100053
Discussion changes
rominail Aug 16, 2024
2df9b95
Discussion changes
rominail Aug 16, 2024
df60635
Improve comment.
demiankatz Aug 19, 2024
f42ff33
Merge branch 'vufind-org:dev' into backToOrigin
rominail Aug 20, 2024
0f6d05b
Merge branch 'vufind-org:dev' into backToOrigin
rominail Aug 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix conflicts
  • Loading branch information
rominail committed Jul 31, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 2a1585c31556ef87229db0d04c981cee1341024e
23 changes: 17 additions & 6 deletions module/VuFind/src/VuFind/View/Helper/Root/SearchMemory.php
Original file line number Diff line number Diff line change
@@ -73,14 +73,27 @@ public function __construct(Memory $memory)
* @return string
*/
public function getLastSearchLink($link, $prefix = '', $suffix = '')
{
if ($url = $this->getLastSearchUrl()) {
$escaper = $this->getView()->plugin('escapeHtml');
return $prefix . '<a href="' . $escaper($url) . '">' . $link . '</a>' . $suffix;
}
return '';
}

/**
* If a previous search is recorded in the session, return its URL
rominail marked this conversation as resolved.
Show resolved Hide resolved
*
* @return string|null
*/
public function getLastSearchUrl(): ?string
{
if ($lastSearch = $this->getLastSearch()) {
$searchClassId = $lastSearch->getBackendId();
$params = $lastSearch->getParams();
// Use last settings for params that are not stored in the search:
foreach (['limit', 'view', 'sort'] as $setting) {
$value
= $this->memory->retrieveLastSetting($searchClassId, $setting);
$value = $this->memory->retrieveLastSetting($searchClassId, $setting);
if ($value) {
$method = 'set' . ucfirst($setting);
$params->$method($value);
@@ -101,11 +114,9 @@ public function getLastSearchLink($link, $prefix = '', $suffix = '')

$url .= $queryHelper->getParams(false);

$escaper = $this->getView()->plugin('escapeHtml');
return $prefix . '<a href="' . $escaper($url) . '">' . $link . '</a>'
. $suffix;
return $url;
}
return '';
return null;
}

/**
Loading