From 3b1f5f13b7f824b86f93c703643cb31452054364 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 15 Nov 2024 23:15:52 +0000 Subject: [PATCH 1/2] Unneeded variable removed --- src/Module/OpenSearch.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/Module/OpenSearch.php b/src/Module/OpenSearch.php index 68594e9b88..7ff64ecd67 100644 --- a/src/Module/OpenSearch.php +++ b/src/Module/OpenSearch.php @@ -27,9 +27,6 @@ class OpenSearch extends BaseModule /** @var IManageConfigValues */ private $config; - /** @var App\baseUrl */ - protected $baseUrl; - /** @var string */ private $basePath; @@ -39,7 +36,6 @@ class OpenSearch extends BaseModule $this->config = $config; $this->basePath = $basePath->getPath(); - $this->baseUrl = $baseUrl; } /** From 6b360858ecc2009222de1be09388bd3ad31b0596 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 20 Nov 2024 07:22:36 +0000 Subject: [PATCH 2/2] New function to update media entries --- src/Model/Post/Media.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/Model/Post/Media.php b/src/Model/Post/Media.php index 8ed516f322..e707c79ced 100644 --- a/src/Model/Post/Media.php +++ b/src/Model/Post/Media.php @@ -846,7 +846,7 @@ class Media } /** - * Update post-media entries + * Update post-media entries by id * * @param array $fields * @param int $id @@ -857,6 +857,18 @@ class Media return DBA::update('post-media', $fields, ['id' => $id]); } + /** + * Update post-media entries + * + * @param array $fields + * @param array $condition + * @return boolean + */ + public static function update(array $fields, array $condition): bool + { + return DBA::update('post-media', $fields, $condition); + } + /** * Checks if media attachments are associated with the provided item ID. *