From e29771db318d14a3f3c29ce6c85982079c0ba9be Mon Sep 17 00:00:00 2001 From: Ere Maijala Date: Fri, 29 Nov 2024 14:54:11 +0200 Subject: [PATCH 1/2] Disable !important rule in lessToSass. (#4125) We don't have rules that need it, and it messes up plain CSS functions such as var(). --- Gruntfile.js | 1 + .../cookie-consent/core/components/consent-modal.scss | 2 +- .../cookie-consent/core/components/preferences-modal.scss | 2 +- .../cookie-consent/core/components/consent-modal.scss | 2 +- .../cookie-consent/core/components/preferences-modal.scss | 2 +- 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index ef19a18c628..9d5d8665746 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -128,6 +128,7 @@ module.exports = function(grunt) { } ], options: { + excludes: ['important'], replacements: [ // Activate SCSS { diff --git a/themes/bootstrap3/scss/components/cookie-consent/core/components/consent-modal.scss b/themes/bootstrap3/scss/components/cookie-consent/core/components/consent-modal.scss index 01855eb28de..18e2a186ee2 100644 --- a/themes/bootstrap3/scss/components/cookie-consent/core/components/consent-modal.scss +++ b/themes/bootstrap3/scss/components/cookie-consent/core/components/consent-modal.scss @@ -689,7 +689,7 @@ $cc-footer-links-gap: 1.3rem !default; max-width: none!important; min-width: auto!important; border-left: none!important; - border-top: 1px solid var(--cc-separator-border-color !important); + border-top: 1px solid var(--cc-separator-border-color)!important; } .cm__btn + .cm__btn, diff --git a/themes/bootstrap3/scss/components/cookie-consent/core/components/preferences-modal.scss b/themes/bootstrap3/scss/components/cookie-consent/core/components/preferences-modal.scss index 782c07591a6..4b52b99ea7f 100644 --- a/themes/bootstrap3/scss/components/cookie-consent/core/components/preferences-modal.scss +++ b/themes/bootstrap3/scss/components/cookie-consent/core/components/preferences-modal.scss @@ -1000,6 +1000,6 @@ $cc-service-toggle-knob-icon-width: 1.7px !default; } .show--preferences #cc-main .cc--anim .pm{ - transform: translateY(0 !important); + transform: translateY(0)!important; } } diff --git a/themes/bootstrap5/scss/components/cookie-consent/core/components/consent-modal.scss b/themes/bootstrap5/scss/components/cookie-consent/core/components/consent-modal.scss index 01855eb28de..18e2a186ee2 100644 --- a/themes/bootstrap5/scss/components/cookie-consent/core/components/consent-modal.scss +++ b/themes/bootstrap5/scss/components/cookie-consent/core/components/consent-modal.scss @@ -689,7 +689,7 @@ $cc-footer-links-gap: 1.3rem !default; max-width: none!important; min-width: auto!important; border-left: none!important; - border-top: 1px solid var(--cc-separator-border-color !important); + border-top: 1px solid var(--cc-separator-border-color)!important; } .cm__btn + .cm__btn, diff --git a/themes/bootstrap5/scss/components/cookie-consent/core/components/preferences-modal.scss b/themes/bootstrap5/scss/components/cookie-consent/core/components/preferences-modal.scss index 782c07591a6..4b52b99ea7f 100644 --- a/themes/bootstrap5/scss/components/cookie-consent/core/components/preferences-modal.scss +++ b/themes/bootstrap5/scss/components/cookie-consent/core/components/preferences-modal.scss @@ -1000,6 +1000,6 @@ $cc-service-toggle-knob-icon-width: 1.7px !default; } .show--preferences #cc-main .cc--anim .pm{ - transform: translateY(0 !important); + transform: translateY(0)!important; } } From 0715d3426ded37407db72542eadc386c997856f4 Mon Sep 17 00:00:00 2001 From: Ere Maijala Date: Fri, 29 Nov 2024 09:03:09 -0500 Subject: [PATCH 2/2] Remove call_user_func from record factories (extracted from #4126). --- .../Backend/EDS/Response/RecordCollectionFactory.php | 3 +-- .../Backend/EIT/Response/XML/RecordCollectionFactory.php | 3 +-- .../Backend/Pazpar2/Response/RecordCollectionFactory.php | 3 +-- .../Backend/Solr/Response/Json/RecordCollectionFactory.php | 3 +-- .../Backend/WorldCat2/Response/RecordCollectionFactory.php | 3 +-- .../Response/AbstractJsonRecordCollectionFactory.php | 3 +-- 6 files changed, 6 insertions(+), 12 deletions(-) diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Response/RecordCollectionFactory.php b/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Response/RecordCollectionFactory.php index 1a91848769f..7f494b76b53 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Response/RecordCollectionFactory.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Response/RecordCollectionFactory.php @@ -32,7 +32,6 @@ use VuFindSearch\Exception\InvalidArgumentException; use VuFindSearch\Response\RecordCollectionFactoryInterface; -use function call_user_func; use function gettype; use function is_array; use function is_callable; @@ -104,7 +103,7 @@ public function factory($response) ?? $response['Records'] ?? []; foreach ($records as $record) { - $collection->add(call_user_func($this->recordFactory, $record), false); + $collection->add(($this->recordFactory)($record), false); } return $collection; } diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/EIT/Response/XML/RecordCollectionFactory.php b/module/VuFindSearch/src/VuFindSearch/Backend/EIT/Response/XML/RecordCollectionFactory.php index e786250f4ff..0f690f1ad60 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/EIT/Response/XML/RecordCollectionFactory.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/EIT/Response/XML/RecordCollectionFactory.php @@ -33,7 +33,6 @@ use VuFindSearch\Exception\InvalidArgumentException; use VuFindSearch\Response\RecordCollectionFactoryInterface; -use function call_user_func; use function gettype; use function is_array; use function is_callable; @@ -102,7 +101,7 @@ public function factory($response) } $collection = new $this->collectionClass($response); foreach ($response['docs'] as $doc) { - $collection->add(call_user_func($this->recordFactory, $doc), false); + $collection->add(($this->recordFactory)($doc), false); } return $collection; } diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Pazpar2/Response/RecordCollectionFactory.php b/module/VuFindSearch/src/VuFindSearch/Backend/Pazpar2/Response/RecordCollectionFactory.php index 533dddf1958..75b69813204 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/Pazpar2/Response/RecordCollectionFactory.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/Pazpar2/Response/RecordCollectionFactory.php @@ -32,7 +32,6 @@ use VuFindSearch\Exception\InvalidArgumentException; use VuFindSearch\Response\RecordCollectionFactoryInterface; -use function call_user_func; use function is_callable; /** @@ -96,7 +95,7 @@ public function factory($response) $response['offset'] ); foreach ($response['records'] as $doc) { - $collection->add(call_user_func($this->recordFactory, $doc), false); + $collection->add(($this->recordFactory)($doc), false); } return $collection; } diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Response/Json/RecordCollectionFactory.php b/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Response/Json/RecordCollectionFactory.php index 14d0390fda6..403b6d7a167 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Response/Json/RecordCollectionFactory.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Response/Json/RecordCollectionFactory.php @@ -32,7 +32,6 @@ use VuFindSearch\Exception\InvalidArgumentException; use VuFindSearch\Response\RecordCollectionFactoryInterface; -use function call_user_func; use function gettype; use function is_array; use function sprintf; @@ -108,7 +107,7 @@ public function factory($response) if (isset($doc['id']) && ($hl = $hlDetails[$doc['id']] ?? [])) { $doc['__highlight_details'] = $hl; } - $collection->add(call_user_func($this->recordFactory, $doc), false); + $collection->add(($this->recordFactory)($doc), false); } return $collection; } diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/WorldCat2/Response/RecordCollectionFactory.php b/module/VuFindSearch/src/VuFindSearch/Backend/WorldCat2/Response/RecordCollectionFactory.php index b794ab8f00a..4ea45924ffc 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/WorldCat2/Response/RecordCollectionFactory.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/WorldCat2/Response/RecordCollectionFactory.php @@ -33,7 +33,6 @@ use VuFindSearch\Exception\InvalidArgumentException; use VuFindSearch\Response\RecordCollectionFactoryInterface; -use function call_user_func; use function gettype; use function is_array; use function is_callable; @@ -105,7 +104,7 @@ public function factory($response) } $collection = new $this->collectionClass($response); foreach ($response['docs'] as $doc) { - $collection->add(call_user_func($this->recordFactory, $doc), false); + $collection->add(($this->recordFactory)($doc), false); } return $collection; } diff --git a/module/VuFindSearch/src/VuFindSearch/Response/AbstractJsonRecordCollectionFactory.php b/module/VuFindSearch/src/VuFindSearch/Response/AbstractJsonRecordCollectionFactory.php index 4d6cd810a48..61c94723258 100644 --- a/module/VuFindSearch/src/VuFindSearch/Response/AbstractJsonRecordCollectionFactory.php +++ b/module/VuFindSearch/src/VuFindSearch/Response/AbstractJsonRecordCollectionFactory.php @@ -32,7 +32,6 @@ use VuFindSearch\Exception\InvalidArgumentException; -use function call_user_func; use function gettype; use function is_array; use function is_callable; @@ -104,7 +103,7 @@ public function factory($response) } $collection = new $this->collectionClass($response); foreach ($this->getDocumentListFromResponse($response) as $doc) { - $collection->add(call_user_func($this->recordFactory, $doc), false); + $collection->add(($this->recordFactory)($doc), false); } return $collection; }