From 3cf595974e6103c9fce86bcc646259ceefd14df6 Mon Sep 17 00:00:00 2001 From: Jan Henckens Date: Sun, 11 Feb 2024 14:24:23 +0100 Subject: [PATCH 1/3] Pass query as param #16 --- src/SplashingImages.php | 2 +- src/controllers/DefaultController.php | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/SplashingImages.php b/src/SplashingImages.php index c96aa2a..14afdb3 100644 --- a/src/SplashingImages.php +++ b/src/SplashingImages.php @@ -73,7 +73,7 @@ function (RegisterUrlRulesEvent $event) { $event->rules['splashing-images/collections/'] = 'splashing-images/default/collection'; $event->rules['splashing-images/find'] = 'splashing-images/default/find'; $event->rules['splashing-images/search'] = 'splashing-images/default/search'; - $event->rules['splashing-images/search//'] = 'splashing-images/default/search'; + $event->rules['splashing-images/search/'] = 'splashing-images/default/search'; } ); diff --git a/src/controllers/DefaultController.php b/src/controllers/DefaultController.php index 446ff0a..dfc436c 100644 --- a/src/controllers/DefaultController.php +++ b/src/controllers/DefaultController.php @@ -59,7 +59,7 @@ public function actionIndex($page = 1) public function actionFind() { $query = Craft::$app->request->getRequiredBodyParam('query'); - return $this->redirect(UrlHelper::cpUrl('splashing-images/search' . '/' . $query . '/1')); + return $this->redirect(UrlHelper::cpUrl('splashing-images/search/1', ['search' => $query])); } /** @@ -69,8 +69,9 @@ public function actionFind() * @return bool|\yii\web\Response * @throws \yii\base\Exception */ - public function actionSearch(string $query, int $page) + public function actionSearch(int $page) { + $query = $this->request->getRequiredQueryParam('search'); if (!$query) { return false; } From d6883e7496364c9cd8093180395ea25bcbffdf33 Mon Sep 17 00:00:00 2001 From: Jan Henckens Date: Sun, 11 Feb 2024 14:25:19 +0100 Subject: [PATCH 2/3] Changelog for 3.0.1 --- CHANGELOG.md | 5 +++++ composer.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dfd52e3..9bcea8e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Splashing Images changelog +## 3.0.1 - 2024-02-11 +### Fixed +- Fixed an error with multiple search terms ([#16](https://github.com/studioespresso/craft-unsplash/issues/16)) + + ## 3.0.0 - 20222-04-26 ### Added - Craft 4 🚀 diff --git a/composer.json b/composer.json index 640b4cf..cfa6dd6 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "studioespresso/craft-splashingimages", "description": "unsplash.com integration for Craft 3", "type": "craft-plugin", - "version": "3.0.0", + "version": "3.0.1", "keywords": [ "craft", "cms", From 94aea65bf0ce2fcc5b49f23e87e9b6b10ed09c32 Mon Sep 17 00:00:00 2001 From: Jan Henckens Date: Sun, 11 Feb 2024 14:26:36 +0100 Subject: [PATCH 3/3] Updated icon --- src/icon.svg | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/src/icon.svg b/src/icon.svg index a643d4d..5e68f85 100644 --- a/src/icon.svg +++ b/src/icon.svg @@ -1,19 +1,9 @@ - - - - icon_webpage - Created with Sketch. - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + +