Skip to content
This repository has been archived by the owner on Jan 25, 2021. It is now read-only.

Commit

Permalink
Merge branch 'update-to-core-v6-with-ES7' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
edelm committed Jan 16, 2020
2 parents 4c619b1 + 3e9f350 commit b1e14db
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 5 deletions.
2 changes: 1 addition & 1 deletion local/jus/jusdev/config/vufind/searches.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ default_sort = publishDateSort desc
limit_options = 5,10,20,40,60,80,100
default_limit = 20
multiValuedFRBRField = false
retain_filters_by_default = true
retain_filters_by_default = false

[Sorting]
relevance = sort.relevance
Expand Down
2 changes: 1 addition & 1 deletion local/jus/justest/config/vufind/searches.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ default_sort = publishDateSort desc
limit_options = 5,10,20,40,60,80,100
default_limit = 20
multiValuedFRBRField = false
retain_filters_by_default = true
retain_filters_by_default = false

[Sorting]
relevance = sort.relevance
Expand Down
2 changes: 1 addition & 1 deletion local/jus/local/config/vufind/searches.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ default_sort = publishDateSort desc
limit_options = 5,10,20,40,60,80,100
default_limit = 20
multiValuedFRBRField = false
retain_filters_by_default = true
retain_filters_by_default = false

[Sorting]
relevance = sort.relevance
Expand Down
22 changes: 20 additions & 2 deletions module/Swissbib/src/Swissbib/View/Helper/DisplayNameSorter.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,29 @@ public function __invoke(array $facetList, string $sortIndex)
*/
private function _sortByDisplayName($a, $b)
{
$a = strtoupper($a[$this->sortIndex]);
$b = strtoupper($b[$this->sortIndex]);
$a = $this->stripDiacritics(strtoupper($a[$this->sortIndex]));
$b = $this->stripDiacritics(strtoupper($b[$this->sortIndex]));
if ($a == $b) {
return 0;
}
return ($a < $b) ? -1 : 1;
}

/**
* Remove diacritics (accents, umlauts, etc.) from a string
*
* @param string $string The text where we would like to remove diacritics
*
* @return string The input text with diacritics removed
*/
private function stripDiacritics($string)
{
// See http://userguide.icu-project.org/transforms/general for
// an explanation of this.
$transliterator = \Transliterator::createFromRules(
':: NFD; :: [:Nonspacing Mark:] Remove; :: NFC;',
\Transliterator::FORWARD
);
return $transliterator->transliterate($string);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,12 @@
*/
class Params extends VuFindMixedListParams
{
/**
* Set filterList
*
* @param $filterArray
*/
public function setFilterList($filterArray) {
$this->filterList = $filterArray;
}
}
1 change: 1 addition & 0 deletions module/VuFind/config/module.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,7 @@

// Define record view routes -- route name => controller
$recordRoutes = [
'vufindrecord' => 'Record',
'record' => 'Record',
'collection' => 'Collection',
'edsrecord' => 'EdsRecord',
Expand Down

0 comments on commit b1e14db

Please sign in to comment.